/* =========================================================
   EDUCATION — "The Learning Signal"
   ---------------------------------------------------------
   An academic record drawn as a scientific instrument: a thin
   signal travels along a time axis and lights two milestone
   nodes, each wired to its record panel.

   Monochrome only (r = g = b everywhere).
   Content lives in the markup; education.js adds the signal,
   particles and scroll reveal. Everything is readable with JS
   off — the reveal states are gated on html.ls-js.
   ========================================================= */

.ls {
    --ls-bg: #050505;
    --ls-surface: #101010;
    --ls-surface-2: #161616;
    --ls-border: #252525;
    --ls-border-strong: #3a3a3a;
    --ls-muted: #666666;        /* large / decorative text only */
    --ls-secondary: #a3a3a3;    /* readable small text          */
    --ls-text: #ffffff;
    --ls-highlight: #f5f5f5;

    --ls-ease: var(--mono-ease, cubic-bezier(0.22, 0.61, 0.36, 1));
    --ls-pad: 4%;               /* inset of the 2022 / 2027 ticks */
    --ls-axis-h: 168px;         /* height of the time-axis band   */
    --ls-year: calc((100% - 2 * var(--ls-pad)) / 5);

    position: relative;
    padding-bottom: 0;
    color: var(--ls-text);
}

.ls-visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.ls-dim { color: var(--ls-secondary); }

/* ---------- Labels ---------- */
.ls-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0;

    font-size: 11px;
    font-weight: 500;
    line-height: 1.4;
    letter-spacing: 0.18em;
    text-transform: uppercase;

    color: var(--ls-secondary);
}

.ls-label::before {
    content: "";
    width: 18px;
    height: 1px;
    background: currentColor;
    opacity: 0.6;
}

.ls-label__sep { color: var(--ls-muted); }


/* =========================================================
   INTRO
   ========================================================= */

.ls-intro {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
    gap: 48px 8%;
    align-items: end;

    padding-bottom: 120px;
}

.ls-title {
    margin: 28px 0 0;

    font-size: clamp(56px, 9.2vw, 152px);
    font-weight: 600;
    line-height: 0.92;
    letter-spacing: -0.045em;

    color: var(--ls-text);
}

.ls-lede {
    max-width: 34ch;
    margin: 0 0 40px;

    font-size: 18px;
    line-height: 1.6;

    color: var(--ls-secondary);
}

.ls-readout {
    margin: 0;
    border-top: 1px solid var(--ls-border);
}

.ls-readout > div {
    display: flex;
    justify-content: space-between;
    gap: 16px;

    padding: 12px 0;
    border-bottom: 1px solid var(--ls-border);
}

