/* =============================================================
   Asim Munir — Independent Biography & Portfolio
   Palette: deep forest green · black · white · subtle gold
   ============================================================= */

:root {
  --green-950: #04170f;
  --green-900: #08301f;
  --green-850: #0a3624;
  --green-800: #0b3d2a;
  --green-700: #115137;
  --green-600: #17694a;
  --ink: #0a0b0c;
  --paper: #ffffff;
  --bone: #f6f5f1;
  --bone-2: #eeece6;
  --gold: #c8a44b;
  --gold-bright: #e2c373;
  --text: #1b211e;
  --muted: #5b665f;
  --muted-2: #8b948e;
  --line: rgba(11, 61, 42, 0.14);
  --line-soft: rgba(11, 61, 42, 0.08);
  --shadow-sm: 0 1px 2px rgba(4, 23, 15, 0.06), 0 6px 20px rgba(4, 23, 15, 0.06);
  --shadow-md: 0 4px 10px rgba(4, 23, 15, 0.08), 0 18px 44px rgba(4, 23, 15, 0.12);
  --radius: 14px;
  --radius-sm: 9px;
  --header-h: 76px;
  --font-display: "Fraunces", "Georgia", "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(0.22, 0.75, 0.3, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: var(--green-700); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--green-600); }
ul { padding: 0; list-style: none; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.16; color: var(--ink); letter-spacing: -0.01em; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 3.1vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 1.9vw, 1.45rem); }
h4 { font-size: 1.06rem; }
p { text-wrap: pretty; }

:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
::selection { background: rgba(200, 164, 75, 0.35); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; top: -60px; left: 16px; z-index: 200;
  background: var(--gold); color: var(--green-950); font-weight: 600;
  padding: 10px 18px; border-radius: 0 0 8px 8px; transition: top 0.25s var(--ease);
}
.skip-link:focus { top: 0; color: var(--green-950); }

.container { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  transition: background 0.35s var(--ease), box-shadow 0.35s var(--ease), backdrop-filter 0.35s var(--ease);
  background: linear-gradient(180deg, rgba(4, 23, 15, 0.62), rgba(4, 23, 15, 0));
}
.site-header.is-scrolled {
  background: rgba(4, 23, 15, 0.94);
  backdrop-filter: saturate(150%) blur(10px);
  box-shadow: 0 10px 30px rgba(4, 23, 15, 0.35);
}
.header-accent {
  position: absolute; left: 0; right: 0; bottom: 0; height: 2px; opacity: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55) 22%, var(--gold) 50%, rgba(255, 255, 255, 0.55) 78%, transparent);
  transition: opacity 0.35s var(--ease);
}
.site-header.is-scrolled .header-accent { opacity: 0.6; }

.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: #fff; }
.brand-emblem {
  width: 40px; height: 40px; display: grid; place-items: center;
  background: linear-gradient(145deg, var(--green-700), var(--green-950));
  border: 1px solid rgba(200, 164, 75, 0.55); border-radius: 11px;
  box-shadow: inset 0 0 18px rgba(200, 164, 75, 0.18);
}
.brand-crescent { width: 24px; height: 24px; color: var(--gold-bright); }
.brand-text { display: flex; flex-direction: column; line-height: 1.12; }
.brand-text strong { font-family: var(--font-display); font-size: 1.12rem; letter-spacing: 0.01em; }
.brand-text small { font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.18em; color: rgba(255, 255, 255, 0.68); }

.primary-nav ul { display: flex; gap: 4px; align-items: center; }
.primary-nav a {
  position: relative; display: block; padding: 9px 13px; border-radius: 8px;
  color: rgba(255, 255, 255, 0.86); text-decoration: none; font-size: 0.94rem; font-weight: 500;
  transition: color 0.2s, background 0.2s;
}
.primary-nav a::after {
  content: ""; position: absolute; left: 13px; right: 13px; bottom: 5px; height: 2px;
  background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform 0.28s var(--ease);
}
.primary-nav a:hover, .primary-nav a.is-active { color: #fff; background: rgba(255, 255, 255, 0.07); }
.primary-nav a.is-active::after { transform: scaleX(1); }

.nav-toggle {
  display: none; width: 46px; height: 46px; border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.3); color: #fff; place-items: center;
}
.nav-toggle .icon { width: 22px; height: 22px; }
.nav-icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .nav-icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .nav-icon-close { display: block; }

