/* devtrotter ✦ styles
   one file, no build step. tokens first, then the page from top to bottom. */

/* ---------- fonts (served from /fonts) ---------- */
@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-display: swap;
  src: url(../fonts/bricolage-normal-200-800.woff2) format("woff2");
}
@font-face {
  font-family: "Instrument Serif";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/instrument-italic-400.woff2) format("woff2");
}
@font-face {
  font-family: "Instrument Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/instrument-normal-400.woff2) format("woff2");
}
@font-face {
  font-family: "Space Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/spacemono-normal-400.woff2) format("woff2");
}
@font-face {
  font-family: "Space Mono";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(../fonts/spacemono-normal-700.woff2) format("woff2");
}
@font-face {
  font-family: "Silkscreen";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/silkscreen-normal-400.woff2) format("woff2");
}

@property --a {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

/* ---------- tokens: night is the default ---------- */
:root {
  --bg: #0b0918;
  --bg-2: #131028;
  --bg-3: #1c1838;
  --ink: #f2edff;
  --ink-2: #cbc3e8;
  --muted: #8f87b3;
  --line: rgba(242, 237, 255, 0.11);
  --line-2: rgba(242, 237, 255, 0.24);
  --pink: #ff8ccf;
  --violet: #a393ff;
  --mint: #8ef3d1;
  --amber: #ffd08a;
  --sky: #8fd3ff;
  --paper: #efe8d8;
  --paper-ink: #1d1932;
  --glass: rgba(19, 16, 40, 0.62);
  --glow-1: rgba(163, 147, 255, 0.2);
  --glow-2: rgba(255, 140, 207, 0.12);
  --glow-3: rgba(142, 243, 209, 0.08);
  --shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.7);
  --iri: linear-gradient(100deg, #ff8ccf 0%, #ffd08a 22%, #8ef3d1 45%, #8fd3ff 65%, #a393ff 82%, #ff8ccf 100%);
  --grain-o: 0.07;
  --pad: clamp(16px, 4vw, 56px);
  --max: 1380px;
  --depth: 0;
  --sans: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --serif: "Instrument Serif", ui-serif, Georgia, serif;
  --mono: "Space Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --pixel: "Silkscreen", var(--mono);
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f4efe6;
    --bg-2: #ece5d8;
    --bg-3: #e2d9c8;
    --ink: #17132a;
    --ink-2: #3a3355;
    --muted: #6c6488;
    --line: rgba(23, 19, 42, 0.12);
    --line-2: rgba(23, 19, 42, 0.26);
    --pink: #d02d84;
    --violet: #5842d8;
    --mint: #0b8663;
    --amber: #b06500;
    --sky: #1c70b0;
    --paper: #fffcf4;
    --paper-ink: #1d1932;
    --glass: rgba(250, 246, 238, 0.7);
    --glow-1: rgba(88, 66, 216, 0.1);
    --glow-2: rgba(208, 45, 132, 0.08);
    --glow-3: rgba(11, 134, 99, 0.07);
    --shadow: 0 24px 50px -28px rgba(40, 30, 70, 0.45);
    --iri: linear-gradient(100deg, #d02d84 0%, #c26f00 22%, #0b8663 45%, #1c70b0 65%, #5842d8 82%, #d02d84 100%);
    --grain-o: 0.09;
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #f4efe6;
  --bg-2: #ece5d8;
  --bg-3: #e2d9c8;
  --ink: #17132a;
  --ink-2: #3a3355;
  --muted: #6c6488;
  --line: rgba(23, 19, 42, 0.12);
  --line-2: rgba(23, 19, 42, 0.26);
  --pink: #d02d84;
  --violet: #5842d8;
  --mint: #0b8663;
  --amber: #b06500;
  --sky: #1c70b0;
  --paper: #fffcf4;
  --paper-ink: #1d1932;
  --glass: rgba(250, 246, 238, 0.7);
  --glow-1: rgba(88, 66, 216, 0.1);
  --glow-2: rgba(208, 45, 132, 0.08);
  --glow-3: rgba(11, 134, 99, 0.07);
  --shadow: 0 24px 50px -28px rgba(40, 30, 70, 0.45);
  --iri: linear-gradient(100deg, #d02d84 0%, #c26f00 22%, #0b8663 45%, #1c70b0 65%, #5842d8 82%, #d02d84 100%);
  --grain-o: 0.09;
  color-scheme: light;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; overflow-x: clip; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  font-variation-settings: "wdth" 96;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  transition: background-color 0.5s ease, color 0.5s ease;
}
/* the sky gets darker the deeper you scroll (js sets --depth 0..1) */
body::before, body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
body::before {
  background:
    radial-gradient(1100px 720px at 82% -8%, var(--glow-1), transparent 62%),
    radial-gradient(900px 620px at -6% 8%, var(--glow-2), transparent 60%);
  opacity: calc(1 - var(--depth) * 0.85);
}
body::after {
  background:
    radial-gradient(900px 600px at 10% 110%, var(--glow-3), transparent 60%),
    radial-gradient(700px 500px at 95% 90%, var(--glow-1), transparent 60%);
  opacity: var(--depth);
}
::selection { background: var(--pink); color: var(--bg); }
img, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--pink); }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px dashed var(--mint); outline-offset: 3px; border-radius: 6px; }
kbd {
  font-family: var(--mono);
  font-size: 0.85em;
  padding: 1px 6px;
  border: 1px solid var(--line-2);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: var(--bg-2);
}
code { font-family: var(--mono); font-size: 0.9em; color: var(--mint); }
.mono { font-family: var(--mono); font-size: 12px; letter-spacing: 0.02em; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip {
  position: fixed; left: 12px; top: -60px; z-index: 200;
  background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: 99px;
  font-family: var(--mono); font-size: 12px; text-decoration: none;
}
.skip:focus { top: 12px; }

/* iridescent text: soap film on letters */
.iri {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  background: var(--iri);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: film 9s linear infinite;
  padding-right: 0.06em;
}
@keyframes film { to { background-position: -220% 0; } }

/* ---------- global layers ---------- */
#bubbles {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: 40; pointer-events: none;
}
.grain {
  position: fixed; inset: -50%; z-index: 45; pointer-events: none;
  opacity: var(--grain-o);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 1 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 1.2s steps(4) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-3%, 2%); }
  50% { transform: translate(2%, -3%); }
  75% { transform: translate(-2%, -1%); }
  100% { transform: translate(0, 0); }
}
.gridlines {
  position: fixed; inset: 0 var(--pad); z-index: 46; pointer-events: none;
  display: grid; grid-template-columns: repeat(12, 1fr); gap: 20px;
  opacity: 0; transition: opacity 0.3s;
}
.gridlines i { background: color-mix(in srgb, var(--pink) 9%, transparent); border-inline: 1px solid color-mix(in srgb, var(--pink) 30%, transparent); }
.gridlines i:nth-child(3) { transform: translateX(7px); }
.gridlines i:nth-child(7) { transform: translateX(-11px); }
.gridlines i:nth-child(10) { transform: translateX(5px) scaleX(1.08); }
.show-grid .gridlines { opacity: 1; }

