/* ============================================================
   v2: a document, not a landing page.
   One serif. One accent. One column of attention.
   No JavaScript, no images, no cards, no canvas.
   ============================================================ */

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

@font-face {
    font-family: "Newsreader";
    src: url("fonts/newsreader-italic-latin.woff2") format("woff2");
    font-weight: 400 600;
    font-style: italic;
    font-display: swap;
}

:root {
    --paper: #f7f4ec;
    --ink: #1b1915;
    --ink-soft: #3d3932;
    --muted: #6b655b;
    --rule: #d9d2c3;
    --rule-strong: #bfb6a6;
    --signal: #a0442a;
    --serif: "Newsreader", Georgia, "Times New Roman", serif;
    --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
    --page: 1120px;
    --gutter: 48px;
}

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

html {
    color-scheme: light;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    background: var(--paper);
    color: var(--ink);
    font-family: var(--serif);
    font-size: 18px;
    line-height: 1.55;
    font-optical-sizing: auto;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

::selection {
    background: #e7d8c4;
    color: var(--ink);
}

a {
    color: inherit;
}

p {
    text-wrap: pretty;
}

.wrap {
    width: min(100% - (var(--gutter) * 2), var(--page));
    margin-inline: auto;
}

.vh {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* Skip link ------------------------------------------------- */

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 10;
    padding: 12px 16px;
    background: var(--paper);
    color: var(--ink);
    border: 1px solid var(--ink);
    font-size: 15px;
}

.skip-link:focus {
    left: 16px;
    top: 16px;
}

:focus-visible {
    outline: 1px solid var(--signal);
    outline-offset: 4px;
}

/* Masthead -------------------------------------------------- */

.masthead {
    padding-top: 28px;
}

.masthead-inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 32px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--rule);
}

.identity {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.name {
    font-size: 1.125rem;
    font-weight: 500;
    letter-spacing: -0.01em;
    line-height: 1.3;
    text-decoration: none;
    transition: color 120ms ease;
}

.name:hover {
    color: var(--signal);
}

.role {
    font-size: 0.8125rem;
    line-height: 1.3;
    color: var(--muted);
}

.nav {
    display: flex;
    gap: 1.75rem;
    padding-top: 2px;
    font-size: 0.9375rem;
    line-height: 1.3;
}

.nav a {
    color: var(--muted);
    text-decoration: none;
    transition: color 120ms ease;
}

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

.nav a[aria-current="page"] {
    color: var(--ink);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.3em;
}

/* Intro ----------------------------------------------------- */

.intro {
    padding: 72px 0 56px;
}

.intro-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 24px;
}

.statement {
    grid-column: 1 / span 10;
    font-size: clamp(2.5rem, 4.6vw, 3.25rem);
    font-weight: 400;
    line-height: 1.06;
    letter-spacing: -0.028em;
    text-wrap: initial;
}

.statement em {
    font-style: italic;
    font-weight: 400;
}

.intro-foot {
    grid-column: 1 / span 12;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 24px;
    align-items: end;
    margin-top: 32px;
}

.lede {
    grid-column: 1 / span 6;
    max-width: 52ch;
    font-size: 1.0625rem;
    line-height: 1.6;
    color: var(--ink-soft);
}

.now {
    grid-column: 9 / span 4;
}

.now-label {
    font-size: 0.75rem;
    font-style: italic;
    color: var(--muted);
}

.now ul {
    list-style: none;
    margin-top: 6px;
}

.now li {
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--ink-soft);
}

.now li em {
    font-style: normal;
    color: var(--muted);
}

/* Sections -------------------------------------------------- */

.section {
    padding-top: 22px;
    border-top: 1px solid var(--rule);
}

.work-section {
    padding-bottom: 48px;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 24px;
    margin-bottom: 26px;
}

.section-label {
    font-size: 0.8125rem;
    font-style: italic;
    font-weight: 400;
    color: var(--muted);
}

.section-meta {
    display: flex;
    align-items: baseline;
    gap: 24px;
    font-size: 0.8125rem;
    color: var(--muted);
}

.section-meta a {
    color: var(--ink);
    text-decoration: none;
    border-bottom: 1px solid var(--rule-strong);
    padding-bottom: 1px;
    transition: color 120ms ease, border-color 120ms ease;
}

.section-meta a:hover {
    color: var(--signal);
    border-color: var(--signal);
}

/* Index ----------------------------------------------------- */

