:root {
  --orange: #00D4FF;
  --orange-dim: rgba(0, 212, 255, 0.12);
  --blue: #888780;
  --blue-dim: rgba(136, 135, 128, 0.15);
  --bg: #0d0d0f;
  --bg2: #141416;
  --bg3: #1c1c20;
  --surface: #1f1f24;
  --border: rgba(255,255,255,0.08);
  --text: #f0ede8;
  --text2: rgba(240,237,232,0.6);
  --text3: rgba(240,237,232,0.35);
  --font-display: 'Bebas Neue', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --font-mono: 'DM Mono', monospace;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  overflow-x: hidden;
}


.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  background: radial-gradient(ellipse 80% 60% at 50% 40%, rgba(0,212,255,0.06) 0%, transparent 70%),
              radial-gradient(ellipse 60% 40% at 20% 80%, rgba(0,212,255,0.03) 0%, transparent 60%),
              var(--bg);
  border-bottom: 1px solid var(--border);
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    0deg, transparent, transparent 59px, rgba(255,255,255,0.02) 60px
  ), repeating-linear-gradient(
    90deg, transparent, transparent 59px, rgba(255,255,255,0.02) 60px
  );
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 860px;
  padding: 2rem;
}

.kicker {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 1.5rem;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(4rem, 12vw, 9rem);
  line-height: 0.95;
  letter-spacing: 0.02em;
  color: var(--text);
  margin-bottom: 1.5rem;
}

.hero-sub {
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  color: var(--text2);
  max-width: 560px;
  margin: 0 auto 1rem;
  font-weight: 300;
  font-style: italic;
}

.byline {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text3);
  letter-spacing: 0.05em;
}

.scroll-hint {
  margin-top: 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text3);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: fadeInUp 2s ease 1s both;
}

.scroll-arrow {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--orange), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(1); }
  50% { opacity: 1; transform: scaleY(1.2); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}


.prose-section {
  padding: 5rem 2rem;
}

.dark-section {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.prose-inner {
  max-width: 720px;
  margin: 0 auto 2.5rem;
}

.lead {
  font-size: 1.2rem;
  color: var(--text);
  font-weight: 300;
  margin-bottom: 1rem;
}

.prose-section p {
  color: var(--text2);
  margin-bottom: 1rem;
}

.section-heading {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.2rem);
  letter-spacing: 0.03em;
  color: var(--text);
  margin-bottom: 0.75rem;
  line-height: 1;
}

.writeup-section h3 {
  font-size: 1rem;
  font-weight: 500;
  color: var(--orange);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 2rem 0 0.5rem;
  font-family: var(--font-mono);
}

code {
  font-family: var(--font-mono);
  background: var(--surface);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  font-size: 0.85em;
  color: var(--orange);
}


.scroll-section {
  position: relative;
  display: flex;
  gap: 0;
}

.scroll-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 60%;
  padding: 2rem 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border-right: 1px solid var(--border);
  overflow: hidden;
}

.sticky-header {
  margin-bottom: 1rem;
}

.era-badge {
  display: inline-block;
  background: var(--orange-dim);
  color: var(--orange);
  border: 1px solid rgba(0,212,255,0.3);
  border-radius: 20px;
  padding: 0.2rem 0.8rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  transition: all 0.4s ease;
}

.era-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  letter-spacing: 0.03em;
  color: var(--text);
  margin-bottom: 0.3rem;
  line-height: 1.1;
  transition: all 0.4s ease;
}

.era-desc {
  font-size: 0.9rem;
  color: var(--text2);
  transition: all 0.4s ease;
}


.controls {
  margin-bottom: 0.75rem;
}

.metric-toggle {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
}

.metric-toggle button {
  border: 0;
  background: transparent;
  color: var(--text2);
  padding: 0.4rem 0.85rem;
  cursor: pointer;
  font: inherit;
  font-size: 0.8rem;
  border-right: 1px solid var(--border);
  transition: all 0.2s;
}

.metric-toggle button:last-child { border-right: 0; }

.metric-toggle button.active {
  background: var(--orange);
  color: #fff;
}

.metric-toggle button:hover:not(.active) {
  background: var(--bg3);
  color: var(--text);
}


