@import url('https://fonts.googleapis.com/css2?family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&family=Share+Tech+Mono&display=swap');

:root {
  --abyss:      #010508;
  --deep-ocean: #020c14;
  --hadal:      #040f1a;
  --bathyal:    #081828;
  --midnight:   #0e2840;
  --abyssal:    #163658;
  --trench:     #204870;
  --biolum-c:   #00e8c8;
  --biolum-b:   #00b8f8;
  --biolum-g:   #20f890;
  --sea-foam:   #a0f0e0;
  --surface:    #d8f8f8;
  --card-bg:    rgba(4,15,26,0.75);
  --card-border:rgba(0,232,200,0.15);
  --text-main:  #c0eee8;
  --text-muted: #4a8880;
  --glow:       0 0 20px rgba(0,232,200,0.15);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Libre Baskerville', Georgia, serif;
  background: var(--abyss);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Depth gradient bg ── */
.ocean-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80%  60% at 20% 50%,  rgba(0,184,248,0.04) 0%, transparent 60%),
    radial-gradient(ellipse 60%  40% at 80% 20%,  rgba(0,232,200,0.03) 0%, transparent 55%),
    radial-gradient(ellipse 100% 70% at 50% 100%, rgba(22,54,88,0.5)   0%, transparent 65%),
    linear-gradient(180deg, #010508 0%, #02080e 30%, #010506 70%, #010305 100%);
}

/* ── Bioluminescence particle canvas ── */
#biolum-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ── Layout ── */
.wrap {
  position: relative;
  z-index: 1;
  max-width: 980px;
  margin: 0 auto;
  padding: 0 28px 100px;
}

/* ── Hero: vertical depth graphic ── */
.hero {
  padding: 90px 0 70px;
  opacity: 0;
  animation: abyssRise 1.4s 0.1s cubic-bezier(0.16,1,0.3,1) forwards;
}

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

.hero-tag {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--biolum-c);
  margin-bottom: 26px;
}

.hero h1 {
  font-size: clamp(3.2rem, 8vw, 7.5rem);
  font-weight: 700;
  font-style: italic;
  line-height: 0.88;
  letter-spacing: -0.04em;
  color: var(--surface);
  position: relative;
  display: inline-block;
}
.hero h1::after {
  content: '';
  display: block;
  height: 2px;
  width: 60%;
  background: linear-gradient(90deg, var(--biolum-c), transparent);
  margin-top: 16px;
}

.hero-sub {
  margin-top: 26px;
  max-width: 620px;
  font-size: 1.1rem;
  line-height: 1.88;
  color: var(--text-muted);
  font-style: italic;
}

.hero-depth-row {
  display: flex;
  gap: 32px;
  margin-top: 36px;
  flex-wrap: wrap;
}
.depth-badge {
  padding: 14px 18px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  backdrop-filter: blur(8px);
}
.depth-num {
  font-family: 'Share Tech Mono', monospace;
  font-size: 1.6rem;
  color: var(--biolum-c);
  line-height: 1;
  display: block;
  margin-bottom: 3px;
}
.depth-lbl { font-size: 0.8rem; color: var(--text-muted); line-height: 1.4; }

/* ── Depth zones ── */
.zones-section { margin: 70px 0; opacity: 0; animation: rise 0.8s 0.9s forwards; }

.sec-label {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--biolum-c);
  margin-bottom: 10px;
}
.sec-title {
  font-size: 2.2rem;
  font-weight: 700;
  font-style: italic;
  color: var(--surface);
  margin-bottom: 30px;
  line-height: 1.1;
}

.zones-column {
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--card-border);
  position: relative;
}

.zone-row {
  display: grid;
  grid-template-columns: 120px 180px 1fr;
  gap: 0;
  align-items: stretch;
  transition: filter 0.25s;
  cursor: default;
}
.zone-row:hover { filter: brightness(1.25); }

.zone-depth-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 18px 16px;
  border-right: 1px solid rgba(0,232,200,0.1);
}
.zone-depth-val {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.75rem;
  color: var(--biolum-c);
  text-align: right;
  line-height: 1.4;
  opacity: 0.8;
}

.zone-name-col {
  padding: 18px 20px;
  border-right: 1px solid rgba(0,232,200,0.08);
  display: flex;
  align-items: center;
}
.zone-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--sea-foam);
}

.zone-desc-col { padding: 18px 20px; }
.zone-desc { font-size: 0.9rem; line-height: 1.7; color: var(--text-muted); }

/* Zone color gradients */
.zone-epipelagic  { background: rgba(22,54,88,0.55); }
.zone-mesopelagic { background: rgba(14,40,64,0.60); }
.zone-bathypelagic{ background: rgba(8,24,40,0.65); }
.zone-abyssopelagic{ background: rgba(4,14,24,0.72); }
.zone-hadalpelagic{ background: rgba(2,8,14,0.82); }

