:root {
    --bg: #f1f0ec;
    --text: #11110f;
    --muted: #74736e;
    --line: #cbc9c2;
    --accent: #a3ab9b;
    --pad: clamp(16px, 2vw, 32px);
    --header-h: 74px;
    --ease: cubic-bezier(.22, 1, .36, 1);
}
html[data-theme="dark"] {
    --bg: #10110f;
    --text: #efefe9;
    --muted: #92938d;
    --line: #30312e;
    --accent: #cfc3ba;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    line-height: 1.2;
    letter-spacing: -.02em;
    transition: background-color .35s ease, color .35s ease;
    overflow-x: hidden;
}
body.menu-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
img { max-width: 100%; height: auto; display: block; }
.skip-link { position: fixed; left: 12px; top: -80px; z-index: 1000; background: var(--text); color: var(--bg); padding: 10px 14px; }
.skip-link:focus { top: 12px; }

.site-header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 50;
    min-height: var(--header-h);
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: start;
    padding: 18px var(--pad);
    background: linear-gradient(to bottom, var(--bg) 58%, color-mix(in srgb, var(--bg) 72%, transparent) 78%, transparent);
    transition: border-color .3s ease, background-color .3s ease;
    border-bottom: 1px solid transparent;
}
.site-header.is-scrolled { border-color: var(--line); background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: blur(12px); }
.brand { font-weight: 700; letter-spacing: -.04em; }
.brand sup { font-size: 8px; margin-left: 3px; vertical-align: top; }
.custom-logo-link img { width: auto; max-height: 32px; }
.site-nav { justify-self: center; }
.nav-list { display: flex; gap: 22px; list-style: none; padding: 0; margin: 0; }
.nav-list a, .utility-button { position: relative; }
.nav-list a::after, .text-link::after, .contact-links a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 100%;
    bottom: -2px;
    height: 1px;
    background: currentColor;
    transition: right .35s var(--ease);
}
.nav-list a:hover::after, .text-link:hover::after, .contact-links a:hover::after { right: 0; }
.utility-nav { justify-self: end; display: flex; gap: 26px; align-items: center; }
.utility-button, .menu-toggle { appearance: none; border: 0; padding: 0; background: transparent; cursor: pointer; }
.utility-button span { color: var(--muted); }
.clock { font-variant-numeric: tabular-nums; }
.menu-toggle { display: none; }

