/* ddz.dev: paper, ink, and one signal.
   Plain CSS. Design tokens are custom properties on :root, and dark mode swaps them
   under prefers-color-scheme. Components read tokens only, never raw colours, except
   inside "night" blocks, which stay dark in both modes. */

/* ---------------------------------------------------------------- fonts */

@font-face { font-family: "Instrument Serif"; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/instrument-serif-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Instrument Serif"; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/instrument-serif-latin-ext-400-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Instrument Serif"; font-style: italic; font-weight: 400; font-display: swap; src: url(/fonts/instrument-serif-latin-400-italic.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Instrument Serif"; font-style: italic; font-weight: 400; font-display: swap; src: url(/fonts/instrument-serif-latin-ext-400-italic.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/ibm-plex-sans-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/ibm-plex-sans-latin-ext-400-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "IBM Plex Sans"; font-style: italic; font-weight: 400; font-display: swap; src: url(/fonts/ibm-plex-sans-latin-400-italic.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans"; font-style: italic; font-weight: 400; font-display: swap; src: url(/fonts/ibm-plex-sans-latin-ext-400-italic.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url(/fonts/ibm-plex-sans-latin-500-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url(/fonts/ibm-plex-sans-latin-ext-500-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url(/fonts/ibm-plex-sans-latin-600-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url(/fonts/ibm-plex-sans-latin-ext-600-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/ibm-plex-mono-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/ibm-plex-mono-latin-ext-400-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url(/fonts/ibm-plex-mono-latin-500-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url(/fonts/ibm-plex-mono-latin-ext-500-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* ---------------------------------------------------------------- tokens */

:root {
    color-scheme: light dark;

    --font-serif: "Instrument Serif", Georgia, serif;
    --font-sans: "IBM Plex Sans", system-ui, sans-serif;
    --font-mono: "IBM Plex Mono", ui-monospace, monospace;

    /* paper side */
    --paper: #F3F0E8;
    --paper-2: #EAE6DB;
    --card: #FBFAF6;
    --rule: #D6D0C1;
    --rule-strong: #B8B1A0;
    --line: #15140F;            /* the heavy hairline that opens a list */
    --muted: #6A665A;
    --faint: #8A8577;           /* placeholders, photo credits */
    --graphite: #3A382F;
    --body: #26241E;
    --ink: #15140F;
    --signal: #C2410C;
    --code-bg: #E6E1D5;
    --hatch-a: #DCD6C8;
    --hatch-b: #E3DED2;
    --hatch-border: #CFC8B8;

    --btn-bg: var(--ink);
    --btn-fg: var(--paper);

    /* night blocks: dark in both modes, one step lighter in dark mode */
    --night: #121210;
    --night-surface: #1C1B18;
    --night-text: #ECE8DD;
    --night-graphite: #B5B0A3;
    --night-muted: #9C978A;
    --night-dim: #6F6B60;
    --night-rule: #2A2925;
    --night-rule-strong: #3A382F;
    --phosphor: #E3A842;

    /* syntax, on night */
    --syn-keyword: #E3A842;
    --syn-function: #9CC5A1;
    --syn-comment: #8F8A7C;
    --syn-text: #ECE8DD;

    --webkeeper: #2F55E8;
    --cursor: #C2410C;          /* wordmark cursor keeps the paper-side signal, even on night */

    /* layout */
    --gutter: 24px;
    --margin: 80px;
    --content: 1280px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --paper: #121210;
        --paper-2: #1A1916;
        --card: #1C1B18;
        --rule: #2A2925;
        --rule-strong: #4A473F;
        --line: #4A473F;
        --muted: #9C978A;
        --faint: #6F6B60;
        --graphite: #B5B0A3;
        --body: #D9D4C7;
        --ink: #ECE8DD;
        --signal: #E3A842;
        --code-bg: #23221E;
        --hatch-a: #2A2925;
        --hatch-b: #1C1B18;
        --hatch-border: #3A382F;

        --btn-bg: var(--signal);
        --btn-fg: #121210;
        --cursor: #E3A842;

        --night: #1C1B18;
        --night-surface: #23221E;
    }
}

@media (max-width: 1100px) {
    :root { --margin: 40px; }
}

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

/* ---------------------------------------------------------------- base */

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

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-padding-top: 24px;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

main { flex-grow: 1; }

[hidden] { display: none !important; }

h1, h2, h3, h4, p, blockquote, figure, ol, ul, pre { margin: 0; }

a { color: inherit; text-decoration: none; }
a:hover { opacity: .8; }

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }

button, input, textarea, select { font: inherit; color: inherit; }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.night :focus-visible { outline-color: var(--night-text); }

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

.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.skip-link {
    position: absolute;
    left: 16px; top: -100px;
    z-index: 10;
    padding: 10px 16px;
    background: var(--btn-bg);
    color: var(--btn-fg);
}
.skip-link:focus { top: 16px; }

@media (prefers-reduced-motion: no-preference) {
    html { scroll-behavior: smooth; }
}

/* ---------------------------------------------------------------- type helpers */

.serif { font-family: var(--font-serif); font-weight: 400; }
.mono { font-family: var(--font-mono); }
.serif em, em.accent { font-style: italic; color: var(--signal); }

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

.label {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--muted);
}

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

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

.wrap {
    width: 100%;
    max-width: calc(var(--content) + 2 * var(--margin));
    margin-inline: auto;
    padding-inline: var(--margin);
}

.grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--gutter);
}

/* common column placements */
.col-head { grid-column: span 4; }
.col-main { grid-column: 6 / span 7; }
.col-head { align-self: start; }

@media (max-width: 900px) {
    .grid { grid-template-columns: minmax(0, 1fr); row-gap: 32px; }
    .grid > * { grid-column: 1 / -1 !important; }
}

.section { padding-block: 120px 112px; }
@media (max-width: 720px) {
    .section { padding-block: 64px 48px; }
}

.section-head {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.section-title {
    font-family: var(--font-serif);
    font-weight: 400;
    font-size: clamp(38px, 4.2vw, 56px);
    line-height: 1;
    letter-spacing: -.015em;
}

.section-head--split {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-end;
    gap: 32px;
}
@media (max-width: 720px) {
    .section-head--split { flex-direction: column; align-items: flex-start; }
}

.hairline-top { border-top: 1px solid var(--rule); }

/* ---------------------------------------------------------------- buttons and links */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    height: 52px;
    padding: 0 24px;
    border: 0;
    border-radius: 2px;
    background: var(--btn-bg);
    color: var(--btn-fg);
    font-size: 16px;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
}
.btn .arrow { font-family: var(--font-mono); }
.btn--lg { height: 56px; padding: 0 28px; font-size: 17px; }
.btn--sm { height: 44px; padding: 0 20px; font-size: 15px; gap: 10px; }

/* the "On night" button: amber with night text, in both modes */
.btn--phosphor { background: var(--phosphor); color: #121210; font-weight: 600; }

.text-link {
    display: inline-block;
    font-weight: 500;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--signal);
}

.tag {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border: 1px solid var(--rule-strong);
    border-radius: 2px;
    font-family: var(--font-mono);
    font-size: 12px;
}

/* ---------------------------------------------------------------- wordmark */

.wordmark {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-family: var(--font-mono);
    font-size: 20px;
    line-height: 1;
}
.wordmark b { font-weight: 500; letter-spacing: -.02em; }
.wordmark span { color: var(--muted); }
.wordmark i {
    width: .5em;
    height: 1em;
    margin-left: 4px;
    background: var(--cursor);
}
.wordmark--sm { font-size: 15px; }
.wordmark--sm i { margin-left: 3px; }

/* ---------------------------------------------------------------- header */

.site-header {
    border-bottom: 1px solid var(--rule);
}

.site-header .wrap {
    height: 88px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 36px;
    font-size: 15px;
}
.site-nav ul {
    display: flex;
    gap: 36px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.site-nav [aria-current] {
    padding-bottom: 2px;
    border-bottom: 1px solid var(--signal);
}

.menu { display: none; position: relative; }

.menu summary {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--rule);
    border-radius: 2px;
    cursor: pointer;
    list-style: none;
}
.menu summary::-webkit-details-marker { display: none; }
.menu summary svg { stroke: var(--ink); }
.menu .when-open { display: none; }
.menu[open] .when-open { display: block; }
.menu[open] .when-closed { display: none; }

/* Full-screen sheet. It sits at z-index -1 inside the pinned header's stacking
   context, so the wordmark and the close button paint on top of it. */
.menu-panel {
    position: fixed;
    inset: 0;
    z-index: -1;
    display: flex;
    flex-direction: column;
    padding: 64px var(--margin) calc(24px + env(safe-area-inset-bottom));
    overflow-y: auto;
    background: var(--paper);
}
.menu-panel ul { margin: 0 0 32px; padding: 0; list-style: none; border-top: 1px solid var(--rule); }
.menu-panel li a {
    display: block;
    padding: 18px 0;
    border-bottom: 1px solid var(--rule);
    font-family: var(--font-serif);
    font-size: 34px;
    line-height: 1.1;
}
.menu-panel [aria-current] { color: var(--signal); }
.menu-panel .btn { width: 100%; margin-top: auto; }


@media (max-width: 900px) {
    .site-header .wrap { height: 64px; }
    .site-nav { display: none; }
    .menu { display: block; }
    .site-header .wordmark { font-size: 18px; }

    /* menu open: pin the header over the sheet and freeze the page behind it */
    .site-header:has(.menu[open]) { position: fixed; top: 0; left: 0; right: 0; z-index: 30; }
    body:has(.menu[open]) { padding-top: 64px; }
    html:has(.menu[open]) { overflow: hidden; }
}

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

.site-footer {
    font-size: 13px;
    color: var(--muted);
}
.site-footer .wrap { padding-top: 96px; padding-bottom: 40px; }
.footer-inner {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px 32px;
    flex-wrap: wrap;
    padding-top: 28px;
    border-top: 1px solid var(--rule);
}

.footer-id { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 20px; }
.footer-id .wordmark b { color: var(--ink); }

.webkeeper-link { display: inline-flex; align-items: center; gap: 8px; }
.webkeeper-link img { flex-shrink: 0; }
.webkeeper-link strong { color: var(--ink); font-weight: 500; }

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 24px;
    margin: 0;
    padding: 0;
    list-style: none;
    font-family: var(--font-mono);
    font-size: 12px;
}

/* footer "Cookies" control: a button that looks like the links next to it */
.link-button {
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    cursor: pointer;
}

/* night footer: continues a night block above it (home contact, writing CTA) */
.site-footer.night { background: var(--night); color: var(--night-muted); }
.site-footer.night .wrap { padding-top: 0; padding-bottom: 48px; }
.site-footer.night .footer-inner { border-top-color: var(--night-rule); }
.site-footer.night .wordmark b,
.site-footer.night .webkeeper-link strong { color: var(--night-text); }
.site-footer.night .wordmark span { color: var(--night-muted); }

@media (max-width: 720px) {
    .footer-inner { flex-direction: column; align-items: flex-start; gap: 10px; padding-top: 20px; font-size: 12px; }
    .site-footer .wrap { padding-top: 56px; padding-bottom: 32px; }
    .site-footer.night .wrap { padding-bottom: 32px; }
    .footer-links { gap: 12px 18px; }
}

/* ---------------------------------------------------------------- night blocks */

.night {
    background: var(--night);
    color: var(--night-text);
    --signal: var(--phosphor);
    --muted: var(--night-muted);
    --rule: var(--night-rule);
}
.night .eyebrow { color: var(--phosphor); }
.night h2 em, .night .serif em { font-style: italic; color: var(--night-muted); }

/* ---------------------------------------------------------------- forms */

.form { display: flex; flex-direction: column; gap: 20px; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 16px; row-gap: 20px; }
@media (max-width: 720px) {
    .form-row { grid-template-columns: minmax(0, 1fr); }
}

.field { display: flex; flex-direction: column; gap: 8px; }
.field > span {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--muted);
}
.field input,
.field textarea {
    width: 100%;
    padding: 0 14px;
    background: var(--card);
    border: 1px solid var(--rule-strong);
    border-radius: 2px;
    color: var(--ink);
}
.field input { height: 48px; }
.field textarea { padding: 14px; font-size: 15px; resize: vertical; min-height: 140px; }
.field ::placeholder { color: var(--faint); }

.night .field input,
.night .field textarea {
    background: var(--night-surface);
    border-color: var(--night-rule-strong);
    color: var(--night-text);
}
.night .field ::placeholder { color: var(--night-dim); }

.form-actions { display: flex; align-items: center; gap: 16px 24px; flex-wrap: wrap; }
.form-actions .alt {
    font-size: 15px;
    padding-bottom: 3px;
    border-bottom: 1px solid var(--rule-strong);
}
.night .form-actions .alt { border-bottom-color: var(--night-dim); }

/* ---------------------------------------------------------------- home: hero */

.hero { padding-block: 104px 96px; align-items: end; }

.hero-copy {
    grid-column: span 7;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.kicker {
    font-family: var(--font-mono);
    font-size: 13px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--muted);
}

.hero h1 {
    font-family: var(--font-serif);
    font-weight: 400;
    font-size: clamp(52px, 7.2vw, 104px);
    line-height: .96;
    letter-spacing: -.025em;
}

.lede {
    max-width: 600px;
    font-size: 21px;
    line-height: 1.5;
    color: var(--graphite);
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 16px 28px;
    flex-wrap: wrap;
    margin-top: 8px;
}
.hero-actions .text-link { font-size: 17px; }

.case-file {
    grid-column: 9 / span 4;
    background: var(--night);
    color: var(--night-text);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 1px 0 var(--rule), 0 30px 60px -30px rgba(21, 20, 15, .45);
}
.case-file-head {
    height: 40px;
    padding: 0 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: .06em;
    color: var(--night-muted);
    border-bottom: 1px solid var(--night-rule);
}
.case-file-body { padding: 24px 22px 22px; display: flex; flex-direction: column; gap: 20px; }
.case-file-title { font-family: var(--font-serif); font-size: 28px; line-height: 1.12; }
.case-file pre {
    padding: 14px;
    background: var(--night-surface);
    border-radius: 3px;
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 1.6;
    white-space: pre-wrap;
    color: var(--syn-text);
}
.case-file-link {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--night-rule);
}

@media (prefers-color-scheme: dark) {
    .case-file {
        border: 1px solid #3A382F;
        border-top: 2px solid var(--signal);
        box-shadow: 0 0 0 6px #121210, 0 40px 80px -30px rgba(0, 0, 0, .9), 0 0 120px -20px rgba(227, 168, 66, .10);
    }
}

@media (max-width: 900px) {
    .hero { padding-block: 48px 40px; }
    .hero-copy { gap: 22px; }
    .kicker { font-size: 11px; }
    .lede { font-size: 17px; line-height: 1.55; }
    .hero-actions { flex-direction: column; align-items: stretch; }
    .hero-actions .text-link { align-self: center; font-size: 15px; }
    .case-file-title { font-size: 25px; }
    .case-file pre { display: none; }
}

/* before / after bars, drawn to true scale */
.bars { display: flex; flex-direction: column; gap: 12px; }
.bar { display: flex; flex-direction: column; gap: 6px; }
.bar-label {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--muted);
}
.bar-track { height: 8px; display: flex; }
.bar-fill { height: 100%; border-radius: 1px; background: var(--ink); }
.bar--after .bar-label { color: var(--signal); }
.bar--after .bar-fill { background: var(--signal); min-width: 2px; }

