/* ============================================================
   marc.delaney — a personal cinema for code
   vanilla CSS · dark-first · teal + projector-amber accents
   ============================================================ */

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

:root {
  /* surfaces */
  --bg:        #07090d;
  --bg-1:      #0b0f15;
  --bg-2:      #0f141c;
  --line:      rgba(255, 255, 255, 0.07);
  --line-2:    rgba(255, 255, 255, 0.14);

  /* ink */
  --text:      #e8eef5;
  --dim:       #9aa6b4;
  --faint:     #5b6573;

  /* accents */
  --teal:      #5eead4;
  --teal-ink:  #04221f;
  --teal-glow: rgba(94, 234, 212, 0.16);
  --amber:     #fcd34d;
  --violet:    #a78bfa;

  /* type */
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-sans:    'Inter', system-ui, -apple-system, sans-serif;
  --font-mono:    'JetBrains Mono', 'SF Mono', Menlo, monospace;

  /* metrics */
  --wrap: 1140px;
  --pad:  clamp(1.25rem, 4vw, 2.75rem);

  /* z-scale */
  --z-bg: 0;
  --z-content: 2;
  --z-nav: 30;
  --z-modal: 1000;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul { list-style: none; }
em { color: var(--teal); font-style: normal; }
::selection { background: var(--teal); color: var(--teal-ink); }

/* ---------- a11y helpers ---------- */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: fixed;
  top: 0.75rem; left: 0.75rem;
  z-index: 1100;
  padding: 0.6rem 1rem;
  border-radius: 10px;
  background: var(--teal);
  color: var(--teal-ink);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  transform: translateY(-160%);
  transition: transform 0.18s ease;
}
.skip-link:focus { transform: translateY(0); }

:where(a, button, [tabindex]):focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- ambient layers ---------- */
.grain, .vignette, .glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
}
.grain {
  z-index: 1;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.vignette {
  z-index: 1;
  background: radial-gradient(120% 90% at 50% -10%, transparent 55%, rgba(0, 0, 0, 0.55) 100%);
}
.glow {
  z-index: 0;
  background:
    radial-gradient(60% 50% at 80% 0%, rgba(94, 234, 212, 0.07), transparent 70%),
    radial-gradient(50% 45% at 10% 8%, rgba(167, 139, 250, 0.06), transparent 70%);
}

/* ---------- shared frame (viewfinder corners) ---------- */
.frame { position: relative; }
.frame::before, .frame::after {
  content: '';
  position: absolute;
  width: 14px; height: 14px;
  border: 1px solid transparent;
  transition: border-color 0.25s ease;
  pointer-events: none;
}
.frame::before { top: 8px; left: 8px; border-right: 0; border-bottom: 0; }
.frame::after  { bottom: 8px; right: 8px; border-left: 0; border-top: 0; }
.frame:hover::before, .frame:hover::after,
.frame:focus-within::before, .frame:focus-within::after {
  border-color: var(--teal);
}

/* ---------- nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: var(--z-nav);
  display: flex;
  align-items: center;
  gap: 2rem;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 1rem var(--pad);
  background: rgba(7, 9, 13, 0.7);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.brand-bracket { color: var(--faint); }
.brand-dot { color: var(--teal); }

.nav-links {
  display: flex;
  gap: 1.5rem;
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}
.nav-links a {
  position: relative;
  color: var(--dim);
  transition: color 0.18s ease;
  padding: 0.25rem 0;
}
.nav-links a:hover { color: var(--text); }
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1px;
  background: var(--teal);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.nav-links a:hover::after { transform: scaleX(1); }

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.8rem;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--bg-1);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--dim);
  white-space: nowrap;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.status:hover { color: var(--text); border-color: var(--teal); }
.status-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 0 var(--teal-glow);
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 var(--teal-glow); }
  70%  { box-shadow: 0 0 0 8px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

/* ---------- layout primitives ---------- */
main {
  position: relative;
  z-index: var(--z-content);
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--pad);
}
.section {
  padding: 6.5rem 0;
  border-top: 1px solid var(--line);
}
.section-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.reel {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--teal);
  white-space: nowrap;
}
.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 600;
  letter-spacing: -0.02em;
}
.rule {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, var(--line-2), transparent);
}
.section-intro {
  color: var(--dim);
  max-width: 58ch;
  margin-bottom: 2.75rem;
  font-size: 1.02rem;
}

