.timeline-wrap {
    margin-top: clamp(5rem, 12vw, 11rem);
}

.timeline-header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 2rem;
}

.timeline-header h2 {
    margin: 0;
    font-size: clamp(1.8rem, 4vw, 3.5rem);
    font-weight: 500;
    letter-spacing: -0.04em;
}

.timeline-header p {
    margin: 0;
    color: var(--color-muted);
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.timeline-scroller {
    position: relative;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-color: var(--color-accent) rgba(242, 240, 233, 0.1);
    scrollbar-width: thin;
    cursor: grab;
}

.timeline-scroller.is-dragging {
    cursor: grabbing;
    user-select: none;
}

.timeline {
    position: relative;
    display: inline-flex;
    width: max-content;
    min-width: 100%;
    height: 23rem;
    padding: 0 2rem 1rem;
    gap: 1.25rem;
}

.axis {
    position: absolute;
    top: 50%;
    right: 0;
    left: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-line) 4%, var(--color-line) 96%, transparent);
}

.t-item {
    position: relative;
    width: 11rem;
    height: 50%;
    padding: 1.5rem 0.75rem;
}

.timeline > .t-item:nth-of-type(odd) {
    align-self: flex-start;
}

.timeline > .t-item:nth-of-type(even) {
    align-self: flex-end;
}

.t-item::after {
    position: absolute;
    left: 50%;
    width: 1px;
    height: 3.25rem;
    content: "";
    background: var(--color-line);
}

.timeline > .t-item:nth-of-type(odd)::after {
    bottom: 0;
}

.timeline > .t-item:nth-of-type(even)::after {
    top: 0;
}

.t-dot {
    position: absolute;
    left: 50%;
    z-index: 1;
    width: 0.65rem;
    height: 0.65rem;
    background: var(--color-bg);
    border: 2px solid var(--color-accent);
    border-radius: 50%;
    transform: translate(-50%, 50%);
}

.timeline > .t-item:nth-of-type(odd) .t-dot {
    bottom: -0.3rem;
}

.timeline > .t-item:nth-of-type(even) .t-dot {
    top: -0.95rem;
}

.t-date {
    margin-bottom: 0.6rem;
    color: var(--color-accent);
    font-size: 0.68rem;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.1em;
}

.t-title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.5;
}

.t-title span {
    display: block;
    margin-top: 0.4rem;
    color: var(--color-muted);
    font-size: 0.72rem;
    font-weight: 400;
}

@media (max-width: 640px) {
    .timeline-header {
        align-items: start;
        flex-direction: column;
        gap: 0.6rem;
    }

    .timeline-scroller {
        overflow: visible;
        cursor: auto;
    }

    .timeline {
        display: grid;
        width: 100%;
        height: auto;
        padding: 1rem 0 0 2rem;
        gap: 0;
    }

    .axis {
        top: 1rem;
        right: auto;
        bottom: 1rem;
        left: 0.35rem;
        width: 1px;
        height: auto;
        background: var(--color-line);
    }

    .t-item,
    .timeline > .t-item:nth-of-type(odd),
    .timeline > .t-item:nth-of-type(even) {
        width: 100%;
        height: auto;
        padding: 0 0 2rem;
    }

    .t-item::after {
        display: none;
    }

    .t-dot,
    .timeline > .t-item:nth-of-type(odd) .t-dot,
    .timeline > .t-item:nth-of-type(even) .t-dot {
        top: 0.4rem;
        bottom: auto;
        left: -1.65rem;
        transform: translate(-50%, 0);
    }
}
