/* ============================================
   JOB LIST PAGE - PROFESSIONAL DESIGN
   ============================================ */

:root {
  --accent: #0050c8;
  --accent-hover: #003c96;
  --accent-light: #e6f0ff;
  --accent-dim: #003c96;
  --bg: #ffffff;
  --fg: #0f172a;
  --muted: rgba(15, 23, 42, 0.7);
  --muted-light: rgba(15, 23, 42, 0.5);
  --card: #ffffff;
  --card-hover: #f8fafc;
  --border: rgba(15, 23, 42, 0.1);
  --border-light: rgba(15, 23, 42, 0.06);
  
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.12);
  --shadow-xl: 0 20px 48px rgba(0, 0, 0, 0.15);
  
  --gradient-hero: linear-gradient(135deg, #001f4d 0%, #003c96 45%, #0050c8 100%);
  --gradient-primary: linear-gradient(135deg, #0050c8 0%, #003c96 100%);
  --gradient-overlay: linear-gradient(135deg, rgba(0, 80, 200, 0.05) 0%, rgba(0, 60, 150, 0.02) 100%);
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.2s ease;
  
  --w-max: 1200px;
}

[data-theme="dark"] {
  --bg: #0f172a;
  --fg: #f1f5f9;
  --muted: rgba(241, 245, 249, 0.75);
  --muted-light: rgba(241, 245, 249, 0.55);
  --card: #1e293b;
  --card-hover: #334155;
  --border: rgba(241, 245, 249, 0.12);
  --border-light: rgba(241, 245, 249, 0.08);
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --accent-light: rgba(59, 130, 246, 0.15);
  --accent-dim: #60a5fa;
  --gradient-hero: linear-gradient(135deg, #020617 0%, #0a1e46 45%, #1e3a8a 100%);
  --gradient-overlay: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(37, 99, 235, 0.05) 100%);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 20px 48px rgba(0, 0, 0, 0.6);
}

/* ============================================
   BASE STYLES
   ============================================ */

.fg-job {
  color: var(--fg);
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", "Roboto", "Helvetica Neue", Arial, sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

/* ============================================
   HERO SECTION
   ============================================ */

.job-hero {
  position: relative;
  padding: clamp(4rem, 7vw, 6rem) 1.5rem clamp(3rem, 6vw, 4.5rem);
  isolation: isolate;
  overflow: hidden;
  background: var(--gradient-hero);
  color: #ffffff;
}

.hero-background {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
}

.hero-content {
  max-width: var(--w-max);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.job-badge {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  color: #ffffff;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.job-title {
  font-weight: 800;
  line-height: 1.1;
  font-size: clamp(2.5rem, 5vw, 4rem);
  margin: 0 0 1rem;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.job-subtitle {
  font-size: clamp(1.125rem, 1.8vw, 1.25rem);
  color: rgba(255, 255, 255, 0.9);
  margin: 0 0 2rem;
  line-height: 1.7;
}

.job-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.95);
  font-size: 0.9375rem;
  font-weight: 500;
}

.meta-item svg {
  flex-shrink: 0;
  opacity: 0.9;
}

.job-locations {
  margin-bottom: 2rem;
}

.locations-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  color: rgba(255, 255, 255, 0.95);
  font-weight: 600;
  font-size: 0.9375rem;
}

.locations-header svg {
  opacity: 0.9;
}

.chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50px;
  font-size: 0.875rem;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  font-weight: 500;
  transition: var(--transition-fast);
}

.chip:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

.chip-muted {
  color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.1);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  border-radius: var(--radius-md);
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  border: 2px solid transparent;
  transition: var(--transition);
  cursor: pointer;
  line-height: 1;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--gradient-primary);
  color: #ffffff;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  background: linear-gradient(135deg, #003c96 0%, #002d70 100%);
}

.btn-primary svg {
  transition: var(--transition-fast);
}

.btn-primary:hover svg {
  transform: translateX(4px);
}

.btn-outline {
  background: transparent;
  color: var(--fg);
  border-color: var(--border);
}

.btn-outline:hover,
.btn-outline:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}

.btn-block {
  display: flex;
  width: 100%;
}

/* ============================================
   GRID LAYOUT
   ============================================ */