/* ---------- hero ---------- */
.hero {
  padding: clamp(4rem, 9vw, 7rem) 0 5rem;
  max-width: 920px;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--faint);
  margin-bottom: 1.6rem;
  text-transform: lowercase;
}
.eyebrow-tick {
  width: 26px; height: 1px;
  background: var(--teal);
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 7vw, 5rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.035em;
  margin-bottom: 1.6rem;
}
.accent { color: var(--teal); }
.caret {
  display: inline-block;
  width: 0.5ch; height: 0.92em;
  margin-left: 0.12em;
  vertical-align: -0.08em;
  background: var(--teal);
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.hero-sub {
  font-size: clamp(1.02rem, 1.6vw, 1.18rem);
  color: var(--dim);
  max-width: 60ch;
  margin-bottom: 2.4rem;
}
.hero-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 3.5rem;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.3rem;
  border-radius: 10px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  border: 1px solid var(--line-2);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}
.btn-primary {
  background: var(--teal);
  color: var(--teal-ink);
  border-color: var(--teal);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px -10px var(--teal-glow), 0 0 0 4px var(--teal-glow);
}
.btn-primary:hover .btn-icon { transform: translateX(3px); }
.btn-icon { transition: transform 0.2s ease; }
.btn-ghost { color: var(--text); background: var(--bg-1); }
.btn-ghost:hover { border-color: var(--teal); color: var(--teal); }

.hero-stats {
  display: flex;
  gap: clamp(1.5rem, 5vw, 3.5rem);
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}
.stat { display: flex; flex-direction: column-reverse; gap: 0.3rem; }
.stat-num {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
}
.stat-label {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--faint);
  letter-spacing: 0.02em;
}

/* ---------- marquee ---------- */
.marquee {
  position: relative;
  z-index: var(--z-content);
  max-width: 100%;
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg-1);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
  display: inline-flex;
  align-items: center;
  gap: 1.4rem;
  padding: 0.85rem 0;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--dim);
  animation: scrollX 34s linear infinite;
  will-change: transform;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track .sep { color: var(--teal); }
@keyframes scrollX {
  to { transform: translateX(-50%); }
}

/* ---------- work cards ---------- */
.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(265px, 1fr));
  gap: 1rem;
}
.card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.6rem;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}
.card:hover {
  border-color: var(--line-2);
  transform: translateY(-3px);
  background: linear-gradient(180deg, var(--bg-2), rgba(94, 234, 212, 0.03));
}
.card-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  color: var(--teal);
  background: var(--teal-glow);
  padding: 0.2rem 0.55rem;
  border-radius: 5px;
  margin-bottom: 1rem;
}
.card h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 0.5rem;
}
.card p { color: var(--dim); font-size: 0.93rem; margin-bottom: 1.25rem; }
.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--faint);
}
.card-meta li:not(:last-child)::after { content: ' ·'; }
.card--ghost { border-style: dashed; opacity: 0.65; }

/* ============================================================
   FILMS — the showpiece. Effect rules below are coupled to
   script.js; class names + per-row grids must stay intact.
   ============================================================ */
.films { border-top: 1px solid var(--line); }
.film {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 1.5rem;
  align-items: center;
  padding: 1.25rem 0.5rem;
  border-bottom: 1px solid var(--line);
  transition: background 0.2s ease, padding 0.2s ease;
  cursor: default;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
.film:hover { background: rgba(255, 255, 255, 0.02); padding-left: 1rem; }
.film-year  { font-family: var(--font-mono); font-size: 0.85rem; color: var(--teal); }
.film-title { font-family: var(--font-display); font-size: 1.12rem; font-weight: 600; letter-spacing: -0.01em; }
.film-note  { font-family: var(--font-mono); font-size: 0.8rem; color: var(--faint); }

.films-hint { display: none; }
@media (hover: none) {
  .film { cursor: pointer; }
  .films-hint {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--dim);
    margin: -1.75rem 0 1.5rem;
    opacity: 0.8;
  }
  .films-hint::before { content: '↳ '; color: var(--teal); }
}

