/* ── School Timeline block ──────────────────────────────────────────────────── */

.nyehs-stl {
    padding:    60px 24px;
    background: #000a73;
    color:      #fff;
    overflow:   hidden;
}

/* ── Header ──────────────────────────────────────────────────────────────────── */

.nyehs-stl__header {
    text-align:    center;
    margin-bottom: 64px;
}

.nyehs-stl__heading {
    font-size:   2.5rem;
    font-weight: 800;
    line-height: 1.15;
    color:       #fff;
    margin:      0 0 12px;
}

.nyehs-stl__subheading {
    font-size:   1.0625rem;
    color:       rgba(255, 255, 255, 0.6);
    margin:      0;
    line-height: 1.6;
}

/* ── Timeline container ─────────────────────────────────────────────────────── */

.nyehs-stl__timeline {
    position:  relative;
    max-width: 1000px;
    margin:    0 auto;
}

/*
 * Three-column grid per entry:
 *   [year 120px] [gap 20px] [dot 14px] [gap 20px] [card 1fr]
 *   Dot centre = 120 + 20 + 7 = 147px from the timeline left edge.
 *   Spine line left edge = 147 − 1 = 146px  (2px wide, centred on dot).
 */

/* Track — faint guide rail */
.nyehs-stl__timeline::before {
    content:       '';
    position:      absolute;
    left:          146px;
    top:           23px;  /* padding-top(16) + dot-radius(7) = first dot centre */
    bottom:        23px;
    width:         2px;
    background:    rgba(255, 255, 255, 0.12);
    border-radius: 2px;
    pointer-events: none;
}

/* Fill — draws down as user scrolls (JS sets --nyehs-stl-progress) */
.nyehs-stl__timeline::after {
    content:          '';
    position:         absolute;
    left:             146px;
    top:              23px;
    bottom:           23px;
    width:            2px;
    background:       linear-gradient(to bottom, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.4));
    border-radius:    2px;
    transform:        scaleY(var(--nyehs-stl-progress, 0));
    transform-origin: top center;
    box-shadow:       0 0 10px rgba(255, 255, 255, 0.3);
    pointer-events:   none;
    will-change:      transform;
}

/* ── Entry row ──────────────────────────────────────────────────────────────── */

.nyehs-stl__entry {
    display:               grid;
    grid-template-columns: 120px 14px 1fr;
    column-gap:            20px;
    align-items:           start;
    margin-bottom:         40px;
}

.nyehs-stl__entry:last-child {
    margin-bottom: 0;
}

/* ── Year column (left) ─────────────────────────────────────────────────────── */

.nyehs-stl__year-col {
    text-align:  right;
    padding-top: 16px;
}

.nyehs-stl__year-label {
    display:        block;
    font-size:      1.125rem;
    font-weight:    800;
    color:          #fff;
    letter-spacing: -0.01em;
    line-height:    1;
    margin-bottom:  8px;
}

.nyehs-stl__year-meta {
    display:        flex;
    flex-direction: column;
    align-items:    flex-end;
    gap:            4px;
}

.nyehs-stl__year-meta-item {
    display:     flex;
    align-items: center;
    gap:         4px;
    font-size:   0.6875rem;
    color:       rgba(255, 255, 255, 0.4);
    line-height: 1;
}

/* ── Spine column (centre) ──────────────────────────────────────────────────── */

/* Grid column is exactly 14px = dot width — no centering needed */
.nyehs-stl__spine-col {
    padding-top: 16px;
}

/* Dot fills the 14px grid column, line passes through its centre */
.nyehs-stl__year-dot {
    width:         14px;
    height:        14px;
    border-radius: 50%;
    background:    #fff;
    box-shadow:    0 0 0 3px rgba(255, 255, 255, 0.2),
                   0 0 12px rgba(255, 255, 255, 0.15);
    position:      relative;
    z-index:       1;
    display:       block;
}

/* ── Card (right) ───────────────────────────────────────────────────────────── */

