:root {
    --ink: #20272d;
    --muted: #68727a;
    --faint: #929aa1;
    --blue: #236899;
    --paper: #fbfcfc;
    --line: #e5e9eb;
    --warm: #e55320;
    --uw: #4b2e83;
    --sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --mono: "Fragment Mono", "SFMono-Regular", Consolas, monospace;
}

* { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    scroll-padding-top: 5.5rem;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 4px;
    border-radius: 3px;
}

.skip-link {
    position: fixed;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 100;
    padding: 0.55rem 0.8rem;
    background: var(--ink);
    color: white;
    font-family: var(--mono);
    font-size: 0.8rem;
    transform: translateY(-150%);
}

.skip-link:focus { transform: translateY(0); }

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    border-bottom: 1px solid rgba(229, 233, 235, 0.86);
    background: rgba(251, 252, 252, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.nav-shell,
main,
footer {
    width: min(100% - 2.5rem, 860px);
    margin-inline: auto;
}

.nav-shell {
    min-height: 4.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.identity {
    display: inline-flex;
    align-items: center;
    font-family: var(--mono);
    font-size: 0.86rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.7rem;
    font-family: var(--mono);
    color: var(--muted);
    font-size: 0.82rem;
}

.nav-links a {
    position: relative;
    padding-block: 0.82rem;
    transition: color 160ms ease;
}

.nav-links a::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0.52rem;
    left: 0;
    height: 1px;
    background: var(--blue);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 180ms ease;
}

.nav-links a:hover { color: var(--blue); }
.nav-links a:hover::after { transform: scaleX(1); transform-origin: left; }

.intro {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 13rem;
    align-items: center;
    gap: clamp(2rem, 7vw, 5rem);
    padding-block: clamp(2.8rem, 6vw, 4.25rem);
}

h1, h2, h3, p { margin-top: 0; }
figure { margin: 0; }

h1 {
    margin-bottom: 0.9rem;
    font-family: var(--mono);
    font-size: clamp(2.75rem, 6.4vw, 4.3rem);
    font-weight: 500;
    line-height: 1;
    letter-spacing: -0.075em;
}

.intro-lede {
    max-width: 48ch;
    margin-bottom: 1rem;
    color: #3d464c;
    font-size: 1.04rem;
    line-height: 1.58;
}

.uw { color: var(--uw); font-weight: 600; }

.fire-text {
    display: inline-block;
    position: relative;
    z-index: 0;
    color: var(--ink);
    font-weight: 600;
    white-space: nowrap;
    text-shadow:
        -1px -1px 0 var(--paper),
        1px -1px 0 var(--paper),
        -1px 1px 0 var(--paper),
        1px 1px 0 var(--paper);
}

.fire-layer {
    position: absolute;
    right: -0.08em;
    bottom: 0.18em;
    left: -0.08em;
    z-index: -1;
    height: 1.88em;
    pointer-events: none;
    transform-origin: center bottom;
    transition: transform 180ms ease, filter 180ms ease;
}

.fire-text:hover .fire-layer {
    filter: saturate(1.28) brightness(1.08);
    transform: scaleY(1.22);
}

.fire-layer svg {
    display: block;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.contact-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem 1.1rem;
    margin-bottom: 0;
}

.contact-links a {
    display: inline-flex;
    align-items: center;
    gap: 0.38rem;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 0.78rem;
    transition: color 160ms ease;
}

.contact-links svg {
    width: 1rem;
    height: 1rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.contact-links .fill-icon { fill: currentColor; stroke: none; }

.contact-links a:hover { color: var(--blue); }

.personal-line {
    margin-bottom: 0.75rem;
    color: var(--muted);
    font-size: 0.88rem;
}

.personal-line span {
    margin-right: 0.35rem;
    color: #c93b3b;
    font-family: var(--mono);
}

.portrait-wrap { margin-bottom: 0; }

.portrait-wrap img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: cover;
    object-position: center 35%;
    filter: saturate(0.9) contrast(1.02);
}

.section-block { padding-top: clamp(2.1rem, 4vw, 3rem); }

.section-heading {
    position: relative;
    padding-bottom: 0.8rem;
}

.section-heading::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 3.25rem;
    height: 1px;
    background: rgba(104, 114, 122, 0.34);
}

