:root {
  --bg: #060a14;
  --bg-2: #0b1222;
  --text: #e6ebf5;
  --muted: #8d99b3;
  --accent: #68b1ff;          /* blue from the original site */
  --accent-soft: rgba(104, 177, 255, 0.18);
  --card: rgba(13, 20, 38, 0.72);
  --card-border: rgba(104, 177, 255, 0.16);
  --rail-w: 9rem;
  --radius: 14px;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(ellipse at 30% 0%, var(--bg-2), var(--bg) 70%) fixed, var(--bg);
  color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

/* Star field sits behind everything and stays put while scrolling */
#sky {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  display: block;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  max-width: 72rem;
  margin: 0 auto;
  /* 70% of the screen: the timeline already peeks in below */
  min-height: 70vh;
  min-height: 70dvh;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  align-items: center;
  gap: 3rem;
  padding: 3rem 1.5rem 3rem calc(var(--rail-w) + 1.5rem);
}
.eyebrow {
  margin: 0 0 .5rem;
  color: var(--accent);
  font-size: .95rem;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.hero h1 {
  margin: 0;
  font-size: clamp(2.6rem, 6.5vw, 5rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  background: linear-gradient(100deg, #fff 30%, #b9d8ff 60%, #b98cff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.role { margin: 1rem 0 0; font-size: clamp(1.1rem, 2.2vw, 1.4rem); color: var(--text); }
.role .sep { color: var(--accent); margin: 0 .35rem; }
.bio { margin: 1.25rem 0 0; max-width: 34rem; color: #c4cce0; font-size: 1.05rem; }
.cta { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.btn {
  display: inline-block;
  padding: .7rem 1.25rem;
  border-radius: 10px;
  border: 1px solid var(--card-border);
  background: rgba(13, 20, 38, .6);
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  transition: background .2s, border-color .2s, transform .2s;
}
.btn:hover { border-color: var(--accent); transform: translateY(-1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #06101f; }
.btn.primary:hover { background: #8cc4ff; }

.hero-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.hero-card section + section {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(141, 153, 179, .15);
}
.hero-card h2 {
  margin: 0 0 .6rem;
  font-size: .75rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}
.hero-card p { margin: 0; }
.muted { color: var(--muted); font-size: .9rem; }
.facts { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.facts li { display: flex; flex-direction: column; }
.hero-card .tags { margin: 0; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 2rem; padding-top: 5rem; }
}

/* ---------- Layout ---------- */
.layout {
  display: grid;
  grid-template-columns: var(--rail-w) minmax(0, 1fr);
  max-width: 72rem;
  margin: 0 auto;
}

/* ---------- Timeline rail (left) ---------- */
.timeline { position: relative; }
.rail {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 3rem 0;
}
.rail-track,
.rail-progress {
  position: absolute;
  left: calc(var(--rail-w) - 1.5rem);
  top: 3rem;
  width: 2px;
  border-radius: 2px;
}
.rail-track { bottom: 3rem; background: rgba(141, 153, 179, 0.22); }
.rail-progress {
  height: 0;
  background: linear-gradient(var(--accent), #b98cff);
  box-shadow: 0 0 12px var(--accent);
}
.rail-marks {
  list-style: none;
  margin: 0;
  padding: 0;
  position: absolute;
  inset: 3rem 0;
}
/* Label then dot; dot (10px) centered on the 2px line at 1.5rem from the right */
.rail-marks li {
  position: absolute;
  right: calc(1.5rem - 6px);
  transform: translateY(-50%);
}
.rail-marks a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.rail-marks a::after {                 /* the dot */
  content: "";
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid rgba(141, 153, 179, 0.5);
  transition: border-color .3s, background .3s, box-shadow .3s;
}
.rail-marks a:hover,
.rail-marks a.active { color: var(--text); }
.rail-marks a.active::after {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}

/* ---------- Entries (right) ----------
 * .entries is made (n x 100vh) tall by timeline.js so there is room to scroll.
 * .stage sticks to the viewport; all cards sit stacked in it and only the
 * active one is shown. Cards swap on a threshold, not with the scroll.
 */
.entries { position: relative; }
.stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  display: grid;
  place-items: center;
  padding: 2rem 1.5rem;
}
.entry {
  grid-area: 1 / 1;
  width: min(100%, 54rem);
  max-height: calc(100vh - 4rem);
  max-height: calc(100dvh - 4rem);
  overflow: auto;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  /* hidden by default: below, slightly shrunk */
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(48px) scale(.97);
  transition: opacity .55s ease, transform .55s ease, visibility 0s linear .55s;
}
.entry.past { transform: translateY(-48px) scale(.97); }   /* leaves upward */
.entry.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
  transition-delay: .1s, .1s, 0s;                          /* old card leaves first */
}
@media (prefers-reduced-motion: reduce) {
  .entry, .entry.past { transform: none; transition-duration: .2s, 0s, 0s; }
}

.entry-banner {
  position: relative;
  aspect-ratio: 16 / 6;
  background:
    radial-gradient(circle at 20% 30%, rgba(185, 140, 255, .35), transparent 55%),
    radial-gradient(circle at 80% 70%, rgba(104, 177, 255, .35), transparent 55%),
    #0d1730;
  display: flex;
  align-items: flex-end;
  padding: 1.25rem 1.75rem;
  overflow: hidden;
}
.entry-banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.entry-banner .year {
  position: relative;
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.03em;
  color: rgba(230, 235, 245, .9);
  text-shadow: 0 2px 20px rgba(0, 0, 0, .5);
}
.entry-body { padding: 1.5rem 1.75rem 1.75rem; }

.entry-date { color: var(--accent); font-size: 0.85rem; font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.entry h2 { margin: .25rem 0 .75rem; font-size: clamp(1.5rem, 3vw, 2rem); line-height: 1.2; }
.entry p { margin: 0 0 1rem; color: #c4cce0; }

.tags { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 1rem; padding: 0; list-style: none; }
.tags li {
  font-size: .75rem;
  padding: .15rem .55rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
}

.links { display: flex; flex-wrap: wrap; gap: .5rem; }
.links a {
  font-size: .9rem;
  padding: .35rem .85rem;
  border-radius: 8px;
  border: 1px solid var(--card-border);
  text-decoration: none;
  transition: background .2s, border-color .2s;
}
.links a:hover { background: var(--accent-soft); border-color: var(--accent); }

.entry.placeholder { border-style: dashed; }

/* ---------- Footer ---------- */
.footer {
  text-align: center;
  color: var(--muted);
  font-size: .85rem;
  padding: 2rem 1rem 3rem;
}
.footer p { margin: .2rem 0; }

/* ---------- Small screens: slim rail, no labels ---------- */
@media (max-width: 640px) {
  :root { --rail-w: 2.75rem; }
  .hero { padding-left: 1.25rem; padding-right: 1.25rem; }
  .rail-marks a { font-size: 0; gap: 0; }
  .stage { padding: 1rem .75rem 1rem .25rem; }
  .entry { max-height: calc(100dvh - 2rem); }
  .entry-body, .entry-banner { padding-left: 1.25rem; padding-right: 1.25rem; }
}
