/* Career timeline (`/timeline`).

   The page works with no script: every entry is visible and in order.
   `tl-js` on <html> means the script is there, so the scene frames are shown.
   `tl-live` means that motion is allowed, so entries animate in as they arrive. */

.tl-page {
    position: relative;
    overflow-x: clip;
}

/* ── Hero ─────────────────────────────────────────────────────────────── */

.tl-hero {
    padding-block: 88px 64px;
    border-top: 2px solid var(--pass);
    border-bottom: 1px solid var(--rule);
}

.tl-hero__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.tl-hero h1 {
    max-width: 16ch;
    margin-bottom: 20px;
    font-size: clamp(40px, 7vw, 76px);
    letter-spacing: -0.03em;
    line-height: 1.02;
}

.tl-hero__summary {
    max-width: 58ch;
    margin-bottom: 36px;
    color: var(--muted);
    font-size: 18px;
}

.tl-hero__stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0;
    margin: 0 0 36px;
    border: 1px solid var(--rule);
    border-radius: 6px;
    background: var(--paper);
}

.tl-hero__stats > div {
    min-width: 150px;
    padding: 14px 22px;
    border-right: 1px solid var(--rule);
}

.tl-hero__stats > div:last-child {
    border-right: 0;
}

.tl-hero__stats dt {
    color: var(--dim);
    font-family: var(--font-display);
    font-size: 10.5px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.tl-hero__stats dd {
    margin: 4px 0 0;
    color: var(--ink);
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 600;
}

.tl-hero__hint {
    display: none;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    color: var(--ink);
    font-family: var(--font-display);
    font-size: 13px;
}

.tl-live .tl-hero__hint {
    display: inline-flex;
}

.tl-hero__hint-mark {
    width: 10px;
    height: 10px;
    border-right: 2px solid var(--pass);
    border-bottom: 2px solid var(--pass);
    transform: rotate(45deg);
    animation: tl-nudge 1.6s ease-in-out infinite;
}

.tl-hero__note {
    margin: 0;
    color: var(--dim);
    font-size: 13.5px;
}

@keyframes tl-nudge {
    0%, 100% { translate: 0 -3px; opacity: 0.5; }
    50% { translate: 0 3px; opacity: 1; }
}

/* ── Spine ────────────────────────────────────────────────────────────── */

.tl {
    --tl-lit: 0px;
    --tl-col: 96px;
    position: relative;
    padding-bottom: 40px;
}

.tl-spine {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    margin-left: -1px;
    background: var(--rule);
}

.tl-spine__lit {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        var(--advisory) 0%,
        var(--promise-soft) 28%,
        var(--guidance) 46%,
        var(--attention) 68%,
        var(--pass) 100%
    );
    clip-path: inset(0 0 calc(100% - var(--tl-lit)) 0);
}

.tl-playhead {
    position: absolute;
    top: var(--tl-lit);
    left: 50%;
    width: 14px;
    height: 14px;
    margin: -7px 0 0 -7px;
    border-radius: 50%;
    background: var(--ink);
    box-shadow:
        0 0 0 5px rgba(249, 250, 251, 0.1),
        0 0 26px 8px rgba(128, 203, 240, 0.45);
}

html:not(.tl-js) .tl-playhead,
html:not(.tl-js) .tl-spine__lit {
    display: none;
}

/* ── Era heading ──────────────────────────────────────────────────────── */

.tl-era {
    --era: var(--promise-soft);
    position: relative;
    scroll-margin-top: calc(var(--header-height) + 12px);
}

.tl-era__head {
    position: relative;
    z-index: 2;
    isolation: isolate;
    max-width: 760px;
    margin-inline: auto;
    padding: clamp(150px, 15vw, 214px) 24px 56px;
    background: var(--ground);
    text-align: center;
}

.tl-era__year {
    position: absolute;
    z-index: -1;
    top: 44px;
    left: 50%;
    color: transparent;
    font-family: var(--font-display);
    font-size: clamp(88px, 15vw, 196px);
    font-weight: 700;
    letter-spacing: -0.05em;
    line-height: 1;
    white-space: nowrap;
    -webkit-text-stroke: 1px var(--rule);
    transform: translate(-50%, var(--tl-drift, 0px));
    user-select: none;
}

.tl-era.is-active .tl-era__year {
    -webkit-text-stroke-color: color-mix(in srgb, var(--era) 55%, var(--rule));
}

.tl-era__head .eyebrow {
    color: var(--era);
}

