:root {
  --bg-main: #08060f;
  --bg-soft: #11091f;
  --bg-card: rgba(35, 20, 58, 0.38);
  --text-primary: #ece7ff;
  --text-muted: #b6aed6;
  --line: rgba(181, 140, 255, 0.32);
  --accent: #a06dff;
  --accent-strong: #c89bff;
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.45);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Outfit", sans-serif;
  background: radial-gradient(circle at top right, #1b0b30 0%, var(--bg-main) 55%);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
}

.ambient-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.55;
  animation: drift 14s ease-in-out infinite;
}

.blob-1 {
  width: 420px;
  height: 420px;
  top: -130px;
  right: -100px;
  background: #6926df;
}

.blob-2 {
  width: 360px;
  height: 360px;
  bottom: 10%;
  left: -80px;
  background: #3a1f85;
  animation-delay: 2s;
}

.grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.2;
}

.site-header {
  position: sticky;
  top: 1rem;
  margin: 1rem auto 0;
  width: min(1080px, calc(100% - 2rem));
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.2rem;
  border-radius: 1rem;
}

.glass {
  background: var(--bg-card);
  border: 1px solid var(--line);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}

.brand {
  text-decoration: none;
  color: var(--text-primary);
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.top-nav {
  display: flex;
  gap: 1rem;
}

.top-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.96rem;
  transition: color 180ms ease;
}

.top-nav a:hover,
.top-nav a:focus-visible {
  color: var(--text-primary);
}

main {
  width: min(1080px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 3.5rem 0 4rem;
}

.section {
  margin-bottom: 3.2rem;
}

.hero {
  min-height: clamp(520px, 78vh, 690px);
  display: grid;
  align-content: center;
  gap: 1.2rem;
}

.eyebrow {
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-strong);
  font-size: 0.85rem;
}

h1,
h2,
h3 {
  font-family: "Space Grotesk", sans-serif;
  line-height: 1.1;
}

h1 {
  font-size: clamp(2.2rem, 6vw, 4.35rem);
  max-width: 13ch;
}

.lead {
  color: var(--text-muted);
  max-width: 54ch;
  font-size: clamp(1rem, 2.5vw, 1.35rem);
}

.hero-actions {
  margin-top: 0.8rem;
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
}

.btn {
  text-decoration: none;
  border-radius: 999px;
  padding: 0.72rem 1.2rem;
  font-weight: 600;
  transition: transform 180ms ease, box-shadow 180ms ease, color 180ms ease;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-2px);
}

.btn-primary {
  background: linear-gradient(125deg, #7d3ef5, #ac81ff);
  color: #fdfbff;
  box-shadow: 0 10px 24px rgba(112, 62, 223, 0.45);
}

.btn-ghost {
  border: 1px solid var(--line);
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.02);
}

#links h2 {
  font-size: clamp(1.5rem, 4vw, 2.1rem);
  margin-bottom: 1.2rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.card {
  text-decoration: none;
  color: inherit;
  border-radius: 1rem;
  padding: 1.3rem;
  display: grid;
  gap: 0.7rem;
  min-height: 190px;
  transition: transform 180ms ease, border-color 180ms ease;
}

.card:hover,
.card:focus-visible {
  transform: translateY(-4px);
  border-color: rgba(208, 182, 255, 0.62);
}

.card p {
  color: var(--text-muted);
}

.card-link {
  color: var(--accent-strong);
  font-size: 0.95rem;
}

.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  text-align: center;
  padding: 1.25rem;
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 580ms ease, transform 580ms ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.experience-layout {
  width: min(1120px, calc(100% - 2rem));
  margin: 1rem auto 3rem;
  display: grid;
  grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
  gap: 1rem;
}

.rail {
  position: sticky;
  top: 6.2rem;
  align-self: start;
  border-radius: 1rem;
  padding: 1rem;
}

.rail h2 {
  font-size: 1.2rem;
  margin-bottom: 0.6rem;
}

.rail-track {
  position: relative;
  margin-left: 0.45rem;
  display: grid;
  gap: 1rem;
}

.rail-track::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, rgba(200, 150, 255, 0.8), rgba(200, 150, 255, 0.2));
}

.stop {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--text-muted);
  text-decoration: none;
  position: relative;
  padding: 0.35rem 0;
  transition: color 180ms ease;
}

.stop::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #c89bff;
  background: #201033;
  box-shadow: 0 0 0 5px rgba(115, 59, 214, 0.18);
}

.stop.active,
.stop:hover,
.stop:focus-visible {
  color: var(--text-primary);
}

.stop.active::before {
  background: #c89bff;
}