/* whiplash — right-aligned video clip loops on hover */
.film-whiplash { position: relative; isolation: isolate; overflow: hidden; }
.film-whiplash > .film-year,
.film-whiplash > .film-title,
.film-whiplash > .film-note { position: relative; z-index: 1; }
.whiplash-clip {
  position: absolute;
  z-index: 2;
  top: 0; bottom: 0; right: 0;
  height: 100%; width: auto;
  object-fit: cover;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}
.film-whiplash:hover .whiplash-clip,
.film-whiplash:focus-within .whiplash-clip { opacity: 1; }
.films .film-whiplash:hover { background: #0d0803; }

/* matrix — rain scoped to the row, on hover only */
.film-matrix { position: relative; isolation: isolate; overflow: hidden; }
.film-matrix > .film-year,
.film-matrix > .film-title,
.film-matrix > .film-note { position: relative; z-index: 2; }
.matrix-row-canvas {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s ease;
}
.film-matrix:hover .matrix-row-canvas,
.film-matrix:focus-within .matrix-row-canvas { opacity: 0.8; }

/* interstellar — starfield bg + tiny clock; year ticks while hovered */
.films .film-interstellar:hover {
  background:
    radial-gradient(1px 1px at 8%  72%, rgba(255,255,255,0.85), transparent 60%),
    radial-gradient(1px 1px at 14% 28%, rgba(255,255,255,0.55), transparent 60%),
    radial-gradient(1.5px 1.5px at 22% 55%, rgba(255,255,255,1),    transparent 60%),
    radial-gradient(1px 1px at 31% 18%, rgba(255,255,255,0.65), transparent 60%),
    radial-gradient(1px 1px at 38% 80%, rgba(255,255,255,0.5),  transparent 60%),
    radial-gradient(2px 2px at 46% 42%, rgba(255,255,255,0.95), transparent 60%),
    radial-gradient(1px 1px at 53% 65%, rgba(255,255,255,0.6),  transparent 60%),
    radial-gradient(1px 1px at 61% 22%, rgba(255,255,255,0.8),  transparent 60%),
    radial-gradient(1.5px 1.5px at 69% 78%, rgba(255,255,255,0.9), transparent 60%),
    radial-gradient(1px 1px at 76% 38%, rgba(255,255,255,0.55), transparent 60%),
    radial-gradient(1px 1px at 83% 60%, rgba(255,255,255,0.7),  transparent 60%),
    radial-gradient(1px 1px at 91% 25%, rgba(255,255,255,0.8),  transparent 60%),
    radial-gradient(1px 1px at 96% 70%, rgba(255,255,255,0.5),  transparent 60%),
    #000;
}
.film-interstellar .tick-watch {
  display: inline-block;
  width: 0; height: 12px;
  border: 1px solid transparent;
  border-radius: 50%;
  position: relative;
  margin-left: 0;
  vertical-align: -2px;
  box-sizing: border-box;
  overflow: hidden;
  opacity: 0;
  transition: width 0.3s ease, margin-left 0.3s ease, border-color 0.3s ease, opacity 0.3s ease;
}
.film-interstellar .tick-watch::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 2px; height: 2px;
  background: var(--teal);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.film-interstellar .tick-watch::after {
  content: '';
  position: absolute;
  top: 1px; left: 50%;
  width: 1px; height: 4px;
  margin-left: -0.5px;
  background: var(--teal);
  transform-origin: 50% 100%;
}
.film-interstellar.is-ticking .tick-watch {
  width: 12px;
  margin-left: 7px;
  border-color: var(--teal);
  opacity: 1;
}
.film-interstellar.is-ticking .tick-watch::after { animation: clockSpin 0.9s linear infinite; }
.film-interstellar.is-reversing .tick-watch::after { animation: clockSpin 0.9s linear infinite reverse; }
@keyframes clockSpin { to { transform: rotate(360deg); } }

/* good will hunting — image fades in on hover */
.film-gwh { position: relative; isolation: isolate; overflow: hidden; }
.film-gwh > .film-year,
.film-gwh > .film-title,
.film-gwh > .film-note { position: relative; z-index: 2; }
.gwh-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url('goodwillbutton.jpg');
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 0.45s ease, transform 0.6s ease;
}
.film-gwh:hover .gwh-bg,
.film-gwh:focus-within .gwh-bg { opacity: 1; transform: scale(1); }
.film-gwh::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(to right, rgba(7,9,13,0.7) 0%, rgba(7,9,13,0.45) 45%, rgba(7,9,13,0.2) 100%);
  opacity: 0;
  transition: opacity 0.45s ease;
}
.film-gwh:hover::after,
.film-gwh:focus-within::after { opacity: 1; }

