@import url('https://fonts.googleapis.com/css2?family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&display=swap');

:root {
    --accent-color: #168fd2;
    --background-color: #f4f1ea;
    --text-color: #171717;
    --link-color: #0b78b8;
    --footer-text-color: #595750;
    --border-color: rgba(23, 23, 23, 0.58);
    --subtle-color: #e8e4db;
    --page-gutter: clamp(1.25rem, 3.4vw, 3rem);
}

html.dark-mode {
    --accent-color: #31aaf0;
    --background-color: #111111;
    --text-color: #f6f4ef;
    --link-color: #4bb7f3;
    --footer-text-color: #aaa8a1;
    --border-color: rgba(246, 244, 239, 0.72);
    --subtle-color: #1d1d1d;
}

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

html {
    min-width: 320px;
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    background: var(--background-color);
    color: var(--text-color);
    font-family: 'Inter', Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.55;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

::selection {
    background: var(--accent-color);
    color: #ffffff;
}

.container {
    display: flex;
    flex-direction: column;
    width: min(100%, 1440px);
    max-width: 1440px;
    min-height: 100vh;
    margin: 0 auto;
    padding: 2rem var(--page-gutter) 1.4rem;
}

.skip-link {
    border-radius: 0;
    background: var(--text-color);
    color: var(--background-color);
}

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 4.4rem;
    padding: 0 0 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

.site-title,
.header h1 {
    margin: 0;
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: clamp(1.15rem, 1.65vw, 1.5rem);
    font-style: italic;
    font-weight: 400;
    line-height: 1;
}

.site-title a,
.header h1 a,
.site-title a:hover,
.header h1 a:hover {
    color: var(--text-color);
}

.site-title a::before,
.header h1 a::before,
.primary-nav a::before,
.footer a::before {
    display: none;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: clamp(1.4rem, 3vw, 2.25rem);
}

.primary-nav {
    display: flex;
    align-items: center;
    gap: clamp(1.25rem, 2.3vw, 2rem);
}

.header .primary-nav a,
.header .primary-nav a:visited {
    color: var(--text-color);
    font-size: 0.78rem;
    font-weight: 400;
    letter-spacing: 0.12em;
    line-height: 1;
    text-transform: uppercase;
    transition: color 160ms ease, opacity 160ms ease;
}

.header .primary-nav a:focus-visible {
    color: var(--link-color);
}

.toggle-container {
    flex: 0 0 auto;
    line-height: 0;
}

.toggle-switch {
    width: 3rem;
    height: 1.5rem;
}

.slider {
    border-radius: 999px;
    background: #b7b7b3;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.slider::before {
    width: 1.1rem;
    height: 1.1rem;
    left: 0.2rem;
    bottom: 0.2rem;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
}

input:checked + .slider {
    background: var(--accent-color);
}

input:checked + .slider::before {
    transform: translateX(1.5rem);
}

a:not(.button) {
    color: var(--link-color);
    text-decoration: none;
}

a:not(.button)::before {
    display: none;
}

a:focus-visible,
button:focus-visible,
input:focus-visible + .slider {
    outline: 2px solid var(--accent-color);
    outline-offset: 4px;
}

/* Landing page */
.landing-main {
    display: flex;
    flex: 1 0 auto;
    align-items: center;
    width: 100%;
    padding: clamp(4.2rem, 8.5vh, 7.25rem) 0 clamp(4rem, 8vh, 7rem);
}

.intro-grid {
    display: grid;
    grid-template-columns: minmax(21rem, 0.9fr) minmax(28rem, 1.1fr);
    align-items: center;
    gap: clamp(3.5rem, 6vw, 5.25rem);
    width: 100%;
    margin: 0;
}

.portrait-frame {
    width: min(100%, 30rem);
    margin: 0;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: var(--subtle-color);
}

.portrait-frame img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(1);
    transition: filter 450ms ease;
}

.portrait-frame:hover img,
.portrait-frame:focus-visible img {
    filter: grayscale(0);
}

.portrait-frame:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 4px;
}

.intro-copy {
    align-self: center;
    max-width: 42rem;
}

