@font-face {
  font-family: "NullHorizon";
  src: url("./NullHorizon.otf") format("opentype");
  font-display: swap;
}

@import url("https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@300;400;500;600&display=swap");

:root {
  --bg: #0a0a0b;
  --bg-elev: #111114;
  --bg-card: #0e0e11;
  --line: #1c1c21;
  --line-strong: #2a2a31;
  --text: rgba(230, 230, 235, 0.92);
  --text-dim: rgba(160, 160, 170, 0.75);
  --text-muted: rgba(120, 120, 130, 0.55);
  --text-faint: rgba(90, 90, 100, 0.35);
  --accent: oklch(0.68 0.18 35);
  --accent-soft: oklch(0.68 0.18 35 / 0.3);
  --accent-faint: oklch(0.68 0.18 35 / 0.08);

  --font-display: "NullHorizon", "JetBrains Mono", ui-monospace, monospace;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --frame-opacity: 1;
  --noise-opacity: 0.04;
  --anim-scale: 1;
  --font-scale: 1;
}

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

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: calc(14px * var(--font-scale));
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  position: relative;
  background-image:
    radial-gradient(circle at 20% 10%, rgba(255, 90, 50, 0.03), transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(60, 80, 120, 0.025), transparent 55%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.35 0'/></filter><rect width='120' height='120' filter='url(%23n)'/></svg>");
  opacity: var(--noise-opacity);
  pointer-events: none;
  z-index: 1;
  mix-blend-mode: overlay;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }

/* ========================================================================
   LAYOUT FRAME — the characteristic edge details
   ======================================================================== */

.frame {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10;
  opacity: var(--frame-opacity);
}

.frame .corner {
  position: absolute;
  width: 18px;
  height: 18px;
  border: 1px solid var(--line-strong);
}
.frame .corner.tl { top: 16px; left: 16px; border-right: none; border-bottom: none; }
.frame .corner.tr { top: 16px; right: 16px; border-left: none; border-bottom: none; }
.frame .corner.bl { bottom: 16px; left: 16px; border-right: none; border-top: none; }
.frame .corner.br { bottom: 16px; right: 16px; border-left: none; border-top: none; }

.frame .crop {
  position: absolute;
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
}
.frame .crop.tl { top: 22px; left: 44px; }
.frame .crop.tr { top: 22px; right: 44px; }
.frame .crop.bl { bottom: 22px; left: 44px; }
.frame .crop.br { bottom: 22px; right: 44px; }

/* Side ticks */
.frame .ticks {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.frame .ticks.left { left: 10px; }
.frame .ticks.right { right: 10px; }
.frame .ticks .tick {
  width: 6px;
  height: 1px;
  background: var(--line-strong);
}
.frame .ticks .tick.active { background: var(--accent); width: 10px; }

/* Bottom status bar */
.frame .status {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 24px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.15em;
  color: var(--text-faint);
}
.frame .status .dot {
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--text-faint);
}
.frame .status .dot.active { background: var(--accent); box-shadow: 0 0 6px var(--accent-soft); }
.frame .status .sep { width: 20px; height: 1px; background: var(--line-strong); }

/* Bottom-right HUD marker */
.frame .hud-mark {
  position: absolute;
  bottom: 14px;
  right: 40px;
  width: 80px;
  height: 40px;
  border: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
}
.frame .hud-mark > div { border: 1px solid var(--line); }
.frame .hud-mark > div:nth-child(1) { background: linear-gradient(135deg, transparent 40%, var(--line) 40% 41%, transparent 41%); }
.frame .hud-mark > div:nth-child(4) { background: linear-gradient(135deg, transparent 40%, var(--line) 40% 41%, transparent 41%); }

/* ========================================================================
   NAV
   ======================================================================== */

.shell {
  position: relative;
  z-index: 2;
  padding: 28px 56px;
  min-height: 100vh;
  max-width: 1600px;
  margin: 0 auto;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 40px;
}

.logo {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 0.35em;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 14px;
}
.logo .mark {
  width: 14px; height: 14px;
  border: 1px solid var(--text);
  position: relative;
}
.logo .mark::after {
  content: "";
  position: absolute;
  inset: 3px;
  border: 1px solid var(--accent);
}

.nav-center {
  display: flex;
  gap: 44px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.25em;
}
.nav-center a {
  color: var(--text-dim);
  position: relative;
  padding: 6px 2px;
  transition: color 0.2s;
}
.nav-center a:hover { color: var(--text); }
.nav-center a.active { color: var(--text); }
.nav-center a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 1px;
  background: var(--accent);
}
.nav-center a.active::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -11px;
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--accent);
  transform: translateX(-50%);
  box-shadow: 0 0 6px var(--accent-soft);
}