.ring {
  position: fixed; left: 0; top: 0; z-index: 90; pointer-events: none;
  width: 30px; height: 30px; margin: -15px 0 0 -15px;
  border: 1px solid var(--ink); border-radius: 50%;
  opacity: 0;
  transition: width 0.25s, height 0.25s, margin 0.25s, opacity 0.3s, background-color 0.25s, border-color 0.25s;
  display: grid; place-items: center;
}
.ring.on { opacity: 0.55; }
.ring.hot {
  width: 64px; height: 64px; margin: -32px 0 0 -32px;
  opacity: 1; border-color: var(--pink);
  background: color-mix(in srgb, var(--pink) 12%, transparent);
}
.ring-label { font-family: var(--mono); font-size: 10px; color: var(--pink); white-space: nowrap; opacity: 0; transition: opacity 0.2s; }
.ring.hot .ring-label { opacity: 1; }
@media (hover: none), (pointer: coarse) { .ring { display: none; } }

/* ---------- header ---------- */
.top {
  position: fixed; inset: 0 0 auto 0; z-index: 60;
  display: flex; align-items: center; gap: 24px;
  padding: 14px var(--pad);
  transition: background-color 0.3s, border-color 0.3s, padding 0.3s;
  border-bottom: 1px solid transparent;
}
.top.scrolled {
  background: var(--glass);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  backdrop-filter: blur(14px) saturate(1.4);
  border-bottom-color: var(--line);
  padding-block: 10px;
}
.brand {
  font-weight: 750; font-size: 19px; letter-spacing: -0.03em; text-decoration: none;
  font-variation-settings: "wdth" 85;
  display: inline-flex; align-items: baseline; gap: 4px;
}
.brand-star { color: var(--pink); display: inline-block; transition: transform 0.6s cubic-bezier(.2, .9, .2, 1.4); }
.brand:hover .brand-star { transform: rotate(180deg) scale(1.3); }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a {
  font-family: var(--mono); font-size: 12px; text-decoration: none;
  padding: 6px 10px; border-radius: 99px; color: var(--ink-2);
  transition: color 0.2s, background-color 0.2s;
}
.nav a:hover { color: var(--ink); background: var(--line); }
.nav a.here { color: var(--bg); background: var(--ink); }
.controls { display: flex; gap: 6px; }
.ctl {
  height: 34px; min-width: 34px; padding: 0 10px;
  border: 1px solid var(--line-2); border-radius: 99px; background: transparent;
  display: inline-grid; place-items: center; cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s, transform 0.2s;
}
.ctl:hover { border-color: var(--ink); background: var(--line); }
.ctl:active { transform: scale(0.94); }
.ctl-bubble {
  width: 16px; height: 16px; border-radius: 50%; position: relative;
  background: radial-gradient(circle at 34% 30%, rgba(255, 255, 255, 0.95) 0 14%, transparent 16%),
              radial-gradient(circle, transparent 52%, rgba(255, 255, 255, 0.08) 60%),
              conic-gradient(from 30deg, #ff8ccf, #ffd08a, #8ef3d1, #8fd3ff, #a393ff, #ff8ccf);
  -webkit-mask: radial-gradient(circle, rgba(0, 0, 0, 0.25) 55%, #000 62%);
  mask: radial-gradient(circle, rgba(0, 0, 0, 0.25) 55%, #000 62%);
  transition: filter 0.3s, transform 0.3s;
}
.ctl[aria-pressed="false"] .ctl-bubble { filter: grayscale(1) opacity(0.45); transform: scale(0.8); }
.ctl-theme {
  width: 15px; height: 15px; border-radius: 50%;
  border: 1.5px solid var(--ink);
  background: linear-gradient(90deg, var(--ink) 50%, transparent 50%);
  transition: transform 0.6s cubic-bezier(.2, .9, .2, 1.2);
}
[data-theme="light"] .ctl-theme { transform: rotate(180deg); }
.ctl-menu { display: none; font-family: var(--mono); font-size: 12px; }

.menu {
  position: fixed; inset: 0; z-index: 55;
  background: var(--glass);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  display: grid; align-content: center; padding: 80px var(--pad) 40px;
}
.menu[hidden] { display: none; }
.menu nav { display: grid; gap: 6px; }
.menu a {
  font-size: clamp(36px, 11vw, 64px); font-weight: 700; letter-spacing: -0.04em; line-height: 1.05;
  text-decoration: none; display: flex; align-items: baseline; gap: 14px;
  font-variation-settings: "wdth" 82;
}
.menu a .mono { color: var(--pink); }

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  padding: 104px var(--pad) 28px;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: auto auto 1fr auto;
  column-gap: 20px;
  isolation: isolate;
}
#soap { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.hero-fallback {
  display: none; position: absolute; z-index: -1;
  right: 8%; top: 18%; width: min(46vw, 560px); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 33% 28%, rgba(255, 255, 255, 0.5) 0 4%, transparent 9%),
              radial-gradient(circle, transparent 58%, rgba(143, 211, 255, 0.25) 68%, rgba(255, 140, 207, 0.35) 72%, transparent 74%);
}
.no-webgl .hero-fallback { display: block; }
.hero-meta { grid-column: 1 / -1; color: var(--muted); margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }
.blink { color: var(--mint); animation: blink 2.2s steps(2) infinite; font-size: 9px; }
@keyframes blink { 50% { opacity: 0.15; } }

