:root {
  --bg: #f6f5f1;
  --ink: #15161b;
  --muted: #6e707a;
  --line: rgba(21, 22, 27, 0.12);
  --solar: #e8591c;
  --accent: #3d3df2;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --display: 'Cormorant Garamond', Georgia, serif;
  --serif: 'Instrument Serif', Georgia, serif;
  --mono: 'JetBrains Mono', monospace;
}

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

html {
  scroll-behavior: smooth;
  scroll-snap-type: y mandatory;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  user-select: none;
}

#astra-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
}

/* HUD Readouts */
.hud {
  position: fixed;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 1rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  pointer-events: none;
}

.hud-top {
  top: 1.4rem;
  left: 2.5rem;
}

.hud-coords {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

.hud-bottom {
  bottom: 1.4rem;
  left: 2.5rem;
}

.hud .dim {
  opacity: 0.68;
}

/* Text-free subtle cursor ring */
#reticle {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 12;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

#reticle.hidden {
  opacity: 0;
}

#reticle .ring {
  display: block;
  width: 20px;
  height: 20px;
  margin-left: -10px;
  margin-top: -10px;
  border: 1px solid rgba(232, 89, 28, 0.42);
  border-radius: 50%;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s, background 0.2s;
}

#reticle.interactive .ring {
  transform: scale(1.65);
  border-color: var(--ink);
  background: rgba(21, 22, 27, 0.05);
}

/* Fullscreen Snap Sections */
main {
  position: relative;
  z-index: 2;
  pointer-events: none;
}

main a, main button, .initial-trigger {
  pointer-events: auto;
}

.initial-trigger {
  cursor: pointer;
  transition: opacity 0.25s ease, filter 0.25s ease;
}

.initial-trigger.armed {
  filter: drop-shadow(0 0 10px rgba(232, 89, 28, 0.55));
}

.screen {
  min-height: 100vh;
  max-width: 1260px;
  margin: 0 auto;
  padding: 0 2.5rem;
  display: flex;
  align-items: center;
  scroll-snap-align: start;
}

/* Screen 1: Hero */
.hero-copy {
  max-width: 32rem;
}

.hero-name {
  font-family: var(--display);
  font-size: clamp(3.8rem, 8.2vw, 6.6rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 0.94;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.22em;
}

.hero-name .first-name {
  background: linear-gradient(135deg, #0f1226 0%, #1e2548 60%, #2c3566 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-name .last-name {
  font-style: italic;
  font-weight: 500;
  letter-spacing: -0.015em;
  background: linear-gradient(125deg, #b83214 0%, #e8591c 52%, #d97b16 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.serif {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.tagline {
  margin-top: 1.25rem;
  font-size: 1.04rem;
  line-height: 1.55;
  color: var(--muted);
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.35rem;
  margin-top: 1.75rem;
}

.links a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.92rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
  transition: color 0.2s, border-color 0.2s;
}

.links a:hover {
  color: var(--solar);
  border-color: var(--solar);
}

.email-callout {
  margin-top: 1.35rem;
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem 0.85rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.58);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.75rem;
}

.email-address {
  color: var(--ink);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid rgba(232, 89, 28, 0.4);
  transition: color 0.2s, border-color 0.2s;
}

.email-address:hover {
  color: var(--solar);
  border-color: var(--solar);
}

.email-sla {
  color: var(--muted);
  font-size: 0.7rem;
}

.hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 2.2rem;
}

.scroll-cue {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  padding: 0.46rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(8px);
  transition: color 0.2s, border-color 0.2s, transform 0.2s, background 0.2s;
}

.scroll-cue.secondary {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.38);
}

.scroll-cue:hover {
  color: var(--solar);
  border-color: var(--solar);
  background: rgba(255, 255, 255, 0.9);
  transform: translateY(2px);
}

/* Full-Screen Interactive Stages (Journey & Products of a Curious Mind) */
.journey-stage {
  width: 100%;
  min-height: 100vh;
  padding: 4.5rem 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.stage-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1.15rem;
  border-bottom: 1px solid var(--line);
}

.kicker {
  display: block;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  color: var(--solar);
}