.case-file .bar-label { color: var(--night-muted); }
.case-file .bar-fill { background: var(--night-rule-strong); }
.case-file .bar--after .bar-label { color: var(--phosphor); }
.case-file .bar--after .bar-fill { background: var(--phosphor); }

/* ---------------------------------------------------------------- home: stack strip */

.stack .label { white-space: nowrap; }
.stack {
    height: 72px;
    display: flex;
    align-items: center;
    gap: 32px;
    border-block: 1px solid var(--rule);
    overflow: hidden;
}
.stack ul {
    display: flex;
    gap: 18px;
    margin: 0;
    padding: 0;
    list-style: none;
    font-family: var(--font-mono);
    font-size: 13px;
    letter-spacing: .02em;
    color: var(--graphite);
    white-space: nowrap;
}
.stack li + li::before { content: "/"; color: var(--rule-strong); margin-right: 18px; }
@media (max-width: 720px) {
    .stack { height: auto; padding-block: 16px; flex-direction: column; align-items: flex-start; gap: 10px; }
    .stack ul { flex-wrap: wrap; white-space: normal; row-gap: 6px; }
}

/* ---------------------------------------------------------------- home: problems */

.problems-head { grid-column: span 4; }
.problems-head p { font-size: 17px; line-height: 1.55; color: var(--muted); max-width: 340px; }

