/* ═══════════════════════════════════════════════
   Ethan Du — Portfolio  ·  Version 3
   Design tokens live in :root. Components follow in the
   order they appear on the page.
   ═══════════════════════════════════════════════ */

:root {
  --bg: #050a14;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.055);
  --line: rgba(148, 197, 255, 0.14);
  --line-strong: rgba(148, 197, 255, 0.3);

  --text: #eaf2ff;
  --text-dim: #9db0cc;
  /* Lifted from #6e819c (~4.9:1 on --bg) to ~6.6:1. This token carries most of
     the small print on the page, so it was the weakest link for older eyes. */
  --text-faint: #8497b4;

  --cyan: #22d3ee;
  --mint: #34d399;

  --accent-grad: linear-gradient(120deg, #22d3ee, #3b82f6 55%, #a78bfa);

  --radius-sm: 12px;
  --radius: 18px;
  --radius-lg: 26px;

  --shadow: 0 24px 60px -28px rgba(2, 8, 23, 0.95);
  --shadow-lift: 0 36px 90px -34px rgba(8, 47, 92, 0.85);

  --shell: 1180px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }

/* Author `display` rules outrank the UA sheet's [hidden] rule — make the
   attribute win, so JS toggling `hidden` actually hides flex/grid elements. */
[hidden] { display: none !important; }

html {
  /* 18px base instead of the browser default 16px. Every size on this page is
     in rem, so this one number scales the whole site. Set as a percentage so a
     reader who has raised their own browser font size still gets scaled up. */
  font-size: 112.5%;
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.72;
  letter-spacing: -0.006em;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }
a { color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }

h1, h2, h3, h4 {
  margin: 0;
  line-height: 1.08;
  letter-spacing: -0.035em;
  font-weight: 800;
}

p { margin: 0; }

.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: absolute; left: 50%; top: -60px; transform: translateX(-50%);
  z-index: 200; padding: 10px 18px; border-radius: 0 0 12px 12px;
  background: var(--cyan); color: #04121c; font-weight: 700; text-decoration: none;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 0; }

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ── Ambient background ─────────────────────── */
.aurora { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }

.aurora-blob { position: absolute; border-radius: 50%; filter: blur(110px); opacity: 0.5; }
.aurora-a {
  width: 620px; height: 620px; top: -180px; right: -120px;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.55), transparent 68%);
}
.aurora-b {
  width: 720px; height: 720px; top: 42%; left: -260px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.42), transparent 68%);
}
.aurora-c {
  width: 560px; height: 560px; bottom: -200px; right: 8%;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.34), transparent 68%);
}
.aurora-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(148, 197, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 197, 255, 0.055) 1px, transparent 1px);
  background-size: 68px 68px;
  mask-image: radial-gradient(ellipse 120% 70% at 50% 0%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 120% 70% at 50% 0%, #000 20%, transparent 78%);
}

/* ── Layout primitives ──────────────────────── */
.shell { width: min(100% - 44px, var(--shell)); margin-inline: auto; }

.section { padding: clamp(72px, 9vw, 128px) 0; position: relative; }
.section-tint { background: linear-gradient(180deg, transparent, rgba(9, 18, 34, 0.66), transparent); }

.section-head { max-width: 760px; margin-bottom: clamp(36px, 5vw, 60px); }

/* Section identity: the number and the section name on one baseline. The name
   is the largest thing in the section, so nothing below it can be mistaken
   for the title. */
.section-id {
  display: flex;
  align-items: baseline;
  gap: clamp(12px, 1.6vw, 20px);
}
.section-num {
  flex: none;
  font-family: var(--mono);
  font-size: clamp(0.95rem, 1.5vw, 1.2rem);
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--cyan);
}
.section-head h2 { font-size: clamp(2.4rem, 5vw, 3.5rem); }

/* The deck. Describes the section's leading item — kept prominent, but a
   clear step below the heading so it reads as a caption to it, not as it. */
.section-statement {
  margin-top: 14px;
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  font-weight: 650;
  line-height: 1.34;
  letter-spacing: -0.025em;
  color: var(--text);
}

.section-lede {
  margin-top: 16px;
  color: var(--text-dim);
  font-size: clamp(1rem, 1.4vw, 1.115rem);
  line-height: 1.72;
}
.section-lede strong { color: var(--text); font-weight: 650; }
.section-lede em { color: #c3d6f2; font-style: italic; }

.inline-code {
  font-family: var(--mono);
  font-size: 0.88em;
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.08);
  border: 1px solid rgba(34, 211, 238, 0.22);
  border-radius: 6px;
  padding: 2px 7px;
}