/* avengers: infinity war — flash, pause, disintegrate */
.film-snap {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  grid-template-columns: 80px 1fr auto auto;
}
.film-snap > .film-year,
.film-snap > .film-title,
.film-snap > .film-note { position: relative; z-index: 1; transition: opacity 0.7s ease; }
.film-snap.is-dusting > .film-year,
.film-snap.is-dusting > .film-title,
.film-snap.is-dusting > .film-note { transition: opacity 0s; opacity: 0; }
.snap-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; }
.snap-flash {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(to right, rgba(255,255,255,0.92) 0%, rgba(255,255,255,1) 50%, rgba(255,255,255,0.92) 100%);
  box-shadow: 0 0 24px 6px rgba(255, 255, 255, 0.55);
}
@keyframes snapFlash {
  0% { opacity: 0; } 35% { opacity: 1; } 65% { opacity: 0.85; } 100% { opacity: 0; }
}
.film-snap.is-flashing .snap-flash { animation: snapFlash 1.5s ease-in-out forwards; }
.film-action {
  position: relative;
  z-index: 5;
  background: transparent;
  border: 1px solid var(--line-2);
  color: var(--teal);
  font: 500 0.72rem var(--font-mono);
  letter-spacing: 0.04em;
  padding: 7px 11px;
  border-radius: 7px;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}
.film-action:hover { border-color: var(--teal); background: rgba(94, 234, 212, 0.06); transform: translateY(-1px); }
.film-snap.is-dusting > .film-action { transition: none; opacity: 1; }

/* ---------- lab ---------- */
.lab-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
  gap: 1rem;
}
.lab-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.lab-card:hover { border-color: var(--line-2); transform: translateY(-3px); }
.lab-art {
  aspect-ratio: 16 / 9;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, #0a1116, #0d1820);
}
.lab-body { padding: 1.25rem 1.4rem 1.5rem; }
.lab-card h3 {
  display: flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-display);
  font-size: 1.12rem; font-weight: 600;
  margin-bottom: 0.4rem;
}
.lab-card p { color: var(--dim); font-size: 0.9rem; }
.soon {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber);
  border: 1px solid rgba(252, 211, 77, 0.35);
  border-radius: 999px;
  padding: 0.12rem 0.5rem;
}

