:root {
  --bg-deep: #0f172a;
  --bg-surface: #1e293b;
  --bg-elevated: #334155;
  --text-primary: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent-mint: #6ee7b7;
  --accent-glow: #34d399;
  --divider: #475569;
  --divider-alt: #4a5568;
  --text-light: #cbd5e1;
  --font-display: 'Nunito', sans-serif;
  --font-body: 'Karla', sans-serif;
  --font-mono: 'Space Mono', monospace;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-deep);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.7;
  overflow-x: hidden;
}

.section {
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  padding: 80px 0;
}

.section--hero {
  min-height: 100vh;
}

.section--closing {
  min-height: 80vh;
  padding-bottom: 120px;
}

.section__content {
  padding-left: 12%;
  padding-right: 12%;
  max-width: 100%;
}

.section__number {
  display: block;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--accent-mint);
  letter-spacing: 0.1em;
  margin-bottom: 16px;
  opacity: 0.7;
}

.section__heading {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--text-primary);
  margin-bottom: 24px;
}

.section__heading--closing {
  font-size: clamp(32px, 4.5vw, 56px);
}

.section__body {
  font-family: var(--font-body);
  font-size: clamp(16px, 1.8vw, 20px);
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 640px;
  margin-bottom: 40px;
}

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

.mono {
  font-family: var(--font-mono);
}

/* Hero */
.hero__title {
  font-family: var(--font-display);
  font-size: clamp(48px, 8vw, 88px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 16px;
}

.hero__subtitle {
  font-family: var(--font-body);
  font-size: clamp(18px, 2vw, 24px);
  color: var(--text-secondary);
  margin-bottom: 32px;
}

/* Pulsing Dot */
.pulsing-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-mint);
  margin-bottom: 32px;
  animation: pulse 2.4s ease-in-out infinite;
  box-shadow: 0 0 12px var(--accent-mint), 0 0 24px rgba(110, 231, 183, 0.3);
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

/* Cursor Blink */
.cursor-blink {
  font-family: var(--font-mono);
  font-size: 24px;
  color: var(--accent-mint);
  animation: blink 1s step-end infinite;
  display: inline-block;
}

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

/* Divider Lines */
.divider {
  display: flex;
  justify-content: center;
  padding: 0 20%;
  margin-top: auto;
}

.divider__line {
  width: 60%;
  height: 2px;
}

.divider__stroke {
  stroke: var(--divider);
  stroke-width: 1;
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  transition: stroke-dashoffset 1.8s ease-out;
}

.divider__stroke.is-visible {
  stroke-dashoffset: 0;
}

/* Fork Symbol */
.fork-symbol {
  margin-bottom: 40px;
}

.fork-svg {
  width: 80px;
  height: 120px;
}

.fork-line {
  stroke: var(--accent-mint);
  stroke-width: 2;
  stroke-dasharray: 200;
  stroke-dashoffset: 200;
  transition: stroke-dashoffset 1.8s ease-out;
}

.fork-line.is-visible {
  stroke-dashoffset: 0;
}

.fork-dot {
  fill: var(--accent-mint);
  opacity: 0;
  transition: opacity 0.6s ease-out 1.2s;
}

.fork-dot.is-visible {
  opacity: 1;
}

.fork-symbol--inverted .fork-svg {
  width: 80px;
  height: 120px;
}

/* Binary Choice */
.binary-choice {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 8px;
}

.binary-choice__option {
  font-family: var(--font-mono);
  font-size: 48px;
  font-weight: 700;
  color: var(--text-muted);
  transition: color 0.3s ease, text-shadow 0.3s ease;
  cursor: default;
}

.binary-choice__option:hover {
  color: var(--accent-mint);
  text-shadow: 0 0 20px rgba(110, 231, 183, 0.4);
}

.binary-choice__or {
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--text-muted);
  text-transform: lowercase;
  font-style: italic;
}

/* Dilemma Options */
.dilemma-options {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin-top: 8px;
}

.dilemma-option {
  flex: 1;
  padding: 24px 0;
}

.dilemma-option--right {
  padding-left: 32px;
}

.dilemma-option__label {
  display: block;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  transition: color 0.3s ease;
}

.dilemma-option:hover .dilemma-option__label {
  color: var(--accent-mint);
}

