@import url('https://fonts.googleapis.com/css2?family=Onest:wght@400;500;600;700&display=swap');

:root {
  color-scheme: light dark;
  --bg: #f5f5f7;
  --page: #ffffff;
  --surface: #ffffff;
  --surface-2: #f0f1f3;
  --surface-3: #e4e6ea;
  --fg: #1d1d1f;
  --text: #1d1d1f;
  --text2: #6e6e73;
  --muted: #86868b;
  --faint: #a1a1a6;
  --line: rgba(29, 29, 31, 0.12);
  --border: rgba(29, 29, 31, 0.12);
  --accent: #0066cc;
  --accent-2: #4d7fb8;
  --ok: #16815f;
  --warn: #b47416;
  --shadow: 0 18px 54px rgba(0, 0, 0, 0.08);
  --radius: 8px;
  --max: 1240px;
  --sans: Onest, "Helvetica Neue", Helvetica, Arial, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "SF Mono", SFMono-Regular, ui-monospace, Menlo, Consolas, monospace;
  --font-serif: "Iowan Old Style", "Palatino", "Palatino Linotype", "Times New Roman", serif;
  --panel: var(--surface);
  --panel-strong: var(--surface);
  --tile-bg: var(--surface);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #07101f;
    --page: #07101f;
    --surface: #0d1729;
    --surface-2: #13213a;
    --surface-3: #1b2c49;
    --fg: #eff5ff;
    --text: #eff5ff;
    --text2: #a3b1c8;
    --muted: #8b9ab5;
    --faint: #63718c;
    --line: rgba(239, 245, 255, 0.13);
    --border: rgba(239, 245, 255, 0.13);
    --accent: #83b7ff;
    --accent-2: #9ca8ff;
    --ok: #5ad1a5;
    --warn: #e5ba64;
    --shadow: 0 28px 90px rgba(0, 0, 0, 0.36);
  }
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  min-height: 100vh;
  background: linear-gradient(180deg, var(--page) 0%, var(--bg) 42%, var(--page) 100%);
  color: var(--fg);
  font-family: var(--sans);
  line-height: 1.6;
  letter-spacing: 0;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input { font: inherit; }

nav {
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: 68px;
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 22px;
  padding: 0 max(18px, calc((100vw - var(--max)) / 2));
  border-bottom: 1px solid color-mix(in srgb, var(--line), transparent 28%);
  background: color-mix(in srgb, var(--bg), transparent 6%);
  backdrop-filter: blur(18px);
}
.nav-logo {
  display: inline-grid;
  grid-template-columns: 34px auto;
  gap: 10px;
  align-items: center;
  color: var(--fg);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: 0;
}
.nav-logo::before {
  content: "MY";
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--fg);
  border-radius: 50%;
  color: var(--bg);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.5px;
}
@media (prefers-color-scheme: dark) {
  .nav-logo::before { filter: invert(1); }
}
.nav-links { display: flex; justify-content: flex-end; align-items: center; gap: 16px; flex-wrap: wrap; }
.nav-links a {
  color: var(--muted);
  font: 11px/1 var(--mono);
  text-transform: uppercase;
  padding: 8px 0;
}
.nav-links a:hover { color: var(--accent); }
.lang-picker {
  grid-column: 3;
  position: relative;
}
.lang-picker-btn {
  min-width: 46px;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font: 11px/1 var(--mono);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 0 10px;
}
.lang-picker-btn::before { content: attr(data-current); }
.lang-picker-btn::after  { content: "▾"; font-size: 8px; opacity: 0.6; }
.lang-picker-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  list-style: none;
  padding: 4px;
  min-width: 96px;
  z-index: 200;
}
.lang-picker.open .lang-picker-menu { display: block; }
.lang-picker-menu button {
  width: 100%;
  text-align: left;
  padding: 6px 10px;
  font: 11px/1.4 var(--mono);
  color: var(--muted);
  background: none;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
}
.lang-picker-menu button:hover { background: var(--surface-2); color: var(--fg); }
.lang-picker-menu button.active { color: var(--fg); font-weight: 600; }
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  grid-column: 3;
  padding: 12px;
  margin: -12px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.hamburger span { width: 24px; height: 1.5px; background: var(--fg); display: block; }

main { overflow: hidden; }
.hero {
  width: min(var(--max), calc(100vw - 36px));
  min-height: calc(60vh - 68px);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  margin: 0 auto;
  padding: 32px 0 0;
}
.hero-copy h1 {
  max-width: 1120px;
  color: var(--fg);
  font-family: var(--sans);
  font-size: clamp(56px, 10.8vw, 156px);
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: 0;
}
.hero-subtitle {
  max-width: 780px;
  margin-top: 32px;
  color: var(--muted);
  font-size: clamp(16px, 1.55vw, 20px);
  line-height: 1.75;
}
.hero-tagline {
  margin-top: 18px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: clamp(13px, 1.1vw, 15px);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0;
  animation: fade-slide-in 0.6s ease-out 0.5s forwards;
}
.eyebrow {
  display: block;
  margin: 0 0 18px;
  color: var(--accent);
  font: 11px/1 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.eyebrow::before { content: none; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 26px; }
.btn {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid color-mix(in srgb, var(--line), transparent 12%);
  border-radius: var(--radius);
  padding: 0 14px;
  background: var(--surface);
  color: var(--fg);
  font: 12px/1 var(--mono);
  text-transform: uppercase;
  transition: border-color .2s, color .2s, background .2s;
}
.btn.primary { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.btn:hover, .btn.ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn.primary:hover { background: var(--accent); color: #fff; }

.hero-console, .command-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface), transparent 2%);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.hero-console { min-height: 0; padding: 0; }
.console-header {
  min-height: 42px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 0 14px;
  color: var(--muted);
  font: 11px/1 var(--mono);
  text-transform: uppercase;
}
.system-map {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  height: auto;
  min-height: 0;
  gap: 0;
  margin: 0;
  padding: 18px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface-2), var(--surface) 22%);
}
.system-map::before, .system-map::after { content: none; }
.system-node, .system-node.primary {
  min-height: 64px;
  grid-column: auto;
  grid-row: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  padding: 0 14px;
  background: transparent;
  box-shadow: none;
  color: var(--muted);
  font: 12px/1 var(--mono);
  text-transform: uppercase;
}
.system-node:last-child { border-right: 0; }
.system-node::after { content: "↗"; color: var(--faint); font-size: 11px; }
.system-node:hover { color: var(--accent); border-color: var(--accent); background: transparent; transform: none; }
.console-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
}
.console-grid a {
  display: grid;
  align-content: center;
  gap: 8px;
  min-height: 128px;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  padding: 16px;
  background: var(--surface);
}
.console-grid a:last-child { border-right: 0; }
.console-grid strong {
  display: block;
  color: var(--fg);
  font-size: clamp(32px, 4.6vw, 58px);
  font-weight: 400;
  line-height: .98;
}
.console-grid small { color: var(--muted); font: 11px/1.45 var(--mono); text-transform: uppercase; }
.system-card { display: none; }

