/* ==========================================================================
   Ajeet — Hobby Arcade
   Plain CSS. No build step. Organised top-down:
   tokens → base → ambience → topbar → hero → sections → toolbar → cards
   → notes → cta → footer → lightbox → motion → responsive
   ========================================================================== */

/* ---------- tokens ---------- */
:root {
  color-scheme: dark;

  --bg: #04121a;
  --bg-soft: #061a24;
  --panel: #0a1e28;
  --panel-2: #0c2632;
  --line: rgba(160, 235, 250, 0.1);
  --line-strong: rgba(160, 235, 250, 0.2);
  --line-soft: rgba(160, 235, 250, 0.06);
  --text: #e8f6fb;
  --text-soft: #bcd8e4;
  --muted: #87a9b8;
  --muted-dim: #648692;

  --mint: #58f5c8;
  --mint-hover: #74ffd8;
  --on-accent: #04140f;
  --accent-text: #58f5c8;
  --violet: #8b7cff;
  --pink: #ff6b9d;
  --amber: #ffc857;
  --sky: #4cc9f0;
  --live: #4ade80;
  --focus: #58f5c8;

  --accent: var(--mint);

  --font-display: "Space Grotesk", "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Code", Consolas, monospace;

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 22px;

  --wrap: 1200px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);

  --shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.9);
  --card-hover-shadow: 0 26px 50px -28px rgba(0, 0, 0, 0.95),
    0 0 0 1px color-mix(in srgb, var(--accent) 10%, transparent);

  /* surfaces & glass */
  --glass-1: rgba(255, 255, 255, 0.025);
  --glass-2: rgba(255, 255, 255, 0.08);
  --glass-3: rgba(255, 255, 255, 0.12);
  --input-bg: rgba(16, 18, 27, 0.7);
  --input-bg-focus: rgba(16, 18, 27, 0.95);
  --option-bg: #0a2029;
  --topbar-bg: rgba(4, 18, 26, 0.72);
  --card-top: rgba(13, 34, 44, 0.96);
  --card-bottom: rgba(6, 20, 28, 0.96);
  --media-bg: #051821;
  --ph-bg: #06202a;
  --skel-a: #071c26;
  --skel-b: #0d2c38;
  --note-top: rgba(12, 32, 42, 0.5);
  --note-bottom: rgba(4, 16, 22, 0.5);
  --note-hover-top: rgba(13, 39, 50, 0.75);
  --note-hover-bottom: rgba(5, 18, 25, 0.6);
  --cta-bg: rgba(6, 24, 32, 0.85);

  /* ambience */
  --ambient-top: #0c4a5c;
  --ambient-base: #04121a;
  --grid-line: rgba(120, 220, 240, 0.05);
  --glow-a: rgba(64, 224, 208, 0.16);
  --glow-b: rgba(56, 132, 255, 0.14);
  --vignette: rgba(1, 9, 14, 0.72);

  --scroll-track: #05161e;
  --scroll-thumb: #1a3642;
  --scroll-thumb-hover: #24485a;

  /* accents */
  --grad-a: #58f5c8;
  --grad-b: #8b7cff;
  --grad-c: #ff6b9d;
  --accent-08: rgba(88, 245, 200, 0.08);
  --accent-14: rgba(88, 245, 200, 0.14);
  --accent-30: rgba(88, 245, 200, 0.3);
  --accent-35: rgba(88, 245, 200, 0.35);
  --code-bg: rgba(88, 245, 200, 0.08);
  --code-border: rgba(88, 245, 200, 0.14);

  /* player */
  --player-bg: rgba(8, 26, 34, 0.9);
  --player-border: rgba(150, 230, 245, 0.18);
  --player-shadow: 0 22px 50px -22px rgba(0, 0, 0, 0.7);
  --track-bg: rgba(200, 240, 250, 0.16);
  --overlay: rgba(2, 12, 18, 0.88);

  --theme-icon: #c8ecff;

  /* reef growth */
  --growth-lichen-a: #7fd39b;
  --growth-lichen-b: #d6c473;
  --growth-lichen-c: #4d9f77;
  --growth-lichen-d: #a9e4b9;
  --growth-grass: #2f9e6b;
  --growth-grass-2: #69c78d;
  --growth-shell: #efe6cf;
  --growth-shell-dark: rgba(54, 44, 26, 0.45);
  --ripple-line: rgba(120, 240, 210, 0.55);
  --ripple-glow: rgba(88, 245, 200, 0.28);
}

/* ---------- light theme ---------- */
:root[data-theme="light"] {
  color-scheme: light;

  --bg: #e1f3f7;
  --bg-soft: #d3ebf1;
  --panel: #ffffff;
  --panel-2: #f4fbfd;
  --line: rgba(9, 46, 60, 0.1);
  --line-strong: rgba(9, 46, 60, 0.2);
  --line-soft: rgba(9, 46, 60, 0.07);
  --text: #08222b;
  --text-soft: #2d4b57;
  --muted: #4d6b77;
  --muted-dim: #5f7f8a;

  --mint: #0fbf92;
  --mint-hover: #16d3a1;
  --on-accent: #04140f;
  --accent-text: #067a5c;
  --violet: #6d5ce7;
  --pink: #d92b69;
  --amber: #b45309;
  --live: #0f9d58;
  --focus: #067a5c;

  --shadow: 0 30px 60px -34px rgba(22, 40, 80, 0.35);
  --card-hover-shadow: 0 26px 50px -30px rgba(22, 40, 80, 0.35),
    0 0 0 1px color-mix(in srgb, var(--mint) 12%, transparent);

  --glass-1: rgba(13, 23, 42, 0.025);
  --glass-2: rgba(13, 23, 42, 0.06);
  --glass-3: rgba(13, 23, 42, 0.09);
  --input-bg: rgba(255, 255, 255, 0.85);
  --input-bg-focus: #ffffff;
  --option-bg: #ffffff;
  --topbar-bg: rgba(225, 243, 247, 0.82);
  --card-top: rgba(255, 255, 255, 0.98);
  --card-bottom: rgba(246, 252, 254, 0.98);
  --media-bg: #dbedf3;
  --ph-bg: #e2f3f8;
  --skel-a: #e3f1f5;
  --skel-b: #f6fdff;
  --note-top: rgba(255, 255, 255, 0.75);
  --note-bottom: rgba(240, 250, 253, 0.65);
  --note-hover-top: #ffffff;
  --note-hover-bottom: rgba(235, 249, 252, 0.9);
  --cta-bg: rgba(255, 255, 255, 0.9);

  --ambient-top: #a6dbe8;
  --ambient-base: #e1f3f7;
  --grid-line: rgba(10, 80, 100, 0.055);
  --glow-a: rgba(0, 170, 190, 0.16);
  --glow-b: rgba(0, 130, 220, 0.1);
  --vignette: rgba(210, 240, 246, 0.5);

  --scroll-track: #e6f4f8;
  --scroll-thumb: #b9d7df;
  --scroll-thumb-hover: #9dc2cd;

  --grad-a: #0a9d78;
  --grad-b: #5b4bd6;
  --grad-c: #c81e5c;
  --accent-08: rgba(15, 191, 146, 0.1);
  --accent-14: rgba(15, 191, 146, 0.16);
  --accent-30: rgba(15, 191, 146, 0.35);
  --accent-35: rgba(15, 191, 146, 0.45);
  --code-bg: rgba(15, 191, 146, 0.1);
  --code-border: rgba(15, 191, 146, 0.22);

  --player-bg: rgba(255, 255, 255, 0.92);
  --player-border: rgba(9, 60, 80, 0.14);
  --player-shadow: 0 22px 44px -26px rgba(10, 60, 80, 0.35);
  --track-bg: rgba(9, 60, 80, 0.14);
  --overlay: rgba(226, 244, 249, 0.9);

  --theme-icon: #f59e0b;

  --growth-lichen-a: #4b8f5f;
  --growth-lichen-b: #9c8734;
  --growth-lichen-c: #33704f;
  --growth-lichen-d: #76b98a;
  --growth-grass: #1f7a50;
  --growth-grass-2: #4d9f6b;
  --growth-shell: #b8a781;
  --growth-shell-dark: rgba(60, 48, 24, 0.5);
  --ripple-line: rgba(7, 122, 92, 0.4);
  --ripple-glow: rgba(15, 191, 146, 0.22);
}

/* ---------- base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  background: var(--bg);
  transition: background-color 0.5s var(--ease);
}

body {
  margin: 0;
  min-height: 100vh;
  background: transparent;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: color 0.4s var(--ease);
}

body.no-scroll {
  overflow: hidden;
}

h1, h2, h3 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

p {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

::selection {
  background: var(--accent-35);
  color: var(--text);
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -60px;
  left: 16px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: 0 0 10px 10px;
  background: var(--mint);
  color: var(--on-accent);
  font-weight: 600;
  transition: top 0.2s var(--ease);
}

.skip-link:focus {
  top: 0;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 40px);
}

.i {
  width: 1.05em;
  height: 1.05em;
  flex: none;
}

code {
  font-family: var(--font-mono);
  font-size: 0.86em;
  color: var(--accent-text);
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: 5px;
  padding: 1px 5px;
}

/* scrollbar */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: var(--scroll-track);
}
::-webkit-scrollbar-thumb {
  background: var(--scroll-thumb);
  border-radius: 10px;
  border: 2px solid var(--scroll-track);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--scroll-thumb-hover);
}