.nav-right {
  display: flex;
  gap: 8px;
}
.nav-right .sicon {
  width: 32px; height: 32px;
  border: 1px solid var(--line);
  display: grid; place-items: center;
  color: var(--text-dim);
  transition: all 0.2s;
}
.nav-right .sicon:hover {
  color: var(--accent);
  border-color: var(--accent-soft);
}
.nav-right .sicon svg { width: 13px; height: 13px; }

/* ========================================================================
   DEVLOG PAGE
   ======================================================================== */

.page-title {
  font-family: var(--font-display);
  font-size: 52px;
  letter-spacing: 0.28em;
  color: var(--text);
  margin-bottom: 16px;
}

.page-subtitle {
  color: var(--text-dim);
  font-size: 14px;
  max-width: 520px;
  line-height: 1.7;
  margin-bottom: 64px;
}

.layout {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 72px;
  align-items: start;
}

/* Cards */
.cards { display: flex; flex-direction: column; gap: 16px; width: 100%; }

.card {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 56px;
  padding: 24px;
  border: 1px solid var(--line);
  background: var(--bg-card);
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
  width: 100%;
  text-align: left;
}
.card:hover {
  border-color: var(--line-strong);
  background: #101014;
}
.card:hover .card-art::after {
  opacity: 1;
}
.card::before {
  content: "";
  position: absolute;
  top: -1px; left: -1px;
  width: 10px; height: 10px;
  border-top: 1px solid var(--accent);
  border-left: 1px solid var(--accent);
  opacity: 0;
  transition: opacity 0.3s;
}
.card:hover::before { opacity: 1; }

.card-art {
  position: relative;
  aspect-ratio: 16 / 10;
  background: #08080a;
  border: 1px solid var(--line);
  overflow: hidden;
  display: grid; place-items: center;
}
.card-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, var(--accent-faint), transparent 70%);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}
.card-art .art-corner {
  position: absolute;
  width: 10px; height: 10px;
  border-color: var(--text-faint);
}
.card-art .art-corner.tl { top: 6px; left: 6px; border-top: 1px solid; border-left: 1px solid; }
.card-art .art-corner.tr { top: 6px; right: 6px; border-top: 1px solid; border-right: 1px solid; }
.card-art .art-corner.bl { bottom: 6px; left: 6px; border-bottom: 1px solid; border-left: 1px solid; }
.card-art .art-corner.br { bottom: 6px; right: 6px; border-bottom: 1px solid; border-right: 1px solid; }
.card-art .art-label {
  position: absolute;
  bottom: 10px; left: 14px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--text-faint);
}
.card-art .art-id {
  position: absolute;
  top: 10px; right: 14px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--text-faint);
}
.card-art .art-content {
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: 0.3em;
  color: var(--text-dim);
  text-align: center;
}
.card-art .art-dashed {
  position: absolute;
  inset: 16px;
  border: 1px dashed rgba(255,255,255,0.06);
}

.card-body { padding: 10px 20px 10px 0; display: flex; flex-direction: column; justify-content: center; }

.card-date {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--text-muted);
  margin-bottom: 18px;
}
.card-date .ln { width: 24px; height: 1px; background: var(--accent); }

.card-num {
  font-family: var(--font-display);
  font-size: 26px;
  letter-spacing: 0.28em;
  color: var(--text);
  margin-bottom: 10px;
}
.card-title {
  font-family: var(--font-display);
  font-size: 16px;
  letter-spacing: 0.3em;
  color: var(--text-dim);
  margin-bottom: 22px;
}
.card-desc {
  color: var(--text-dim);
  font-size: 14px;
  max-width: 520px;
  line-height: 1.75;
  margin-bottom: 26px;
}
.card-cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.25em;
  color: var(--text-dim);
  align-self: flex-start;
  transition: color 0.2s, gap 0.2s;
}
.card:hover .card-cta { color: var(--accent); gap: 14px; }

/* ========================================================================
   RIGHT RAIL
   ======================================================================== */

.rail { display: flex; flex-direction: column; gap: 44px; padding-top: 6px; }

.rail h3 {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.28em;
  color: var(--text);
  font-weight: 500;
  margin-bottom: 22px;
}

.rail-list { display: flex; flex-direction: column; gap: 12px; }