.section {
  width: min(var(--max), calc(100vw - 36px));
  margin: 0 auto;
  padding: 40px 0;
  border-top: 1px solid color-mix(in srgb, var(--line), transparent 20%);
}
.section-heading, .section-head {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  margin-bottom: 24px;
}
.section-heading .eyebrow, .section-head .eyebrow { grid-column: auto; margin: 0; }
.section-heading h2, .section-title, .split-section h2, .cta-band h2, .page-kernel h1, .journal-cover h1 {
  max-width: 920px;
  color: var(--fg);
  font-family: var(--sans);
  font-size: clamp(26px, 3.6vw, 46px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.01em;
}
.section-title::after { content: none; }
.section-copy, .section-heading p, .split-section p, .page-kernel p, .journal-cover p {
  max-width: 760px;
  color: var(--muted);
  line-height: 1.75;
}
.section-heading-solo {
  font-size: clamp(24px, 3.2vw, 40px);
  font-weight: 500;
  line-height: 1.08;
  color: var(--fg);
  margin-bottom: 12px;
}
.text-link {
  align-self: start;
  color: var(--accent);
  font: 12px/1 var(--mono);
  text-transform: uppercase;
  border-bottom: 1px solid currentColor;
  padding-bottom: 4px;
}

.info-grid, .route-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid color-mix(in srgb, var(--line), transparent 10%);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  gap: 0;
}
.info-grid a, .route-grid a, .craft-grid article, .matrix-card, .brief-card, .card {
  min-height: 230px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 18px;
  background: var(--surface);
  transition: color .2s, border-color .2s, background .2s;
}
.info-grid a:nth-child(4n), .route-grid a:nth-child(4n) { border-right: 0; }
.info-grid a:hover, .route-grid a:hover, .craft-grid article:hover, .matrix-card:hover, .brief-card:hover, .card:hover {
  color: var(--accent);
  background: color-mix(in srgb, var(--surface-2), var(--surface) 44%);
  transform: none;
}
.info-grid span, .route-grid span, .craft-grid span, .code, .matrix-card footer, .brief-card small {
  color: var(--accent);
  font: 11px/1 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.info-grid h3, .route-grid h3, .craft-grid h3, .matrix-card h3, .brief-card h3 {
  margin: 0;
  color: var(--fg);
  font-family: var(--sans);
  font-size: 24px;
  font-weight: 560;
  line-height: 1.14;
}
.info-grid p, .route-grid p, .craft-grid p, .matrix-card p, .brief-card p { color: var(--muted); font-size: 14px; line-height: 1.6; }

.panel-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 18px; }
.panel {
  border: 1px solid color-mix(in srgb, var(--line), transparent 10%);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}
.panel-head {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 0 14px;
  color: var(--muted);
  font: 11px/1 var(--mono);
  text-transform: uppercase;
}
.table { width: 100%; border-collapse: collapse; }
th, td { border-bottom: 1px solid var(--line); padding: 14px; text-align: left; vertical-align: top; }
th { color: var(--muted); background: var(--surface-2); font: 11px/1 var(--mono); text-transform: uppercase; }
td { font-size: 14px; }
tr:last-child td { border-bottom: 0; }
.mono { font-family: var(--mono); color: var(--muted); font-size: 12px; }
.link { color: var(--accent); font-family: var(--mono); font-size: 12px; text-transform: uppercase; }
.signal-list { display: grid; }
.signal {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  min-height: 68px;
  border-bottom: 1px solid var(--line);
  padding: 12px 14px;
}
.signal:last-child { border-bottom: 0; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); }
.dot.warn { background: var(--warn); }
.dot.accent { background: var(--accent); }
.signal strong { display: block; font-size: 14px; }
.signal span { color: var(--muted); font: 12px/1.45 var(--mono); }

.work-bento, .matrix, .brief, .craft-grid, .media-grid, .works-grid, .journal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.work-card, .work-list-card, .media-card, .journal-card, .featured-note {
  border: 1px solid color-mix(in srgb, var(--line), transparent 10%);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  transition: border-color .2s, background .2s;
}
.work-card:hover, .work-list-card:hover, .media-card:hover, .journal-card:hover, .featured-note:hover {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--surface-2), var(--surface) 44%);
}
.work-card { min-height: 260px; position: relative; }
.work-card.feature { grid-row: span 2; min-height: 540px; }
.work-card img { width: 100%; height: 100%; min-height: inherit; object-fit: cover; }
.work-card h3, .work-card.feature div {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  color: #fff;
  text-shadow: 0 12px 28px rgba(0,0,0,.7);
}
.work-card.feature h3 { position: static; font-size: clamp(34px, 4vw, 58px); font-weight: 400; }
.texture-card {
  position: static;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px;
  background: var(--surface-2);
}
.texture-card p { color: var(--fg); font-size: clamp(24px, 3vw, 40px); line-height: 1.12; }