.wordmark {
  grid-column: 1 / -1;
  margin: 0 0 0 -0.045em;
  font-size: clamp(66px, 17.2vw, 300px);
  line-height: 0.8;
  font-weight: 700;
  letter-spacing: -0.055em;
  white-space: nowrap;
  user-select: none;
}
.wm-row { display: inline-flex; align-items: flex-end; }
.l {
  --w: 640; --wd: 80; --ty: 0px; --rot: 0deg;
  display: inline-block;
  font-variation-settings: "wght" var(--w), "wdth" var(--wd), "opsz" 96;
  transform: translateY(var(--ty)) rotate(var(--rot));
  transition: font-variation-settings 0.35s cubic-bezier(.2, .8, .2, 1), transform 0.35s cubic-bezier(.2, .8, .2, 1), color 0.3s;
  will-change: transform;
}
.l:nth-child(3n) { color: var(--ink); }
.wm-star {
  font-size: 0.34em; color: var(--pink); margin: 0 0 0.62em 0.12em;
  display: inline-block; animation: spin 14s linear infinite;
  text-shadow: 0 0 30px color-mix(in srgb, var(--pink) 60%, transparent);
}
@keyframes spin { to { transform: rotate(360deg); } }

.hero-copy { grid-column: 1 / span 7; align-self: start; margin-top: clamp(22px, 3.2vw, 44px); max-width: 720px; }
.bio {
  font-size: clamp(24px, 2.9vw, 42px);
  line-height: 1.12; letter-spacing: -0.025em; font-weight: 450; margin: 0;
  font-variation-settings: "wdth" 90, "opsz" 48;
  text-wrap: balance;
}
.bio .iri { font-size: 1.12em; }
.bio-fr { margin: 14px 0 0; color: var(--muted); font-family: var(--serif); font-style: italic; font-size: 19px; }
.bio-fr .mono {
  font-style: normal; font-size: 10px; border: 1px solid var(--line-2); border-radius: 4px;
  padding: 1px 5px; margin-right: 8px; vertical-align: 3px; color: var(--ink-2);
}

.exploring { margin-top: clamp(22px, 3vw, 38px); }
.exploring .label { margin: 0 0 12px; color: var(--ink-2); }
.arrow { display: inline-block; animation: nudge 1.6s ease-in-out infinite; color: var(--pink); }
@keyframes nudge { 50% { transform: translateX(5px); } }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 8px; }
.chip {
  --c: var(--pink);
  cursor: pointer;
  font-size: 16px; font-weight: 500; letter-spacing: -0.01em;
  padding: 8px 16px 9px;
  border-radius: 99px;
  border: 1px solid color-mix(in srgb, var(--c) 55%, transparent);
  background: color-mix(in srgb, var(--c) 8%, transparent);
  transform: rotate(var(--r, 0deg));
  transition: transform 0.35s cubic-bezier(.2, .9, .2, 1.5), background-color 0.2s, color 0.2s, box-shadow 0.3s;
}
.chip:hover { transform: rotate(0deg) translateY(-3px) scale(1.04); background: color-mix(in srgb, var(--c) 18%, transparent); }
.chip[aria-pressed="true"] { background: var(--c); color: var(--bg); box-shadow: 0 10px 30px -10px var(--c); }
.c1 { --c: var(--pink); --r: -2deg; }
.c2 { --c: var(--violet); --r: 1.5deg; }
.c3 { --c: var(--mint); --r: -1deg; }
.c4 { --c: var(--sky); --r: 2deg; }
.c5 { --c: var(--amber); --r: -1.5deg; }
.chip-note {
  margin: 14px 0 0; min-height: 3.2em; max-width: 560px;
  font-family: var(--serif); font-style: italic; font-size: 20px; line-height: 1.3; color: var(--ink-2);
}

.specimen-label {
  grid-column: 9 / span 4; grid-row: 3; align-self: end; justify-self: end;
  width: min(100%, 340px);
  background: var(--paper); color: var(--paper-ink);
  padding: 22px 20px 16px;
  border-radius: 3px;
  transform: rotate(2.2deg);
  box-shadow: var(--shadow), 0 1px 0 rgba(0, 0, 0, 0.05);
  position: relative;
  font-family: var(--mono); font-size: 11.5px; line-height: 1.45;
  transition: transform 0.5s cubic-bezier(.2, .9, .2, 1.3);
  margin-bottom: 30px;
}
.specimen-label:hover { transform: rotate(-0.5deg) translateY(-4px); }
.specimen-label::before {
  content: ""; position: absolute; top: -12px; left: 50%; width: 90px; height: 24px;
  transform: translateX(-50%) rotate(-3deg);
  background: color-mix(in srgb, var(--pink) 32%, rgba(255, 255, 255, 0.5));
  opacity: 0.8;
  mix-blend-mode: multiply;
}
.sl-title {
  margin: 0 0 12px; font-family: var(--sans); font-size: 22px; font-weight: 700; letter-spacing: -0.02em;
  font-variation-settings: "wdth" 85;
  border-bottom: 1.5px solid var(--paper-ink); padding-bottom: 8px;
}
.sl-title span { font-family: var(--serif); font-style: italic; font-weight: 400; }
.specimen-label dl { margin: 0; display: grid; gap: 5px; }
.specimen-label dl > div { display: grid; grid-template-columns: 82px 1fr; gap: 8px; align-items: baseline; }
.specimen-label dt { opacity: 0.55; position: relative; overflow: hidden; white-space: nowrap; }
.specimen-label dt::after { content: " ....................."; opacity: 0.6; }
.specimen-label dd { margin: 0; }
.pulse {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #0b8663; margin-right: 6px;
  box-shadow: 0 0 0 0 rgba(11, 134, 99, 0.5); animation: pulse 2s infinite;
}
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(11, 134, 99, 0); } 100% { box-shadow: 0 0 0 0 rgba(11, 134, 99, 0); } }
.sl-foot { margin: 12px 0 0; padding-top: 8px; border-top: 1px dashed rgba(29, 25, 50, 0.3); font-size: 10px; opacity: 0.6; }

.field { grid-column: 1 / span 8; grid-row: 4; align-self: end; margin: 0; color: var(--muted); }
.field b { color: var(--ink); font-weight: 400; }
.field .sep { opacity: 0.5; margin: 0 4px; }
.dive {
  grid-column: 9 / span 4; grid-row: 4; justify-self: end; align-self: end;
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--mono); font-size: 12px; text-decoration: none; color: var(--ink-2);
}
.dive-bubble {
  width: 26px; height: 40px; border: 1px solid var(--line-2); border-radius: 99px; position: relative;
}
.dive-bubble::after {
  content: ""; position: absolute; left: 50%; bottom: 6px; width: 8px; height: 8px; margin-left: -4px; border-radius: 50%;
  border: 1px solid var(--sky);
  animation: rise 2.2s ease-in infinite;
}
@keyframes rise {
  0% { transform: translateY(0) scale(0.6); opacity: 0; }
  20% { opacity: 1; }
  100% { transform: translateY(-22px) scale(1.1); opacity: 0; }
}