.intro-copy h2 {
    margin: 0 0 clamp(3.2rem, 7vh, 5.7rem);
    color: var(--text-color);
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: clamp(3.5rem, 5.8vw, 5.25rem);
    font-weight: 700;
    letter-spacing: -0.045em;
    line-height: 1.05;
}

.intro-copy h2 em {
    display: inline-block;
    margin-left: 0.08em;
    font-weight: 400;
}

.bio-copy {
    max-width: 40rem;
    font-size: 1rem;
    line-height: 1.5;
}

.bio-copy p {
    margin: 0 0 1.45rem;
}

.bio-copy p:last-child {
    margin-bottom: 0;
}

/* Shared footer */
.footer {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 2rem;
    margin-top: auto;
    padding: 2rem 0 0.25rem;
    border-top: 1px solid var(--border-color);
    color: var(--footer-text-color);
    text-align: left;
}

.footer-nav {
    justify-content: flex-start;
    gap: clamp(1.35rem, 2.8vw, 2.25rem);
}

.footer-nav li:not(:last-child)::after {
    display: none;
}

.footer a,
.footer-meta {
    color: var(--footer-text-color);
    font-size: 0.74rem;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.footer a {
    padding: 0;
}

.footer a:hover,
.footer a:focus-visible {
    color: var(--link-color);
}

.footer-meta {
    margin: 0;
    font-size: 0.74rem;
    white-space: nowrap;
}

.content-page .footer .footer-meta {
    font-size: 0.74rem !important;
}

/* Interior pages */
.content-page .container > main {
    flex: 1 0 auto;
    width: min(100%, 980px);
    margin: 0 auto;
    padding: clamp(3.5rem, 8vw, 7rem) 0;
}

.content-page section {
    margin: 0 0 4rem;
}

.content-page section:last-child {
    margin-bottom: 0;
}

.content-page section > h2,
.content-page .reading-page > h2,
.error-card h2 {
    margin: 0 0 1.25rem;
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: clamp(2.25rem, 4.5vw, 3.75rem);
    font-weight: 700;
    letter-spacing: -0.035em;
    line-height: 1.08;
}

.content-page p,
.content-page li {
    font-size: 1.02rem;
}

.content-page main ul:not(.engagement-list):not(.papers-list) {
    padding-left: 1.2rem;
}

.content-page main li + li {
    margin-top: 0.7rem;
}

#working ul,
#bookshelf ul {
    margin: 1.1rem 0 0;
    padding-left: 1.35rem;
}

#working li,
#bookshelf li {
    padding-left: 0.2rem;
    line-height: 1.55;
}

#working li + li,
#bookshelf li + li {
    margin-top: 0.65rem;
}

.engagement-intro {
    margin: 0 0 2.5rem;
    color: var(--footer-text-color);
}

.engagement-list {
    gap: 2.5rem;
}

.engagement-item {
    border: 1px solid var(--border-color);
    border-radius: 0;
    background: var(--subtle-color);
}

.engagement-caption {
    padding: 1.35rem 1.5rem 1.55rem;
}

.engagement-caption h3 {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: 1.2rem;
    line-height: 1.35;
}