.hero {
    min-height: max(100svh, 760px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: calc(var(--header-h) + 42px) var(--pad) 34px;
    border-bottom: 1px solid var(--line);
}
.hero-meta, .hero-bottom, .section-label, .project-row, .site-footer {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: 12px;
}
.hero-meta span:first-child { grid-column: 1 / 5; }
.hero-meta span:last-child { grid-column: 8 / 13; text-align: right; color: var(--muted); }
.hero-title {
    display: grid;
    width: max-content;
    max-width: calc(100vw - (2 * var(--pad)));
    align-self: center;
    margin: clamp(26px, 4vh, 52px) auto;
    font-size: clamp(54px, 8.15vw, 140px);
    line-height: .77;
    letter-spacing: -.075em;
    font-weight: 700;
    text-align: left;
    text-transform: uppercase;
}
.hero-title span {
    display: block;
    width: max-content;
    max-width: 100%;
    white-space: nowrap;
    transform: none;
    transition: margin-left .7s var(--ease);
}
/* Centered left-to-right staircase. Offsets participate in layout so the
   entire typographic silhouette is centered as one composition. */
.hero-title span:nth-child(1) { margin-left: 0; }
.hero-title span:nth-child(2) { margin-left: 8vw; }
.hero-title span:nth-child(3) { margin-left: 16vw; }
.hero-title span:nth-child(4) { margin-left: 24vw; }
.hero-bottom { align-items: end; }
.hero-bottom p { grid-column: 1 / 5; max-width: 480px; font-size: clamp(17px, 1.45vw, 24px); line-height: 1.15; margin: 0; }
.hero-bottom .text-link { grid-column: 10 / 13; justify-self: end; position: relative; }

.work-section, .services-section, .about-section, .contact-section {
    position: relative;
    padding: 22px var(--pad) 112px;
    border-bottom: 1px solid var(--line);
    scroll-margin-top: var(--header-h);
}
.section-label { padding-bottom: 54px; color: var(--muted); }
.section-label span:first-child { grid-column: 1 / 2; }
.section-label h2 { grid-column: 2 / 6; margin: 0; font-size: inherit; font-weight: 400; color: var(--text); }
.section-label span:last-child { grid-column: 10 / 13; text-align: right; }

.project-list { border-top: 1px solid var(--line); }
.project-row {
    position: relative;
    min-height: 88px;
    align-items: center;
    border-bottom: 1px solid var(--line);
    transition: opacity .25s ease, padding-left .45s var(--ease), color .25s ease;
    cursor: pointer;
}
.project-list:hover .project-row { opacity: .46; }
.project-list .project-row:hover { opacity: 1; padding-left: 8px; }
.project-index { grid-column: 1 / 2; color: var(--muted); font-variant-numeric: tabular-nums; }
.project-title { grid-column: 2 / 7; font-size: clamp(30px, 4.1vw, 68px); letter-spacing: -.055em; text-transform: uppercase; }
.project-category { grid-column: 8 / 11; color: var(--muted); }
.project-year { grid-column: 12 / 13; text-align: right; }
.project-mobile-image { display: none; }
.project-preview {
    position: fixed;
    z-index: 40;
    left: 0;
    top: 0;
    width: min(27vw, 420px);
    max-height: 58vh;
    pointer-events: none;
    opacity: 0;
    transform: translate3d(-50%, -50%, 0) scale(.94);
    transition: opacity .2s ease, transform .35s var(--ease);
    overflow: hidden;
    background: var(--bg);
    box-shadow: 0 18px 55px rgba(0,0,0,.16);
}
.project-preview.is-active { opacity: 1; transform: translate3d(-50%, -50%, 0) scale(1); }
.project-preview img { width: 100%; height: auto; max-height: 58vh; object-fit: contain; }

.service-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.service-grid span { min-height: 112px; display: flex; align-items: center; border-bottom: 1px solid var(--line); font-size: clamp(26px, 3.7vw, 62px); letter-spacing: -.055em; }
.service-grid span:nth-child(odd) { border-right: 1px solid var(--line); padding-right: 20px; }
.service-grid span:nth-child(even) { padding-left: 20px; }

.about-copy { width: min(78%, 1240px); margin-left: auto; }
.about-copy p { margin: 0; font-size: clamp(42px, 6.3vw, 106px); line-height: .93; letter-spacing: -.066em; }
.about-note { margin-top: 64px; display: flex; justify-content: space-between; color: var(--muted); border-top: 1px solid var(--line); padding-top: 14px; }

.contact-section { min-height: 88svh; display: flex; flex-direction: column; }
.contact-heading { margin: auto 0; font-size: clamp(46px, 8.15vw, 136px); line-height: .82; letter-spacing: -.075em; font-weight: 700; }
.contact-heading span { display: block; }
.contact-heading span:nth-child(2) { padding-left: 7vw; }
.contact-heading span:nth-child(3) { text-align: right; }
.contact-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin-top: 70px; border-top: 1px solid var(--line); }
.contact-item { min-height: 116px; display: flex; flex-direction: column; justify-content: space-between; padding: 16px 20px 16px 0; border-bottom: 1px solid var(--line); }
.contact-item + .contact-item { padding-left: 20px; border-left: 1px solid var(--line); }
.contact-item span { color: var(--muted); }
.contact-item strong { font-size: clamp(24px, 2.6vw, 46px); font-weight: 400; letter-spacing: -.045em; }
.contact-links a, .text-link { position: relative; }

