/* ============================================================
   amartinsen.com - Norwegian Aurora theme
   Fonts: Space Grotesk (display) · Inter (body) · JetBrains Mono
   ============================================================ */

/* Self-hosted, so the page never phones home. These are the latin subsets of
   the variable (wght 400-700) builds - the same three files Google already
   serves to a modern browser, just from our own origin. The latin subset covers
   every codepoint these three families are asked to render, æ ø å included;
   latin-ext is not needed. Symbols the page uses that are outside the subset
   (→ ↗ ● ✓ ▀ emoji) already fall back to system fonts and still do.
   Filenames carry the upstream version (v22 / v20 / v24) so _headers can cache
   them immutably while styles.css stays no-cache - a new font version is a new
   URL, and the revalidated stylesheet picks it up on the next load.
   Licences: Space Grotesk and Inter are SIL OFL 1.1, JetBrains Mono is Apache 2.0. */
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("assets/fonts/space-grotesk-var-latin-v22.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("assets/fonts/inter-var-latin-v20.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("assets/fonts/jetbrains-mono-var-latin-v24.woff2") format("woff2");
}

/* The scene colours are registered so they can *interpolate*: main.js retints
   them per section (and per crew member) and the sky cross-fades instead of
   snapping. Unregistered browsers get an instant change - same colours, no
   transition, nothing breaks. */
@property --scene-a { syntax: "<color>"; inherits: true; initial-value: rgba(52, 211, 153, 0.32); }
@property --scene-b { syntax: "<color>"; inherits: true; initial-value: rgba(139, 92, 246, 0.24); }
@property --scene-c { syntax: "<color>"; inherits: true; initial-value: rgba(34, 211, 238, 0.20); }
/* Rotating conic border for the portrait / crew frames. Without @property
   support the animation is a no-op and the frame sits at a static angle. */
@property --frame-spin { syntax: "<angle>"; inherits: false; initial-value: 0deg; }

:root {
  --bg: #04060c;
  --bg-soft: #0a0e1a;
  --ink: #e8edf6;
  --ink-dim: #9aa7bd;
  --ink-faint: #5c6a84;

  --aurora-green: #34d399;
  --aurora-cyan: #22d3ee;
  --aurora-violet: #8b5cf6;
  --aurora-rose: #fb7185;
  --aurora-amber: #fbbf24;
  --aurora-blue: #60a5fa;

  --accent: var(--aurora-green);
  --accent-2: var(--aurora-cyan);
  --accent-3: var(--aurora-violet);

  /* Live scene (set by main.js; defaults = the hero sky). */
  --scene-a: rgba(52, 211, 153, 0.32);
  --scene-b: rgba(139, 92, 246, 0.24);
  --scene-c: rgba(34, 211, 238, 0.20);
  transition: --scene-a 1.6s ease, --scene-b 1.6s ease, --scene-c 1.6s ease;

  /* Scroll-driven, unitless; written by main.js on .bg / .hero / .nav. */
  --par: 0;
  --progress: 0;

  --card: rgba(14, 20, 34, 0.62);
  --card-border: rgba(120, 150, 200, 0.14);
  --card-border-hover: rgba(52, 211, 153, 0.45);

  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --radius: 16px;
  --nav-h: 68px;
}

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

/* Buttons never inherit font-family - in every browser they fall back to the
   system font, which is why the lightbox arrows and the x rendered in Arial
   while the rest of the site is Inter / Space Grotesk / JetBrains Mono. */
button { font-family: inherit; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 28px); }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: rgba(52, 211, 153, 0.28); color: #fff; }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--aurora-green), var(--aurora-violet));
  border-radius: 10px;
  border: 2px solid var(--bg);
}

/* ============ Background layers ============ */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; }

/* Far layer: the three ambient glows. They take the live scene colours, so the
   whole sky retints as you move between sections. The wrapper carries the
   scroll parallax; the blobs keep their own drift animation. */
.aurora-wrap {
  position: absolute; inset: 0;
  transform: translate3d(0, calc(var(--par) * -0.05px), 0);
  will-change: transform;
}
.aurora {
  position: absolute;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.5;
  animation: drift 26s var(--ease-out) infinite alternate;
}
.aurora-1 {
  width: 55vw; height: 55vw; top: -18vw; left: -10vw;
  background: radial-gradient(circle, var(--scene-a), transparent 65%);
}
.aurora-2 {
  width: 48vw; height: 48vw; top: 20vh; right: -16vw;
  background: radial-gradient(circle, var(--scene-b), transparent 65%);
  animation-delay: -9s; animation-duration: 31s;
}
.aurora-3 {
  width: 42vw; height: 42vw; bottom: -14vw; left: 24vw;
  background: radial-gradient(circle, var(--scene-c), transparent 65%);
  animation-delay: -17s; animation-duration: 36s;
}
@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(6vw, 5vh, 0) scale(1.18); }
}

/* Northern-lights "curtain" across the top of the page (behind hero).
   Nearer than the ambient glows, so it parallaxes away faster on scroll. */
.curtain {
  position: absolute;
  top: -10vh; left: -8vw; right: -8vw; height: 82vh;
  filter: blur(46px) saturate(1.3);
  transform: translateY(calc(var(--par) * -0.12px)) skewX(-14deg);
  mix-blend-mode: screen;
  pointer-events: none;
  will-change: transform;
}
.ribbon {
  position: absolute; top: 0; bottom: 0;
  border-radius: 46% 54% 0 0 / 34% 44% 0 0;
  background: linear-gradient(180deg,
    rgba(52, 211, 153, 0.38) 0%,
    rgba(34, 211, 238, 0.24) 36%,
    rgba(139, 92, 246, 0.14) 60%,
    transparent 82%);
  animation: sway 16s ease-in-out infinite alternate,
             flicker 9s ease-in-out infinite alternate;
}
.ribbon-2 {
  background: linear-gradient(180deg,
    rgba(34, 211, 238, 0.30) 0%,
    rgba(139, 92, 246, 0.22) 40%,
    rgba(52, 211, 153, 0.10) 64%,
    transparent 84%);
}
/* Scene-tinted ribbons where color-mix exists; the static gradients above are
   the fallback and stay perfectly usable without it. */