.ls-readout dt,
.ls-readout dd {
    margin: 0;

    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.ls-readout dt { color: var(--ls-secondary); }
.ls-readout dd { color: var(--ls-text); font-variant-numeric: tabular-nums; }


/* =========================================================
   STAGE — the instrument
   ========================================================= */

.ls-stage {
    position: relative;
}

.ls-svg,
.ls-particles {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: visible;
}

.ls-particles { z-index: 0; }
.ls-svg { z-index: 1; }

/* Signal strokes */
.ls-signal {
    fill: none;
    stroke-width: 1.25;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ls-signal--ghost {
    stroke: var(--ls-border);
    stroke-width: 1;
}

.ls-signal--future {
    stroke: var(--ls-muted);
    stroke-width: 1;
    stroke-dasharray: 2 6;
    opacity: 0;
    transition: opacity 0.8s var(--ls-ease);
}

.ls-stage.is-complete .ls-signal--future { opacity: 1; }

.ls-wire {
    fill: none;
    stroke: var(--ls-muted);
    stroke-width: 1;
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    transition: stroke-dashoffset 0.9s var(--ls-ease), stroke 0.4s var(--ls-ease);
}

.ls-wire.is-lit { stroke-dashoffset: 0; }
.ls-wire.is-hover { stroke: var(--ls-highlight); }

.ls-tip {
    fill: var(--ls-highlight);
    opacity: 0;
    transition: opacity 0.3s linear;
}

.ls-tip.is-on { opacity: 1; }

.ls-tip-halo {
    fill: var(--ls-highlight);
    opacity: 0;
    filter: blur(3px);
    transition: opacity 0.3s linear;
}

.ls-tip-halo.is-on { opacity: 0.22; }


/* ---------- Time axis ---------- */
.ls-axis {
    display: none;               /* shown once JS has placed it */
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    z-index: 2;

    height: var(--ls-axis-h);
    pointer-events: none;
}

.ls-js .ls-axis { display: block; }

.ls-tick {
    position: absolute;
    left: calc(var(--ls-pad) + var(--x) * var(--ls-year));
    bottom: 14px;

    transform: translateX(-50%);

    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.12em;
    font-variant-numeric: tabular-nums;

    color: var(--ls-secondary);
}

/* Tick mark rising from the label to the axis line */
.ls-tick::before {
    content: "";
    position: absolute;
    left: 50%;
    bottom: calc(100% + 10px);

    width: 1px;
    height: 12px;

    background: var(--ls-border-strong);
}

.ls-tick.is-now::after {
    content: "Now";
    position: absolute;
    left: 50%;
    top: calc(-1 * (var(--ls-axis-h) / 2) - 2px);

    transform: translateX(-50%);

    font-size: 9px;
    letter-spacing: 0.2em;
    text-transform: uppercase;

    color: var(--ls-muted);
}

/* Minor ticks — a fine ruler under the signal */
.ls-axis::before {
    content: "";
    position: absolute;
    left: var(--ls-pad);
    right: var(--ls-pad);
    top: calc(50% + 18px);

    height: 5px;

    /* 5 years × 4 = 20 intervals; the extra 1px closes the last one */
    background-image: linear-gradient(to right, var(--ls-border) 1px, transparent 1px);
    background-size: calc((100% - 1px) / 20) 100%;
}

/* ---------- Nodes ---------- */
.ls-node,
.ls-rail-node {
    position: absolute;
    z-index: 3;

    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;

    border: 1px solid var(--ls-border-strong);
    border-radius: 50%;
    background: var(--ls-bg);

    transition: border-color 0.5s var(--ls-ease), transform 0.5s var(--ls-ease), box-shadow 0.5s var(--ls-ease);
}

.ls-node {
    left: calc(var(--ls-pad) + var(--x) * var(--ls-year));
    top: 50%;
}

.ls-node__core {
    position: absolute;
    inset: 10px;

    border-radius: 50%;
    background: var(--ls-border-strong);

    transition: background-color 0.5s var(--ls-ease), box-shadow 0.5s var(--ls-ease), inset 0.5s var(--ls-ease);
}

.ls-node.is-lit,
.ls-rail-node.is-lit {
    border-color: var(--ls-muted);
}

.ls-node.is-lit .ls-node__core,
.ls-rail-node.is-lit .ls-node__core {
    background: var(--ls-highlight);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.45);
}

.ls-node.is-hover,
.ls-rail-node.is-hover,
.ls-node.is-pulse,
.ls-rail-node.is-pulse {
    border-color: var(--ls-highlight);
    transform: scale(1.12);
    box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.04), 0 0 22px rgba(255, 255, 255, 0.10);
}

.ls-node.is-hover .ls-node__core,
.ls-rail-node.is-hover .ls-node__core {
    inset: 9px;
    box-shadow: 0 0 14px rgba(255, 255, 255, 0.7);
}

.ls-rail-node { display: none; }


/* ---------- Records ---------- */
.ls-records {
    position: relative;
    z-index: 2;

    display: grid;
    grid-template-rows: auto var(--ls-axis-h) auto;

    margin: 0;
    padding: 0;
    list-style: none;
}

.ls-record { position: relative; }

.ls-record--major {
    grid-row: 3;
    margin-left: calc(var(--ls-pad) + var(--ls-year));
}

.ls-record--minor {
    grid-row: 1;
    width: min(440px, 46%);
    margin-left: var(--ls-pad);
}

.ls-panel {
    position: relative;

    padding: 44px 48px 48px;

    border: 1px solid var(--ls-border);
    background-color: rgba(16, 16, 16, 0.94);

    transition: border-color 0.5s var(--ls-ease), background-color 0.5s var(--ls-ease);
}

