:root {
  --bg: #08090B;
  --bg-elevated: #0D0F12;
  --bg-glass: rgba(17, 19, 22, 0.6);
  --text: #E7E9EC;
  --text-bright: #F4F5F7;
  --text-muted: #A7AEB8;
  --text-dim: #8B93A0;
  --text-faint: #6B7280;
  --text-ghost: #4B5563;
  --accent: #7DF0C0;
  --accent-soft: #A9F5D6;
  --border: #23262B;
  --border-strong: #2A2E34;
  --border-subtle: #1D2025;
  --border-hairline: #16181C;
  --font-sans: "Space Grotesk", "Helvetica Neue", sans-serif;
  --font-mono: "JetBrains Mono", monospace;
  --max: 1080px;
}

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

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
}

body {
  font-family: var(--font-sans);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-soft);
  text-decoration: underline;
}

::selection {
  background: #1E3A2F;
  color: var(--text);
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

@keyframes blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

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

@keyframes bounce-down {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

.page {
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-x: hidden;
}

/* —— Hero —— */
.hero {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.hero-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 60%, transparent 30%, var(--bg) 85%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  width: 100%;
  max-width: var(--max);
  padding: 48px 32px;
  display: flex;
  flex-direction: column;
  gap: 40px;
  animation: rise 0.9s ease-out both;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 14px;
  color: #9CA3AF;
}

.pulse-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(125, 240, 192, 0.8);
  animation: pulse-dot 2.4s ease-in-out infinite;
  flex-shrink: 0;
}

.meta-sep {
  color: var(--text-ghost);
}

.hero-title-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}

.hero-name {
  font-size: clamp(64px, 10vw, 128px);
  font-weight: 700;
  line-height: 0.98;
  margin: 0;
  letter-spacing: -0.04em;
  color: var(--text-bright);
  flex: 1 1 500px;
}

.typewriter {
  font-family: var(--font-mono);
  font-size: clamp(17px, 2.2vw, 24px);
  color: var(--text-muted);
  min-height: 1.6em;
  display: flex;
  align-items: baseline;
}

.typewriter-prompt {
  color: var(--accent);
  margin-right: 12px;
}

.typewriter-text {
  color: #D3D7DD;
}

.typewriter-cursor {
  display: inline-block;
  width: 0.55em;
  height: 1.15em;
  background: var(--accent);
  margin-left: 4px;
  animation: blink 1s step-end infinite;
  transform: translateY(0.2em);
}

.cta-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  padding: 16px 32px;
  border-radius: 12px;
  transition: background 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
  font-weight: 600;
  box-shadow: 0 0 32px rgba(125, 240, 192, 0.25);
}

.btn-primary:hover {
  background: var(--accent-soft);
  color: var(--bg);
  box-shadow: 0 0 48px rgba(125, 240, 192, 0.45);
}

.btn-secondary {
  color: var(--text);
  font-weight: 500;
  border: 1px solid var(--border-strong);
  background: var(--bg-glass);
  backdrop-filter: blur(8px);
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.scroll-hint {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-ghost);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.scroll-arrow {
  animation: bounce-down 1.6s ease-in-out infinite;
}

/* —— Sections —— */
.section {
  width: 100%;
  max-width: var(--max);
  padding: 120px 32px 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.section-label {
  display: flex;
  align-items: baseline;
  gap: 16px;
}

.section-label h2 {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin: 0;
  white-space: nowrap;
}

.section-rule {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--border), transparent);
}

.now-lead {
  font-size: clamp(24px, 3.2vw, 34px);
  font-weight: 500;
  line-height: 1.35;
  margin: 0;
  color: var(--text);
  letter-spacing: -0.015em;
  max-width: 900px;
  text-wrap: pretty;
}

.accent {
  color: var(--accent);
}

.body-lg {
  font-size: 19px;
  line-height: 1.7;
  margin: 0;
  color: var(--text-muted);
  max-width: 780px;
  text-wrap: pretty;
}

.body-lg a {
  font-weight: 500;
}

/* —— Story —— */
.chapters {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.chapter {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 28px;
  padding: 28px 0;
  border-bottom: 1px solid var(--border-hairline);
  align-items: start;
  transition: background 0.2s;
}

.chapter:hover {
  background: rgba(125, 240, 192, 0.02);
}

.chapter-years {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--accent);
  padding-top: 4px;
}

.chapter-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chapter-body h3 {
  font-size: 21px;
  font-weight: 600;
  color: var(--text-bright);
  letter-spacing: -0.01em;
  margin: 0;
}

.chapter-body p {
  font-size: 17px;
  line-height: 1.65;
  color: var(--text-muted);
  max-width: 720px;
  margin: 0;
  text-wrap: pretty;
}

@media (max-width: 640px) {
  .chapter {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

/* —— Topics —— */
.topics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}

.topic {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 28px;
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  background: var(--bg-elevated);
  cursor: default;
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
}

.topic:hover {
  border-color: rgba(125, 240, 192, 0.5);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 24px rgba(125, 240, 192, 0.08);
}

.topic-num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-ghost);
}

.topic h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-bright);
  letter-spacing: -0.01em;
  margin: 0;
}

.topic p {
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--text-dim);
  margin: 0;
  text-wrap: pretty;
}

.topics-note {
  font-size: 17px;
  line-height: 1.6;
  margin: 0;
  color: var(--text-faint);
  text-wrap: pretty;
}

/* —— Footer —— */
.footer {
  padding: 140px 32px 80px;
  gap: 32px;
}

.footer-lead {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 600;
  line-height: 1.25;
  margin: 0;
  color: var(--text-bright);
  letter-spacing: -0.02em;
  max-width: 880px;
  text-wrap: pretty;
}

.footer-bar {
  border-top: 1px solid var(--border-hairline);
  padding-top: 28px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-ghost);
}

@media (prefers-reduced-motion: reduce) {
  .hero-content,
  .pulse-dot,
  .typewriter-cursor,
  .scroll-arrow,
  .topic {
    animation: none;
    transition: none;
  }
}
