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

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

  --aurora-green: #34d399;
  --aurora-cyan: #22d3ee;
  --aurora-violet: #8b5cf6;

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

  --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; }

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; }

.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, rgba(52,211,153,0.32), transparent 65%);
}
.aurora-2 {
  width: 48vw; height: 48vw; top: 20vh; right: -16vw;
  background: radial-gradient(circle, rgba(139,92,246,0.24), transparent 65%);
  animation-delay: -9s; animation-duration: 31s;
}
.aurora-3 {
  width: 42vw; height: 42vw; bottom: -14vw; left: 24vw;
  background: radial-gradient(circle, rgba(34,211,238,0.20), 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) */
.curtain {
  position: absolute;
  top: -10vh; left: -8vw; right: -8vw; height: 82vh;
  filter: blur(46px) saturate(1.3);
  transform: skewX(-14deg);
  mix-blend-mode: screen;
  pointer-events: none;
}
.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%);
}
.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);
}
.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;
}
.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 {
  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); }
.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 {
  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);
}
.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;
}
.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%);
}
.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; }

.kicker {
  font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.2em;
  color: var(--accent); text-transform: uppercase; margin-bottom: 14px;
}
.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(--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));
  aspect-ratio: 3 / 3.6;
}
.portrait-placeholder {
  position: relative; width: 100%; height: 100%;
  border-radius: 18px; overflow: hidden;
  background:
    radial-gradient(circle at 30% 20%, rgba(52,211,153,0.16), transparent 50%),
    radial-gradient(circle at 75% 80%, rgba(139,92,246,0.16), transparent 50%),
    #0a0e1a;
  display: flex; align-items: center; justify-content: center;
}
.portrait-initials {
  font-family: var(--font-display); font-weight: 700; font-size: 92px;
  background: linear-gradient(120deg, var(--aurora-green), var(--aurora-cyan));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  opacity: 0.9;
}
.scanline {
  position: absolute; left: 0; right: 0; height: 90px; top: -120px;
  background: linear-gradient(180deg, transparent, rgba(52,211,153,0.16), transparent);
  animation: scan 5.5s linear infinite;
}
@keyframes scan { to { top: 110%; } }

.portrait-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.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);
  transition: border-color 0.25s, transform 0.25s;
}
.chip:hover { border-color: var(--accent-2); 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 ============ */
.projects-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 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; }
.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 { font-size: 26px; }
.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 ============ */
.crew-roster {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin: -12px 0 48px;
}
.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; }
a.crew-chip:hover { transform: translateY(-2px); }
.crew-chip.is-live {
  color: var(--accent); border-color: var(--card-border-hover);
}

.crew-feature {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: clamp(28px, 4.5vw, 64px);
  align-items: start;
}

.crew-feature + .crew-feature {
  margin-top: clamp(56px, 8vw, 96px);
}

.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));
}
.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(--accent-2); background: none; border: 0;
  padding: 0 0 10px; cursor: pointer;
  letter-spacing: 0.02em;
}
.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(--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(--accent); margin-bottom: 6px;
}
.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;
}
.lightbox-nav {
  top: 50%; transform: translateY(-50%);
  width: 48px; height: 48px; font-size: 32px; line-height: 1;
}
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }

/* ============ Timeline ============ */
.timeline { position: relative; margin-top: 10px; }
.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);
}
.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;
}
.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);
}
.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); }
[data-placeholder] { opacity: 0.45; cursor: help; }

/* ============ Footer ============ */
.footer {
  border-top: 1px solid var(--card-border);
  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 ============ */
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; gap: 48px; }
  .terminal { transform: none; }
  .about-grid { grid-template-columns: 1fr; }
  .portrait-frame { max-width: 320px; }
  .rig-grid { grid-template-columns: 1fr; }
  .project-card[data-featured] { grid-column: span 1; }
  .crew-feature { grid-template-columns: 1fr; }
  .crew-hero { max-width: 520px; }
  .crew-waiting { grid-template-columns: 1fr; }
}
@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; }
  .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); }
  .lightbox { padding: 64px 16px 24px; }
  .lightbox-nav { width: 40px; height: 40px; font-size: 26px; }
  .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; }
}