/* ---------- Hero (home) ---------- */
.hero {
  position: relative; min-height: max(640px, 94vh);
  display: flex; align-items: center;
  padding: calc(var(--header-h) + 56px) 0 96px;
  color: #fff; overflow: hidden;
  background:
    radial-gradient(1100px 620px at 78% 18%, rgba(23, 105, 74, 0.55), transparent 60%),
    radial-gradient(900px 700px at 8% 85%, rgba(200, 164, 75, 0.16), transparent 55%),
    linear-gradient(160deg, var(--green-950) 0%, var(--green-900) 46%, #061d14 100%);
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.5;
  background-image: linear-gradient(rgba(255,255,255,0.045) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,0.045) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(1000px 700px at 70% 30%, #000 30%, transparent 75%);
}
.hero-flag {
  position: absolute; right: -70px; top: 6%; width: min(48vw, 560px); color: rgba(255, 255, 255, 0.05);
  pointer-events: none;
}
.hero-basebar {
  position: absolute; left: 0; right: 0; bottom: 0; height: 8px;
  background: linear-gradient(90deg, var(--green-700) 0 62%, #ffffff 62% 66%, var(--gold) 66% 100%);
  opacity: 0.85;
}
.hero-inner {
  position: relative; z-index: 2; display: grid; grid-template-columns: 1.06fr 0.94fr;
  gap: clamp(32px, 5vw, 72px); align-items: center; width: min(1180px, calc(100% - 40px)); margin-inline: auto;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 0.76rem; font-weight: 600; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--gold-bright); margin-bottom: 18px;
}
.eyebrow .icon { width: 16px; height: 16px; }
.eyebrow::after { content: ""; width: 54px; height: 1px; background: linear-gradient(90deg, var(--gold), transparent); }
.section-head .eyebrow { color: var(--green-700); }
.section-head .eyebrow::after { background: linear-gradient(90deg, var(--gold), transparent); }

.hero h1 { color: #fff; margin-bottom: 10px; }
.hero h1 .h1-sub { display: block; font-family: var(--font-body); font-weight: 500; font-size: clamp(1rem, 1.6vw, 1.18rem); letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold-bright); margin-top: 14px; }
.hero .lede { font-size: clamp(1.02rem, 1.35vw, 1.16rem); color: rgba(255, 255, 255, 0.86); max-width: 56ch; margin-top: 18px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 26px; color: rgba(255,255,255,0.78); font-size: 0.9rem; }
.hero-meta span { display: inline-flex; align-items: center; gap: 8px; }
.hero-meta .icon { width: 16px; height: 16px; color: var(--gold-bright); }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

.btn {
  display: inline-flex; align-items: center; gap: 10px; justify-content: center;
  padding: 14px 26px; border-radius: 999px; font-weight: 600; font-size: 0.98rem;
  text-decoration: none; transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease), background 0.22s, color 0.22s, border-color 0.22s;
}
.btn .icon { width: 17px; height: 17px; transition: transform 0.22s var(--ease); }
.btn:hover .icon { transform: translateX(3px); }
.btn-gold { background: linear-gradient(135deg, var(--gold-bright), var(--gold)); color: var(--green-950); box-shadow: 0 12px 30px rgba(200, 164, 75, 0.32); }
.btn-gold:hover { transform: translateY(-2px); color: var(--green-950); box-shadow: 0 16px 36px rgba(200, 164, 75, 0.4); }
.btn-ghost { border: 1px solid rgba(255, 255, 255, 0.45); color: #fff; }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.12); color: #fff; transform: translateY(-2px); }
.btn-solid { background: var(--green-800); color: #fff; }
.btn-solid:hover { background: var(--green-700); color: #fff; transform: translateY(-2px); }
.btn-line { border: 1px solid var(--line); color: var(--green-800); background: #fff; }
.btn-line:hover { border-color: var(--gold); color: var(--green-800); transform: translateY(-2px); }

/* Portrait frame */
.hero-portrait { position: relative; justify-self: center; width: min(100%, 430px); }
.portrait-frame {
  position: relative; border-radius: 18px; overflow: hidden;
  border: 1px solid rgba(200, 164, 75, 0.55);
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.55), 0 0 0 8px rgba(255, 255, 255, 0.04);
  background: #0b1410;
}
.portrait-frame img { width: 100%; }
.portrait-frame::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(190deg, transparent 55%, rgba(4, 23, 15, 0.55) 100%);
}
.portrait-tag {
  position: absolute; left: 14px; right: 14px; bottom: 14px; z-index: 2;
  display: flex; justify-content: space-between; gap: 12px; align-items: center;
  background: rgba(4, 23, 15, 0.72); backdrop-filter: blur(6px);
  border: 1px solid rgba(200, 164, 75, 0.35); border-radius: 10px;
  padding: 10px 14px; font-size: 0.8rem; letter-spacing: 0.04em; color: rgba(255,255,255,0.9);
}
.portrait-tag strong { color: var(--gold-bright); font-weight: 600; }
.hero-scroll {
  position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%);
  color: rgba(255,255,255,0.6); font-size: 0.72rem; letter-spacing: 0.24em; text-transform: uppercase;
  display: flex; flex-direction: column; align-items: center; gap: 8px; z-index: 3;
}
.hero-scroll .icon { width: 18px; height: 18px; animation: bob 2.4s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(6px); } }

/* Hero entrance animation */
.anim-in { opacity: 0; transform: translateY(26px); animation: fadeUp 0.9s var(--ease) forwards; }
.anim-d1 { animation-delay: 0.1s; } .anim-d2 { animation-delay: 0.24s; }
.anim-d3 { animation-delay: 0.38s; } .anim-d4 { animation-delay: 0.52s; }
.anim-d5 { animation-delay: 0.66s; } .anim-d6 { animation-delay: 0.8s; }
@keyframes fadeUp { to { opacity: 1; transform: none; } }

/* ---------- Sections ---------- */
.section { padding: clamp(64px, 8vw, 108px) 0; position: relative; scroll-margin-top: var(--header-h); }
.section-bone { background: var(--bone); }
.section-dark { background: linear-gradient(165deg, var(--green-950), var(--green-900) 60%, #062216); color: rgba(255,255,255,0.88); }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-dark .eyebrow { color: var(--gold-bright); }

.section-head { max-width: 780px; margin-bottom: clamp(34px, 4vw, 54px); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .eyebrow { justify-content: center; }
.section-head.center .eyebrow::after { display: none; }
.section-head p { margin-top: 16px; color: var(--muted); font-size: 1.05rem; }
.section-dark .section-head p { color: rgba(255,255,255,0.78); }
.head-rule { width: 64px; height: 3px; margin-top: 20px; background: linear-gradient(90deg, var(--gold), transparent); border-radius: 2px; }
.section-head.center .head-rule { margin-inline: auto; background: linear-gradient(90deg, transparent, var(--gold), transparent); }

/* Two-column intro */
.split { display: grid; grid-template-columns: 0.92fr 1.08fr; gap: clamp(30px, 4.5vw, 64px); align-items: center; }
.split-media { position: relative; }
.split-media .media-card {
  border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line);
  box-shadow: var(--shadow-md); background: #0b1410;
}
.split-media .media-card img { width: 100%; }
.media-credit { font-size: 0.78rem; color: var(--muted-2); margin-top: 10px; display: flex; gap: 8px; align-items: center; }
.media-credit .icon { width: 14px; height: 14px; }
.float-stat {
  position: absolute; right: -18px; bottom: -22px; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-md); padding: 16px 20px; max-width: 230px;
}
.float-stat strong { display: block; font-family: var(--font-display); font-size: 1.6rem; color: var(--green-800); }
.float-stat span { font-size: 0.82rem; color: var(--muted); line-height: 1.4; display: block; }

.prose p + p { margin-top: 1.05em; }
.prose .lead { font-size: 1.16rem; color: var(--green-900); font-weight: 500; line-height: 1.6; }
.prose h3 { margin-top: 1.7em; margin-bottom: 0.5em; }
.prose h4 { margin-top: 1.5em; margin-bottom: 0.4em; color: var(--green-800); }
.prose ul.bullets { margin-top: 0.8em; display: grid; gap: 10px; }
.prose ul.bullets li { position: relative; padding-left: 26px; }
.prose ul.bullets li::before {
  content: ""; position: absolute; left: 0; top: 0.55em; width: 12px; height: 12px;
  border-radius: 3px; background: linear-gradient(135deg, var(--gold), rgba(200,164,75,0.35));
  border: 1px solid rgba(200, 164, 75, 0.7);
}
.src { font-size: 0.82rem; color: var(--muted); }
.src a { color: var(--green-700); }
.sup { font-size: 0.72em; vertical-align: super; color: var(--gold); font-weight: 700; text-decoration: none; }

/* ---------- Cards & grids ---------- */
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  position: relative; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px 24px; box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s;
  overflow: hidden;
}
.card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: linear-gradient(90deg, var(--green-700), var(--gold));
  transform: scaleX(0); transform-origin: left; transition: transform 0.4s var(--ease);
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: rgba(200, 164, 75, 0.5); }
.card:hover::before { transform: scaleX(1); }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 0.97rem; }