.nyehs-stl__card {
    display:       flex;
    gap:           1px;
    border-radius: 14px;
    overflow:      hidden;
    border:        1px solid rgba(255, 255, 255, 0.15);
    background:    rgba(255, 255, 255, 0.05);
    min-width:     0;
}

/* ── Teachers column ────────────────────────────────────────────────────────── */

.nyehs-stl__teachers {
    flex:         0 0 220px;
    padding:      24px;
    background:   rgba(255, 255, 255, 0.07);
    border-right: 1px solid rgba(255, 255, 255, 0.10);
}

.nyehs-stl__graduates {
    flex:      1;
    padding:   24px;
    min-width: 0;
}

.nyehs-stl__card > *:only-child {
    flex:         1;
    border-right: none;
}

.nyehs-stl__col-title {
    display:        flex;
    align-items:    center;
    gap:            7px;
    font-size:      0.6875rem;
    font-weight:    700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color:          rgba(255, 255, 255, 0.55);
    margin:         0 0 16px;
}

/* ── Teacher list ───────────────────────────────────────────────────────────── */

.nyehs-stl__teacher-list {
    list-style:     none;
    margin:         0;
    padding:        0;
    display:        flex;
    flex-direction: column;
    gap:            12px;
}

.nyehs-stl__teacher {
    display:     flex;
    align-items: center;
    gap:         10px;
}

.nyehs-stl__teacher-avatar {
    flex-shrink:     0;
    width:           36px;
    height:          36px;
    border-radius:   50%;
    background:      rgba(255, 255, 255, 0.15);
    border:          1px solid rgba(255, 255, 255, 0.25);
    display:         flex;
    align-items:     center;
    justify-content: center;
    font-size:       0.6875rem;
    font-weight:     700;
    color:           #fff;
    letter-spacing:  0.02em;
}

.nyehs-stl__teacher-info {
    display:        flex;
    flex-direction: column;
    gap:            2px;
    min-width:      0;
}

.nyehs-stl__teacher-name {
    font-size:     0.875rem;
    font-weight:   600;
    color:         #fff;
    line-height:   1.3;
    white-space:   nowrap;
    overflow:      hidden;
    text-overflow: ellipsis;
}

.nyehs-stl__teacher-role {
    font-size:     0.75rem;
    color:         rgba(255, 255, 255, 0.55);
    line-height:   1.3;
    white-space:   nowrap;
    overflow:      hidden;
    text-overflow: ellipsis;
}

/* ── Graduates grid ─────────────────────────────────────────────────────────── */

.nyehs-stl__grad-list {
    list-style: none;
    margin:     0;
    padding:    0;
    display:    flex;
    flex-wrap:  wrap;
    gap:        6px;
}

.nyehs-stl__grad-name {
    font-size:     0.8125rem;
    font-weight:   500;
    color:         rgba(255, 255, 255, 0.85);
    background:    rgba(255, 255, 255, 0.10);
    border:        1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    padding:       4px 12px;
    line-height:   1.4;
    white-space:   nowrap;
    transition:    background 0.15s, border-color 0.15s;
}

.nyehs-stl__grad-name:hover {
    background:   rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.30);
    color:        #fff;
}

/* ── Scroll-driven animations ───────────────────────────────────────────────── */

.nyehs-stl--animated .nyehs-stl__entry {
    opacity:    0;
    transition: opacity 0.5s ease;
}