.tl-era__head h2 {
    margin-bottom: 14px;
    font-size: clamp(28px, 4.4vw, 44px);
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.tl-era__head > p:last-child {
    margin: 0 auto;
    max-width: 60ch;
    color: var(--muted);
    font-size: 17px;
}

/* ── Rows ─────────────────────────────────────────────────────────────── */

.tl-rows {
    margin: 0;
    padding: 0;
    list-style: none;
}

.tl-row {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--tl-col) minmax(0, 1fr);
    align-items: start;
    padding-block: 30px;
}

.tl-card {
    grid-column: 1;
    grid-row: 1;
    justify-self: end;
    width: min(100%, 470px);
    padding: 20px 22px 18px;
    background: var(--paper);
    border: 1px solid var(--rule);
    border-top: 2px solid var(--rule);
    border-radius: 6px;
    transition: border-color 240ms ease-out;
}

.tl-side {
    grid-column: 3;
    grid-row: 1;
    justify-self: start;
    width: min(100%, 520px);
}

.tl-row--right .tl-card {
    grid-column: 3;
    justify-self: start;
}

.tl-row--right .tl-side {
    grid-column: 1;
    justify-self: end;
}

.tl-row--right .tl-ghost {
    text-align: right;
}

.tl-row.is-past .tl-card {
    border-top-color: var(--era);
}

.tl-card__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 10px;
    font-family: var(--font-display);
    font-size: 11.5px;
}

.tl-card__meta time {
    color: var(--ink);
    font-weight: 600;
}

.tl-card__kind {
    color: var(--era);
    font-size: 10.5px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.tl-card h3 {
    margin-bottom: 8px;
    color: var(--ink);
    font-size: 20px;
    line-height: 1.25;
}

.tl-card h3 a {
    text-decoration: none;
}

.tl-card h3 a:hover,
.tl-card h3 a:focus-visible {
    text-decoration: underline;
}

.tl-card__summary {
    margin-bottom: 14px;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.6;
}

.tl-card__links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    margin-bottom: 14px;
}

.tl-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 28px;
    color: var(--muted);
    font-family: var(--font-display);
    font-size: 12px;
    text-decoration: none;
}

.tl-link--primary {
    color: var(--promise-soft);
    font-weight: 600;
}

.tl-link:hover,
.tl-link:focus-visible {
    color: var(--ink);
    text-decoration: underline;
}

.tl-card__basis {
    margin: 0;
    padding-top: 10px;
    border-top: 1px solid var(--rule-soft);
    color: var(--dim);
    font-family: var(--font-display);
    font-size: 10.5px;
}