.index-head,
.index li {
    display: grid;
    grid-template-columns: 2.25rem minmax(9rem, 1fr) minmax(0, 2.1fr) 8.5rem 2.75rem;
    column-gap: 1.5rem;
    align-items: baseline;
}

.index-head {
    padding-bottom: 0.65rem;
    border-bottom: 1px solid var(--rule-strong);
    font-size: 0.75rem;
    font-style: italic;
    color: var(--muted);
    letter-spacing: 0.01em;
}

.index {
    list-style: none;
}

.index li {
    padding: 1.05rem 0;
    border-bottom: 1px solid var(--rule);
}

.index .num {
    font-size: 0.75rem;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

.index .project {
    font-size: 1.1875rem;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: -0.01em;
    text-decoration: none;
    transition: color 120ms ease;
}

.index .project:hover {
    color: var(--signal);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
    text-decoration-color: var(--signal);
}

.index .desc {
    font-size: 0.9375rem;
    line-height: 1.4;
    color: var(--muted);
}

.index .desc em {
    font-style: italic;
    color: var(--ink-soft);
}

.index .stack,
.index .year {
    font-size: 0.75rem;
    line-height: 1.4;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

/* The only drawn mark on the page. */
.arrow {
    display: inline-block;
    width: 0.55em;
    height: 0.55em;
    margin-left: 0.35em;
    vertical-align: 0.08em;
    background-color: var(--muted);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M2 8 8 2M3 2h5v5' fill='none' stroke='%23000' stroke-width='1.2'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M2 8 8 2M3 2h5v5' fill='none' stroke='%23000' stroke-width='1.2'/%3E%3C/svg%3E") center / contain no-repeat;
    transition: background-color 120ms ease, transform 120ms ease;
}

.project:hover .arrow,
.contact-links a:hover .arrow {
    background-color: var(--signal);
    transform: translate(1px, -1px);
}

/* Right arrow for internal project links. */
.arrow-next {
    display: inline-block;
    width: 0.6em;
    height: 0.55em;
    margin-left: 0.35em;
    vertical-align: 0.02em;
    background-color: var(--muted);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M2 5h6M5 2l3 3-3 3' fill='none' stroke='%23000' stroke-width='1.2'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M2 5h6M5 2l3 3-3 3' fill='none' stroke='%23000' stroke-width='1.2'/%3E%3C/svg%3E") center / contain no-repeat;
    transition: background-color 120ms ease, transform 120ms ease;
}

.project:hover .arrow-next,
.project-next a:hover .arrow-next {
    background-color: var(--signal);
    transform: translateX(2px);
}

/* Marginal notes -------------------------------------------- */

.marginal {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 24px;
}

.marginal .section-label {
    grid-column: 1 / span 2;
}

.marginal .body {
    grid-column: 4 / span 6;
}

.about {
    padding-bottom: 56px;
}

.about p,
.private p {
    max-width: 62ch;
    font-size: 1.0625rem;
    line-height: 1.6;
    color: var(--ink-soft);
}

.about p + p,
.private p + p {
    margin-top: 1em;
}

.private {
    padding-bottom: 64px;
}

.private .body {
    grid-column: 4 / span 8;
}

.private-list {
    margin-top: 22px;
    border-top: 1px solid var(--rule);
}

.private-list > div {
    display: grid;
    grid-template-columns: 8.5rem minmax(0, 1fr);
    gap: 24px;
    padding: 10px 0;
    border-bottom: 1px solid var(--rule);
}

.private-list dt {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--ink);
}

.private-list dd {
    font-size: 0.9375rem;
    line-height: 1.5;
    color: var(--ink-soft);
}

.private-close {
    margin-top: 20px;
}

/* About page: lanes ----------------------------------------- */

.lanes {
    margin-top: 20px;
    border-top: 1px solid var(--rule);
}

.lanes > div {
    display: grid;
    grid-template-columns: 7.5rem minmax(0, 1fr);
    gap: 24px;
    padding: 10px 0;
    border-bottom: 1px solid var(--rule);
}

.lanes dt {
    font-style: italic;
    color: var(--muted);
}

.lanes dd {
    font-size: 0.9375rem;
    line-height: 1.5;
    color: var(--ink-soft);
}

/* Contact --------------------------------------------------- */

.contact {
    padding-bottom: 64px;
}

.contact-line {
    max-width: 52ch;
    font-size: 1.0625rem;
    line-height: 1.55;
    color: var(--ink-soft);
}

.email {
    margin-top: 20px;
    font-size: 1.375rem;
    font-weight: 500;
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.email a {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
    text-decoration-color: var(--rule-strong);
    transition: color 120ms ease, text-decoration-color 120ms ease;
}

.email a:hover {
    color: var(--signal);
    text-decoration-color: var(--signal);
}

.contact-links {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin-top: 20px;
    font-size: 0.9375rem;
}

.contact-links a {
    text-decoration: none;
    border-bottom: 1px solid var(--rule-strong);
    padding-bottom: 1px;
    transition: color 120ms ease, border-color 120ms ease;
}

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

.location {
    margin-top: 26px;
    font-size: 0.75rem;
    color: var(--muted);
}

/* Work page ------------------------------------------------- */

.page-head {
    padding: 80px 0 48px;
}

.page-head h1 {
    font-size: clamp(2.5rem, 4vw, 3rem);
    font-weight: 400;
    line-height: 1.05;
    letter-spacing: -0.03em;
}

.page-head .lede {
    margin-top: 18px;
    max-width: 58ch;
}

.work-page {
    padding-bottom: 48px;
}

.note {
    margin-top: 24px;
    max-width: 60ch;
    font-size: 0.8125rem;
    line-height: 1.5;
    color: var(--muted);
}

.note a,
.private-close a {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    text-decoration-color: var(--rule-strong);
    transition: color 120ms ease, text-decoration-color 120ms ease;
}

.note a:hover {
    color: var(--signal);
    text-decoration-color: var(--signal);
}

/* Project pages --------------------------------------------- */

/* One reading column. The masthead sits inside it, the artifact is a
   full-width figure in the flow, and the copy continues beneath. */
.project-layout {
    max-width: 720px;
    margin-inline: auto;
}

.project-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 200px;
    column-gap: 32px;
    align-items: end;
    padding: 48px 0 32px;
    border-bottom: 1px solid var(--rule);
}

.crumb {
    font-size: 0.75rem;
    font-style: italic;
    color: var(--muted);
}

.crumb a {
    text-decoration: none;
    border-bottom: 1px solid var(--rule-strong);
    padding-bottom: 1px;
    transition: color 120ms ease, border-color 120ms ease;
}

.crumb a:hover {
    color: var(--signal);
    border-color: var(--signal);
}

.crumb span {
    margin: 0 0.35em;
    color: var(--rule-strong);
}

.project-head h1 {
    margin-top: 18px;
    font-size: clamp(3rem, 6vw, 4.5rem);
    font-weight: 400;
    line-height: 0.98;
    letter-spacing: -0.035em;
}

.project-abstract {
    margin-top: 10px;
    max-width: 46ch;
    font-size: 1.25rem;
    line-height: 1.45;
    color: var(--ink-soft);
}

.project-meta {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px 24px;
    margin-top: 36px;
    padding-top: 20px;
    border-top: 1px solid var(--rule);
}

.project-meta dt {
    font-size: 0.75rem;
    font-style: italic;
    color: var(--muted);
}

.project-meta dd {
    margin-top: 2px;
    font-size: 0.875rem;
    line-height: 1.4;
    color: var(--ink-soft);
}

.project-meta a {
    text-decoration: none;
    border-bottom: 1px solid var(--rule-strong);
    padding-bottom: 1px;
    transition: color 120ms ease, border-color 120ms ease;
}

.project-meta a:hover {
    color: var(--signal);
    border-color: var(--signal);
}

/* The title block is the left column of the masthead; the spec table is the
   right column. */
.project-head-main {
    grid-column: 1;
}

.project-head .project-meta {
    grid-column: 2;
    align-self: end;
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.project-main {
    max-width: none;
}

/* The artifact is a block figure: same width as the text, caption beneath,
   copy resumes below it. No float, no second column. */
.project-aside {
    display: block;
    width: 100%;
    margin: 26px 0;
    background: none;
    container-type: inline-size;
}

.project-section {
    padding: 26px 0;
    border-bottom: 1px solid var(--rule);
}

.project-section:last-of-type {
    border-bottom: 0;
}

.project-section .section-label {
    display: block;
    margin-bottom: 10px;
}

.project-body p {
    font-size: 1.0625rem;
    line-height: 1.55;
    color: var(--ink-soft);
}

.project-body p + p {
    margin-top: 0.85em;
}

.project-body ul,
.project-body ol {
    margin: 1em 0 0 1.1em;
    padding-left: 0.4em;
    color: var(--ink-soft);
}

.project-body li {
    margin-top: 0.35em;
}

.project-body li::marker {
    color: var(--muted);
}

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

.project-body .result-figure {
    font-size: clamp(2.75rem, 5.5vw, 4rem);
    line-height: 1;
    letter-spacing: -0.04em;
    color: var(--ink);
}

.project-body .result-figure span {
    font-size: 0.5em;
    letter-spacing: 0;
    color: var(--muted);
}

.project-body .result-caption {
    margin-top: 0.75rem;
    max-width: 42ch;
    font-size: 0.8125rem;
    line-height: 1.5;
    color: var(--muted);
}

.project-body .code-note {
    margin-bottom: 10px;
    font-size: 0.8125rem;
    font-style: italic;
    color: var(--muted);
}

.project-body .subhead {
    margin-top: 24px;
    font-size: 0.8125rem;
    font-style: italic;
    color: var(--muted);
}

.project-body .subhead + .examples {
    margin-top: 8px;
}

.code {
    margin-top: 1rem;
    padding: 14px 0;
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
    overflow-x: auto;
    font-family: var(--mono);
    font-size: 0.8125rem;
    line-height: 1.6;
    color: var(--ink-soft);
    tab-size: 4;
    white-space: pre;
    font-variant-ligatures: none;
}

.code code {
    font-family: inherit;
    font-size: inherit;
}

.examples {
    list-style: none;
    margin-top: 1.25rem;
    border-top: 1px solid var(--rule);
}

.examples li {
    display: grid;
    grid-template-columns: 13.5rem 1fr;
    gap: 1.25rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid var(--rule);
    font-size: 0.9375rem;
    line-height: 1.5;
}

/* Six short rows read better as two columns than as one long list. */
@media (min-width: 680px) {
    .examples {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 32px;
    }

    .examples li {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 12px;
        padding: 0.5rem 0;
    }

    .examples li span {
        text-align: right;
        white-space: nowrap;
    }
}

.examples code {
    font-family: var(--mono);
    font-size: 0.8125rem;
    color: var(--ink);
}

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

/* Floated artifacts */
.project-figure {
    margin: 0;
}

.project-figure img {
    display: block;
    width: 100%;
    height: auto;
}

.project-figure figcaption {
    margin-top: 10px;
    font-size: 0.8125rem;
    font-style: italic;
    line-height: 1.5;
    color: var(--muted);
}

/* Glassbox benchmark pane ------------------------------------ */

.gb-pane {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    width: 100%;
    font-variant-numeric: tabular-nums;
}

/* On a full-width pane the two charts sit side by side; the label spans
   both. This is the main height saving on the Glassbox page. */
@container (min-width: 620px) {
    .gb-pane {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 32px;
    }

    .gb-pane-label {
        grid-column: 1 / -1;
    }
}

.gb-pane-label {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 2px 16px;
    padding-bottom: 7px;
    border-bottom: 1px solid var(--ink);
    font-size: 0.6875rem;
    line-height: 1.35;
    color: var(--muted);
}

.gb-pane-title {
    font-style: italic;
    color: var(--ink-soft);
}

.gb-pane-meta {
    margin-left: auto;
    font-family: var(--mono);
    text-align: right;
}

.gb-artifact {
    margin: 0;
}

.gb-fig-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--rule);
    font-size: 0.75rem;
    line-height: 1.3;
}