/* ── Reveal on scroll ───────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1) var(--delay, 0ms),
              transform 0.75s cubic-bezier(0.22, 1, 0.36, 1) var(--delay, 0ms);
  will-change: opacity, transform;
}
.reveal.is-visible { opacity: 1; transform: none; }

/* ── Header ─────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 100;
  padding: 14px 0;
  border-bottom: 1px solid transparent;
  transition: background 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease;
}
.site-header.is-scrolled {
  background: rgba(5, 10, 20, 0.78);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom-color: var(--line);
}

.nav-shell {
  width: min(100% - 44px, var(--shell));
  margin-inline: auto;
  display: flex; align-items: center; gap: 20px;
}

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; margin-right: auto; }
.brand-mark {
  display: grid; place-items: center;
  width: 42px; height: 42px;
  border-radius: 13px;
  background: var(--accent-grad);
  color: #041018;
  font-weight: 900; font-size: 0.92rem; letter-spacing: -0.03em;
  box-shadow: 0 10px 26px -12px rgba(34, 211, 238, 0.85);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-size: 0.98rem; font-weight: 700; }
.brand-text small { color: var(--text-faint); font-size: 0.8rem; }

.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-link {
  padding: 8px 13px;
  border-radius: 999px;
  font-size: 0.86rem; font-weight: 550;
  color: var(--text-dim); text-decoration: none;
  transition: color 0.2s ease, background 0.2s ease;
}
.nav-link:hover { color: var(--text); background: var(--surface-2); }
.nav-link.is-active { color: var(--text); background: rgba(34, 211, 238, 0.14); }

.nav-toggle {
  display: none;
  width: 42px; height: 42px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer; padding: 0;
  place-items: center; gap: 5px;
}
.nav-toggle span[aria-hidden] {
  display: block; width: 17px; height: 2px; border-radius: 2px;
  background: var(--text);
  transition: transform 0.25s ease, opacity 0.25s ease;
}
body.nav-open .nav-toggle span:first-of-type { transform: translateY(3.5px) rotate(45deg); }
body.nav-open .nav-toggle span:last-of-type { transform: translateY(-3.5px) rotate(-45deg); }

/* ── Buttons ────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 13px 22px;
  border-radius: 999px;
  font-size: 0.92rem; font-weight: 650;
  text-decoration: none;
  border: 1px solid transparent;
  white-space: nowrap;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease, border-color 0.22s ease;
}
.btn svg {
  width: 17px; height: 17px;
  fill: none; stroke: currentColor; stroke-width: 2.1;
  stroke-linecap: round; stroke-linejoin: round;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: var(--accent-grad);
  color: #04121c;
  box-shadow: 0 16px 40px -18px rgba(34, 211, 238, 0.9);
}
.btn-primary:hover { box-shadow: 0 22px 52px -18px rgba(34, 211, 238, 1); }
.btn-ghost {
  background: var(--surface);
  border-color: var(--line-strong);
  color: var(--text);
  backdrop-filter: blur(8px);
}
.btn-ghost:hover { background: var(--surface-2); border-color: var(--cyan); }

/* ── Hero ───────────────────────────────────── */
.hero { position: relative; padding: clamp(44px, 6vw, 84px) 0 0; }

.hero-spotlight {
  position: absolute; inset: -20% -10% 30%;
  pointer-events: none;
  background:
    radial-gradient(760px 460px at 22% 28%, rgba(34, 211, 238, 0.16), transparent 68%),
    radial-gradient(620px 420px at 76% 18%, rgba(167, 139, 250, 0.14), transparent 70%);
}