@supports (color: color-mix(in srgb, red, blue)) {
  .ribbon-1, .ribbon-3 {
    background: linear-gradient(180deg,
      color-mix(in srgb, var(--scene-a) 115%, transparent) 0%,
      color-mix(in srgb, var(--scene-c) 110%, transparent) 36%,
      color-mix(in srgb, var(--scene-b) 60%, transparent) 60%,
      transparent 82%);
  }
  .ribbon-2, .ribbon-4 {
    background: linear-gradient(180deg,
      color-mix(in srgb, var(--scene-b) 125%, transparent) 0%,
      color-mix(in srgb, var(--scene-c) 105%, transparent) 40%,
      color-mix(in srgb, var(--scene-a) 45%, transparent) 64%,
      transparent 84%);
  }
}
/* Vertical ray structure inside the aurora - the striations real curtains
   have. One repeating period wider than the shift, so the loop is seamless.
   Belongs to the hero sky: it parallaxes out as you leave the top.
   André named these "the longitude bars" on 2026-11-12, the evening he called
   the flare pass epic. Meridians for the 59°N sky. The name sticks. */
.rays {
  position: absolute;
  top: -6vh; left: -12vw; right: -12vw; height: 84vh;
  background: repeating-linear-gradient(90deg,
    transparent 0 44px,
    rgba(150, 255, 225, 0.05) 44px 47px,
    transparent 47px 92px);
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,0.9), transparent 74%);
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.9), transparent 74%);
  mix-blend-mode: screen;
  pointer-events: none;
  transform: translateY(calc(var(--par) * -0.18px));
  animation: raysDrift 46s linear infinite;
}
@keyframes raysDrift { from { transform: translateY(calc(var(--par) * -0.18px)) translateX(0); } to { transform: translateY(calc(var(--par) * -0.18px)) translateX(92px); } }
.ribbon-1 { left: 2%;  width: 24vw; opacity: 0.75; animation-delay: -2s, -4s; }
.ribbon-2 { left: 22%; width: 30vw; opacity: 0.55; animation-delay: -7s, -1s; animation-duration: 21s, 12s; }
.ribbon-3 { left: 48%; width: 22vw; opacity: 0.65; animation-delay: -11s, -6s; animation-duration: 18s, 8s; }
.ribbon-4 { left: 70%; width: 26vw; opacity: 0.50; animation-delay: -5s, -9s; animation-duration: 24s, 11s; }
@keyframes sway {
  from { transform: translateX(-3vw) scaleX(0.9) scaleY(0.96); }
  to   { transform: translateX(4vw)  scaleX(1.12) scaleY(1.04); }
}
@keyframes flicker {
  0%   { filter: brightness(0.75); }
  40%  { filter: brightness(1.25); }
  70%  { filter: brightness(0.9); }
  100% { filter: brightness(1.15); }
}

#constellation { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.55; }

.grain {
  position: absolute; inset: -50%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 300 300' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.72' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  opacity: 0.05;
  pointer-events: none;
  animation: grain 0.6s steps(3) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 33% { transform: translate(-4%, 3%); }
  66% { transform: translate(3%, -4%); } 100% { transform: translate(0, 0); }
}

/* ============ Nav ============ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(20px, 4vw, 56px);
  transition: background 0.4s, border-color 0.4s, backdrop-filter 0.4s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(4, 6, 12, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--card-border);
}
/* Reading-progress hairline under the nav: the whole aurora ramp, scaled by
   scroll position (main.js writes --progress on the header). */
.nav-progress {
  position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: linear-gradient(90deg, var(--aurora-green), var(--aurora-cyan) 35%, var(--aurora-violet) 70%, var(--aurora-rose));
  transform-origin: 0 50%;
  transform: scaleX(var(--progress));
  pointer-events: none;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-weight: 600; font-size: 15px;
  color: var(--ink); text-decoration: none; letter-spacing: 0.02em;
}
.logo-mark {
  color: var(--accent);
  text-shadow: 0 0 12px rgba(52,211,153,0.8);
  animation: logoPulse 3.4s ease-in-out infinite;
}
@keyframes logoPulse { 0%,100% { opacity: 1; } 50% { opacity: 0.55; } }
.logo-dot { color: var(--ink-faint); }

