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

:root {
    --paper: #FFFFFF;
    --ink: #011936;
    --cyan: #07A0C3;
    --yellow: #F6E27F;
    --pink: #FFC8C2;
    --muted: #3F5877;
    --red: #CC0303;

    --panel: rgba(1, 25, 54, 0.06);
    --panel-cyan: rgba(7, 160, 195, 0.10);
    --rule-invert: rgba(255, 255, 255, 0.35);

    --shadow: 0 2px 0 var(--ink), 0 20px 40px -28px rgba(1, 25, 54, 0.45);
    --shadow-cyan: 0 2px 0 var(--cyan), 0 20px 40px -28px rgba(1, 25, 54, 0.45);

    --font-display: 'Instrument Serif', Georgia, 'Times New Roman', serif;
    --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    --font-body: 'Newsreader', Georgia, 'Times New Roman', serif;

    --topbar-height: 62px;
}

html,
body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 1.5;
    text-wrap: pretty;
}

a {
    color: var(--cyan);
    text-decoration: none;
}

a:hover {
    color: var(--ink);
}

img {
    max-width: 100%;
}

code {
    font-family: var(--font-mono);
    font-size: 0.85em;
}

::selection {
    background: var(--cyan);
    color: var(--paper);
}

.page {
    min-height: 100vh;
    max-width: 1320px;
    padding: 0 clamp(20px, 4vw, 56px) 96px;
}

/* ---------- top bar ---------- */

.topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
    align-items: baseline;
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--muted);
    background: var(--paper);
    padding: 20px 0 14px;
    border-bottom: 3px solid var(--ink);
}

.logo {
    color: var(--ink);
    background: var(--pink);
    padding: 3px 10px;
}

.logo__slash {
    color: var(--cyan);
}

.nav-link {
    color: var(--ink);
    padding-bottom: 2px;
    border-bottom: 2px solid transparent;
    transition: color .2s ease, border-color .2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--cyan);
    border-bottom-color: var(--cyan);
}

.status-pill {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--ink);
    color: var(--paper);
    padding: 3px 10px;
}

.status-pill__dot {
    width: 8px;
    height: 8px;
    background: var(--cyan);
    display: inline-block;
}

/* ---------- layout ---------- */

.layout {
    display: flex;
    flex-wrap: wrap;
    gap: 40px clamp(40px, 6vw, 96px);
    padding-top: 40px;
    align-items: flex-start;
}

.identity {
    flex: 0 1 320px;
    min-width: 260px;
    display: flex;
    flex-direction: column;
    gap: 22px;
    padding: 24px;
    background: var(--ink);
    color: var(--paper);
    border: 1px solid var(--ink);
    border-top: 6px solid var(--pink);
    box-shadow: var(--shadow);
}

.identity__photo {
    width: 100%;
    max-width: 300px;
    aspect-ratio: 1;
    object-fit: cover;
    object-position: top;
    display: block;
    filter: grayscale(1) contrast(1.05);
    outline: 2px solid var(--cyan);
    outline-offset: 6px;
}

.identity__name {
    margin: 0;
    color: var(--paper);
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(40px, 4vw, 54px);
    line-height: 0.95;
    letter-spacing: -0.02em;
}

.identity__meta {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--paper);
    opacity: 0.75;
    line-height: 1.6;
    margin-top: 14px;
}

.identity__links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 13px;
}

.identity__links a {
    color: var(--paper);
    border-bottom: 1px solid var(--cyan);
    align-self: flex-start;
    padding-bottom: 1px;
}

.identity__links a:hover {
    color: var(--yellow);
}

.legend {
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 1.6;
    color: var(--paper);
    padding-top: 16px;
    border-top: 1px solid var(--rule-invert);
}

.legend__row {
    display: flex;
    gap: 8px;
    align-items: baseline;
}

.legend__row + .legend__row {
    margin-top: 4px;
}

.legend__text {
    flex: 1;
}

.legend__swatch {
    width: 9px;
    height: 9px;
    display: inline-block;
    flex-shrink: 0;
}

.legend__swatch--cyan {
    background: var(--cyan);
}

.legend__swatch--yellow {
    background: var(--yellow);
}

.legend__key--cyan {
    color: var(--cyan);
}

.legend__key--yellow {
    color: var(--yellow);
}

.main {
    flex: 1 1 520px;
    min-width: 0;
    max-width: 760px;
    display: flex;
    flex-direction: column;
    gap: clamp(56px, 6vw, 88px);
}

/* ---------- sections ---------- */

.section {
    scroll-margin-top: calc(var(--topbar-height) + 20px);
}

.panel,
#experience,
#work {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.panel {
    padding: 24px;
    background: var(--panel);
    border: 1px solid var(--ink);
    box-shadow: var(--shadow);
}

.section p {
    margin: 0;
}

.section-heading {
    margin: 0;
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 500;
    font-size: 20px;
    letter-spacing: 0.01em;
    color: var(--ink);
    padding-bottom: 10px;
    border-bottom: 3px solid var(--cyan);
}

.section-heading--invert {
    color: var(--paper);
}

/* ---------- annotation marks ---------- */

.mark-check {
    border-bottom: 3px solid var(--cyan);
}

.mark-claim {
    border-bottom: 3px solid var(--yellow);
}

.link-underline {
    color: var(--ink);
    border-bottom: 1px solid var(--cyan);
    padding-bottom: 1px;
}

.link-underline:hover {
    color: var(--cyan);
}

.link-underline--invert {
    color: var(--paper);
    align-self: center;
}

.link-underline--invert:hover {
    color: var(--yellow);
}