.hero-shell {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: clamp(36px, 5vw, 72px);
  align-items: center;
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 7px 15px 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  font-family: var(--mono);
  font-size: 0.82rem; letter-spacing: 0.06em;
  color: var(--text-dim);
}
.pulse {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--mint);
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.55); }
  70% { box-shadow: 0 0 0 11px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

.hero h1 { margin: 20px 0 0; display: flex; flex-direction: column; gap: 2px; }
.hero-hi {
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  font-weight: 500;
  color: var(--text-faint);
}
.hero-name {
  font-size: clamp(3.1rem, 8vw, 5.4rem);
  font-weight: 900;
  letter-spacing: -0.052em;
  line-height: 1;
  background: linear-gradient(150deg, #ffffff 14%, #b6dcff 52%, #6ee7ff 88%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* Rotating role line */
.hero-role {
  margin-top: 18px;
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px;
  font-size: clamp(1.15rem, 2.2vw, 1.6rem);
  font-weight: 700; letter-spacing: -0.03em;
}
.hero-role-lead { color: var(--text-faint); font-weight: 500; }
.rotator { position: relative; display: inline-block; overflow: hidden; padding-bottom: 2px; }
.rotator-sizer { visibility: hidden; display: block; }
.rotator-word {
  position: absolute; inset: 0 auto auto 0;
  white-space: nowrap;
  opacity: 0; transform: translateY(0.55em);
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  background: var(--accent-grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.rotator-word.is-active { opacity: 1; transform: none; }

.hero-intro {
  margin-top: 22px;
  max-width: 54ch;
  font-size: clamp(0.98rem, 1.2vw, 1.05rem);
  line-height: 1.72;
  color: var(--text-dim);
}

.hero-threads { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.hero-threads li {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 15px 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 0.83rem; font-weight: 600;
  color: var(--text-dim);
  transition: border-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}
.hero-threads li:hover { border-color: var(--line-strong); color: var(--text); transform: translateY(-2px); }
.hero-threads li span { font-size: 0.95rem; line-height: 1; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

/* Portrait */
.hero-portrait { position: relative; padding: 0 clamp(0px, 2vw, 26px); }
.hero-portrait::before {
  content: "";
  position: absolute; inset: 12% -6% -8% 8%;
  border-radius: 40px;
  background: var(--accent-grad);
  opacity: 0.16; filter: blur(48px);
  z-index: -1;
}
.photo-hero { border-radius: clamp(22px, 3vw, 30px); box-shadow: var(--shadow-lift); }

.hero-float {
  position: absolute; z-index: 3;
  display: flex; align-items: center; gap: 11px;
  padding: 11px 16px 11px 12px;
  border-radius: 16px;
  background: rgba(8, 16, 30, 0.82);
  border: 1px solid var(--line-strong);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 18px 40px -22px rgba(2, 8, 23, 1);
  animation: float 6s ease-in-out infinite;
}
.hero-float-a { top: 12%; left: -6%; }
.hero-float-b { bottom: 13%; right: -4%; animation-delay: -3s; }
.hero-float strong { display: block; font-size: 0.9rem; line-height: 1.25; }
.hero-float small { color: var(--text-faint); font-size: 0.82rem; }
.hf-icon {
  display: grid; place-items: center;
  width: 34px; height: 34px; flex: none;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--line);
  font-size: 1rem;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}

/* ── Stat ticker ────────────────────────────── */
.ticker {
  margin-top: clamp(44px, 6vw, 76px);
  border-block: 1px solid var(--line);
  background: rgba(7, 14, 28, 0.5);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
/* Slower than before on purpose: the type is much larger now, so the old
   duration would read as a faster scroll. Hover pauses it outright. */
.ticker-track { display: flex; width: max-content; animation: scroll 72s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
@keyframes scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.ticker-item {
  display: flex; align-items: baseline; gap: 13px;
  padding: 24px 34px;
  border-right: 1px solid var(--line);
  white-space: nowrap;
}
/* Solid cyan, not the gradient fill — the gradient's middle stop (#3b82f6) sat
   at roughly 3:1 against the background, which is where it got hard to read. */
.ticker-item b {
  font-size: 1.85rem; font-weight: 800; letter-spacing: -0.03em;
  color: var(--cyan);
}
.ticker-item span {
  font-family: var(--mono);
  font-size: 0.92rem; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-dim);
}

/* ── Scroll cue ─────────────────────────────── */
.scroll-cue {
  display: flex; flex-direction: column; align-items: center; gap: 9px;
  width: fit-content; margin: 26px auto 0; padding-bottom: 6px;
  font-family: var(--mono);
  font-size: 0.78rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--text-faint); text-decoration: none;
  transition: color 0.25s ease;
}
.scroll-cue:hover { color: var(--cyan); }
.scroll-cue-track {
  display: block; position: relative;
  width: 22px; height: 34px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
}
.scroll-cue-track span {
  position: absolute; left: 50%; top: 7px;
  width: 3px; height: 7px; margin-left: -1.5px;
  border-radius: 2px; background: var(--cyan);
  animation: scrollDot 1.9s ease-in-out infinite;
}
@keyframes scrollDot {
  0% { opacity: 0; transform: translateY(0); }
  30% { opacity: 1; }
  100% { opacity: 0; transform: translateY(13px); }
}

/* ── Media slots ────────────────────────────── */
.photo {
  position: relative; margin: 0;
  aspect-ratio: var(--ratio, 3 / 2);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.012)),
    rgba(6, 13, 26, 0.8);
}
.photo img, .photo video {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.photo video { background: #040a14; }

/* Placeholder state — nothing supplied yet */
.photo.is-missing { border-style: dashed; border-color: var(--line-strong); }
.photo.is-missing img { display: none; }

.photo-ph {
  display: none;
  position: absolute; inset: 0;
  flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; padding: 20px; text-align: center;
}
.photo.is-missing .photo-ph { display: flex; }
.photo-ph-icon { font-size: 1.7rem; line-height: 1; opacity: 0.75; margin-bottom: 2px; }
.photo-ph strong { font-size: 0.92rem; font-weight: 650; letter-spacing: -0.015em; color: var(--text); }
.photo-ph code {
  font-family: var(--mono); font-size: 0.78rem;
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.09);
  border: 1px solid rgba(34, 211, 238, 0.24);
  border-radius: 7px; padding: 5px 9px;
  word-break: break-all; max-width: 100%;
}
.photo-ph small { font-size: 0.8rem; color: var(--text-faint); }

/* "Add filename" hint on covers and on the last real slide */
.photo-hint {
  display: none;
  position: absolute; right: 12px; bottom: 12px; z-index: 2;
  padding: 4px 9px;
  border-radius: 8px;
  background: rgba(4, 10, 20, 0.82);
  border: 1px dashed var(--line-strong);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-family: var(--mono);
  font-size: 0.74rem; letter-spacing: 0.02em;
  color: var(--text-faint);
}
.photo-cover .photo-hint,
.photo-has-next .photo-hint { display: inline-block; }
.photo-hint code { color: var(--cyan); font-size: 0.74rem; }
.photo-video .photo-hint { bottom: 48px; }

/* Marks a slide holding a clip rather than a still */
.media-badge {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px 5px 8px;
  border-radius: 999px;
  background: rgba(4, 10, 20, 0.74);
  border: 1px solid var(--line-strong);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-family: var(--mono);
  font-size: 0.76rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-dim);
  pointer-events: none;
}
.media-badge svg { width: 13px; height: 13px; fill: var(--cyan); }

/* ── Video player ───────────────────────────── */
.video-shell { position: absolute; inset: 0; }

.video-tap {
  position: absolute; inset: 0; z-index: 2;
  display: grid; place-items: center;
  border: 0; padding: 0; background: transparent; cursor: pointer;
}
.video-tap-icon {
  display: grid; place-items: center;
  width: 62px; height: 62px;
  border-radius: 50%;
  background: rgba(4, 10, 20, 0.62);
  border: 1px solid var(--line-strong);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 14px 34px -14px rgba(2, 8, 23, 0.95);
  transition: transform 0.25s ease, opacity 0.25s ease, background 0.25s ease;
}
.video-tap-icon svg { width: 26px; height: 26px; fill: var(--text); margin-left: 3px; }
.video-tap:hover .video-tap-icon { transform: scale(1.07); background: rgba(34, 211, 238, 0.24); }
.video-shell.is-playing .video-tap-icon { opacity: 0; transform: scale(0.85); }

.video-bar {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 3;
  display: flex; align-items: center; gap: 9px;
  padding: 22px 12px 10px;
  background: linear-gradient(180deg, transparent, rgba(3, 8, 16, 0.88));
  opacity: 0; transform: translateY(6px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.video-shell:hover .video-bar,
.video-shell:focus-within .video-bar,
.video-shell.is-playing .video-bar { opacity: 1; transform: none; }

.vb-btn {
  display: grid; place-items: center;
  width: 28px; height: 28px; flex: none;
  padding: 0; border: 0; border-radius: 8px;
  background: transparent; color: var(--text); cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.vb-btn svg { width: 17px; height: 17px; fill: currentColor; }
.vb-btn:hover { background: rgba(255, 255, 255, 0.14); color: var(--cyan); }

.vb-time {
  flex: none;
  font-family: var(--mono); font-size: 0.78rem;
  color: var(--text-dim); font-variant-numeric: tabular-nums;
}

.vb-seek {
  flex: 1 1 auto; min-width: 0;
  height: 4px; margin: 0; padding: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.24);
  appearance: none; -webkit-appearance: none;
  cursor: pointer;
}
.vb-seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--cyan); border: 0;
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.28);
}
.vb-seek::-moz-range-thumb {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--cyan); border: 0;
}
.vb-seek:focus-visible { outline: 2px solid var(--cyan); outline-offset: 4px; }

.video-shell:fullscreen { background: #04070e; }
.video-shell:fullscreen video { object-fit: contain; }

/* ── Carousel ───────────────────────────────── */
.carousel { display: grid; gap: 12px; }
.carousel-window { position: relative; border-radius: var(--radius); overflow: hidden; }
.carousel-track { display: flex; transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1); }
.carousel-slide { flex: 0 0 100%; min-width: 0; }
/* Each slide keeps its own rounded frame so the dashed placeholder border
   reads correctly; the window only clips the sliding track. */
.carousel-slide .photo { height: 100%; }

.carousel-hint {
  /* bottom-left: top-right is the video badge, bottom-right the "Add …" hint */
  position: absolute; bottom: 14px; left: 14px; z-index: 2;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(4, 10, 20, 0.7);
  border: 1px solid var(--line);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-family: var(--mono);
  font-size: 0.76rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-faint);
  transition: opacity 0.3s ease;
}
.carousel:hover .carousel-hint { opacity: 0; }

.carousel-controls { display: flex; align-items: center; justify-content: center; gap: 14px; }
.car-btn {
  display: grid; place-items: center;
  width: 34px; height: 34px; flex: none; padding: 0;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--text-dim); cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}