.card-icon {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 16px;
  background: linear-gradient(140deg, rgba(17, 81, 55, 0.12), rgba(200, 164, 75, 0.2));
  color: var(--green-700); border: 1px solid rgba(200, 164, 75, 0.35);
}
.card-icon .icon { width: 22px; height: 22px; }

/* Key facts */
.facts-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); gap: 18px; }
.fact {
  display: flex; gap: 16px; align-items: flex-start; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius); padding: 20px;
  transition: transform 0.28s var(--ease), box-shadow 0.28s var(--ease);
}
.fact:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.fact .card-icon { margin-bottom: 0; flex: 0 0 auto; width: 42px; height: 42px; }
.fact dt { font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted-2); font-weight: 600; }
.fact dd { margin: 4px 0 0; color: var(--ink); font-weight: 600; font-size: 1rem; line-height: 1.45; }
.fact dd small { display: block; font-weight: 400; color: var(--muted); font-size: 0.86rem; margin-top: 3px; }

/* Stats band */
.stat-band { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; text-align: center; }
.stat { padding: 26px 16px; border: 1px solid rgba(255,255,255,0.14); border-radius: var(--radius); background: rgba(255,255,255,0.04); }
.stat strong { display: block; font-family: var(--font-display); font-size: clamp(1.8rem, 3vw, 2.5rem); color: var(--gold-bright); }
.stat span { font-size: 0.86rem; color: rgba(255,255,255,0.76); letter-spacing: 0.04em; }