/* ---------- intro ---------- */

p.lede {
    margin: 0 0 22px;
    color: var(--ink);
    font-family: var(--font-display);
    font-size: clamp(34px, 4.2vw, 58px);
    line-height: 1.05;
    letter-spacing: -0.02em;
}

.lede__strike {
    color: var(--muted);
    text-decoration: line-through;
    text-decoration-thickness: 0.06em;
}

.lede__turn {
    font-style: italic;
    color: var(--cyan);
}

.lede-sub {
    margin: 0;
    font-size: 20px;
    line-height: 1.45;
}

/* ---------- about ---------- */

.lists {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
    gap: 20px 32px;
    padding-top: 6px;
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.7;
}

.lists__label {
    color: var(--muted);
    margin-bottom: 6px;
}

.lists__body {
    color: var(--ink);
}

/* ---------- experience ---------- */

.job {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 8px 0 22px;
}

.job__head {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 18px;
    align-items: baseline;
}

.job__role {
    font-family: var(--font-display);
    font-size: 28px;
    line-height: 1.1;
    letter-spacing: -0.01em;
}

.job__org {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--muted);
}

.job__when {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--cyan);
    margin-left: auto;
}

.job__bullets {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.job__bullets li {
    display: grid;
    grid-template-columns: 10px 1fr;
    gap: 14px;
    font-size: 17px;
    line-height: 1.5;
}

.job__bullets li::before {
    content: "";
    width: 6px;
    height: 6px;
    background: var(--cyan);
    margin-top: 11px;
}

.additional {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--ink);
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-top: 6px;
    border-top: 1px solid var(--ink);
}

.additional__label {
    margin-top: 8px;
}

.additional__row {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
}

.additional__org {
    color: var(--muted);
}

.additional__when {
    margin-left: auto;
    color: var(--cyan);
}

/* ---------- education ---------- */

.degree {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 18px;
    align-items: baseline;
}

.degree__title {
    font-family: var(--font-display);
    font-size: 26px;
    line-height: 1.1;
}

.degree__org {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--muted);
}

.degree__when {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--cyan);
    margin-left: auto;
}

/* ---------- work ---------- */

.project {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px;
    background: var(--panel);
    border: 1px solid var(--ink);
    box-shadow: var(--shadow);
    scroll-margin-top: calc(var(--topbar-height) + 20px);
}

.project--feature {
    gap: 14px;
    padding: 24px;
    background: var(--panel-cyan);
    box-shadow: var(--shadow-cyan);
}

.project p {
    margin: 0;
}

.project__image {
    width: 100%;
    display: block;
    outline: 2px solid var(--ink);
    filter: saturate(0.85);
}

.project__head {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 18px;
    align-items: baseline;
}

.project__title {
    margin: 0;
    color: var(--cyan);
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(30px, 3.2vw, 40px);
    line-height: 1.05;
    letter-spacing: -0.015em;
}

.project__title--small {
    font-size: 28px;
    line-height: 1.1;
    letter-spacing: -0.01em;
}

.project__stack {
    font-family: var(--font-mono);
    font-size: 12.5px;
    color: var(--muted);
}

.project__head .project__stack {
    font-size: 13px;
}

.project__body {
    font-size: 16.5px;
}

.project__note {
    font-size: 16px;
    color: var(--ink);
}

.project__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 22px;
    font-family: var(--font-mono);
    font-size: 13px;
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2px;
    background: var(--paper);
    border: 2px solid var(--cyan);
}

.stat {
    background: var(--ink);
    color: var(--paper);
    padding: 16px 18px;
}

.stat__value {
    color: var(--cyan);
    font-family: var(--font-display);
    font-size: 36px;
    line-height: 1;
}

.stat__label {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--paper);
    margin-top: 4px;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: 24px;
    padding-top: 6px;
}

/* ---------- contact ---------- */

.contact {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 28px;
    background: var(--ink);
    color: var(--paper);
}

.contact__lede {
    color: var(--yellow);
    font-family: var(--font-display);
    font-size: clamp(30px, 3.6vw, 46px);
    line-height: 1.05;
    letter-spacing: -0.02em;
}

.contact__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 28px;
    font-family: var(--font-mono);
    font-size: 14px;
    padding-top: 4px;
}

.cta {
    appearance: none;
    display: inline-block;
    background: var(--pink);
    color: var(--ink);
    border: 0;
    padding: 12px 18px;
    font-family: var(--font-mono);
    font-size: 14px;
    cursor: pointer;
    transition: background .2s ease;
}

.cta:hover {
    background: var(--yellow);
    color: var(--ink);
}

.contact__footnote {
    margin-top: 18px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--paper);
    opacity: 0.8;
    line-height: 1.6;
}

/* ---------- footer ---------- */

.footer {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--muted);
    text-align: center;
    padding-top: 8px;
}

.footer__slash {
    color: var(--cyan);
}

/* ---------- responsive ---------- */

@media screen and (min-width: 980px) {
    .identity {
        position: sticky;
        top: calc(var(--topbar-height) + 20px);
    }
}

@media screen and (max-width: 620px) {
    body {
        font-size: 17px;
    }

    /* the bar wraps to three rows here — pinning it would eat the viewport */
    .topbar {
        position: static;
    }

    .section,
    .project {
        scroll-margin-top: 12px;
    }

    .status-pill {
        margin-left: 0;
    }

    .job__when,
    .degree__when,
    .additional__when {
        margin-left: 0;
    }

    .panel,
    .project--feature,
    .contact {
        padding: 20px;
    }
}