.nyehs-stl--animated .nyehs-stl__year-col {
    transform:  translateX(-24px);
    transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.nyehs-stl--animated .nyehs-stl__card {
    opacity:    0;
    transform:  translateX(20px);
    transition: opacity 0.65s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.nyehs-stl--animated .nyehs-stl__teacher,
.nyehs-stl--animated .nyehs-stl__grad-name {
    opacity:    0;
    transform:  translateY(10px);
    transition: opacity 0.45s ease, transform 0.45s ease;
}

.nyehs-stl--animated .nyehs-stl__entry.is-visible                       { opacity: 1; }
.nyehs-stl--animated .nyehs-stl__entry.is-visible .nyehs-stl__year-col  { transform: none; }
.nyehs-stl--animated .nyehs-stl__entry.is-visible .nyehs-stl__card      { opacity: 1; transform: none; }
.nyehs-stl--animated .nyehs-stl__entry.is-visible .nyehs-stl__teacher,
.nyehs-stl--animated .nyehs-stl__entry.is-visible .nyehs-stl__grad-name { opacity: 1; transform: none; }

/* Dot springs in */
.nyehs-stl--animated .nyehs-stl__year-dot {
    transform:  scale(0.4);
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.nyehs-stl--animated .nyehs-stl__entry.is-visible .nyehs-stl__year-dot {
    transform: scale(1);
}

/* Pulse ring fires once on entry */
@keyframes nyehs-stl-pulse {
    0%   { opacity: 0.7; transform: scale(1); }
    100% { opacity: 0;   transform: scale(2.8); }
}

.nyehs-stl--animated .nyehs-stl__year-dot::after {
    content:       '';
    position:      absolute;
    inset:         -1px;
    border-radius: 50%;
    background:    rgba(255, 255, 255, 0.5);
    opacity:       0;
    pointer-events: none;
}

.nyehs-stl--animated .nyehs-stl__entry.is-visible .nyehs-stl__year-dot::after {
    animation:       nyehs-stl-pulse 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    animation-delay: 0.15s;
}

@media (prefers-reduced-motion: reduce) {
    .nyehs-stl--animated .nyehs-stl__entry,
    .nyehs-stl--animated .nyehs-stl__year-col,
    .nyehs-stl--animated .nyehs-stl__card,
    .nyehs-stl--animated .nyehs-stl__teacher,
    .nyehs-stl--animated .nyehs-stl__grad-name,
    .nyehs-stl--animated .nyehs-stl__year-dot {
        transition: none !important;
        animation:  none !important;
        opacity:    1 !important;
        transform:  none !important;
    }
}

/* ── Responsive ─────────────────────────────────────────────────────────────── */

@media (max-width: 700px) {
    .nyehs-stl__heading {
        font-size: 1.75rem;
    }

    /* Spine shifts to dot centre on mobile: padding-left(28) + dot-radius(7) - 1 = 34px */
    .nyehs-stl__timeline::before,
    .nyehs-stl__timeline::after {
        left: 34px;
    }

    /* Stack vertically; dot column becomes a left-gutter */
    .nyehs-stl__entry {
        grid-template-columns: 14px 1fr;
        grid-template-rows:    auto auto;
        column-gap:            14px;
        padding-left:          28px;
        position:              relative;
    }

    /* Dot stays in its own column, first row */
    .nyehs-stl__spine-col {
        grid-column: 1;
        grid-row:    1;
        padding-top: 3px;
    }

    /* Year text spans across, second row */
    .nyehs-stl__year-col {
        grid-column:   2;
        grid-row:      1;
        text-align:    left;
        padding-top:   0;
        display:       flex;
        align-items:   flex-start;
        flex-direction: column;
        gap:           4px;
    }

    .nyehs-stl__year-label {
        margin-bottom: 0;
    }

    .nyehs-stl__year-meta {
        flex-direction: row;
        align-items:    center;
    }

    /* Card spans full width below */
    .nyehs-stl__card {
        grid-column:    1 / -1;
        grid-row:       2;
        flex-direction: column;
        gap:            0;
        margin-top:     10px;
    }

    .nyehs-stl__teachers {
        flex:          none;
        border-right:  none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.10);
    }

    .nyehs-stl__grad-name {
        font-size: 0.75rem;
    }

    /* Mobile slide directions */
    .nyehs-stl--animated .nyehs-stl__year-col,
    .nyehs-stl--animated .nyehs-stl__card {
        transform: translateY(12px);
    }
    .nyehs-stl--animated .nyehs-stl__entry.is-visible .nyehs-stl__year-col,
    .nyehs-stl--animated .nyehs-stl__entry.is-visible .nyehs-stl__card {
        transform: none;
    }
}