/* ── Currents ── */
.currents-section { margin: 70px 0; opacity: 0; animation: rise 0.8s 1.1s forwards; }

.currents-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.current-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 24px 22px;
  backdrop-filter: blur(10px);
  transition: box-shadow 0.3s, transform 0.3s;
  position: relative;
  overflow: hidden;
}
.current-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--glow);
}
.current-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px; height: 100%;
}
.current-warm::before { background: linear-gradient(to bottom, #f06020, #f0a040); }
.current-cold::before { background: linear-gradient(to bottom, #2080e0, #40c8f8); }
.current-deep::before { background: linear-gradient(to bottom, #00e8c8, #0080a0); }

.current-type {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.type-warm { color: #f08040; }
.type-cold { color: #40a8e8; }
.type-deep { color: var(--biolum-c); }

.current-card h3 { font-size: 1.12rem; font-weight: 700; color: var(--sea-foam); margin-bottom: 8px; }
.current-card p  { font-size: 0.91rem; line-height: 1.72; color: var(--text-muted); }
.current-speed {
  margin-top: 10px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.7rem;
  color: var(--biolum-c);
  opacity: 0.7;
}

/* ── Chemistry table ── */
.chem-section { margin: 70px 0; opacity: 0; animation: rise 0.8s 1.3s forwards; }

.ocean-table {
  width: 100%;
  border-collapse: collapse;
}
.ocean-table th {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--biolum-c);
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--card-border);
}
.ocean-table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(0,232,200,0.06);
  font-size: 0.91rem;
  color: var(--text-muted);
}
.ocean-table tr:hover td { background: rgba(0,232,200,0.04); }
.ocean-table td:first-child { color: var(--sea-foam); font-style: italic; }
.ocean-table .mono {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.86rem;
  color: var(--biolum-b);
}

/* ── Biodiversity highlight ── */
.bio-section { margin: 70px 0; opacity: 0; animation: rise 0.8s 1.5s forwards; }

.bio-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.bio-panel {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 26px 24px;
  backdrop-filter: blur(10px);
  transition: transform 0.3s;
}
.bio-panel:hover { transform: scale(1.01); }
.bio-icon { font-size: 2rem; margin-bottom: 14px; display: block; }
.bio-panel h3 { font-size: 1.2rem; font-weight: 700; color: var(--sea-foam); margin-bottom: 10px; }
.bio-panel p, .bio-panel li { font-size: 0.93rem; line-height: 1.78; color: var(--text-muted); }
.bio-panel ul { padding-left: 1.1em; }
.bio-panel li { margin-bottom: 4px; }

/* ── Threats ── */
.threats-section { margin: 70px 0; opacity: 0; animation: rise 0.8s 1.7s forwards; }

.threats-list { display: flex; flex-direction: column; gap: 0; border: 1px solid var(--card-border); border-radius: 14px; overflow: hidden; }
.threat-item {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 0;
  padding: 22px 24px;
  border-bottom: 1px solid rgba(0,232,200,0.07);
  align-items: start;
  transition: background 0.3s;
}
.threat-item:last-child { border-bottom: none; }
.threat-item:hover { background: rgba(0,232,200,0.04); }
.threat-icon { font-size: 1.8rem; }
.threat-body h3 { font-size: 1.05rem; font-weight: 700; color: var(--sea-foam); margin-bottom: 6px; }
.threat-body p  { font-size: 0.92rem; line-height: 1.73; color: var(--text-muted); }

/* ── Glowing quote ── */
.ocean-quote {
  margin: 70px 0;
  padding: 38px 44px;
  background: radial-gradient(ellipse 80% 60% at 30% 50%, rgba(0,184,248,0.05) 0%, transparent 70%), var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  box-shadow: var(--glow);
  opacity: 0;
  animation: rise 0.8s 1.9s forwards;
}
.ocean-quote blockquote {
  font-size: 1.3rem;
  font-style: italic;
  line-height: 1.7;
  color: var(--surface);
  margin-bottom: 16px;
}
.ocean-quote cite {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--biolum-c);
  opacity: 0.75;
}

/* ── Footer ── */
footer {
  margin-top: 80px;
  padding-top: 22px;
  border-top: 1px solid var(--card-border);
  text-align: center;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: 0.5;
}

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

#ocean-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--midnight), var(--biolum-c));
  z-index: 9999;
}

@media (max-width: 720px) {
  .zone-row { grid-template-columns: 80px 1fr; }
  .zone-name-col { display: none; }
  .bio-panels { grid-template-columns: 1fr; }
}
@media (max-width: 500px) {
  .hero-depth-row { flex-direction: column; }
}
