:root {
  /* Typography source notes: Cormorant Garamond (Google Fonts), Libre Baskerville (Google Fonts), IBM Plex Mono (Google Fonts); interactions use Intersection Observer. */
  --abyss: #0a1628;
  --hadal: #132238;
  --panel: #1a3050;
  --text: #d4e8f0;
  --muted: #8aa8bc;
  --cyan: #00d4aa;
  --violet: #6c5ce7;
  --gold: #c4a35a;
  --sidebar: 280px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--abyss);
  color: var(--text);
  font-family: "Libre Baskerville", Georgia, serif;
  line-height: 1.8;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 58% 16%, rgba(0, 212, 170, 0.11), transparent 34rem),
    radial-gradient(circle at 80% 70%, rgba(108, 92, 231, 0.12), transparent 36rem),
    linear-gradient(180deg, #0a1628 0%, #132238 34%, #0a1628 100%);
  z-index: -4;
}

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

.depth-sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--sidebar);
  padding: 42px 32px;
  background: linear-gradient(180deg, rgba(19, 34, 56, 0.92), rgba(10, 22, 40, 0.78));
  border-right: 1px solid rgba(138, 168, 188, 0.15);
  backdrop-filter: blur(18px);
  z-index: 20;
}

.sidebar-title {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.8rem;
  letter-spacing: 0.03em;
  color: var(--text);
  margin-bottom: 56px;
}

.depth-nav {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 34px;
}

.depth-nav::before, .depth-nav::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 8px;
  width: 1px;
  height: calc(100% - 16px);
  background: rgba(138, 168, 188, 0.22);
}

.depth-nav::after {
  height: var(--progress, 0%);
  background: linear-gradient(180deg, var(--cyan), var(--violet));
  box-shadow: 0 0 18px rgba(0, 212, 170, 0.38);
  transition: height 500ms cubic-bezier(.4,0,.2,1);
}

.depth-link {
  display: grid;
  grid-template-columns: 16px 1fr;
  gap: 16px;
  align-items: center;
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  transition: color 300ms ease-in-out;
}

.depth-node {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--hadal);
  border: 1px solid rgba(0, 212, 170, 0.46);
  z-index: 2;
  transition: transform 300ms ease-in-out, box-shadow 300ms ease-in-out, background 300ms ease-in-out;
}

.depth-link.active { color: var(--text); }
.depth-link.active .depth-node {
  transform: scale(1.4);
  background: var(--cyan);
  box-shadow: 0 0 20px rgba(0, 212, 170, 0.4), 0 0 60px rgba(0, 212, 170, 0.16);
}

.depth-readout {
  position: absolute;
  bottom: 36px;
  font-family: "IBM Plex Mono", monospace;
  color: var(--cyan);
  font-size: 0.9rem;
}

.ocean-page { margin-left: var(--sidebar); }
.zone {
  position: relative;
  min-height: 100vh;
  padding: 120px clamp(32px, 6vw, 110px);
  isolation: isolate;
}

.hero-zone {
  display: grid;
  place-items: center;
  text-align: center;
  background: radial-gradient(circle at center, rgba(26,48,80,0.7), rgba(10,22,40,0.97) 62%);
}