.split-section, .brief { grid-template-columns: 1fr 1fr; }
.cta-band {
  width: min(var(--max), calc(100vw - 36px));
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 24px;
  margin: 40px auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  background: color-mix(in srgb, var(--fg), #1d4ed8 16%);
  color: var(--bg);
}
.cta-band h2 { color: var(--bg); }
.cta-band .eyebrow { color: color-mix(in srgb, var(--bg), transparent 18%); }
.cta-band .btn { background: transparent; border-color: color-mix(in srgb, var(--bg), transparent 70%); color: var(--bg); }

.page-kernel {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 28px;
  margin: 28px 0 28px;
}
.page-kernel .eyebrow { grid-row: span 2; margin: 0; }
.page-kernel.title-only {
  align-items: end;
}
.page-kernel.title-only .eyebrow {
  grid-row: auto;
}
.taxonomy-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  margin: 24px 0;
}
.taxonomy-strip div {
  min-height: 128px;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 16px;
  border-right: 1px solid var(--line);
}
.taxonomy-strip div:last-child { border-right: 0; }
.taxonomy-strip span, .taxonomy-strip small { color: var(--muted); font: 11px/1.45 var(--mono); text-transform: uppercase; }
.taxonomy-strip strong { font-size: clamp(26px, 4vw, 46px); font-weight: 400; line-height: 1; }
.data-toolbar {
  display: grid;
  grid-template-columns: 1fr minmax(260px, 420px);
  gap: 16px;
  align-items: center;
  margin: 24px 0;
  color: var(--muted);
}
.search-bar {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--fg);
  padding: 0 14px;
}
.filter-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 24px; }
.filter-pill {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  padding: 0 12px;
  font: 11px/1 var(--mono);
  text-transform: uppercase;
  cursor: pointer;
}
.filter-pill.active, .filter-pill:hover { background: var(--fg); color: var(--bg); border-color: var(--fg); }

.work-list-card { position: relative; display: grid; grid-template-columns: 112px 1fr; gap: 14px; padding: 14px; color: var(--fg); }
.work-cover { width: 112px; aspect-ratio: 1; object-fit: cover; border-radius: 6px; background: var(--surface-2); }
.work-placeholder { display: grid; place-items: center; color: var(--accent); font-family: var(--mono); }
.work-list-copy small, .work-list-copy p, .work-list-meta { color: var(--muted); font: 12px/1.45 var(--mono); }
.work-list-copy h3 { margin: 8px 0; font-size: 18px; line-height: 1.18; }
.work-list-meta { display: flex; justify-content: space-between; gap: 10px; margin-top: 14px; text-transform: uppercase; }
.atmos-work-copy h3 { margin: 0 0 7px; font-size: 20px; line-height: 1.12; }
.atmos-work-copy p { margin: 0 0 12px; color: var(--fg); font: 15px/1.25 var(--sans); }
.atmos-work-copy > small {
  display: block;
  margin-bottom: 5px;
  color: var(--faint);
  font: 11px/1.25 var(--mono);
  letter-spacing: 0;
  text-transform: uppercase;
}
.atmos-date-lines {
  display: grid;
  gap: 4px;
  color: var(--faint);
  font: 11px/1.25 var(--mono);
}
.work-badge { position: absolute; top: 10px; right: 10px; background: var(--fg); color: var(--bg); border-radius: 999px; padding: 5px 8px; font: 10px/1 var(--mono); }

.media-card { display: grid; grid-template-rows: auto 1fr; }
.media-thumb { position: relative; background: var(--surface-2); }
.media-thumb img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.media-thumb span { position: absolute; right: 10px; bottom: 10px; background: var(--fg); color: var(--bg); border-radius: 999px; padding: 6px 9px; font: 10px/1 var(--mono); text-transform: uppercase; }
.media-copy { padding: 14px; }
.media-copy small { color: var(--accent); font: 11px/1 var(--mono); text-transform: uppercase; }
.media-copy h3 { margin: 10px 0; font-size: 20px; line-height: 1.18; }
.media-copy p { color: var(--muted); font: 12px/1.45 var(--mono); word-break: break-all; }

.legacy-list { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.legacy-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) minmax(220px, .8fr);
  gap: 14px;
  align-items: center;
  min-height: 64px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}
.legacy-row:last-child { border-bottom: 0; }
.legacy-row span, .legacy-row small { color: var(--muted); font: 11px/1.45 var(--mono); text-transform: uppercase; }
.legacy-row small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-transform: none; }

.journal-cover, .journal-matrix, .journal-index, .journal-tools, .featured-journal, .journal-wall { border-top: 1px solid var(--line); }
.journal-card, .featured-note { padding: 18px; min-height: 220px; }
.post-body { color: var(--text2); line-height: 1.9; }
.post-body h1, .post-body h2, .post-body h3 { color: var(--fg); margin: 1.5em 0 .5em; }

footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: color-mix(in srgb, var(--bg), transparent 10%);
}
.footer-inner {
  width: min(var(--max), calc(100vw - 36px));
  min-height: 78px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin: 0 auto;
  font: 11px/1.5 var(--mono);
  text-transform: uppercase;
}
.footer-links { display: flex; gap: 16px; }
.footer-links a:hover { color: var(--accent); }


/* ===== Marquee animation (About section) ===== */
.marquee-wrap {
  width: calc(100% + 36px * 2);
  margin-left: -36px;
  overflow: hidden;
  background: var(--fg);
  color: var(--bg);
  padding: 12px 0;
  position: relative;
}
@media (min-width: 1240px) {
  .marquee-wrap { width: 100vw; margin-left: calc(-50vw + 50%); }
}
.marquee-track {
  display: flex;
  align-items: center;
  white-space: nowrap;
  animation: marquee-scroll 18s linear infinite;
  will-change: transform;
}
.marquee-wrap:hover .marquee-track { animation-play-state: paused; }
.marquee-item {
  display: inline-block;
  font-family: var(--sans);
  font-size: clamp(28px, 4vw, 52px);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--bg);
  margin: 0 20px;
}
.marquee-dot {
  display: inline-block;
  color: var(--bg);
  opacity: 0.5;
  font-size: clamp(14px, 2vw, 22px);
}
@keyframes marquee-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-33.333%); }
}