.button,
.filter-button {
    border: 1px solid var(--border-color);
    border-radius: 0;
    color: var(--text-color);
    font-size: 0.76rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.button:hover,
.filter-button:hover,
.filter-button.active {
    border-color: var(--text-color);
    background: var(--text-color);
    color: var(--background-color);
}

.papers-list li {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-color: var(--border-color);
}

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

.error-page .container {
    min-height: 100vh;
}

.content-page .container > main.error-main {
    display: grid;
    align-items: center;
    width: 100%;
    padding: clamp(3.5rem, 7vw, 6.5rem) 0;
}

.error-card {
    display: grid;
    grid-template-columns: minmax(17rem, 0.72fr) minmax(24rem, 1.28fr);
    align-items: center;
    gap: clamp(3rem, 7vw, 7rem);
    max-width: none;
}

.error-copy {
    max-width: 30rem;
}

.error-code {
    margin: 0 0 1.5rem;
    font-family: "Inter", sans-serif;
    font-size: 0.66rem !important;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.error-card h2 {
    margin-bottom: 1.75rem;
    font-size: clamp(3rem, 5.6vw, 5.2rem);
    font-weight: 400;
    letter-spacing: -0.045em;
}

.error-message {
    max-width: 25rem;
    margin: 0;
    color: var(--footer-text-color);
    line-height: 1.6;
}

.error-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 1.75rem;
    margin-top: 2.5rem;
}

.error-actions a {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
    font-family: "Inter", sans-serif;
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.error-home {
    padding: 0 1.25rem;
    border: 1px solid var(--text-color);
    background: var(--text-color);
    color: var(--background-color);
}

.error-home:hover,
.error-home:focus-visible {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: #fff;
}

.error-work {
    border-bottom: 1px solid var(--border-color);
}

.error-work:hover,
.error-work:focus-visible {
    border-color: var(--accent-color);
}

.error-image {
    margin: 0;
}

.error-image img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    filter: grayscale(1);
    transition: filter 300ms ease;
}

.error-image:hover img {
    filter: grayscale(0);
}

.error-image figcaption {
    margin-top: 0.8rem;
    color: var(--footer-text-color);
    font-family: "Inter", sans-serif;
    font-size: 0.62rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

@media (max-width: 980px) {
    .landing-main {
        padding-top: 4.5rem;
    }

    .intro-grid {
        grid-template-columns: minmax(18rem, 0.9fr) minmax(23rem, 1.1fr);
        gap: 2.75rem;
    }

    .intro-copy h2 {
        margin-bottom: 3.25rem;
        font-size: clamp(3rem, 6vw, 4.25rem);
    }

    .bio-copy {
        font-size: 0.95rem;
        line-height: 1.5;
    }
}

@media (max-width: 760px) {
    .container {
        padding-top: 1.25rem;
    }

    .header {
        min-height: 3.75rem;
        padding-bottom: 1rem;
    }

    .header-actions {
        gap: 1rem;
    }

    .primary-nav {
        gap: 0.9rem;
    }

    .primary-nav a {
        font-size: 0.68rem;
        letter-spacing: 0.08em;
    }

    .toggle-switch {
        width: 3rem;
        height: 1.5rem;
    }

    .slider::before {
        width: 1.1rem;
        height: 1.1rem;
        left: 0.2rem;
        bottom: 0.2rem;
    }

    input:checked + .slider::before {
        transform: translateX(1.5rem);
    }

    .landing-main {
        padding: 3.25rem 0 4.5rem;
    }

    .intro-grid {
        grid-template-columns: 1fr;
        gap: 3.25rem;
    }

    .portrait-frame {
        width: min(100%, 32rem);
        justify-self: center;
    }

    .intro-copy {
        max-width: 36rem;
    }

    .intro-copy h2 {
        margin-bottom: 2.4rem;
        font-size: clamp(2.75rem, 12vw, 4.2rem);
    }

    .bio-copy {
        font-size: 0.95rem;
        line-height: 1.52;
    }

    .footer {
        grid-template-columns: 1fr;
        gap: 1.35rem;
    }

    .footer-nav {
        gap: 0.7rem 1.25rem;
    }

    .footer-meta {
        white-space: normal;
    }

    .content-page .container > main {
        padding: 3.5rem 0 4.5rem;
    }

    .content-page .container > main.error-main {
        padding: 3.75rem 0 4.5rem;
    }

    .error-card {
        grid-template-columns: 1fr;
        gap: 3.25rem;
    }

    .error-copy {
        max-width: 34rem;
    }

    .error-card h2 {
        max-width: 9ch;
    }
}

@media (max-width: 460px) {
    .header {
        display: flex;
        min-height: 0;
        padding: 0.35rem 0 0.85rem;
        gap: 0.6rem;
    }

    .site-title,
    .header h1 {
        flex: 0 0 auto;
        font-size: 0.82rem;
    }

    .header-actions {
        display: flex;
        flex: 1 1 auto;
        justify-content: flex-end;
        min-width: 0;
        gap: 0.55rem;
    }

    .primary-nav {
        flex: 0 1 auto;
        gap: 0.7rem;
    }

    .header .primary-nav a {
        font-size: 0.54rem;
        letter-spacing: 0.055em;
    }

    .toggle-container {
        flex: 0 0 auto;
    }

    .toggle-switch {
        width: 2.5rem;
        height: 1.25rem;
    }

    .slider::before {
        width: 0.9rem;
        height: 0.9rem;
        left: 0.175rem;
        bottom: 0.175rem;
    }

    input:checked + .slider::before {
        transform: translateX(1.25rem);
    }

    .footer {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 0.7rem;
    }

    .footer-nav {
        display: flex;
        flex-wrap: nowrap;
        width: 100%;
        gap: 0.55rem;
    }

    .footer a,
    .footer-meta,
    .content-page .footer .footer-meta {
        font-size: 0.52rem !important;
        letter-spacing: 0.055em;
        white-space: nowrap;
    }

    #working ul,
    #bookshelf ul {
        padding-left: 1.15rem;
    }

    #working li,
    #bookshelf li {
        padding-left: 0.15rem;
        line-height: 1.5;
    }

    #working li + li,
    #bookshelf li + li {
        margin-top: 0.55rem;
    }
}