.curved-grid {
  position: absolute;
  inset: 0;
  opacity: 0.38;
  background-image:
    radial-gradient(ellipse at center, transparent 0 48%, rgba(212,232,240,0.045) 49%, transparent 51%),
    linear-gradient(rgba(212,232,240,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(212,232,240,0.04) 1px, transparent 1px);
  background-size: 45vw 28vw, 72px 72px, 72px 72px;
  transform: skewY(-3deg) scale(1.08);
  z-index: -3;
}

.sonar { position: absolute; width: min(72vw, 760px); aspect-ratio: 1.45; z-index: -1; }
.sonar span {
  position: absolute;
  inset: 50%;
  border: 1px solid rgba(0, 212, 170, 0.36);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: sonarPulse 6s ease-in-out infinite;
  box-shadow: 0 0 20px rgba(0, 212, 170, 0.2), inset 0 0 30px rgba(108, 92, 231, 0.09);
}
.sonar span:nth-child(1) { width: 26%; height: 26%; }
.sonar span:nth-child(2) { width: 48%; height: 48%; animation-delay: .6s; border-color: rgba(108, 92, 231, 0.34); }
.sonar span:nth-child(3) { width: 70%; height: 70%; animation-delay: 1.2s; }
.sonar span:nth-child(4) { width: 94%; height: 94%; animation-delay: 1.8s; border-color: rgba(196, 163, 90, 0.22); }

h1, h2 {
  font-family: "Cormorant Garamond", Georgia, serif;
  letter-spacing: 0.02em;
  line-height: 1.04;
  margin: 0;
}
h1 { font-size: clamp(3.1rem, 9vw, 7.8rem); text-shadow: 0 0 42px rgba(0,212,170,0.16); }
h2 { font-size: clamp(2rem, 5vw, 4.5rem); color: var(--text); }
p { margin: 0; }
.tagline { max-width: 720px; margin: 24px auto 0; color: var(--muted); font-size: clamp(1rem, 1.8vw, 1.3rem); }
.mono-mark, .panel-caption {
  font-family: "IBM Plex Mono", monospace;
  color: var(--cyan);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.scroll-cue { position: absolute; bottom: 42px; left: 50%; width: 22px; height: 42px; transform: translateX(-50%); }
.scroll-cue span { display: block; width: 16px; height: 16px; border-right: 1px solid var(--cyan); border-bottom: 1px solid var(--cyan); transform: rotate(45deg); animation: sink 2.8s ease-in-out infinite; }

.twilight-zone { background: linear-gradient(180deg, rgba(19,34,56,0.86), rgba(10,22,40,0.92)); }
.bathyal-zone { background: linear-gradient(180deg, rgba(10,22,40,0.95), rgba(19,34,56,0.82)); }
.abyssal-zone { background: radial-gradient(circle at 72% 45%, rgba(26,48,80,0.34), transparent 42rem), #0a1628; display: grid; place-items: center; }
.hadal-zone { min-height: 72vh; display: grid; align-content: center; justify-items: center; text-align: center; background: #0a1628; }

.content-card, .section-heading {
  max-width: 720px;
  margin: 0 auto;
}
.content-card {
  position: relative;
  padding: clamp(30px, 5vw, 58px);
  background: rgba(26, 48, 80, 0.42);
  border: 1px solid rgba(138, 168, 188, 0.14);
  border-radius: 34% 66% 55% 45% / 22% 28% 72% 78%;
  box-shadow: inset 0 0 70px rgba(0, 212, 170, 0.035), 0 24px 90px rgba(0,0,0,0.22);
  animation: cardMorph 24s ease-in-out infinite;
}
.summary { color: var(--muted); margin: 22px 0; font-size: 1.08rem; }
.disclosure-content {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 600ms ease-out, opacity 500ms ease-out 100ms;
}
.disclosure-card.open .disclosure-content { max-height: 480px; opacity: 1; }
.disclosure-content p + p { margin-top: 18px; }
.disclosure-card { cursor: pointer; }

.blob {
  position: absolute;
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  opacity: 0.12;
  filter: blur(2px);
  z-index: -1;
  animation: blobMorph 28s ease-in-out infinite;
  will-change: border-radius;
}
.blob-one { width: 42vw; height: 34vw; left: 4vw; top: 18vh; background: var(--panel); box-shadow: 0 0 80px rgba(0,212,170,0.18); }
.blob-two { width: 60vw; height: 48vw; right: -16vw; top: 8vh; background: var(--violet); animation-duration: 32s; }
.blob-three { width: 48vw; height: 42vw; left: -18vw; bottom: 8vh; background: var(--panel); animation-duration: 36s; }

.node-graph { position: absolute; width: 220px; left: 8%; bottom: 14%; opacity: .78; overflow: visible; }
.node-graph path, .network-viz path { fill: none; stroke: var(--cyan); stroke-width: 1.2; filter: drop-shadow(0 0 9px rgba(0,212,170,.5)); opacity: .75; }
.node-graph circle, .network-viz circle { fill: var(--cyan); filter: drop-shadow(0 0 12px rgba(0,212,170,.72)); }

.section-heading { text-align: center; margin-bottom: 72px; }
.section-heading p:last-child { color: var(--muted); margin-top: 20px; }
.showcase-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; width: min(1180px, 100%); margin: 0 auto; }
.viz-panel {
  min-height: 360px;
  padding: 24px;
  border-radius: 38px;
  background: rgba(26,48,80,0.48);
  border: 1px solid rgba(138,168,188,0.13);
  box-shadow: 0 0 20px rgba(0, 212, 170, 0.05), 0 0 60px rgba(0, 212, 170, 0.03);
  overflow: hidden;
}
.panel-caption { display: flex; justify-content: space-between; color: var(--muted); }
.line-viz, .network-viz { width: 100%; height: 250px; }
.grid-path { fill: none; stroke: rgba(212,232,240,0.06); stroke-width: 1; }
.data-line { fill: none; stroke-width: 3; }
.data-line.cyan { stroke: var(--cyan); }
.hot { fill: var(--cyan); filter: drop-shadow(0 0 13px rgba(0,212,170,.84)); }
.violet-panel .network-viz path { stroke: var(--violet); filter: drop-shadow(0 0 9px rgba(108,92,231,.6)); }
.violet-panel .network-viz circle { fill: var(--violet); filter: drop-shadow(0 0 13px rgba(108,92,231,.75)); }
.gold-panel { box-shadow: 0 0 22px rgba(196,163,90,.08); }
.scatter-viz { position: relative; height: 250px; border-radius: 28px; background-image: linear-gradient(rgba(212,232,240,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(212,232,240,.045) 1px, transparent 1px); background-size: 54px 54px; }
.scatter-viz span { position: absolute; left: var(--x); top: var(--y); width: var(--s); height: var(--s); border-radius: 50%; background: var(--gold); box-shadow: 0 0 18px rgba(196,163,90,.52), 0 0 46px rgba(196,163,90,.16); animation: glowPulse 4s ease-in-out infinite; }

.final-dot { width: 16px; height: 16px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 20px rgba(0,212,170,.4), 0 0 60px rgba(0,212,170,.12); animation: glowPulse 4s ease-in-out infinite; margin-bottom: 34px; }
.hadal-zone h2 { max-width: 680px; }
.footer-links { display: flex; gap: 28px; margin-top: 42px; color: var(--muted); font-size: .92rem; }
.footer-links a:hover { color: var(--cyan); }

@keyframes sonarPulse { 0%,100% { opacity: .42; transform: translate(-50%,-50%) scale(.98); } 50% { opacity: .9; transform: translate(-50%,-50%) scale(1.04); } }
@keyframes sink { 0%,100% { opacity: .25; transform: translateY(0) rotate(45deg); } 50% { opacity: 1; transform: translateY(14px) rotate(45deg); } }
@keyframes glowPulse { 0%,100% { box-shadow: 0 0 16px rgba(0,212,170,.15), 0 0 48px rgba(0,212,170,.08); } 50% { box-shadow: 0 0 24px rgba(0,212,170,.4), 0 0 70px rgba(108,92,231,.18); } }
@keyframes blobMorph { 0%,100% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; } 25% { border-radius: 58% 42% 66% 34% / 48% 28% 72% 52%; } 50% { border-radius: 44% 56% 38% 62% / 64% 52% 48% 36%; } 75% { border-radius: 72% 28% 52% 48% / 34% 68% 32% 66%; } }
@keyframes cardMorph { 0%,100% { border-radius: 34% 66% 55% 45% / 22% 28% 72% 78%; } 50% { border-radius: 52% 48% 35% 65% / 42% 60% 40% 58%; } }

@media (max-width: 980px) {
  .showcase-grid { grid-template-columns: 1fr; }
  .viz-panel { min-height: 300px; }
  .node-graph { display: none; }
}

@media (max-width: 768px) {
  :root { --sidebar: 0px; }
  .depth-sidebar { right: 0; bottom: auto; width: 100%; height: 82px; padding: 14px 18px; border-right: 0; border-bottom: 1px solid rgba(138,168,188,.15); }
  .sidebar-title, .depth-readout { display: none; }
  .depth-nav { flex-direction: row; justify-content: space-between; gap: 0; }
  .depth-nav::before, .depth-nav::after { left: 8px; top: 7px; height: 1px; width: calc(100% - 16px); }
  .depth-nav::after { width: var(--progress, 0%); height: 1px; }
  .depth-link { grid-template-columns: 1fr; justify-items: center; gap: 7px; font-size: .58rem; }
  .depth-label { max-width: 58px; text-align: center; line-height: 1.2; }
  .ocean-page { margin-left: 0; }
  .zone { padding: 120px 22px 80px; }
  .footer-links { flex-direction: column; gap: 12px; }
}