/* ---------- ambience ---------- */
.ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background:
    radial-gradient(1100px 620px at 50% -12%, var(--ambient-top) 0%, transparent 62%),
    var(--ambient-base);
  pointer-events: none;
  transition: background 0.6s var(--ease);
}

.ambient__canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

/* A second, transparent canvas above the page for the occasional diver that
   swims in front of the copy. It never catches pointer events. */
.diver-front {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .diver-front {
    display: none;
  }
}

/* ---------- reef growth on the interface ---------- */
.reef-growth {
  position: absolute;
  z-index: 6;
  display: block;
  pointer-events: none;
  user-select: none;
  opacity: 0.82;
  transform: scale(var(--gscale, 1));
  transition: opacity 0.55s ease, transform 0.55s var(--ease), filter 0.55s ease;
}

.reef-growth--inset {
  inset: 0;
  width: 100%;
  height: 100%;
}

/* A soft dusting of algae across the letterforms. The dots are tiny, so the
   words stay sharp while the surface looks colonised. */
.reef-growth--film {
  z-index: 5;
  opacity: 0.3;
  mix-blend-mode: screen;
  background-image:
    radial-gradient(circle at 2% 24%, var(--growth-lichen-a) 0 1.8px, transparent 3.2px),
    radial-gradient(circle at 9% 72%, var(--growth-lichen-c) 0 2px, transparent 3.6px),
    radial-gradient(circle at 16% 38%, var(--growth-lichen-d) 0 1.5px, transparent 2.9px),
    radial-gradient(circle at 23% 84%, var(--growth-lichen-b) 0 1.9px, transparent 3.4px),
    radial-gradient(circle at 31% 16%, var(--growth-lichen-a) 0 1.8px, transparent 3.2px),
    radial-gradient(circle at 39% 62%, var(--growth-lichen-c) 0 1.5px, transparent 2.9px),
    radial-gradient(circle at 47% 30%, var(--growth-lichen-b) 0 2px, transparent 3.6px),
    radial-gradient(circle at 55% 88%, var(--growth-lichen-a) 0 1.5px, transparent 2.9px),
    radial-gradient(circle at 63% 48%, var(--growth-lichen-d) 0 1.9px, transparent 3.4px),
    radial-gradient(circle at 71% 12%, var(--growth-lichen-c) 0 1.6px, transparent 3px),
    radial-gradient(circle at 79% 70%, var(--growth-lichen-b) 0 2px, transparent 3.6px),
    radial-gradient(circle at 87% 34%, var(--growth-lichen-a) 0 1.5px, transparent 2.9px),
    radial-gradient(circle at 94% 80%, var(--growth-lichen-c) 0 1.8px, transparent 3.2px),
    radial-gradient(circle at 68% 96%, var(--growth-lichen-d) 0 1.4px, transparent 2.8px),
    radial-gradient(circle at 38% 4%, var(--growth-lichen-a) 0 1.5px, transparent 2.9px);
  filter: blur(0.2px);
}

:root[data-theme="light"] .reef-growth--film {
  mix-blend-mode: multiply;
  opacity: 0.2;
  filter: blur(0.15px);
}

.reef-growth--lichen {
  border-radius: 48% 52% 55% 45% / 58% 46% 54% 42%;
  transform: scale(var(--gscale, 1)) rotate(var(--grot, 0deg));
  background-image:
    radial-gradient(circle at 13% 62%, var(--growth-lichen-b) 0 2.3px, transparent 4.1px),
    radial-gradient(circle at 29% 32%, var(--growth-lichen-a) 0 2.7px, transparent 4.6px),
    radial-gradient(circle at 47% 68%, var(--growth-lichen-c) 0 3.1px, transparent 5.2px),
    radial-gradient(circle at 63% 26%, var(--growth-lichen-a) 0 2.1px, transparent 3.8px),
    radial-gradient(circle at 77% 56%, var(--growth-lichen-d) 0 2.9px, transparent 5px),
    radial-gradient(circle at 90% 34%, var(--growth-lichen-b) 0 2.2px, transparent 4px),
    radial-gradient(circle at 18% 88%, var(--growth-lichen-c) 0 2px, transparent 3.7px),
    radial-gradient(circle at 54% 92%, var(--growth-lichen-a) 0 1.8px, transparent 3.3px),
    radial-gradient(circle at 82% 84%, var(--growth-lichen-d) 0 2.4px, transparent 4.3px);
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.25));
}

/* A faint crust under the spots keeps the cluster from reading as bubbles. */
.reef-growth--lichen::before {
  content: "";
  position: absolute;
  inset: -10%;
  border-radius: inherit;
  background: radial-gradient(ellipse at 50% 55%, var(--growth-lichen-c) 0 24%, transparent 70%);
  opacity: 0.2;
  filter: blur(1px);
}

.reef-growth--barnacle {
  background-image:
    radial-gradient(circle at 9% 72%, var(--growth-shell) 0 2.4px, var(--growth-shell-dark) 2.5px 3.2px, transparent 3.7px),
    radial-gradient(circle at 28% 48%, var(--growth-shell) 0 1.9px, var(--growth-shell-dark) 2px 2.7px, transparent 3.2px),
    radial-gradient(circle at 46% 76%, var(--growth-shell) 0 2.2px, var(--growth-shell-dark) 2.3px 3px, transparent 3.5px),
    radial-gradient(circle at 64% 38%, var(--growth-shell) 0 2.6px, var(--growth-shell-dark) 2.7px 3.5px, transparent 4px),
    radial-gradient(circle at 82% 66%, var(--growth-shell) 0 2px, var(--growth-shell-dark) 2.1px 2.8px, transparent 3.3px),
    radial-gradient(circle at 94% 30%, var(--growth-shell) 0 1.7px, var(--growth-shell-dark) 1.8px 2.5px, transparent 3px);
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.22));
}

.reef-growth--seagrass {
  color: var(--growth-grass);
}

.reef-growth--seagrass svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  transform-origin: 50% 100%;
  animation: reef-sway 5.8s ease-in-out var(--gdelay, 0s) infinite;
}

.reef-growth .blade {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
}

.reef-growth .blade--b { stroke: var(--growth-grass-2); }
.reef-growth .blade--c { stroke: var(--growth-lichen-a); }

.reef-growth.is-cleaned {
  opacity: 0;
  transform: scale(0.35) translateY(-6px) rotate(6deg);
  filter: blur(3px);
}

.reef-growth--film.is-cleaned {
  transform: none;
}

.reef-growth--seagrass.is-cleaned svg {
  animation-play-state: paused;
}

@keyframes reef-sway {
  0%, 100% { transform: scaleX(var(--gflip, 1)) rotate(-2deg); }
  50% { transform: scaleX(var(--gflip, 1)) rotate(3.2deg); }
}

@media (prefers-reduced-motion: reduce) {
  .reef-growth {
    transition: none;
  }
  .reef-growth--seagrass svg {
    animation: none;
  }
}

@media (max-width: 640px) {
  .reef-growth--lichen {
    --gscale: 0.72;
  }
  .reef-growth--barnacle {
    --gscale: 0.8;
  }
}

.ambient__grid {
  position: absolute;
  inset: -2px;
  background-image:
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 95% 62% at 50% 0%, #000 20%, transparent 76%);
  mask-image: radial-gradient(ellipse 95% 62% at 50% 0%, #000 20%, transparent 76%);
}

.ambient__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.5;
  transition: background 0.6s var(--ease);
}

.ambient__glow--a {
  width: 520px;
  height: 520px;
  top: -180px;
  right: -60px;
  background: var(--glow-a);
}

.ambient__glow--b {
  width: 620px;
  height: 620px;
  top: 420px;
  left: -260px;
  background: var(--glow-b);
}

.ambient__vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 90% at 50% 40%, transparent 55%, var(--vignette) 100%);
  transition: background 0.6s var(--ease);
}