.rail-item {
  display: flex; align-items: center; gap: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.22em;
  color: var(--text-dim);
  cursor: pointer;
  transition: color 0.2s;
  background: none;
  text-align: left;
  padding: 2px 0;
}
.rail-item:hover { color: var(--text); }
.rail-item .bullet {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--text-faint);
  transition: all 0.2s;
}
.rail-item.active { color: var(--text); }
.rail-item.active .bullet { background: var(--accent); box-shadow: 0 0 6px var(--accent-soft); }

/* Timeline specific */
.timeline-list { position: relative; }
.timeline-list::before {
  content: "";
  position: absolute;
  left: 4.5px;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: var(--line);
}
.timeline-item .bullet {
  background: var(--bg);
  border: 1px solid var(--text-faint);
  z-index: 1;
  width: 9px; height: 9px;
}
.timeline-item.active .bullet {
  border-color: var(--accent);
  background: var(--bg);
  position: relative;
}
.timeline-item.active .bullet::after {
  content: "";
  position: absolute;
  inset: 2px;
  background: var(--accent);
  border-radius: 50%;
}

/* ========================================================================
   FOOTER
   ======================================================================== */

.footer {
  margin-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--text-dim);
}

.footer-right {
  display: flex;
  align-items: center;
  gap: 18px;
}
.page-count {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--text);
}
.pagination {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  background: var(--bg-card);
  position: relative;
}
.pagination::before {
  content: "";
  position: absolute;
  top: -1px; left: -1px;
  width: 8px; height: 8px;
  border-top: 1px solid var(--accent);
  border-left: 1px solid var(--accent);
}
.page-dot {
  width: 22px; height: 4px;
  background: var(--line-strong);
  border: none;
  transition: background 0.2s, height 0.2s;
  cursor: pointer;
  position: relative;
}
.page-dot.active {
  background: var(--accent);
  height: 6px;
  box-shadow: 0 0 8px var(--accent-soft);
}
.page-dot:hover:not(.active) { background: var(--text-dim); }

/* ========================================================================
   LOADING OVERLAY
   ======================================================================== */

.loader {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 100;
  display: grid;
  place-items: center;
  transition: opacity 0.6s ease, visibility 0.6s;
}
.loader.gone { opacity: 0; visibility: hidden; }

.loader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.25em;
  color: var(--text-dim);
}

.loader-ring {
  width: 80px; height: 80px;
  border: 1px solid var(--line-strong);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1.2s linear infinite;
  position: relative;
}
.loader-ring::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px dashed var(--line);
  border-radius: 50%;
}
.loader-ring::after {
  content: "";
  position: absolute;
  inset: 32px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-soft);
}

@keyframes spin { to { transform: rotate(360deg); } }

.loader-logs {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: center;
}
.loader-logs .log {
  color: var(--text-faint);
}
.loader-logs .log.cur { color: var(--accent); }

.loader-progress {
  width: 200px; height: 1px;
  background: var(--line);
  position: relative;
  overflow: hidden;
}
.loader-progress .bar {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  background: var(--accent);
  width: 0;
  transition: width 0.2s;
}

/* ========================================================================
   PAGE TRANSITION (detail)
   ======================================================================== */

.page-enter {
  animation: pageIn calc(0.6s / var(--anim-scale)) ease both;
}
@keyframes pageIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.stagger > * {
  opacity: 0;
  animation: pageIn calc(0.6s / var(--anim-scale)) ease both;
}
.stagger > *:nth-child(1) { animation-delay: 0.05s; }
.stagger > *:nth-child(2) { animation-delay: 0.15s; }
.stagger > *:nth-child(3) { animation-delay: 0.25s; }
.stagger > *:nth-child(4) { animation-delay: 0.35s; }
.stagger > *:nth-child(5) { animation-delay: 0.45s; }
.stagger > *:nth-child(6) { animation-delay: 0.55s; }
.stagger > *:nth-child(7) { animation-delay: 0.65s; }
.stagger > *:nth-child(8) { animation-delay: 0.75s; }

/* ========================================================================
   LAYOUT VARIANTS (tweak)
   ======================================================================== */

body[data-layout="compact"] .card {
  grid-template-columns: 240px 1fr;
  gap: 36px;
  padding: 18px;
}
body[data-layout="compact"] .card-art { aspect-ratio: 16 / 9; }
body[data-layout="compact"] .card-desc { display: none; }

body[data-layout="wide"] .card {
  grid-template-columns: 420px 1fr;
  gap: 72px;
  padding: 28px;
}
body[data-layout="wide"] .card-art { aspect-ratio: 16 / 11; }

