:root {
  color-scheme: dark;
  --accent: #2cc7bd;
  --accent-warm: #f38336;
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.62);
  --line: rgba(255, 255, 255, 0.34);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #111;
  color: var(--text);
  font-family: "Trebuchet MS", Arial, sans-serif;
}

button {
  font: inherit;
}

.timeline-app {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  isolation: isolate;
}

.timeline-bg,
.timeline-bg-empty {
  position: absolute;
  inset: 0;
  z-index: -3;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: radial-gradient(circle at 72% 20%, #5f5a4a, #171717 58%, #050505);
  transform: scale(1.02);
  transition: opacity 220ms ease, transform 500ms ease;
}

.timeline-scrim {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.78) 0%, rgba(0, 0, 0, 0.44) 32%, rgba(0, 0, 0, 0.12) 74%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.66) 0%, rgba(0, 0, 0, 0.08) 44%, rgba(0, 0, 0, 0.28) 100%);
}

.timeline-years {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 3;
  display: flex;
  width: 178px;
  flex-direction: column;
  justify-content: center;
  gap: clamp(16px, 4vh, 34px);
  padding-left: 62px;
}

.timeline-arc {
  position: absolute;
  top: 0;
  bottom: 0;
  left: -1px;
  width: 320px;
  pointer-events: none;
}

.timeline-arc svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.timeline-arc path {
  fill: none;
  stroke: rgba(44, 199, 189, 0.82);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 8px rgba(44, 199, 189, 0.18));
}

.timeline-year {
  position: relative;
  z-index: 1;
  width: max-content;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: clamp(1rem, 1.4vw, 1.35rem);
  letter-spacing: 0.04em;
}

.timeline-year::before {
  content: "";
  position: absolute;
  top: 50%;
  right: calc(100% + 20px);
  width: 82px;
  height: 1px;
  background: transparent;
}

.timeline-year.is-active {
  color: #fff;
  font-weight: 700;
}

.timeline-year.is-active::before {
  background: #fff;
}

.timeline-copy {
  position: absolute;
  left: clamp(220px, 15vw, 300px);
  bottom: 23vh;
  width: min(780px, 52vw);
}

.timeline-event {
  display: none;
}

.timeline-event.is-active {
  display: block;
  animation: timeline-copy-in 220ms ease-out;
}

.timeline-kicker {
  display: inline-block;
  margin: 0 0 24px;
  padding-bottom: 12px;
  border-bottom: 3px solid var(--accent);
  font-size: clamp(1rem, 1.5vw, 1.45rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.timeline-event h1 {
  margin: 0 0 24px;
  font-size: clamp(2.25rem, 4vw, 4.5rem);
  line-height: 1.1;
  text-wrap: balance;
}

.timeline-description {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(1.05rem, 1.45vw, 1.38rem);
  line-height: 1.65;
}

.timeline-dates {
  position: fixed;
  right: 0;
  bottom: 7vh;
  left: 260px;
  z-index: 4;
  padding: 0 42px 0 40px;
}

.timeline-date-group {
  display: none;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 50px;
  overflow-x: auto;
  overflow-y: hidden;
  border-bottom: 1px solid var(--line);
}

.timeline-date-group.is-active {
  display: flex;
}

.timeline-date {
  position: relative;
  min-width: max-content;
  padding: 0 0 16px;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.66);
  cursor: pointer;
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.timeline-date::after {
  content: "";
  position: absolute;
  right: 50%;
  bottom: -4px;
  width: 1px;
  height: 8px;
  background: var(--line);
}

.timeline-date.is-active {
  color: var(--accent-warm);
}

.timeline-date.is-active::before {
  content: "";
  position: absolute;
  right: 50%;
  bottom: -2px;
  left: 0;
  height: 2px;
  background: var(--accent-warm);
}

@keyframes timeline-copy-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 860px) {
  .timeline-app {
    min-height: 100svh;
  }

  .timeline-years {
    top: 24px;
    right: 18px;
    bottom: auto;
    left: 18px;
    width: auto;
    flex-direction: row;
    justify-content: flex-start;
    gap: 16px;
    overflow-x: auto;
    padding: 4px 0 14px;
  }

  .timeline-arc,
  .timeline-year::before {
    display: none;
  }

  .timeline-copy {
    right: 22px;
    bottom: 24vh;
    left: 22px;
    width: auto;
  }

  .timeline-dates {
    right: 0;
    bottom: 28px;
    left: 0;
    padding: 0 22px;
  }

  .timeline-date-group {
    justify-content: flex-start;
    overflow-x: auto;
    padding-right: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .timeline-bg,
  .timeline-event.is-active {
    animation: none;
    transition: none;
  }
}
