:root {
  /* Design typography note: Space Mono** for very small terminal readouts. */
  --cyan: #35F6E8;
  --pink: #FF6FB1;
  --yellow: #FFE55C;
  --violet: #8B5CFF;
  --mint: #A8FFB8;
  --ink: #102033;
  --shell: #FFF7E8;
  --coral: #FF8A5B;
  --hand: 'Reenie Beanie', cursive;
  --tag: 'Patrick Hand', cursive;
  --body: 'Nunito Sans', system-ui, sans-serif;
  --mono: 'Space Mono', monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--shell);
  background: radial-gradient(circle at 18% 12%, rgba(139, 92, 255, .45), transparent 28%), radial-gradient(circle at 82% 28%, rgba(255, 111, 177, .35), transparent 24%), linear-gradient(145deg, #102033 0%, #152b3f 48%, #102033 100%);
  font-family: var(--body);
  overflow-x: hidden;
}

.tank-border {
  position: fixed;
  inset: 16px;
  z-index: 20;
  pointer-events: none;
  border: 4px solid transparent;
  border-radius: 28px;
  background: linear-gradient(var(--ink), var(--ink)) padding-box, conic-gradient(from var(--spin, 0deg), var(--cyan), var(--pink), var(--yellow), var(--violet), var(--mint), var(--cyan)) border-box;
  filter: drop-shadow(0 0 18px rgba(53, 246, 232, .45));
  animation: drawTank 1.8s ease-out both, candySpin 8s linear infinite 1.8s;
}

@property --spin { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
@keyframes candySpin { to { --spin: 360deg; } }
@keyframes drawTank { from { clip-path: inset(0 100% 100% 0 round 28px); opacity: .2; } to { clip-path: inset(0 0 0 0 round 28px); opacity: 1; } }

.scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  opacity: .18;
  background: repeating-linear-gradient(0deg, transparent 0 7px, rgba(255, 247, 232, .12) 8px 9px), radial-gradient(ellipse at center, transparent 48%, rgba(53, 246, 232, .16));
}

.instrument-panel {
  position: fixed;
  top: 28px;
  left: 34px;
  right: 34px;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 18px;
  pointer-events: none;
}
.instrument-panel a { pointer-events: auto; color: var(--shell); text-decoration: none; }
.domain-mark { font-family: var(--hand); font-size: 34px; color: var(--cyan) !important; text-shadow: 0 0 14px rgba(53, 246, 232, .8); transform: rotate(-2deg); }
.portholes { display: flex; gap: 8px; }
.portholes span { width: 13px; height: 13px; border-radius: 50%; border: 2px solid var(--shell); background: var(--cyan); box-shadow: 0 0 10px currentColor; }
.portholes span:nth-child(2) { background: var(--pink); }
.portholes span:nth-child(3) { background: var(--yellow); }
.begin-drift, .drift-again {
  margin-left: auto;
  font-family: var(--tag);
  font-size: 20px;
  color: var(--ink) !important;
  background: var(--yellow);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 6px 14px;
  box-shadow: 5px 5px 0 var(--pink);
}