.car-btn svg {
  width: 16px; height: 16px;
  fill: none; stroke: currentColor; stroke-width: 2.2;
  stroke-linecap: round; stroke-linejoin: round;
}
.car-btn:hover {
  color: var(--text); border-color: var(--cyan);
  background: rgba(34, 211, 238, 0.1); transform: scale(1.06);
}
.car-btn:active { transform: scale(0.96); }

.car-dots { display: flex; align-items: center; gap: 7px; }
.car-dot {
  width: 7px; height: 7px; padding: 0; border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: width 0.3s cubic-bezier(0.22, 1, 0.36, 1), background 0.3s ease;
}
.car-dot:hover { background: rgba(255, 255, 255, 0.4); }
.car-dot.is-active { width: 20px; background: var(--cyan); }

/* ── Third-party logo chips ─────────────────── */
.logo-chip {
  display: flex; align-items: center; justify-content: center;
  min-height: 0;
  background: #f4f7fb;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  overflow: hidden; flex: none;
}
.logo-chip img {
  width: auto; height: auto;
  max-width: 100%; max-height: 100%;
  object-fit: contain;
}
.logo-chip b {
  display: none;
  padding: 4px;
  font-size: 0.74rem; font-weight: 700; line-height: 1.15;
  text-align: center; letter-spacing: -0.01em;
  color: #0d1526;
}
.logo-chip.is-missing img { display: none; }
.logo-chip.is-missing b { display: block; }