/* ---------- topbar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  border-bottom: 1px solid transparent;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease), backdrop-filter 0.3s;
}

.topbar.is-scrolled {
  background: var(--topbar-bg);
  border-bottom-color: var(--line);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-size: 1.02rem;
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(145deg, var(--accent-14), color-mix(in srgb, var(--violet) 14%, transparent));
  border: 1px solid var(--accent-30);
  color: var(--mint);
  box-shadow: inset 0 0 18px var(--accent-08);
}

.brand__mark svg {
  width: 18px;
  height: 18px;
}

.brand__dot {
  color: var(--mint);
}

.nav {
  display: flex;
  align-items: center;
  gap: 26px;
  font-size: 0.9rem;
}

.nav > a:not(.nav__cta) {
  color: var(--muted);
  transition: color 0.2s;
}

.nav > a:not(.nav__cta):hover {
  color: var(--text);
}

.nav__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--glass-1);
  font-size: 0.86rem;
  font-weight: 500;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.nav__cta:hover {
  border-color: var(--accent-30);
  background: var(--accent-08);
  color: var(--accent-text);
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.92rem;
  font-weight: 500;
  white-space: nowrap;
  transition: transform 0.2s var(--ease), background 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.25s;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn--primary {
  background: var(--mint);
  color: var(--on-accent);
  font-weight: 600;
  box-shadow: 0 10px 30px -12px var(--accent-35);
}

.btn--primary:hover {
  background: var(--mint-hover);
  box-shadow: 0 16px 38px -14px var(--accent-35);
}

.btn--ghost {
  border-color: var(--line-strong);
  background: var(--glass-1);
  color: var(--text-soft);
}

.btn--ghost:hover {
  border-color: var(--accent-30);
  color: var(--text);
  background: var(--accent-08);
}

.btn--sm {
  padding: 8px 14px;
  font-size: 0.8rem;
  gap: 6px;
}

.btn--sm .i {
  width: 0.95em;
  height: 0.95em;
}

/* ---------- hero ---------- */
.hero {
  padding-top: clamp(56px, 9vw, 108px);
  padding-bottom: clamp(40px, 6vw, 72px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 26px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mint);
}

.eyebrow__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 0 var(--accent-35);
  animation: pulse 2.6s infinite;
}

.eyebrow__sep {
  color: var(--muted-dim);
}

#hero-count {
  color: var(--muted);
}

.hero__title {
  max-width: 18ch;
  font-size: clamp(2.55rem, 6.4vw, 4.9rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 0.99;
}

.grad {
  background: linear-gradient(100deg, var(--mint) 0%, var(--violet) 52%, var(--pink) 96%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.hero__lede {
  max-width: 62ch;
  margin-top: 28px;
  font-size: clamp(1rem, 1.35vw, 1.1rem);
  line-height: 1.7;
  color: var(--text-soft);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(32px, 6vw, 72px);
  margin: clamp(46px, 7vw, 72px) 0 0;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.stat dt {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted-dim);
}

.stat dd {
  margin: 4px 0 0;
  font-size: clamp(1.6rem, 2.6vw, 2.1rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

/* ---------- sections ---------- */
.section {
  padding-top: clamp(40px, 6vw, 64px);
  scroll-margin-top: 90px;
}

.section__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}

.section__title {
  font-size: clamp(1.6rem, 3vw, 2.15rem);
  letter-spacing: -0.03em;
}

.section__sub {
  margin-top: 8px;
  max-width: 62ch;
  font-size: 0.92rem;
  color: var(--muted);
}

.section__count {
  flex: none;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  color: var(--muted-dim);
  white-space: nowrap;
}

/* ---------- toolbar ---------- */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  justify-content: space-between;
}

.search {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 280px;
  max-width: 480px;
  padding: 0 14px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--input-bg);
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.search:focus-within {
  border-color: var(--accent-30);
  background: var(--input-bg-focus);
  box-shadow: 0 0 0 3px var(--accent-08);
}

.search .i {
  color: var(--muted-dim);
  width: 17px;
  height: 17px;
}

.search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  background: none;
  font-size: 0.9rem;
  outline: none;
}

.search input::placeholder {
  color: var(--muted-dim);
}

.search input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  height: 14px;
  width: 14px;
  background: linear-gradient(45deg, transparent 44%, var(--muted) 44% 56%, transparent 56%),
    linear-gradient(-45deg, transparent 44%, var(--muted) 44% 56%, transparent 56%);
  cursor: pointer;
}

.search kbd {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--glass-1);
  color: var(--muted-dim);
  font-family: var(--font-mono);
  font-size: 0.7rem;
}

.toolbar__right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.segmented {
  display: flex;
  padding: 3px;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--input-bg);
}

.segmented__btn {
  display: grid;
  place-items: center;
  width: 34px;
  height: 32px;
  border-radius: 7px;
  color: var(--muted-dim);
  transition: background 0.18s, color 0.18s;
}

.segmented__btn .i {
  width: 16px;
  height: 16px;
}

.segmented__btn:hover {
  color: var(--text);
}

.segmented__btn.is-active {
  background: var(--glass-2);
  color: var(--accent-text);
}

.sort {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--input-bg);
}

.sort__label {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-dim);
}

.sort select {
  border: 0;
  background: transparent;
  color: var(--text-soft);
  font-size: 0.84rem;
  outline: none;
  cursor: pointer;
  padding-right: 18px;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238e96ad' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0 center;
  background-size: 13px;
}

.sort select option {
  background: var(--option-bg);
  color: var(--text);
}

/* ---------- chips ---------- */
.chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 20px 0 26px;
}

/* On phones the chip list becomes one swipeable row instead of five. */
@media (max-width: 720px) {
  .chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 4px;
    margin-right: calc(clamp(20px, 4vw, 40px) * -1);
    padding-right: clamp(20px, 4vw, 40px);
    -webkit-overflow-scrolling: touch;
    -webkit-mask-image: linear-gradient(to right, #000 88%, transparent 100%);
    mask-image: linear-gradient(to right, #000 88%, transparent 100%);
  }

  .chips::-webkit-scrollbar {
    display: none;
  }
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: none;
  height: 32px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--glass-1);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.03em;
  white-space: nowrap;
  transition: border-color 0.18s, color 0.18s, background 0.18s;
}

.chip:hover {
  border-color: var(--accent-30);
  color: var(--text);
}

.chip.is-active {
  background: var(--mint);
  border-color: var(--mint);
  color: var(--on-accent);
  font-weight: 600;
}

.chip__n {
  font-size: 0.64rem;
  opacity: 0.65;
}

.chip--divider {
  width: 1px;
  height: 18px;
  padding: 0;
  margin: 0 4px;
  border: 0;
  background: var(--line);
  pointer-events: none;
}

/* ---------- grid ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 318px), 1fr));
  gap: 22px;
}

/* ---------- card ---------- */
.card {
  --accent: var(--mint);
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, var(--card-top) 0%, var(--card-bottom) 100%);
  overflow: hidden;
  transition:
    transform 0.28s var(--ease),
    border-color 0.25s,
    box-shadow 0.3s;
}

.card.in {
  animation: cardIn 0.55s var(--ease) backwards;
  animation-delay: calc(var(--i, 0) * 45ms);
}

.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 3;
}

.card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--accent) 34%, transparent);
  box-shadow: var(--card-hover-shadow);
}

.card:hover::before {
  opacity: 0.85;
}

.card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--media-bg);
  overflow: hidden;
  flex: none;
}

.card__shot {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: zoom-in;
  overflow: hidden;
}

.card__shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transform: scale(1.005);
  transition: transform 0.6s var(--ease), opacity 0.4s;
  opacity: 0;
}

.card__shot img.is-loaded {
  opacity: 1;
}

.card:hover .card__shot img {
  transform: scale(1.045);
}

/* skeleton while the image resolves */
.card__skeleton {
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, var(--skel-a) 20%, var(--skel-b) 40%, var(--skel-a) 60%);
  background-size: 220% 100%;
  animation: shimmer 1.5s linear infinite;
  z-index: 0;
}

.card.has-shot .card__skeleton {
  display: none;
}

/* fallback art when there is no image at all */
.card__ph {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  background:
    radial-gradient(120% 120% at 15% 0%, color-mix(in srgb, var(--accent) 26%, transparent), transparent 55%),
    radial-gradient(100% 100% at 100% 100%, color-mix(in srgb, var(--violet) 22%, transparent), transparent 55%),
    var(--ph-bg);
  z-index: 1;
}

.card.no-shot .card__ph {
  display: grid;
}

.card.no-shot .card__skeleton {
  display: none;
}

.card.no-shot .card__shot {
  cursor: default;
}

.card.no-shot .card__zoom {
  display: none;
}

.card__ph::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000, transparent 78%);
  mask-image: radial-gradient(circle at 50% 50%, #000, transparent 78%);
}

.card__ph span {
  position: relative;
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: color-mix(in srgb, var(--accent) 72%, var(--text));
  opacity: 0.9;
  text-shadow: 0 6px 30px var(--accent-30);
}

.card__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(5, 6, 10, 0.34) 0%, transparent 34%, transparent 62%, rgba(5, 6, 10, 0.55) 100%);
  pointer-events: none;
  z-index: 2;
}

.badge {
  position: absolute;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 9px;
  border-radius: 7px;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.badge--live {
  top: 12px;
  left: 12px;
  background: rgba(6, 20, 12, 0.7);
  border: 1px solid rgba(74, 222, 128, 0.35);
  color: var(--live);
}

.badge--live i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--live);
  box-shadow: 0 0 10px var(--live);
  animation: pulse 2s infinite;
}

.badge--type {
  top: 12px;
  right: 12px;
  background: rgba(8, 10, 16, 0.68);
  border: 1px solid var(--line);
  color: color-mix(in srgb, var(--accent) 85%, white);
}