.lab-art--reaction { background: linear-gradient(135deg, #0d3027, #0a1116); }
.lab-dot {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 24px var(--teal-glow), 0 0 60px var(--teal-glow);
  animation: float 3s ease-in-out infinite;
}
@keyframes float { 0%, 100% { transform: translateY(-4px); } 50% { transform: translateY(4px); } }

.lab-art--memory {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 13%;
}
.lab-art--memory .cell { background: rgba(255,255,255,0.05); border-radius: 4px; animation: cellPulse 4s ease-in-out infinite; }
.lab-art--memory .cell:nth-child(1) { animation-delay: 0s; }
.lab-art--memory .cell:nth-child(2) { animation-delay: 0.3s; }
.lab-art--memory .cell:nth-child(5) { animation-delay: 0.6s; }
.lab-art--memory .cell:nth-child(9) { animation-delay: 0.9s; }
@keyframes cellPulse { 0%, 100% { background: rgba(255,255,255,0.05); } 50% { background: var(--teal-glow); } }

.lab-art--type { font-family: var(--font-mono); font-size: 1.1rem; color: var(--dim); }
.type-caret { display: inline-block; color: var(--teal); animation: blink 1s steps(1) infinite; }

/* ---------- about ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 3rem;
  align-items: start;
}
.about-copy p { color: var(--dim); margin-bottom: 1rem; font-size: 1.04rem; }
.about-copy p:last-child { margin-bottom: 0; }
.about-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.6rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}
.fact {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.62rem 0;
  border-bottom: 1px dashed var(--line);
}
.fact:last-child { border-bottom: 0; }
.fact span:first-child { color: var(--faint); }
.fact span:last-child { color: var(--text); text-align: right; }

/* ---------- contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}
.contact-lead { font-size: 1.15rem; color: var(--dim); max-width: 36ch; }
.contact-links { display: flex; flex-direction: column; }
.contact-link {
  display: grid;
  grid-template-columns: 70px 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 1.05rem 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  transition: padding 0.2s ease, color 0.2s ease;
}
.contact-link:hover { padding-left: 0.5rem; color: var(--teal); }
.contact-link:first-child { border-top: 1px solid var(--line); }
.contact-label { font-size: 0.76rem; color: var(--faint); }
.contact-value { font-size: 0.95rem; }
.contact-arrow { opacity: 0; transform: translate(-3px, 3px); transition: opacity 0.2s ease, transform 0.2s ease; }
.contact-link:hover .contact-arrow { opacity: 1; transform: translate(0, 0); }

/* ---------- footer ---------- */
.footer {
  position: relative;
  z-index: var(--z-content);
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 2rem var(--pad);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--faint);
}
.footer-mid { color: var(--dim); }
.footer-time { color: var(--teal); }

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ---------- modal ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: modalIn 0.18s ease-out;
}
.modal[hidden] { display: none; }
@keyframes modalIn { from { opacity: 0; } to { opacity: 1; } }
.modal-popup {
  position: relative;
  width: min(720px, 90vw);
  aspect-ratio: 16 / 9;
  max-height: 80vh;
  background: #000;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.08);
  animation: popupIn 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes popupIn { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: scale(1); } }
.modal-iframe { width: 100%; height: 100%; border: 0; background: #000; }
.modal-close {
  position: absolute;
  top: 10px; right: 10px;
  z-index: 2;
  width: 38px; height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  backdrop-filter: blur(6px);
  transition: background 0.15s ease, border-color 0.15s ease;
}
.modal-close:hover { background: rgba(255, 255, 255, 0.15); border-color: var(--teal); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 860px) {
  .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 2rem; }
  .section { padding: 4.5rem 0; }
}

@media (max-width: 680px) {
  .nav { gap: 1rem; }
  .status { display: none; }
  .hero { padding: 3rem 0 4rem; }
  .hero-stats { flex-wrap: wrap; gap: 1.5rem 2.5rem; }
  .film { grid-template-columns: 60px 1fr; }
  .film-snap { grid-template-columns: 60px 1fr; }
  .film-note { grid-column: 2; font-size: 0.74rem; }
  .film-action { grid-column: 2; justify-self: start; margin-top: 0.3rem; }
  .footer { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  /* keep every section reachable: scroll the nav instead of hiding links */
  .nav { gap: 0.75rem; }
  .nav-links {
    min-width: 0;
    flex-wrap: nowrap;
    overflow-x: auto;
    white-space: nowrap;
    gap: 1.1rem;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-links a { flex: 0 0 auto; }
}

@media (max-width: 768px) {
  .modal { padding: 0; }
  .modal-popup {
    width: 100vw; height: 100vh;
    max-height: none;
    aspect-ratio: auto;
    border-radius: 0;
  }
  .modal-close { width: 42px; height: 42px; top: 14px; right: 14px; font-size: 24px; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
  .marquee-track { animation: none; transform: none; }
}
