/* Career timeline (/timeline/) */
.tl {
  --tl-ink: #1f2328; --tl-muted: #6b7280; --tl-line: #e6e8eb; --tl-accent: #fcf113;
  --c-role: #2563eb; --c-teaching: #15803d; --c-education: #7c3aed;
  --c-paper: #c2410c; --c-talk: #db2777; --c-library: #0f766e;
  max-width: 900px; margin: 0 auto; padding: 48px 20px 96px; color: var(--tl-ink);
}

.tl-hero { margin-bottom: 36px; }
.tl-eyebrow {
  display: inline-block; margin: 0 0 12px; padding: 4px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  background: var(--tl-accent); color: #3d3500;
}
.tl-title { font-size: clamp(1.7rem, 3.6vw, 2.5rem); line-height: 1.15; margin: 0 0 12px; font-weight: 700; }
.tl-lede { color: var(--tl-muted); font-size: 1.05rem; margin: 0 0 24px; max-width: 620px; }

.tl-filters { display: flex; flex-wrap: wrap; gap: 8px; position: sticky; top: 70px; z-index: 5;
  padding: 10px 0; background: linear-gradient(#fff 80%, rgba(255,255,255,0)); }
.tl-chip {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  padding: 7px 12px; border-radius: 999px; border: 1px solid var(--tl-line); background: #fff;
  font: 600 13px/1 inherit; font-family: inherit; color: var(--tl-ink);
  transition: background .15s ease, border-color .15s ease;
}
.tl-chip:hover { border-color: #cfd3d8; }
.tl-chip:focus-visible { outline: 3px solid var(--tl-accent); outline-offset: 2px; }
.tl-chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.tl-chip .tl-count { color: var(--tl-muted); font-weight: 600; font-variant-numeric: tabular-nums; }
.tl-chip.is-on { background: var(--tl-ink); border-color: var(--tl-ink); color: #fff; }
.tl-chip.is-on .tl-count { color: #c9ccd1; }
.tl-chip--role { --c: var(--c-role); } .tl-chip--teaching { --c: var(--c-teaching); }
.tl-chip--education { --c: var(--c-education); } .tl-chip--paper { --c: var(--c-paper); }
.tl-chip--talk { --c: var(--c-talk); } .tl-chip--library { --c: var(--c-library); }

.tl-list { list-style: none; margin: 0; padding: 0 0 0 92px; position: relative; }
.tl-list::before {
  content: ""; position: absolute; left: 77px; top: 6px; bottom: 6px; width: 2px;
  background: linear-gradient(var(--tl-line), var(--tl-line) 92%, rgba(230,232,235,0));
}
.tl-list > li[hidden] { display: none; }

.tl-year { position: relative; margin: 30px 0 10px; height: 0; }
.tl-year:first-child { margin-top: 6px; }
.tl-year span {
  position: absolute; left: -92px; top: -12px; width: 62px; text-align: right;
  font-size: 1.15rem; font-weight: 800; color: var(--tl-ink); font-variant-numeric: tabular-nums;
}

.tl-item { position: relative; margin: 0 0 12px; }
.tl-item--role { --c: var(--c-role); } .tl-item--teaching { --c: var(--c-teaching); }
.tl-item--education { --c: var(--c-education); } .tl-item--paper { --c: var(--c-paper); }
.tl-item--talk { --c: var(--c-talk); } .tl-item--library { --c: var(--c-library); }

.tl-dot {
  position: absolute; left: -20px; top: 20px; width: 12px; height: 12px; border-radius: 50%;
  background: #fff; border: 3px solid var(--c); box-shadow: 0 0 0 4px #fff;
}
.tl-card {
  padding: 14px 16px; border: 1px solid var(--tl-line); border-radius: 12px; background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,.03); transition: box-shadow .18s ease, border-color .18s ease, transform .18s ease;
}
.tl-card:hover { border-color: #d6d9de; box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 10px 28px rgba(0,0,0,.07); transform: translateY(-1px); }
.tl-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; font-size: 12.5px; color: var(--tl-muted); }
.tl-badge {
  font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--c); background: color-mix(in srgb, var(--c) 10%, #fff); padding: 3px 8px; border-radius: 6px;
}
.tl-meta time { font-variant-numeric: tabular-nums; }
.tl-item-title { font-size: 1.02rem; line-height: 1.35; margin: 0; font-weight: 650; }
.tl-item-title a { color: inherit; text-decoration: none; background-image: linear-gradient(var(--tl-accent), var(--tl-accent));
  background-size: 0 40%; background-position: 0 88%; background-repeat: no-repeat; transition: background-size .2s ease; }
.tl-item-title a:hover, .tl-item-title a:focus-visible { background-size: 100% 40%; }
.tl-org { margin: 4px 0 0; font-size: .9rem; color: var(--tl-muted); }

/* reveal on scroll */
.tl-item.tl-anim { opacity: 0; transform: translateY(8px); transition: opacity .35s ease, transform .35s ease; }
.tl-item.tl-anim.is-in { opacity: 1; transform: none; }

@media (max-width: 640px) {
  .tl { padding-top: 28px; }
  .tl-list { padding-left: 26px; }
  .tl-list::before { left: 11px; }
  .tl-year span { position: static; display: block; width: auto; text-align: left; margin-left: -26px; padding: 0 0 4px; }
  .tl-year { height: auto; margin: 22px 0 8px; }
  .tl-dot { left: -21px; }
  .tl-filters { top: 56px; }
}
@media (prefers-reduced-motion: reduce) {
  .tl-card, .tl-chip, .tl-item-title a { transition: none; }
}
@media print {
  .tl-filters { display: none; }
  .tl-item.tl-anim { opacity: 1; transform: none; }
}
