/* Ocean Depth — every page is a dive from the sunlit surface to the hadal floor.
   Each <section class="zone"> is one depth zone; the zone owns its own ink tokens,
   so text colour follows the water it sits in. */

:root {
  /* primitives */
  --abyss-black: #000;
  --glow-cyan: #6ff3ff;
  --glow-green: #8dffc4;
  --glow-violet: #c9b3ff;
  --glow-amber: #ffc46b;
  --brand-slate: #364f6a;

  /* water column, day dive */
  --sun-top: #eaf8fc;
  --sun-bot: #86c3da;
  --sun-ray: rgba(255, 255, 255, 0.75);
  --tw-top: #1d4f73;
  --tw-mid: #2d4d6c;
  --tw-bot: #0c2a44;
  --mid-top: #0a2036;
  --mid-bot: #050e1a;
  --aby-bot: #01040a;

  --font-display: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --font-body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --radius: 18px;
  --radius-sm: 10px;
  --gutter: clamp(16px, 4vw, 40px);
  --maxw: 1180px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  color-scheme: light dark;
}

/* night dive: even the surface is moonlit */
:root[data-theme="dark"] {
  --sun-top: #06182a;
  --sun-bot: #0d2f4a;
  --sun-ray: rgba(160, 210, 255, 0.16);
  --tw-top: #0f3350;
  --tw-mid: #22394f;
  --tw-bot: #0a2238;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --sun-top: #06182a;
    --sun-bot: #0d2f4a;
    --sun-ray: rgba(160, 210, 255, 0.16);
    --tw-top: #0f3350;
    --tw-mid: #22394f;
    --tw-bot: #0a2238;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: var(--sun-top); }
body {
  margin: 0;
  background: var(--aby-bot);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-x: hidden;
  color: #e6f1f8;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus, #6ff3ff); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3, h4 { margin: 0; font-weight: 400; color: var(--ink); }
p { margin: 0 0 1em; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: #021420; color: #6ff3ff; padding: 10px 14px; border-radius: 8px; }
.skip:focus { top: 12px; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); }

/* ---------- zone tokens ---------- */
.zone {
  --ink: #e8f2f9;
  --ink-2: #b8d0df;
  --link: #8ff2ff;
  --surface: rgba(140, 210, 255, 0.055);
  --surface-2: rgba(140, 210, 255, 0.1);
  --line: rgba(127, 239, 255, 0.2);
  --line-strong: rgba(127, 239, 255, 0.5);
  --glow: var(--glow-cyan);
  --c-ai: var(--glow-violet);
  --c-garden: var(--glow-green);
  --c-tools: var(--glow-amber);
  --c-proj: var(--glow-cyan);
  --btn-bg: #8ff2ff;
  --btn-ink: #021420;
  --focus: #8ff2ff;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
  position: relative;
  color: var(--ink-2);
  isolation: isolate;
}
.zone--sun {
  background:
    radial-gradient(ellipse 80% 50% at 50% -8%, var(--sun-ray), transparent 70%),
    linear-gradient(var(--sun-top), var(--sun-bot));
}
:root:not([data-theme="dark"]) .zone--sun {
  --ink: #04202f;
  --ink-2: #163c52;
  --link: #033a55;
  --surface: rgba(255, 255, 255, 0.62);
  --surface-2: rgba(255, 255, 255, 0.85);
  --line: rgba(4, 32, 47, 0.16);
  --line-strong: rgba(4, 32, 47, 0.45);
  --glow: #0a7aa3;
  --c-ai: #5a3aa8;
  --c-garden: #0a6340;
  --c-tools: #7a4700;
  --c-proj: #04577a;
  --btn-bg: #04202f;
  --btn-ink: #eaf8fc;
  --focus: #04202f;
  --shadow: 0 12px 30px -18px rgba(4, 32, 47, 0.45);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .zone--sun {
    --ink: #e8f2f9; --ink-2: #b8d0df; --link: #8ff2ff;
    --surface: rgba(140, 210, 255, 0.055); --surface-2: rgba(140, 210, 255, 0.1);
    --line: rgba(127, 239, 255, 0.2); --line-strong: rgba(127, 239, 255, 0.5);
    --glow: var(--glow-cyan); --c-ai: var(--glow-violet); --c-garden: var(--glow-green);
    --c-tools: var(--glow-amber); --c-proj: var(--glow-cyan);
    --btn-bg: #8ff2ff; --btn-ink: #021420; --focus: #8ff2ff; --shadow: none;
  }
}
/* surface light shafts; the caustics texture is optional and layers on top when present */
.zone--sun::before {
  content: "";
  position: absolute; inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    url("assets/surface-caustics.webp") center top / 1400px auto no-repeat,
    repeating-linear-gradient(102deg, transparent 0 80px, rgba(255,255,255,0.14) 80px 118px, transparent 118px 210px, rgba(255,255,255,0.08) 210px 230px, transparent 230px 320px);
  -webkit-mask-image: linear-gradient(#000, transparent 75%);
          mask-image: linear-gradient(#000, transparent 75%);
  opacity: 0.8;
  animation: sway 14s ease-in-out infinite alternate;
  transform-origin: 50% 0;
}
:root[data-theme="dark"] .zone--sun::before { opacity: 0.3; }
@keyframes sway { from { transform: skewX(-3deg); } to { transform: skewX(3deg); } }

.zone--tw {
  background: linear-gradient(var(--sun-bot) 0, var(--tw-top) 170px, var(--tw-mid) 55%, var(--tw-bot));
  padding-top: 90px;
}
.zone--mid { background: linear-gradient(var(--tw-bot), var(--mid-top) 120px, var(--mid-bot)); }
.zone--aby { background: linear-gradient(var(--mid-bot), var(--aby-bot)); }
.zone--had { background: linear-gradient(var(--aby-bot), #000 240px); }

/* bioluminescent plankton scattered through the dark zones */
.zone--tw::after, .zone--mid::after, .zone--aby::after {
  content: "";
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    radial-gradient(2px 2px at 12% 18%, var(--glow-cyan), transparent 70%),
    radial-gradient(3px 3px at 84% 26%, var(--glow-green), transparent 70%),
    radial-gradient(2px 2px at 64% 62%, var(--glow-cyan), transparent 70%),
    radial-gradient(2px 2px at 30% 78%, var(--glow-violet), transparent 70%),
    radial-gradient(3px 3px at 92% 88%, var(--glow-cyan), transparent 70%),
    radial-gradient(2px 2px at 6% 55%, var(--glow-green), transparent 70%),
    radial-gradient(2px 2px at 48% 36%, var(--glow-cyan), transparent 70%);
  background-size: 100% 900px;
  opacity: 0.55;
  animation: twinkle 7s ease-in-out infinite alternate;
}
.zone--mid::after { opacity: 0.75; background-size: 100% 700px; }
.zone--aby::after { opacity: 0.9; background-size: 100% 520px; animation-duration: 5s; }
@keyframes twinkle { from { filter: brightness(0.6); } to { filter: brightness(1.5); } }

/* thermocline: the seam where sunlight ends */
.thermocline {
  position: absolute; top: 44px; left: 50%; transform: translateX(-50%);
  font-family: var(--font-mono); font-size: 0.8125rem; letter-spacing: 0.08em; text-transform: uppercase;
  background: #041726; color: #aef6ff; border: 1px solid rgba(111, 243, 255, 0.4);
  padding: 7px 14px; border-radius: 999px; white-space: nowrap;
  box-shadow: 0 0 24px rgba(111, 243, 255, 0.25);
}

/* ---------- marine snow (fixed) ---------- */
.snow {
  position: fixed; inset: 0; pointer-events: none; z-index: 30;
  opacity: 0; transition: opacity 0.8s var(--ease);
  background-image:
    radial-gradient(1.5px 1.5px at 20px 30px, rgba(220, 240, 255, 0.7), transparent),
    radial-gradient(1px 1px at 140px 90px, rgba(220, 240, 255, 0.6), transparent),
    radial-gradient(1.5px 1.5px at 230px 190px, rgba(220, 240, 255, 0.5), transparent),
    radial-gradient(1px 1px at 80px 250px, rgba(220, 240, 255, 0.6), transparent);
  background-size: 280px 280px;
  animation: snowfall 38s linear infinite;
}
html[data-current-zone="tw"] .snow { opacity: 0.35; }
html[data-current-zone="mid"] .snow { opacity: 0.6; }
html[data-current-zone="aby"] .snow, html[data-current-zone="had"] .snow { opacity: 0.8; }
@keyframes snowfall { from { background-position: 0 0; } to { background-position: 40px 560px; } }

/* ---------- nav (the submersible HUD) ---------- */
.hud {
  position: sticky; top: 0; z-index: 50;
  background: rgba(2, 16, 28, 0.82);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
          backdrop-filter: blur(14px) saturate(1.3);
  border-bottom: 1px solid rgba(111, 243, 255, 0.18);
  color: #d9ebf5;
}
.hud__inner { display: flex; align-items: center; gap: 20px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: #f1f9fd; text-decoration: none; }
.brand svg { width: 38px; height: 38px; flex: none; }
.brand__name { font-family: var(--font-display); font-size: 1.5rem; line-height: 1; letter-spacing: 0.01em; }
.brand__name em { color: var(--glow-cyan); font-style: italic; }
.hud nav { margin-left: auto; }
.hud__links { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.hud__links a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px;
  color: #cfe3ef; text-decoration: none; font-weight: 500; font-size: 1rem; border-radius: 999px;
  transition: color 150ms, background 150ms;
}
.hud__links a:hover { color: #fff; background: rgba(111, 243, 255, 0.1); }
.hud__links a[aria-current="page"] { color: #021420; background: var(--glow-cyan); box-shadow: 0 0 18px rgba(111, 243, 255, 0.45); }
.hud__links a:focus-visible, .hud button:focus-visible { outline-color: var(--glow-cyan); }
.theme-toggle, .menu-toggle {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px;
  background: transparent; color: #d9ebf5; border: 1px solid rgba(111, 243, 255, 0.35); border-radius: 999px;
  font: 500 0.875rem/1 var(--font-mono); cursor: pointer; transition: background 150ms;
}
.theme-toggle:hover, .menu-toggle:hover { background: rgba(111, 243, 255, 0.12); }
.theme-toggle svg { width: 18px; height: 18px; }
.menu-toggle { display: none; }

@media (max-width: 900px) {
  .menu-toggle { display: inline-flex; margin-left: auto; }
  .hud nav { margin-left: 0; }
  .hud__links {
    display: none; position: absolute; left: 0; right: 0; top: 64px;
    flex-direction: column; gap: 2px; padding: 12px var(--gutter) 20px;
    background: rgba(2, 16, 28, 0.97); border-bottom: 1px solid rgba(111, 243, 255, 0.2);
  }
  .hud.is-open .hud__links { display: flex; }
  .hud__links a { font-size: 1.125rem; padding: 0 12px; }
  .theme-toggle .label { display: none; }
}

/* ---------- depth gauge ---------- */
.gauge {
  position: fixed; right: 22px; top: 50%; transform: translateY(-50%); z-index: 40;
  width: 92px; padding: 14px 10px 12px;
  background: rgba(2, 14, 26, 0.78); border: 1px solid rgba(111, 243, 255, 0.28); border-radius: 16px;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  color: #cfe3ef; font-family: var(--font-mono);
}
.gauge__label { font-size: 0.8125rem; letter-spacing: 0.1em; text-transform: uppercase; color: #9fc3d6; text-align: center; }
.gauge__track { position: relative; height: 46vh; max-height: 420px; margin: 12px auto; width: 2px; background: linear-gradient(#bfe9f6, #2d5577 30%, #0a2036 60%, #000); border-radius: 2px; }
.gauge__tick { position: absolute; left: 8px; transform: translateY(-50%); font-size: 0.8125rem; color: #8fb3c7; white-space: nowrap; }
.gauge__tick::before { content: ""; position: absolute; left: -12px; top: 50%; width: 8px; height: 1px; background: #8fb3c7; }
.gauge__mark {
  position: absolute; left: 50%; top: 0; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%;
  background: var(--glow-cyan); box-shadow: 0 0 0 4px rgba(111, 243, 255, 0.2), 0 0 18px var(--glow-cyan);
  transition: top 120ms linear;
}
.gauge__read { text-align: center; font-size: 0.9375rem; color: #eaf8fc; font-variant-numeric: tabular-nums; }
.gauge__zone { text-align: center; font-size: 0.8125rem; color: #aef6ff; margin-top: 2px; }
@media (max-width: 1379px) {
  .gauge { top: auto; bottom: 14px; right: 14px; transform: none; width: auto; padding: 8px 14px; border-radius: 999px; display: flex; gap: 10px; align-items: baseline; }
  .gauge__label, .gauge__track { display: none; }
  .gauge__zone { margin: 0; }
}

/* ---------- zone plate (section depth marker) ---------- */
.plate { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; padding-top: 12px; border-top: 1px solid var(--line); }
.plate__depth { font-family: var(--font-mono); font-size: 0.875rem; letter-spacing: 0.06em; color: var(--glow); font-weight: 500; }
.plate__zone { font-family: var(--font-display); font-style: italic; font-size: 1.375rem; color: var(--ink); }
.plate__fact { font-size: 0.9375rem; color: var(--ink-2); margin-left: auto; }
@media (max-width: 640px) { .plate__fact { margin-left: 0; flex-basis: 100%; } }

.section { padding-block: 72px; }
.section + .section { padding-top: 24px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 32px; }
.section-head h2 { font-family: var(--font-display); font-size: clamp(2.25rem, 4.6vw, 3.5rem); line-height: 1.02; letter-spacing: -0.01em; }
.section-head p { margin: 8px 0 0; font-size: 1.0625rem; max-width: 56ch; }
.more-link { font-weight: 600; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; }

.eyebrow { font-family: var(--font-mono); font-size: 0.8125rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--glow); font-weight: 500; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px;
  border-radius: 999px; font: 600 1rem/1 var(--font-body); text-decoration: none; cursor: pointer;
  background: var(--btn-bg); color: var(--btn-ink); border: 1px solid transparent;
  transition: box-shadow 150ms, transform 150ms, background 150ms;
}
.btn:hover { box-shadow: 0 0 0 4px color-mix(in srgb, var(--btn-bg) 25%, transparent), 0 0 28px color-mix(in srgb, var(--glow) 45%, transparent); }
.btn:active { transform: translateY(1px); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn--ghost:hover { background: var(--surface-2); }
.btn--quiet { background: none; color: var(--ink-2); padding: 0 6px; text-decoration: underline; text-underline-offset: 4px; }
.btn--quiet:hover { color: var(--ink); box-shadow: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* ---------- chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.chip {
  display: inline-flex; align-items: center; min-height: 28px; padding: 2px 10px; border-radius: 999px;
  font: 500 0.8125rem/1.3 var(--font-mono); color: var(--ink-2); border: 1px solid var(--line); background: var(--surface);
  text-decoration: none;
}
a.chip:hover { border-color: var(--line-strong); color: var(--ink); }
.tag-ai { color: var(--c-ai); border-color: color-mix(in srgb, var(--c-ai) 45%, transparent); }
.tag-garden { color: var(--c-garden); border-color: color-mix(in srgb, var(--c-garden) 45%, transparent); }
.tag-tools { color: var(--c-tools); border-color: color-mix(in srgb, var(--c-tools) 45%, transparent); }
.tag-proj { color: var(--c-proj); border-color: color-mix(in srgb, var(--c-proj) 45%, transparent); }

/* ---------- cards ---------- */
.grid { display: grid; gap: 22px; }
.grid--3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }

.card {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
  transition: border-color 200ms, box-shadow 250ms var(--ease), transform 250ms var(--ease);
}
.card:hover, .card:focus-within {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--glow) 40%, transparent), 0 0 38px -6px color-mix(in srgb, var(--glow) 45%, transparent);
  transform: translateY(-2px);
}
.card__media { aspect-ratio: 16 / 9; background: linear-gradient(135deg, #0b2b45, #04101c); overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 500ms var(--ease), filter 300ms; }
.zone:not(.zone--sun) .card__media img { filter: brightness(0.86) saturate(0.9); }
.card:hover .card__media img { transform: scale(1.03); filter: none; }
.card__body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card__meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font: 500 0.8125rem/1.3 var(--font-mono); color: var(--ink-2); letter-spacing: 0.02em; }
.card h3 { font-family: var(--font-body); font-weight: 650; font-size: 1.1875rem; line-height: 1.3; letter-spacing: -0.005em; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.card h3 a:focus-visible { outline: none; }
.card h3 a:focus-visible::after { outline: 3px solid var(--focus); outline-offset: -3px; }
.card p { margin: 0; font-size: 1rem; line-height: 1.55; color: var(--ink-2); }
/* photophores: the row of lights every card carries along its edge */
.photophores { display: flex; gap: 6px; }
.photophores i { width: 6px; height: 6px; border-radius: 50%; background: var(--glow); box-shadow: 0 0 8px var(--glow); opacity: 0.8; }
.photophores i:nth-child(2) { opacity: 0.55; }
.photophores i:nth-child(3) { opacity: 0.3; }
.card:hover .photophores i { animation: pulse 1.4s ease-in-out infinite; }
.card:hover .photophores i:nth-child(2) { animation-delay: 0.2s; }
.card:hover .photophores i:nth-child(3) { animation-delay: 0.4s; }
@keyframes pulse { 50% { opacity: 1; transform: scale(1.4); } }

/* list rows (archive) */
.rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.row { position: relative; display: grid; grid-template-columns: 7.5rem 1fr auto; gap: 8px 24px; padding: 20px 8px; border-bottom: 1px solid var(--line); align-items: baseline; transition: background 150ms; }
.row:hover { background: var(--surface); }
.row time { font: 500 0.875rem/1.4 var(--font-mono); color: var(--glow); }
.row h3 { font-family: var(--font-body); font-weight: 600; font-size: 1.1875rem; line-height: 1.35; }
.row h3 a { color: var(--ink); text-decoration: none; }
.row h3 a::after { content: ""; position: absolute; inset: 0; }
.row h3 a:hover { text-decoration: underline; }
.row p { grid-column: 2 / -1; margin: 0; color: var(--ink-2); font-size: 1rem; }
.row .chip { justify-self: end; }
@media (max-width: 640px) {
  .row { grid-template-columns: 1fr; }
  .row p { grid-column: auto; }
  .row .chip { justify-self: start; }
}

/* ---------- page heads ---------- */
.page-head { padding: clamp(64px, 10vw, 128px) 0 72px; }
.page-head h1 { font-family: var(--font-display); font-size: clamp(3rem, 8vw, 6.5rem); line-height: 0.95; letter-spacing: -0.02em; margin: 14px 0 22px; }
.page-head h1 em { font-style: italic; color: var(--glow); }
.page-head .lede { font-size: clamp(1.1875rem, 2vw, 1.4375rem); line-height: 1.5; max-width: 60ch; color: var(--ink-2); }

/* home hero */
.hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: clamp(32px, 6vw, 88px); align-items: center; padding: clamp(56px, 9vw, 120px) 0 88px; }
.hero h1 { font-family: var(--font-display); font-size: clamp(3rem, 7vw, 6rem); line-height: 0.96; letter-spacing: -0.02em; margin: 16px 0 24px; }
.hero h1 em { font-style: italic; color: var(--glow); }
.hero .lede { font-size: clamp(1.125rem, 1.8vw, 1.3125rem); max-width: 52ch; color: var(--ink-2); margin-bottom: 28px; }
.porthole { position: relative; aspect-ratio: 1; border-radius: 50%; padding: 14px; background: conic-gradient(from 200deg, #0e3a57, #6ff3ff 12%, #0e3a57 30%, #1d4f73 60%, #6ff3ff 78%, #0e3a57); box-shadow: 0 30px 80px -30px rgba(4, 32, 47, 0.7), 0 0 60px -10px rgba(111, 243, 255, 0.5); }
.porthole__glass { width: 100%; height: 100%; border-radius: 50%; overflow: hidden; background: #0b2b45; box-shadow: inset 0 0 0 6px #021420; }
.porthole__glass img { width: 100%; height: 100%; object-fit: cover; object-position: 30% 30%; }
.porthole::after { content: ""; position: absolute; inset: 14px; border-radius: 50%; background: radial-gradient(circle at 30% 22%, rgba(255,255,255,0.35), transparent 32%), linear-gradient(transparent 55%, rgba(4, 32, 60, 0.45)); pointer-events: none; }
.porthole__bolt { position: absolute; width: 12px; height: 12px; border-radius: 50%; background: #021420; box-shadow: inset 0 0 0 2px #6ff3ff; }
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .porthole { max-width: 320px; width: 78%; margin: 0 auto; order: -1; }
}

/* soundings: stats as depth readings */
.soundings { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; margin: 0 0 32px; }
.sounding { background: var(--surface-2); padding: 14px 16px; }
.sounding b { display: block; font: 500 clamp(1.5rem, 3vw, 2rem)/1.1 var(--font-mono); color: var(--ink); font-variant-numeric: tabular-nums; }
.sounding span { font-size: 0.875rem; color: var(--ink-2); }

/* feature panel */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(22px, 4vw, 40px); box-shadow: var(--shadow); }
.panel--glow { border-color: var(--line-strong); box-shadow: 0 0 60px -20px color-mix(in srgb, var(--glow) 60%, transparent); }

/* shelf: start here */
.shelf { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
@media (max-width: 900px) { .shelf { grid-template-columns: 1fr; } }
.shelf .card__num { position: absolute; top: 12px; left: 12px; z-index: 2; font: 500 0.8125rem/1 var(--font-mono); background: #021420; color: #aef6ff; padding: 6px 10px; border-radius: 999px; }

/* experiments list (icon cards) */
.lure { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle, color-mix(in srgb, var(--glow) 35%, transparent), transparent 70%); color: var(--glow); }
.lure svg { width: 24px; height: 24px; }

/* two col split */
.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 22px; }

/* link lists */
.linklist { list-style: none; margin: 0; padding: 0; }
.linklist li { border-bottom: 1px solid var(--line); }
.linklist a { display: flex; justify-content: space-between; gap: 12px; align-items: center; min-height: 52px; color: var(--ink); text-decoration: none; font-weight: 500; }
.linklist a:hover { color: var(--link); }
.linklist small { font: 500 0.8125rem var(--font-mono); color: var(--ink-2); }

/* ---------- footer (hadal) ---------- */
.floor { padding: 96px 0 40px; color: #b8d0df; }
.floor h2, .floor h3 { color: #eaf6fb; }
.floor__top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.4fr; gap: 40px; }
@media (max-width: 900px) { .floor__top { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .floor__top { grid-template-columns: 1fr; } }
.floor h3 { font-family: var(--font-mono); font-size: 0.8125rem; letter-spacing: 0.12em; text-transform: uppercase; color: #aef6ff; margin-bottom: 12px; }
.floor ul { list-style: none; padding: 0; margin: 0; }
.floor li a { display: inline-flex; min-height: 36px; align-items: center; color: #d6e8f2; text-decoration: none; }
.floor li a:hover { color: #8ff2ff; text-decoration: underline; }
.floor__bottom { margin-top: 64px; padding-top: 22px; border-top: 1px solid rgba(127, 239, 255, 0.18); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 0.9375rem; }
.floor__depth { font-family: var(--font-mono); color: #aef6ff; }
.angler { display: flex; align-items: center; gap: 18px; margin-bottom: 56px; }
.angler svg { width: 120px; height: 90px; flex: none; }
.angler p { margin: 0; font-family: var(--font-display); font-size: clamp(1.75rem, 3.5vw, 2.5rem); line-height: 1.1; color: #eaf6fb; }
.angler p em { color: var(--glow-cyan); }
.lure-glow { animation: lureglow 3s ease-in-out infinite; transform-origin: center; transform-box: fill-box; }
@keyframes lureglow { 50% { opacity: 0.55; } }

/* newsletter form */
.signup { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.signup label { flex-basis: 100%; }
.signup input[type="email"] {
  flex: 1 1 180px; min-height: 48px; padding: 0 16px; border-radius: 999px; font: 1rem var(--font-body);
  background: rgba(140, 210, 255, 0.07); color: var(--ink, #eaf6fb); border: 1px solid var(--line-strong, rgba(127, 239, 255, 0.5));
}
.signup input::placeholder { color: #8fb3c7; }
.zone--sun .signup input::placeholder { color: var(--ink-2); }
.signup .status { flex-basis: 100%; margin: 4px 0 0; font-size: 0.9375rem; min-height: 1.4em; }
.signup .status.is-error { color: #ffb4a8; }
.signup .status.is-success { color: #8dffc4; }
.floor .signup .btn { --btn-bg: #8ff2ff; --btn-ink: #021420; --glow: #6ff3ff; }

/* ---------- decorative creatures ---------- */
.creature { position: absolute; pointer-events: none; z-index: -1; opacity: 0.8; }
.jelly { animation: bob 9s ease-in-out infinite alternate; }
@keyframes bob { from { transform: translateY(-12px); } to { transform: translateY(14px); } }

/* ---------- article ---------- */
.article-head { padding: clamp(56px, 8vw, 104px) 0 48px; max-width: 900px; }
.crumbs { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; font: 500 0.875rem var(--font-mono); }
.crumbs a { color: var(--link); }
.article-head h1 { font-family: var(--font-display); font-size: clamp(2.75rem, 6.5vw, 5.25rem); line-height: 0.98; letter-spacing: -0.02em; margin: 18px 0 20px; }
.article-head .lede { font-size: clamp(1.1875rem, 2vw, 1.4375rem); color: var(--ink-2); }
.article-meta { display: flex; gap: 18px; flex-wrap: wrap; font: 500 0.875rem var(--font-mono); color: var(--ink-2); margin-top: 20px; }
.article-figure { margin: 0 0 -120px; position: relative; z-index: 2; }
.article-figure img { width: 100%; border-radius: var(--radius); border: 1px solid var(--line); aspect-ratio: 21 / 9; object-fit: cover; box-shadow: 0 30px 60px -30px rgba(2, 20, 32, 0.8); }
.article-figure figcaption { font-size: 0.875rem; color: var(--ink-2); margin-top: 8px; }
.article-shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 56px; padding-top: 200px; padding-bottom: 64px; }
@media (max-width: 1100px) { .article-shell { grid-template-columns: minmax(0, 1fr); gap: 20px; } }
.toc { position: sticky; top: 96px; align-self: start; font-size: 0.9375rem; }
.toc h2 { font: 500 0.8125rem var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--glow); margin-bottom: 12px; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc a { display: block; padding: 7px 0 7px 16px; margin-left: -1px; color: var(--ink-2); text-decoration: none; border-left: 2px solid transparent; }
.toc a:hover { color: var(--ink); }
.toc a[aria-current="true"] { color: var(--ink); border-left-color: var(--glow-cyan); box-shadow: -8px 0 14px -8px var(--glow-cyan); }
.toc .toc__depth { font-family: var(--font-mono); font-size: 0.8125rem; color: var(--glow); display: block; }
.toc-mobile { display: none; }
@media (max-width: 1100px) {
  .toc { display: none; }
  .toc-mobile { display: block; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
  .toc-mobile summary { min-height: 48px; display: flex; align-items: center; padding: 0 16px; cursor: pointer; font: 500 0.875rem var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink); }
  .toc-mobile ol { margin: 0; padding: 0 16px 16px 36px; }
  .toc-mobile a { display: block; padding: 6px 0; }
}
.prose { max-width: 70ch; font-size: 1.125rem; line-height: 1.72; color: #d5e5ef; }
.prose > * + * { margin-top: 1.2em; }
.prose p { margin-bottom: 0; }
.prose h2 { font-family: var(--font-display); font-size: clamp(2rem, 3.6vw, 2.75rem); line-height: 1.08; margin-top: 2.4em; color: #f1f9fd; scroll-margin-top: 96px; }
.prose h2 .depth-tag { display: block; font: 500 0.8125rem var(--font-mono); letter-spacing: 0.1em; color: var(--glow-cyan); margin-bottom: 8px; }
.prose a { color: #8ff2ff; }
.prose code { font: 0.92em var(--font-mono); background: rgba(140, 210, 255, 0.1); border: 1px solid rgba(127, 239, 255, 0.18); padding: 1px 6px; border-radius: 6px; color: #e8f6fc; }
.prose ol, .prose ul { padding-left: 1.4em; }
.prose li + li { margin-top: 0.4em; }
.prose li::marker { color: var(--glow-cyan); font-family: var(--font-mono); }
.prose em { color: #f1f9fd; }
.callout { position: relative; border-radius: 14px; padding: 18px 20px 18px 24px; background: rgba(140, 210, 255, 0.06); border: 1px solid rgba(127, 239, 255, 0.22); }
.callout::before { content: ""; position: absolute; left: -1px; top: 14px; bottom: 14px; width: 3px; border-radius: 3px; background: var(--c, var(--glow-cyan)); box-shadow: 0 0 14px var(--c, var(--glow-cyan)); }
.callout__label { display: block; font: 500 0.8125rem var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--c, var(--glow-cyan)); margin-bottom: 6px; }
.callout p { margin: 0; }
.callout--why { --c: var(--glow-cyan); }
.callout--q { --c: var(--glow-violet); background: rgba(201, 179, 255, 0.07); border-color: rgba(201, 179, 255, 0.25); }
.callout--note { --c: var(--glow-amber); background: rgba(255, 196, 107, 0.06); border-color: rgba(255, 196, 107, 0.25); }
.callout--skill { --c: var(--glow-green); background: rgba(141, 255, 196, 0.06); border-color: rgba(141, 255, 196, 0.25); }

.code { margin-inline: 0; border-radius: 14px; background: #020a13; border: 1px solid rgba(127, 239, 255, 0.24); box-shadow: 0 0 40px -18px rgba(111, 243, 255, 0.45); overflow: hidden; }
.code__bar { display: flex; justify-content: space-between; align-items: center; padding: 6px 8px 6px 16px; border-bottom: 1px solid rgba(127, 239, 255, 0.16); font: 500 0.8125rem var(--font-mono); color: #9fc3d6; }
.code__bar button { min-height: 36px; padding: 0 12px; background: transparent; border: 1px solid rgba(127, 239, 255, 0.3); border-radius: 8px; color: #cfe3ef; font: 500 0.8125rem var(--font-mono); cursor: pointer; }
.code__bar button:hover { background: rgba(111, 243, 255, 0.12); }
.code pre { margin: 0; padding: 18px 20px; overflow-x: auto; font: 0.9375rem/1.65 var(--font-mono); color: #d8ecf6; tab-size: 2; }
.tk-k { color: #c9b3ff; } .tk-s { color: #8dffc4; } .tk-c { color: #8aa7ba; font-style: italic; } .tk-t { color: #6ff3ff; } .tk-f { color: #ffc46b; }

.after-article { padding: 64px 0; }
.share { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- about ---------- */
.strata { list-style: none; margin: 0; padding: 0; position: relative; }
.strata::before { content: ""; position: absolute; left: 7.5rem; top: 0; bottom: 0; width: 2px; background: linear-gradient(var(--glow-cyan), rgba(111, 243, 255, 0.1)); }
.stratum { display: grid; grid-template-columns: 7.5rem 1fr; gap: 0 36px; padding: 0 0 44px; position: relative; }
.stratum::before { content: ""; position: absolute; left: calc(7.5rem - 6px); top: 8px; width: 14px; height: 14px; border-radius: 50%; background: var(--glow-cyan); box-shadow: 0 0 16px var(--glow-cyan); }
.stratum__when { font: 500 0.875rem/1.5 var(--font-mono); color: var(--glow); padding-top: 3px; }
.stratum h3 { font-family: var(--font-display); font-size: 2rem; line-height: 1.1; margin-bottom: 8px; }
.stratum .roles { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 8px; }
.stratum .roles li { padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); }
.stratum .roles small { display: block; color: var(--ink-2); font-size: 0.9375rem; }
@media (max-width: 640px) {
  .strata::before { left: 6px; }
  .stratum { grid-template-columns: 1fr; padding-left: 32px; }
  .stratum::before { left: 0; }
}
.careerbar { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0 0 40px; }
.careerbar li { font: 500 0.875rem var(--font-mono); padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink); background: var(--surface); }
.careerbar li span { color: var(--ink-2); }
.proverbs { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; counter-reset: p; }
.proverbs li { counter-increment: p; font-family: var(--font-display); font-style: italic; font-size: clamp(1.625rem, 3.2vw, 2.375rem); line-height: 1.2; color: #eef8fc; padding-left: 64px; position: relative; text-shadow: 0 0 30px rgba(111, 243, 255, 0.25); }
.proverbs li::before { content: "0" counter(p); position: absolute; left: 0; top: 0.4em; font: 500 0.875rem var(--font-mono); font-style: normal; color: var(--glow-cyan); }
.caps { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.cap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 24px; background: color-mix(in srgb, #01060d 88%, transparent); padding: 24px; }
.cap h3 { font-family: var(--font-display); font-size: 1.75rem; margin-bottom: 6px; }
.cap p { margin: 0; }
@media (max-width: 720px) { .cap { grid-template-columns: 1fr; } }
.photo-frame { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); aspect-ratio: 4 / 5; background: #0b2b45; }
.photo-frame img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- patterns ---------- */
.toolbar { display: grid; gap: 16px; margin-bottom: 28px; }
.search { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line-strong); background: var(--surface); border-radius: 999px; padding: 0 8px 0 18px; }
.search:focus-within { box-shadow: 0 0 0 3px color-mix(in srgb, var(--glow) 40%, transparent); }
.search svg { width: 20px; height: 20px; color: var(--glow); flex: none; }
.search input { flex: 1; min-width: 0; min-height: 52px; border: 0; background: transparent; color: var(--ink); font: 1.0625rem var(--font-body); }
.search input:focus { outline: none; }
.search input::placeholder { color: var(--ink-2); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filter { min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-strong); background: transparent; color: var(--ink); font: 500 0.9375rem var(--font-body); cursor: pointer; }
.filter:hover { background: var(--surface-2); }
.filter[aria-pressed="true"] { background: var(--glow-cyan); color: #021420; border-color: var(--glow-cyan); box-shadow: 0 0 18px rgba(111, 243, 255, 0.4); }
.toolbar__meta { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.count { font: 500 0.9375rem var(--font-mono); color: var(--ink); }
.select { min-height: 44px; padding: 0 12px; border-radius: 10px; background: #041726; color: #eaf6fb; border: 1px solid var(--line-strong); font: 0.9375rem var(--font-body); }
.linkbtn { background: none; border: 0; color: var(--link); text-decoration: underline; font: inherit; cursor: pointer; min-height: 44px; padding: 0 8px; }
.specimen { position: relative; aspect-ratio: 16 / 8; display: grid; place-items: center; background: radial-gradient(circle at 50% 60%, color-mix(in srgb, var(--cat) 22%, transparent), transparent 65%), #020a13; border-bottom: 1px solid var(--line); color: var(--cat); }
.specimen svg { width: 58%; height: 70%; filter: drop-shadow(0 0 10px color-mix(in srgb, var(--cat) 60%, transparent)); }
.specimen__no { position: absolute; top: 10px; left: 12px; font: 500 0.8125rem var(--font-mono); color: #9fc3d6; }
.badge { font: 600 0.8125rem/1 var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; padding: 5px 8px; border-radius: 6px; }
.badge--new { background: var(--glow-green); color: #02160c; }
.badge--upd { border: 1px solid var(--glow-amber); color: var(--glow-amber); }
.cat-data { --cat: var(--glow-cyan); } .cat-layout { --cat: var(--glow-green); } .cat-interaction { --cat: var(--glow-violet); } .cat-forms { --cat: var(--glow-amber); } .cat-color { --cat: #ff9ecb; }
.good-for { font-size: 0.9375rem; color: var(--ink-2); }
.good-for b { color: var(--ink); font-weight: 600; }
.empty { text-align: center; padding: 64px 20px; border: 1px dashed var(--line-strong); border-radius: var(--radius); }
.empty h3 { font-family: var(--font-display); font-size: 2rem; margin-bottom: 8px; }
.three-ways { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
@media (max-width: 800px) { .three-ways { grid-template-columns: 1fr; } }
.three-ways h3 { font-family: var(--font-display); font-size: 1.75rem; margin: 6px 0; }

/* pattern detail */
.panes { border: 1px solid var(--line-strong); border-radius: var(--radius); overflow: hidden; background: rgba(2, 10, 19, 0.6); }
.panes__bar { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 8px; border-bottom: 1px solid var(--line); }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tab { min-height: 44px; padding: 0 16px; border-radius: 10px; border: 0; background: transparent; color: var(--ink-2); font: 500 0.9375rem var(--font-body); cursor: pointer; }
.tab:hover { color: var(--ink); background: var(--surface-2); }
.tab[aria-selected="true"] { background: var(--glow-cyan); color: #021420; }
.pane { padding: clamp(16px, 3vw, 32px); }
.pane pre { margin: 0; overflow-x: auto; font: 0.9375rem/1.65 var(--font-mono); color: #d8ecf6; }
.pane .prompt { max-width: 70ch; font-size: 1.0625rem; color: #d5e5ef; }
.stage { background: var(--p-ground); border-radius: 12px; padding: clamp(16px, 3vw, 28px); color: var(--p-ink); font-family: var(--font-body); }
.stage { --p-ground: #10141a; --p-surface: #191f27; --p-border: #2c3743; --p-ink: #e6ecf3; --p-dim: #97a4b4; --p-accent: #6f92bd; --p-ok: #4fbe93; --p-warn: #ddb44a; --p-bad: #ee8579; }
:root:not([data-theme="dark"]) .stage.follows-theme { --p-ground: #eef0f3; --p-surface: #fff; --p-border: #d2d8e0; --p-ink: #161b22; --p-dim: #56606e; --p-accent: #364f6a; --p-ok: #1c6e52; --p-warn: #7e610f; --p-bad: #a03227; }
.stage__cap { font-size: 0.9375rem; color: var(--p-dim); margin: 0 0 12px; }
.hss { display: grid; gap: 1px; background: var(--p-border); border: 1px solid var(--p-border); border-radius: 10px; overflow: hidden; grid-template-columns: 1fr; margin-bottom: 28px; }
@media (min-width: 400px) { .hss { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 760px) { .hss { grid-template-columns: repeat(4, minmax(0, 1fr)); } .hss--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.hss__tile { background: var(--p-surface); padding: 14px 16px; text-align: left; border: 0; color: var(--p-ink); font: inherit; min-width: 0; }
.hss__label { display: block; font: 500 0.8125rem var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--p-dim); overflow-wrap: anywhere; }
.hss__fig { display: block; font-size: 1.6rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.2; margin: 4px 0 2px; }
.hss__sub { display: block; font-size: 0.875rem; color: var(--p-dim); }
.hss__fig.is-missing { color: var(--p-dim); }
button.hss__tile { cursor: pointer; }
button.hss__tile:hover { background: color-mix(in srgb, var(--p-accent) 8%, var(--p-surface)); }
button.hss__tile[aria-pressed="true"] { background: color-mix(in srgb, var(--p-accent) 18%, var(--p-surface)); box-shadow: inset 0 -3px 0 var(--p-accent); }
.dl { list-style: none; margin: 0; padding: 0; border: 1px solid var(--p-border); border-radius: 10px; overflow: hidden; }
.dl li { display: flex; justify-content: space-between; gap: 12px; padding: 12px 16px; background: var(--p-surface); border-top: 1px solid var(--p-border); flex-wrap: wrap; }
.dl li:first-child { border-top: 0; }
.dl li[hidden] { display: none; }
.st { font: 500 0.8125rem var(--font-mono); text-transform: uppercase; letter-spacing: 0.05em; }
.st--done { color: var(--p-ok); } .st--fail { color: var(--p-bad); } .st--queue { color: var(--p-dim); } .st--dl { color: var(--p-warn); }
.stage__status { margin: 12px 0 0; font-size: 0.9375rem; color: var(--p-dim); }
.uses { columns: 2; column-gap: 32px; padding-left: 1.2em; margin: 0; }
@media (max-width: 640px) { .uses { columns: 1; } }
.uses li { margin-bottom: 6px; color: var(--ink); }
.uses li::marker { color: var(--glow); }
.neighbours { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 640px) { .neighbours { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .snow { display: none; }
}

/* ---------- long dives: one section that passes through several zones ---------- */
.zone--dive {
  background: linear-gradient(var(--sun-bot) 0, var(--tw-top) 170px, var(--tw-mid) 16%, var(--tw-bot) 34%, var(--mid-top) 40%, var(--mid-bot) 72%, var(--aby-bot));
}
.zone--lifted { z-index: 3; }

/* project rows: image and text side by side, alternating */
.project-row { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 0; }
.project-row:nth-child(even) .card__media { order: 2; }
.project-row .card__media { aspect-ratio: auto; min-height: 280px; background: #020a13; }
.project-row .card__media img { object-fit: contain; }
.project-row .card__body { padding: 28px; justify-content: center; }
.project-row h3 { font-family: var(--font-display); font-weight: 400; font-size: 2rem; }
.project-list { display: grid; gap: 22px; }
@media (max-width: 800px) {
  .project-row { grid-template-columns: 1fr; }
  .project-row:nth-child(even) .card__media { order: 0; }
  .project-row .card__media { min-height: 200px; }
}
.stars { font: 500 0.875rem var(--font-mono); color: var(--glow-amber); }
.zone--sun .stars { color: var(--c-tools); }
.no-image { display: grid; place-items: center; color: var(--glow); font: 500 0.875rem var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; background: radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--glow) 18%, transparent), transparent 60%), #020a13; }

/* stories: fiction in the abyss */
.stories { position: relative; }
.stories::before {
  content: ""; position: absolute; inset: -40px 0 auto; height: 520px; z-index: -1; pointer-events: none;
  background: url("assets/abyss-siphonophore.webp") right top / 720px auto no-repeat;
  opacity: 0.5;
}
.story .card__media { aspect-ratio: 4 / 3; }
.story__part { font-family: var(--font-display); font-style: italic; font-size: 3.5rem; line-height: 1; color: var(--glow-violet); text-shadow: 0 0 24px rgba(201, 179, 255, 0.6); }
.story--soon { opacity: 0.72; border-style: dashed; }
.story--soon .story__part { color: #8f86b3; text-shadow: none; }
.original { display: flex; gap: 14px; align-items: flex-start; }
.original b { color: var(--glow-amber); }

.creature--a { right: 3%; top: 140px; width: 110px; }
.creature--b { left: 2%; top: 42%; width: 90px; opacity: 0.55; }
.creature--c { right: 8%; top: 50%; width: 180px; opacity: 0.5; }
@media (max-width: 900px) { .creature { display: none; } }

.jump { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.jump a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--ink); text-decoration: none; font-weight: 500; background: var(--surface); }
.jump a:hover { background: var(--surface-2); }
.jump a span { font: 500 0.8125rem var(--font-mono); color: var(--ink-2); }
.year { font: 500 0.875rem var(--font-mono); letter-spacing: 0.12em; color: var(--glow); margin: 40px 0 8px; }
.tagcloud { display: flex; flex-wrap: wrap; gap: 10px; }
.tagcloud a { font: 500 0.9375rem var(--font-mono); min-height: 40px; display: inline-flex; align-items: center; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.tagcloud a:hover { border-color: var(--glow-cyan); box-shadow: 0 0 16px -4px var(--glow-cyan); }
.tagcloud small { color: var(--ink-2); margin-left: 6px; font-size: 0.8125rem; }
[hidden] { display: none !important; }
.code pre code, .pane pre code { background: none; border: 0; padding: 0; font: inherit; color: inherit; }
.prose .chips { padding-left: 0; } .prose .chips li + li { margin-top: 0; }
/* vary the category glyph so a row of one category doesn't read as duplicates */
#pattern-grid .card:nth-child(even) .specimen svg { transform: scaleX(-1); }
#pattern-grid .card:nth-child(3n) .specimen svg { transform: scale(0.8) rotate(-6deg); }
#pattern-grid .card:nth-child(4n+1) .specimen { background: radial-gradient(circle at 30% 70%, color-mix(in srgb, var(--cat) 26%, transparent), transparent 60%), #020a13; }
.project-row .card__media { aspect-ratio: 16 / 10; min-height: 0; align-self: center; }

/* gallery article */
.prose .prose-figure { margin: 1.75em 0; }
.prose .prose-figure img { display: block; width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--line); }
.prose blockquote.callout { margin-inline: 0; }
.prose .callout p + p { margin-top: .75em; }
.prose code { overflow-wrap: anywhere; }