/* ===== About hero ===== */
.about-hero {
  margin-bottom: 16px;
}
.about-hero .eyebrow {
  margin-bottom: 12px;
}
.about-title {
  font-family: var(--sans);
  font-size: clamp(32px, 5vw, 64px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--fg);
}

/* ===== Eyebrow scroll reveal ===== */
.reveal-eyebrow {
  opacity: 0;
  transform: translateX(-18px);
  transition: opacity 0.5s ease-out, transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-eyebrow.visible {
  opacity: 1;
  transform: translateX(0);
}

/* ===== Game image placeholder ===== */
.game-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.game-img-placeholder span {
  font-family: var(--sans);
  font-size: 18px;
  font-weight: 600;
  color: rgba(255,255,255,0.2);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

/* ===== CTA card ===== */
#cta-final .section {
  padding-bottom: 0;
}
.cta-card {
  max-width: 520px;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 28px;
  background: var(--surface);
  text-align: center;
}
.cta-card .eyebrow {
  margin-bottom: 12px;
}
.cta-card h2 {
  font-family: var(--sans);
  font-size: clamp(28px, 3.6vw, 42px);
  font-weight: 500;
  line-height: 1.15;
  color: var(--fg);
  margin-bottom: 28px;
}
.cta-email-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 36px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: opacity .2s;
}
.cta-email-btn:hover {
  opacity: 0.85;
}
.cta-arrow {
  font-size: 1.2em;
  line-height: 1;
}

/* ===== Atmos visual grid ===== */
.atmos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}
.atmos-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  transition: transform .25s ease, box-shadow .25s ease;
}
.atmos-card:hover { transform: translateY(-4px); box-shadow: 0 12px 36px rgba(0,0,0,0.12); }
.atmos-card-img {
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--surface-2);
}
.atmos-card-img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .4s ease;
}
.atmos-card:hover .atmos-card-img img { transform: scale(1.05); }
.atmos-card-info {
  padding: 8px 10px;
  min-height: 46px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.atmos-card-info h3 {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 4px;
  color: var(--fg);
}
.atmos-card-info p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.3;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.atmos-mini-strip {
  text-align: center;
  padding: 6px 0 10px;
  color: var(--faint);
  font: 11px/1 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ===== Featured note card (Field Notes) ===== */
.featured-note-card {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  transition: box-shadow .25s ease;
}
.featured-note-card:hover { box-shadow: 0 8px 28px rgba(0,0,0,0.08); }
.note-card-visual {
  min-height: 100%;
  background-size: cover !important;
  background-position: center !important;
}
.note-card-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}
.note-card-body small {
  color: var(--accent);
  font: 11px/1 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.note-card-body h3 {
  font-size: clamp(18px, 2.2vw, 24px);
  font-weight: 560;
  line-height: 1.2;
  color: var(--fg);
}
.note-card-body p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  margin: 0;
}
.note-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  font: 11px/1 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 4px;
  transition: opacity .2s;
}
.note-card-cta:hover { opacity: 0.7; }