.tl-card__basis span {
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* The dot on the spine, with a short line to the card. */
.tl-node {
    grid-column: 2;
    grid-row: 1;
    justify-self: center;
    position: relative;
    z-index: 1;
    width: 14px;
    height: 14px;
    margin-top: 26px;
    border: 2px solid var(--faint);
    border-radius: 50%;
    background: var(--ground);
    transition:
        background-color 240ms ease-out,
        border-color 240ms ease-out,
        box-shadow 240ms ease-out;
}

.tl-node::before {
    content: "";
    position: absolute;
    top: 50%;
    right: calc(100% + 2px);
    width: calc(var(--tl-col) / 2 - 9px);
    height: 1px;
    background: var(--rule);
    transform-origin: right center;
    transition: background-color 240ms ease-out;
}

.tl-row--right .tl-node::before {
    right: auto;
    left: calc(100% + 2px);
    transform-origin: left center;
}

.tl-row.is-past .tl-node {
    border-color: var(--era);
    background: var(--era);
    box-shadow: 0 0 0 5px color-mix(in srgb, var(--era) 18%, transparent);
}

.tl-row.is-past .tl-node::before {
    background: var(--era);
}

.tl-row.is-current .tl-node {
    box-shadow:
        0 0 0 5px color-mix(in srgb, var(--era) 26%, transparent),
        0 0 22px 4px color-mix(in srgb, var(--era) 55%, transparent);
}

/* The large date on the open side of a row that has no scene. */
.tl-ghost {
    margin: 12px 0 0;
    color: transparent;
    font-family: var(--font-display);
    font-size: clamp(30px, 4vw, 46px);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1;
    text-transform: uppercase;
    -webkit-text-stroke: 1px var(--faint);
    transition: -webkit-text-stroke-color 240ms ease-out;
    user-select: none;
}

.tl-row.is-past .tl-ghost {
    -webkit-text-stroke-color: color-mix(in srgb, var(--era) 60%, var(--faint));
}

/* ── Scenes ───────────────────────────────────────────────────────────── */

.tl-figure {
    margin: 0;
}

.tl-scene {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: 8px;
    box-shadow: 0 30px 70px -40px #000;
    transition: border-color 240ms ease-out;
}

.tl-row.is-current .tl-scene {
    border-color: color-mix(in srgb, var(--era) 55%, var(--rule));
}

/* With no script there is nothing to draw in the frame, so the frame is left out. */
html:not(.tl-js) .tl-scene {
    display: none;
}

/* ── Entries come in from their side of the spine ─────────────────────── */

.tl-live .tl-card,
.tl-live .tl-side,
.tl-live .tl-era__head > *:not(.tl-era__year),
.tl-live .tl-end__inner {
    opacity: 0;
    transition:
        opacity 520ms cubic-bezier(0.16, 1, 0.3, 1),
        transform 620ms cubic-bezier(0.16, 1, 0.3, 1),
        border-color 240ms ease-out;
}

.tl-live .tl-card {
    transform: translateX(-44px);
}

.tl-live .tl-side {
    transform: translateX(44px) scale(0.97);
    transition-delay: 90ms;
}

.tl-live .tl-row--right .tl-card {
    transform: translateX(44px);
}

.tl-live .tl-row--right .tl-side {
    transform: translateX(-44px) scale(0.97);
}

.tl-live .tl-node::before {
    transform: scaleX(0);
    transition:
        transform 420ms cubic-bezier(0.16, 1, 0.3, 1) 120ms,
        background-color 240ms ease-out;
}

.tl-live .tl-era__head > *:not(.tl-era__year),
.tl-live .tl-end__inner {
    transform: translateY(26px);
}

.tl-live .tl-era__head > h2 {
    transition-delay: 70ms;
}

.tl-live .tl-era__head > p:last-child {
    transition-delay: 140ms;
}

.tl-live .is-in .tl-card,
.tl-live .is-in .tl-side,
.tl-live .tl-era__head.is-in > *:not(.tl-era__year),
.tl-live .tl-end.is-in .tl-end__inner {
    opacity: 1;
    transform: none;
}

.tl-live .is-in .tl-node::before {
    transform: scaleX(1);
}

/* ── Closing ──────────────────────────────────────────────────────────── */

.tl-end {
    position: relative;
    z-index: 2;
    padding-block: 88px 120px;
    border-top: 1px solid var(--rule);
    background: var(--ground);
}

.tl-end__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 720px;
    text-align: center;
}