/* Fine architectural grid, fading toward the bottom-left */
.ls-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;

    background-image:
        linear-gradient(to right, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 40px 40px;
    background-position: -1px -1px;

    -webkit-mask-image: radial-gradient(120% 90% at 100% 0%, #000 10%, transparent 75%);
    mask-image: radial-gradient(120% 90% at 100% 0%, #000 10%, transparent 75%);
}

.ls-panel > * { position: relative; }

.ls-record:hover .ls-panel,
.ls-record.is-hover .ls-panel {
    border-color: var(--ls-border-strong);
    background-color: rgba(22, 22, 22, 0.96);
}

/* Registration marks */
.ls-corner {
    position: absolute !important;
    width: 10px;
    height: 10px;
    border-color: var(--ls-muted);
    border-style: solid;
    border-width: 0;
    transition: border-color 0.5s var(--ls-ease);
}

.ls-corner--tl { top: -1px; left: -1px; border-top-width: 1px; border-left-width: 1px; }
.ls-corner--tr { top: -1px; right: -1px; border-top-width: 1px; border-right-width: 1px; }
.ls-corner--bl { bottom: -1px; left: -1px; border-bottom-width: 1px; border-left-width: 1px; }
.ls-corner--br { bottom: -1px; right: -1px; border-bottom-width: 1px; border-right-width: 1px; }

.ls-record:hover .ls-corner,
.ls-record.is-hover .ls-corner { border-color: var(--ls-highlight); }

.ls-panel__top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 24px;
}

/* Status indicator */
.ls-status {
    display: inline-flex;
    align-items: center;
    gap: 10px;

    padding: 6px 12px;

    border: 1px solid var(--ls-border-strong);
    border-radius: 999px;

    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;

    color: var(--ls-highlight);
}

.ls-status--done {
    border-color: var(--ls-border);
    color: var(--ls-secondary);
}

.ls-status__dot {
    position: relative;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--ls-highlight);
}

.ls-status__dot::after {
    content: "";
    position: absolute;
    inset: -4px;
    border: 1px solid var(--ls-highlight);
    border-radius: 50%;
    opacity: 0;
    animation: ls-ping 2.6s var(--ls-ease) infinite;
}

@keyframes ls-ping {
    0%   { transform: scale(0.5); opacity: 0.6; }
    80%, 100% { transform: scale(1.8); opacity: 0; }
}

/* Large date */
.ls-date {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;

    margin: 40px 0 0;

    font-size: clamp(64px, 8.6vw, 136px);
    font-weight: 600;
    line-height: 0.9;
    letter-spacing: -0.05em;
    font-variant-numeric: tabular-nums;

    color: var(--ls-text);
}

.ls-date__dash { color: var(--ls-border-strong); font-weight: 300; padding: 0 0.02em; }
.ls-date__to { color: var(--ls-muted); }

.ls-date--sm {
    margin-top: 28px;
    font-size: 44px;
    letter-spacing: -0.04em;
}

.ls-date--sm .ls-dim {
    margin-left: 10px;
    font-size: 18px;
    letter-spacing: 0;
    font-weight: 500;
}

.ls-annot {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 28px;

    margin: 18px 0 0;

    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;

    color: var(--ls-secondary);
}

.ls-annot span { display: inline-flex; align-items: center; gap: 8px; }

.ls-annot span::before {
    content: "";
    width: 5px;
    height: 5px;
    border: 1px solid var(--ls-muted);
}

/* Degree title + institution */
.ls-heading { margin-top: 48px; }

.ls-degree {
    max-width: 22ch;
    margin: 0;

    font-size: clamp(28px, 3vw, 44px);
    font-weight: 600;
    line-height: 1.08;
    letter-spacing: -0.025em;

    color: var(--ls-text);
}

.ls-inst {
    max-width: 34ch;
    margin: 28px 0 0;
    padding-top: 20px;
    border-top: 1px solid var(--ls-border);

    font-size: 17px;
    line-height: 1.5;

    color: var(--ls-text);
}

.ls-inst__label {
    display: block;
    margin-bottom: 8px;

    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;

    color: var(--ls-secondary);
}

.ls-degree--sm {
    margin-top: 16px;
    font-size: 22px;
    line-height: 1.25;
    letter-spacing: -0.01em;
}

/* Data rows */
.ls-data {
    margin: 40px 0 0;
    border-top: 1px solid var(--ls-border);
}

.ls-record--minor .ls-data { margin-top: 24px; }