.problems {
    grid-column: 6 / span 7;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 40px;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: problem;
}
.problems li {
    display: flex;
    gap: 20px;
    padding: 22px 0 26px;
    border-top: 1px solid var(--rule);
    font-size: 21px;
    line-height: 1.35;
    counter-increment: problem;
}
.problems li::before {
    content: counter(problem, decimal-leading-zero);
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--signal);
    padding-top: 5px;
}
.problems li:nth-child(-n+2) { border-top-color: var(--line); }
.problems li:nth-last-child(-n+2) { border-bottom: 1px solid var(--rule); }

@media (max-width: 900px) {
    .problems { grid-template-columns: minmax(0, 1fr); border-top: 1px solid var(--line); }
    .problems li { padding: 16px 0; font-size: 17px; line-height: 1.4; gap: 14px; border-top: 0; border-bottom: 1px solid var(--rule); }
    .problems li:nth-last-child(-n+2) { border-bottom: 1px solid var(--rule); }
    .problems li::before { font-size: 12px; padding-top: 4px; }
}

/* ---------------------------------------------------------------- home: recent work (night) */

.work { padding-block: 112px 120px; display: flex; flex-direction: column; gap: 56px; }
.work .section-title { font-size: clamp(38px, 4.8vw, 64px); }
.work-intro { max-width: 380px; font-size: 16px; line-height: 1.6; color: var(--night-muted); }

.work-table { width: 100%; border-collapse: collapse; }
.work-table th {
    padding: 0 0 14px;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 400;
    letter-spacing: .1em;
    text-align: left;
    color: var(--night-dim);
    border-bottom: 1px solid var(--night-rule-strong);
}
.work-table td {
    padding: 26px 24px 26px 0;
    border-bottom: 1px solid var(--night-rule);
    vertical-align: baseline;
}
.work-table .no { width: 88px; font-family: var(--font-mono); font-size: 13px; color: var(--night-dim); }
.work-table .symptom { font-family: var(--font-serif); font-size: 28px; line-height: 1.15; width: 44%; }
.work-table .cause { font-size: 16px; line-height: 1.55; color: var(--night-graphite); }
.work-table .area { width: 160px; padding-right: 0; font-family: var(--font-mono); font-size: 12px; color: var(--phosphor); text-align: right; }
.work-table th:last-child { text-align: right; }

@media (max-width: 900px) {
    .work { padding-block: 56px; gap: 20px; }
    .work-intro { font-size: 15px; }
    .work-table thead { display: none; }
    .work-table, .work-table tbody, .work-table tr, .work-table td { display: block; width: auto; }
    .work-table tr {
        display: flex;
        flex-direction: column;
        gap: 6px;
        padding: 18px 0;
        border-top: 1px solid var(--night-rule);
    }
    .work-table tr:last-child { border-bottom: 1px solid var(--night-rule); }
    .work-table td { padding: 0; border: 0; text-align: left; }
    .work-table .no { display: none; }
    .work-table .area { order: -1; font-size: 10px; text-align: left; }
    .work-table .symptom { font-size: 22px; }
    .work-table .cause { font-size: 14px; line-height: 1.5; }
}

/* ---------------------------------------------------------------- home: engagements */

.engagements { display: flex; flex-direction: column; gap: 48px; }

.flagship {
    background: var(--paper-2);
    border: 1px solid var(--rule);
    border-radius: 4px;
    padding: 48px;
    row-gap: 32px;
}
.flagship-copy { grid-column: span 5; display: flex; flex-direction: column; gap: 20px; }
.flagship-copy h3 { font-family: var(--font-serif); font-weight: 400; font-size: clamp(36px, 3.4vw, 48px); line-height: 1; }
.flagship-copy p { font-size: 17px; line-height: 1.6; color: var(--graphite); }
.flagship-copy .btn { align-self: flex-start; margin-top: 8px; }