.card__zoom {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(8, 10, 16, 0.72);
  border: 1px solid var(--line);
  color: var(--text-soft);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.25s, transform 0.25s;
}

.card__zoom .i {
  width: 14px;
  height: 14px;
}

.card:hover .card__zoom,
.card__shot:focus-visible .card__zoom {
  opacity: 1;
  transform: translateY(0);
}

.card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 12px;
  padding: 18px 20px 20px;
}

.card__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.card__title {
  font-size: 1.12rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.card__title a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s;
}

.card__title a .i {
  width: 13px;
  height: 13px;
  color: var(--muted-dim);
  opacity: 0;
  transform: translate(-3px, 3px);
  transition: opacity 0.2s, transform 0.2s, color 0.2s;
}

.card:hover .card__title a .i {
  opacity: 1;
  transform: none;
  color: var(--accent);
}

.card__year {
  flex: none;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--muted-dim);
}

.card__blurb {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 4.5em;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--muted);
}

.card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.card__tags li {
  padding: 2px 8px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: var(--glass-1);
  color: var(--muted-dim);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.02em;
}

.card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
}

.card__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 20px;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--muted-dim);
}

.lang {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.lang__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lang-color, #8b949e);
  box-shadow: 0 0 8px color-mix(in srgb, var(--lang-color, #8b949e) 60%, transparent);
}

.stars {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
}

.stars .i {
  width: 11px;
  height: 11px;
  color: var(--amber);
}

.updated {
  white-space: nowrap;
}

.card__actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

/* list view */
.grid.is-list {
  grid-template-columns: 1fr;
  gap: 14px;
}

.is-list .card {
  flex-direction: row;
}

.is-list .card__media {
  width: min(38%, 330px);
  border-right: 1px solid var(--line);
}

.is-list .card__body {
  padding: 18px 22px;
  justify-content: center;
}

.is-list .card__blurb {
  -webkit-line-clamp: 2;
  min-height: 0;
  max-width: 76ch;
}

.is-list .card__foot {
  margin-top: 6px;
  border-top: 0;
  padding-top: 0;
}

/* ---------- empty ---------- */
.empty {
  margin-top: 8px;
  padding: 64px 24px;
  text-align: center;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
}

.empty__title {
  font-size: 1.1rem;
  font-weight: 600;
}

.empty__sub {
  margin: 6px 0 18px;
  font-size: 0.9rem;
  color: var(--muted);
}

/* ---------- notes ---------- */
.notes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 16px;
}

.note {
  padding: 24px 24px 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--note-top), var(--note-bottom));
  transition: border-color 0.25s, background 0.25s;
}

.note:hover {
  border-color: var(--accent-30);
  background: linear-gradient(180deg, var(--note-hover-top), var(--note-hover-bottom));
}

.note__num {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  color: var(--mint);
  opacity: 0.75;
}

.note h3 {
  margin: 10px 0 8px;
  font-size: 1.02rem;
  letter-spacing: -0.015em;
}

.note p {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--muted);
}

/* ---------- cta ---------- */
.cta {
  margin-top: clamp(56px, 9vw, 100px);
}

.cta__box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  padding: clamp(28px, 4vw, 44px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(120% 160% at 100% 0%, color-mix(in srgb, var(--violet) 16%, transparent), transparent 55%),
    radial-gradient(130% 160% at 0% 100%, var(--accent-14), transparent 55%),
    var(--cta-bg);
}

.cta__title {
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
  letter-spacing: -0.03em;
}

.cta__sub {
  margin-top: 8px;
  max-width: 48ch;
  font-size: 0.9rem;
  color: var(--muted);
}

/* ---------- footer ---------- */
.footer {
  margin-top: clamp(56px, 8vw, 96px);
  padding: 26px 0 34px;
  border-top: 1px solid var(--line);
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.02em;
  color: var(--muted-dim);
}

.footer__social {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.footer__social a,
.footer__social button {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  color: var(--muted-dim);
  transition: color 0.2s, border-color 0.2s, transform 0.2s;
}

.footer__social button {
  background: none;
  cursor: pointer;
  padding: 0;
}

.footer__social a:hover,
.footer__social a:focus-visible,
.footer__social button:hover,
.footer__social button:focus-visible {
  color: var(--mint);
  border-color: var(--mint);
  transform: translateY(-2px);
}

.footer__social svg {
  width: 18px;
  height: 18px;
}

.footer__meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.footer__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mint);
  opacity: 0.75;
}

/* ---------- lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 64px;
  align-items: center;
  justify-items: center;
  gap: 8px;
  padding: 24px;
}

.lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: var(--overlay);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.lightbox__figure {
  position: relative;
  z-index: 2;
  grid-column: 2;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0;
  max-width: 1120px;
  animation: pop 0.3s var(--ease);
}

.lightbox__figure img {
  width: auto;
  max-width: 100%;
  max-height: 78vh;
  margin-inline: auto;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--media-bg);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.55);
  object-fit: contain;
}

.lightbox__caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--muted);
}

.lightbox__caption a {
  color: var(--accent-text);
  border-bottom: 1px solid var(--accent-35);
  padding-bottom: 1px;
}

.lightbox__caption a:hover {
  border-bottom-color: var(--mint);
}

.lightbox__close,
.lightbox__nav {
  position: relative;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--input-bg);
  color: var(--text-soft);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.lightbox__close:hover,
.lightbox__nav:hover {
  background: var(--accent-14);
  border-color: var(--accent-30);
  color: var(--accent-text);
}

.lightbox__close {
  position: absolute;
  top: 20px;
  right: 20px;
}

.lightbox__nav {
  justify-self: center;
}

.lightbox__nav .i {
  width: 20px;
  height: 20px;
}

/* ---------- theme switch ---------- */
.theme-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  flex: none;
  width: 64px;
  height: 32px;
  padding: 0 7px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--glass-1);
  color: var(--muted-dim);
  transition: border-color 0.2s, background 0.25s;
}

.theme-toggle:hover {
  border-color: var(--accent-30);
  background: var(--accent-08);
}

.theme-toggle__icon {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  opacity: 0.5;
  transition: opacity 0.3s, color 0.3s;
}

.theme-toggle__icon svg {
  width: 15px;
  height: 15px;
  display: block;
}

.theme-toggle__thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--panel);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3), inset 0 0 0 1px var(--line);
  transform: translateX(32px);
  transition: transform 0.34s var(--ease), background 0.3s;
}

/* night: moon is active (thumb right) */
:root:not([data-theme="light"]) .theme-toggle__icon--moon {
  opacity: 1;
  color: var(--theme-icon);
}

/* day: sun is active (thumb left) */
:root[data-theme="light"] .theme-toggle__thumb {
  transform: translateX(0);
}

:root[data-theme="light"] .theme-toggle__icon--sun {
  opacity: 1;
  color: var(--theme-icon);
}

/* ---------- music player (navbar) ---------- */
.player {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex: none;
  height: 34px;
  padding: 3px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--glass-1);
  transition: border-color 0.2s, background 0.25s;
}

.player:hover,
.player[data-open="true"] {
  border-color: var(--accent-30);
  background: var(--accent-08);
}

.player__open {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: var(--muted);
  transition: color 0.2s, background 0.2s;
}

.player__open:hover,
.player__open[aria-expanded="true"] {
  color: var(--text);
  background: var(--glass-2);
}

.player__note svg {
  width: 16px;
  height: 16px;
  display: block;
}

.player[data-state="playing"] .player__note {
  display: none;
}

.player[data-state="paused"] .player__eq {
  display: none;
}

.player__eq {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 13px;
}

.player__eq i {
  width: 2.5px;
  height: 30%;
  border-radius: 2px;
  background: var(--mint);
  animation: eq 1s ease-in-out infinite;
}

.player__eq i:nth-child(2) { animation-delay: 0.18s; }
.player__eq i:nth-child(3) { animation-delay: 0.36s; }
.player__eq i:nth-child(4) { animation-delay: 0.09s; }

.player__toggle {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--mint);
  color: var(--on-accent);
  transition: background 0.2s, transform 0.2s var(--ease);
}

.player__toggle:hover {
  background: var(--mint-hover);
  transform: scale(1.06);
}

.player__toggle:active {
  transform: scale(0.95);
}

.player__icon {
  display: grid;
  place-items: center;
}

.player__icon svg {
  width: 14px;
  height: 14px;
  display: block;
}

.player[data-state="paused"] .player__icon--pause,
.player[data-state="playing"] .player__icon--play {
  display: none;
}

/* dropdown panel */
.player__panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 80;
  width: min(300px, calc(100vw - 28px));
  padding: 14px 15px 11px;
  border: 1px solid var(--player-border);
  border-radius: 16px;
  background: var(--player-bg);
  box-shadow: var(--player-shadow);
  -webkit-backdrop-filter: blur(20px) saturate(170%);
  backdrop-filter: blur(20px) saturate(170%);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(0.98);
  transform-origin: top right;
  transition: opacity 0.2s var(--ease), transform 0.22s var(--ease), visibility 0.22s;
}