/* Role cards */
.role-card { display: flex; flex-direction: column; gap: 12px; height: 100%; }
.role-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.badge {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 5px 11px; border-radius: 999px; white-space: nowrap;
}
.badge-current { background: linear-gradient(135deg, var(--gold-bright), var(--gold)); color: var(--green-950); }
.badge-past { background: rgba(11, 61, 42, 0.1); color: var(--green-800); border: 1px solid var(--line); }
.role-period { display: inline-flex; gap: 8px; align-items: center; font-size: 0.88rem; color: var(--green-700); font-weight: 600; }
.role-period .icon { width: 15px; height: 15px; }
.role-card ul { display: grid; gap: 7px; margin-top: 4px; }
.role-card ul li { position: relative; padding-left: 18px; font-size: 0.94rem; color: var(--muted); }
.role-card ul li::before { content: ""; position: absolute; left: 0; top: 0.6em; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }
.role-note { margin-top: auto; padding-top: 12px; border-top: 1px dashed var(--line); font-size: 0.85rem; color: var(--muted); }

/* ---------- Timeline ---------- */
.timeline-filter { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 38px; }
.chip {
  padding: 9px 18px; border-radius: 999px; border: 1px solid var(--line); background: #fff;
  font-size: 0.88rem; font-weight: 600; color: var(--green-800);
  transition: background 0.22s, color 0.22s, border-color 0.22s, transform 0.22s;
}
.chip:hover { border-color: var(--gold); transform: translateY(-2px); }
.chip[aria-pressed="true"] { background: var(--green-800); border-color: var(--green-800); color: #fff; }

.timeline { position: relative; padding-left: 0; }
.timeline::before {
  content: ""; position: absolute; left: 132px; top: 6px; bottom: 6px; width: 2px;
  background: linear-gradient(180deg, var(--gold), rgba(11, 61, 42, 0.28));
}
.tl-item { position: relative; display: grid; grid-template-columns: 110px 1fr; gap: 44px; padding: 0 0 30px; }
.tl-year {
  text-align: right; font-family: var(--font-display); font-weight: 700; font-size: 1.08rem;
  color: var(--green-800); padding-top: 16px; line-height: 1.3;
}
.tl-year small { display: block; font-family: var(--font-body); font-weight: 500; font-size: 0.76rem; color: var(--muted-2); letter-spacing: 0.06em; }
.tl-item::after {
  content: ""; position: absolute; left: 126px; top: 22px; width: 14px; height: 14px;
  border-radius: 50%; background: #fff; border: 3px solid var(--gold); box-shadow: 0 0 0 4px rgba(200, 164, 75, 0.18);
  transition: transform 0.3s var(--ease), background 0.3s;
}
.tl-item:hover::after { background: var(--gold); transform: scale(1.18); }
.tl-body {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 24px; box-shadow: var(--shadow-sm); transition: box-shadow 0.3s var(--ease), transform 0.3s var(--ease), border-color 0.3s;
}
.tl-item:hover .tl-body { transform: translateX(5px); box-shadow: var(--shadow-md); border-color: rgba(200, 164, 75, 0.5); }
.tl-body h3 { margin-bottom: 6px; }
.tl-body p { color: var(--muted); font-size: 0.97rem; }
.tl-foot { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; margin-top: 14px; }
.tl-src { display: inline-flex; gap: 7px; align-items: center; font-size: 0.82rem; font-weight: 600; color: var(--green-700); text-decoration: none; }
.tl-src:hover { color: var(--gold); }
.tl-src .icon { width: 14px; height: 14px; }
.tl-cat {
  font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 700;
  color: var(--muted-2); background: var(--bone); border: 1px solid var(--line-soft);
  padding: 4px 10px; border-radius: 999px;
}
.tl-thumb { margin-top: 16px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.tl-thumb img { width: 100%; display: block; }
.tl-caption { font-size: 0.78rem; color: var(--muted-2); margin-top: 8px; }
.tl-item.is-hidden { display: none; }

/* ---------- Gallery ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.gallery-item {
  position: relative; display: block; width: 100%; text-align: left;
  border-radius: var(--radius); overflow: hidden; background: #0b1410;
  border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.gallery-item:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.gallery-item .frame { position: relative; aspect-ratio: 3 / 2; overflow: hidden; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.55s var(--ease), filter 0.4s; }
.gallery-item:hover img { transform: scale(1.06); filter: saturate(1.06); }
.gallery-item .frame::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 55%;
  background: linear-gradient(180deg, transparent, rgba(4, 23, 15, 0.82));
  opacity: 0.9; transition: opacity 0.3s;
}
.gallery-zoom {
  position: absolute; right: 14px; top: 14px; z-index: 2; width: 38px; height: 38px;
  display: grid; place-items: center; border-radius: 50%; background: rgba(4, 23, 15, 0.66);
  border: 1px solid rgba(200, 164, 75, 0.6); color: var(--gold-bright);
  transform: translateY(-6px); opacity: 0; transition: opacity 0.3s, transform 0.3s var(--ease);
}
.gallery-item:hover .gallery-zoom, .gallery-item:focus-visible .gallery-zoom { opacity: 1; transform: none; }
.gallery-zoom .icon { width: 17px; height: 17px; }
.gallery-meta { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 16px 18px; color: #fff; }
.gallery-meta strong { display: block; font-family: var(--font-display); font-size: 1.04rem; }
.gallery-meta span { font-size: 0.78rem; color: rgba(255,255,255,0.8); }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 300; display: flex; align-items: center; justify-content: center;
  background: rgba(4, 15, 10, 0.93); backdrop-filter: blur(6px); padding: 24px;
  opacity: 0; visibility: hidden; transition: opacity 0.3s var(--ease), visibility 0.3s;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox-figure { max-width: min(1080px, 92vw); animation: lbIn 0.35s var(--ease); }
@keyframes lbIn { from { opacity: 0; transform: scale(0.97); } to { opacity: 1; transform: none; } }
.lightbox-figure img { max-height: 74vh; width: auto; max-width: 100%; border-radius: 10px; box-shadow: 0 30px 80px rgba(0,0,0,0.6); margin-inline: auto; }
.lightbox-figure figcaption { color: rgba(255,255,255,0.85); font-size: 0.9rem; margin-top: 16px; text-align: center; max-width: 70ch; }
.lightbox-figure figcaption .credit { display: block; color: rgba(255,255,255,0.55); font-size: 0.78rem; margin-top: 6px; }
.lightbox button { position: absolute; color: #fff; border: 1px solid rgba(255,255,255,0.3); border-radius: 50%; width: 52px; height: 52px; display: grid; place-items: center; transition: background 0.25s, border-color 0.25s; }
.lightbox button:hover { background: rgba(255,255,255,0.14); border-color: var(--gold); }
.lightbox .icon { width: 22px; height: 22px; }
.lightbox-close { top: 22px; right: 22px; }
.lightbox-prev { left: 22px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 22px; top: 50%; transform: translateY(-50%); }
.lightbox-prev .icon { transform: rotate(180deg); }
body.lightbox-open { overflow: hidden; }

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  position: relative; padding: calc(var(--header-h) + clamp(56px, 8vw, 96px)) 0 clamp(48px, 6vw, 76px);
  color: #fff; overflow: hidden;
  background:
    radial-gradient(900px 480px at 85% 10%, rgba(23, 105, 74, 0.5), transparent 62%),
    linear-gradient(160deg, var(--green-950), var(--green-900) 65%, #061d14);
}
.page-hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px;
  background: linear-gradient(90deg, var(--green-700) 0 62%, #fff 62% 66%, var(--gold) 66% 100%); opacity: 0.75;
}
.page-hero-crescent { position: absolute; right: -40px; top: -30px; width: min(42vw, 420px); color: rgba(255,255,255,0.045); }
.page-hero .container { position: relative; z-index: 2; }
.breadcrumb { display: flex; gap: 8px; align-items: center; font-size: 0.82rem; color: rgba(255,255,255,0.7); margin-bottom: 18px; letter-spacing: 0.05em; }
.breadcrumb a { color: rgba(255,255,255,0.86); text-decoration: none; }
.breadcrumb a:hover { color: var(--gold-bright); }
.breadcrumb .icon { width: 13px; height: 13px; opacity: 0.7; }
.page-hero h1 { color: #fff; max-width: 20ch; }
.page-hero .lede { margin-top: 16px; color: rgba(255,255,255,0.85); max-width: 68ch; font-size: 1.06rem; }
.page-hero-meta { display: flex; flex-wrap: wrap; gap: 10px 20px; margin-top: 22px; font-size: 0.87rem; color: rgba(255,255,255,0.75); }
.page-hero-meta span { display: inline-flex; gap: 8px; align-items: center; }
.page-hero-meta .icon { width: 15px; height: 15px; color: var(--gold-bright); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-sm); }
table.data { width: 100%; border-collapse: collapse; min-width: 620px; }
table.data caption { text-align: left; padding: 18px 22px 0; font-size: 0.9rem; color: var(--muted); }
table.data th, table.data td { padding: 14px 22px; text-align: left; border-bottom: 1px solid var(--line-soft); font-size: 0.96rem; }
table.data thead th { background: var(--green-900); color: #fff; font-size: 0.76rem; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 700; border-bottom: 0; }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr { transition: background 0.2s; }
table.data tbody tr:hover { background: rgba(200, 164, 75, 0.07); }
table.data td strong { color: var(--green-900); }
.rank-cell { display: inline-flex; gap: 10px; align-items: center; }
.rank-cell .icon { color: var(--gold); width: 17px; height: 17px; }

/* ---------- Sources ---------- */
.source-group + .source-group { margin-top: 34px; }
.source-list { display: grid; gap: 14px; }
.source-item {
  display: grid; grid-template-columns: 1fr auto; gap: 10px 20px; align-items: start;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 22px; transition: transform 0.26s var(--ease), box-shadow 0.26s var(--ease), border-color 0.26s;
}
.source-item:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: rgba(200, 164, 75, 0.5); }
.source-item h3 { font-size: 1.05rem; margin-bottom: 4px; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.source-item h3 a { text-decoration: none; color: var(--green-900); }
.source-item h3 a:hover { color: var(--green-700); text-decoration: underline; }
.source-item p { font-size: 0.92rem; color: var(--muted); }
.source-date { font-size: 0.8rem; color: var(--muted-2); white-space: nowrap; display: inline-flex; gap: 7px; align-items: center; }
.source-date .icon { width: 14px; height: 14px; }
.tag {
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 999px; white-space: nowrap;
}
.tag-official { background: rgba(17, 81, 55, 0.12); color: var(--green-800); border: 1px solid rgba(17,81,55,0.3); }
.tag-news { background: rgba(200, 164, 75, 0.16); color: #8a6d1f; border: 1px solid rgba(200,164,75,0.5); }
.tag-analysis { background: rgba(38, 68, 112, 0.1); color: #264470; border: 1px solid rgba(38,68,112,0.28); }
.tag-disputed { background: rgba(140, 46, 46, 0.1); color: #8c2e2e; border: 1px solid rgba(140,46,46,0.35); }

.notice {
  display: flex; gap: 16px; align-items: flex-start; background: #fff;
  border: 1px solid var(--line); border-left: 4px solid var(--gold);
  border-radius: var(--radius-sm); padding: 20px 24px; box-shadow: var(--shadow-sm);
}
.notice .icon { width: 22px; height: 22px; color: var(--green-700); flex: 0 0 auto; margin-top: 3px; }
.notice h3 { font-size: 1.02rem; margin-bottom: 6px; }
.notice p { font-size: 0.94rem; color: var(--muted); }
.notice-warn { border-left-color: #b44343; }
.notice-warn .icon { color: #b44343; }

/* Quote / views */
.quote-band { position: relative; }
.quote-card {
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.14);
  border-radius: var(--radius); padding: clamp(26px, 4vw, 44px); max-width: 880px; margin-inline: auto; text-align: center;
}
.quote-card .icon { width: 34px; height: 34px; color: var(--gold-bright); margin-inline: auto; }
.quote-card blockquote { font-family: var(--font-display); font-size: clamp(1.15rem, 2.2vw, 1.55rem); line-height: 1.5; color: #fff; margin-top: 18px; }
.quote-card cite { display: block; margin-top: 18px; font-style: normal; font-size: 0.88rem; color: rgba(255,255,255,0.7); letter-spacing: 0.06em; }

/* CTA band */
.cta-band {
  position: relative; overflow: hidden; border-radius: 18px; padding: clamp(34px, 5vw, 58px);
  background: linear-gradient(135deg, var(--green-900), var(--green-800) 55%, var(--green-700));
  color: #fff; border: 1px solid rgba(200, 164, 75, 0.4);
}
.cta-band::after {
  content: ""; position: absolute; right: -60px; bottom: -80px; width: 300px; height: 300px;
  border: 1px solid rgba(200, 164, 75, 0.35); border-radius: 50%; box-shadow: 0 0 0 40px rgba(200,164,75,0.08), 0 0 0 90px rgba(200,164,75,0.05);
}
.cta-band h2 { color: #fff; max-width: 22ch; }
.cta-band p { color: rgba(255,255,255,0.82); margin-top: 14px; max-width: 60ch; }

/* Mini list rows */
.rows { display: grid; gap: 12px; }
.row-item {
  display: flex; gap: 16px; align-items: center; justify-content: space-between;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 15px 20px; text-decoration: none; color: inherit;
  transition: transform 0.24s var(--ease), border-color 0.24s, box-shadow 0.24s;
}
.row-item:hover { transform: translateX(5px); border-color: rgba(200, 164, 75, 0.55); box-shadow: var(--shadow-sm); color: inherit; }
.row-item strong { display: block; color: var(--green-900); font-size: 1rem; }
.row-item span { font-size: 0.88rem; color: var(--muted); }
.row-item .icon { width: 18px; height: 18px; color: var(--gold); flex: 0 0 auto; }

/* ---------- Footer ---------- */
.site-footer { position: relative; background: var(--green-950); color: rgba(255,255,255,0.8); margin-top: auto; }
.footer-accent { height: 5px; background: linear-gradient(90deg, var(--green-700) 0 62%, #fff 62% 66%, var(--gold) 66% 100%); opacity: 0.8; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 0.8fr 1fr 1.1fr; gap: clamp(28px, 4vw, 54px); padding: clamp(44px, 6vw, 66px) 0 34px; }
.footer-brand .brand { margin-bottom: 18px; }
.footer-blurb { font-size: 0.94rem; color: rgba(255,255,255,0.72); max-width: 46ch; }
.footer-disclaimer { font-size: 0.8rem; color: rgba(255,255,255,0.58); margin-top: 16px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,0.12); line-height: 1.6; }
.footer-col h2 { font-family: var(--font-body); font-size: 0.76rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold-bright); margin-bottom: 16px; }
.footer-col ul { display: grid; gap: 10px; }
.footer-col a { color: rgba(255,255,255,0.78); text-decoration: none; font-size: 0.94rem; transition: color 0.2s, transform 0.2s; display: inline-flex; gap: 8px; align-items: center; }
.footer-col a:hover { color: var(--gold-bright); }
.footer-credits li { font-size: 0.82rem; color: rgba(255,255,255,0.62); line-height: 1.55; }
.footer-credits a { font-size: 0.82rem; color: rgba(255,255,255,0.75); text-decoration: underline; }
.footer-db { display: inline-flex; gap: 10px; align-items: center; margin-top: 16px; font-size: 0.84rem; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.14); padding: 9px 14px; border-radius: 999px; }
.footer-db .icon { width: 15px; height: 15px; color: var(--gold-bright); }
.footer-db strong { color: var(--gold-bright); }
.footer-bottom { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; padding: 20px 0 28px; border-top: 1px solid rgba(255,255,255,0.1); font-size: 0.82rem; color: rgba(255,255,255,0.55); }
.footer-bottom a { color: rgba(255,255,255,0.7); }

/* ---------- 404 ---------- */
.error-hero { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: calc(var(--header-h) + 60px) 0 70px; }
.error-hero h1 { font-size: clamp(3rem, 8vw, 5rem); color: var(--gold-bright); }
.error-hero p { color: rgba(255,255,255,0.8); margin-top: 14px; max-width: 54ch; margin-inline: auto; }

/* ---------- Reveal on scroll ----------
   Hidden only when JS is confirmed (html.js), so content is always
   visible if scripts fail to load or are disabled. */
.js [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity 0.75s var(--ease), transform 0.75s var(--ease); }
.js [data-reveal].is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .stat-band { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 920px) {
  :root { --header-h: 68px; }
  .nav-toggle { display: grid; }
  .primary-nav {
    position: fixed; inset: var(--header-h) 0 auto 0; z-index: 99;
    background: rgba(4, 23, 15, 0.98); border-top: 1px solid rgba(200,164,75,0.3);
    max-height: 0; overflow: hidden; transition: max-height 0.4s var(--ease);
  }
  .primary-nav.is-open { max-height: 70vh; overflow-y: auto; box-shadow: 0 24px 50px rgba(0,0,0,0.4); }
  .primary-nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: 12px 20px 22px; }
  .primary-nav a { padding: 15px 6px; font-size: 1.05rem; border-bottom: 1px solid rgba(255,255,255,0.08); border-radius: 0; }
  .primary-nav a::after { display: none; }
  .primary-nav a.is-active { color: var(--gold-bright); }

  .hero { min-height: auto; padding-bottom: 70px; }
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-portrait { order: -1; width: min(100%, 360px); justify-self: start; }
  .hero-flag { width: 70vw; right: -25vw; top: auto; bottom: 4%; }
  .split { grid-template-columns: 1fr; }
  .float-stat { right: 10px; bottom: -16px; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .timeline::before { left: 8px; }
  .tl-item { grid-template-columns: 1fr; gap: 8px; padding-left: 36px; }
  .tl-item::after { left: 2px; top: 6px; }
  .tl-year { text-align: left; padding-top: 0; display: flex; gap: 10px; align-items: baseline; }
  .tl-year small { display: inline; }
  .lightbox-prev { left: 8px; } .lightbox-next { right: 8px; }
  .lightbox button { width: 44px; height: 44px; }
}
@media (max-width: 680px) {
  body { font-size: 1rem; }
  .container { width: calc(100% - 32px); }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .stat-band { grid-template-columns: 1fr 1fr; }
  .btn-row .btn { flex: 1 1 100%; }
  .gallery-grid { grid-template-columns: 1fr; }
  .source-item { grid-template-columns: 1fr; }
  .hero { padding-top: calc(var(--header-h) + 40px); }
  .float-stat { position: static; margin-top: 14px; max-width: none; }
  .gallery-zoom { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
  .anim-in { opacity: 1; transform: none; animation: none; }
}