.phases-wrap { grid-column: 7 / span 6; display: flex; flex-direction: column; justify-content: center; }
.phases {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0;
    padding: 0;
    list-style: none;
}
.phases li {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 20px 20px 24px;
    border-left: 2px solid var(--rule-strong);
}
.phases li:first-child { border-left-color: var(--signal); }
.phases .phase-no { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.phases li:first-child .phase-no { color: var(--signal); }
.phases .phase-name { font-size: 18px; font-weight: 500; }
.phases .phase-desc { font-size: 14px; line-height: 1.5; color: var(--muted); }

.phases-note {
    margin-top: 20px;
    padding: 14px 18px;
    background: var(--paper);
    border: 1px dashed var(--rule-strong);
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.5;
    color: var(--graphite);
}

.offers {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 40px var(--gutter);
}
.offers--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.offer {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding-top: 28px;
    border-top: 1px solid var(--line);
}
.offer svg { stroke: var(--signal); }
.offer h3 { font-size: 22px; font-weight: 500; }
.offer p { font-size: 16px; line-height: 1.55; color: var(--graphite); }
.offer .meta { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }

@media (max-width: 1100px) {
    .offers, .offers--three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
    .flagship { padding: 24px 20px; }
    .phases { grid-template-columns: minmax(0, 1fr); }
    .phases li { padding: 12px 16px 14px; }
    .offers, .offers--three { grid-template-columns: minmax(0, 1fr); gap: 32px; }
}

/* ---------------------------------------------------------------- home: process + bench */

.process { padding-block: 96px; }
.process-head { grid-column: span 4; }
.process-body { grid-column: 6 / span 7; display: flex; flex-direction: column; gap: 48px; }

.steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 32px;
    row-gap: 32px;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: step;
}
.steps li { display: flex; flex-direction: column; gap: 12px; counter-increment: step; }
.steps li::before {
    content: counter(step);
    font-family: var(--font-serif);
    font-size: 64px;
    line-height: .9;
    color: var(--signal);
}
.steps strong { font-size: 18px; font-weight: 500; }
.steps span { font-size: 15px; line-height: 1.55; color: var(--muted); }

.bench {
    padding: 32px;
    background: var(--paper-2);
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.bench h3 { font-size: 18px; font-weight: 500; }
.bench p { font-size: 16px; line-height: 1.6; color: var(--graphite); }
.bench ul { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }

@media (max-width: 720px) {
    .process { padding-block: 64px; }
    .steps { grid-template-columns: minmax(0, 1fr); }
    .steps li::before { font-size: 48px; }
    .bench { padding: 24px 20px; }
}

/* ---------------------------------------------------------------- home: philosophy */

.philosophy { background: var(--paper-2); padding-block: 112px; }
.philosophy .grid { align-items: center; }

.portrait {
    grid-column: span 3;
    aspect-ratio: 4 / 5;
    background: repeating-linear-gradient(135deg, var(--hatch-a) 0 1px, var(--hatch-b) 1px 10px);
    border: 1px solid var(--hatch-border);
    overflow: hidden;
}

/* the real photo, mounted like a print: paper mat, hairline, soft shadow, mono label */
.portrait--photo {
    aspect-ratio: auto;
    margin: 0;
    padding: 12px 12px 0;
    background: var(--card);
    border: 1px solid var(--rule);
    border-radius: 2px;
    box-shadow: 0 1px 0 var(--rule), 0 30px 60px -30px rgba(21, 20, 15, .35);
    overflow: visible;
}
.portrait--photo picture { display: contents; }
.portrait--photo img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border: 1px solid var(--rule);
}
.portrait--photo figcaption {
    padding: 12px 2px 14px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: .06em;
    color: var(--muted);
}
@media (prefers-color-scheme: dark) {
    .portrait--photo { box-shadow: 0 0 0 6px var(--paper-2), 0 40px 80px -30px rgba(0, 0, 0, .9); }
}

.philosophy-copy { grid-column: 5 / span 8; display: flex; flex-direction: column; gap: 28px; }
.philosophy blockquote {
    font-family: var(--font-serif);
    font-size: clamp(38px, 4.8vw, 64px);
    line-height: 1.02;
    letter-spacing: -.015em;
}
.philosophy p { max-width: 640px; font-size: 17px; line-height: 1.6; color: var(--graphite); }
.facts {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 28px;
    margin: 0;
    padding: 0;
    list-style: none;
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: .04em;
    color: var(--muted);
}
.facts a { color: var(--ink); border-bottom: 1px solid var(--signal); }

@media (max-width: 900px) {
    .philosophy { padding-block: 64px; }
    .portrait { max-width: 240px; }
}

/* ---------------------------------------------------------------- post lists */

.post-rows { border-top: 1px solid var(--line); }
.post-row {
    display: grid;
    grid-template-columns: 140px 160px minmax(0, 1fr) 40px;
    column-gap: var(--gutter);
    align-items: baseline;
    padding: 26px 0;
    border-bottom: 1px solid var(--rule);
}
.post-row .date { font-family: var(--font-mono); font-size: 13px; color: var(--muted); }
.post-row .topic { font-family: var(--font-mono); font-size: 12px; color: var(--signal); text-transform: uppercase; }
.post-row .title { font-family: var(--font-serif); font-size: 30px; line-height: 1.15; }
.post-row .go { font-family: var(--font-mono); font-size: 18px; text-align: right; }

@media (max-width: 900px) {
    .post-row { display: flex; flex-wrap: wrap; gap: 8px 6px; padding: 18px 0; }
    .post-row .date, .post-row .topic { font-size: 11px; }
    .post-row .date::after { content: " ·"; }
    .post-row .title { flex-basis: 100%; font-size: 23px; }
    .post-row .go { display: none; }
}

/* ---------------------------------------------------------------- pet projects */

.projects { padding-block: 80px 112px; }
.projects-head { grid-column: span 4; }
.projects-head .section-title { font-size: clamp(38px, 3.4vw, 48px); }
.projects-head p { font-size: 16px; line-height: 1.55; color: var(--muted); max-width: 320px; }

.project-grid {
    grid-column: 5 / span 8;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--gutter);
}