.ls-data__row {
    display: grid;
    grid-template-columns: 168px minmax(0, 1fr);
    gap: 8px 24px;

    padding: 16px 0;
    border-bottom: 1px solid var(--ls-border);
}

.ls-record--minor .ls-data__row { grid-template-columns: 96px minmax(0, 1fr); }

.ls-data dt {
    padding-top: 3px;

    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;

    color: var(--ls-secondary);
}

.ls-data dd {
    margin: 0;

    font-size: 16px;
    line-height: 1.5;

    color: var(--ls-text);
}

.ls-focus {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 24px;

    margin: 0;
    padding: 0;
    list-style: none;
}

.ls-focus li {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.ls-focus span {
    font-size: 10px;
    letter-spacing: 0.12em;
    font-variant-numeric: tabular-nums;

    color: var(--ls-muted);
}

/* Legend */
.ls-legend {
    position: absolute;
    right: 0;
    top: 0;                      /* education.js aligns it just above the axis */
    z-index: 2;

    display: none;
    gap: 28px;

    margin: 0;
    padding: 0;
    list-style: none;
}

.ls-js .ls-legend { display: flex; }

.ls-legend li {
    display: inline-flex;
    align-items: center;
    gap: 10px;

    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;

    color: var(--ls-secondary);
}

.ls-legend i { display: inline-block; }

.ls-legend__node {
    width: 9px;
    height: 9px;
    border: 1px solid var(--ls-muted);
    border-radius: 50%;
    box-shadow: inset 0 0 0 2px var(--ls-bg), inset 0 0 0 5px var(--ls-highlight);
}

.ls-legend__line { width: 22px; height: 1px; background: var(--ls-highlight); }

.ls-legend__dash {
    width: 22px;
    height: 1px;
    background-image: linear-gradient(to right, var(--ls-muted) 2px, transparent 2px);
    background-size: 8px 1px;
}


/* =========================================================
   HAND-OFF to Certifications
   ========================================================= */

.ls-handoff {
    display: flex;
    align-items: center;
    gap: 24px;

    margin-top: 140px;

    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;

    color: var(--ls-secondary);
}

.ls-handoff__line {
    position: relative;
    flex: 1;
    height: 1px;
    background: var(--ls-border);
}

/* Small tick marks at both ends of the separator */
.ls-handoff__line::before,
.ls-handoff__line::after {
    content: "";
    position: absolute;
    top: -4px;
    width: 1px;
    height: 9px;
    background: var(--ls-border-strong);
}

.ls-handoff__line::before { left: 0; }
.ls-handoff__line::after { right: 0; }

.ls-handoff__next {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--ls-text);
}

.ls-handoff svg {
    width: 12px;
    height: 12px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.2;
}


/* =========================================================
   REVEAL (JS only)
   ========================================================= */

.ls-js [data-ls-reveal] {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 1s var(--ls-ease), transform 1s var(--ls-ease);
}

.ls-js [data-ls-reveal].is-in { opacity: 1; transform: none; }
.ls-js .ls-intro__aside[data-ls-reveal] { transition-delay: 0.15s; }

.ls-js .ls-record .ls-panel {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.9s var(--ls-ease), transform 0.9s var(--ls-ease),
        border-color 0.5s var(--ls-ease), background-color 0.5s var(--ls-ease);
}

.ls-js .ls-record .ls-step {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.8s var(--ls-ease), transform 0.8s var(--ls-ease);
}

.ls-js .ls-record.is-on .ls-panel,
.ls-js .ls-record.is-on .ls-step { opacity: 1; transform: none; }

.ls-js .ls-record.is-on .ls-step:nth-child(5) { transition-delay: 0.10s; }
.ls-js .ls-record.is-on .ls-step:nth-child(6) { transition-delay: 0.18s; }
.ls-js .ls-record.is-on .ls-step:nth-child(7) { transition-delay: 0.26s; }
.ls-js .ls-record.is-on .ls-step:nth-child(8) { transition-delay: 0.34s; }
.ls-js .ls-record.is-on .ls-step:nth-child(9) { transition-delay: 0.42s; }
.ls-js .ls-record--minor.is-on .ls-step:nth-child(2) { transition-delay: 0.10s; }
.ls-js .ls-record--minor.is-on .ls-step:nth-child(3) { transition-delay: 0.18s; }
.ls-js .ls-record--minor.is-on .ls-step:nth-child(4) { transition-delay: 0.26s; }


