/* ─── Timeline Section ───────────────────────────────────────────────────────── */
.timeline-section {
  padding: var(--space-16) 0 var(--space-12);
  background-color: var(--colour-surface);
  border-top: 1px solid var(--colour-border);
}

.timeline-section__header {
  padding: 0 var(--space-8);
  max-width: 960px;
  margin: 0 auto var(--space-6);
  width: 100%;
}

.timeline-section__label {
  font-size: var(--text-xs);
  font-weight: var(--font-weight-medium);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--colour-accent);
  margin-bottom: var(--space-3);
}

.timeline-section__title {
  font-size: var(--text-3xl);
  font-weight: var(--font-weight-light);
  letter-spacing: -0.02em;
  color: var(--colour-text);
}

/* ── Filter tags ────────────────────────────────────────────────────────────── */
.timeline-filters {
  display: flex;
  gap: var(--space-2);
  padding: 0 var(--space-8);
  max-width: 960px;
  margin: 0 auto var(--space-8);
}

.timeline-filter {
  padding: var(--space-1) var(--space-4);
  border-radius: var(--radius-full);
  border: 1px solid var(--colour-border);
  background: transparent;
  font-family: var(--font-family);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-medium);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--colour-text-muted);
  cursor: pointer;
  transition: color 200ms var(--ease-out),
              border-color 200ms var(--ease-out),
              background 200ms var(--ease-out);
}

.timeline-filter:hover {
  color: var(--colour-accent);
  border-color: var(--colour-accent);
}

.timeline-filter.is-active {
  background: var(--colour-accent);
  border-color: var(--colour-accent);
  color: #ffffff;
}

/* ── Scroll container ───────────────────────────────────────────────────────── */
.timeline-scroll-outer {
  position: relative;
  width: 100%;
  overflow-x: hidden;
  overflow-y: visible;
}

.timeline-scroll-outer::before,
.timeline-scroll-outer::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 60px;
  z-index: 10;
  pointer-events: none;
}

.timeline-scroll-outer::before {
  left: 0;
  background: linear-gradient(to right, var(--colour-surface), transparent);
}

.timeline-scroll-outer::after {
  right: 0;
  background: linear-gradient(to left, var(--colour-surface), transparent);
}

.timeline-scroll {
  position: relative;
  width: 100%;
  overflow-x: scroll;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  cursor: grab;
  padding-bottom: var(--space-8);
}

.timeline-scroll::-webkit-scrollbar { display: none; }
.timeline-scroll.is-dragging { cursor: grabbing; user-select: none; }

/* ── SVG layer (bars + connectors) ─────────────────────────────────────────── */
.timeline-svg {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  overflow: visible;
}

/* ── Year axis ──────────────────────────────────────────────────────────────── */
.timeline-axis {
  position: relative;
  height: 32px;
  margin-bottom: var(--space-4);
}

.timeline-axis__line {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--colour-border);
}

.timeline-axis__tick {
  position: absolute;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.timeline-axis__tick-line {
  width: 1px;
  height: 8px;
  background: var(--colour-border);
}

.timeline-axis__tick-label {
  font-size: var(--text-xs);
  color: var(--colour-text-muted);
  font-weight: var(--font-weight-medium);
  white-space: nowrap;
}

/* ── Cards container ────────────────────────────────────────────────────────── */
.timeline-cards {
  position: relative;
}

/* ── Individual card ────────────────────────────────────────────────────────── */
.timeline-card {
  position: absolute;
  width: 200px;
  background: var(--colour-bg);
  border: 1px solid var(--colour-border);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  transition: border-color 200ms var(--ease-out),
              box-shadow 200ms var(--ease-out),
              opacity 300ms var(--ease-out),
              transform 300ms var(--ease-out);
}

.timeline-card:hover {
  border-color: var(--colour-accent-soft);
  box-shadow: 0 4px 16px rgba(122, 158, 135, 0.12);
}

.timeline-card.is-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
}

.timeline-card__type {
  font-size: var(--text-xs);
  font-weight: var(--font-weight-medium);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--colour-accent);
  margin-bottom: var(--space-1);
}

.timeline-card__title {
  font-size: var(--text-sm);
  font-weight: var(--font-weight-medium);
  color: var(--colour-text);
  line-height: 1.35;
  margin-bottom: var(--space-1);
}

.timeline-card__institution {
  font-size: var(--text-xs);
  color: var(--colour-text-muted);
  margin-bottom: var(--space-2);
}

.timeline-card__detail {
  font-size: var(--text-xs);
  color: var(--colour-text-muted);
  line-height: 1.5;
}

/* ── Category colour variants ───────────────────────────────────────────────── */
.timeline-card[data-category="education"] {
  border-left: 3px solid var(--colour-accent);
}

.timeline-card[data-category="research"] {
  border-left: 3px solid #6b7fa3;
}

.timeline-card[data-category="industry"] {
  border-left: 3px solid #b07d6a;
}

/* ── Progress bar ───────────────────────────────────────────────────────────── */
.timeline-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-6);
  margin-top: var(--space-6);
  padding: 0 var(--space-8);
}

.timeline-progress__bar-wrap {
  flex: 1;
  max-width: 240px;
  height: 2px;
  background: var(--colour-border);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.timeline-progress__bar {
  height: 100%;
  width: 0%;
  background: var(--colour-accent);
  border-radius: var(--radius-full);
  transition: width 100ms linear;
}

.timeline-progress__hint {
  font-size: var(--text-xs);
  color: var(--colour-text-muted);
  letter-spacing: 0.04em;
}