/* ========================================================================
   DETAIL PAGE
   ======================================================================== */

.detail {
  max-width: none;
  margin: 0;
  padding: 20px 0;
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 72px;
  align-items: start;
}
.detail-main {
  min-width: 0;
}
.detail-side {
  padding-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.25em;
  color: var(--text-dim);
  margin-bottom: 56px;
  transition: color 0.2s, gap 0.2s;
}
.back-link:hover { color: var(--accent); gap: 14px; }

.detail-meta {
  display: flex;
  gap: 20px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  margin-bottom: 24px;
  align-items: center;
}
.detail-meta .accent-dash { width: 24px; height: 1px; background: var(--accent); }

.detail-num {
  font-family: var(--font-display);
  font-size: 38px;
  letter-spacing: 0.28em;
  color: var(--text);
  margin-bottom: 10px;
}

.detail-title {
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: 0.3em;
  color: var(--text-dim);
  margin-bottom: 40px;
}

.detail-hero {
  aspect-ratio: 16 / 8;
  background: #08080a;
  border: 1px solid var(--line);
  position: relative;
  margin-bottom: 56px;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.detail-hero .art-corner {
  position: absolute;
  width: 14px; height: 14px;
  border-color: var(--text-faint);
}
.detail-hero .art-corner.tl { top: 10px; left: 10px; border-top: 1px solid; border-left: 1px solid; }
.detail-hero .art-corner.tr { top: 10px; right: 10px; border-top: 1px solid; border-right: 1px solid; }
.detail-hero .art-corner.bl { bottom: 10px; left: 10px; border-bottom: 1px solid; border-left: 1px solid; }
.detail-hero .art-corner.br { bottom: 10px; right: 10px; border-bottom: 1px solid; border-right: 1px solid; }
.detail-hero .art-content {
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: 0.35em;
  color: var(--text-dim);
}
.detail-hero .art-label {
  position: absolute;
  bottom: 14px; left: 18px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.25em;
  color: var(--text-faint);
}
.detail-hero .art-id {
  position: absolute;
  top: 14px; right: 18px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.25em;
  color: var(--text-faint);
}

.detail-body {
  display: flex;
  flex-direction: column;
  gap: 28px;
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.9;
  max-width: none;
}

.detail-body h2 {
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 0.28em;
  color: var(--text);
  margin-top: 24px;
  margin-bottom: -4px;
  font-weight: 400;
}

.detail-body p { color: var(--text-dim); }
.detail-body code {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  background: rgba(255, 90, 50, 0.06);
  padding: 2px 6px;
  border: 1px solid var(--accent-faint);
}

.detail-body .callout {
  border-left: 1px solid var(--accent);
  padding: 4px 0 4px 20px;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  line-height: 1.8;
}

.detail-body .speclist {
  border: 1px solid var(--line);
  padding: 20px 22px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
}
.detail-body .speclist .row {
  display: grid;
  grid-template-columns: 180px 1fr;
  padding: 8px 0;
  border-bottom: 1px dashed var(--line);
  color: var(--text-dim);
}
.detail-body .speclist .row:last-child { border-bottom: none; }
.detail-body .speclist .k { color: var(--text-faint); letter-spacing: 0.15em; }
.detail-body .speclist .v { color: var(--text); }

/* markdown-rendered elements (devlogs/*.md → posts.generated.js) */
.detail-body h3 {
  font-family: var(--font-display);
  font-size: 12.5px;
  letter-spacing: 0.24em;
  color: var(--text);
  margin-top: 16px;
  margin-bottom: -8px;
  font-weight: 400;
}
.detail-body a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--accent-faint);
}
.detail-body a:hover { border-bottom-color: var(--accent); }
.detail-body strong { color: var(--text); font-weight: 600; }
.detail-body em { font-style: italic; }
.detail-body ul, .detail-body ol {
  margin: 0;
  padding-left: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--text-dim);
}
.detail-body li { padding-left: 4px; }
.detail-body li::marker { color: var(--accent); }
.detail-body blockquote {
  margin: 0;
  border-left: 1px solid var(--accent);
  padding: 4px 0 4px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.detail-body blockquote p { color: var(--text); }
.detail-body pre {
  margin: 0;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  padding: 18px 20px;
  overflow-x: auto;
}
.detail-body pre code {
  display: block;
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--text-dim);
  background: none;
  border: none;
  padding: 0;
}
.detail-body hr { border: none; border-top: 1px solid var(--line); margin: 6px 0; }
.detail-body img { max-width: 100%; border: 1px solid var(--line); }