.edge-coordinates {
  position: fixed;
  z-index: 25;
  right: 30px;
  bottom: 28px;
  display: flex;
  gap: 16px;
  font: 12px var(--mono);
  color: var(--mint);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.chamber {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  display: grid;
  place-items: center;
  padding: 110px 9vw;
  isolation: isolate;
}
.chamber::before {
  content: '';
  position: absolute;
  inset: 9vh 7vw;
  border-radius: 40px;
  background: linear-gradient(135deg, rgba(53, 246, 232, .12), rgba(168, 255, 184, .05));
  border: 1px solid rgba(255, 247, 232, .12);
  transform: skewY(-4deg);
  z-index: -2;
}
.isometric-grid {
  position: absolute;
  inset: 0;
  opacity: .22;
  background-image: linear-gradient(30deg, rgba(53, 246, 232, .55) 1px, transparent 1px), linear-gradient(150deg, rgba(255, 111, 177, .42) 1px, transparent 1px);
  background-size: 72px 42px;
  transform: rotateX(58deg) rotateZ(-35deg) scale(1.5);
}

.annotation-panel {
  position: relative;
  max-width: 660px;
  padding: 28px 34px 32px;
  color: var(--ink);
  background: rgba(255, 247, 232, .88);
  border-radius: 28px;
  box-shadow: 14px 18px 0 rgba(53, 246, 232, .18), 0 0 44px rgba(255, 111, 177, .28);
  transform: rotate(-1.5deg);
}
.candy-card { border: 4px solid transparent; background: linear-gradient(rgba(255,247,232,.9), rgba(255,247,232,.9)) padding-box, linear-gradient(90deg, var(--cyan), var(--pink), var(--yellow), var(--violet), var(--cyan)) border-box; background-size: auto, 300% 100%; animation: cardRace 5s linear infinite; }
@keyframes cardRace { to { background-position: 0 0, 300% 0; } }
.hero-note { margin-left: -16vw; margin-top: 3vh; }
.left-panel { justify-self: start; }
.right-panel { justify-self: end; transform: rotate(1.5deg); }
.center-panel { text-align: center; }
.specimen-tag { font-family: var(--tag); font-size: 22px; color: var(--violet); background: var(--mint); padding: 2px 10px; border-radius: 999px; border: 2px solid var(--ink); }
h1, h2 { font-family: var(--hand); margin: 16px 0 10px; font-weight: 400; line-height: .86; }
h1 { font-size: clamp(78px, 15vw, 180px); color: var(--pink); text-shadow: 3px 3px 0 var(--cyan); }
h2 { font-size: clamp(54px, 8vw, 104px); color: var(--violet); }
.lyric { font-family: var(--hand); font-size: clamp(38px, 5vw, 62px); line-height: .9; margin: 12px 0; color: var(--ink); }
.body-copy { font-size: 18px; line-height: 1.7; margin: 12px 0 0; }
code, .terminal-chip { font-family: var(--mono); }
.terminal-chip { position: absolute; left: 10vw; bottom: 15vh; padding: 10px 14px; border: 1px solid var(--mint); border-radius: 12px; color: var(--mint); background: rgba(16, 32, 51, .72); font-size: 12px; box-shadow: 0 0 18px rgba(168,255,184,.28); }
.chip-right { left: auto; right: 12vw; bottom: 18vh; }

.fish, .mirror-fish {
  position: absolute;
  width: 92px;
  height: 54px;
  border-radius: 60% 40% 45% 55%;
  background: linear-gradient(135deg, var(--yellow), var(--pink));
  border: 3px solid var(--ink);
  box-shadow: 8px 8px 0 rgba(16, 32, 51, .22), 0 0 20px rgba(255,229,92,.35);
  animation: swim 18s linear infinite, bob 3.4s ease-in-out infinite;
  z-index: -1;
}
.fish::before { content: ''; position: absolute; right: -28px; top: 12px; border-left: 32px solid var(--cyan); border-top: 16px solid transparent; border-bottom: 16px solid transparent; filter: drop-shadow(2px 2px 0 var(--ink)); }
.fish::after { content: ''; position: absolute; left: 16px; top: 13px; width: 10px; height: 10px; border-radius: 50%; background: var(--ink); }
.fish span { position: absolute; inset: 8px 20px auto auto; font: 24px var(--tag); color: var(--ink); }
.fish-school .fish:nth-child(1) { top: 28vh; left: -12vw; }
.fish-school .fish:nth-child(2) { top: 42vh; left: -18vw; animation-delay: -7s; background: linear-gradient(135deg, var(--cyan), var(--mint)); }
.fish-school .fish:nth-child(3) { top: 60vh; left: -22vw; animation-delay: -12s; background: linear-gradient(135deg, var(--violet), var(--pink)); }
.large { width: 130px; height: 78px; top: 56vh; left: 50vw; animation-duration: 22s; }
.fish-puffer { right: 18vw; bottom: 26vh; left: auto; width: 84px; height: 84px; border-radius: 50%; background: radial-gradient(circle, var(--mint), var(--cyan)); animation: pufferPulse 4s ease-in-out infinite; }
.fish-puffer::before { right: -22px; top: 26px; }
@keyframes swim { from { transform: translateX(-12vw) translateY(0) rotateY(0); } to { transform: translateX(126vw) translateY(-12vh) rotateY(0); } }
@keyframes bob { 50% { margin-top: -18px; } }
@keyframes pufferPulse { 50% { transform: scale(1.18); box-shadow: 0 0 36px var(--cyan); } }

.reef-shelf { position: absolute; right: 12vw; bottom: 18vh; display: flex; gap: 10px; transform: rotateX(58deg) rotateZ(-35deg); }
.reef-shelf span { width: 86px; height: 86px; background: linear-gradient(135deg, var(--coral), var(--pink)); border: 3px solid var(--ink); box-shadow: 12px 12px 0 rgba(16,32,51,.3); }
.reef-shelf span:nth-child(2) { background: linear-gradient(135deg, var(--mint), var(--cyan)); transform: translateY(-28px); }
.reef-shelf span:nth-child(3) { background: linear-gradient(135deg, var(--yellow), var(--coral)); }
.bubble-line { position: absolute; right: 12vw; top: 22vh; display: grid; gap: 18px; }
.bubble-line span { font-family: var(--tag); font-size: 25px; color: var(--ink); background: rgba(255,247,232,.82); border: 3px solid var(--cyan); border-radius: 50%; padding: 18px 24px; animation: bubble 5s ease-in-out infinite; }
.bubble-line span:nth-child(2) { animation-delay: -1.6s; border-color: var(--pink); }
.bubble-line span:nth-child(3) { animation-delay: -3s; border-color: var(--yellow); }
@keyframes bubble { 50% { transform: translateY(-24px) rotate(4deg); } }

.mirror-fish { right: 18vw; top: 28vh; width: 230px; height: 130px; display: grid; grid-template-columns: repeat(3, 1fr); place-items: center; padding: 18px; background: linear-gradient(135deg, var(--violet), var(--cyan), var(--pink)); animation: mirrorDrift 8s ease-in-out infinite; }
.mirror-fish::before { content: ''; position: absolute; right: -54px; top: 34px; border-left: 60px solid var(--yellow); border-top: 32px solid transparent; border-bottom: 32px solid transparent; filter: drop-shadow(3px 3px 0 var(--ink)); }
.mirror-fish i, .mirror-fish b, .mirror-fish em { background: rgba(255,247,232,.82); color: var(--ink); border-radius: 10px; padding: 8px; font-family: var(--tag); }
.mirror-fish b { font-family: var(--mono); }
@keyframes mirrorDrift { 50% { transform: translate(-38px, 28px) rotate(3deg); } }
.answer-balloon { position: absolute; right: 13vw; top: 22vh; width: min(360px, 70vw); padding: 24px; border-radius: 36px 36px 36px 8px; background: var(--shell); color: var(--ink); border: 4px solid var(--pink); font: 32px/.95 var(--hand); box-shadow: 0 0 28px rgba(255,111,177,.45); transform: scale(.92); transition: transform .5s ease, border-color .5s ease; }
.answer-balloon.expanded { transform: scale(1.08) rotate(-2deg); border-color: var(--cyan); }
.drift-again { display: inline-block; margin: 26px auto 0; }
.label-fish { position: fixed; z-index: 26; left: 50%; top: 50%; padding: 8px 15px; border-radius: 999px; background: var(--pink); color: var(--ink); border: 2px solid var(--ink); font: 20px var(--tag); pointer-events: none; box-shadow: 0 0 18px rgba(255,111,177,.6); transition: background .4s ease; }

@media (max-width: 760px) {
  .instrument-panel { left: 24px; right: 24px; gap: 10px; }
  .domain-mark { font-size: 26px; }
  .begin-drift { font-size: 17px; padding: 5px 10px; }
  .portholes { display: none; }
  .chamber { padding: 100px 28px; }
  .hero-note, .left-panel, .right-panel { margin: 0; justify-self: center; }
  h1 { font-size: 78px; }
  .lyric { font-size: 38px; }
  .mirror-fish, .answer-balloon, .reef-shelf, .bubble-line { opacity: .55; transform: scale(.75); right: 2vw; }
  .edge-coordinates { display: none; }
}
