:root {
  --navy: #1a2744;
  --navy-light: #243356;
  --gold: #c5a044;
  --gold-light: #d4b76a;
  --cream: #f5f1e8;
  --white: #ffffff;
  --text: #2c2c2c;
  --text-light: #5a5a5a;
  --border: #d4cfc4;
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: 'Merriweather', 'Georgia', serif;
  color: var(--text);
  background: var(--cream);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: 'Inter', 'Helvetica Neue', sans-serif;
  font-weight: 700;
  line-height: 1.3;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--gold);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--gold-light);
}

/* ── Accessibility ── */

.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 200;
  background: var(--gold);
  color: var(--navy);
  padding: 8px 16px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  border-radius: 0 0 4px 4px;
}

.skip-link:focus {
  top: 0;
}

/* ── Navigation ── */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--navy);
  border-bottom: 3px solid var(--gold);
  transition: box-shadow 0.3s;
}

.nav.scrolled {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--white);
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.nav-brand img {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.8);
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  transition: color 0.2s;
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--gold);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  -webkit-tap-highlight-color: transparent;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  margin: 5px 0;
  transition: transform 0.3s, opacity 0.3s;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ── Hero ── */

.hero {
  margin-top: 64px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  color: var(--white);
  padding: 80px 24px 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="60" height="60"><rect fill="none" width="60" height="60"/><path d="M30 0L60 30L30 60L0 30Z" fill="rgba(255,255,255,0.015)"/></svg>');
  pointer-events: none;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero-photo {
  width: 150px;
  height: 150px;
  margin: 0 auto 24px;
  border-radius: 50%;
  border: 3px solid var(--gold);
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.hero h1 {
  font-size: clamp(1.4rem, 4vw, 2.4rem);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.hero-rank {
  font-size: clamp(0.9rem, 2vw, 1.15rem);
  color: var(--gold);
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.hero-subtitle {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.7);
  font-family: 'Inter', sans-serif;
  font-weight: 400;
}

.hero-divider {
  width: 60px;
  height: 3px;
  background: var(--gold);
  margin: 20px auto;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin-top: 32px;
  flex-wrap: wrap;
}

.hero-stat {
  text-align: center;
  min-width: 100px;
}

.hero-stat-number {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--gold);
}

.hero-stat-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.6);
  font-family: 'Inter', sans-serif;
}

/* ── Sections ── */

.section {
  padding: 72px 24px;
}

.section-inner {
  max-width: 900px;
  margin: 0 auto;
}

.section-title {
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 8px;
  text-align: center;
}

.section-line {
  width: 50px;
  height: 3px;
  background: var(--gold);
  margin: 0 auto 40px;
}

.section-alt {
  background: var(--white);
}

/* ── About ── */

.about-text {
  font-size: clamp(0.95rem, 2vw, 1.05rem);
  color: var(--text-light);
  text-align: center;
  max-width: 750px;
  margin: 0 auto;
}

/* ── Timeline ── */

.timeline {
  position: relative;
  padding-left: 40px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 14px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--gold);
}

.timeline-item {
  position: relative;
  margin-bottom: 40px;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -33px;
  top: 6px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--gold);
  border: 3px solid var(--cream);
  box-shadow: 0 0 0 2px var(--gold);
}

.section-alt .timeline-dot {
  border-color: var(--white);
}

.timeline-year {
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.timeline-heading {
  font-size: clamp(1rem, 2.5vw, 1.15rem);
  color: var(--navy);
  margin-bottom: 4px;
}

.timeline-meta {
  font-size: 0.85rem;
  color: var(--text-light);
  font-style: italic;
  margin-bottom: 8px;
  word-break: break-word;
}

.timeline-desc {
  font-size: 0.95rem;
  color: var(--text-light);
}

/* ── Expertise cards ── */

.expertise-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.expertise-card {
  background: var(--cream);
  border: 1px solid var(--border);
  border-top: 3px solid var(--gold);
  padding: 28px 24px;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}

.expertise-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.expertise-icon {
  font-size: 2rem;
  margin-bottom: 12px;
}

.expertise-card h3 {
  font-size: 1rem;
  color: var(--navy);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.expertise-card p {
  font-size: 0.9rem;
  color: var(--text-light);
}

/* ── Training table (desktop) ── */

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch; /* iOS < 13 momentum scrolling */
}

.training-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.training-table thead {
  background: var(--navy);
  color: var(--white);
}

.training-table th {
  padding: 12px 16px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.8px;
  text-align: left;
}

.training-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-light);
}

.training-table tbody tr:hover {
  background: rgba(197, 160, 68, 0.06);
}

.training-note {
  color: var(--gold);
}

/* ── Training cards (mobile) ── */

.training-cards {
  display: none;
}

.training-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  padding: 20px;
  margin-bottom: 16px;
}

.training-card:last-child {
  margin-bottom: 0;
}

.training-card h3 {
  font-size: 0.95rem;
  color: var(--navy);
  margin-bottom: 4px;
}