.job-grid {
  max-width: var(--w-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.85fr 0.95fr;
  gap: clamp(2rem, 4vw, 3rem);
  padding: clamp(2rem, 5vw, 4rem) clamp(1.5rem, 3vw, 2rem);
}

@media (max-width: 980px) {
  .job-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   JOB SECTIONS
   ============================================ */

.job-main {
  display: grid;
  gap: clamp(1.5rem, 3vw, 2rem);
}

.job-section {
  background: var(--card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: clamp(2rem, 3vw, 2.5rem);
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.job-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
  opacity: 0;
  transition: var(--transition);
}

.job-section:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
  border-color: var(--border);
}

.job-section:hover::before {
  opacity: 1;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.section-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--accent-light);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.job-section h2 {
  font-size: clamp(1.5rem, 2.5vw, 1.875rem);
  line-height: 1.2;
  margin: 0;
  font-weight: 700;
  color: var(--fg);
}

.section-content {
  display: grid;
  gap: 1rem;
}

.job-section p {
  color: var(--muted);
  line-height: 1.7;
  margin: 0;
  font-size: 1rem;
}

/* Bullets */
.bullets {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.875rem;
}

.bullets li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  color: var(--muted);
  line-height: 1.7;
  font-size: 0.9375rem;
}

.bullets li svg {
  flex-shrink: 0;
  margin-top: 0.125rem;
  color: var(--accent);
}

.bullets li span {
  flex: 1;
}

/* Meta Grid */
.meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.meta-card {
  display: flex;
  gap: 1rem;
  padding: 1.25rem;
  background: var(--card-hover);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  transition: var(--transition-fast);
}

.meta-card:hover {
  background: var(--card);
  box-shadow: var(--shadow-sm);
}

.meta-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--accent-light);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.meta-label {
  font-size: 0.75rem;
  color: var(--muted-light);
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.meta-value {
  font-weight: 600;
  color: var(--fg);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.job-cta {
  margin-top: 0.5rem;
}

/* ============================================
   ASIDE / SIDEBAR
   ============================================ */

.job-aside {
  position: relative;
  display: grid;
  gap: 1.5rem;
  align-content: start;
}

.aside-card {
  background: var(--card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: clamp(1.75rem, 3vw, 2.25rem);
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.aside-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.aside-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.aside-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--accent-light);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.aside-title {
  font-size: 1.25rem;
  margin: 0;
  font-weight: 700;
  color: var(--fg);
}

.aside-subtitle {
  font-size: 1.125rem;
  margin: 0;
  font-weight: 700;
  color: var(--fg);
}

.aside-note {
  font-size: 0.875rem;
  color: var(--muted);
  margin-top: 1rem;
  line-height: 1.6;
  padding-top: 1rem;
  border-top: 1px solid var(--border-light);
}

.kv {
  margin: 0 0 1.5rem;
  display: grid;
  gap: 0.75rem;
}

.kv > div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px dashed var(--border-light);
  align-items: center;
}

.kv > div:last-child {
  border-bottom: none;
}

.kv dt {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 500;
}

.kv dt svg {
  flex-shrink: 0;
  opacity: 0.7;
}

.kv dd {
  margin: 0;
  font-weight: 600;
  color: var(--fg);
  text-align: right;
  font-size: 0.9375rem;
}

/* Ticks List */
.ticks {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.875rem;
}

.ticks li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  color: var(--muted);
  line-height: 1.7;
  font-size: 0.9375rem;
}

.ticks li svg {
  flex-shrink: 0;
  margin-top: 0.125rem;
  color: var(--accent);
}

.ticks li span {
  flex: 1;
}

/* ============================================
   STICKY MOBILE APPLY
   ============================================ */

.apply-sticky {
  display: none;
}

@media (max-width: 980px) {
  .apply-sticky {
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    display: block;
    background: linear-gradient(180deg, transparent, var(--bg) 40%);
    padding: 1rem 1.5rem 1.25rem;
    z-index: 10;
    backdrop-filter: blur(10px);
  }
  
  .apply-sticky .btn {
    box-shadow: var(--shadow-lg);
  }
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.job-section,
.aside-card {
  animation: fadeInUp 0.6s ease-out backwards;
}

.job-section:nth-child(1) { animation-delay: 0.1s; }
.job-section:nth-child(2) { animation-delay: 0.2s; }
.job-section:nth-child(3) { animation-delay: 0.3s; }
.job-section:nth-child(4) { animation-delay: 0.4s; }
.job-section:nth-child(5) { animation-delay: 0.5s; }

.aside-card:nth-child(1) { animation-delay: 0.2s; }
.aside-card:nth-child(2) { animation-delay: 0.3s; }

/* ============================================
   RESPONSIVE TWEAKS
   ============================================ */

@media (max-width: 640px) {
  .hero-cta .btn {
    flex: 1 1 auto;
    width: 100%;
  }
  
  .chip {
    font-size: 0.8125rem;
    padding: 0.4375rem 0.875rem;
  }
  
  .meta-grid {
    grid-template-columns: 1fr;
  }
  
  .kv > div {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  
  .kv dd {
    text-align: left;
  }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
  .job-hero,
  .apply-sticky,
  .hero-cta,
  .job-cta,
  .btn {
    display: none;
  }
  
  .job-section,
  .aside-card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ddd;
  }
}