.cert-logo { width: 44px; height: 44px; padding: 6px; border-radius: 50%; }
.panel-logo { width: 48px; height: 48px; padding: 0; border-radius: 50%; }

.logo-strip {
  margin-top: clamp(38px, 5vw, 58px);
  padding-top: clamp(30px, 4vw, 44px);
  border-top: 1px solid var(--line);
}
.logo-strip-label {
  text-align: center; margin-bottom: 22px;
  font-family: var(--mono);
  font-size: 0.78rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--text-faint);
}
.logo-band {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 12px;
  max-width: 762px;   /* 5 chips per row */
  margin-inline: auto;
}
.band-logo {
  width: 138px; height: 62px;
  padding: 13px 18px;
  background: #f6f9fd;
  opacity: 0.82;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.band-logo:hover { opacity: 1; transform: translateY(-3px); }
.band-logo b { font-size: 0.78rem; }

/* ── Highlight cards ────────────────────────── */
.highlight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
  gap: 16px;
}
.highlight-card {
  position: relative;
  display: flex; flex-direction: column; gap: 9px;
  padding: 22px 22px 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.012)),
    rgba(6, 13, 26, 0.72);
  box-shadow: var(--shadow);
  text-decoration: none; overflow: hidden;
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.32s ease, box-shadow 0.32s ease;
}
.highlight-card::before {
  content: "";
  position: absolute; inset: -1px -1px auto;
  height: 3px;
  background: var(--card-accent, var(--accent-grad));
  opacity: 0.9;
}
.highlight-card::after {
  content: "";
  position: absolute;
  width: 200px; height: 200px; top: -100px; right: -70px;
  border-radius: 50%;
  background: var(--card-glow, rgba(34, 211, 238, 0.22));
  filter: blur(46px);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}
.highlight-card:hover {
  transform: translateY(-5px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-lift);
}
.highlight-card:hover::after { opacity: 1; }

.hc-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.hc-logo { width: 46px; height: 34px; padding: 5px 8px; }
.hc-jump {
  display: grid; place-items: center;
  width: 26px; height: 26px; flex: none;
  border-radius: 50%;
  border: 1px solid var(--line);
  color: var(--text-faint);
  transition: color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}
.hc-jump svg {
  width: 13px; height: 13px;
  fill: none; stroke: currentColor; stroke-width: 2.2;
  stroke-linecap: round; stroke-linejoin: round;
}
.highlight-card:hover .hc-jump { color: var(--cyan); border-color: var(--cyan); transform: translateX(2px); }

.hc-metric {
  font-size: clamp(1.7rem, 3vw, 2.1rem);
  font-weight: 850; letter-spacing: -0.045em; line-height: 1.05;
  background: var(--card-accent, var(--accent-grad));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.highlight-card h3 { font-size: 1rem; font-weight: 700; letter-spacing: -0.02em; }
.hc-note {
  margin-top: auto; padding-top: 10px;
  font-size: 0.855rem; color: var(--text-dim); line-height: 1.55;
}

/* ── Entry cards (a section's story) ────────── */
.entry-list { display: grid; gap: 20px; }

.entry-card {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
  gap: clamp(22px, 3.5vw, 44px);
  align-items: center;
  padding: 22px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01)),
    rgba(6, 13, 26, 0.6);
  box-shadow: var(--shadow);
  transition: transform 0.34s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.34s ease, box-shadow 0.34s ease;
}
.entry-card:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-lift);
}
.entry-card:nth-child(even) .entry-media { order: 2; }
.entry-card:hover .carousel-slide .photo:not(.is-missing) img { transform: scale(1.03); }