.gb-fig-title {
    font-style: italic;
    color: var(--ink-soft);
    white-space: nowrap;
}

.gb-fig-meta {
    font-family: var(--mono);
    font-size: 0.6875rem;
    color: var(--muted);
    white-space: nowrap;
}

/* At the narrowest pane the meta is wider than the remaining line; let it
   drop under the title instead of clipping. */
@container (max-width: 340px) {
    .gb-fig-head {
        flex-wrap: wrap;
        column-gap: 8px;
        row-gap: 2px;
    }

    .gb-fig-meta {
        white-space: normal;
    }
}

.gb-chart {
    display: block;
    width: 100%;
    height: auto;
    margin-top: 4px;
}

.gb-chart text {
    fill: var(--muted);
    font-family: var(--mono);
    font-size: var(--gb-fs);
    font-variant-numeric: tabular-nums;
}

.gb-axis {
    font-size: var(--gb-axis-fs);
}

.gb-grid {
    stroke: var(--rule);
    stroke-width: 1;
    vector-effect: non-scaling-stroke;
}

.gb-grid-strong {
    stroke: var(--rule-strong);
}

.gb-tick {
    stroke: var(--rule-strong);
    stroke-width: 1;
    vector-effect: non-scaling-stroke;
}

.gb-line {
    fill: none;
    stroke: var(--signal);
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
}