/* ===== Game grid with photos ===== */
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
}
.game-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  transition: transform .25s ease, box-shadow .25s ease;
}
.game-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,0.1); }
.game-card-img {
  width: 100%; aspect-ratio: 16/9; overflow: hidden; background: var(--surface-2);
}
.game-card-img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .4s ease;
}
.game-card:hover .game-card-img img { transform: scale(1.04); }
.game-card-body {
  padding: 10px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.game-card-body h3 {
  font-size: 13px;
  font-weight: 560;
  line-height: 1.25;
  color: var(--fg);
  margin: 0;
}
.game-cat {
  color: var(--accent);
  font: 9px/1 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

@media (max-width: 980px) {
  nav { grid-template-columns: auto 1fr auto auto; padding: 12px 18px; }
  .nav-links { display: none; grid-column: 1 / -1; justify-content: flex-start; }
  .nav-links.open { display: flex; padding-top: 10px; }
  .hamburger { display: flex; grid-column: 4; }
  .section-heading, .section-head, .page-kernel, .panel-grid, .split-section, .brief, .data-toolbar, .journal-hero { grid-template-columns: 1fr; }
  .page-kernel .eyebrow { grid-row: auto; }
  .info-grid, .route-grid, .taxonomy-strip, .console-grid, .work-bento, .matrix, .craft-grid, .media-grid, .works-grid, .journal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .system-map { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .system-node:nth-child(3n), .console-grid a:nth-child(2n), .taxonomy-strip div:nth-child(2n) { border-right: 0; }
  .legacy-row { grid-template-columns: 1fr; gap: 6px; }
}

@media (max-width: 620px) {
  .hero, .section, .cta-band, .footer-inner { width: min(100vw - 24px, var(--max)); }
  .hero { padding-top: 8px; padding-bottom: 8px; min-height: auto; }
  .scroll-hint { display: none; }
  .hero-copy h1 { font-size: clamp(48px, 18vw, 82px); }
  .atmos-grid { grid-template-columns: repeat(2, 1fr); }
  .game-grid { grid-template-columns: 1fr; }
  .featured-note-card { grid-template-columns: 1fr; }
  .note-card-visual { min-height: 100px; }
  .cta-card { padding: 32px 24px; }
  .info-grid, .route-grid, .taxonomy-strip, .console-grid, .work-bento, .matrix, .craft-grid, .media-grid, .works-grid, .journal-grid, .system-map { grid-template-columns: 1fr; }
  .system-map { padding: 0; }
  .system-node, .system-node.primary { min-height: 48px; border-right: 0; border-bottom: 1px solid var(--line); font-size: 10px; }
  .console-grid a, .taxonomy-strip div { border-right: 0; border-bottom: 1px solid var(--line); min-height: 96px; }
  .info-grid a, .route-grid a { border-right: 0; }
  .work-card.feature { min-height: 360px; }
  .work-list-card { grid-template-columns: 88px 1fr; }
  .work-cover { width: 88px; }
  .cta-band { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; align-items: flex-start; padding: 24px 0; }
  th:nth-child(3), td:nth-child(3) { display: none; }
}


/* Production polish */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.nav-links a[aria-current="page"] {
  color: var(--fg);
}

.site-status {
  width: min(var(--max), calc(100vw - 36px));
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
  margin: -24px auto 0;
  padding: 13px 0 30px;
  color: var(--muted);
  font: 11px/1.45 var(--mono);
  text-transform: uppercase;
}
.site-status p {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
}
.site-status span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.site-status span::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
}
.site-status a {
  color: var(--accent);
}

.feature-strip {
  width: min(var(--max), calc(100vw - 36px));
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, .42fr);
  gap: 18px;
  margin: 0 auto;
  padding: 0 0 76px;
}
.feature-row,
.queue-item,
.page-note {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.feature-row {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  min-height: 86px;
  padding: 14px;
  border-bottom: 0;
}
.feature-row:first-child {
  border-radius: var(--radius) var(--radius) 0 0;
}
.feature-row:last-child {
  border-bottom: 1px solid var(--line);
  border-radius: 0 0 var(--radius) var(--radius);
}
.feature-row + .feature-row {
  border-top-color: color-mix(in srgb, var(--line), transparent 30%);
}
.feature-row small,
.queue-item small,
.page-note small {
  color: var(--accent);
  font: 11px/1 var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.feature-row strong {
  display: block;
  color: var(--fg);
  font-size: 17px;
  font-weight: 560;
}
.feature-row p,
.queue-item p,
.page-note p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}
.feature-row a {
  color: var(--accent);
  font: 11px/1 var(--mono);
  text-transform: uppercase;
}
.queue-grid {
  display: grid;
  gap: 10px;
}
.queue-item {
  min-height: 116px;
  display: grid;
  align-content: space-between;
  gap: 18px;
  padding: 14px;
}
.queue-item strong {
  color: var(--fg);
  font-size: 20px;
  font-weight: 500;
}
.page-note {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  margin: 24px 0;
  padding: 14px;
}
.page-note .btn {
  min-width: 150px;
}
.toolbar-note {
  display: block;
  margin-top: 4px;
  color: var(--faint);
  font: 11px/1.45 var(--mono);
}
.search-bar::placeholder {
  color: var(--faint);
}
.media-card,
.work-list-card {
  min-width: 0;
}
.media-copy h3,
.work-list-copy h3,
.legacy-row strong {
  overflow-wrap: anywhere;
}

@media (max-width: 980px) {
  .site-status,
  .feature-strip,
  .page-note,
  .feature-row {
    grid-template-columns: 1fr;
  }
  .site-status {
    margin-top: 0;
    padding-bottom: 24px;
  }
  .feature-strip {
    padding-bottom: 56px;
  }
  .feature-row {
    align-items: start;
  }
}

@media (max-width: 620px) {
  .site-status,
  .feature-strip {
    width: min(100vw - 24px, var(--max));
  }
  .feature-row {
    min-height: 0;
  }
  .page-note .btn {
    width: 100%;
  }
}


/* Work Index year grouping */
.work-lanes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  margin: 24px 0;
}
.work-lanes a {
  min-height: 118px;
  display: grid;
  align-content: space-between;
  gap: 18px;
  padding: 16px;
  border-right: 1px solid var(--line);
}
.work-lanes a:last-child { border-right: 0; }
.work-lanes span,
.work-lanes small,
.year-head small,
.year-head strong,
.year-more {
  color: var(--muted);
  font: 11px/1.45 var(--mono);
  text-transform: uppercase;
}
.work-lanes strong {
  color: var(--fg);
  font-size: 20px;
  font-weight: 560;
}
.year-list {
  display: grid;
  gap: 18px;
  margin-top: 28px;
}
.year-group {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}
.year-head {
  width: 100%;
  min-height: 74px;
  display: grid;
  grid-template-columns: 150px 1fr auto;
  gap: 14px;
  align-items: center;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--fg);
  padding: 0 16px;
  text-align: left;
  cursor: pointer;
}
.year-head span {
  font-size: clamp(34px, 5vw, 58px);
  font-weight: 400;
  line-height: 1;
}
.year-head strong {
  color: var(--fg);
  font-size: 12px;
}
.year-grid {
  padding: 14px;
}
.year-more {
  width: calc(100% - 28px);
  min-height: 38px;
  margin: 0 14px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
}
.year-more:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.other-works-section {
  padding-top: 76px;
}
.credit-category-list {
  display: grid;
  gap: 14px;
}
.credit-category-group {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}
.credit-category-head {
  width: 100%;
  min-height: 84px;
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 18px;
  align-items: center;
  border: 0;
  background: var(--surface);
  color: var(--fg);
  padding: 0 18px;
  text-align: left;
  cursor: pointer;
  transition: background .2s, border-color .2s;
}
.credit-category-head:hover {
  background: var(--surface-2);
}
.credit-category-head span {
  color: var(--accent);
  font: 12px/1 var(--mono);
  letter-spacing: .08em;
}
.credit-category-head h3 {
  margin: 0;
  font-size: clamp(24px, 3vw, 38px);
  font-weight: 430;
  line-height: 1.08;
}
.credit-category-head small {
  color: var(--muted);
  font: 11px/1.45 var(--mono);
  text-transform: uppercase;
}
.credit-category-group.is-open .credit-category-head {
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.credit-grid {
  padding: 14px;
}
.credit-work-card {
  text-decoration: none;
}
.credit-work-card:not(a) {
  cursor: default;
}
.credit-work-copy h3 {
  margin: 0 0 6px;
  font-size: 18px;
  line-height: 1.16;
}
.credit-work-copy p {
  margin: 0;
  color: var(--fg);
  font: 14px/1.25 var(--sans);
}
.work-placeholder {
  border: 1px solid color-mix(in srgb, var(--line), transparent 20%);
}
.work-placeholder span {
  color: var(--accent);
  font-size: 24px;
}
.work-placeholder small {
  color: var(--muted);
}

@media (max-width: 980px) {
  .work-lanes,
  .year-head {
    grid-template-columns: 1fr;
  }
  .work-lanes a {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .work-lanes a:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 620px) {
  .year-grid {
    padding: 10px;
  }
  .year-head {
    padding: 14px;
  }
  .credit-category-head {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 8px;
    padding: 14px;
  }
}

/* ===== Journal / Field Notes ===== */

.journal-hero {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 40px;
  padding: 64px max(18px, calc((100vw - var(--max)) / 2)) 48px;
  align-items: end;
}
.journal-cover { max-width: 720px; }
.journal-cover h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 16px 0 14px;
  color: var(--fg);
}
.journal-cover p {
  color: var(--text2);
  font-size: 1.05rem;
  line-height: 1.7;
  max-width: 560px;
}
.journal-matrix {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 24px;
}
.journal-matrix span {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted);
  background: var(--surface);
}
.journal-index {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.journal-index > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.journal-index span {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  font-family: var(--mono);
}
.journal-index strong { font-size: 1.4rem; font-weight: 700; color: var(--fg); }
.journal-index small { font-size: 0.8rem; color: var(--text2); }

.journal-tools {
  padding-top: 0;
  padding-bottom: 0;
}
.journal-search { margin-top: 0; }

.featured-journal { padding-top: 40px; }
.featured-note {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: center;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: box-shadow 0.25s;
  cursor: pointer;
}
.featured-note:hover { box-shadow: var(--shadow); }
.featured-note-media {
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--surface-2);
  display: grid;
  place-items: center;
}
.featured-note-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.featured-note-media.no-image { background: var(--surface-2); }
.featured-note-copy { padding: 32px 32px 32px 0; }
.featured-note-copy span {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  font-family: var(--mono);
}
.featured-note-copy h2 {
  font-size: 1.4rem;
  font-weight: 600;
  line-height: 1.3;
  margin: 10px 0 8px;
  color: var(--fg);
}
.featured-note-copy p {
  font-size: 0.9rem;
  color: var(--text2);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.featured-note-copy small {
  display: block;
  margin-top: 12px;
  font-size: 0.8rem;
  color: var(--muted);
}

.journal-wall { padding-top: 24px; }
.section-heading.compact { margin-bottom: 28px; }

.journal-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: box-shadow 0.25s;
}
.journal-card:hover { box-shadow: var(--shadow); }
.journal-card.wide { grid-column: span 2; }
.journal-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px 0;
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  font-family: var(--mono);
}
.journal-card-top small {
  color: var(--muted);
  font-size: 0.6rem;
}
.journal-card > img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  margin: 12px 0 0;
  background: var(--surface-2);
}
.journal-card-copy { padding: 14px 18px 20px; }
.journal-card-copy h3 {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 6px;
  color: var(--fg);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.journal-card-copy p {
  font-size: 0.82rem;
  color: var(--text2);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.journal-card-copy small {
  display: block;
  margin-top: 10px;
  font-size: 0.75rem;
  color: var(--muted);
}

.note-module {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  padding: 12px;
  width: 80%;
}
.note-module span {
  height: 28px;
  border-radius: 3px;
  background: var(--surface-3);
  opacity: 0.5;
}
.mini-module {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  padding: 16px;
}
.mini-module i {
  height: 10px;
  border-radius: 2px;
  background: var(--surface-3);
  opacity: 0.35;
}
.mini-module i:nth-child(odd) { opacity: 0.55; }

@media (max-width: 900px) {
  .journal-hero { grid-template-columns: 1fr; gap: 24px; padding: 48px max(18px, calc((100vw - var(--max)) / 2)) 32px; }
  .featured-note { grid-template-columns: 1fr; }
  .featured-note-copy { padding: 0 24px 28px; }
  .journal-card.wide { grid-column: span 1; }
}

/* ===== Year Groups & Credit Categories (Atmos / Credit pages) ===== */

.year-head, .credit-category-head {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 16px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: opacity 0.2s;
}
.year-head:hover, .credit-category-head:hover { opacity: 0.7; }
.year-head span, .credit-category-head span {
  font-family: var(--mono);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent);
  min-width: 72px;
  padding-left: 14px;
}
.year-head strong, .credit-category-head h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--fg);
  flex: 1;
}
.credit-category-head h3 { font-size: 0.95rem; }
.year-head small, .credit-category-head small {
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
}