.experience-content {
  display: grid;
  gap: 0.95rem;
}

.stop-panel {
  min-height: 320px;
  border-radius: 1rem;
  padding: 1.2rem;
  scroll-margin-top: 7rem;
}

.stop-panel h3 {
  font-size: 1.45rem;
  margin-bottom: 0.35rem;
}

.stop-meta {
  color: var(--accent-strong);
  margin-bottom: 0.8rem;
  font-size: 0.94rem;
}

.stop-panel p,
.stop-panel li {
  color: var(--text-muted);
}

.stop-panel a {
  color: var(--accent-strong);
  text-decoration: none;
}

.stop-panel a:hover,
.stop-panel a:focus-visible {
  text-decoration: underline;
}

.stop-panel ul {
  margin-top: 0.65rem;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.42rem;
}

.experience-page {
  background: radial-gradient(circle at 18% 12%, #231047 0%, #0b0714 45%, #07050d 100%);
}

.experience-page .rail {
  padding: 1.1rem;
}

.rail-subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 0.9rem;
}

.route-legend {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.route-pill {
  border-radius: 999px;
  padding: 0.28rem 0.62rem;
  font-size: 0.74rem;
  font-family: "Space Grotesk", sans-serif;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #f4f0ff;
}

.route-core {
  background: rgba(162, 110, 255, 0.28);
}

.route-exp {
  background: rgba(47, 211, 177, 0.24);
}

.route-build {
  background: rgba(255, 149, 102, 0.26);
}

.experience-page .rail-track {
  margin-left: 0;
  gap: 0.72rem;
  padding: 0.6rem 0.4rem 0.6rem 0;
  border-radius: 0.85rem;
  background:
    linear-gradient(to bottom, transparent 0 3%, rgba(255, 255, 255, 0.08) 3% 97%, transparent 97%),
    linear-gradient(to bottom, rgba(163, 110, 255, 0.75), rgba(163, 110, 255, 0.15)),
    linear-gradient(to bottom, rgba(52, 214, 180, 0.76), rgba(52, 214, 180, 0.16)),
    linear-gradient(to bottom, rgba(255, 153, 108, 0.72), rgba(255, 153, 108, 0.17));
  background-size: 1px 100%, 4px 100%, 4px 100%, 4px 100%;
  background-repeat: no-repeat;
  background-position: 0.72rem 0, 0.5rem 0, 0.9rem 0, 1.3rem 0;
}

.experience-page .rail-track::before {
  display: none;
}

.experience-page .stop {
  gap: 0.58rem;
  padding: 0.35rem 0 0.35rem 2rem;
  border-radius: 0.55rem;
}

.experience-page .stop::before {
  position: absolute;
  left: 0.42rem;
  width: 14px;
  height: 14px;
  border: 2px solid #f2e9ff;
  box-shadow: 0 0 0 3px rgba(21, 13, 37, 0.8);
}

.stop-code {
  min-width: 1.7rem;
  text-align: center;
  font-size: 0.68rem;
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: 0.04em;
  color: rgba(233, 224, 255, 0.85);
}

.experience-page .line-core::before {
  background: #b17eff;
}

.experience-page .line-exp::before {
  background: #2fd3b1;
}

.experience-page .line-build::before {
  background: #ff9869;
}

.experience-page .stop.active {
  background: rgba(255, 255, 255, 0.06);
}

.experience-page .stop-panel {
  position: relative;
  overflow: hidden;
}

.experience-page .stop-panel::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
}

.experience-page .stop-panel.line-core::before {
  background: linear-gradient(to bottom, #cfb3ff, #8f59f6);
}

.experience-page .stop-panel.line-exp::before {
  background: linear-gradient(to bottom, #96ffe5, #27bb9d);
}

.experience-page .stop-panel.line-build::before {
  background: linear-gradient(to bottom, #ffd0bc, #ff8f5b);
}

@keyframes drift {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(-25px, 22px);
  }
}

@media (max-width: 900px) {
  .experience-layout {
    grid-template-columns: 1fr;
  }

  .rail {
    position: relative;
    top: 0;
  }

  .rail-track::before {
    top: 6px;
    bottom: 6px;
  }

  .experience-page .rail-track {
    background-size: 1px 100%, 3px 100%, 3px 100%, 3px 100%;
    background-position: 0.75rem 0, 0.54rem 0, 0.84rem 0, 1.14rem 0;
  }
}

@media (max-width: 640px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.65rem;
  }

  .top-nav {
    flex-wrap: wrap;
    gap: 0.7rem;
  }

  .hero {
    min-height: 480px;
  }
}