/* =========================================================
   RESPONSIVE
   ========================================================= */

/* Wide: degree title and data side by side */
@media (min-width: 1200px) {
    .ls-record--major .ls-panel {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 0.92fr);
        grid-template-areas:
            "top    top"
            "date   date"
            "annot  annot"
            "degree data";
        column-gap: 56px;
    }

    .ls-record--major .ls-panel__top { grid-area: top; }
    .ls-record--major .ls-date { grid-area: date; }
    .ls-record--major .ls-annot { grid-area: annot; }
    .ls-record--major .ls-heading { grid-area: degree; align-self: start; }
    .ls-record--major .ls-data { grid-area: data; align-self: start; margin-top: 48px; }
    .ls-record--major .ls-corner { grid-area: auto; }
    .ls-record--major .ls-focus { grid-template-columns: 1fr; }
}

@media (max-width: 1439px) {
    .ls-intro { padding-bottom: 88px; }
    .ls-handoff { margin-top: 112px; }
}

@media (max-width: 1199px) {
    .ls-panel { padding: 36px 36px 40px; }
    .ls-data__row { grid-template-columns: 140px minmax(0, 1fr); }
}

@media (max-width: 991px) {
    .ls { --ls-axis-h: 152px; }
    .ls-intro { grid-template-columns: 1fr; gap: 40px; }
    .ls-lede { margin-bottom: 32px; }
    .ls-record--minor { width: min(420px, 62%); }
    .ls-legend { gap: 18px; }
}

/* Phones: a compact vertical instrument on a left rail */
@media (max-width: 767px) {
    .ls { --ls-rail: 34px; }

    .ls-intro { padding-bottom: 64px; }
    .ls-title { margin-top: 20px; font-size: clamp(48px, 15vw, 72px); }
    .ls-lede { font-size: 16px; }

    .ls-js .ls-axis,
    .ls-js .ls-legend { display: none; }

    .ls-records {
        display: flex;
        flex-direction: column;
        gap: 56px;
        padding-left: var(--ls-rail);
    }

    .ls-record--major,
    .ls-record--minor {
        width: auto;
        margin-left: 0;
    }

    .ls-js .ls-rail-node {
        display: block;
        left: calc(-1 * var(--ls-rail) + 11px);
        top: 34px;
        width: 22px;
        height: 22px;
        margin: -11px 0 0 -11px;
    }

    .ls-rail-node .ls-node__core { inset: 7px; }
    .ls-rail-node.is-hover .ls-node__core { inset: 6px; }

    .ls-panel { padding: 24px 20px 28px; }
    .ls-panel::before { background-size: 28px 28px; }

    .ls-date {
        margin-top: 28px;
        font-size: clamp(40px, 12.4vw, 64px);
    }

    .ls-date--sm { margin-top: 20px; font-size: 36px; }
    .ls-date--sm .ls-dim { font-size: 16px; }

    .ls-annot { gap: 8px 20px; }
    .ls-heading { margin-top: 32px; }
    .ls-degree { font-size: 26px; }
    .ls-inst { margin-top: 20px; padding-top: 16px; font-size: 16px; }
    .ls-degree--sm { margin-top: 12px; font-size: 20px; }
    .ls-data { margin-top: 28px; }

    .ls-data__row,
    .ls-record--minor .ls-data__row {
        grid-template-columns: 1fr;
        gap: 6px;
        padding: 14px 0;
    }

    .ls-focus { grid-template-columns: 1fr; gap: 8px; }

    .ls-handoff { gap: 14px; margin-top: 88px; flex-wrap: wrap; }
    .ls-handoff__end { display: none; }
}

/* No hover on touch: keep the resting state */
@media (hover: none) {
    .ls-record:hover .ls-panel { border-color: var(--ls-border); background-color: rgba(16, 16, 16, 0.94); }
    .ls-record:hover .ls-corner { border-color: var(--ls-muted); }
}

@media (prefers-reduced-motion: reduce) {
    .ls-status__dot::after { animation: none; opacity: 0; }

    .ls-js [data-ls-reveal],
    .ls-js .ls-record .ls-panel,
    .ls-js .ls-record .ls-step {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .ls-wire,
    .ls-node,
    .ls-node__core,
    .ls-rail-node,
    .ls-signal--future { transition: none; }
}