/* ---------- marquee ---------- */
.marquee {
  border-block: 1px solid var(--line);
  overflow: hidden; white-space: nowrap;
  padding: 16px 0;
  font-size: clamp(22px, 3vw, 36px); font-weight: 600; letter-spacing: -0.03em;
  font-variation-settings: "wdth" 80;
  color: var(--ink-2);
  transform: rotate(-1.2deg);
  margin: 10px -20px 0;
  background: var(--bg);
}
.marquee-track { display: inline-flex; animation: marquee 38s linear infinite; }
.marquee-track span { padding-right: 0.3em; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- sections ---------- */
.sec { position: relative; max-width: var(--max); margin: 0 auto; padding: clamp(90px, 12vw, 180px) var(--pad) 0; }
.sec-head { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 20px; margin-bottom: clamp(36px, 5vw, 64px); align-items: end; }
.sec-num { grid-column: 1 / -1; color: var(--pink); margin-bottom: 12px; }
.sec-head h2 {
  grid-column: 1 / span 9; margin: 0;
  font-size: clamp(46px, 8.2vw, 118px); line-height: 0.88; font-weight: 700; letter-spacing: -0.05em;
  font-variation-settings: "wdth" 80, "opsz" 96;
  text-wrap: balance;
}
.sec-sub { grid-column: 10 / span 3; margin: 0; color: var(--ink-2); font-size: 16px; max-width: 360px; justify-self: end; padding-bottom: 6px; }
.amp { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--pink); padding: 0 0.08em; }
/* the imperfect grid: each section head sits a little differently */
.finds .sec-head h2 { grid-column: 2 / span 8; }
.archive .sec-head h2 { grid-column: 4 / span 9; text-align: right; }
.archive .sec-head .sec-num { text-align: right; }
.archive .sec-sub { grid-column: 1 / span 3; grid-row: 2; justify-self: start; }
.onchain .sec-head h2 { grid-column: 1 / span 8; }
.notes .sec-head h2 { grid-column: 3 / span 10; }
.notes .sec-sub { grid-column: 3 / span 6; justify-self: start; margin-top: 18px; max-width: 520px; }

/* reveal on scroll (only when js is running) */
.js .reveal { opacity: 0; transform: translateY(28px) rotate(var(--tilt, 0deg)); transition: opacity 0.8s cubic-bezier(.2, .7, .2, 1), transform 0.8s cubic-bezier(.2, .7, .2, 1); }
.js .reveal.in { opacity: 1; transform: rotate(var(--tilt, 0deg)); }

/* ---------- 01 rabbit holes ---------- */
.holes-grid {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 28px 24px; align-items: start;
}
.hole {
  position: relative; overflow: hidden;
  background: color-mix(in srgb, var(--bg-2) 88%, transparent);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 26px 26px 20px;
  --tilt: 0deg;
  transition: border-color 0.3s, transform 0.5s cubic-bezier(.2, .9, .2, 1.2), box-shadow 0.4s;
}
.hole:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
.h1 { grid-column: 1 / span 7; --tilt: -0.6deg; }
.h2 { grid-column: 8 / span 5; margin-top: 90px; --tilt: 0.8deg; border-radius: 6px; }
.h3 { grid-column: 2 / span 5; margin-top: -30px; --tilt: 0.4deg; border-radius: 40px 6px 40px 6px; }
.h4 { grid-column: 7 / span 6; margin-top: 30px; --tilt: -0.5deg; }
.h5 { grid-column: 1 / span 6; --tilt: 0.5deg; border-radius: 6px; }
.h6 { grid-column: 7 / span 5; margin-top: 70px; --tilt: -0.8deg; border-radius: 6px 40px 6px 40px; }
.hole-top { display: flex; justify-content: space-between; margin: 0 0 18px; color: var(--muted); padding-right: 100px; }
.hole h3 {
  margin: 0 0 18px; max-width: 16ch;
  font-size: clamp(30px, 3.3vw, 46px); line-height: 0.98; font-weight: 650; letter-spacing: -0.035em;
  font-variation-settings: "wdth" 84, "opsz" 72;
}
.h1 h3 { font-size: clamp(34px, 4.2vw, 60px); }
.tunnel { position: absolute; top: 18px; right: 18px; width: 88px; height: 88px; }
.tunnel i {
  position: absolute; inset: 0; border: 1px solid var(--line-2); border-radius: 30%;
  transform: scale(calc(1 - var(--k) * 0.18));
}
.tunnel i:nth-child(1) { --k: 0; }
.tunnel i:nth-child(2) { --k: 1; }
.tunnel i:nth-child(3) { --k: 2; }
.tunnel i:nth-child(4) { --k: 3; }
.tunnel i:nth-child(5) { --k: 4; background: var(--pink); border-color: var(--pink); transform: scale(0.1); border-radius: 50%; }
.hole:hover .tunnel i { animation: tunnel 1.8s linear infinite; animation-delay: calc(var(--k) * -0.36s); }
.hole:hover .tunnel i:nth-child(5) { animation: none; }
@keyframes tunnel {
  0% { transform: scale(1.25) rotate(0deg); opacity: 0; }
  20% { opacity: 1; }
  100% { transform: scale(0.08) rotate(45deg); opacity: 0.2; }
}
.trail { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 4px; align-items: center; }
.trail li {
  font-family: var(--mono); font-size: 11px; padding: 3px 9px; border-radius: 99px;
  border: 1px solid var(--line-2); color: var(--ink-2); background: var(--bg);
}
.trail li + li::before { content: "→"; margin: 0 6px 0 -2px; color: var(--pink); display: inline-block; }
.trail li:last-child { border-color: var(--pink); color: var(--ink); }
.depth { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; color: var(--muted); }
.meter {
  --v: 20; height: 6px; width: calc(var(--v) * 4px); max-width: 45%; border-radius: 99px;
  background: var(--iri); background-size: 300% 100%; animation: film 6s linear infinite;
}
.ended { margin: 0 0 10px; font-size: 16px; color: var(--ink-2); }
.ended .mono { color: var(--muted); margin-right: 6px; }
.stayed {
  margin: 0 0 14px; font-family: var(--serif); font-style: italic; font-size: 22px; line-height: 1.25; color: var(--ink);
  padding-left: 14px; border-left: 2px solid var(--violet);
}
.steps summary {
  cursor: pointer; list-style: none; font-family: var(--mono); font-size: 12px;
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 99px;
  border: 1px dashed var(--line-2); color: var(--ink-2); transition: border-color 0.2s, color 0.2s;
}
.steps summary::-webkit-details-marker { display: none; }
.steps summary::after { content: "↓"; transition: transform 0.3s; }
.steps[open] summary::after { transform: rotate(180deg); }
.steps summary:hover { border-color: var(--pink); color: var(--ink); }
.steps ol { margin: 16px 0 4px; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 10px; }
.steps li {
  counter-increment: s; position: relative; padding-left: 34px; font-size: 15px; color: var(--ink-2);
  animation: step-in 0.5s both; animation-delay: calc(var(--i, 0) * 70ms);
}
.steps li::before {
  content: counter(s, decimal-leading-zero); position: absolute; left: 0; top: 2px;
  font-family: var(--mono); font-size: 11px; color: var(--pink);
}
.steps li a { color: var(--ink); font-weight: 600; margin-right: 4px; }
@keyframes step-in { from { opacity: 0; transform: translateX(-8px); } }