.section-heading h2 {
    margin-bottom: 0;
    font-family: var(--mono);
    font-size: 1.2rem;
    font-weight: 500;
    letter-spacing: -0.035em;
}

.work-list {
    display: grid;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.work-row {
    display: grid;
    grid-template-columns: 2.25rem minmax(0, 1fr) auto;
    align-items: start;
    gap: 1.25rem;
    min-height: 5.6rem;
    margin-inline: -0.55rem;
    padding-inline: 0.55rem;
    padding-block: 0.85rem 0.95rem;
    border-bottom: 1px solid var(--line);
}

.work-row:last-child { border-bottom: 0; }

.work-logo {
    display: block;
    width: 2.25rem;
    height: 2.25rem;
    object-fit: cover;
    margin-top: 0.12rem;
}

.work-copy h3 {
    margin-bottom: 0;
    font-family: var(--mono);
    font-size: 0.94rem;
    font-weight: 500;
    line-height: 1.35;
}

.work-company,
.work-row time {
    margin-bottom: 0;
    color: var(--muted);
    font-size: 0.78rem;
}

.work-company { margin-top: 0.16rem; }

.work-row time {
    padding-top: 0.12rem;
    font-family: var(--mono);
    font-size: 0.72rem;
    white-space: nowrap;
}

.work-copy .work-description {
    max-width: 62ch;
    margin: 0.58rem 0 0;
    color: #454e54;
    font-size: 0.84rem;
    line-height: 1.5;
}

.work-description:empty { display: none; }

.project-list { border-bottom: 0; }

.project-row {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1.25rem;
    align-items: center;
    min-height: 4.9rem;
    padding-block: 0.72rem;
    border-bottom: 1px solid var(--line);
    margin-inline: -0.55rem;
    padding-inline: 0.55rem;
}

.project-row:last-child { border-bottom: 0; }
.project-main { display: block; }

.project-main::after {
    content: "";
    position: absolute;
    inset: 0;
}

.project-main h3 {
    margin-bottom: 0.24rem;
    font-family: var(--mono);
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.4;
    transition: color 160ms ease;
}

.project-row:hover .project-main h3 { color: var(--blue); }

.project-main p {
    max-width: 64ch;
    margin-bottom: 0;
    color: var(--muted);
    font-size: 0.86rem;
    line-height: 1.42;
}

.project-actions {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.8rem;
    font-family: var(--mono);
    font-size: 0.68rem;
    white-space: nowrap;
}

.project-actions a {
    margin-block: -0.45rem;
    padding-block: 0.45rem;
    color: var(--muted);
    transition: color 160ms ease;
}
.project-actions a:hover { color: var(--blue); }

footer {
    display: flex;
    align-items: center;
    padding-block: 1.2rem 1.75rem;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 0.72rem;
}

footer p { margin-bottom: 0; }
@media (max-width: 700px) {
    .nav-shell, main, footer { width: min(100% - 2rem, 860px); }
    .nav-shell { min-height: 3.75rem; gap: 0.75rem; }
    .identity { font-size: 0.74rem; white-space: nowrap; }
    .nav-links {
        gap: clamp(0.6rem, 3vw, 0.85rem);
        font-size: clamp(0.64rem, 2.8vw, 0.7rem);
    }

    .intro {
        grid-template-columns: minmax(0, 1fr) 7.25rem;
        align-items: start;
        gap: 1.25rem;
        padding-block: 2.25rem 2.4rem;
    }

    .intro-copy { display: contents; }
    .intro-copy > h1 {
        grid-column: 1;
        grid-row: 1;
        align-self: end;
    }
    h1 { margin-bottom: 1rem; font-size: clamp(2.35rem, 11.4vw, 3rem); }

    .intro-lede {
        grid-column: 1 / -1;
        font-size: 0.96rem;
    }

    .portrait-wrap {
        grid-column: 2;
        grid-row: 1;
        margin-top: 0.15rem;
    }

    .contact-links, .personal-line { grid-column: 1 / -1; }

    .work-row {
        grid-template-columns: 2.25rem minmax(0, 1fr);
        gap: 0.7rem 0.85rem;
        padding-block: 0.85rem 0.95rem;
    }

    .work-row time { grid-column: 2; white-space: normal; }

    .project-row { display: block; padding-block: 0.85rem; }
    .project-actions { justify-content: flex-start; margin-top: 0.5rem; }

}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition-duration: 0.01ms !important; }
}