.nav-links { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 34px); }
.nav-links a {
  font-family: var(--font-mono); font-size: 13.5px; letter-spacing: 0.04em;
  color: var(--ink-dim); text-decoration: none;
  position: relative; padding: 6px 2px;
  transition: color 0.25s;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 0; height: 1px;
  background: linear-gradient(90deg, var(--aurora-green), var(--aurora-cyan));
  transition: width 0.3s var(--ease-out);
}
.nav-links a:hover, .nav-links a.active { color: var(--ink); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-cta {
  border: 1px solid var(--card-border-hover);
  border-radius: 999px; padding: 7px 16px !important;
  color: var(--accent) !important;
}
.nav-cta::after { display: none; }
.nav-cta:hover { background: rgba(52,211,153,0.1); box-shadow: 0 0 24px rgba(52,211,153,0.25); }

.nav-burger { display: none; background: none; border: 0; cursor: pointer; }
.nav-burger span {
  display: block; width: 22px; height: 2px; margin: 5px 0;
  background: var(--ink); border-radius: 2px; transition: 0.3s;
}

/* ============ Hero ============ */
.hero {
  min-height: 100svh;
  display: flex; align-items: center; position: relative;
  padding: calc(var(--nav-h) + 40px) clamp(20px, 6vw, 80px) 80px;
}
.hero-inner {
  width: 100%; max-width: 1240px; margin: 0 auto;
  display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(30px, 5vw, 80px);
  align-items: center;
  /* Scroll depth: the hero lags the page slightly and fades as it leaves.
     --par stays 0 under reduced motion, so this is a no-op there. */
  transform: translateY(calc(var(--par) * 0.18px));
  opacity: clamp(0, calc(1 - var(--par) / 620), 1);
}
.hero.parked .hero-inner { visibility: hidden; }
.badge {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 0.12em;
  color: var(--ink-dim); text-transform: uppercase;
  border: 1px solid var(--card-border); border-radius: 999px;
  padding: 7px 16px; margin-bottom: 28px;
  background: rgba(10, 14, 26, 0.5); backdrop-filter: blur(6px);
}
.pulse-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--aurora-green);
  box-shadow: 0 0 0 0 rgba(52,211,153,0.6);
  animation: pulse 2.2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(52,211,153,0.55); }
  70% { box-shadow: 0 0 0 12px rgba(52,211,153,0); }
  100% { box-shadow: 0 0 0 0 rgba(52,211,153,0); }
}

.hero-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(48px, 7.2vw, 92px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin-bottom: 22px;
}
.name-line { display: block; overflow: hidden; }
.name-line > .ch { display: inline-block; transform: translateY(110%); }
/* Gradient lives on each letter: after main.js splits the word into
   inline-block .ch spans, a background-clip on the parent has no text
   of its own left to paint (the old invisible-"Martinsen" bug). */
.name-accent { color: var(--accent-2); }
.name-accent > .ch {
  background: linear-gradient(100deg, var(--aurora-green) 10%, var(--aurora-cyan) 45%, var(--aurora-violet) 90%);
  background-size: 200% 100%;
  animation: gradShift 8s ease-in-out infinite alternate;
  -webkit-background-clip: text; background-clip: text;
}
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .name-accent > .ch { -webkit-text-fill-color: transparent; color: transparent; }
}
@keyframes gradShift { from { background-position: 0% 0; } to { background-position: 100% 0; } }

.hero-tagline {
  font-family: var(--font-mono);
  font-size: clamp(17px, 2.2vw, 22px);
  color: var(--ink-dim);
  margin-bottom: 20px;
}
.tagline-static { color: var(--ink-faint); }
.tagline-rotate {
  color: var(--accent); font-weight: 600;
  display: inline-block; min-width: 8ch;
}
.tagline-caret {
  color: var(--accent); margin-left: 2px;
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0; } }

.hero-sub {
  max-width: 52ch; color: var(--ink-dim);
  font-size: clamp(16px, 1.4vw, 18.5px);
  margin-bottom: 36px;
}

