:root {
    --bg: #f8f7f3;
    --surface: #ffffff;
    --fg: #101010;
    --muted: #5f6065;
    --hairline: rgba(16, 16, 16, 0.14);
    --focus: #0f5f63;
    --accent: #0f5f63;
    --accent-soft: rgba(15, 95, 99, 0.12);
    --header-bg: rgba(248, 247, 243, 0.9);
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.06);
    --max: 1200px;
    --font-body: MuseoSans_500, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
    --font-heading: "IBMPlexSerif", "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
    --desktop-image-grayscale-start: 15%;
    --desktop-image-grayscale-hover: 0%;
    --desktop-image-saturation-start: 0.97;
    --desktop-image-saturation-hover: 1;
}

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

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
    overflow-y: scroll;
    overflow-x: clip;
}

@font-face {
    font-family: "MuseoSans_500";
    src: url("/assets/MuseoSans_500-webfont.woff2") format("woff2"),
    url("/assets/MuseoSans_500-webfont.woff") format("woff");
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: "IBMPlexSerif";
    src: url("/assets/fonts/IBMPlexSerif-400-latin.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "IBMPlexSerif";
    src: url("/assets/fonts/IBMPlexSerif-600-latin.woff2") format("woff2");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--fg);
    font-family: var(--font-body);
    line-height: 1.5;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    padding: 10px 12px;
    background: var(--fg);
    color: var(--bg);
    z-index: 9999;
    text-decoration: none;
}

.skip-link:focus {
    left: 10px;
    top: 10px;
    outline: 2px solid var(--bg);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--header-bg);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--hairline);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
}

.header-inner {
    max-width: var(--max);
    margin: 0 auto;
    padding: 16px 22px;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 20px;
}

.brand {
    font-family: var(--font-heading);
    font-weight: 600;
    letter-spacing: 0.02em;
    text-decoration: none;
    color: var(--fg);
    font-size: clamp(21px, 2.2vw, 31px);
    line-height: 1.05;
}

@media (max-width: 980px) {
    .brand {
        font-size: 22px;
    }
}

.top-nav {
    display: flex;
    align-items: center;
    gap: 14px;
}

.nav-link {
    font-size: 14px;
    text-decoration: none;
    color: color-mix(in oklab, var(--fg) 82%, var(--accent) 18%);
    border-bottom: 1px solid transparent;
    padding-bottom: 2px;
    transition: color 180ms ease, border-color 180ms ease;
}

.nav-link:hover {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.nav-link:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 4px;
}

.site-main {
    max-width: var(--max);
    margin: 0 auto;
    padding: 40px 22px 72px;
}

.intro {
    padding: 30px 0 44px;
    border-bottom: 1px solid var(--hairline);
}

.intro h1 {
    font-family: var(--font-heading);
    font-size: clamp(34px, 4.5vw, 56px);
    line-height: 1.1;
    margin: 0 0 16px 0;
    letter-spacing: -0.01em;
    max-width: 18ch;
}

.intro-text {
    margin: 0 0 12px 0;
    font-size: 18px;
    line-height: 1.6;
    max-width: 72ch;
}

.intro-subtext {
    margin: 0;
    font-size: 16px;
    line-height: 1.6;
    color: var(--muted);
    max-width: 70ch;
}

.hero {
    padding: 16px 0 0;
}

.hero-bleed {
    margin: 0;
}

.hero-figure {
    border-bottom: 1px solid var(--hairline);
    box-shadow: var(--shadow-soft);
}

.hero-image {
    width: 100%;
    height: clamp(240px, 42vh, 520px);
    display: block;
    object-fit: cover;
    filter: grayscale(20%) contrast(1.05) saturate(0.95);
}

.hero-caption {
    max-width: var(--max);
    margin: 0 auto;
    padding: 10px 20px 14px;
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
}

.projects {
    padding-top: 34px;
}

.projects-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.projects h2 {
    margin: 0;
    font-size: 14px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: color-mix(in oklab, var(--fg) 74%, var(--accent) 26%);
}

.projects-hint {
    margin: 0;
    font-size: 13px;
    color: var(--muted);
}

.image-frame {
    border: 1px solid var(--hairline);
    background: var(--surface);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(12, 18, 28, 0.05);
    transition: box-shadow 220ms ease, border-color 220ms ease;
}

.prose p {
    margin: 0 0 12px 0;
    max-width: 75ch;
    font-size: 17px;
    line-height: 1.7;
}

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

.site-footer {
    border-top: 1px solid var(--hairline);
    padding: 20px 22px;
    max-width: var(--max);
    margin: 0 auto;
}

.site-footer small {
    display: block;
    color: var(--muted);
    margin: 0;
    text-align: left;
    font-size: 13px;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}

@media (max-width: 760px) {
    .site-main {
        padding: 32px 18px 62px;
    }

    .header-inner {
        padding: 14px 18px;
        align-items: center;
    }

    .intro h1 {
        max-width: 100%;
    }

    .intro-text {
        font-size: 17px;
    }

    .intro-subtext {
        font-size: 15px;
    }
}