/* ---------- 02 found & made ---------- */
.finds-cols { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; align-items: start; }
.win {
  border: 1px solid var(--line-2); border-radius: 14px; overflow: hidden;
  background: color-mix(in srgb, var(--bg-2) 92%, transparent);
  box-shadow: var(--shadow);
}
.found { grid-column: 1 / span 7; }
.win-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 12px; border-bottom: 1px solid var(--line-2);
  background: repeating-linear-gradient(180deg, var(--line) 0 1px, transparent 1px 4px);
}
.win-title { background: var(--bg-2); padding: 0 10px; border-radius: 4px; }
.win-btns { display: inline-flex; gap: 6px; }
.win-btns i { width: 11px; height: 11px; border-radius: 50%; border: 1px solid var(--line-2); }
.win-btns i:nth-child(1) { background: var(--pink); border-color: transparent; }
.win-btns i:nth-child(2) { background: var(--amber); border-color: transparent; }
.win-btns i:nth-child(3) { background: var(--mint); border-color: transparent; }
.filters { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px; align-items: center; border-bottom: 1px solid var(--line); }
.filter {
  cursor: pointer; font-family: var(--mono); font-size: 12px; padding: 5px 12px; border-radius: 99px;
  border: 1px solid var(--line-2); background: transparent; color: var(--ink-2);
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.filter:hover { border-color: var(--ink); color: var(--ink); }
.filter.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.count { margin-left: auto; color: var(--muted); }
.finds-list {
  list-style: none; margin: 0; padding: 6px; max-height: 720px; overflow: auto;
  scrollbar-width: thin; scrollbar-color: var(--line-2) transparent;
}
.finds-list li { animation: step-in 0.35s both; }
.finds-list li.hide { display: none; }
.finds-list a {
  display: grid; grid-template-columns: 14px minmax(140px, 0.8fr) 1.6fr; gap: 14px; align-items: baseline;
  padding: 11px 12px; border-radius: 10px; text-decoration: none;
  transition: background-color 0.2s, transform 0.2s;
}
.finds-list a:hover { background: var(--line); transform: translateX(4px); }
.fav { width: 12px; height: 12px; border-radius: 3px; background: var(--fav, var(--pink)); align-self: center; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25); }
.dom { font-family: var(--mono); font-size: 13px; color: var(--ink); overflow-wrap: anywhere; }
.why { font-size: 15px; color: var(--ink-2); line-height: 1.4; }

.made { grid-column: 8 / span 5; display: grid; gap: 18px; }
.toy {
  border: 1px dashed var(--line-2); border-radius: 18px; padding: 20px;
  background: color-mix(in srgb, var(--bg) 60%, transparent);
  transition: border-color 0.3s;
}
.toy:hover { border-color: var(--pink); }
.toy-head { margin: 0 0 6px; display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--ink); }
.toy-head span { background: var(--pink); color: var(--bg); padding: 1px 7px; border-radius: 4px; font-size: 10px; }
.toy-sub { margin: 0 0 14px; font-size: 14.5px; color: var(--ink-2); line-height: 1.45; }
.toy-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tbtn {
  cursor: pointer; font-family: var(--mono); font-size: 12px; text-decoration: none;
  padding: 7px 13px; border-radius: 99px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--ink);
  transition: border-color 0.2s, background-color 0.2s, transform 0.2s, color 0.2s;
  display: inline-flex; align-items: center; gap: 6px;
}
.tbtn:hover { border-color: var(--ink); }
.tbtn:active { transform: scale(0.95); }
.tbtn.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.tbtn.big { padding: 11px 18px; font-size: 13px; background: var(--ink); color: var(--bg); border-color: var(--ink); }
.tbtn.big:hover { background: var(--pink); border-color: var(--pink); }
.tbtn.go { border-color: var(--mint); color: var(--mint); }
.tbtn.blow { margin-left: auto; border-color: var(--pink); color: var(--pink); }
.glyph {
  margin: 0 0 14px; font-family: var(--mono); font-size: 13px; line-height: 1.02; letter-spacing: 0.32em;
  text-align: center; padding: 14px 0;
  background: var(--iri); background-size: 100% 260%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: film-v 10s linear infinite;
  overflow: hidden;
}
@keyframes film-v { to { background-position: 0 -260%; } }
.glyph-label { flex: 1; text-align: center; color: var(--muted); font-size: 11px; }
.slot {
  height: 64px; border-radius: 12px; border: 1px solid var(--line-2); margin: 10px 0 14px;
  display: grid; place-items: center; overflow: hidden; position: relative;
  background: repeating-linear-gradient(0deg, transparent 0 3px, var(--line) 3px 4px), var(--bg);
}
.slot::before, .slot::after { content: ""; position: absolute; left: 0; right: 0; height: 18px; z-index: 1; pointer-events: none; }
.slot::before { top: 0; background: linear-gradient(var(--bg), transparent); }
.slot::after { bottom: 0; background: linear-gradient(transparent, var(--bg)); }
.slot-text { font-size: 17px; color: var(--ink); }
.slot.rolling .slot-text { filter: blur(0.6px); color: var(--pink); }
.range { display: grid; grid-template-columns: 64px 1fr; align-items: center; gap: 10px; margin: 0 0 10px; }
.range .mono { color: var(--muted); }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; background: transparent; cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track { height: 2px; background: var(--line-2); border-radius: 2px; }
input[type="range"]::-moz-range-track { height: 2px; background: var(--line-2); border-radius: 2px; }
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 18px; height: 18px; margin-top: -8px; border-radius: 50%; border: 0;
  background: radial-gradient(circle at 34% 30%, #fff 0 14%, transparent 18%), conic-gradient(#ff8ccf, #ffd08a, #8ef3d1, #8fd3ff, #a393ff, #ff8ccf);
  box-shadow: 0 0 0 3px var(--bg);
}
input[type="range"]::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%; border: 0;
  background: radial-gradient(circle at 34% 30%, #fff 0 14%, transparent 18%), conic-gradient(#ff8ccf, #ffd08a, #8ef3d1, #8fd3ff, #a393ff, #ff8ccf);
}
.palettes { margin-top: 6px; }
.btn-input {
  flex: 1; min-width: 0; font-size: 13px; padding: 8px 12px; border-radius: 10px;
  border: 1px solid var(--line-2); background: var(--bg); color: var(--ink);
}
.btn-input:focus { outline: none; border-color: var(--pink); }
#btn-canvas { width: 176px; height: 62px; image-rendering: pixelated; border-radius: 2px; }
.toy-button .toy-row + .toy-row { margin-top: 10px; }