.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 14.5px; font-weight: 500;
  text-decoration: none; border-radius: 12px;
  padding: 13px 26px;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s, background 0.25s, border-color 0.25s;
}
.btn:active { transform: scale(0.97); }
.btn-lg { padding: 16px 34px; font-size: 16px; border-radius: 14px; }
.btn-primary {
  position: relative; overflow: hidden;
  color: #04110c;
  background: linear-gradient(120deg, var(--aurora-green), var(--aurora-cyan));
  box-shadow: 0 8px 32px rgba(52,211,153,0.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 44px rgba(52,211,153,0.5); }
/* A slow sheen crosses the primary CTA every few seconds - transform-only,
   parked off-canvas at rest so reduced motion never shows a stray streak. */
.btn-primary::after {
  content: ""; position: absolute; top: -20%; bottom: -20%; left: 0; width: 36%;
  background: linear-gradient(105deg, transparent, rgba(255,255,255,0.4), transparent);
  transform: translateX(-190%) skewX(-18deg);
  animation: sheen 5.6s ease-in-out infinite;
  pointer-events: none;
}
@keyframes sheen {
  0%, 56% { transform: translateX(-190%) skewX(-18deg); }
  88%, 100% { transform: translateX(430%) skewX(-18deg); }
}
.btn-arrow { transition: transform 0.25s var(--ease-out); }
.btn:hover .btn-arrow { transform: translateX(5px); }
.btn-ghost {
  color: var(--ink); border: 1px solid var(--card-border);
  background: rgba(10,14,26,0.4);
}
.btn-ghost:hover { border-color: var(--ink-faint); transform: translateY(-2px); }

/* Terminal */
.terminal {
  position: relative;
  background: rgba(7, 10, 20, 0.82);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.55), 0 0 60px rgba(52,211,153,0.05) inset;
  backdrop-filter: blur(10px);
  overflow: hidden;
  transform: perspective(1200px) rotateY(-6deg) rotateX(2deg);
  transition: transform 0.5s var(--ease-out);
}
/* Faint CRT sweep down the glass - barely there, deliberately. */
.terminal::after {
  content: ""; position: absolute; left: 0; right: 0; top: -40%; height: 34%;
  background: linear-gradient(180deg, transparent, rgba(52,211,153,0.05), transparent);
  animation: scanSweep 7s linear infinite;
  pointer-events: none;
}
@keyframes scanSweep { from { top: -40%; } to { top: 112%; } }
.terminal:hover { transform: perspective(1200px) rotateY(0deg) rotateX(0deg); }
.terminal-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--card-border);
  background: rgba(14, 20, 34, 0.6);
}
.t-dot { width: 11px; height: 11px; border-radius: 50%; }
.t-dot.red { background: #ff5f57; } .t-dot.yellow { background: #febc2e; } .t-dot.green { background: #28c840; }
.terminal-title {
  margin-left: 10px; font-family: var(--font-mono); font-size: 12px; color: var(--ink-faint);
}
.terminal-body {
  padding: 22px;
  font-family: var(--font-mono); font-size: 14px; line-height: 1.75;
  min-height: 320px;
  white-space: pre-wrap; word-break: break-word;
}
/* The pre children do NOT inherit terminal-body's pre-wrap: the UA rule
   pre { white-space: pre } is a specified value and wins over inheritance.
   Set it on the lines themselves so long output wraps on narrow screens
   instead of clipping against the terminal's overflow:hidden. */
.t-line { white-space: pre-wrap; word-break: break-word; }
.t-cmd { color: var(--ink); }
.t-cmd::before { content: "$ "; color: var(--aurora-green); }
.t-cmd::after {
  content: "▌"; color: var(--aurora-green); margin-left: 2px;
  animation: blink 1s steps(1) infinite;
}
.t-cmd.done::after { content: ""; }
.t-out { color: var(--ink-dim); }
.t-out .ok { color: var(--aurora-green); }
.t-out .warn { color: #febc2e; }
.t-out .violet { color: var(--aurora-violet); }
.t-out .cyan { color: var(--aurora-cyan); }

/* Scroll hint */
.scroll-hint {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
  opacity: clamp(0, calc(1 - var(--par) / 360), 1);
}
.scroll-line {
  display: block; width: 1px; height: 52px;
  background: linear-gradient(180deg, var(--ink-faint), transparent);
  position: relative; overflow: hidden;
}
.scroll-line::after {
  content: ""; position: absolute; top: -30%; left: 0; width: 100%; height: 40%;
  background: var(--aurora-green);
  animation: scrollDrop 2s var(--ease-out) infinite;
}
@keyframes scrollDrop { 0% { top: -40%; } 60%,100% { top: 110%; } }

/* ============ Sections ============ */
.section { padding: clamp(90px, 12vw, 150px) clamp(20px, 6vw, 80px); position: relative; }
.section-alt {
  background: linear-gradient(180deg, transparent, rgba(10,14,26,0.55) 12%, rgba(10,14,26,0.55) 88%, transparent);
}
.section-inner { max-width: 1120px; margin: 0 auto; }

/* Each section carries its own accent (--sec): kicker, title dot and local
   chrome borrow it, while buttons keep the house green. #crew's --sec is
   rewritten live by main.js as the carousel moves between people. */
#projects { --sec: var(--aurora-cyan); }
#crew     { --sec: var(--aurora-violet); --sec-glow: rgba(139, 92, 246, 0.2); }
#journey  { --sec: var(--aurora-amber); }
#rig      { --sec: var(--aurora-green); }
#contact  { --sec: var(--aurora-rose); }

.kicker {
  font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.2em;
  color: var(--sec, var(--accent)); text-transform: uppercase; margin-bottom: 14px;
}
.kicker::after {
  content: ""; display: inline-block; width: 44px; height: 1px;
  margin-left: 12px; vertical-align: middle;
  background: linear-gradient(90deg, var(--sec, var(--accent)), transparent);
}
.section-title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(30px, 4.4vw, 52px);
  line-height: 1.12; letter-spacing: -0.015em;
  margin-bottom: 44px;
}
.title-accent { color: var(--sec, var(--accent)); }
.section-lead { max-width: 62ch; color: var(--ink-dim); margin: -20px 0 48px; font-size: 18px; }

/* ============ About ============ */
.about-grid {
  display: grid; grid-template-columns: 340px 1fr; gap: clamp(36px, 5vw, 72px);
  align-items: start;
}
.portrait-frame {
  position: relative; border-radius: 20px; padding: 2px;
  background: linear-gradient(140deg, rgba(52,211,153,0.6), rgba(34,211,238,0.25) 40%, rgba(139,92,246,0.55));
  background: conic-gradient(from var(--frame-spin),
    rgba(52,211,153,0.65), rgba(34,211,238,0.3) 30%,
    rgba(139,92,246,0.6) 62%, rgba(52,211,153,0.65));
  animation: frameSpin 12s linear infinite;
  aspect-ratio: 3 / 3.6;
}
@keyframes frameSpin { to { --frame-spin: 360deg; } }
.portrait-photo {
  display: block; width: 100%; height: 100%;
  border-radius: 18px; object-fit: cover;
}
/* Sinks the photo into the dark theme so the pale sky doesn't glow on top of it. */
.portrait-frame::after {
  content: ""; position: absolute; inset: 2px; border-radius: 18px; pointer-events: none;
  background: linear-gradient(180deg, rgba(10,14,26,0) 52%, rgba(10,14,26,0.38) 100%);
}

.portrait-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-dim);
  border: 1px solid var(--card-border); border-radius: 999px; padding: 6px 14px;
  background: rgba(10,14,26,0.5);
  transition: border-color 0.25s, color 0.25s, transform 0.25s;
}
.chip-icon { flex: none; }
.chip:hover { border-color: var(--accent-2); color: var(--ink); transform: translateY(-2px); }

.about-copy .lead {
  font-family: var(--font-display); font-size: clamp(20px, 2.4vw, 26px);
  font-weight: 500; color: var(--ink); line-height: 1.4; margin-bottom: 26px;
}
.about-copy p { margin-bottom: 22px; color: var(--ink-dim); max-width: 60ch; }
.about-copy strong { color: var(--ink); font-weight: 600; }
.about-copy .muted { color: var(--ink-faint); font-style: italic; }

/* ============ Projects ============ */
/* Explicit column counts, not auto-fit: six cards with a 2-span flagship is
   seven cells, which orphaned the last card in a 3-col auto-fit grid. The
   closer now spans the full row (see [data-wide]), and 3 / 2 / 1 columns are
   pinned to breakpoints so no width leaves a hole or a lone card. */
