/* Experience page — a vertical timeline.
   Dates sit left of the rail, the org mark is the node, content sits right.
   Everything here extends index.css / design.css; no new tokens are invented. */

/* ---------- Hero (unchanged language from the home page) ---------- */
.xp-hero {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: auto;
    padding: calc(var(--nav-h) + 4rem) 1.5rem 3.5rem;
    text-align: center;
    box-sizing: border-box;
    background: var(--bg);
}

.xp-hero__content {
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.75rem;
}

.xp-hero__content .hero-greeting {
    font-size: clamp(1.1rem, 2.5vw, 1.35rem);
    color: var(--soft);
    margin: 0;
    font-weight: 400;
    letter-spacing: -0.01em;
}

.xp-hero__content .hero-title {
    font-size: clamp(2.75rem, 8vw, 5rem);
    font-weight: 700;
    line-height: 1.05;
    margin: 0;
    color: var(--ink);
    letter-spacing: -0.04em;
}

.xp-hero__content .hero-bio {
    font-size: clamp(1.05rem, 2.2vw, 1.25rem);
    line-height: 1.55;
    color: var(--soft);
    margin: 0;
    max-width: 580px;
}

.xp-hero__content .hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.85rem;
    margin-top: 0.25rem;
}

/* ---------- Sections ---------- */
.xp-section {
    position: relative;
    padding-block: clamp(56px, 7vw, 104px);
    background: var(--bg);
}

.xp-section--soft {
    background: var(--surface-2);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.xp-section__header {
    max-width: 720px;
    margin-bottom: clamp(36px, 4.5vw, 58px);
}

.xp-section__header .h-title { margin-bottom: 0.6rem; }
.xp-section__header .lead { margin: 0; }

/* ---------- Timeline ---------- */
.tl {
    --tl-aside: 168px;   /* date column */
    --tl-node: 64px;     /* node column; the rail runs down its centre */
    --tl-chip: 56px;
    --tl-gap: 22px;
    position: relative;
}

.tl__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: clamp(36px, 4.2vw, 56px);
}

/* The rail. Faded at both ends so it reads as a continuous thread rather
   than a hard rule (see CLAUDE.md: no hairlines as the primary device). */
.tl__line {
    position: absolute;
    top: 4px;
    bottom: 4px;
    left: calc(var(--tl-aside) + var(--tl-node) / 2 - 1px);
    width: 2px;
    border-radius: 2px;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, 0.13) 3%,
        rgba(0, 0, 0, 0.13) 94%,
        rgba(0, 0, 0, 0) 100%
    );
    transform-origin: top center;
    pointer-events: none;
}

/* Line draw-in. Overrides design.css's generic `.js .reveal` (which fades and
   translates) with a scaleY, and out-specifies it at .js + 2 classes. */
.js .tl__line.reveal {
    opacity: 1;
    transform: scaleY(0);
    transition: transform 1.1s var(--ease);
}

.tl__line.reveal.in,
.js .tl__line.reveal.in { opacity: 1; transform: scaleY(1); }

.tl--single .tl__line { display: none; }

.tl__item {
    display: grid;
    grid-template-columns: var(--tl-aside) var(--tl-node) minmax(0, 1fr);
    align-items: start;
    --ch: var(--accent);
}

.tl__item[data-channel="ch1"] { --ch: var(--ch1); }
.tl__item[data-channel="ch2"] { --ch: var(--ch2); }
.tl__item[data-channel="ch3"] { --ch: var(--ch3); }
.tl__item[data-channel="ch4"] { --ch: var(--ch4); }
.tl__item[data-channel="ch5"] { --ch: var(--ch5); }
.tl__item[data-channel="ch6"] { --ch: var(--ch6); }

/* --- date column --- */
.tl__aside {
    grid-column: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
    padding: 6px var(--tl-gap) 0 0;
    text-align: right;
}

.tl__date {
    font-family: var(--mono);
    font-variant-numeric: tabular-nums;
    font-size: 0.78rem;
    letter-spacing: 0;
    color: var(--faint);
    white-space: nowrap;
}

.tl__badge {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: -0.005em;
    color: var(--accent);
    background: color-mix(in srgb, var(--accent) 11%, transparent);
    border-radius: 999px;
    padding: 3px 10px;
    white-space: nowrap;
}

.tl__badge--quiet {
    color: var(--soft);
    background: color-mix(in srgb, var(--ink) 7%, transparent);
}

/* --- node: the org mark, sitting on the rail --- */
.tl__node {
    grid-column: 2;
    display: flex;
    justify-content: center;
}

.tl__chip {
    position: relative;
    z-index: 1;
    width: var(--tl-chip);
    height: var(--tl-chip);
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}