.player__panel::before {
  content: "";
  position: absolute;
  top: -6px;
  right: 22px;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  border-top: 1px solid var(--player-border);
  border-left: 1px solid var(--player-border);
  background: var(--player-bg);
  transform: rotate(45deg);
}

.player[data-open="true"] .player__panel {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.player__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.player__meta {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.player__label {
  font-family: var(--font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted-dim);
  line-height: 1.4;
}

.player__title {
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player__mute {
  display: grid;
  place-items: center;
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  color: var(--muted);
  transition: background 0.2s, color 0.2s;
}

.player__mute:hover {
  background: var(--glass-2);
  color: var(--text);
}

.player__icon--muted {
  display: none;
}

.player.is-muted .player__icon--vol {
  display: none;
}

.player.is-muted .player__icon--muted {
  display: grid;
}

.player.is-loading .player__toggle {
  animation: playerLoad 1.1s ease-in-out infinite;
}

.player__row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}

.player__volicon svg {
  width: 14px;
  height: 14px;
  display: block;
}

/* sliders */
.player__range {
  -webkit-appearance: none;
  appearance: none;
  height: 18px;
  margin: 0;
  background: transparent;
  cursor: pointer;
  --fill: 0%;
}

.player__range::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(
    to right,
    var(--mint) 0 var(--fill),
    var(--track-bg) var(--fill) 100%
  );
}

.player__range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 10px;
  height: 10px;
  margin-top: -3px;
  border-radius: 50%;
  background: var(--panel);
  border: 2px solid var(--mint);
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.35);
  transition: transform 0.15s var(--ease);
}

.player__range:hover::-webkit-slider-thumb,
.player__range:focus-visible::-webkit-slider-thumb {
  transform: scale(1.2);
}

.player__range::-moz-range-track {
  height: 4px;
  border-radius: 999px;
  background: var(--track-bg);
}

.player__range::-moz-range-progress {
  height: 4px;
  border-radius: 999px;
  background: var(--mint);
}

.player__range::-moz-range-thumb {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--panel);
  border: 2px solid var(--mint);
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.35);
}

.player__seek {
  width: 100%;
  margin: 2px 0 1px;
}

.player__vol {
  flex: 1;
  min-width: 0;
}

.player__vol::-webkit-slider-thumb {
  width: 8px;
  height: 8px;
  margin-top: -2px;
}

@keyframes eq {
  0%, 100% { height: 18%; }
  50% { height: 100%; }
}

@keyframes playerLoad {
  50% { opacity: 0.45; }
}

/* ---------- theme crossfade (View Transitions) ---------- */
::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}

::view-transition-old(root) {
  animation: theme-fade 1s var(--ease) both;
}

::view-transition-new(root) {
  animation: theme-wipe 1.15s cubic-bezier(0.22, 0.68, 0.24, 1) both;
}

/* The new theme opens like a stone dropped into water: a circular wash plus
   three rings that spread out from the toggle button. */
@keyframes theme-wipe {
  from { clip-path: circle(0% at var(--vt-x, 50%) var(--vt-y, 50%)); }
  45% { clip-path: circle(62% at var(--vt-x, 50%) var(--vt-y, 50%)); }
  to { clip-path: circle(155% at var(--vt-x, 50%) var(--vt-y, 50%)); }
}

@keyframes theme-fade {
  to { opacity: 0.55; }
}

.theme-ripple {
  position: fixed;
  inset: 0;
  z-index: 150;
  overflow: hidden;
  pointer-events: none;
}

.theme-ripple i {
  position: absolute;
  left: var(--rx, 50%);
  top: var(--ry, 50%);
  width: 44px;
  height: 44px;
  margin: -22px 0 0 -22px;
  border-radius: 50%;
  border: 1px solid var(--ripple-line);
  box-shadow: 0 0 20px var(--ripple-glow), inset 0 0 14px var(--ripple-glow);
  opacity: 0;
  animation: theme-ring 2.2s cubic-bezier(0.16, 0.72, 0.24, 1) forwards;
}

.theme-ripple i:nth-child(2) {
  width: 62px;
  height: 62px;
  margin: -31px 0 0 -31px;
  animation-delay: 0.34s;
}

.theme-ripple i:nth-child(3) {
  width: 86px;
  height: 86px;
  margin: -43px 0 0 -43px;
  animation-delay: 0.68s;
}

@keyframes theme-ring {
  0% { opacity: 0; transform: scale(0.14); }
  10% { opacity: 0.9; }
  62% { opacity: 0.5; }
  100% { opacity: 0; transform: scale(26); }
}

@media (prefers-reduced-motion: reduce) {
  .theme-ripple { display: none; }
}

/* ---------- bubble burst (phone shake / fast cursor) ---------- */
.bubble-burst {
  position: fixed;
  inset: 0;
  z-index: 92;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* ---------- motion ---------- */
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 var(--accent-35); }
  70% { box-shadow: 0 0 0 7px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

@keyframes shimmer {
  0% { background-position: 120% 0; }
  100% { background-position: -120% 0; }
}

@keyframes cardIn {
  from { opacity: 0; translate: 0 18px; }
  to { opacity: 1; translate: 0 0; }
}

@keyframes pop {
  from { opacity: 0; transform: scale(0.985); }
  to { opacity: 1; transform: scale(1); }
}

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .section__head {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .is-list .card__media {
    width: min(42%, 280px);
  }
}

@media (max-width: 720px) {
  .nav {
    gap: 14px;
  }

  .nav > a:not(.nav__cta) {
    display: none;
  }

  .topbar__inner {
    height: 60px;
  }

  .hero {
    padding-top: 48px;
  }

  .hero__title {
    max-width: none;
  }

  .hero__br {
    display: none;
  }

  .stats {
    gap: 28px;
  }

  .toolbar {
    align-items: stretch;
  }

  .search {
    max-width: none;
    flex-basis: 100%;
  }

  .toolbar__right {
    justify-content: space-between;
    width: 100%;
  }

  .sort {
    flex: 1;
    justify-content: space-between;
  }

  .sort select {
    flex: 1;
  }

  .is-list .card {
    flex-direction: column;
  }

  .is-list .card__media {
    width: 100%;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .lightbox {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .lightbox__figure {
    grid-column: 1;
  }

  .lightbox__nav {
    display: none;
  }

  .lightbox__figure img {
    max-height: 70vh;
  }
}

/* Phones: turn each card into a compact horizontal row with a small poster
   on the left, so a shelf of projects fits on one screen instead of turning
   into giant full-width posters. */
@media (max-width: 560px) {
  .grid:not(.is-list) {
    gap: 12px;
  }

  .grid:not(.is-list) .card {
    flex-direction: row;
    border-radius: 14px;
  }

  .grid:not(.is-list) .card__media {
    flex: 0 0 106px;
    width: 106px;
    aspect-ratio: auto;
    align-self: stretch;
  }

  .grid:not(.is-list) .card__body {
    justify-content: center;
    gap: 5px;
    padding: 11px 12px 12px 13px;
  }

  .grid:not(.is-list) .card__top {
    gap: 8px;
  }

  .grid:not(.is-list) .card__title {
    font-size: 0.96rem;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .grid:not(.is-list) .card__title a .i {
    display: none;
  }

  .grid:not(.is-list) .card__year {
    font-size: 0.58rem;
    padding: 1px 5px;
  }

  .grid:not(.is-list) .card__blurb {
    -webkit-line-clamp: 2;
    min-height: 0;
    font-size: 0.77rem;
    line-height: 1.42;
  }

  .grid:not(.is-list) .card__tags,
  .grid:not(.is-list) .card__meta {
    display: none;
  }

  .grid:not(.is-list) .card__foot {
    margin-top: 3px;
    padding-top: 7px;
    flex-wrap: nowrap;
    gap: 6px;
  }

  .grid:not(.is-list) .card__actions {
    margin-left: auto;
    width: auto;
    gap: 5px;
  }

  .grid:not(.is-list) .card__actions .btn {
    flex: 0 0 auto;
    padding: 4px 8px;
    font-size: 0.68rem;
    gap: 4px;
  }

  .grid:not(.is-list) .card__actions .btn .i {
    width: 11px;
    height: 11px;
  }

  .grid:not(.is-list) .badge {
    height: 18px;
    padding: 0 6px;
    font-size: 0.5rem;
    border-radius: 5px;
  }

  .grid:not(.is-list) .badge--live {
    top: 6px;
    left: 6px;
  }

  .grid:not(.is-list) .badge--type,
  .grid:not(.is-list) .card__zoom {
    display: none;
  }
}

@media (max-width: 460px) {
  .nav {
    gap: 12px;
  }

  .nav__cta {
    padding: 8px 11px;
  }

  .nav__cta span {
    display: none;
  }

  .card__body {
    padding: 16px 16px 18px;
  }

  .card__blurb {
    min-height: 0;
  }

  .card__foot {
    align-items: flex-start;
    flex-direction: column;
  }

  .card__actions {
    width: 100%;
  }

  .card__actions .btn {
    flex: 1;
  }

  .footer__inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 360px) {
  .topbar__inner {
    gap: 10px;
  }

  .nav {
    gap: 8px;
  }

  .brand {
    font-size: 0.96rem;
  }

  .nav__cta {
    padding: 8px 9px;
  }

  .grid:not(.is-list) .card__media {
    flex-basis: 92px;
    width: 92px;
  }

  .grid:not(.is-list) .card__body {
    gap: 4px;
    padding: 10px 10px 10px 11px;
  }

  .grid:not(.is-list) .card__actions .btn {
    padding: 4px 7px;
  }
}

@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;
  }

  .card {
    opacity: 1;
    translate: none;
    animation: none !important;
  }
}

/* ---------- sonar search ---------- */
.card.is-dim,
.card.is-dim.in {
  opacity: 0.42;
  transition: opacity 0.6s ease;
}

.card.is-hit {
  border-color: rgba(88, 245, 200, 0.4);
}

.card.is-pinged {
  animation: sonarGlow 1.6s ease-out var(--ping-delay, 0s) 1 both;
}

@keyframes sonarGlow {
  0% { box-shadow: 0 0 0 0 rgba(88, 245, 200, 0); }
  30% { box-shadow: 0 0 26px rgba(88, 245, 200, 0.28); }
  100% { box-shadow: 0 0 14px rgba(88, 245, 200, 0.12); }
}

.sonar {
  position: fixed;
  z-index: 80;
  width: 560px;
  height: 560px;
  margin: -280px 0 0 -280px;
  border-radius: 50%;
  pointer-events: none;
  border: 1px solid rgba(88, 245, 200, 0.45);
  background: radial-gradient(circle, transparent 58%, rgba(88, 245, 200, 0.08) 82%, transparent 100%);
  animation: sonarPing 1.9s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}

.sonar::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(88, 245, 200, 0.3);
  animation: sonarPing 1.9s cubic-bezier(0.22, 0.61, 0.36, 1) 0.22s both;
}

@keyframes sonarPing {
  0% { transform: scale(0.04); opacity: 0; }
  12% { opacity: 1; }
  100% { transform: scale(1); opacity: 0; }
}

/* ---------- submarine mode ---------- */
.sub-layer {
  position: fixed;
  inset: 0;
  z-index: 90;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.sub-toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 95;
  transform: translateX(-50%);
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(4, 18, 26, 0.9);
  border: 1px solid var(--mint);
  color: var(--mint);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  pointer-events: none;
  animation: subToast 3.6s ease forwards;
}

@keyframes subToast {
  0%, 85% { opacity: 1; }
  100% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .sonar { display: none; }
  .card.is-pinged { animation: none; }
}

.sub-exit {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 96;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--mint);
  background: rgba(4, 18, 26, 0.92);
  color: var(--mint);
  font: 600 0.8rem var(--font-mono);
  cursor: pointer;
  pointer-events: auto;
}