.projects-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.project-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 30px 28px 24px;
  backdrop-filter: blur(8px);
  transform-style: preserve-3d;
  transition: border-color 0.35s, box-shadow 0.35s, transform 0.12s ease-out;
  overflow: hidden;
}
.project-card:hover {
  border-color: var(--card-border-hover);
  box-shadow: 0 18px 60px rgba(0,0,0,0.45), 0 0 40px rgba(52,211,153,0.07);
}
.project-card[data-featured] { grid-column: span 2; }
/* The closing career card: spans the whole row and lays out horizontally so
   the section ends on a deliberate wide strip, not an orphaned box. Left =
   icon/tag over title, middle = the description, right = the status behind a
   dashed vertical divider (the footer rule turned on its side). */
.project-card[data-wide] {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(220px, 320px) 1fr auto;
  grid-template-rows: auto auto;
  grid-template-areas:
    "head body foot"
    "title body foot";
  column-gap: 36px; row-gap: 8px;
  align-items: center;
}
.project-card[data-wide] .card-head {
  grid-area: head; margin-bottom: 0;
  justify-content: flex-start; gap: 14px;
}
.project-card[data-wide] h3 { grid-area: title; margin-bottom: 0; }
.project-card[data-wide] p { grid-area: body; margin-bottom: 0; max-width: 64ch; }
.project-card[data-wide] .card-footer {
  grid-area: foot; align-self: stretch;
  border-top: 0; padding-top: 0;
  border-left: 1px dashed rgba(120,150,200,0.18); padding-left: 32px;
}
/* Equal-height rows: pin each card's status footer to the bottom so the dashed
   meta line sits on one baseline per row, instead of a void under shorter
   cards. The wide closer keeps its own grid/block layout. */
.project-card:not([data-wide]) { display: flex; flex-direction: column; }
.project-card:not([data-wide]) .card-footer { margin-top: auto; }
.card-glow {
  position: absolute; inset: 0; opacity: 0; transition: opacity 0.4s; pointer-events: none;
  background: radial-gradient(600px circle at var(--mx, 50%) var(--my, 50%), rgba(52,211,153,0.10), transparent 45%);
}
.project-card:hover .card-glow { opacity: 1; }
.card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.card-icon { display: inline-flex; align-items: center; }
.card-icon svg { display: block; }
/* Holds the shared #iconAurora gradient. Zero box, not display:none - a hidden
   defs SVG can fail to resolve stroke="url(#...)" in some engines. */
.icon-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.card-tag {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-faint); border: 1px solid var(--card-border);
  padding: 4px 10px; border-radius: 999px;
}
.project-card h3 {
  font-family: var(--font-display); font-size: 22px; font-weight: 600;
  margin-bottom: 12px; letter-spacing: -0.01em;
}
.project-card p { color: var(--ink-dim); font-size: 15.5px; margin-bottom: 22px; }
.card-footer {
  display: flex; justify-content: space-between; align-items: center;
  border-top: 1px dashed rgba(120,150,200,0.14); padding-top: 16px;
}
.status { font-family: var(--font-mono); font-size: 12.5px; }
.status-live { color: var(--aurora-green); }
.status-done { color: var(--ink-faint); }
.card-link {
  font-family: var(--font-mono); font-size: 13px; color: var(--accent-2);
  text-decoration: none; transition: color 0.25s;
}
.card-link:hover { color: var(--ink); }

/* ============ Crew ============ */
/* Carousel controls: roster chips act as tabs, arrows step one person at a time */
.crew-controls {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 16px 24px;
  margin: -12px 0 26px;
}
.crew-roster {
  display: flex; flex-wrap: wrap; gap: 10px;
}
.crew-chip {
  font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-dim);
  border: 1px solid var(--card-border); border-radius: 999px;
  padding: 6px 14px; background: rgba(10,14,26,0.5);
  text-decoration: none;
}
a.crew-chip { transition: border-color 0.25s, color 0.25s, transform 0.25s, background 0.25s; }
a.crew-chip:hover { transform: translateY(-2px); }
.crew-chip.is-live {
  /* --chip is the member's own accent, written once by main.js. */
  color: var(--chip, var(--accent)); border-color: var(--card-border);
}
.crew-chip.is-active {
  color: var(--ink); background: var(--sec-glow, rgba(52,211,153,0.12));
  border-color: var(--sec, var(--card-border-hover));
}
a.crew-chip { transition: border-color 0.5s, color 0.5s, transform 0.25s, background 0.5s; }
.crew-carousel-ctl { display: flex; align-items: center; gap: 12px; }
.crew-hint {
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.08em;
  color: var(--ink-faint); text-transform: lowercase;
}
.crew-arrow {
  width: 38px; height: 38px; display: grid; place-items: center;
  color: var(--ink-dim); background: rgba(10,14,26,0.5);
  border: 1px solid var(--card-border); border-radius: 10px; cursor: pointer;
  transition: border-color 0.25s, color 0.25s, transform 0.25s, opacity 0.25s;
}
/* The arrows are drawn, not typed. They used to be &larr; / &rarr; glyphs in
   --font-mono, centred with `place-items: center` - which centres the em box,
   not the ink. Where a glyph's ink sits inside its em box is a property of
   whichever font is loaded, so the old fix was a 2.5px nudge that would come
   back the moment a weight or family changed. A stroked chevron is centred
   because its path is symmetric about the viewBox centre (8,8): no font has an
   opinion about it. Same shape in the lightbox nav below. */
.crew-arrow .chev { width: 18px; height: 18px; display: block; }
.crew-arrow:hover:not(:disabled) {
  color: var(--ink); border-color: var(--card-border-hover); transform: translateY(-2px);
}
.crew-arrow:disabled { opacity: 0.3; cursor: default; }
.crew-arrow:focus-visible, .crew-chip:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}