.gb-dot {
    fill: var(--signal);
}

.gb-dot-latest {
    fill: none;
    stroke: var(--signal);
    stroke-width: 1;
    vector-effect: non-scaling-stroke;
}

.gb-value {
    fill: var(--ink);
    font-size: var(--gb-axis-fs);
}

.gb-figure-note {
    margin-top: 8px;
    max-width: 64ch;
    font-size: 0.71875rem;
    line-height: 1.5;
    color: var(--muted);
}

.gb-losses {
    list-style: none;
    margin-top: 4px;
}

.gb-losses li {
    display: grid;
    grid-template-columns: 8.5rem minmax(0, 1fr) 1.5rem;
    align-items: center;
    gap: 10px;
    padding: 3px 0;
    border-top: 1px solid var(--rule);
    font-size: 0.75rem;
    line-height: 1.25;
}

.gb-losses li:first-child {
    border-top: 0;
}

.gb-tier {
    overflow: hidden;
    color: var(--ink-soft);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gb-tier-no {
    margin-right: 6px;
    font-family: var(--mono);
    font-size: 0.65625rem;
    color: var(--muted);
}

.gb-track {
    display: block;
    height: 6px;
    border-bottom: 1px solid var(--rule);
}

.gb-fill {
    display: block;
    height: 100%;
    background: var(--signal);
}

.gb-loss {
    font-family: var(--mono);
    font-size: 0.6875rem;
    text-align: right;
    color: var(--signal);
}

.gb-losses li:nth-child(-n + 3) .gb-loss {
    color: var(--muted);
}

.gb-losses li:nth-child(-n + 3) .gb-track {
    border-bottom-color: transparent;
}

/* Chart type is sized against the aside, not the viewport: one column below
   660px, two equal columns above it. */
.gb-chart {
    --gb-fs: 21px;
    --gb-axis-fs: 19px;
}

@container (min-width: 330px) {
    .gb-chart {
        --gb-fs: 18px;
        --gb-axis-fs: 16px;
    }
}

@container (min-width: 400px) {
    .gb-chart {
        --gb-fs: 15px;
        --gb-axis-fs: 13px;
    }
}

@container (min-width: 480px) {
    .gb-chart {
        --gb-fs: 13px;
        --gb-axis-fs: 11.5px;
    }
}

@container (min-width: 560px) {
    .gb-chart {
        --gb-fs: 11px;
        --gb-axis-fs: 10px;
    }
}

@container (min-width: 600px) {
    .gb-chart {
        --gb-fs: 10px;
        --gb-axis-fs: 9px;
    }
}

@container (min-width: 620px) {
    .gb-chart {
        --gb-fs: 19px;
        --gb-axis-fs: 17px;
    }

    .gb-x-optional {
        display: none;
    }
}

@container (max-width: 419px) {
    .gb-x-optional {
        display: none;
    }
}

@container (max-width: 340px) {
    .gb-losses li {
        grid-template-columns: minmax(0, 1fr) 1.5rem;
        grid-template-areas:
            "tier loss"
            "track track";
        gap: 2px 8px;
        padding: 5px 0;
    }

    .gb-tier {
        grid-area: tier;
    }

    .gb-loss {
        grid-area: loss;
    }

    .gb-track {
        grid-area: track;
    }
}

.project-next {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 24px;
    padding: 20px 0 64px;
    border-top: 1px solid var(--rule);
    font-size: 0.9375rem;
}

.project-next a {
    text-decoration: none;
    border-bottom: 1px solid var(--rule-strong);
    padding-bottom: 1px;
    transition: color 120ms ease, border-color 120ms ease;
}

.project-next a:hover {
    color: var(--signal);
    border-color: var(--signal);
}

@media (max-width: 680px) {
    .project-head {
        display: block;
    }

    .project-head .project-meta {
        margin-top: 24px;
        padding-top: 20px;
        border-top: 1px solid var(--rule);
    }
}

@media (max-width: 720px) {
    .project-head {
        padding: 48px 0 32px;
    }

    .project-head h1 {
        margin-top: 14px;
        font-size: clamp(2.5rem, 12vw, 3.5rem);
    }

    .project-abstract {
        font-size: 1.125rem;
    }

    .project-meta {
        margin-top: 24px;
        gap: 14px 24px;
    }

    .project-section {
        padding: 24px 0;
    }

    .project-section .section-label {
        margin-bottom: 8px;
    }

    .project-next {
        padding-bottom: 56px;
    }
}

@media (max-width: 520px) {
    .examples li {
        grid-template-columns: 1fr;
        gap: 0.15rem;
    }
}

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

.footer {
    padding-bottom: 40px;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--rule);
    font-size: 0.75rem;
    line-height: 1.5;
    color: var(--muted);
}

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

