:root {
  --ink: #f4f1e8;
  --ink-2: #d6d3e6;
  --muted: #9a97b3;
  --box: rgba(12, 13, 30, 0.88);
  --edge: #10121f;
  --gold: #ffd166;
  --pink: #ff6fb5;
  --bg: #0d0d14;
  --pixel: 'Press Start 2P', ui-monospace, monospace;
  --body: 'Inter', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: var(--gold); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: #fff; }

#world {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100lvh;
  display: block;
  image-rendering: pixelated;
  z-index: 0;
  background: linear-gradient(#8fb8de, #6f9a52);
}
body.no-webgl #world { background: linear-gradient(160deg, #1a1036, #3b1450 45%, #0b201b); }
.scan {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,0.10) 0 1px, transparent 1px 3px);
  mix-blend-mode: multiply;
}

/* HUD */
.hud {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px 22px;
  font-family: var(--pixel);
  font-size: 12px;
  letter-spacing: 1px;
  text-shadow: 2px 2px 0 #000;
  pointer-events: none;
}
.hud a, .hud div { pointer-events: auto; }
.hud-name { color: var(--ink); text-decoration: none; font-size: 14px; }
.hud-label { color: var(--gold); }
.hud-year { margin-left: auto; font-size: 18px; color: var(--ink); }
.pips {
  position: fixed;
  right: 22px; top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  display: flex; flex-direction: column; gap: 8px;
}
.pips i { display: block; width: 10px; height: 10px; background: rgba(255,255,255,0.25); box-shadow: 2px 2px 0 #000; }
.pips i.on { background: var(--gold); }
.loading {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%);
  z-index: 6; font: 11px var(--pixel); color: var(--ink); text-shadow: 2px 2px 0 #000;
  transition: opacity .4s;
}
.loading.done { opacity: 0; pointer-events: none; }

/* story */
#story { position: relative; z-index: 2; }
.ch {
  min-height: 160vh;
  padding: 0 7vw;
  display: flex;
  align-items: flex-start;
}
.ch[data-side="right"] { justify-content: flex-end; }
.ch[data-side="left"] { justify-content: flex-start; }
.ch.end { min-height: 120vh; }
.card {
  position: sticky;
  top: 16vh;
  margin-top: 22vh;
  width: min(440px, 100%);
  background: var(--box);
  border: 4px solid var(--ink);
  box-shadow: 0 0 0 4px var(--edge), 10px 10px 0 4px rgba(0,0,0,0.35);
  padding: 22px 22px 20px;
  backdrop-filter: blur(2px);
}
#top .card { margin-top: 26vh; }
.yr { font: 10px/1.6 var(--pixel); color: var(--gold); letter-spacing: .5px; }
.card h1, .card h2, .feature h2 {
  font-family: var(--pixel);
  font-weight: 400;
  line-height: 1.45;
  margin: 12px 0 12px;
  text-shadow: 3px 3px 0 #000;
}
.card h1 { font-size: 26px; }
.card h2 { font-size: 16px; }
.card p { margin: 0 0 12px; color: var(--ink-2); }
.card p b { color: var(--ink); }
.lede { font-size: 18px; color: var(--ink) !important; }
.meta { font-size: 14px; }
.press {
  display: inline-block;
  margin-top: 6px;
  font: 11px var(--pixel);
  color: var(--gold);
  text-decoration: none;
  animation: blink 1.1s steps(2, start) infinite;
}
@keyframes blink { to { visibility: hidden; } }
.thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 4px; }
.thumbs.two { grid-template-columns: repeat(2, 1fr); }
.thumbs img, .clip {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
  border: 3px solid var(--ink);
  background: #000;
}
.clip { aspect-ratio: 2 / 1; margin-top: 10px; }
.clip.tall { aspect-ratio: 16 / 10; object-position: center 40%; }

/* more */
#more {
  position: relative;
  z-index: 3;
  background: var(--bg);
  border-top: 4px solid var(--ink);
  box-shadow: 0 -4px 0 var(--edge);
  padding: 72px 0 40px;
}
.wrap { width: min(1080px, 100% - 40px); margin: 0 auto; }
.feature {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 32px;
  align-items: center;
  border: 4px solid var(--ink);
  box-shadow: 0 0 0 4px var(--edge), 10px 10px 0 4px rgba(0,0,0,0.5);
  padding: 22px;
  background: linear-gradient(135deg, #1f1a10, #2b2212 60%, #3a2a12);
}
.feature-media video { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; display: block; border: 3px solid var(--ink); background: #000; }
.feature h2 { font-size: 22px; }
.feature p { color: var(--ink-2); max-width: 52ch; }
.btn {
  display: inline-block;
  margin-top: 8px;
  padding: 14px 18px;
  font: 12px var(--pixel);
  color: #111;
  background: var(--gold);
  text-decoration: none;
  box-shadow: 4px 4px 0 #000;
}
.btn:hover { color: #111; transform: translate(-1px, -1px); box-shadow: 5px 5px 0 #000; }
.sec { font: 14px/1.4 var(--pixel); font-weight: 400; color: var(--gold); margin: 64px 0 20px; }
.posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.post {
  display: flex; flex-direction: column;
  color: var(--ink);
  text-decoration: none;
  border: 3px solid #2c2b40;
  background: #141420;
  transition: border-color .15s, transform .15s;
}
.post:hover { border-color: var(--gold); transform: translateY(-2px); color: var(--ink); }
.post img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; }
.pd { font: 9px var(--pixel); color: var(--muted); padding: 12px 14px 0; }
.post p { margin: 8px 14px 10px; font-size: 15px; color: var(--ink-2); }
.ps { margin: auto 14px 12px; font-size: 13px; color: var(--gold); }
.list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.list li { color: var(--muted); font-size: 15px; }
.list a { margin-right: 8px; }
.links {
  display: flex; flex-wrap: wrap; gap: 22px; align-items: center;
  margin-top: 72px; padding-top: 24px;
  border-top: 2px solid #2c2b40;
  font: 11px var(--pixel);
}
.links a { color: var(--ink); text-decoration: none; }
.links a:hover { color: var(--gold); }
.links span { margin-left: auto; color: var(--muted); }

@media (max-width: 860px) {
  .posts { grid-template-columns: repeat(2, 1fr); }
  .feature { grid-template-columns: 1fr; }
  .feature-media video { aspect-ratio: 4 / 5; }
}
@media (max-width: 760px) {
  body { font-size: 15px; }
  .hud { padding: 12px 14px; gap: 12px; font-size: 10px; }
  .hud-name { font-size: 12px; }
  .hud-year { font-size: 14px; }
  .pips { display: none; }
  .ch { padding: 0 12px; min-height: 170vh; justify-content: center !important; }
  .card { top: auto; position: sticky; top: 48vh; top: 48svh; margin-top: 70vh; padding: 16px 16px 14px; border-width: 3px; }
  #top .card { margin-top: 52vh; }
  .card h1 { font-size: 20px; }
  .card h2 { font-size: 13px; }
  .lede { font-size: 16px; }
  .thumbs img { border-width: 2px; }
  .clip { display: none; }
  .posts { grid-template-columns: 1fr; }
  .links span { margin-left: 0; width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .press { animation: none; }
}