/* The sideways track: one crew member per panel, next one peeking at the edge */
.crew-track {
  position: relative;
  display: flex; align-items: stretch;
  gap: clamp(22px, 3.5vw, 44px);
  overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(120,150,200,0.28) transparent;
  padding-bottom: 12px;   /* room for the horizontal scrollbar */
}
.crew-track:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; border-radius: 12px; }
.crew-track::-webkit-scrollbar { height: 6px; }
.crew-track::-webkit-scrollbar-track { background: transparent; }
.crew-track::-webkit-scrollbar-thumb {
  background: rgba(120,150,200,0.25); border: 0; border-radius: 8px;
}
.crew-track::-webkit-scrollbar-thumb:hover { background: rgba(52,211,153,0.45); }

.crew-progress {
  height: 2px; margin: 2px 0 0; border-radius: 2px; overflow: hidden;
  background: rgba(120,150,200,0.12);
}
.crew-progress span {
  display: block; height: 100%; border-radius: 2px;
  background: linear-gradient(90deg, var(--sec, var(--aurora-green)), var(--aurora-cyan));
}

.crew-feature {
  flex: 0 0 calc(100% - 104px);   /* leaves a sliver of the next person visible */
  min-width: 0;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: clamp(28px, 4.5vw, 64px);
  align-items: start;
}
/* Trailing space on the last panel only, so the last person can still snap
   flush to the left edge. It goes on the slide, not the track: a track padding
   would shrink the percentage flex-basis by the same amount and achieve nothing. */
.crew-feature:last-child { margin-right: 104px; }

/* No slide-up inside a sideways scroller - fade only (a transform would also
   spill 26px past the track's clipped vertical edge). */
.crew-feature .reveal { transform: none; }

.crew-hero {
  margin: 0;
  position: relative;
  border-radius: 20px;
  padding: 2px;
  background: linear-gradient(140deg, rgba(52,211,153,0.6), rgba(34,211,238,0.25) 40%, rgba(139,92,246,0.55));
  background: conic-gradient(from var(--frame-spin),
    rgba(52,211,153,0.65), rgba(34,211,238,0.3) 30%,
    rgba(139,92,246,0.6) 62%, rgba(52,211,153,0.65));
  animation: frameSpin 12s linear infinite;
  /* The room light: a soft glow in the active member's own accent. */
  box-shadow: 0 0 46px var(--sec-glow, rgba(139,92,246,0.2));
  transition: box-shadow 0.9s ease;
}
.crew-hero .crew-open {
  display: block; width: 100%; padding: 0; border: 0;
  background: none; cursor: zoom-in; border-radius: 18px; overflow: hidden;
}
.crew-hero img {
  display: block; width: 100%; height: auto; aspect-ratio: 1 / 1;
  object-fit: cover; border-radius: 18px;
  transition: transform 0.6s var(--ease-out);
}
.crew-hero .crew-open:hover img { transform: scale(1.03); }

.crew-strip-wrap { margin-top: 14px; }
.crew-strip-label {
  display: inline-block;
  font-family: var(--font-mono); font-size: 12.5px;
  color: var(--sec, var(--accent-2)); background: none; border: 0;
  padding: 0 0 10px; cursor: pointer;
  letter-spacing: 0.02em;
  transition: color 0.5s;
}
.crew-strip-label:hover { color: var(--ink); }
.crew-strip {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 7px;
}
.crew-thumb {
  padding: 0; border: 1px solid var(--card-border); border-radius: 8px;
  overflow: hidden; cursor: zoom-in; background: #0a0e1a;
  aspect-ratio: 1; transition: border-color 0.25s, transform 0.25s;
}
.crew-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.crew-thumb:hover {
  border-color: var(--sec, var(--card-border-hover));
  transform: translateY(-2px);
}
.crew-open:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.crew-interview h3 {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(26px, 3.2vw, 38px);
  letter-spacing: -0.02em; line-height: 1.15;
  margin: 0 0 14px;
}
.crew-lede {
  color: var(--ink-dim); margin-bottom: 28px; max-width: 52ch;
}
.qa-list { display: flex; flex-direction: column; gap: 22px; }
.qa dt {
  font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.04em;
  color: var(--sec, var(--accent)); margin-bottom: 6px;
  transition: color 0.6s ease;
}
.qa dt::before { content: "Q. "; color: var(--ink-faint); }
.qa dd { color: var(--ink-dim); max-width: 54ch; }

.crew-waiting {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 22px; margin-top: 48px;
}
.crew-soon {
  background: var(--card); border: 1px dashed var(--card-border);
  border-radius: var(--radius); padding: 26px 24px 22px;
}
.crew-soon-role {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ink-faint);
}
.crew-soon h4 {
  font-family: var(--font-display); font-size: 22px; font-weight: 600;
  margin: 8px 0 10px;
}
.crew-soon p { color: var(--ink-dim); font-size: 15.5px; margin-bottom: 16px; }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(4, 6, 12, 0.88);
  backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center;
  padding: 56px 72px 40px;
}
.lightbox[hidden] { display: none !important; }
.lightbox-figure { margin: 0; max-width: min(92vw, 920px); text-align: center; }
.lightbox-figure img {
  display: block; max-width: 100%; max-height: 78vh;
  border-radius: 14px;
  border: 1px solid var(--card-border);
  box-shadow: 0 24px 80px rgba(0,0,0,0.55);
}
.lightbox-figure figcaption {
  font-family: var(--font-mono); font-size: 13px;
  color: var(--ink-dim); margin-top: 14px;
}
.lightbox-close, .lightbox-nav {
  position: absolute;
  background: rgba(10,14,26,0.7);
  border: 1px solid var(--card-border);
  color: var(--ink);
  cursor: pointer;
  border-radius: 999px;
  transition: border-color 0.25s, color 0.25s, background 0.25s;
}
.lightbox-close:hover, .lightbox-nav:hover {
  border-color: var(--card-border-hover); color: var(--accent);
}
.lightbox-close {
  top: 18px; right: 18px;
  width: 44px; height: 44px; font-size: 28px; line-height: 1;
  /* Optical centring: the glyph ink sits ~2px under the middle of its line box.
     With box-sizing:border-box a padding-bottom lifts the centred line box by
     half its value and leaves the circle exactly the same size. Measured at
     4x with a pixel scan, not eyeballed. */
  padding-bottom: 4px;
}
.lightbox-nav {
  top: 50%; transform: translateY(-50%);
  width: 48px; height: 48px;
  display: grid; place-items: center;   /* drawn chevron, not a glyph - see .crew-arrow */
}
.lightbox-nav .chev { width: 26px; height: 26px; display: block; }
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }

/* ============ Timeline ============ */
.timeline { position: relative; margin-top: 10px; --tl: 0; }
.timeline::before {
  content: ""; position: absolute; left: 26px; top: 8px; bottom: 8px; width: 1px;
  background: linear-gradient(180deg, transparent, rgba(120,150,200,0.35) 8%, rgba(120,150,200,0.35) 92%, transparent);
}
/* The lit overlay: a green-to-tungsten wire that draws down the timeline as
   you scroll (--tl is 0..1, written by main.js). Reduced motion and no-JS both
   end up with the plain line above, which is complete on its own. */
.timeline::after {
  content: ""; position: absolute; left: 26px; top: 8px; width: 1px;
  height: calc(100% - 16px);
  background: linear-gradient(180deg, var(--aurora-green), var(--aurora-amber));
  box-shadow: 0 0 10px rgba(251,191,36,0.35);
  transform-origin: top;
  transform: scaleY(var(--tl));
}
.tl-item {
  position: relative; display: grid; grid-template-columns: 52px 1fr;
  gap: 26px; padding: 22px 0;
}
.tl-marker {
  width: 52px; height: 52px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 14px; font-weight: 600;
  color: var(--accent);
  background: var(--bg-soft);
  border: 1px solid var(--card-border-hover);
  box-shadow: 0 0 24px rgba(52,211,153,0.12);
  z-index: 1;
  transition: color 0.5s, border-color 0.5s, box-shadow 0.5s, transform 0.5s var(--ease-out);
}
/* Passed milestones warm up to the journey's tungsten accent. */
.tl-marker.lit {
  color: var(--aurora-amber);
  border-color: rgba(251,191,36,0.55);
  box-shadow: 0 0 28px rgba(251,191,36,0.22);
  transform: scale(1.06);
}
.tl-content h4 {
  font-family: var(--font-display); font-size: 19px; font-weight: 600; margin: 12px 0 8px;
}
.tl-content p { color: var(--ink-dim); max-width: 62ch; font-size: 15.5px; }

/* ============ Rig ============ */
.rig-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(26px, 4vw, 48px); align-items: start; }
.rig-spec {
  background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius);
  padding: 12px 28px; backdrop-filter: blur(8px);
}
.spec-row {
  display: grid; grid-template-columns: 110px 1fr; gap: 18px;
  padding: 17px 0; border-bottom: 1px solid rgba(120,150,200,0.10);
  align-items: baseline;
}
.spec-row:last-child { border-bottom: 0; }
.spec-key {
  font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink-faint);
}
/* Status LEDs: the rig breathes. Staggered per row, green = alive. Decorative,
   not telemetry - no numbers are claimed. */
.spec-key::before {
  content: ""; display: inline-block; width: 6px; height: 6px;
  border-radius: 50%; margin-right: 9px; vertical-align: 1px;
  background: var(--aurora-green);
  box-shadow: 0 0 8px rgba(52,211,153,0.7);
  animation: ledBreathe 3.4s ease-in-out infinite;
}
.spec-row:nth-child(2) .spec-key::before { animation-delay: -0.7s; }
.spec-row:nth-child(3) .spec-key::before { animation-delay: -1.4s; }
.spec-row:nth-child(4) .spec-key::before { animation-delay: -2.1s; }
.spec-row:nth-child(5) .spec-key::before { animation-delay: -2.8s; }
.spec-row:nth-child(6) .spec-key::before { animation-delay: -0.35s; }
@keyframes ledBreathe { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
.spec-val { font-size: 15.5px; color: var(--ink); }
.rig-out { font-size: 12.5px; line-height: 1.5; color: var(--aurora-green); min-height: unset; }
.rig-note { margin-top: 22px; color: var(--ink-dim); max-width: 56ch; }
.rig-note em { color: var(--accent-2); }

/* ============ Contact ============ */
.contact-inner { text-align: center; display: flex; flex-direction: column; align-items: center; }
.contact-inner .section-title { max-width: 18ch; }
.contact-actions { display: flex; flex-direction: column; gap: 26px; align-items: center; }
.contact-links { display: flex; gap: 14px; align-items: center; font-family: var(--font-mono); font-size: 14px; }
.contact-links a { color: var(--ink-dim); text-decoration: none; transition: color 0.25s; }
.contact-links a:hover { color: var(--accent); }
.contact-sep { color: var(--ink-faint); }
/* Only rendered when JavaScript is off - the row Cloudflare's encoded button leaves behind. */
.contact-noscript { font-family: var(--font-mono); font-size: 13.5px; color: var(--ink-faint); max-width: 46ch; }
.contact-noscript em { font-style: normal; color: var(--accent); }
[data-placeholder] { opacity: 0.45; cursor: help; }

/* ============ Cursor aura ============ */
/* A soft workshop-light glow that trails the pointer (fine pointers only,
   created by main.js). Screen blend at very low alpha: it warms surfaces
   without touching text contrast. */
.cursor-glow {
  position: fixed; left: 0; top: 0; z-index: 5;
  width: 560px; height: 560px; margin: -280px 0 0 -280px;
  border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(52,211,153,0.07), rgba(34,211,238,0.035) 40%, transparent 65%);
  mix-blend-mode: screen;
  opacity: 0; transition: opacity 0.5s ease;
  will-change: transform;
}
.cursor-glow.on { opacity: 1; }