/* ---------- 03 archive ---------- */
.archive-grid {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 22px; align-items: start;
}
.spec { margin: 0; --rx: 0deg; --ry: 0deg; perspective: 900px; }
.spec-frame {
  position: relative; padding: 10px; border-radius: 6px;
  background: var(--bg-2); border: 1px solid var(--line);
  transform: rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform 0.25s ease-out, box-shadow 0.3s, border-color 0.3s;
  cursor: crosshair;
}
.spec:hover .spec-frame { box-shadow: var(--shadow); border-color: var(--line-2); }
.spec canvas { width: 100%; height: 100%; border-radius: 2px; background: var(--bg); }
.spec-frame::after {
  content: "click to reseed"; position: absolute; left: 20px; bottom: 20px;
  font-family: var(--mono); font-size: 10px; color: #fff; background: rgba(12, 10, 26, 0.72);
  padding: 3px 8px; border-radius: 99px; opacity: 0; transition: opacity 0.2s; pointer-events: none;
}
.spec:hover .spec-frame::after { opacity: 1; }
.spec figcaption { display: flex; gap: 10px; align-items: baseline; margin-top: 10px; color: var(--muted); flex-wrap: wrap; }
.spec figcaption > .mono:first-child { color: var(--ink-2); }
.seed { opacity: 0.7; }
.save { margin-left: auto; cursor: pointer; background: none; border: 0; padding: 0; color: var(--pink); text-decoration: underline; text-underline-offset: 3px; }
.sp1 { grid-column: 1 / span 5; }
.sp1 .spec-frame { aspect-ratio: 4 / 5; }
.sp2 { grid-column: 6 / span 4; margin-top: 70px; }
.sp2 .spec-frame { aspect-ratio: 1; }
.sp3 { grid-column: 10 / span 3; margin-top: 10px; }
.sp3 .spec-frame { aspect-ratio: 3 / 4; }
.sp4 { grid-column: 6 / span 3; margin-top: -40px; }
.sp4 .spec-frame { aspect-ratio: 1; }
.sp5 { grid-column: 9 / span 4; margin-top: 10px; }
.sp5 .spec-frame { aspect-ratio: 1; border-radius: 50% 50% 6px 6px; }
.sp6 { grid-column: 1 / span 5; margin-top: 20px; }
.sp6 .spec-frame { aspect-ratio: 3 / 2; }
.sp7 { grid-column: 6 / span 3; margin-top: 30px; }
.sp7 .spec-frame { aspect-ratio: 2 / 3; }
.sp8 { grid-column: 9 / span 4; margin-top: -10px; }
.sp8 .spec-frame { aspect-ratio: 5 / 4; }
.sp9 { grid-column: 2 / span 4; margin-top: -20px; }
.sp9 .spec-frame { aspect-ratio: 1; }
.sp5 canvas { border-radius: 50% 50% 2px 2px; }

/* ---------- 04 onchain ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 18px; }
.card {
  --a: 0deg;
  position: relative; padding: 22px 22px 20px; border-radius: 18px;
  border: 1px solid transparent;
  background:
    linear-gradient(var(--bg-2), var(--bg-2)) padding-box,
    conic-gradient(from var(--a), var(--line-2), var(--line), var(--line-2)) border-box;
  transition: transform 0.4s cubic-bezier(.2, .9, .2, 1.3);
}
.card:nth-child(4n + 2) { translate: 0 26px; }
.card:nth-child(4n + 4) { translate: 0 -12px; }
.card:hover {
  background:
    linear-gradient(var(--bg-2), var(--bg-2)) padding-box,
    conic-gradient(from var(--a), #ff8ccf, #ffd08a, #8ef3d1, #8fd3ff, #a393ff, #ff8ccf) border-box;
  animation: spin-border 3s linear infinite;
}
@keyframes spin-border { to { --a: 360deg; } }
.card-top { display: flex; justify-content: space-between; margin: 0 0 20px; color: var(--muted); }
.card-top span:first-child { color: var(--pink); }
.card h3 {
  margin: 0 0 14px; font-size: 32px; line-height: 1; font-weight: 650; letter-spacing: -0.035em;
  font-variation-settings: "wdth" 84;
}
.yes { margin: 0 0 14px; font-size: 15.5px; line-height: 1.45; }
.hmm { margin: 0; font-family: var(--serif); font-style: italic; font-size: 19px; line-height: 1.3; color: var(--ink-2); }
.yes .mono, .hmm .mono { display: block; font-style: normal; font-size: 10.5px; color: var(--muted); margin-bottom: 3px; }
.hmm .mono { color: var(--amber); }

/* ---------- 05 notes ---------- */
.note-filters { border: 0; padding: 0; margin-bottom: 40px; }
.notes-list {
  list-style: none; margin: 0; padding: 0; position: relative;
  display: grid; grid-template-columns: 1fr 1fr; gap: 0 64px;
}
.notes-list::before {
  content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 1px;
  background: linear-gradient(var(--line-2), var(--line) 80%, transparent);
}
.note {
  position: relative; padding: 18px 0 30px; max-width: 520px;
  animation: step-in 0.4s both;
}
.note:nth-child(odd) { justify-self: end; text-align: right; }
.note:nth-child(even) { margin-top: 70px; }
.note::before {
  content: ""; position: absolute; top: 26px; width: 11px; height: 11px; border-radius: 50%;
  border: 1px solid var(--pink); background: var(--bg);
}
.note:nth-child(odd)::before { right: -38px; }
.note:nth-child(even)::before { left: -38px; }
.note:hover::before { background: var(--pink); box-shadow: 0 0 18px var(--pink); }
.note time { font-size: 22px; font-family: var(--sans); font-weight: 650; letter-spacing: -0.02em; color: var(--ink); font-variation-settings: "wdth" 80; }
.note-tag { margin: 2px 0 8px; color: var(--pink); font-size: 11px; }
.note p:last-child { margin: 0; font-size: 19px; line-height: 1.45; color: var(--ink-2); text-wrap: pretty; }
.note.hide { display: none; }
.notes-list.filtered { grid-template-columns: 1fr; }
.notes-list.filtered::before { left: 0; }
.notes-list.filtered .note { justify-self: start; text-align: left; margin-top: 0; padding-left: 34px; }
.notes-list.filtered .note::before { left: -5px; right: auto; }