.card {
    padding: 24px;
    background: var(--card);
    border: 1px solid var(--rule);
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.card-head strong { font-size: 20px; font-weight: 600; }
.card-head span { font-family: var(--font-mono); font-size: 11px; color: var(--muted); text-transform: uppercase; }
.card p { font-size: 15px; line-height: 1.5; color: var(--graphite); }

.webkeeper-card {
    grid-column: 1 / -1;
    padding: 32px;
    flex-direction: row;
    align-items: center;
    gap: 32px;
}
.webkeeper-card img { flex-shrink: 0; }
.webkeeper-card-copy { flex-grow: 1; display: flex; flex-direction: column; gap: 8px; }
.webkeeper-card-copy .card-head { justify-content: flex-start; gap: 14px; }
.webkeeper-card-copy .card-head strong { font-size: 26px; }
.webkeeper-card-copy p { font-size: 16px; line-height: 1.55; }
.webkeeper-card .btn { flex-shrink: 0; height: 48px; padding: 0 20px; font-size: 15px; }

@media (max-width: 1100px) {
    .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
    .projects { padding-block: 0 56px; }
    .project-grid { grid-template-columns: minmax(0, 1fr); }
    .webkeeper-card { flex-direction: column; align-items: stretch; gap: 12px; padding: 22px; }
    .webkeeper-card img { width: 40px; height: 25px; }
    .webkeeper-card-copy .card-head { flex-direction: column; gap: 12px; }
    .webkeeper-card-copy .card-head strong { font-size: 22px; }
}

/* ---------------------------------------------------------------- contact (night) */

.contact { padding-block: 112px 96px; }
.contact-copy { grid-column: span 6; display: flex; flex-direction: column; gap: 24px; }
.contact-copy h2 {
    font-family: var(--font-serif);
    font-weight: 400;
    font-size: clamp(44px, 5.6vw, 80px);
    line-height: .98;
    letter-spacing: -.02em;
}
.contact-copy p { max-width: 460px; font-size: 18px; line-height: 1.55; color: var(--night-graphite); }
.contact .form { grid-column: 8 / span 5; }

@media (max-width: 900px) {
    .contact { padding-block: 56px 48px; }
    .contact-copy { gap: 20px; }
    .contact .form .btn { width: 100%; }
}

/* CTA band before a night footer */
.cta-band { padding-block: 80px 64px; }
.cta-band--spaced { margin-top: 96px; }
.cta-band .wrap { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px 48px; }
.cta-band h2 {
    max-width: 820px;
    font-family: var(--font-serif);
    font-weight: 400;
    font-size: clamp(38px, 4.8vw, 64px);
    line-height: 1;
    letter-spacing: -.015em;
}
@media (max-width: 900px) {
    .cta-band { padding-block: 48px 40px; }
    .cta-band--spaced { margin-top: 56px; }
    .cta-band .wrap { flex-direction: column; align-items: stretch; gap: 20px; }
}

/* ---------------------------------------------------------------- page header (inner pages) */

.page-head { padding-block: 96px 72px; align-items: end; }
.page-head-title { grid-column: span 8; display: flex; flex-direction: column; gap: 24px; }
.page-head h1 {
    font-family: var(--font-serif);
    font-weight: 400;
    font-size: clamp(52px, 7.8vw, 112px);
    line-height: .92;
    letter-spacing: -.025em;
}
.page-head--long h1 { font-size: clamp(44px, 5.6vw, 80px); line-height: 1; letter-spacing: -.02em; }
.page-head-aside { grid-column: 9 / span 4; display: flex; flex-direction: column; gap: 20px; padding-bottom: 10px; }
.page-head-aside p { font-size: 18px; line-height: 1.55; color: var(--graphite); }

.meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: .04em;
    color: var(--muted);
}
.meta-line .sep { color: var(--rule-strong); }
.meta-line a { color: var(--ink); border-bottom: 1px solid var(--signal); }

@media (max-width: 900px) {
    .page-head { padding-block: 44px 28px; row-gap: 18px; }
    .page-head-title { gap: 18px; }
    .page-head-aside { gap: 18px; padding-bottom: 0; }
    .page-head-aside p { font-size: 16px; }
    .meta-line { gap: 8px 14px; font-size: 11px; }
    .meta-line .sep { display: none; }
}

/* ---------------------------------------------------------------- writing: latest */

.latest { padding-top: 32px; border-top: 1px solid var(--line); }
.latest-media { grid-column: span 7; position: relative; display: block; }
.latest-media img {
    width: 100%;
    height: 440px;
    object-fit: cover;
    border-radius: 2px;
    filter: grayscale(.2) contrast(1.02);
}
.latest-media .badge {
    position: absolute;
    left: 16px;
    top: 16px;
    padding: 6px 10px;
    background: var(--btn-bg);
    color: var(--btn-fg);
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: .1em;
}
.latest-copy { grid-column: 8 / span 5; display: flex; flex-direction: column; gap: 20px; padding: 8px 0 0 16px; }
.latest-copy .meta { font-family: var(--font-mono); font-size: 12px; color: var(--muted); text-transform: uppercase; }
.latest-copy .meta em { font-style: normal; color: var(--signal); }
.latest-copy h2 { font-family: var(--font-serif); font-weight: 400; font-size: clamp(34px, 3.2vw, 46px); line-height: 1.02; letter-spacing: -.01em; }
.latest-copy p { font-size: 17px; line-height: 1.55; color: var(--graphite); }
.latest-copy .text-link { align-self: flex-start; }
.latest-copy .bars { padding: 18px 0; border-block: 1px solid var(--rule); gap: 8px; }
.latest-copy .bar-track { height: 6px; }

@media (max-width: 900px) {
    .latest-media img { height: 240px; }
    .latest-copy { padding: 0; }
}
/* the phone artboard goes straight from the header to the filter bar */
@media (max-width: 720px) {
    .latest { display: none; }
}

/* ---------------------------------------------------------------- writing: filter bar */

.filter-bar {
    margin-top: 96px;
    padding: 20px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--rule);
    display: flex;
    align-items: center;
    gap: 24px;
}
.search { position: relative; display: flex; align-items: center; flex-shrink: 0; }
.search svg { position: absolute; left: 14px; stroke: var(--muted); pointer-events: none; }
.search input {
    width: 280px;
    height: 44px;
    padding: 0 14px 0 40px;
    background: var(--card);
    border: 1px solid var(--rule-strong);
    border-radius: 2px;
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--ink);
}
.search input::placeholder { color: var(--faint); }
.search input::-webkit-search-cancel-button { filter: grayscale(1); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0; padding: 0; list-style: none; }
.chip {
    height: 36px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    color: var(--ink);
    border: 1px solid var(--rule-strong);
    border-radius: 2px;
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: .04em;
    text-transform: uppercase;
    white-space: nowrap;
    cursor: pointer;
}
.chip span { color: var(--muted); }
.chip[aria-pressed="true"],
.chip[aria-current] { background: var(--btn-bg); color: var(--btn-fg); border-color: var(--btn-bg); }
.chip[aria-pressed="true"] span,
.chip[aria-current] span { color: var(--phosphor); }
@media (prefers-color-scheme: dark) {
    .chip[aria-pressed="true"] span,
    .chip[aria-current] span { color: #121210; opacity: .7; }
}
.chip-more {
    padding: 0 4px;
    background: none;
    border: 0;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--muted);
    cursor: pointer;
}
.chip-more:hover { color: var(--ink); }
.chips .is-extra[hidden] { display: none; }