.annotation-box {
  margin-top: 0.75rem;
  padding: 0.65rem 1rem;
  background: var(--orange-dim);
  border-left: 3px solid var(--orange);
  border-radius: 0 4px 4px 0;
  font-size: 0.85rem;
  color: var(--text2);
  min-height: 2.5rem;
  transition: all 0.3s ease;
}


.scroll-panels {
  width: 40%;
  padding: 0;
}

.scroll-panel {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 4rem 3rem;
  border-bottom: 1px solid var(--border);
  transition: background 0.3s;
}

.scroll-panel.active {
  background: rgba(0,212,255,0.03);
}

.panel-content { max-width: 320px; }

.panel-year {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--orange);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.75rem;
}

.panel-content h3 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  letter-spacing: 0.04em;
  color: var(--text);
  margin-bottom: 0.75rem;
  line-height: 1.1;
}

.panel-content p {
  font-size: 0.9rem;
  color: var(--text2);
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.panel-stat {
  display: flex;
  flex-direction: column;
  border-left: 3px solid var(--orange);
  padding-left: 1rem;
}

.stat-num {
  font-family: var(--font-display);
  font-size: 2.2rem;
  color: var(--orange);
  line-height: 1;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--text3);
  font-family: var(--font-mono);
  margin-top: 0.2rem;
}


.then-now-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  max-width: 860px;
  margin: 0 auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.tn-card {
  background: var(--surface);
  padding: 2rem 1.5rem;
  text-align: center;
}

.tn-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 1.25rem;
}

.tn-values {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 0.5rem;
}

.tn-val {
  flex: 1;
}

.tn-year {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text3);
  display: block;
  margin-bottom: 0.25rem;
}

.tn-num {
  font-family: var(--font-display);
  font-size: 2rem;
  display: block;
  line-height: 1;
}

.tn-num.old { color: var(--blue); }
.tn-num.new { color: var(--orange); }

.tn-arrow {
  color: var(--text3);
  font-size: 1.2rem;
  margin-bottom: 0.3rem;
}

.tn-change {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--orange);
  display: block;
  margin-top: 0.5rem;
}


#line-chart, #scatter-chart, #champ-chart, #tm-chart {
  width: 100%;
  flex: 1;
  min-height: 0;
}

#scatter-chart, #champ-chart {
  max-width: 100%;
  margin: 0 auto;
  height: 450px;
}

#tm-chart { height: 260px; }

.responsive-svg { width: 100%; height: 100%; overflow: visible; }

.axis text {
  font-size: 11px;
  fill: var(--text3);
  font-family: var(--font-body);
}

.axis path, .axis line {
  stroke: var(--border);
}

.axis-title {
  font-size: 11px;
  fill: var(--text2);
  font-family: var(--font-mono);
}

.grid line {
  stroke: rgba(255,255,255,0.04);
}

.trend-line {
  fill: none;
  stroke-width: 2.5;
}

.trend-area {
  opacity: 0.12;
}

.trend-dot {
  cursor: pointer;
  transition: r 0.15s;
}

.trend-dot:hover { r: 6; }

.season-marker {
  stroke: rgba(255,255,255,0.4);
  stroke-width: 1.5;
  stroke-dasharray: 4 4;
}

.season-dot {
  fill: #fff;
  stroke: var(--bg);
  stroke-width: 2;
}


.proj-line {
  fill: none;
  stroke: var(--orange);
  stroke-width: 2;
  stroke-dasharray: 7 5;
  opacity: 0.7;
}

.proj-band {
  fill: var(--orange);
  opacity: 0.08;
}

.proj-label {
  font-size: 10px;
  fill: var(--orange);
  font-family: var(--font-mono);
  opacity: 0.8;
}


.callout-line {
  stroke: rgba(255,255,255,0.2);
  stroke-width: 1;
  stroke-dasharray: 3 3;
}

.callout-text {
  font-size: 10px;
  fill: var(--text2);
  font-family: var(--font-mono);
}


.champ-bar {
  fill: var(--blue);
  transition: fill 0.15s;
  cursor: pointer;
}

.champ-bar:hover, .champ-bar.hover { fill: var(--orange); }

.bar-label {
  font-size: 10px;
  fill: var(--text2);
  font-family: var(--font-mono);
}


.scatter-dot {
  fill: var(--orange);
  opacity: 0.5;
  cursor: pointer;
  transition: opacity 0.15s, r 0.15s;
}

.scatter-dot:hover { opacity: 1; r: 6; }