.tl-end h2 {
    margin-bottom: 14px;
    font-size: clamp(28px, 4.4vw, 44px);
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.tl-end__inner > p {
    max-width: 54ch;
    color: var(--muted);
    font-size: 17px;
}

.tl-end .button-row {
    justify-content: center;
    margin-block: 20px 22px;
}

.tl-end__more {
    margin: 0;
}

/* ── Playback bar ─────────────────────────────────────────────────────── */

.tl-hud {
    position: fixed;
    z-index: 40;
    bottom: 18px;
    left: 50%;
    display: none;
    align-items: center;
    gap: 14px;
    max-width: calc(100vw - 24px);
    padding: 7px 14px 10px 7px;
    overflow: hidden;
    background: rgba(20, 20, 20, 0.92);
    border: 1px solid var(--rule);
    border-radius: 8px;
    box-shadow: 0 18px 44px -18px #000;
    opacity: 0;
    transform: translate(-50%, 16px);
    transition:
        opacity 240ms ease-out,
        transform 240ms ease-out,
        visibility 0s linear 240ms;
    visibility: hidden;
    backdrop-filter: blur(8px);
}

.tl-js .tl-hud {
    display: flex;
}

.tl-hud.is-shown {
    opacity: 1;
    transform: translate(-50%, 0);
    transition-delay: 0s;
    visibility: visible;
}

.tl-hud__play {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-width: 96px;
    min-height: 40px;
    padding: 0 14px;
    color: var(--ground);
    background: var(--ink);
    border: 0;
    border-radius: 5px;
    cursor: pointer;
    font-family: var(--font-display);
    font-size: 12.5px;
    font-weight: 600;
}

.tl-hud__play:hover {
    background: var(--advisory);
}

.tl-hud__play:focus-visible {
    outline: 2px solid var(--promise-soft);
    outline-offset: 2px;
}

/* A triangle when the page is paused, two bars when it plays. */
.tl-hud__icon {
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 6px 0 6px 10px;
    border-color: transparent transparent transparent currentColor;
}

.is-playing .tl-hud__icon {
    width: 10px;
    height: 12px;
    border-width: 0 3px;
    border-color: currentColor;
}

/* Motion is off, so the page cannot play by itself. */
html:not(.tl-live) .tl-hud__play {
    display: none;
}

.tl-hud__date {
    min-width: 84px;
    margin: 0;
    color: var(--ink);
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    white-space: nowrap;
}

.tl-hud__eras {
    display: flex;
    gap: 2px;
}

.tl-hud__eras a {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 9px;
    color: var(--dim);
    border-radius: 4px;
    font-family: var(--font-display);
    font-size: 11.5px;
    text-decoration: none;
    white-space: nowrap;
}

.tl-hud__eras a:hover,
.tl-hud__eras a:focus-visible {
    color: var(--ink);
    background: var(--raised);
}

.tl-hud__eras a.is-active {
    color: var(--ground);
    background: var(--era);
    font-weight: 600;
}

.tl-hud__bar {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 3px;
    background: var(--rule);
}

.tl-hud__bar span {
    display: block;
    height: 100%;
    background: linear-gradient(to right, var(--advisory), var(--promise-soft), var(--guidance), var(--attention), var(--pass));
    transform: scaleX(0);
    transform-origin: left center;
}

/* ── One column on a narrow screen: the spine moves to the left edge ──── */

@media (max-width: 900px) {
    .tl {
        --tl-col: 34px;
    }

    .tl-hero {
        padding-block: 56px 44px;
    }

    .tl-hero__inner {
        align-items: flex-start;
        text-align: left;
    }

    .tl-hero__stats {
        justify-content: flex-start;
        width: 100%;
    }

    .tl-hero__stats > div {
        flex: 1 1 0;
        min-width: 0;
        padding: 12px 14px;
    }

    .tl-hero__stats dd {
        font-size: 18px;
    }

    .tl-spine,
    .tl-playhead {
        left: 7px;
    }

    .tl-spine {
        margin-left: 0;
    }

    .tl-playhead {
        left: 1px;
        margin-left: -6px;
    }

    .tl-era__head {
        margin-inline: 0;
        padding: clamp(104px, 27vw, 150px) 0 36px var(--tl-col);
        text-align: left;
    }

    .tl-era__head > p:last-child {
        margin: 0;
    }

    .tl-era__year {
        top: 32px;
        left: var(--tl-col);
        font-size: clamp(64px, 22vw, 120px);
        transform: translate(0, var(--tl-drift, 0px));
    }

    .tl-row {
        grid-template-columns: var(--tl-col) minmax(0, 1fr);
        row-gap: 14px;
        padding-block: 20px;
    }

    .tl-row .tl-node {
        grid-column: 1;
        justify-self: start;
        margin-left: 1px;
    }

    .tl-row .tl-node::before,
    .tl-row--right .tl-node::before {
        right: auto;
        left: calc(100% + 2px);
        width: calc(var(--tl-col) - 18px);
        transform-origin: left center;
    }

    .tl-row .tl-card,
    .tl-row--right .tl-card {
        grid-column: 2;
        justify-self: stretch;
        width: auto;
    }

    .tl-row .tl-side,
    .tl-row--right .tl-side {
        grid-column: 2;
        grid-row: 2;
        justify-self: stretch;
        width: auto;
    }

    .tl-ghost {
        display: none;
    }

    .tl-live .tl-card,
    .tl-live .tl-row--right .tl-card,
    .tl-live .tl-side,
    .tl-live .tl-row--right .tl-side {
        transform: translateX(28px);
    }

    .tl-end {
        padding-block: 64px 120px;
    }

    .tl-hud {
        right: 12px;
        bottom: 12px;
        left: 12px;
        gap: 10px;
        max-width: none;
        transform: translateY(16px);
    }

    .tl-hud.is-shown {
        transform: none;
    }

    .tl-hud__play {
        min-width: 0;
        min-height: 44px;
    }

    .tl-hud__date {
        min-width: 0;
        margin-right: auto;
    }

    .tl-hud__eras a {
        min-height: 44px;
        padding: 0 6px;
        font-size: 10.5px;
    }
}

@media (max-width: 520px) {
    .tl-hud__eras a:not(.is-active) {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tl-hero__hint-mark {
        animation: none;
    }
}