@media (max-width: 900px) {
    .filter-bar {
        margin-top: 56px;
        margin-inline: calc(-1 * var(--margin));
        padding: 16px 0 16px var(--margin);
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    .search { margin-right: var(--margin); }
    .search input { width: 100%; }
    .chips { flex-wrap: nowrap; overflow-x: auto; padding-right: var(--margin); scrollbar-width: none; }
    .chip { flex-shrink: 0; height: 44px; }
}

/* ---------------------------------------------------------------- writing: archive */

.archive-year { padding-top: 48px; }
.archive-year-label { grid-column: span 2; display: flex; flex-direction: column; gap: 6px; }
.archive-year-label .serif { font-size: 72px; line-height: .9; letter-spacing: -.02em; }
.archive-year-label .mono { font-size: 12px; color: var(--muted); }
.archive-rows { grid-column: 3 / span 10; margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }

.archive-row a {
    display: grid;
    grid-template-columns: 56px 36px minmax(0, 1fr) 200px 24px;
    column-gap: 20px;
    align-items: baseline;
    padding: 20px 8px;
    border-bottom: 1px solid var(--rule);
}
.archive-row a:hover { background: var(--paper-2); opacity: 1; }
.archive-row .month { font-family: var(--font-mono); font-size: 12px; letter-spacing: .06em; color: var(--signal); }
.archive-row .day { font-family: var(--font-mono); font-size: 13px; color: var(--muted); }
.archive-row .title { font-family: var(--font-serif); font-size: 28px; line-height: 1.15; }
.archive-row .tags { font-family: var(--font-mono); font-size: 11px; letter-spacing: .04em; color: var(--muted); text-align: right; text-transform: uppercase; }
.archive-row .go { font-family: var(--font-mono); font-size: 16px; text-align: right; }
.archive-row .m-date { display: none; }

.archive-note { padding-top: 48px; }
.archive-note > * { grid-column: 3 / span 10; }
.archive-note .mono { font-size: 14px; color: var(--graphite); }
.archive-empty { padding: 24px; border: 1px dashed var(--rule-strong); font-family: var(--font-mono); font-size: 14px; line-height: 1.5; color: var(--graphite); }
.archive-empty a { border-bottom: 1px solid var(--signal); }

.older {
    width: 100%;
    height: 72px;
    padding: 0 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: transparent;
    border: 1px solid var(--line);
    border-radius: 2px;
    color: var(--ink);
    cursor: pointer;
}
.older .serif { font-size: 30px; }
.older .mono { font-size: 12px; letter-spacing: .06em; color: var(--muted); text-align: right; }
.older .mono b { font-weight: 400; color: var(--signal); font-size: 16px; padding-left: 8px; }

@media (max-width: 900px) {
    .archive-year { padding-top: 32px; }
    .archive-year-label {
        flex-direction: row;
        justify-content: space-between;
        align-items: baseline;
        padding-bottom: 10px;
        border-bottom: 1px solid var(--line);
    }
    .archive-year-label .serif { font-size: 44px; line-height: 1; }
    .archive-year-label .mono { font-size: 11px; }
    .archive-year.grid { row-gap: 0; }
    .archive-rows { border-top: 0; }
    .archive-row a { display: flex; flex-direction: column; gap: 6px; padding: 16px 0; }
    .archive-row .month, .archive-row .day, .archive-row .tags, .archive-row .go { display: none; }
    .archive-row .m-date { display: block; order: -1; font-family: var(--font-mono); font-size: 11px; color: var(--muted); text-transform: uppercase; }
    .archive-row .m-date span { color: var(--signal); }
    .archive-row .title { font-size: 22px; }
    .archive-note { padding-top: 32px; }
    .older { height: 64px; padding: 0 18px; }
    .older .serif { font-size: 24px; }
    .older .mono { font-size: 11px; }
    .older .when { display: none; }
}

/* ---------------------------------------------------------------- writing: subscribe */

.subscribe {
    margin-top: 96px;
    padding: 36px 40px;
    background: var(--paper-2);
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px 40px;
}
.subscribe-copy { display: flex; flex-direction: column; gap: 8px; }
.subscribe-copy .serif { font-size: 36px; line-height: 1.05; }
.subscribe-copy span:last-child { font-size: 15px; color: var(--graphite); }
.subscribe-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; font-family: var(--font-mono); }
.subscribe-actions code {
    height: 48px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    background: var(--card);
    border: 1px solid var(--rule-strong);
    border-radius: 2px;
    font-size: 13px;
    color: var(--graphite);
}
.subscribe-actions .btn { height: 48px; padding: 0 20px; font-family: var(--font-mono); font-size: 13px; }

@media (max-width: 900px) {
    .subscribe { margin-top: 56px; padding: 24px 20px; flex-direction: column; align-items: stretch; }
    .subscribe-copy .serif { font-size: 28px; }
    .subscribe-actions code { flex-grow: 1; min-width: 0; overflow: hidden; }
}

/* ---------------------------------------------------------------- article: header */

.article-head {
    position: relative;
    overflow: hidden;
    padding-block: 88px 72px;
    border-bottom: 1px solid var(--rule);
}
.article-photo {
    position: absolute;
    inset: 0 0 0 auto;
    width: min(860px, 60%);
    pointer-events: none;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 55%), linear-gradient(to bottom, #000 60%, transparent 100%);
    -webkit-mask-composite: source-in;
    mask-image: linear-gradient(to right, transparent 0%, #000 55%), linear-gradient(to bottom, #000 60%, transparent 100%);
    mask-composite: intersect;
}
.article-photo picture, .article-photo img { width: 100%; height: 100%; }
.article-photo img {
    object-fit: cover;
    object-position: center;
    filter: grayscale(1) contrast(1.1);
    opacity: .16;
    mix-blend-mode: multiply;
}
@media (prefers-color-scheme: dark) {
    .article-photo img {
        filter: grayscale(1) contrast(1.15) brightness(.75);
        opacity: .3;
        mix-blend-mode: normal;
    }
}
.photo-credit {
    position: absolute;
    right: var(--margin);
    bottom: 20px;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--faint);
}
.photo-credit a:hover { color: var(--ink); }

.article-head-copy { position: relative; grid-column: 3 / span 9; display: flex; flex-direction: column; gap: 28px; }

.crumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--muted);
}
.crumbs li + li::before { content: "/"; color: var(--rule-strong); margin-right: 10px; }
.crumbs li + li a { color: var(--signal); }

.article-head h1 {
    font-family: var(--font-serif);
    font-weight: 400;
    font-size: clamp(42px, 5.6vw, 80px);
    line-height: 1;
    letter-spacing: -.02em;
}
.article-head h1 em { font-style: italic; color: var(--signal); }
.article-head .dek { max-width: 760px; font-size: 21px; line-height: 1.5; color: var(--graphite); }