.site-footer { min-height: 72px; align-items: end; padding: 26px var(--pad); color: var(--muted); }
.site-footer > :first-child { grid-column: 1 / 4; }
.site-footer .cursor-coordinates { grid-column: 5 / 9; text-align: center; }
.site-footer > :last-child { grid-column: 10 / 13; text-align: right; }
.cursor-coordinates b { font-weight: 400; font-variant-numeric: tabular-nums; }
[data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
[data-reveal].is-visible { opacity: 1; transform: none; }

.single-project { padding: calc(var(--header-h) + 48px) var(--pad) 100px; }
.project-kicker { display: grid; grid-template-columns: 1fr 1fr 1fr; padding-bottom: 34px; color: var(--muted); }
.project-kicker span:nth-child(2) { text-align: center; }
.project-kicker span:last-child { text-align: right; }
.project-hero h1 { margin: 0 0 40px; font-size: clamp(64px, 13vw, 220px); line-height: .78; letter-spacing: -.08em; text-transform: uppercase; }
.project-cover { margin: 0; }
.project-cover img { width: 100%; max-height: 92svh; object-fit: cover; }
.project-content { max-width: 1500px; margin: 100px auto; font-size: clamp(18px, 2vw, 30px); line-height: 1.25; }
.project-content > * { margin-bottom: 32px; }
.project-content .alignwide { width: min(1200px, 100%); margin-left: auto; margin-right: auto; }
.project-content .alignfull { width: calc(100vw - 2 * var(--pad)); max-width: none; margin-left: 50%; transform: translateX(-50%); }
.project-next { border-top: 1px solid var(--line); padding-top: 26px; }
.project-next a { display: flex; justify-content: space-between; align-items: baseline; }
.project-next strong { font-size: clamp(36px, 6vw, 94px); letter-spacing: -.06em; }
.archive-page, .content-page { padding: calc(var(--header-h) + 48px) var(--pad) 100px; min-height: 80svh; }
.archive-header h1, .content-page h1 { font-size: clamp(64px, 12vw, 180px); letter-spacing: -.08em; margin: 0 0 60px; }
.archive-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.archive-card img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.archive-card h2 { font-size: clamp(28px, 4vw, 64px); margin: 16px 0 4px; }
.archive-card p { color: var(--muted); }
.error-page { min-height: 100svh; display: grid; place-content: center; text-align: center; padding: var(--pad); }
.error-page > span { font-size: 14px; color: var(--muted); }
.error-page h1 { max-width: 900px; margin: 20px auto 30px; font-size: clamp(48px, 8vw, 120px); line-height: .9; letter-spacing: -.07em; }

@media (max-width: 1080px) {
    .hero-title { font-size: clamp(52px, 9vw, 112px); }
    .hero-title span:nth-child(1) { margin-left: 0; }
    .hero-title span:nth-child(2) { margin-left: 6vw; }
    .hero-title span:nth-child(3) { margin-left: 12vw; }
    .hero-title span:nth-child(4) { margin-left: 18vw; }
    .project-category { grid-column: 8 / 12; }
    .project-year { display: none; }
}

@media (max-width: 820px) {
    :root { --header-h: 64px; }
    .site-header { grid-template-columns: 1fr auto; align-items: start; padding-top: 14px; background: var(--bg); }
    .site-header.is-scrolled { backdrop-filter: none; }
    .menu-toggle { display: flex; gap: 8px; align-items: center; justify-self: end; z-index: 52; }
    .menu-toggle-mark { font-size: 18px; line-height: 1; transition: transform .35s var(--ease); }
    body.menu-open .menu-toggle-mark { transform: rotate(45deg); }
    .site-nav {
        position: fixed;
        inset: 0;
        z-index: 51;
        display: flex;
        align-items: flex-end;
        padding: calc(var(--header-h) + 40px) var(--pad) 34px;
        background: var(--bg);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-12px);
        transition: opacity .3s ease, transform .4s var(--ease), visibility .3s ease;
    }
    body.menu-open .site-nav { opacity: 1; visibility: visible; transform: none; }
    .nav-list { width: 100%; display: block; }
    .nav-list li { border-top: 1px solid var(--line); }
    .nav-list li:last-child { border-bottom: 1px solid var(--line); }
    .nav-list a { display: block; padding: 14px 0; font-size: clamp(44px, 14vw, 80px); letter-spacing: -.06em; }
    .nav-list a::after { display: none; }
    .utility-nav { display: none; }
    .hero { min-height: max(92svh, 680px); padding-top: calc(var(--header-h) + 26px); }
    .hero-meta span:first-child { grid-column: 1 / 7; }
    .hero-meta span:last-child { grid-column: 7 / 13; }
    .hero-title { font-size: clamp(42px, 13vw, 78px); line-height: .8; margin: 28px auto; width: max-content; max-width: calc(100vw - (2 * var(--pad))); text-align: left; }
    .hero-title span { white-space: nowrap; }
    .hero-title span:nth-child(1) { margin-left: 0; }
    .hero-title span:nth-child(2) { margin-left: 3vw; }
    .hero-title span:nth-child(3) { margin-left: 6vw; }
    .hero-title span:nth-child(4) { margin-left: 9vw; }
    .hero-bottom p { grid-column: 1 / 11; font-size: 18px; }
    .hero-bottom .text-link { grid-column: 1 / 13; justify-self: start; margin-top: 28px; }
    .work-section, .services-section, .about-section, .contact-section { padding-bottom: 72px; }
    .section-label { padding-bottom: 34px; }
    .section-label h2 { grid-column: 2 / 9; }
    .section-label span:last-child { grid-column: 9 / 13; }
    .project-row { display: grid; grid-template-columns: 32px 1fr auto; gap: 10px; padding: 20px 0; }
    .project-index { grid-column: 1; grid-row: 1; }
    .project-title { grid-column: 2 / 4; grid-row: 1; font-size: clamp(30px, 10vw, 54px); }
    .project-category { grid-column: 2 / 3; grid-row: 2; }
    .project-year { display: block; grid-column: 3; grid-row: 2; }
    .project-mobile-image { display: block; grid-column: 1 / 4; grid-row: 3; width: 100%; max-height: 72svh; object-fit: cover; margin-top: 12px; }
    .project-list:hover .project-row { opacity: 1; }
    .project-preview { display: none; }
    .service-grid { grid-template-columns: 1fr; }
    .service-grid span { min-height: 80px; }
    .service-grid span:nth-child(odd) { border-right: 0; padding-right: 0; }
    .service-grid span:nth-child(even) { padding-left: 0; }
    .about-copy { width: 100%; }
    .about-copy p { font-size: clamp(38px, 12vw, 72px); }
    .about-note { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
    .contact-section { min-height: 76svh; }
    .contact-heading { font-size: clamp(44px, 12.5vw, 80px); }
    .contact-heading span:nth-child(2) { padding-left: 0; }
    .contact-heading span:nth-child(3) { text-align: left; }
    .contact-links { grid-template-columns: 1fr; }
    .contact-item + .contact-item { padding-left: 0; border-left: 0; }
    .contact-item { min-height: 92px; }
    .site-footer { grid-template-columns: 1fr 1fr; row-gap: 18px; }
    .site-footer > :first-child { grid-column: 1; }
    .site-footer .cursor-coordinates { display: none; }
    .site-footer > :last-child { grid-column: 2; }
    .archive-grid { grid-template-columns: 1fr; }
    .project-kicker { grid-template-columns: 1fr auto; gap: 10px; }
    .project-kicker span:nth-child(2) { display: none; }
    .project-hero h1 { font-size: clamp(58px, 17vw, 110px); }
}

@media (max-height: 760px) and (min-width: 821px) {
    .hero { min-height: 760px; }
    .hero-title { font-size: clamp(50px, 7.65vw, 124px); margin: 18px 0; }
    .hero-bottom p { font-size: 18px; }
}

@supports not (background: color-mix(in srgb, white, transparent)) {
    .site-header { background: linear-gradient(to bottom, var(--bg) 75%, transparent); }
    .site-header.is-scrolled { background: var(--bg); }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
    [data-reveal] { opacity: 1; transform: none; }
}