/* Long-form research articles */
.article-shell {
    max-width: 90rem;
}

.content-page .container > main.research-article {
    padding: 4.75rem 0 7rem;
}

.article-hero {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
    max-width: 62rem;
    margin: 0 auto 5.25rem;
    padding: 0 0 3.5rem;
    border-bottom: 1px solid var(--border-color);
}

.article-kicker,
.article-date,
.article-byline,
.article-contents,
.work-entry-meta,
.work-entry-links {
    font-family: "Inter", sans-serif;
}

.work-entry-meta {
    margin: 0 0 1.25rem;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.article-hero .article-kicker {
    margin: 0;
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.article-hero h2 {
    max-width: 58rem;
    margin: 0;
    font-family: "Libre Baskerville", serif;
    font-size: clamp(2.3rem, 4.35vw, 3.9rem);
    font-weight: 400;
    line-height: 1.075;
    font-kerning: normal;
    letter-spacing: 0.005em;
}

.article-hero .article-date {
    margin: 0;
    color: var(--footer-text-color);
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.article-hero .article-byline {
    margin: 0;
    font-size: 1.1rem;
}

.article-tools {
    border-top: 1px solid var(--border-color);
    font-family: "Inter", sans-serif;
}

.article-tool {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 2.65rem;
    margin: 0;
    padding: 0.65rem 0;
    border: 0;
    border-bottom: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-color) !important;
    font: inherit;
    font-size: 0.76rem;
    line-height: 1.2;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: color 160ms ease;
}

.article-tool:hover,
.article-tool:focus-visible {
    color: var(--link-color) !important;
}

.article-tool-icon {
    width: 0.9rem;
    height: 0.9rem;
    flex: 0 0 auto;
    margin-left: 0.75rem;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

.article-cite-tool summary {
    list-style: none;
}

.article-cite-tool summary::-webkit-details-marker {
    display: none;
}

.article-cite-panel {
    padding: 0.85rem 0 1rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.66rem;
    line-height: 1.55;
}

.article-cite-panel p {
    margin: 0 0 0.75rem;
}

.article-cite-panel button {
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--link-color);
    font: inherit;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
}

.article-layout {
    display: grid;
    grid-template-columns: minmax(11rem, 15rem) minmax(0, 47rem);
    justify-content: center;
    gap: clamp(3rem, 7vw, 7rem);
    align-items: start;
}

.article-sidebar {
    position: sticky;
    top: 2rem;
    align-self: start;
}

.article-contents {
    margin-top: 2rem;
    padding: 0.25rem 0 1.25rem;
    font-size: 0.72rem;
    line-height: 1.5;
}

.article-contents summary {
    cursor: pointer;
    list-style: none;
    margin: 0 0 1.1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.article-contents summary::-webkit-details-marker {
    display: none;
}

.article-contents summary::after {
    content: "−";
    float: right;
    font-size: 0.85rem;
    font-weight: 400;
}

.article-contents:not([open]) summary::after {
    content: "+";
}

.article-contents ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

.article-contents li + li {
    margin-top: 0.72rem;
}

.article-contents a {
    display: grid;
    grid-template-columns: 1.85rem 1fr;
    gap: 0.2rem;
    align-items: start;
    color: inherit;
    text-decoration: none;
}

.article-contents a:visited {
    color: inherit;
}

.article-contents .contents-number {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 1.08rem;
    transform: translateY(0.18rem);
    color: var(--footer-text-color);
    font-size: 0.62rem;
    line-height: 1;
    letter-spacing: 0.08em;
}

.article-contents .contents-title {
    line-height: 1.5;
}

.article-contents a:hover,
.article-contents a:focus-visible,
.article-contents a.is-active {
    color: var(--link-color);
}

.article-contents a.is-active {
    font-weight: 600;
}

.article-contents a.is-active .contents-number {
    color: var(--link-color);
}

.article-prose {
    min-width: 0;
    font-family: "Libre Baskerville", serif;
    font-size: 0.85rem;
    line-height: 1.72;
}

.article-prose p {
    margin: 0 0 1.1rem;
}

.article-prose h2,
.article-prose h3,
.article-prose h4 {
    scroll-margin-top: 2rem;
    font-family: "Libre Baskerville", serif;
    font-weight: 400;
    line-height: 1.22;
}

.article-prose h2 {
    margin: 4.25rem 0 1.45rem;
    font-size: 1.08rem;
}

.article-prose > h2:first-child {
    margin-top: 0;
}

.article-prose h3 {
    margin: 2.75rem 0 1.2rem;
    font-size: 0.98rem;
}

.article-prose h4 {
    margin: 2.15rem 0 1rem;
    font-size: 0.92rem;
    font-style: italic;
}

.article-prose sup {
    margin-left: 0.08em;
    font-family: "Inter", sans-serif;
    font-size: 0.62em;
    line-height: 0;
}

.article-prose sup a {
    color: var(--link-color);
    text-decoration: none;
}

.article-prose a,
.article-notes a {
    overflow-wrap: anywhere;
}

.article-notes {
    margin-top: 4.5rem;
    padding-top: 2.25rem;
}

.article-notes ol {
    margin: 0;
    padding-left: 1.6rem;
    font-family: "Libre Baskerville", serif;
    font-size: 0.7rem;
    line-height: 1.56;
}

.article-notes li {
    padding-left: 0.35rem;
    font-size: inherit;
    line-height: inherit;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.article-notes li + li {
    margin-top: 0.72rem;
}

.article-notes cite {
    font-style: italic;
}

.citation-smallcaps {
    font-size: 1.06em;
    font-variant-caps: all-small-caps;
    letter-spacing: 0.025em;
}

.note-back {
    margin-left: 0.25rem;
    text-decoration: none;
}

.article-citation {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    font-family: "Inter", sans-serif;
    font-size: 0.8rem;
    line-height: 1.65;
}

.work-index {
    max-width: 58rem;
}

.work-entry {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: baseline;
    gap: 2rem;
    margin-top: 2.75rem;
    padding: 1.35rem 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.work-entry + .work-entry {
    margin-top: 0;
    border-top: 0;
}

.work-entry h3 {
    margin: 0;
    font-family: "Libre Baskerville", serif;
    font-size: clamp(0.98rem, 1.35vw, 1.15rem);
    font-weight: 400;
    line-height: 1.45;
    letter-spacing: -0.01em;
}

.work-entry h3 a {
    color: inherit;
    text-decoration: none;
    transition: color 160ms ease;
}

.work-entry h3 a:hover,
.work-entry h3 a:focus-visible {
    color: var(--link-color);
}

.work-entry time {
    font-family: "Inter", sans-serif;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    line-height: 1;
    color: var(--footer-text-color);
    text-transform: uppercase;
}

.article-preview {
    width: min(100%, 47rem);
    margin: 0 auto;
}

.article-preview-label {
    margin: 0 0 1.5rem;
    font-family: "Inter", sans-serif;
    font-size: 0.66rem !important;
    font-weight: 600;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.article-preview p:not(.article-preview-label) {
    margin: 0;
    font-family: "Libre Baskerville", serif;
    font-size: clamp(1rem, 1.35vw, 1.14rem);
    line-height: 1.85;
}

@media (max-width: 760px) {
    .content-page .container > main.research-article {
        padding: 3.5rem 0 5rem;
    }

    .article-hero {
        gap: 1rem;
        margin-bottom: 3rem;
        padding-bottom: 2.5rem;
    }

    .article-layout {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .article-sidebar {
        position: static;
    }

    .article-contents {
        padding: 0 0 1.75rem;
        border-bottom: 1px solid var(--border-color);
    }

    .article-contents ol {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.7rem 1.25rem;
    }

    .article-contents li + li {
        margin-top: 0;
    }

    .article-prose {
        font-size: 0.85rem;
        line-height: 1.68;
    }
}

@media (max-width: 460px) {
    .article-hero h2 {
        font-size: clamp(2.05rem, 9.8vw, 2.7rem);
    }

    .article-contents ol {
        grid-template-columns: 1fr;
    }

    .article-prose h2 {
        margin-top: 4rem;
    }

    .work-entry {
        gap: 1rem;
        padding: 1.1rem 0;
    }

    .work-entry h3 {
        font-size: 0.9rem;
        line-height: 1.4;
    }
}

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

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}

/* Academic writing archive */
.archive-intro {
    margin: 0.75rem 0 3rem;
    color: var(--footer-text-color);
    font-family: "Libre Baskerville", serif;
    font-size: 0.9rem;
    line-height: 1.6;
}
.archive-section-title {
    margin: 0;
    font-family: "Inter", sans-serif;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.work-entry {
    margin-top: 1rem;
    padding: 1.5rem 0;
}
.archive-entry-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
    max-width: 12rem;
    margin: 0;
    color: var(--footer-text-color);
    font-family: "Inter", sans-serif;
    font-size: 0.65rem;
    line-height: 1.5;
    text-align: right;
}
.archive-entry-meta time {
    font-size: inherit;
}
.primary-nav a[aria-current="page"] {
    text-decoration: none;
}
@media (max-width: 460px) {
    .work-entry { grid-template-columns: 1fr; gap: 0.65rem; }
    .archive-entry-meta {
        align-items: flex-start;
        flex-direction: row;
        flex-wrap: wrap;
        max-width: none;
        text-align: left;
    }
}

/* Preserve the ULR source's section and subsection hierarchy. */
.ulr-prose h2 {
    font-size: 1.3rem;
    font-weight: 700;
}
.ulr-prose h3,
.ulr-prose h4 {
    font-style: italic;
}

.ulr-prose h3 {
    font-size: 1.1rem;
}
.ulr-prose h4 {
    font-size: 1rem;
}

/* Touch taps must not leave navigation in a sticky hover state. */
@media (hover: hover) and (pointer: fine) {
    .header .primary-nav a:hover {
        color: var(--link-color);
    }
}
.header .primary-nav a:not(:hover):not(:focus-visible) {
    color: var(--text-color);
}
/* Restore the original animated underline on content links. */
main a:not(.button):not(.portrait-frame):not(.article-tool):not(.article-sidebar a):not(.article-notes a):not(sup a)::before {
    display: block;
}
main a:not(.button):not(.portrait-frame):not(.article-tool):not(.article-sidebar a):not(.article-notes a):not(sup a):focus-visible::before {
    width: 100%;
}

/* Curated reading list */
.reading-page { max-width: 52rem; }
.content-page .reading-intro {
    font-family: "Inter", sans-serif;
    margin: 0.9rem 0 2.75rem;
    color: var(--footer-text-color);
    font-size: 0.9rem;
    line-height: 1.65;
}
.reading-section + .reading-section { margin-top: 3.5rem; }
.reading-section > h3 {
    margin: 0 0 1rem;
    font-family: "Inter", sans-serif;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.content-page main.reading-page .reading-list {
    list-style: none;
    padding: 0;
    margin: 0;
    border-top: 1px solid var(--border-color);
}
.content-page .reading-list li {
    margin: 0;
    padding: 1.1rem 0;
    border-bottom: 1px solid var(--border-color);
    font-family: "Libre Baskerville", serif;
    font-size: 0.95rem;
    line-height: 1.65;
}
.reading-list .reading-author {
    display: block;
    margin-top: 0.3rem;
    color: var(--footer-text-color);
    font-family: "Inter", sans-serif;
    font-size: 0.78rem;
    line-height: 1.5;
}
@media (max-width: 460px) {
    .content-page .reading-list li { font-size: 0.9rem; padding: 1rem 0; }
}

