/* ── Tokens, reset, background ─────────────────────────────────────── */
:root {
  color-scheme: dark;
  --bg: #09090b;
  --text: #f4f4f5;
  --muted: #a1a1aa;
  --faint: #71717a;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --glass: rgba(18, 18, 21, 0.55);
  --glass-hi: rgba(28, 28, 32, 0.62);
  --acc: #e4e4e7;
  --acc-2: #d4d4d8;
  --acc-glow: rgba(255, 255, 255, 0.12);
  --ok: #4ade80;
  --radius: 16px;
  --radius-sm: 10px;
  --sans: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'Cascadia Code', Consolas, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --page-w: 720px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
::selection { background: #e4e4e7; color: #09090b; }

.skip {
  position: fixed; left: 12px; top: -60px; z-index: 100;
  padding: 8px 14px; border-radius: 8px; background: var(--acc); color: #09090b; text-decoration: none;
}
.skip:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--acc-2); outline-offset: 3px; border-radius: 6px; }

/* Molten Metal canvas, fixed behind everything */
#bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: 0; transition: opacity 1.2s ease; }
body.ready #bg { opacity: 1; }
body.leaving #bg { opacity: 0.35; transition-duration: 0.3s; }
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.35s; }
.molten-metal-container { position: fixed; inset: 0; overflow: hidden; }
.molten-metal-canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.bg-fallback {
  background:
    radial-gradient(60% 50% at 70% 20%, rgba(255, 255, 255, 0.06), transparent 70%),
    radial-gradient(50% 40% at 15% 85%, rgba(255, 255, 255, 0.12), transparent 70%);
}
/* soft vignette so text stays readable over the metal */
body::before {
  content: ''; position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 40%, transparent 40%, rgba(9, 9, 11, 0.65) 100%),
    linear-gradient(90deg, rgba(9, 9, 11, 0.55), transparent 30%, transparent 70%, rgba(9, 9, 11, 0.35));
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