.year-more, .credit-more {
  display: block;
  width: 100%;
  padding: 12px 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--accent);
  text-align: center;
  letter-spacing: 0.05em;
  transition: opacity 0.2s;
}
.year-more:hover, .credit-more:hover { opacity: 0.65; }
.year-more::after, .credit-more::after {
  content: " \2192";
  display: inline;
}

.credit-category-list { margin-top: 32px; }
.credit-category-group { margin-bottom: 8px; }
.credit-category-group.is-open .credit-category-head { border-bottom-color: transparent; }
.credit-grid { display: grid; gap: 12px; margin-top: 12px; margin-bottom: 18px; }


/* ===== Hero redesign ===== */
.hero-title {
  display: block;
  font-weight: 700 !important;
  letter-spacing: -0.02em !important;
}
.hero-title .word {
  display: inline-block;
  opacity: 0;
  transform: translateY(1.2em) rotateX(10deg);
  animation: word-in 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: calc(0.08s * var(--i, 0));
}
.hero-eyebrow {
  opacity: 0;
  animation: fade-slide-in 0.6s ease-out 0.2s forwards;
}
.hero-fade {
  opacity: 0;
  animation: fade-slide-in 0.6s ease-out 0.5s forwards;
}
.hero-actions {
  opacity: 0;
  animation: fade-slide-in 0.6s ease-out 0.7s forwards;
}
@keyframes word-in {
  0% {
    opacity: 0;
    transform: translateY(1.5em) rotateX(15deg);
    clip-path: inset(0 0 100% 0);
  }
  100% {
    opacity: 1;
    transform: translateY(0) rotateX(0);
    clip-path: inset(0);
  }
}
@keyframes fade-slide-in {
  0% { opacity: 0; transform: translateY(18px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* ===== Scroll hint ===== */
.scroll-hint {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: 22px;
  height: 34px;
  border: 1.5px solid var(--muted);
  border-radius: 10px;
  opacity: 0.35;
  animation: fade-slide-in 0.8s ease-out 1.2s forwards;
}
.scroll-hint span {
  display: block;
  width: 3px;
  height: 7px;
  background: var(--muted);
  border-radius: 2px;
  margin: 6px auto 0;
  animation: scroll-bounce 2s ease-in-out infinite;
}
@keyframes scroll-bounce {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(8px); opacity: 0.3; }
}

/* ===== Section reveal ===== */
.reveal-section > * {
  opacity: 0;
  transform: translateY(80px);
  transition: opacity 1s ease, transform 1.1s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}
.reveal-section.visible > * {
  opacity: 1;
  transform: translateY(0);
}
/* Stagger children */
.reveal-section.visible > *:nth-child(1) { transition-delay: 0s; }
.reveal-section.visible > *:nth-child(2) { transition-delay: 0.14s; }
.reveal-section.visible > *:nth-child(3) { transition-delay: 0.28s; }
.reveal-section.visible > *:nth-child(4) { transition-delay: 0.42s; }
.reveal-section.visible > *:nth-child(5) { transition-delay: 0.56s; }
.reveal-section.visible > *:nth-child(6) { transition-delay: 0.70s; }
.reveal-section.visible > *:nth-child(7) { transition-delay: 0.84s; }
.reveal-section.visible > *:nth-child(8) { transition-delay: 0.98s; }
.reveal-section.visible > *:nth-child(9) { transition-delay: 1.12s; }
.reveal-section.visible > *:nth-child(10) { transition-delay: 1.26s; }

/* Heading clip reveal - text slides up from behind mask */
.reveal-heading {
  overflow: hidden;
  display: block;
}
.reveal-heading > .reveal-inner {
  display: block;
  transform: translateY(-110%);
  transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-section.visible .reveal-heading > .reveal-inner {
  transform: translateY(0);
}
.reveal-section.visible .reveal-heading:nth-child(1) > .reveal-inner { transition-delay: 0s; }
.reveal-section.visible .reveal-heading:nth-child(2) > .reveal-inner { transition-delay: 0.15s; }
.reveal-section.visible .reveal-heading:nth-child(3) > .reveal-inner { transition-delay: 0.3s; }

/* Card stagger */
.reveal-section .atmos-card,
.reveal-section .game-card,
.reveal-section .work-card {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.8s ease, transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-section.visible .atmos-card:nth-child(1),
.reveal-section.visible .game-card:nth-child(1),
.reveal-section.visible .work-card:nth-child(1) { opacity:1; transform:translateY(0); transition-delay: 0.15s; }
.reveal-section.visible .atmos-card:nth-child(2),
.reveal-section.visible .game-card:nth-child(2),
.reveal-section.visible .work-card:nth-child(2) { opacity:1; transform:translateY(0); transition-delay: 0.25s; }
.reveal-section.visible .atmos-card:nth-child(3),
.reveal-section.visible .game-card:nth-child(3),
.reveal-section.visible .work-card:nth-child(3) { opacity:1; transform:translateY(0); transition-delay: 0.35s; }
.reveal-section.visible .atmos-card:nth-child(4),
.reveal-section.visible .game-card:nth-child(4),
.reveal-section.visible .work-card:nth-child(4) { opacity:1; transform:translateY(0); transition-delay: 0.45s; }
.reveal-section.visible .atmos-card:nth-child(5),
.reveal-section.visible .game-card:nth-child(5),
.reveal-section.visible .work-card:nth-child(5) { opacity:1; transform:translateY(0); transition-delay: 0.55s; }
.reveal-section.visible .atmos-card:nth-child(6) { opacity:1; transform:translateY(0); transition-delay: 0.65s; }
.reveal-section.visible .atmos-card:nth-child(7) { opacity:1; transform:translateY(0); transition-delay: 0.75s; }

/* Static grid item stagger (about / contact / taxonomy) */
.reveal-section .craft-grid article,
.reveal-section .taxonomy-strip > div {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.8s ease, transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-section.visible .craft-grid article:nth-child(1),
.reveal-section.visible .taxonomy-strip > div:nth-child(1) { opacity:1; transform:translateY(0); transition-delay: 0.15s; }
.reveal-section.visible .craft-grid article:nth-child(2),
.reveal-section.visible .taxonomy-strip > div:nth-child(2) { opacity:1; transform:translateY(0); transition-delay: 0.25s; }
.reveal-section.visible .craft-grid article:nth-child(3),
.reveal-section.visible .taxonomy-strip > div:nth-child(3) { opacity:1; transform:translateY(0); transition-delay: 0.35s; }
.reveal-section.visible .craft-grid article:nth-child(4),
.reveal-section.visible .taxonomy-strip > div:nth-child(4) { opacity:1; transform:translateY(0); transition-delay: 0.45s; }
.reveal-section.visible .craft-grid article:nth-child(5) { opacity:1; transform:translateY(0); transition-delay: 0.55s; }
.reveal-section.visible .craft-grid article:nth-child(6) { opacity:1; transform:translateY(0); transition-delay: 0.65s; }

/* Dynamic card entrance — JS-rendered grids animate on insertion */
@keyframes card-enter {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}
.journal-card,
.featured-note,
.work-list-card,
.year-group,
.credit-category-group {
  animation: card-enter 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.journal-card:nth-child(2), .work-list-card:nth-child(2), .year-group:nth-child(2), .credit-category-group:nth-child(2) { animation-delay: 0.08s; }
.journal-card:nth-child(3), .work-list-card:nth-child(3), .year-group:nth-child(3), .credit-category-group:nth-child(3) { animation-delay: 0.16s; }
.journal-card:nth-child(4), .work-list-card:nth-child(4), .year-group:nth-child(4), .credit-category-group:nth-child(4) { animation-delay: 0.24s; }
.journal-card:nth-child(5), .work-list-card:nth-child(5), .year-group:nth-child(5), .credit-category-group:nth-child(5) { animation-delay: 0.32s; }
.journal-card:nth-child(6), .work-list-card:nth-child(6), .year-group:nth-child(6), .credit-category-group:nth-child(6) { animation-delay: 0.40s; }
.journal-card:nth-child(7), .work-list-card:nth-child(7), .year-group:nth-child(7), .credit-category-group:nth-child(7) { animation-delay: 0.48s; }
.journal-card:nth-child(8), .work-list-card:nth-child(8), .year-group:nth-child(8), .credit-category-group:nth-child(8) { animation-delay: 0.56s; }
.journal-card:nth-child(n+9), .work-list-card:nth-child(n+9), .year-group:nth-child(n+9), .credit-category-group:nth-child(n+9) { animation-delay: 0.64s; }

@media (prefers-reduced-motion: reduce) {
  .journal-card, .featured-note, .work-list-card, .year-group, .credit-category-group { animation: none; }
}

@keyframes card-in {
  0% { opacity: 0; transform: translateY(40px) scale(0.97); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* ===== Feature strip - full width ===== */
.feature-strip {
  width: min(var(--max), calc(100vw - 36px));
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0 0 24px;
}
.feature-row {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  min-height: 86px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--surface);
  transition: border-color .2s, background .2s;
}
.feature-row:first-child {
  border-radius: var(--radius) var(--radius) 0 0;
}
.feature-row:last-child {
  border-radius: 0 0 var(--radius) var(--radius);
  border-bottom: 1px solid var(--line);
}
.feature-row + .feature-row {
  border-top: 0;
}
.feature-row:hover {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--surface-2), var(--surface) 44%);
  z-index: 1;
}
.feature-row small {
  color: var(--accent);
  font: 11px/1 var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.feature-row strong {
  display: block;
  color: var(--fg);
  font-size: 17px;
  font-weight: 560;
}
.feature-row p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}
.feature-row > span {
  color: var(--accent);
  font: 11px/1 var(--mono);
  text-transform: uppercase;
  white-space: nowrap;
}

/* ===== Release list ===== */
.release-list {
  display: grid;
}
.release-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 60px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  transition: background .15s;
}
.release-row:last-child {
  border-bottom: 0;
}
.release-row:hover {
  background: color-mix(in srgb, var(--surface-2), var(--surface) 44%);
}
.release-row .yr {
  font-size: 12px;
}
.release-name {
  color: var(--fg);
  font-size: 15px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.release-row .role {
  display: none;
}
.release-row .link {
  font-size: 11px;
  white-space: nowrap;
}
@media (min-width: 800px) {
  .release-row {
    grid-template-columns: 52px minmax(0, 1fr) 200px auto;
  }
  .release-row .role {
    display: block;
    font-size: 11px;
    color: var(--muted);
  }
}

.panel-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 48px;
  border-top: 1px solid var(--line);
  color: var(--accent);
  font: 11px/1 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: background .15s;
}
.panel-cta:hover {
  background: color-mix(in srgb, var(--surface-2), var(--surface) 44%);
}

/* ===== Brief link ===== */
.brief-link {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 18px;
  padding: 14px 0 0;
  border-top: 1px solid var(--line);
  color: var(--accent);
  font: 11px/1 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.brief-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}


/* ===== Stats row (About section) ===== */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  margin-bottom: 18px;
}
.stat-card {
  display: grid;
  align-content: center;
  gap: 6px;
  min-height: 140px;
  padding: 18px;
  border-right: 1px solid var(--line);
  text-align: center;
}
.stat-card:last-child { border-right: 0; }
.stat-card strong {
  display: block;
  font-size: clamp(38px, 5vw, 60px);
  font-weight: 480;
  line-height: 1;
  color: var(--fg);
  letter-spacing: -0.03em;
}
.stat-card small {
  font: 11px/1.45 var(--mono);
  text-transform: uppercase;
  color: var(--muted);
}

/* ===== Section CTA ===== */
.section-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  font: 11px/1 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 12px 0 0;
  transition: opacity .2s;
}
.section-cta:hover { opacity: 0.7; }

/* ===== Credit showcase ===== */
.credit-showcase {
  display: grid;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}
.credit-feature {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  min-height: 54px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
  color: var(--fg);
  transition: background .15s;
}
.credit-feature:last-child { border-bottom: 0; }
.credit-feature:hover { background: color-mix(in srgb, var(--surface-2), var(--surface) 44%); }
.credit-artist {
  color: var(--muted);
  font-size: 12px;
  font-family: var(--mono);
}
.credit-cat {
  color: var(--accent);
  font: 10px/1 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: right;
}
@media (max-width: 720px) {
  .credit-feature {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .credit-cat { text-align: left; }
}

/* ===== Language default = English-first ===== */
/* All [data-zh] elements show English by default (setLang('en') on load) */

@media (max-width: 720px) {
  .stats-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .stat-card:nth-child(2n) {
    border-right: 0;
  }
  .stat-card:nth-child(3),
  .stat-card:nth-child(4) {
    border-bottom: 0;
  }
  .stat-card {
    min-height: 110px;
    border-bottom: 1px solid var(--line);
  }
}
@media (max-width: 480px) {
  .stats-row {
    grid-template-columns: 1fr;
  }
  .stat-card {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    min-height: 90px;
  }
  .stat-card:last-child {
    border-bottom: 0;
  }
}

/* ===== Block Drop Reveal ===== */
.ry-clip {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  line-height: inherit;
}
.ry-inner {
  display: inline-block;
}
@keyframes ry-block-drop {
  0%   { transform: translateY(0%); }
  28%  { transform: translateY(-115%); }
  32%  { transform: translateY(-115%); }
  100% { transform: translateY(0%); }
}
.ry-inner.ry-drop {
  animation: ry-block-drop 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
}