/* ---------- 06 about ---------- */
.about-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; align-items: center; }
.portrait { grid-column: 1 / span 5; margin: 0; }
.portrait canvas { width: 100%; aspect-ratio: 1; }
.portrait figcaption { margin-top: 10px; color: var(--muted); text-align: center; }
.about-text { grid-column: 7 / span 6; }
.about-lead {
  font-size: clamp(30px, 3.4vw, 48px); line-height: 1.05; letter-spacing: -0.035em; font-weight: 600; margin: 0 0 24px;
  font-variation-settings: "wdth" 86;
}
.about-text p { font-size: 19px; color: var(--ink-2); margin: 0 0 16px; max-width: 560px; }
.about-text i { font-family: var(--serif); font-size: 1.1em; color: var(--ink); }
.about-text .colophon { font-size: 12px; color: var(--muted); border-top: 1px dashed var(--line-2); padding-top: 16px; margin-top: 28px; line-height: 1.7; }

/* ---------- footer ---------- */
.foot { max-width: var(--max); margin: clamp(110px, 14vw, 200px) auto 0; padding: 0 var(--pad) 90px; position: relative; }
.foot-kicker { color: var(--pink); margin: 0 0 16px; }
.foot-title {
  margin: 0 0 36px; font-size: clamp(46px, 8.6vw, 132px); line-height: 0.88; letter-spacing: -0.055em; font-weight: 750;
  font-variation-settings: "wdth" 78, "opsz" 96;
}
.foot-title .iri { font-weight: 400; letter-spacing: -0.03em; }
.links { list-style: none; margin: 0 0 80px; padding: 0; border-top: 1px solid var(--line); }
.links a {
  display: flex; align-items: baseline; gap: 18px; padding: 20px 4px; border-bottom: 1px solid var(--line);
  font-size: clamp(26px, 3.6vw, 48px); letter-spacing: -0.03em; font-weight: 550; text-decoration: none;
  font-variation-settings: "wdth" 86;
  transition: padding 0.35s cubic-bezier(.2, .9, .2, 1.2), color 0.2s;
}
.links a .mono { width: 90px; color: var(--muted); }
.links a .arr { margin-left: auto; transition: transform 0.35s; }
.links a:hover { padding-left: 22px; color: var(--pink); }
.links a:hover .arr { transform: translate(6px, -6px); }
.foot-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 40px; align-items: start; }
.foot-h { color: var(--muted); margin: 0 0 10px; }
.gb-sub { margin: 0 0 12px; font-size: 14.5px; color: var(--ink-2); }
.gb-form { display: flex; gap: 8px; }
.gb-form input {
  flex: 1; min-width: 0; font-size: 12px; padding: 9px 12px; border-radius: 10px;
  border: 1px solid var(--line-2); background: var(--bg-2); color: var(--ink);
}
.gb-form input:focus { outline: none; border-color: var(--pink); }
.gb-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 6px; max-height: 180px; overflow: auto; }
.gb-list li { color: var(--ink-2); font-size: 11.5px; padding: 6px 10px; border-left: 2px solid var(--violet); background: var(--bg-2); border-radius: 0 8px 8px 0; }
.gb-list li span { color: var(--muted); margin-right: 8px; }
.webring { display: flex; gap: 12px; align-items: center; margin: 0 0 28px; font-size: 13px; }
.webring span { color: var(--pink); }
.odometer { display: flex; gap: 4px; margin: 0; }
.odometer span {
  display: inline-grid; place-items: center; width: 26px; height: 36px; border-radius: 6px;
  background: var(--bg-2); border: 1px solid var(--line-2); font-size: 18px; color: var(--ink);
  box-shadow: inset 0 -12px 12px -12px rgba(0, 0, 0, 0.45);
}
.odometer span.tick { animation: tick 0.4s; }
@keyframes tick { 0% { transform: translateY(-40%); opacity: 0; } 100% { transform: none; opacity: 1; } }
.badges { display: flex; flex-wrap: wrap; gap: 8px; }
.b88 {
  width: 88px; height: 31px; display: inline-grid; place-items: center; text-align: center;
  font-family: var(--pixel); font-size: 8px; line-height: 1; text-transform: uppercase; letter-spacing: 0.02em;
  border: 2px solid; border-color: #fff #555 #555 #fff;
  box-shadow: 1px 1px 0 #000;
  image-rendering: pixelated; cursor: default;
  transition: transform 0.2s;
}
.b88:hover { transform: translateY(-2px) rotate(-2deg); }
.b-a { background: linear-gradient(#ffe8f5, #ff8ccf); color: #3a0f2a; }
.b-b { background: #000080; color: #fff; border-color: #8b8bff #00004a #00004a #8b8bff; }
.b-c { background: repeating-linear-gradient(90deg, #c0c0c0 0 2px, #d8d8d8 2px 4px); color: #111; }
.b-d { background: linear-gradient(90deg, #ff8ccf, #ffd08a, #8ef3d1, #8fd3ff, #a393ff); color: #1a1030; }
.b-e { background: #111; color: #8ef3d1; border-color: #444 #000 #000 #444; }
.b-f { background: linear-gradient(#fff, #ffd08a); color: #402a00; }
.fine { margin: 60px 0 0; color: var(--muted); text-align: center; }

/* ---------- fixed hud ---------- */
.status {
  position: fixed; left: 14px; bottom: 14px; z-index: 70;
  display: inline-flex; align-items: center; gap: 8px; max-width: min(46vw, 520px);
  padding: 5px 12px 5px 9px; border-radius: 99px;
  background: var(--glass); border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  font-family: var(--pixel); font-size: 10px; color: var(--ink-2); text-transform: lowercase;
}
#status-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--mint); flex: none; }
.status.busy .status-dot { background: var(--pink); animation: blink 0.5s steps(2) infinite; }
.status { opacity: 0; transform: translateY(8px); transition: opacity 0.4s, transform 0.4s; }
.status.live { opacity: 1; transform: none; }
.gauge {
  position: fixed; right: 18px; top: 50%; z-index: 70; transform: translateY(-50%);
  display: flex; align-items: center; gap: 10px; flex-direction: row-reverse;
  pointer-events: none;
}
.gauge-line { width: 2px; height: 34vh; background: var(--line); border-radius: 2px; position: relative; overflow: hidden; }
.gauge-fill { position: absolute; left: 0; top: 0; width: 100%; height: 0; background: linear-gradient(var(--sky), var(--violet), var(--pink)); }
.gauge-read { text-align: right; color: var(--muted); font-size: 10px; line-height: 1.4; opacity: 0; transition: opacity 0.4s; }
.gauge-read b { color: var(--ink); font-weight: 400; font-size: 12px; }
.gauge.live .gauge-read { opacity: 1; }
@media (hover: none), (max-width: 900px) { .status, .gauge { display: none; } }

.peek {
  position: fixed; left: 0; top: 0; z-index: 80; width: 240px; pointer-events: none;
  border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; background: var(--bg-2);
  box-shadow: var(--shadow);
  opacity: 0; transform: scale(0.92); transform-origin: 0 0;
  transition: opacity 0.18s, transform 0.18s;
}
.peek.on { opacity: 1; transform: scale(1); }
.peek-bar { display: flex; justify-content: space-between; align-items: center; padding: 6px 9px; border-bottom: 1px solid var(--line-2); font-size: 10px; }
.peek canvas { width: 240px; height: 120px; }
@media (hover: none) { .peek { display: none; } }

.toast {
  position: fixed; left: 50%; bottom: 22px; z-index: 95;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--ink); color: var(--bg); padding: 9px 16px; border-radius: 99px; max-width: calc(100vw - 32px);
  transition: opacity 0.3s, transform 0.3s cubic-bezier(.2, .9, .2, 1.3);
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }

.keys {
  border: 1px solid var(--line-2); border-radius: 18px; padding: 24px 26px; max-width: 420px; width: calc(100vw - 32px);
  background: var(--bg-2); color: var(--ink);
}
.keys::backdrop { background: rgba(8, 6, 20, 0.55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.keys-h { color: var(--pink); margin: 0 0 12px; }
.keys ul { margin: 0 0 18px; padding: 0; list-style: none; display: grid; gap: 10px; font-size: 15px; }
.keys kbd { margin-right: 8px; }
.noscript { position: fixed; bottom: 12px; left: 12px; margin: 0; background: var(--ink); color: var(--bg); padding: 6px 12px; border-radius: 99px; }

/* ---------- smaller screens ---------- */
@media (max-width: 1100px) {
  .hero-copy { grid-column: 1 / span 7; }
  .specimen-label { grid-column: 8 / span 5; }
  .found { grid-column: 1 / -1; }
  .made { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .nav { display: none; }
  .controls { margin-left: auto; }
  .ctl-menu { display: inline-grid; }
  .hero { grid-template-rows: auto auto auto auto auto; padding-top: 92px; }
  .hero-copy { grid-column: 1 / -1; }
  .specimen-label { grid-column: 1 / -1; grid-row: auto; justify-self: start; margin: 36px 0 30px 6px; transform: rotate(-1.5deg); }
  .field { grid-column: 1 / -1; grid-row: auto; }
  .dive { grid-column: 1 / -1; grid-row: auto; justify-self: start; margin-top: 18px; }
  .sec-head h2, .finds .sec-head h2, .archive .sec-head h2, .onchain .sec-head h2, .notes .sec-head h2 { grid-column: 1 / -1; text-align: left; }
  .archive .sec-head .sec-num { text-align: left; }
  .sec-sub, .archive .sec-sub { grid-column: 1 / -1; grid-row: auto; justify-self: start; margin-top: 16px; max-width: none; }
  .holes-grid > .hole { grid-column: 1 / -1; margin-top: 0; }
  .made { grid-template-columns: 1fr; }
  .archive-grid > .spec { grid-column: span 6; margin-top: 0; }
  .archive-grid > .sp1, .archive-grid > .sp6 { grid-column: 1 / -1; }
  .notes-list { grid-template-columns: 1fr; gap: 0; }
  .notes-list::before { left: 0; }
  .notes-list .note, .notes-list .note:nth-child(odd) { justify-self: start; text-align: left; margin-top: 0; padding-left: 28px; }
  .notes-list .note::before, .notes-list .note:nth-child(odd)::before { left: -5px; right: auto; }
  .portrait, .about-text { grid-column: 1 / -1; }
  .portrait { max-width: 420px; }
  .foot-grid { grid-template-columns: 1fr; }
  .card:nth-child(n) { translate: none; }
  .finds-list a { grid-template-columns: 12px 1fr; }
  .finds-list .why { grid-column: 2; }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  .wordmark { font-size: 18.6vw; }
  .chip { font-size: 14px; padding: 7px 13px 8px; }
  .hole { padding: 22px 18px 18px; }
  .hole-top { padding-right: 70px; }
  .tunnel { width: 60px; height: 60px; }
  .archive-grid { gap: 14px; }
  .spec figcaption { font-size: 10px; }
  .links a .mono { width: 54px; }
  .field { line-height: 1.8; }
}

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

/* ---------- theme switch: the new theme grows out of the button ---------- */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-new(root) { animation: vt-reveal 0.75s cubic-bezier(.65, 0, .2, 1); }
@keyframes vt-reveal {
  from { clip-path: circle(0 at var(--vt-x, 90%) var(--vt-y, 30px)); }
  to { clip-path: circle(150vmax at var(--vt-x, 90%) var(--vt-y, 30px)); }
}

/* ---------- late additions ---------- */
.portrait canvas { animation: bob 7s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-10px) rotate(1.5deg); } }
.slot-why { margin: -4px 0 12px; min-height: 1.4em; font-family: var(--serif); font-style: italic; font-size: 17px; }