.entry-media { position: relative; }
.entry-num {
  position: absolute; top: 14px; left: 14px; z-index: 2;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(4, 10, 20, 0.72);
  border: 1px solid var(--line-strong);
  backdrop-filter: blur(10px);
  font-family: var(--mono);
  font-size: 0.78rem; letter-spacing: 0.16em;
  color: var(--text-dim);
}

.entry-body { padding: 6px 8px 6px 0; }
.entry-role {
  font-family: var(--mono);
  font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--cyan);
}
.entry-body h3 { margin: 10px 0 12px; font-size: clamp(1.25rem, 2.2vw, 1.55rem); }
.entry-q { font-size: 0.95rem; color: #bcd4f2; font-weight: 550; margin-bottom: 10px; }
.entry-body p.entry-text { font-size: 0.92rem; color: var(--text-dim); line-height: 1.68; }
.entry-lesson {
  margin-top: 14px;
  padding: 12px 15px;
  border-radius: var(--radius-sm);
  border-left: 2px solid rgba(52, 211, 153, 0.5);
  background: rgba(52, 211, 153, 0.06);
  font-size: 0.875rem; color: #b7ecd6; line-height: 1.6;
}

.tag-row { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 16px; }
.tag {
  padding: 5px 11px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  font-family: var(--mono);
  font-size: 0.78rem; color: var(--text-faint);
}

/* ── Notes + AP table row ───────────────────── */
.aside-row { display: grid; gap: 18px; margin-top: 22px; }
.aside-row.has-table {
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  align-items: start;
}

/* Small mono label that opens a peer group inside a section. Shared with the
   credentials block so every group below the header is announced the same way. */
.group-label {
  margin-bottom: 14px;
  font-family: var(--mono);
  font-size: 0.78rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--text-faint);
}

.note-block { margin-top: clamp(26px, 3.5vw, 40px); }
.aside-row .note-block { margin-top: 0; }

.note-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px; align-content: start;
}
.note-card {
  padding: 20px 22px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(6, 13, 26, 0.62);
  transition: transform 0.28s ease, border-color 0.28s ease;
}
.note-card:hover { transform: translateY(-3px); border-color: var(--line-strong); }
.note-card h4 { font-size: 0.95rem; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 7px; }
.note-card p { font-size: 0.875rem; color: var(--text-dim); line-height: 1.6; }

/* ── AP table ───────────────────────────────── */
.ap-table {
  padding: 26px 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: rgba(6, 13, 26, 0.7);
  box-shadow: var(--shadow);
}
.ap-table h3 { font-size: 1.05rem; margin-bottom: 18px; }
.ap-table ul { display: grid; gap: 2px; }
.ap-table li {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 11px 2px;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
}
.ap-table li:last-child { border-bottom: 0; }
.ap-score {
  display: grid; place-items: center;
  width: 30px; height: 30px; flex: none;
  border-radius: 9px;
  background: rgba(52, 211, 153, 0.14);
  border: 1px solid rgba(52, 211, 153, 0.38);
  color: #6ee7b7; font-weight: 800; font-size: 0.9rem;
}
.ap-note { margin-top: 16px; font-size: 0.8rem; color: var(--text-faint); font-style: italic; }

/* ── Heading + profile panel, side by side ──── */
.split-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 420px);
  gap: clamp(28px, 4vw, 54px);
  align-items: start;
  margin-bottom: clamp(30px, 4vw, 46px);
}
.split-main .section-head { margin-bottom: 0; max-width: none; }

.feature-panel {
  padding: 22px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line-strong);
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.015)),
    rgba(6, 13, 26, 0.85);
  box-shadow: var(--shadow-lift);
  width: 100%;
}
.panel-head {
  display: flex; align-items: center; gap: 13px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.panel-head strong { display: block; font-size: 1rem; }
.panel-head small { color: var(--text-faint); font-family: var(--mono); font-size: 0.8rem; }
.panel-head div { margin-right: auto; }

.verified {
  display: grid; place-items: center;
  width: 28px; height: 28px; flex: none;
  border-radius: 50%;
  background: rgba(52, 211, 153, 0.16);
  border: 1px solid rgba(52, 211, 153, 0.4);
}
.verified svg {
  width: 15px; height: 15px;
  fill: none; stroke: var(--mint); stroke-width: 2.6;
  stroke-linecap: round; stroke-linejoin: round;
}

.panel-quote {
  margin: 16px 0 18px;
  padding-left: 16px;
  border-left: 2px solid rgba(34, 211, 238, 0.45);
  font-size: 0.85rem; color: var(--text-dim); line-height: 1.6;
  font-style: italic;
}

.counter-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.counter {
  padding: 12px 11px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  transition: border-color 0.25s ease, background 0.25s ease;
}
.counter:hover { border-color: var(--line-strong); background: rgba(255, 255, 255, 0.05); }
.counter b {
  display: block;
  font-size: 1.28rem; font-weight: 850; letter-spacing: -0.04em; line-height: 1.1;
  color: var(--text); font-variant-numeric: tabular-nums;
}
.counter span {
  font-family: var(--mono);
  font-size: 0.74rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-faint);
}