@media (max-width: 900px) {
    :root {
        --gutter: 32px;
    }

    .intro {
        padding: 64px 0 56px;
    }

    .statement {
        grid-column: 1 / span 12;
    }

    .lede {
        grid-column: 1 / span 7;
    }

    .now {
        grid-column: 9 / span 4;
    }

    .index-head,
    .index li {
        grid-template-columns: 2rem minmax(8rem, 1fr) minmax(0, 1.8fr) 7rem 2.5rem;
        column-gap: 1rem;
    }

    .marginal .body {
        grid-column: 4 / span 8;
    }
}

@media (max-width: 720px) {
    :root {
        --gutter: 20px;
    }

    body {
        font-size: 17px;
    }

    .masthead {
        padding-top: 22px;
    }

    .masthead-inner {
        gap: 16px;
    }

    .nav {
        gap: 1.15rem;
        font-size: 0.875rem;
    }

    .role {
        display: none;
    }

    .intro {
        padding: 48px 0;
    }

    .statement {
        font-size: clamp(2rem, 9vw, 2.5rem);
        line-height: 1.1;
        text-wrap: balance;
    }

    .intro-foot {
        margin-top: 28px;
    }

    .lede,
    .now {
        grid-column: 1 / span 12;
    }

    .now {
        margin-top: 24px;
    }

    .section {
        padding-top: 18px;
    }

    .work-section {
        padding-bottom: 40px;
    }

    .section-head {
        margin-bottom: 18px;
    }

    .index-head {
        display: none;
    }

    .index li {
        grid-template-columns: 1.75rem 1fr auto;
        grid-template-areas:
            "num project year"
            "num desc desc"
            "num stack stack";
        column-gap: 0.75rem;
        row-gap: 0.2rem;
        align-items: start;
        padding: 1rem 0;
    }

    .index .num {
        grid-area: num;
    }

    .index .project {
        grid-area: project;
    }

    .index .desc {
        grid-area: desc;
        margin-top: 0.15rem;
    }

    .index .stack {
        grid-area: stack;
        margin-top: 0.1rem;
    }

    .index .year {
        grid-area: year;
    }

    .marginal {
        display: block;
    }

    .marginal .section-label {
        display: block;
        margin-bottom: 14px;
    }

    .lanes > div {
        grid-template-columns: 1fr;
        gap: 2px;
        padding: 12px 0;
    }

    .private-list > div {
        grid-template-columns: 1fr;
        gap: 2px;
        padding: 12px 0;
    }

    .about {
        padding-bottom: 56px;
    }

    .contact {
        padding-bottom: 64px;
    }

    .email {
        font-size: 1.25rem;
    }

    .footer-inner {
        display: block;
    }

    .footer-inner p + p {
        margin-top: 6px;
    }

    .page-head {
        padding: 56px 0 36px;
    }
}

@media (max-width: 380px) {
    .masthead-inner {
        flex-direction: column;
        gap: 10px;
    }

    .nav {
        padding-top: 0;
    }
}

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

    *,
    *::before,
    *::after {
        transition: none !important;
    }
}

@media print {
    :root {
        --paper: #fff;
        --ink: #000;
        --ink-soft: #222;
        --muted: #444;
        --rule: #bbb;
        --rule-strong: #999;
    }

    @page {
        margin: 16mm;
    }

    body {
        font-size: 11pt;
    }

    .wrap {
        width: 100%;
    }

    .nav,
    .skip-link,
    .footer-inner p:last-child {
        display: none;
    }

    .intro {
        padding-top: 24pt;
    }

    .index li {
        break-inside: avoid;
    }

    .arrow {
        display: none;
    }

    a {
        text-decoration: none;
    }
}