.byline { display: flex; align-items: center; gap: 16px; padding-top: 8px; }
.avatar {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 50%;
    background: repeating-linear-gradient(135deg, var(--hatch-a) 0 1px, var(--hatch-b) 1px 6px);
    border: 1px solid var(--hatch-border);
    overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.byline-text { display: flex; flex-direction: column; gap: 2px; }
.byline-text strong { font-size: 15px; font-weight: 500; }
.byline-text span { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }

@media (max-width: 900px) {
    .article-head { padding-block: 44px 48px; }
    .article-head-copy { gap: 20px; }
    .article-photo { width: 100%; }
    .article-head h1 em { font-style: italic; color: var(--signal); }
.article-head .dek { font-size: 18px; }
    .photo-credit { bottom: 14px; }
}

/* ---------------------------------------------------------------- article: body */

.article-body { padding-block: 72px 96px; align-items: start; }

.toc {
    grid-column: span 2;
    position: sticky;
    top: 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding-top: 6px;
}
.toc ol { display: flex; flex-direction: column; gap: 12px; margin: 0; padding: 0; list-style: none; font-size: 14px; line-height: 1.35; color: var(--graphite); }
.toc a { display: block; padding-left: 14px; border-left: 2px solid transparent; }
.toc a:hover { color: var(--ink); border-left-color: var(--rule-strong); opacity: 1; }

.rail {
    grid-column: 11 / span 2;
    position: sticky;
    top: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 6px;
}
.rail .note { font-size: 13px; line-height: 1.55; color: var(--muted); }
.rail .note + .label { margin-top: 16px; }

.workshop {
    margin-top: 28px;
    padding: 18px;
    background: var(--card);
    border: 1px solid var(--rule);
    border-radius: 3px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.workshop:first-child { margin-top: 0; }
.workshop strong { font-size: 17px; font-weight: 600; }
.workshop p { font-size: 13px; line-height: 1.55; color: var(--graphite); }
.workshop .go {
    align-self: flex-start;
    padding-bottom: 2px;
    border-bottom: 1px solid var(--webkeeper);
    font-size: 13px;
    font-weight: 500;
}

@media (max-width: 1100px) {
    .article-body { row-gap: 40px; }
    .toc { display: none; }
    .prose { grid-column: 1 / span 8 !important; }
    .rail { grid-column: 9 / span 4; }
}
@media (max-width: 900px) {
    .article-body { padding-block: 40px 56px; }
    .rail { position: static; }
}

/* ---------------------------------------------------------------- article: prose */

.prose {
    grid-column: 4 / span 6;
    display: flex;
    flex-direction: column;
    gap: 28px;
    min-width: 0;
    font-size: 18px;
    line-height: 1.7;
    color: var(--body);
}
.prose > * { margin: 0; }
.prose a {
    border-bottom: 1px solid var(--signal);
    font-weight: 500;
}
.prose strong { font-weight: 600; color: var(--ink); }
.prose em { font-style: italic; }
.prose h2 {
    margin-top: 24px;
    font-family: var(--font-serif);
    font-weight: 400;
    font-size: clamp(32px, 3.1vw, 44px);
    line-height: 1.05;
    letter-spacing: -.01em;
    color: var(--ink);
    scroll-margin-top: 24px;
}
.prose h3 {
    margin-top: 8px;
    font-size: 21px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--ink);
}
.prose h4 { font-size: 18px; font-weight: 600; color: var(--ink); }
.prose ul, .prose ol { padding-left: 1.4em; display: flex; flex-direction: column; gap: 8px; }
.prose li::marker { color: var(--signal); font-family: var(--font-mono); font-size: .85em; }
.prose blockquote {
    padding-left: 24px;
    border-left: 2px solid var(--signal);
    color: var(--graphite);
    font-style: italic;
}
.prose hr { width: 100%; border: 0; border-top: 1px solid var(--rule); }
.prose img { border-radius: 3px; }
.prose figure { display: flex; flex-direction: column; gap: 10px; }
.prose figcaption { font-size: 13px; line-height: 1.5; color: var(--muted); }

.rail code,
.prose :not(pre) > code {
    font-family: var(--font-mono);
    font-size: .86em;
    background: var(--code-bg);
    padding: 2px 5px;
    border-radius: 2px;
    overflow-wrap: anywhere;
}

.prose table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
    line-height: 1.5;
    display: block;
    overflow-x: auto;
}
.prose th {
    padding: 0 16px 10px 0;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 400;
    letter-spacing: .08em;
    text-transform: uppercase;
    text-align: left;
    color: var(--muted);
    border-bottom: 1px solid var(--line);
}
.prose td { padding: 12px 16px 12px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }

/* code blocks are night blocks */
.prose pre,
pre[class*="language-"] {
    padding: 20px 22px;
    background: var(--night);
    color: var(--syn-text);
    border-radius: 3px;
    font-family: var(--font-mono);
    font-size: 14px;
    line-height: 1.65;
    overflow-x: auto;
    tab-size: 4;
}
.prose pre code { font: inherit; background: none; padding: 0; }

.token.comment, .token.prolog, .token.doctype, .token.cdata { color: var(--syn-comment); }
.token.keyword, .token.important, .token.atrule, .token.rule, .token.selector, .token.tag,
.token.builtin, .token.boolean, .token.constant, .token.number, .token.deleted { color: var(--syn-keyword); }
.token.function, .token.class-name, .token.string, .token.char, .token.attr-value,
.token.regex, .token.inserted, .token.url { color: var(--syn-function); }
.token.punctuation, .token.operator, .token.property, .token.attr-name, .token.variable { color: var(--syn-text); }
.token.bold { font-weight: 600; }
.token.italic { font-style: italic; }

@media (max-width: 720px) {
    .prose { gap: 22px; font-size: 17px; }
    .prose pre { margin-inline: calc(-1 * var(--margin)); border-radius: 0; font-size: 13px; padding: 18px var(--margin); }
}

/* ---------------------------------------------------------------- TL;DR */

.tldr {
    border: 1px solid var(--line);
    border-radius: 3px;
    background: var(--card);
    overflow: hidden;
}
.tldr-head {
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    background: var(--btn-bg);
    color: var(--btn-fg);
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: .1em;
    text-transform: uppercase;
}
.tldr-head span:last-child { color: var(--night-muted); }
@media (prefers-color-scheme: dark) {
    .tldr-head span:last-child { color: #121210; opacity: .7; }
}
.tldr ol {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 0;
    padding: 20px 24px 8px;
    list-style: none;
    font-size: 16px;
    line-height: 1.6;
}
.tldr li, .tldr-done { display: flex; gap: 16px; }
.tldr li > span:first-child, .tldr-done > span:first-child {
    flex-shrink: 0;
    padding-top: 2px;
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--signal);
}
.tldr-done {
    margin: 12px 24px 20px;
    padding-top: 16px;
    border-top: 1px dashed var(--rule-strong);
    font-size: 16px;
    line-height: 1.6;
}
.tldr-done > span:last-child { font-weight: 600; color: var(--ink); }
.tldr li code, .tldr-done code { font-size: .86em; }
.tldr-share {
    margin: 0 24px;
    padding: 12px 0 14px;
    border-top: 1px solid var(--rule);
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--muted);
    text-align: right;
}
.tldr-share a { color: var(--ink); border-bottom: 1px solid var(--signal); }

@media (max-width: 720px) {
    .tldr ol { padding: 18px 18px 6px; }
    .tldr li, .tldr-done { gap: 12px; }
    .tldr-done { margin: 12px 18px 18px; }
}

/* ---------------------------------------------------------------- article: share row */

.share {
    margin-top: 24px;
    padding-top: 28px;
    border-top: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    gap: 16px;
    scroll-margin-top: 32px;
}
.prose .share-links { display: flex; flex-direction: row; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.prose .share-links a, .share-links button {
    background: transparent;
    color: var(--ink);
    font-weight: 400;
    border-bottom: 1px solid var(--rule-strong);
    cursor: pointer;
}
.share-links .tag:hover { background: var(--btn-bg); color: var(--btn-fg); border-color: var(--btn-bg); opacity: 1; }
.share-follow { font-size: 15px; color: var(--muted); }

/* The TL;DR "Share it" link jumps here. The landing spot is marked the way the
   wordmark would: a signal line draws across the top hairline, and a block cursor
   blinks after the label four times, then both go away. Nothing shifts. */
.share { position: relative; }
.share::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -1px;
    height: 2px;
    background: var(--signal);
    transform: scaleX(0);
    transform-origin: left;
    opacity: 0;
    pointer-events: none;
}
.share > .label::after {
    content: "";
    display: inline-block;
    width: .6em;
    height: 1.15em;
    margin-left: 6px;
    vertical-align: -.2em;
    background: var(--signal);
    opacity: 0;
}
.share.is-flashing::before,
.share:target:not([data-js])::before { animation: share-line 3.2s ease-out; }
.share.is-flashing > .label::after,
.share:target:not([data-js]) > .label::after { animation: share-cursor 3.2s steps(1, end); }