.panel-bars { margin-top: 18px; display: grid; gap: 14px; }
.bar-row { display: grid; gap: 7px; }
.bar-label { display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--text-dim); }
.bar-label b { color: var(--text); font-variant-numeric: tabular-nums; }
.bar-track { height: 7px; border-radius: 999px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.bar-fill {
  height: 100%; width: 0;
  border-radius: 999px;
  background: var(--bar-color, var(--accent-grad));
  transition: width 1.2s cubic-bezier(0.22, 1, 0.36, 1) 0.15s;
}
.panel-link { margin-top: 18px; width: 100%; justify-content: center; }

/* ── Reach block (countries) ────────────────── */
.reach-block {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
  margin-top: 20px;
  padding: clamp(28px, 4vw, 44px);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line-strong);
  background:
    radial-gradient(760px 340px at 88% 10%, rgba(34, 211, 238, 0.12), transparent 70%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.012)),
    rgba(6, 13, 26, 0.72);
  box-shadow: var(--shadow);
}
.reach-copy h3 { font-size: clamp(1.3rem, 2.4vw, 1.75rem); letter-spacing: -0.03em; margin-bottom: 16px; }
.reach-copy p { font-size: 0.945rem; line-height: 1.72; color: var(--text-dim); }
.reach-copy p + p { margin-top: 13px; }

.reach-count { display: flex; align-items: baseline; gap: 10px; margin-bottom: 16px; }
.reach-count b {
  font-size: clamp(2.2rem, 4vw, 2.9rem);
  font-weight: 850; letter-spacing: -0.05em; line-height: 1;
  background: var(--accent-grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.reach-count span {
  font-family: var(--mono);
  font-size: 0.8rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--text-faint);
}

.country-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.country-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px 8px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
  font-size: 0.845rem; font-weight: 550;
  color: var(--text-dim);
  transition: border-color 0.22s ease, color 0.22s ease, transform 0.22s ease;
}
.country-chip:hover { border-color: var(--cyan); color: var(--text); transform: translateY(-2px); }
.country-flag { font-size: 1.02rem; line-height: 1; }

/* ── Credentials (collapsed by default) ─────── */
.cred-block {
  margin-top: clamp(30px, 4vw, 46px);
  padding-top: clamp(26px, 3vw, 36px);
  border-top: 1px solid var(--line);
}

.cred-toggle {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  list-style: none;
  transition: border-color 0.25s ease, background 0.25s ease;
}
.cred-toggle::-webkit-details-marker { display: none; }
.cred-toggle:hover { border-color: var(--line-strong); background: var(--surface-2); }
.cred-toggle:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }

.cred-label {
  font-family: var(--mono);
  font-size: 0.78rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--text-dim);
}
.cred-count {
  min-width: 20px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.12);
  font-family: var(--mono);
  font-size: 0.78rem; line-height: 1.4;
  text-align: center;
  color: var(--cyan);
}
.cred-chevron {
  width: 15px; height: 15px;
  fill: none; stroke: currentColor; stroke-width: 2.1;
  stroke-linecap: round; stroke-linejoin: round;
  color: var(--text-faint);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.cred-block[open] .cred-chevron { transform: rotate(180deg); }
.cred-block[open] .cred-toggle { border-color: var(--line-strong); }

.cred-block[open] .cert-grid { margin-top: 20px; }
.cred-block[open] .cert-card {
  animation: certIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) var(--delay, 0ms) both;
}
@keyframes certIn {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
}
.cert-card {
  position: relative;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: rgba(6, 13, 26, 0.7);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.32s ease, box-shadow 0.32s ease;
}
.cert-card:hover {
  transform: translateY(-6px) rotate(-0.35deg);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-lift);
}

.cert-scan .photo { border-radius: 0; border-width: 0 0 1px; border-color: var(--line); }
.cert-scan .photo.is-missing { border-style: solid solid dashed; }