/* Channel ring: the role's accent, used only here. */
.tl__chip::after {
    content: '';
    position: absolute;
    inset: -5px;
    border-radius: calc(var(--radius-sm) + 5px);
    border: 1px solid color-mix(in srgb, var(--ch) 28%, transparent);
    pointer-events: none;
}

.tl__chip img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* App-icon style marks want to sit closer to the edge; wide wordmarks need
   the extra millimetres to stay legible at 56px. */
.tl__chip--fill { padding: 6px; }
.tl__chip--wordmark { padding: 5px; }

.tl__item:hover .tl__chip {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* --- content column --- */
.tl__body {
    grid-column: 3;
    min-width: 0;
    padding: 0 0 0 var(--tl-gap);
}

.tl__role {
    font-size: clamp(1.18rem, 1.9vw, 1.42rem);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.028em;
    color: var(--ink);
    margin: 0;
}

.tl__org {
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--soft);
    margin: 0.3rem 0 0;
}

.tl__org strong {
    font-weight: 600;
    color: var(--ink);
}

.tl__points {
    list-style: none;
    margin: 0.9rem 0 0;
    padding: 0;
    display: grid;
    gap: 0.5rem;
}

.tl__points li {
    position: relative;
    padding-left: 1.1rem;
    font-size: 0.98rem;
    line-height: 1.55;
    color: var(--soft);
}

.tl__points li::before {
    content: '';
    position: absolute;
    left: 1px;
    top: 0.62em;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--ch) 60%, transparent);
}

.tl__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.95rem;
}

.tl__subhead {
    font-size: 0.86rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--ink);
    margin: 1.35rem 0 0.6rem;
}

.tag {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--soft);
    background: var(--surface-2);
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    border: 1px solid var(--line);
}

/* On the tinted sections the default tag fill would disappear. */
.xp-section--soft .tag { background: var(--surface); }

/* ---------- Skills ----------
   Five resume groups on a six-column grid: 2+2+2 then 3+3, so both rows
   fill edge to edge instead of leaving a ragged hole. */
.xp-skills__groups {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: clamp(24px, 3.5vw, 44px);
}

.xp-skill-group:nth-child(-n+3) { grid-column: span 2; }
.xp-skill-group:nth-child(n+4)  { grid-column: span 3; }

.xp-skill-group .h-section {
    margin-bottom: 1rem;
    font-size: clamp(1.05rem, 1.6vw, 1.25rem);
}

.xp-tag-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

/* ---------- CTA ---------- */
.xp-cta {
    padding: clamp(64px, 8vw, 120px) clamp(24px, 5vw, 48px);
    background: var(--bg);
}

.xp-cta__inner {
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
}

.xp-cta__inner .h-title { margin: 0; }
.xp-cta__inner .lead { margin: 0; color: var(--soft); }

.xp-cta__inner .hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.85rem;
    margin-top: 0.25rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .tl { --tl-aside: 132px; --tl-node: 58px; --tl-chip: 52px; --tl-gap: 18px; }

    .xp-skills__groups { grid-template-columns: repeat(2, 1fr); }
    .xp-skill-group:nth-child(-n+3),
    .xp-skill-group:nth-child(n+4) { grid-column: auto; }
    .xp-skill-group:nth-child(5) { grid-column: span 2; }
}

/* Single column: the rail moves to ~24px and the mark sits on it, with the
   date stacked above the role. */
@media (max-width: 640px) {
    .tl { --tl-chip: 48px; --tl-gap: 0px; }

    .tl__line { left: 23px; }
    .tl--single .tl__line { display: none; }

    .tl__item {
        display: block;
        position: relative;
        padding-left: 64px;
        min-height: var(--tl-chip);
    }

    .tl__node {
        position: absolute;
        left: 0;
        top: 0;
        display: block;
    }

    .tl__aside {
        flex-direction: row;
        align-items: center;
        flex-wrap: wrap;
        justify-content: flex-start;
        text-align: left;
        gap: 0.55rem;
        padding: 3px 0 0.5rem;
    }

    .tl__body { padding-left: 0; }
    .tl__date { white-space: normal; }
}

@media (max-width: 520px) {
    .xp-skills__groups { grid-template-columns: 1fr; }
    .xp-skill-group:nth-child(5) { grid-column: auto; }

    .xp-hero__content .hero-actions { flex-direction: column; width: 100%; }
    .xp-hero__content .hero-actions .btn { width: 100%; }
    .xp-cta__inner .hero-actions { flex-direction: column; width: 100%; }
    .xp-cta__inner .hero-actions .btn { width: 100%; }
}

/* ---------- Reduced motion ----------
   Placed last and matched at `.js` + two classes so it out-specifies the
   `.js .tl__line.reveal` draw-in rule above. */
@media (prefers-reduced-motion: reduce) {
    .js .tl__line.reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .tl__chip { transition: none; }
    .tl__item:hover .tl__chip { transform: none; box-shadow: var(--shadow-sm); }
}