/* code block: title bar + copy button + (build-time) C++ syntax color */
.detail-body .codeblock {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}
.detail-body .cb-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
}
.detail-body .cb-lang { color: var(--text-faint); }
.detail-body .copy-btn {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--text-dim);
  background: none;
  border: 1px solid var(--line);
  padding: 4px 11px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.detail-body .copy-btn:hover { color: var(--text); border-color: var(--accent); }
.detail-body .copy-btn.copied { color: var(--accent); border-color: var(--accent); }
.detail-body .codeblock pre { border: none; background: none; margin: 0; }

.detail-body .tok-kw   { color: #ff7a5c; }
.detail-body .tok-type { color: #57b6c4; }
.detail-body .tok-fn   { color: #cdd6f4; }
.detail-body .tok-str  { color: #9ece6a; }
.detail-body .tok-num  { color: #e0af68; }
.detail-body .tok-pre  { color: #c4a7f0; }
.detail-body .tok-com  { color: var(--text-faint); font-style: italic; }

.detail-nav {
  margin-top: 80px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 40px;
}
.detail-nav .dn-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
  border: 1px solid var(--line);
  transition: border-color 0.2s;
  text-align: left;
}
.detail-nav .dn-item:hover { border-color: var(--accent-soft); }
.detail-nav .dn-item.next { text-align: right; }
.detail-nav .dn-item .label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.25em;
  color: var(--text-faint);
}
.detail-nav .dn-item .t {
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.25em;
  color: var(--text);
}
.detail-nav .dn-item .s {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--text-dim);
}

/* ========================================================================
   ABOUT PAGE
   ======================================================================== */

.about {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 100px;
  align-items: start;
  padding: 20px 0;
}

.about-eyebrow {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.3em;
  color: var(--text-faint);
  margin-bottom: 32px;
}
.accent-dash-inline {
  display: inline-block;
  width: 24px; height: 1px; background: var(--accent);
}

.about-intro .lead {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 0.1em;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: 36px;
}
.about-intro p {
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.9;
  margin-bottom: 18px;
  max-width: 480px;
}

.about-side { display: flex; flex-direction: column; gap: 0; padding-top: 32px; }

.spec-panel {
  border: 1px solid var(--line);
  background: var(--bg-card);
  position: relative;
  font-family: var(--font-mono);
}
.spec-panel::before {
  content: "";
  position: absolute;
  top: -1px; left: -1px;
  width: 12px; height: 12px;
  border-top: 1px solid var(--accent);
  border-left: 1px solid var(--accent);
}
.spec-panel::after {
  content: "";
  position: absolute;
  bottom: -1px; right: -1px;
  width: 12px; height: 12px;
  border-bottom: 1px solid var(--accent);
  border-right: 1px solid var(--accent);
}
.spec-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-display);
  letter-spacing: 0.35em;
  color: var(--text);
  font-size: 13px;
}
.spec-head .spec-id {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--text-faint);
}
.spec-rows {
  padding: 8px 20px;
}
.spec-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 11px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 12px;
  letter-spacing: 0.15em;
}
.spec-row:last-child { border-bottom: none; }
.spec-row .k { color: var(--text-dim); font-size: 12px; }
.spec-row .v { color: var(--text); text-align: right; font-size: 12px; }
.spec-divider {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 20px;
  background: rgba(255,255,255,0.015);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--text);
}
.spec-divider::before {
  content: "";
  width: 4px; height: 4px;
  background: var(--accent);
}

/* keyboard hints overlay */
.khint {
  position: fixed;
  bottom: 14px;
  left: 56px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  color: var(--text-faint);
  z-index: 20;
  display: flex;
  gap: 16px;
  pointer-events: none;
}
.khint kbd {
  font-family: var(--font-mono);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  padding: 2px 6px;
  margin-right: 4px;
  color: var(--text-dim);
  font-size: 9px;
}

.hidden { display: none !important; }

.empty-state {
  padding: 60px 20px;
  text-align: center;
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  border: 1px dashed var(--line);
}

@media (max-width: 1100px) {
  .layout { grid-template-columns: 1fr; }
  .detail { grid-template-columns: 1fr; gap: 40px; }
  .rail { flex-direction: row; flex-wrap: wrap; gap: 40px; }
  .about { grid-template-columns: 1fr; gap: 60px; }
}

@media (max-width: 720px) {
  .shell { padding: 20px 24px; }
  .nav-center { display: none; }
  .card { grid-template-columns: 1fr; gap: 16px; }
  .khint { display: none; }
}