@media (hover: none) {
  .search kbd { display: none; }
}

@media (max-width: 640px) {
  .sub-toast { width: max-content; max-width: calc(100vw - 32px); text-align: center; white-space: normal; }
  .footer__social a,
  .footer__social button { width: 44px; height: 44px; }
}

/* ---------- music ripples ---------- */
.player__ripples {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.player__ring {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 44px;
  height: 44px;
  margin: -22px 0 0 -22px;
  border-radius: 50%;
  border: 1px solid rgba(88, 245, 200, 0.5);
  animation: playerRing 2.6s ease-out forwards;
}

@keyframes playerRing {
  from { transform: scale(0.6); opacity: 0.7; }
  to { transform: scale(4.2); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .player__ripples { display: none; }
}

/* ---------- marine watch ---------- */
.watch-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.watch-btn:hover {
  border-color: var(--mint);
  color: var(--mint);
}

main,
.footer,
.brand,
.nav > a,
.nav > .watch-btn {
  transition: opacity 1.1s ease;
}

.topbar {
  transition: background 1.1s ease, border-color 1.1s ease, backdrop-filter 1.1s ease;
}

body.is-watching main,
body.is-watching .footer,
body.is-watching .brand,
body.is-watching .nav > a,
body.is-watching .nav > .watch-btn {
  opacity: 0;
  pointer-events: none;
}

body.is-watching .topbar {
  background: transparent;
  border-color: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: none;
}

.watch-exit {
  position: fixed;
  left: 50%;
  bottom: 20px;
  z-index: 97;
  transform: translate(-50%, 12px);
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid rgba(88, 245, 200, 0.5);
  background: rgba(4, 18, 26, 0.55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: var(--mint);
  font: 500 0.78rem var(--font-mono);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease 0.6s, transform 0.8s ease 0.6s;
}

body.is-watching .watch-exit {
  opacity: 0.55;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

body.is-watching .watch-exit:hover,
body.is-watching .watch-exit:focus-visible {
  opacity: 1;
}

@media (max-width: 640px) {
  .watch-btn span { display: none; }
}

/* ---------- depth meter ---------- */
.depth {
  position: fixed;
  right: 14px;
  top: 50%;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 10px;
  transform: translateY(-50%);
  pointer-events: none;
  font-family: var(--font-mono);
  color: var(--muted);
}

.depth__track {
  position: relative;
  order: 2;
  width: 2px;
  height: min(52vh, 420px);
  border-radius: 2px;
  background: linear-gradient(180deg, rgba(120, 235, 255, 0.7), rgba(88, 245, 200, 0.35) 40%, rgba(150, 120, 255, 0.35) 75%, rgba(255, 120, 220, 0.3));
}

.depth__tick {
  position: absolute;
  right: 0;
  top: calc(var(--p) * 100%);
  width: 8px;
  height: 1px;
  background: currentColor;
  opacity: 0.55;
}

.depth__tick i {
  position: absolute;
  right: 14px;
  top: -6px;
  font-style: normal;
  font-size: 0.56rem;
  letter-spacing: 0.04em;
  opacity: 0.6;
  white-space: nowrap;
}

.depth__marker {
  position: absolute;
  left: 50%;
  top: calc(var(--p, 0) * 100%);
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 12px rgba(88, 245, 200, 0.9);
}

.depth__read {
  order: 1;
  display: grid;
  gap: 2px;
  text-align: right;
  max-width: 96px;
}

.depth__read strong {
  font-size: 0.82rem;
  color: var(--mint);
  font-weight: 600;
}

.depth__read span {
  font-size: 0.58rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.8;
}

@media (max-width: 900px) {
  .depth__tick i { display: none; }
  .depth__read { display: none; }
  .depth { right: 6px; }
  .depth__track { height: min(40vh, 300px); }
}

@media (max-width: 900px) and (min-width: 480px) {
  .depth__read { display: grid; position: absolute; right: 18px; top: -34px; max-width: 120px; }
}

/* Phones: the tick labels are hidden, so keep a compact live readout pinned
   above the gauge. Without it the marker moves with no number to read. */
@media (max-width: 479px) {
  .depth { right: 4px; }
  .depth__read {
    display: grid;
    position: absolute;
    right: 14px;
    top: -30px;
    gap: 0;
    width: max-content;
    padding: 3px 7px 4px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: color-mix(in srgb, var(--bg) 80%, transparent);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
  }
  .depth__read strong { font-size: 0.76rem; }
  /* Phones keep just the number; the zone still lives in the aria-label. */
  .depth__read span { display: none; }
}

/* ---------- marine watch: fishing HUD ---------- */
.watch-hud {
  position: fixed;
  left: 50%;
  bottom: 66px;
  z-index: 97;
  display: grid;
  gap: 8px;
  justify-items: center;
  transform: translate(-50%, 12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease 0.6s, transform 0.8s ease 0.6s;
}

body.is-watching .watch-hud {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.watch-hud__tools {
  display: inline-flex;
  gap: 6px;
  padding: 5px;
  border-radius: 999px;
  border: 1px solid rgba(88, 245, 200, 0.35);
  background: rgba(4, 18, 26, 0.6);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.watch-hud__tools button {
  padding: 7px 13px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: #bfeedd;
  font: 500 0.75rem var(--font-mono);
  cursor: pointer;
  white-space: nowrap;
}

.watch-hud__tools button.is-active {
  background: rgba(88, 245, 200, 0.2);
  color: #58f5c8;
}

.watch-hud__tools b {
  margin-left: 4px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(255, 184, 107, 0.25);
  color: #ffb86b;
  font-weight: 600;
}

.watch-hud__msg {
  min-height: 1.1em;
  margin: 0;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(4, 18, 26, 0.45);
  color: #d9fff2;
  font: 0.72rem var(--font-mono);
  text-align: center;
}

.watch-hud__msg:empty { display: none; }

/* ---------- marine watch: documentary overlay ---------- */
.watch-film {
  position: fixed;
  inset: 12px;
  z-index: 75;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.9s ease 0.5s;
}

body.is-watching .watch-film {
  opacity: 1;
}

.watch-film__corner {
  position: absolute;
  width: 26px;
  height: 26px;
  border: 1px solid rgba(88, 245, 200, 0.32);
}

.watch-film__corner--tl { top: 0; left: 0; border-right: 0; border-bottom: 0; }
.watch-film__corner--tr { top: 0; right: 0; border-left: 0; border-bottom: 0; }
.watch-film__corner--bl { bottom: 0; left: 0; border-right: 0; border-top: 0; }
.watch-film__corner--br { bottom: 0; right: 0; border-left: 0; border-top: 0; }

@media (max-width: 520px) {
  .watch-hud__tools button { padding: 7px 9px; font-size: 0.68rem; }
}

/* ---------- mobile polish ---------- */
@media (max-width: 460px) {
  .watch-btn { padding: 7px 9px; }
  /* Keep the depth number crisp; only the gauge line fades back. */
  .depth { opacity: 1; }
  .depth__track { opacity: 0.65; }
  .watch-hud { bottom: 62px; max-width: calc(100vw - 16px); }
  .watch-hud__tools { max-width: 100%; overflow-x: auto; }
}

@media (max-width: 380px) {
  .nav__cta { display: none; }
  .nav { gap: 6px; }
}

@media (max-width: 640px) {
  .hero__actions { flex-wrap: wrap; }
  .hero__actions .btn { flex: 1 1 auto; justify-content: center; }
}

/* the dimmed cards and sonar must never create sideways scrolling */
html, body { overflow-x: clip; }

/* ---------- show more ---------- */
.grid.is-folded {
  -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 150px), transparent 100%);
  mask-image: linear-gradient(180deg, #000 calc(100% - 150px), transparent 100%);
}

.more {
  display: grid;
  justify-items: center;
  gap: 10px;
  margin-top: 10px;
}

.more[hidden] { display: none; }

.more__meter {
  width: min(220px, 60vw);
  height: 3px;
  border-radius: 3px;
  background: var(--line);
  overflow: hidden;
}

.more__meter span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--mint), #7cc8ff);
  transition: width 0.9s var(--ease);
}

.more__status {
  margin: 0;
  font: 0.72rem var(--font-mono);
  letter-spacing: 0.04em;
  color: var(--muted);
}

.more__btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  border: 1px solid rgba(88, 245, 200, 0.4);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(88, 245, 200, 0.14), rgba(88, 245, 200, 0.04));
  color: var(--text);
  font: 600 0.9rem var(--font-sans, inherit);
  cursor: pointer;
  transition: transform 0.25s var(--ease), border-color 0.25s, box-shadow 0.3s, background 0.25s;
}

.more__btn:hover,
.more__btn:focus-visible {
  transform: translateY(-2px);
  border-color: var(--mint);
  box-shadow: 0 8px 30px rgba(88, 245, 200, 0.18);
}

.more__btn:active { transform: translateY(0) scale(0.98); }

.more__icon,
.more__chev {
  width: 20px;
  height: 20px;
  color: var(--mint);
  flex: none;
}

.more__chev { width: 16px; height: 16px; transition: transform 0.3s var(--ease); }

.more__btn:hover .more__chev { transform: translateY(2px); }
.more__btn[aria-expanded="true"] .more__chev { transform: rotate(180deg); }
.more__btn[aria-expanded="true"]:hover .more__chev { transform: rotate(180deg) translateY(2px); }

/* the little ship dips under the surface when you click */
.more__btn.is-diving .more__icon {
  animation: iconDive 1.1s ease-in-out;
}

@keyframes iconDive {
  0% { transform: translateY(0) rotate(0); opacity: 1; }
  45% { transform: translateY(10px) rotate(-24deg); opacity: 0; }
  55% { transform: translateY(-10px) rotate(0); opacity: 0; }
  100% { transform: translateY(0) rotate(0); opacity: 1; }
}

/* newly revealed cards float up into place */
.card.rise {
  animation: cardRise 0.8s var(--ease) calc(var(--j, 0) * 70ms) backwards;
}

@keyframes cardRise {
  from { opacity: 0; transform: translateY(34px) scale(0.97); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .card.rise, .more__btn.is-diving .more__icon { animation: none; }
  .more__meter span { transition: none; }
}

/* ---------- marine watch HUD: always fully visible on phones ---------- */
.watch-hud {
  bottom: calc(66px + env(safe-area-inset-bottom, 0px));
}

.watch-exit {
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
}

.lbl-short { display: none; }

@media (max-width: 520px) {
  .watch-hud {
    left: 8px;
    right: 8px;
    transform: translateY(12px);
    justify-items: stretch;
  }

  body.is-watching .watch-hud { transform: none; }

  .watch-hud__tools {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    max-width: none;
    overflow: visible;
  }

  .watch-hud__tools button {
    padding: 9px 6px;
    font-size: 0.72rem;
    text-align: center;
  }

  .lbl-full { display: none; }
  .lbl-short { display: inline; }

  .watch-hud__msg { justify-self: center; max-width: 100%; }
}

/* Marine Watch: faded nav items leave the layout so the theme switch and the
   music player sit together instead of being spread apart by invisible links. */
body.is-watching .nav > a,
body.is-watching .nav > .watch-btn {
  position: absolute;
  visibility: hidden;
}

body.is-watching .nav {
  gap: 12px;
}

/* whale song controls inside the music panel */
.player__whale {
  margin-top: 4px;
}

.player__whalebtn {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--mint);
  cursor: pointer;
  transition: opacity 0.2s, color 0.2s;
}

.player__whalebtn svg { width: 16px; height: 16px; }

.player__whalebtn[aria-pressed="false"] {
  color: var(--muted);
  opacity: 0.55;
}

.player__whale .player__range { flex: 1; min-width: 0; }
.player__whale:has(.player__whalebtn[aria-pressed="false"]) .player__range { opacity: 0.45; }

.player__droplabel {
  font: 0.72rem var(--font-mono);
  color: var(--muted);
}

.player__drip .player__range { flex: 1; min-width: 0; }
.player__drip:has(.player__whalebtn[aria-pressed="false"]) .player__range { opacity: 0.45; }

/* ==========================================================================
   Sea-worn, kept light
   Just a small barnacle cluster in the corner of project cards. Static and
   decorative: it never catches a click and adds no per-frame cost.
   ========================================================================== */

.card {
  --brine-barn: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%2280%22 height=%2260%22 viewBox=%220 0 80 60%22%3E %3Cg fill=%22%23cdd6c4%22 stroke=%22%236f7f6c%22 stroke-width=%221.2%22%3E  %3Ccircle cx=%2218%22 cy=%2242%22 r=%2211%22/%3E%3Ccircle cx=%2238%22 cy=%2246%22 r=%228%22/%3E%3Ccircle cx=%2255%22 cy=%2240%22 r=%2212%22/%3E%3Ccircle cx=%2230%22 cy=%2228%22 r=%227%22/%3E%3Ccircle cx=%2266%22 cy=%2252%22 r=%226%22/%3E %3C/g%3E %3Cg fill=%22%231b2a2e%22%3E  %3Ccircle cx=%2218%22 cy=%2242%22 r=%224.2%22/%3E%3Ccircle cx=%2238%22 cy=%2246%22 r=%223%22/%3E%3Ccircle cx=%2255%22 cy=%2240%22 r=%224.6%22/%3E%3Ccircle cx=%2230%22 cy=%2228%22 r=%222.6%22/%3E%3Ccircle cx=%2266%22 cy=%2252%22 r=%222.2%22/%3E %3C/g%3E%3C/svg%3E");
}

.card::after {
  content: "";
  position: absolute;
  right: 8px;
  bottom: 6px;
  width: 38px;
  height: 28px;
  pointer-events: none;
  z-index: 2;
  opacity: 0.45;
  background: var(--brine-barn) no-repeat center / contain;
}

/* ==========================================================================
   Things to explore: the dive chart
   ========================================================================== */
.dive {
  display: grid;
  gap: 14px;
}

/* pinned note: stays in view while you browse the bubbles below it */
.dive__panel {
  --z: var(--mint);
  position: sticky;
  top: 74px;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid color-mix(in srgb, var(--z) 45%, transparent);
  border-radius: 18px;
  background: rgba(4, 18, 26, 0.78);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  backdrop-filter: blur(14px) saturate(150%);
  box-shadow: 0 10px 40px -16px color-mix(in srgb, var(--z) 55%, transparent);
  transition: border-color 0.4s, box-shadow 0.4s;
}

:root[data-theme="light"] .dive__panel { background: rgba(240, 252, 255, 0.82); }

.dive__panel.is-swap .dive__ptext,
.dive__panel.is-swap .dive__picon {
  animation: diveSwap 0.45s var(--ease) both;
}

@keyframes diveSwap {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.dive__picon {
  display: grid;
  place-items: center;
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  color: var(--z);
  background: color-mix(in srgb, var(--z) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--z) 55%, transparent);
}

.dive__picon svg { width: 26px; height: 26px; }

.dive__ptext { min-width: 0; flex: 1; }

.dive__pline { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.dive__pline strong { font-size: 1.02rem; letter-spacing: -0.01em; }

.dive__pline kbd {
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--z) 50%, transparent);
  color: var(--z);
  font: 0.66rem var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.dive__ptext p {
  margin: 4px 0 0;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--muted);
}

.dive__go {
  flex: none;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--z) 60%, transparent);
  background: color-mix(in srgb, var(--z) 16%, transparent);
  color: var(--z);
  font: 600 0.78rem var(--font-mono);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s, transform 0.2s;
}