.cert-ribbon {
  position: relative;
  display: flex; align-items: center; gap: 14px;
  padding: 20px 22px 18px;
  background: var(--cert-bg, linear-gradient(135deg, rgba(34, 211, 238, 0.16), rgba(59, 130, 246, 0.08)));
  border-bottom: 1px solid var(--line);
}
.cert-seal {
  width: 44px; height: 44px; flex: none;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 2px solid var(--cert-line, rgba(34, 211, 238, 0.5));
  background: rgba(4, 10, 20, 0.55);
  font-size: 1.2rem;
}
.cert-issuer {
  font-family: var(--mono);
  font-size: 0.78rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--text-dim);
}

.cert-body { padding: 20px 22px 22px; }
.cert-body h3 { font-size: 1.05rem; margin-bottom: 10px; }
.cert-body p { font-size: 0.875rem; color: var(--text-dim); line-height: 1.62; }

.cert-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 15px; }
.cert-meta span {
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.78rem; color: var(--text-faint);
}

/* ── Contact ────────────────────────────────── */
.contact-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
  gap: clamp(30px, 5vw, 56px);
  align-items: center;
  padding: clamp(32px, 5vw, 56px);
  border-radius: clamp(24px, 3vw, 34px);
  border: 1px solid var(--line-strong);
  background:
    radial-gradient(700px 320px at 12% 0%, rgba(34, 211, 238, 0.14), transparent 70%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.012)),
    rgba(6, 13, 26, 0.85);
  box-shadow: var(--shadow-lift);
}
.contact-copy h2 { font-size: clamp(1.6rem, 3.2vw, 2.35rem); margin: 14px 0 16px; }
.contact-copy p { color: var(--text-dim); font-size: 1rem; line-height: 1.7; }

.contact-links { display: grid; gap: 10px; }
.contact-link {
  display: block;
  padding: 15px 19px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  text-decoration: none;
  transition: border-color 0.24s ease, transform 0.24s ease, background 0.24s ease;
}
a.contact-link:hover {
  border-color: var(--cyan);
  background: rgba(34, 211, 238, 0.07);
  transform: translateY(-2px);
}
.contact-link span {
  display: block;
  font-family: var(--mono);
  font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 4px;
}
.contact-link strong { font-size: 0.98rem; font-weight: 650; word-break: break-word; }

/* ── Footer ─────────────────────────────────── */
.footer { padding: 34px 0 44px; border-top: 1px solid var(--line); margin-top: 40px; }
.footer-inner {
  display: flex; flex-wrap: wrap; gap: 14px;
  align-items: center; justify-content: space-between;
  font-size: 0.85rem; color: var(--text-faint);
}
.to-top {
  display: inline-flex; align-items: center; gap: 7px;
  text-decoration: none; color: var(--text-dim);
  transition: color 0.2s ease;
}
.to-top:hover { color: var(--cyan); }
.to-top svg {
  width: 15px; height: 15px;
  fill: none; stroke: currentColor; stroke-width: 2.1;
  stroke-linecap: round; stroke-linejoin: round;
}

/* ── Responsive ─────────────────────────────── */
@media (max-width: 1000px) {
  .hero-shell,
  .contact-card,
  .entry-card,
  .aside-row.has-table,
  .split-row { grid-template-columns: minmax(0, 1fr); }

  /* At the larger type scale this wraps to two lines and pushes the nav
     off balance well before the hamburger takes over at 860px. */
  .brand-text small { display: none; }

  .hero-portrait { padding: 0; max-width: 460px; }
  .hero-float-a { left: auto; right: -2%; top: 8%; }
  .hero-float-b { right: auto; left: -2%; bottom: 9%; }

  .entry-card:nth-child(even) .entry-media { order: 0; }
  .entry-body { padding: 0 4px 6px; }

  .split-row .counter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .reach-block { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 860px) {
  .nav-toggle { display: grid; }
  .nav-links {
    position: fixed;
    inset: 72px 22px auto;
    flex-direction: column; align-items: stretch; gap: 4px;
    padding: 14px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--line-strong);
    background: rgba(6, 13, 26, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow-lift);
    opacity: 0; visibility: hidden; transform: translateY(-10px);
    transition: opacity 0.24s ease, transform 0.24s ease, visibility 0.24s;
  }
  body.nav-open .nav-links { opacity: 1; visibility: visible; transform: none; }
  .nav-link { padding: 11px 14px; font-size: 0.95rem; }
}

@media (max-width: 620px) {
  .shell, .nav-shell { width: min(100% - 32px, var(--shell)); }
  .highlight-grid,
  .note-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-actions .btn { flex: 1 1 100%; justify-content: center; }
  .hero-float { position: static; margin-top: 10px; animation: none; }
  .hero-portrait { display: grid; gap: 0; }
}

@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;
  }
  .reveal { opacity: 1; transform: none; }
  .carousel-track { transition: none; }
  /* Park the ribbon as a static row rather than letting the global
     animation override snap it to its end frame. */
  .ticker-track { animation: none; transform: none; }
}
