@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@200;300;400;500;600;700;800&family=Fira+Code:wght@300;400;500&display=swap');

:root {
  --void: #010a0a;
  --deep: #031212;
  --surface: #051f1f;
  --emerald: #00e8a0;
  --emerald-dim: rgba(0,232,160,0.1);
  --emerald-border: rgba(0,232,160,0.2);
  --teal: #00c8c8;
  --teal-dim: rgba(0,200,200,0.08);
  --warm: #7fffd4;
  --planet-blue: #4a9fd4;
  --planet-green: #64c87a;
  --planet-red: #e87050;
  --planet-gold: #e8c060;
  --text: #b0d8cc;
  --text-muted: #4a8870;
  --border: rgba(0,232,160,0.18);
  --hz-green: rgba(64,200,80,0.15);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Outfit', sans-serif;
  background: var(--void);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

#exo-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 40% at 50% 0%, rgba(0,232,160,0.04) 0%, transparent 60%),
    radial-gradient(ellipse 40% 60% at 0% 60%, rgba(0,200,200,0.03) 0%, transparent 50%);
  z-index: 1;
  pointer-events: none;
}

.wrap {
  position: relative;
  z-index: 2;
  max-width: 1020px;
  margin: 0 auto;
  padding: 0 28px 80px;
}

/* ── HERO ── */
.hero {
  padding: 64px 0 48px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: center;
  border-bottom: 1px solid var(--border);
  margin-bottom: 50px;
}

.hero-tag {
  font-family: 'Fira Code', monospace;
  font-size: 0.65rem;
  letter-spacing: 3px;
  color: var(--emerald);
  text-transform: uppercase;
  opacity: 0.7;
  margin-bottom: 16px;
}

.hero h1 {
  font-size: clamp(2.8rem, 8vw, 5.5rem);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -2px;
  color: #fff;
}

.hero h1 span {
  display: block;
  background: linear-gradient(120deg, var(--emerald) 0%, var(--teal) 60%, var(--warm) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 540px;
  margin-top: 16px;
  font-weight: 300;
}

/* ── Counter display ── */
.counter-box {
  text-align: center;
  background: var(--deep);
  border: 1px solid var(--emerald-border);
  border-radius: 8px;
  padding: 24px 28px;
  min-width: 160px;
}

.counter-num {
  font-family: 'Fira Code', monospace;
  font-size: 2.4rem;
  font-weight: 500;
  color: var(--emerald);
  line-height: 1;
  display: block;
}

.counter-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* ── Stats strip ── */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 56px;
}

.stat-card {
  background: var(--deep);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 18px 16px;
  transition: border-color 0.2s, background 0.2s;
}

.stat-card:hover {
  border-color: var(--emerald);
  background: var(--emerald-dim);
}

.stat-label {
  font-family: 'Fira Code', monospace;
  font-size: 0.6rem;
  letter-spacing: 2.5px;
  color: var(--teal);
  opacity: 0.7;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--warm);
  line-height: 1.1;
}

.stat-unit {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 300;
}

/* ── Sections ── */
.section {
  margin-bottom: 56px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.65s, transform 0.65s;
}

.section.visible { opacity: 1; transform: none; }

.section-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}

.sec-num {
  font-family: 'Fira Code', monospace;
  font-size: 0.65rem;
  color: var(--emerald);
  opacity: 0.55;
}

.section h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.5px;
}

.section h2::after {
  content: '';
  display: block;
  width: 32px;
  height: 2px;
  background: linear-gradient(90deg, var(--emerald), transparent);
  margin-top: 6px;
}

p {
  font-size: 0.96rem;
  line-height: 1.82;
  color: var(--text-muted);
  font-weight: 300;
  margin-bottom: 14px;
}

strong { color: var(--text); font-weight: 600; }

/* ── Detection methods grid ── */
.methods-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.method-card {
  background: var(--deep);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 22px;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.method-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(0,232,160,0.08);
}

.method-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--emerald-dim), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.method-card:hover::before { opacity: 1; }

.method-icon {
  font-size: 1.6rem;
  margin-bottom: 10px;
}

.method-pct {
  position: absolute;
  top: 16px;
  right: 16px;
  font-family: 'Fira Code', monospace;
  font-size: 0.75rem;
  color: var(--emerald);
  background: var(--emerald-dim);
  padding: 3px 8px;
  border-radius: 3px;
}

.method-card h3 {
  font-size: 0.92rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.method-card p { font-size: 0.82rem; margin: 0; line-height: 1.55; }

/* ── Habitable zone visual ── */
.hz-visual {
  background: var(--deep);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 28px;
  margin-top: 18px;
}

#hz-canvas {
  display: block;
  margin: 0 auto 12px;
}

.hz-legend {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.hz-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Fira Code', monospace;
  font-size: 0.68rem;
  color: var(--text-muted);
}

.hz-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

/* ── Notable exoplanets ── */
.exo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.exo-card {
  background: var(--deep);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  display: grid;
  grid-template-columns: 50px 1fr;
  gap: 14px;
  align-items: start;
  transition: border-color 0.2s;
}

.exo-card:hover { border-color: rgba(0,232,160,0.4); }

.exo-planet-vis {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.exo-card h3 {
  font-family: 'Fira Code', monospace;
  font-size: 0.82rem;
  color: var(--warm);
  margin-bottom: 5px;
}

.exo-card .exo-type {
  font-size: 0.7rem;
  color: var(--emerald);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.exo-card p { font-size: 0.8rem; margin: 0; line-height: 1.5; }

/* ── James Webb section ── */
.jwst-highlight {
  background: linear-gradient(135deg, var(--surface), var(--deep));
  border: 1px solid rgba(0,200,200,0.3);
  border-radius: 10px;
  padding: 28px 30px;
  margin-top: 20px;
  position: relative;
  overflow: hidden;
}

.jwst-highlight::before {
  content: '🔭';
  position: absolute;
  right: 20px;
  top: 16px;
  font-size: 2.5rem;
  opacity: 0.15;
}

.jwst-highlight h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--teal);
  margin-bottom: 12px;
}

.jwst-highlight p { margin: 0 0 10px; }
.jwst-highlight p:last-child { margin: 0; }

/* ── Footer ── */
.footer-band {
  margin-top: 70px;
  border-top: 1px solid var(--border);
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.footer-band span {
  font-family: 'Fira Code', monospace;
  font-size: 0.6rem;
  color: var(--text-muted);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

@media (max-width: 640px) {
  .hero { grid-template-columns: 1fr; }
  .counter-box { display: none; }
}