/* ============ Footer ============ */
.footer {
  border-top: 1px solid transparent;
  border-image: linear-gradient(90deg, transparent, rgba(52,211,153,0.4) 30%, rgba(139,92,246,0.4) 70%, transparent) 1;
  padding: 26px clamp(20px, 6vw, 80px);
}
.footer-inner {
  max-width: 1120px; margin: 0 auto;
  display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  font-size: 13px; color: var(--ink-faint);
}
.footer .mono, .footer-left { font-family: var(--font-mono); }

/* ============ Reveal animation ============ */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out); }
.reveal.in { opacity: 1; transform: translateY(0); }

/* Stagger inside grids */
.projects-grid .reveal:nth-child(2) { transition-delay: 0.08s; }
.projects-grid .reveal:nth-child(3) { transition-delay: 0.16s; }
.projects-grid .reveal:nth-child(4) { transition-delay: 0.08s; }
.projects-grid .reveal:nth-child(5) { transition-delay: 0.16s; }
.projects-grid .reveal:nth-child(6) { transition-delay: 0.24s; }
.timeline .reveal:nth-child(2n) { transition-delay: 0.12s; }

/* ============ Responsive ============ */
/* Projects: 3 columns on desktop, 2 on tablet, 1 on phone. The flagship keeps
   its 2-span (a full row) at 2 columns; only the single-column tier flattens
   it, so no width leaves a hole beside the closing strip. */
@media (max-width: 1080px) {
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 980px) {
  /* minmax(0,1fr) + min-width:0 on the items: a bare `1fr` track keeps an
     auto minimum, so one wide child (the terminal's pre lines) forced the
     track past the viewport and clipped the hero on phones. Measured
     2026-11-12 at 390px: track 467px in a 343px container, right edge cut. */
  .hero-inner { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .hero-left, .hero-right { min-width: 0; }
  .terminal { transform: none; min-width: 0; }
  .about-grid { grid-template-columns: minmax(0, 1fr); }
  .about-grid > * { min-width: 0; }
  .portrait-frame { max-width: 320px; }
  .rig-grid { grid-template-columns: minmax(0, 1fr); }
  .rig-grid > * { min-width: 0; }
  .crew-feature { grid-template-columns: 1fr; flex-basis: calc(100% - 72px); }
  .crew-hero { max-width: 520px; }
  .crew-waiting { grid-template-columns: 1fr; }
  .crew-feature:last-child { margin-right: 72px; }
  .crew-track { gap: 24px; }
  /* README open item 1 (2026-10-14), fixed 2026-11-12: on a phone nothing sits
     side by side, so stretching every panel to the tallest one poured up to
     552px of dead space between gallery and interview. Each panel now takes
     its own natural height; desktop keeps the equal-height stretch. */
  .crew-track { align-items: start; }
  .crew-feature { align-content: start; }
}
@media (max-width: 720px) {
  .nav-links {
    position: fixed; inset: var(--nav-h) 0 auto 0;
    flex-direction: column; padding: 26px 0 34px;
    background: rgba(4, 6, 12, 0.94); backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--card-border);
    transform: translateY(-130%); transition: transform 0.4s var(--ease-out);
  }
  .nav-links.open { transform: translateY(0); }
  .nav-burger { display: block; }
  /* Single column: flatten the flagship and stand the closing strip back up
     into a normal vertical card. */
  .projects-grid { grid-template-columns: 1fr; }
  .project-card[data-featured] { grid-column: auto; }
  .project-card[data-wide] { display: block; }
  .project-card[data-wide] .card-head { margin-bottom: 18px; justify-content: space-between; }
  .project-card[data-wide] h3 { margin-bottom: 12px; }
  .project-card[data-wide] p { margin-bottom: 22px; max-width: none; }
  .project-card[data-wide] .card-footer {
    border-left: 0; padding-left: 0;
    border-top: 1px dashed rgba(120,150,200,0.14); padding-top: 16px;
  }
  .terminal-body { min-height: 240px; font-size: 12.5px; }
  .footer-inner { flex-direction: column; text-align: center; }
  .crew-strip { grid-template-columns: repeat(4, 1fr); }
  .crew-feature { flex-basis: calc(100% - 52px); }
  .crew-feature:last-child { margin-right: 52px; }
  .crew-controls { margin-bottom: 20px; }
  .crew-hint { display: none; }
  .crew-arrow { width: 34px; height: 34px; }
  .lightbox { padding: 64px 16px 24px; }
  .lightbox-nav { width: 40px; height: 40px; }
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
}

/* ============ Reduced motion ============ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001s !important; transition-duration: 0.001s !important; }
  .reveal { opacity: 1; transform: none; }
  #constellation { display: none; }
  .cursor-glow { display: none; }
  /* No scroll-driven movement: the sky stays put, the hero stays put, and the
     timeline wire is simply drawn (main.js also sets --tl: 1 here). */
  .aurora-wrap, .curtain, .rays, .hero-inner, .scroll-hint { transform: none; }
  .hero-inner, .scroll-hint { opacity: 1; }
  .timeline { --tl: 1; }
}