@keyframes share-line {
    0% { transform: scaleX(0); opacity: 1; }
    20%, 80% { transform: scaleX(1); opacity: 1; }
    100% { transform: scaleX(1); opacity: 0; }
}
/* four blinks, like a terminal cursor waiting for input */
@keyframes share-cursor {
    0%, 25%, 50%, 75% { opacity: 1; }
    12.5%, 37.5%, 62.5%, 87.5%, 100% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .share.is-flashing::before, .share:target::before,
    .share.is-flashing > .label::after, .share:target:not([data-js]) > .label::after { animation: none; }
}

/* ---------------------------------------------------------------- article: CTA + related */

.article-cta {
    padding: 48px;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px 48px;
}
.article-cta-copy { display: flex; flex-direction: column; gap: 10px; }
.article-cta-copy .label { color: var(--phosphor); font-size: 12px; }
.article-cta-copy .serif { font-size: clamp(32px, 3.1vw, 44px); line-height: 1.05; }

.related { padding-top: 96px; display: flex; flex-direction: column; gap: 32px; }
.related-head { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; }
.related-head h2 { font-family: var(--font-serif); font-weight: 400; font-size: 40px; line-height: 1; }
.related-head .text-link { font-size: 15px; padding-bottom: 3px; }
.related-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px var(--gutter); }
.related-grid a { display: flex; flex-direction: column; gap: 12px; padding-top: 20px; border-top: 1px solid var(--line); }
.related-grid .topic { font-family: var(--font-mono); font-size: 12px; color: var(--signal); text-transform: uppercase; }
.related-grid .title { font-family: var(--font-serif); font-size: 26px; line-height: 1.15; }
.related-grid .date { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }

@media (max-width: 900px) {
    .article-cta { margin-inline: calc(-1 * var(--margin)); border-radius: 0; padding: 40px var(--margin); flex-direction: column; align-items: stretch; }
    .related { padding-top: 56px; }
    .related-head h2 { font-size: 32px; }
    .related-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ---------------------------------------------------------------- simple pages (legal, thanks, category, 404) */

.doc { padding-block: 56px 112px; }
.doc-body { grid-column: 3 / span 7; }
.doc-body .prose { grid-column: auto; }
.doc-updated { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }

@media (max-width: 900px) {
    .doc { padding-bottom: 56px; }
}

/* ---------------------------------------------------------------- openvms */

.vms-context { grid-column: 6 / span 7; display: flex; flex-direction: column; gap: 24px; font-size: 18px; line-height: 1.6; color: var(--graphite); }
.vms-context .strong { color: var(--ink); font-weight: 500; }

.dash-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.dash-list li {
    display: flex;
    gap: 20px;
    padding: 18px 0;
    border-bottom: 1px solid var(--rule);
    color: var(--ink);
}
.dash-list li::before { content: "/"; font-family: var(--font-mono); color: var(--signal); }

.proof { padding-block: 112px 120px; display: flex; flex-direction: column; gap: 56px; }
.proof .section-title { font-size: clamp(38px, 4.8vw, 64px); }
.proof-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gutter); }
.proof-card {
    padding: 28px;
    background: var(--night-surface);
    border: 1px solid var(--night-rule);
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.proof-card .label { color: var(--phosphor); font-size: 12px; }
.proof-photo { margin: -28px -28px 8px; border-bottom: 1px solid var(--night-rule); border-radius: 4px 4px 0 0; overflow: hidden; }
.proof-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; filter: grayscale(1) contrast(1.05); }
.proof-photo { position: relative; }
.proof-photo figcaption {
    position: absolute;
    left: 12px;
    bottom: 12px;
    padding: 4px 8px;
    background: rgba(18, 18, 16, .8);
    color: var(--night-text);
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: .08em;
}
.proof-card h3 { font-family: var(--font-serif); font-weight: 400; font-size: 30px; line-height: 1.1; }
.proof-card p, .proof-card li { font-size: 15px; line-height: 1.55; color: var(--night-graphite); }
.proof-card ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.proof-card a { color: var(--night-text); border-bottom: 1px solid var(--phosphor); }
.proof-card .fine { font-family: var(--font-mono); font-size: 12px; color: var(--night-dim); }

.help-grid {
    grid-column: 6 / span 7;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 40px;
}
.help-grid > div { display: flex; flex-direction: column; gap: 8px; padding: 22px 0 26px; border-top: 1px solid var(--rule); }
.help-grid > div:nth-child(-n+2) { border-top-color: var(--line); }
.help-grid h3 { font-size: 19px; font-weight: 500; }
.help-grid p { font-size: 15px; line-height: 1.55; color: var(--graphite); }

.steps--four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pull { font-family: var(--font-mono); font-size: 13px; color: var(--muted); }

@media (max-width: 900px) {
    .proof { padding-block: 56px; gap: 32px; }
    .proof-grid { grid-template-columns: minmax(0, 1fr); }
    .help-grid { grid-template-columns: minmax(0, 1fr); }
    .help-grid > div:nth-child(2) { border-top-color: var(--rule); }
    .steps--four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

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

.about-body { grid-column: 3 / span 7; }
.about-aside { grid-column: 10 / span 3; display: flex; flex-direction: column; gap: 20px; }
.address {
    padding: 24px;
    background: var(--paper-2);
    border-radius: 4px;
    font-style: normal;
    font-size: 15px;
    line-height: 1.6;
    color: var(--graphite);
}
.address strong { color: var(--ink); font-weight: 500; }
.address a { border-bottom: 1px solid var(--signal); }

@media (max-width: 720px) {
    .hide-sm { display: none; }
}

/* ---------------------------------------------------------------- pet projects page */

.projects-page { padding-block: 48px 0; display: flex; flex-direction: column; gap: var(--gutter); }
.projects-page .webkeeper-card-copy a:not(.text-link):hover { opacity: .8; }
.project-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--gutter); }
.card-date { margin-top: auto; padding-top: 6px; font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.facts--stacked { flex-direction: column; gap: 8px; }

/* ---------------------------------------------------------------- consent banner */

/* Slim bar pinned to the bottom. Sits below the mobile menu sheet (z-index 30).
   Reject and Accept are styled the same on purpose: neither may be nudged. */
.consent {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 25;
    padding: 14px 0 calc(14px + env(safe-area-inset-bottom));
    background: var(--paper-2);
    border-top: 1px solid var(--rule-strong);
    font-size: 14px;
    color: var(--body);
}
.consent[hidden] { display: none; }
.consent .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px 24px;
}
.consent p { margin: 0; }
.consent p a { text-decoration: underline; text-underline-offset: 3px; }
.consent-actions { display: flex; gap: 12px; flex-shrink: 0; }
.consent .btn { min-width: 104px; }

@media (max-width: 720px) {
    .consent .wrap { flex-direction: column; align-items: stretch; }
    .consent-actions .btn { flex: 1; }
}