.training-card-note {
  font-size: 0.8rem;
  color: var(--gold);
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  margin-bottom: 4px;
}

.training-card-meta {
  font-size: 0.82rem;
  color: var(--text-light);
  font-style: italic;
}

/* ── UN Mission highlight ── */

.mission-banner {
  background: linear-gradient(135deg, var(--navy) 0%, #1e3a5f 100%);
  color: var(--white);
  padding: 48px 32px;
  border-left: 5px solid var(--gold);
  display: flex;
  align-items: center;
  gap: 32px;
  max-width: 900px;
  margin: 0 auto;
}

.mission-badge {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  border: 2px solid var(--gold);
}

.mission-info h3 {
  font-size: 1.2rem;
  margin-bottom: 6px;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.mission-info p {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 4px;
}

.mission-date {
  color: var(--gold);
}

.mission-medal {
  margin-top: 10px;
  font-size: 0.92rem;
  color: var(--gold-light);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 10px;
}

.mission-footnote {
  margin-top: 8px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.55);
}

/* ── Recommendation ── */

.recommendation-box {
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 4px solid var(--gold);
  padding: 32px;
  max-width: 750px;
  margin: 0 auto;
  font-size: 1.02rem;
  color: var(--text-light);
  font-style: italic;
  text-align: center;
}

.recommendation-source {
  margin-top: 16px;
  font-style: normal;
  font-size: 0.85rem;
  color: var(--navy);
  font-family: 'Inter', sans-serif;
  font-weight: 600;
}

/* ── Footer ── */

.footer {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
  padding: 32px 24px;
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  letter-spacing: 0.5px;
  border-top: 3px solid var(--gold);
}

.footer strong {
  color: rgba(255, 255, 255, 0.8);
}

.footer-sub {
  margin-top: 6px;
}

/* ══════════════════════════════════════════
   Responsive — Tablet (max-width: 768px)
   ══════════════════════════════════════════ */

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--navy);
    flex-direction: column;
    padding: 16px 24px 20px;
    gap: 4px;
    border-bottom: 3px solid var(--gold);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    display: block;
    padding: 10px 0;
    font-size: 0.9rem;
  }

  .nav-toggle {
    display: block;
  }

  .hero {
    padding: 60px 20px 48px;
  }

  .hero-stats {
    gap: 24px;
  }

  .hero-stat-number {
    font-size: 1.5rem;
  }

  .section {
    padding: 48px 20px;
  }

  .expertise-grid {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

  .expertise-card {
    padding: 24px 16px;
  }

  .mission-banner {
    flex-direction: column;
    text-align: center;
    padding: 32px 20px;
    gap: 20px;
  }

  .mission-badge {
    width: 64px;
    height: 64px;
    font-size: 2rem;
  }

  .recommendation-box {
    padding: 24px 20px;
    font-size: 0.95rem;
  }

  .timeline {
    padding-left: 32px;
  }

  .timeline-dot {
    left: -25px;
  }
}

/* ══════════════════════════════════════════
   Responsive — Mobile (max-width: 560px)
   ══════════════════════════════════════════ */

@media (max-width: 560px) {
  .hero {
    padding: 48px 16px 40px;
  }

  .hero-photo {
    width: 120px;
    height: 120px;
  }

  .hero-stats {
    gap: 16px;
  }

  .hero-stat {
    min-width: 80px;
  }

  .section {
    padding: 40px 16px;
  }

  .section-line {
    margin-bottom: 28px;
  }

  .expertise-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .expertise-card {
    display: flex;
    align-items: flex-start;
    text-align: left;
    gap: 16px;
    padding: 20px;
  }

  .expertise-icon {
    margin-bottom: 0;
    font-size: 1.6rem;
    flex-shrink: 0;
    padding-top: 2px;
  }

  .table-scroll {
    display: none;
  }

  .training-cards {
    display: block;
  }

  .timeline {
    padding-left: 28px;
  }

  .timeline::before {
    left: 10px;
  }

  .timeline-dot {
    left: -24px;
    width: 12px;
    height: 12px;
  }

  .timeline-item {
    margin-bottom: 32px;
  }

  .timeline-desc {
    font-size: 0.9rem;
  }

  .mission-banner {
    padding: 24px 16px;
    border-left-width: 4px;
  }

  .mission-info h3 {
    font-size: 1.05rem;
  }

  .mission-info p {
    font-size: 0.88rem;
  }
}

/* ══════════════════════════════════════════
   Responsive — Small mobile (max-width: 380px)
   ══════════════════════════════════════════ */

@media (max-width: 380px) {
  .nav-brand span {
    display: none;
  }

  .hero-photo {
    width: 100px;
    height: 100px;
  }

  .hero-stats {
    flex-direction: column;
    gap: 12px;
  }
}

/* ── Reduced motion ── */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* ── Print styles ── */

@media print {
  .nav,
  .nav-toggle,
  .skip-link {
    display: none !important;
  }

  .hero {
    margin-top: 0;
    background: var(--navy) !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .section {
    padding: 24px 0;
    page-break-inside: avoid;
  }
}