.regression-line {
  stroke: rgba(255,255,255,0.3);
  stroke-width: 1.5;
  stroke-dasharray: 5 4;
  fill: none;
}


.viz-tooltip {
  position: fixed;
  pointer-events: none;
  background: var(--surface);
  color: var(--text);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.8rem;
  line-height: 1.4;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  border: 1px solid var(--border);
  z-index: 100;
  font-family: var(--font-body);
}


.time-machine {
  max-width: 860px;
  margin: 0 auto;
}

.tm-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.tm-label {
  font-size: 1.1rem;
  color: var(--text2);
}

.tm-label strong {
  color: var(--orange);
  font-family: var(--font-display);
  font-size: 1.4rem;
}

#season-slider { accent-color: var(--orange); cursor: pointer; }

#tm-slider {
  width: min(400px, 90%);
  accent-color: var(--orange);
  cursor: pointer;
}

.tm-verdict {
  text-align: center;
  margin-top: 1rem;
  padding: 1rem 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 0.95rem;
  color: var(--text2);
  min-height: 3rem;
  transition: all 0.3s;
}

.tm-verdict strong { color: var(--orange); }


.predictor {
max-width: 860px;
margin: 0 auto;
}

.predictor-controls {
margin-bottom: 2rem;
}

.predictor-input-row {
display: flex;
gap: 2rem;
flex-wrap: wrap;
}

.predictor-knob {
flex: 1;
min-width: 200px;
}

.predictor-knob-label {
display: block;
font-family: var(--font-mono);
font-size: 0.72rem;
letter-spacing: 0.12em;
text-transform: uppercase;
color: var(--text3);
margin-bottom: 0.6rem;
}

.predictor-slider-wrap {
display: flex;
align-items: center;
gap: 1rem;
}

.predictor-slider-wrap input[type=range] {
flex: 1;
accent-color: var(--orange);
cursor: pointer;
}

.predictor-val {
font-family: var(--font-display);
font-size: 1.6rem;
color: var(--orange);
min-width: 60px;
text-align: right;
}

.predictor-output {
display: flex;
align-items: center;
gap: 2rem;
margin-bottom: 2rem;
flex-wrap: wrap;
}

.pred-result-card {
background: var(--surface);
border: 1px solid var(--border);
border-radius: 12px;
padding: 1.5rem 2rem;
text-align: center;
min-width: 180px;
border-top: 3px solid var(--orange);
transition: border-color 0.3s;
}

.pred-win-pct {
font-family: var(--font-display);
font-size: 3.5rem;
color: var(--orange);
line-height: 1;
transition: color 0.3s;
}

.pred-win-label {
font-family: var(--font-mono);
font-size: 0.68rem;
letter-spacing: 0.1em;
text-transform: uppercase;
color: var(--text3);
margin-top: 0.3rem;
}

.pred-ci {
font-family: var(--font-mono);
font-size: 0.72rem;
color: var(--text3);
margin-top: 0.5rem;
}

.pred-context {
flex: 1;
font-size: 0.95rem;
color: var(--text2);
line-height: 1.7;
}

.pred-context strong { color: var(--text); }

#predictor-chart {
width: 100%;
height: 300px;
margin-bottom: 1rem;
}

.pred-note {
font-family: var(--font-mono);
font-size: 0.68rem;
color: var(--text3);
line-height: 1.5;
}

.pred-marker-line {
stroke: var(--orange);
stroke-width: 2;
stroke-dasharray: 6 4;
opacity: 0.9;
}

.pred-marker-dot {
fill: var(--orange);
stroke: var(--bg2);
stroke-width: 2;
}

.pred-band {
fill: var(--orange);
opacity: 0.1;
}

.site-footer {
  padding: 3rem 2rem;
  text-align: center;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text3);
}

.site-footer a {
  color: var(--orange);
  text-decoration: none;
}

.site-footer a:hover { text-decoration: underline; }


@media (max-width: 768px) {
  .scroll-section { flex-direction: column; }
  .scroll-sticky { position: relative; height: auto; width: 100%; border-right: none; border-bottom: 1px solid var(--border); }
  .scroll-panels { width: 100%; }
  .scroll-panel { min-height: 60vh; padding: 3rem 1.5rem; }
  .then-now-grid { grid-template-columns: 1fr; }
  #scatter-chart, #champ-chart { height: 300px; }
}
