/* ---- Reset ---- */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ---- Tokens ---- */

:root {
    --black: #111;
    --text: #555;
    --text-hover: #222;
    --label: #222;
    --muted: #777;
    --faint: #aaa;
    --rule: #e0e0e0;
    --dot: #ccc;
    --bg: #fff;
    --glow: rgba(0, 0, 0, 0.03);
    --shimmer-peak: #999;
    --font:
        "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI",
        sans-serif;
}

@media (prefers-color-scheme: dark) {
    :root {
        --black: #eee;
        --text: #aaa;
        --text-hover: #ccc;
        --label: #ddd;
        --muted: #888;
        --faint: #666;
        --rule: #2a2a2a;
        --dot: #444;
        --bg: #111;
        --glow: rgba(255, 255, 255, 0.04);
        --shimmer-peak: #fff;
    }
}

/* ---- Base ---- */

html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font);
    font-size: 0.9375rem;
    line-height: 1.65;
    color: var(--text);
    background: var(--bg);
    padding: 0 1.5rem;
}

.page {
    max-width: 620px;
    margin: 0 auto;
    padding: 5rem 0 3rem;
}

a {
    color: var(--black);
    text-decoration-color: var(--faint);
    text-underline-offset: 0.2em;
    transition: text-decoration-color 0.15s ease;
}

a:hover {
    text-decoration-color: var(--black);
}

/* ---- Header ---- */

.header {
    margin-bottom: 3rem;
}

.header h1 {
    font-size: clamp(2.5rem, 6vw, 3.5rem);
    font-weight: 700;
    letter-spacing: -0.04em;
    color: var(--black);
    line-height: 1.1;
    margin-bottom: 0.375rem;
    text-shadow:
        0 1px 0 rgba(255, 255, 255, 0.6),
        0 -1px 0 rgba(0, 0, 0, 0.35);
}

@media (prefers-color-scheme: dark) {
    .header h1 {
        text-shadow:
            0 1px 0 rgba(255, 255, 255, 0.08),
            0 -1px 0 rgba(0, 0, 0, 0.6);
    }
}

.header .location {
    font-size: 0.8125rem;
    color: var(--faint);
    font-weight: 400;
}

/* ---- Section ---- */

.section {
    margin-bottom: 3rem;
}

.section-label {
    font-size: 0.8125rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--label);
    margin-bottom: 1rem;
}

/* ---- About ---- */

.about p {
    margin-bottom: 0.875rem;
}

.about p:last-child {
    margin-bottom: 0;
}

.about p:not(.section-label) {
    background: linear-gradient(
        90deg,
        var(--text) 0%,
        var(--text) 40%,
        var(--shimmer-peak) 50%,
        var(--text) 60%,
        var(--text) 100%
    );
    background-size: 400% 100%;
    background-position: 100% 0;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.about p:not(.section-label):hover {
    animation: text-shimmer 1.2s ease;
}

.about p:not(.section-label) a {
    background: none;
    -webkit-background-clip: initial;
    background-clip: initial;
    -webkit-text-fill-color: initial;
    color: var(--black);
}

/* ---- Timeline ---- */

.timeline {
    position: relative;
    padding-left: 1.52rem;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.25rem;
    bottom: 0.25rem;
    width: 1px;
    background: var(--rule);
}

.timeline-entry {
    position: relative;
    padding: 0.625rem 0.75rem 2.25rem;
    border-radius: 6px;
}

.timeline-entry:last-child {
    padding-bottom: 0.625rem;
}

.timeline-entry::before {
    content: "";
    position: absolute;
    left: -1.75rem;
    top: 1.075rem;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--bg);
    border: 2px solid var(--dot);
    z-index: 1;
}

.timeline-entry.current::before {
    background: var(--black);
    border-color: var(--black);
}

.timeline-entry.current .timeline-title {
    background: linear-gradient(
        90deg,
        var(--black) 0%,
        var(--black) 40%,
        var(--shimmer-peak) 50%,
        var(--black) 60%,
        var(--black) 100%
    );
    background-size: 400% 100%;
    background-position: 100% 0;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.timeline-title {
    background: linear-gradient(
        90deg,
        var(--text) 0%,
        var(--text) 40%,
        var(--shimmer-peak) 50%,
        var(--text) 60%,
        var(--text) 100%
    );
    background-size: 400% 100%;
    background-position: 100% 0;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.timeline-entry:hover .timeline-title {
    animation: text-shimmer 1.2s ease;
}

@keyframes text-shimmer {
    from {
        background-position: 100% 0;
    }
    to {
        background-position: 0% 0;
    }
}

.timeline-date {
    font-size: 0.8125rem;
    color: var(--faint);
    font-variant-numeric: tabular-nums;
    margin-bottom: 0.125rem;
}

.timeline-title {
    font-size: 0.9375rem;
    font-weight: 500;
    line-height: 1.4;
}

.timeline-org {
    font-size: 0.8125rem;
    color: var(--muted);
}

/* ---- Divider ---- */

hr {
    border: none;
    border-top: 1px solid var(--rule);
    margin: 3rem 0;
}

/* ---- Footer ---- */

.footer {
    padding: 0.2rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-links {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.footer-links a {
    color: var(--faint);
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: color 0.15s ease;
}

.footer-links a:hover {
    color: var(--black);
}

.footer small {
    font-size: 0.75rem;
    color: var(--faint);
}

/* ---- Responsive ---- */

@media (max-width: 540px) {
    .page {
        padding: 3rem 0 2rem;
    }

    .header {
        margin-bottom: 2.5rem;
    }

    .timeline {
        padding-left: 1.5rem;
    }

    .timeline-entry::before {
        left: -1.5rem;
    }

    .footer {
        flex-direction: column-reverse;
        gap: 1rem;
        align-items: flex-start;
    }
}