.dive__go:hover { background: color-mix(in srgb, var(--z) 28%, transparent); transform: translateY(-1px); }
.dive__go[hidden] { display: none; }

/* each depth is a band of water that gets darker as you go down */
.dive__zone {
  position: relative;
  overflow: hidden;
  padding: 16px 14px 20px;
  border-radius: 22px;
  border: 1px solid color-mix(in srgb, var(--z) 22%, transparent);
  background: linear-gradient(180deg, color-mix(in srgb, var(--z) 11%, rgba(4, 22, 32, 0.6)), rgba(2, 10, 16, 0.55));
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.dive__zone.is-in { opacity: 1; transform: none; }

.dive__head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 0 4px 6px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dive__depth { color: var(--z); font-weight: 600; }
.dive__zname { color: var(--muted); }

.dive__orbs {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 6px 4px;
}

/* the bubbles */
.orb {
  display: grid;
  justify-items: center;
  gap: 7px;
  padding: 8px 4px;
  border: 0;
  background: none;
  color: var(--text);
  cursor: pointer;
  animation: orbBob 5.5s ease-in-out var(--d, 0s) infinite;
}

@keyframes orbBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

.orb__bubble {
  position: relative;
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  color: var(--z);
  border: 1px solid color-mix(in srgb, var(--z) 50%, transparent);
  background:
    radial-gradient(circle at 30% 24%, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.06) 38%, transparent 58%),
    color-mix(in srgb, var(--z) 12%, transparent);
  box-shadow: inset 0 0 18px color-mix(in srgb, var(--z) 22%, transparent), 0 6px 22px -10px color-mix(in srgb, var(--z) 70%, transparent);
  transition: transform 0.3s var(--ease), box-shadow 0.3s, border-color 0.3s;
}