.dilemma-option__desc {
  display: block;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.dilemma-option__divider {
  width: 2px;
  min-height: 80px;
  flex-shrink: 0;
  margin: 0 32px;
}

.dilemma-option__divider svg {
  width: 2px;
  height: 100%;
}

/* Identity Grid (Ship of Theseus) */
.identity-grid {
  display: flex;
  gap: 48px;
  margin-top: 8px;
}

.identity-cell {
  flex: 1;
  max-width: 280px;
}

.identity-cell .mono {
  display: block;
  font-size: 12px;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.identity-bar {
  height: 4px;
  border-radius: 2px;
  position: relative;
  overflow: hidden;
}

.identity-bar--fading {
  background: var(--bg-elevated);
}

.identity-bar--fading::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background: var(--text-muted);
  animation: fadeBar 4s ease-in-out infinite;
}

@keyframes fadeBar {
  0% { width: 100%; }
  50% { width: 20%; }
  100% { width: 100%; }
}

.identity-bar--growing {
  background: var(--bg-elevated);
}

.identity-bar--growing::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: var(--accent-mint);
  animation: growBar 4s ease-in-out infinite;
}

@keyframes growBar {
  0% { width: 0%; }
  50% { width: 100%; }
  100% { width: 0%; }
}

/* Paradox Visual (Buridan) */
.paradox-visual {
  display: flex;
  align-items: center;
  gap: 40px;
  margin-top: 8px;
}

.hay-bale {
  width: 60px;
  height: 60px;
  position: relative;
}

.hay-lines {
  display: flex;
  flex-direction: column;
  gap: 6px;
  justify-content: center;
  height: 100%;
}

.hay-lines span {
  display: block;
  height: 2px;
  background: var(--text-muted);
  border-radius: 1px;
}

.hay-lines span:nth-child(1) { width: 40px; }
.hay-lines span:nth-child(2) { width: 55px; }
.hay-lines span:nth-child(3) { width: 60px; }
.hay-lines span:nth-child(4) { width: 55px; }
.hay-lines span:nth-child(5) { width: 40px; }

.paradox-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.paradox-question {
  font-size: 48px;
  color: var(--accent-mint);
  animation: paradoxPulse 3s ease-in-out infinite;
}

@keyframes paradoxPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.2; }
}

/* Veil Grid */
.veil-visual {
  margin-top: 8px;
}

.veil-grid {
  display: grid;
  grid-template-columns: repeat(3, 64px);
  gap: 8px;
}

.veil-cell {
  width: 64px;
  height: 64px;
  background: var(--bg-surface);
  border: 1px solid var(--divider);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.veil-cell:hover {
  background: var(--bg-elevated);
  border-color: var(--accent-mint);
}

.veil-cell .mono {
  font-size: 20px;
  color: var(--text-muted);
  transition: color 0.3s ease;
}

.veil-cell:hover .mono {
  color: var(--accent-mint);
}

/* Closing */
.closing-cursor {
  margin-top: 48px;
  display: flex;
  align-items: center;
  gap: 2px;
}

.closing-cursor .mono {
  font-size: 16px;
  color: var(--text-muted);
}

/* Entry Animation */
.observe-entry {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.observe-entry.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.observe-entry:nth-child(2) { transition-delay: 0.15s; }
.observe-entry:nth-child(3) { transition-delay: 0.3s; }
.observe-entry:nth-child(4) { transition-delay: 0.45s; }
.observe-entry:nth-child(5) { transition-delay: 0.6s; }

/* Responsive */
@media (max-width: 768px) {
  .section__content {
    padding-left: 6%;
    padding-right: 6%;
  }

  .dilemma-options {
    flex-direction: column;
  }

  .dilemma-option--right {
    padding-left: 0;
    padding-top: 16px;
  }

  .dilemma-option__divider {
    width: 100%;
    height: 2px;
    min-height: auto;
    margin: 0;
  }

  .dilemma-option__divider svg {
    width: 100%;
    height: 2px;
  }

  .identity-grid {
    flex-direction: column;
    gap: 24px;
  }

  .paradox-visual {
    gap: 24px;
  }

  .veil-grid {
    grid-template-columns: repeat(3, 56px);
  }

  .veil-cell {
    width: 56px;
    height: 56px;
  }
}

/* CRT scanline subtle overlay */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.03) 2px,
    rgba(0, 0, 0, 0.03) 4px
  );
  z-index: 9999;
}