.chapter-rail {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.rail-step {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.32rem 0.72rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(8px);
  font-family: var(--mono);
  font-size: 0.66rem;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.rail-step:hover {
  color: var(--ink);
  border-color: rgba(21, 22, 27, 0.3);
}

.rail-step.active {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

.rail-step.visited:not(.active) {
  color: var(--ink);
  border-color: rgba(232, 89, 28, 0.38);
}

/* Full-screen editorial story canvas */
.stage-center {
  max-width: 46rem;
  margin: auto 0;
  padding: 1.5rem 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.stage-center.switching {
  opacity: 0;
  transform: translateY(10px);
}

.stage-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  margin-bottom: 0.85rem;
}

.story-chapter {
  color: var(--solar);
  font-weight: 500;
}

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

.story-era, .story-place {
  color: var(--muted);
}

.story-domain {
  color: var(--solar);
  text-decoration: none;
  border-bottom: 1px solid rgba(232, 89, 28, 0.35);
}

.story-domain:hover {
  border-color: var(--solar);
}

.stage-title {
  font-size: clamp(2.35rem, 4.8vw, 3.85rem);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.04;
  margin-bottom: 1.1rem;
  color: var(--ink);
}

.stage-lead {
  font-size: clamp(1.02rem, 1.4vw, 1.18rem);
  line-height: 1.64;
  color: var(--ink);
  max-width: 40rem;
  text-shadow: 0 1px 18px rgba(246, 245, 241, 0.92);
}

/* Sub-milestones inside a chapter */
.stage-highlights {
  margin-top: 1.55rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
  max-width: 44rem;
}

.stage-highlights:empty {
  display: none;
}

.hl-item {
  padding: 0.9rem 1.05rem;
  border-radius: 12px;
  border-left: 2px solid var(--solar);
  background: rgba(246, 245, 241, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.hl-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.28rem;
}

.hl-title {
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--ink);
}

.hl-meta {
  font-family: var(--mono);
  font-size: 0.63rem;
  color: var(--solar);
  white-space: nowrap;
}

.hl-desc {
  font-size: 0.79rem;
  line-height: 1.48;
  color: var(--muted);
}

/* CTA button in Products of a Curious Mind */
.stage-actions {
  margin-top: 1.65rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.visit-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.65rem 1.15rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.03em;
  transition: transform 0.2s, background 0.2s;
}

.visit-btn:hover {
  background: var(--solar);
  transform: translateY(-2px);
}

/* Bottom Stage Cliffhanger Bar */
.stage-bottom {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--line);
}

.stage-prev {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(8px);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.72rem;
  padding: 0.7rem 1.1rem;
  border-radius: 12px;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.2s, border-color 0.2s;
}

.stage-prev:hover:not(:disabled) {
  color: var(--ink);
  border-color: var(--ink);
}

.stage-prev:disabled {
  opacity: 0.3;
  cursor: default;
}

.stage-next {
  flex: 1;
  max-width: 36rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  text-align: left;
  border: 1px solid rgba(232, 89, 28, 0.38);
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(12px);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.76rem;
  padding: 0.75rem 1.15rem;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.2s, border-color 0.2s, background 0.2s;
}

.stage-next:hover {
  transform: translateX(3px);
  border-color: var(--solar);
  background: rgba(255, 255, 255, 0.95);
}

.next-kicker {
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  padding: 0.2rem 0.48rem;
  border-radius: 6px;
  background: var(--solar);
  color: #fff;
  white-space: nowrap;
}

.cliffhanger-label {
  flex: 1;
  color: var(--ink);
}

.hint {
  position: fixed;
  bottom: 1.4rem;
  right: 2.5rem;
  z-index: 10;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--muted);
  pointer-events: none;
}

kbd {
  font-family: var(--mono);
  font-size: 0.65rem;
  padding: 0.1rem 0.35rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink);
}

@media (max-width: 900px) {
  html { scroll-snap-type: none; }
  .screen {
    padding: 44vh 1.25rem 3.5rem;
    align-items: flex-start;
  }
  .journey-screen, .projects-screen {
    padding-top: 3.5rem;
    min-height: auto;
  }
  .journey-stage {
    min-height: auto;
    padding: 1rem 0 2rem;
    gap: 1.5rem;
  }
  .stage-highlights {
    grid-template-columns: 1fr;
  }
  .hud-top, .hud-bottom {
    left: 1rem;
  }
  .hint, #reticle {
    display: none;
  }
}