.orb__bubble svg { width: 28px; height: 28px; }

.orb:hover .orb__bubble,
.orb:focus-visible .orb__bubble { transform: scale(1.1); }

.orb.is-on .orb__bubble {
  transform: scale(1.14);
  border-color: var(--z);
  box-shadow: inset 0 0 20px color-mix(in srgb, var(--z) 40%, transparent), 0 0 28px color-mix(in srgb, var(--z) 55%, transparent);
}

.orb.is-on .orb__bubble::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  border: 1px solid var(--z);
  animation: orbRing 2s ease-out infinite;
}

@keyframes orbRing {
  from { transform: scale(1); opacity: 0.7; }
  to { transform: scale(1.7); opacity: 0; }
}

.orb__label {
  font: 0.7rem/1.25 var(--font-mono);
  text-align: center;
  color: var(--muted);
  transition: color 0.25s;
}

.orb.is-on .orb__label { color: var(--text); }

/* a few slow bubbles rise through every band */
.dive__bubble {
  position: absolute;
  left: var(--x);
  bottom: -14px;
  width: var(--s);
  height: var(--s);
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--z) 55%, transparent);
  pointer-events: none;
  opacity: 0;
  animation: diveRise var(--t) linear var(--d) infinite;
}

@keyframes diveRise {
  0% { transform: translateY(0); opacity: 0; }
  15% { opacity: 0.7; }
  100% { transform: translateY(-260px); opacity: 0; }
}

@media (max-width: 640px) {
  .dive__panel { top: 66px; padding: 11px 12px; gap: 10px; }
  .dive__picon { width: 42px; height: 42px; }
  .dive__picon svg { width: 22px; height: 22px; }
  .dive__ptext p { font-size: 0.8rem; }
  .dive__go { padding: 7px 11px; font-size: 0.7rem; white-space: normal; max-width: 108px; text-align: center; }
  .dive__orbs { grid-template-columns: repeat(4, 1fr); }
  .orb__bubble { width: 56px; height: 56px; }
  .orb__bubble svg { width: 24px; height: 24px; }
  .orb__label { font-size: 0.62rem; }
}

@media (max-width: 380px) {
  .dive__orbs { grid-template-columns: repeat(3, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .orb, .dive__bubble, .orb.is-on .orb__bubble::after { animation: none; }
  .dive__zone { opacity: 1; transform: none; transition: none; }
}

/* ---------- giant squid + ink (Things to explore) ---------- */
.squid {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.squid__arm {
  z-index: 1;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.squid__skin {
  fill: url(#sqSkin);
  filter: drop-shadow(0 0 10px rgba(255, 107, 157, 0.55));
}

.squid__edge {
  fill: none;
  stroke: rgba(255, 190, 220, 0.5);
  stroke-width: 1.2;
  stroke-linecap: round;
}

.squid__suckers circle {
  fill: rgba(255, 214, 232, 0.8);
  stroke: rgba(120, 30, 90, 0.6);
  stroke-width: 0.8;
}

.squid__body {
  z-index: 2;
  position: absolute;
  opacity: 0;
  transform: translateX(90px);
  transition: opacity 0.6s ease, transform 0.8s var(--ease);
  filter: drop-shadow(0 0 22px rgba(255, 107, 157, 0.35));
}

.squid__body > svg { width: 100%; height: 100%; display: block; overflow: visible; }

.squid__spots circle { animation: squidSpot 3s ease-in-out infinite; }
.squid__spots circle:nth-child(2n) { animation-delay: 0.9s; }
.squid__spots circle:nth-child(3n) { animation-delay: 1.7s; }

@keyframes squidSpot {
  0%, 100% { opacity: 0.25; }
  50% { opacity: 0.95; }
}

.squid__eye {
  position: absolute;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  pointer-events: none;
}

.squid.is-out .squid__body { opacity: 1; transform: none; }

.squid.is-out .squid__eye {
  pointer-events: auto;
  box-shadow: 0 0 0 0 rgba(255, 158, 196, 0.8);
  animation: eyePulse 1.3s ease-out infinite;
}

@keyframes eyePulse {
  to { box-shadow: 0 0 0 22px rgba(255, 158, 196, 0); }
}

/* a swiped bubble tumbles away, then floats back in */
.orb.is-swiped {
  animation: orbSwiped 0.8s cubic-bezier(0.4, 0, 0.8, 0.6) forwards;
  pointer-events: none;
}

.orb.is-back {
  animation: orbBack 0.8s var(--ease) both;
}

@keyframes orbSwiped {
  to { transform: translate(-150px, 30px) rotate(-40deg) scale(0.3); opacity: 0; }
}

@keyframes orbBack {
  from { transform: scale(0.2); opacity: 0; }
  to { transform: none; opacity: 1; }
}

/* the ink cloud: the page goes dark, then clears */
.ink {
  position: fixed;
  inset: 0;
  z-index: 140;
  overflow: hidden;
  pointer-events: none;
  background: rgba(8, 2, 14, 0);
  transition: background 0.5s ease;
}

.ink.is-on {
  background: rgba(8, 2, 14, 0.97);
  animation: inkFade 3s ease forwards;
}

.ink span {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--s);
  height: var(--s);
  margin: calc(var(--s) / -2) 0 0 calc(var(--s) / -2);
  border-radius: 50%;
  background: radial-gradient(circle, #0b0212 45%, rgba(11, 2, 18, 0) 72%);
  transform: scale(0.05);
}

.ink.is-on span {
  animation: inkBlob 1s var(--ease) var(--d) forwards;
}

@keyframes inkBlob {
  to { transform: scale(1.4); }
}

@keyframes inkFade {
  0%, 55% { opacity: 1; }
  100% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .squid, .ink { display: none; }
}

/* squid raid: marked bubble, dodge, score, clickable tentacle */
.orb { position: relative; }

.orb.is-marked .orb__bubble {
  border-color: #ff4d6d;
  animation: markPulse 0.7s ease-in-out infinite;
}

.orb.is-marked::before {
  content: "!";
  position: absolute;
  top: 2px;
  right: calc(50% - 38px);
  z-index: 2;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ff4d6d;
  color: #fff;
  font: 700 0.8rem var(--font-mono);
  animation: markShake 0.4s ease-in-out infinite;
}

@keyframes markPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 77, 109, 0.8), inset 0 0 18px rgba(255, 77, 109, 0.3); }
  50% { box-shadow: 0 0 0 12px rgba(255, 77, 109, 0), inset 0 0 18px rgba(255, 77, 109, 0.3); }
}

@keyframes markShake {
  0%, 100% { transform: rotate(-8deg); }
  50% { transform: rotate(8deg); }
}

.orb.is-dodge {
  animation: orbDodge 0.9s var(--ease);
}

@keyframes orbDodge {
  0% { transform: translateY(0) rotate(0) scale(1); }
  35% { transform: translateY(-42px) rotate(200deg) scale(1.2); }
  100% { transform: translateY(0) rotate(360deg) scale(1); }
}

.squid__skin {
  pointer-events: auto;
  cursor: pointer;
}

.dive__score {
  margin-left: auto;
  color: #ff9ec4;
  letter-spacing: 0.06em;
}
