:root {
    --paper: #f4f0e7;
    --paper-deep: #e7e0d2;
    --ink: #181a17;
    --ink-soft: #54584f;
    --line: #cbc3b4;
    --accent: #9b3f2c;
    --accent-soft: #dfc5b7;
    --selection: #d9c7a6;
    --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
    --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --paper: #1c1c19;
        --paper-deep: #282721;
        --ink: #f0ecdf;
        --ink-soft: #b8b4aa;
        --line: #44423a;
        --accent: #dd836d;
        --accent-soft: #6c3e34;
        --selection: #5e5040;
        color-scheme: dark;
    }
}

:root[data-theme="dark"] {
    --paper: #1c1c19;
    --paper-deep: #282721;
    --ink: #f0ecdf;
    --ink-soft: #b8b4aa;
    --line: #44423a;
    --accent: #dd836d;
    --accent-soft: #6c3e34;
    --selection: #5e5040;
    color-scheme: dark;
}

:root[data-theme="light"] {
    --paper: #f4f0e7;
    --paper-deep: #e7e0d2;
    --ink: #181a17;
    --ink-soft: #54584f;
    --line: #cbc3b4;
    --accent: #9b3f2c;
    --accent-soft: #dfc5b7;
    --selection: #d9c7a6;
    color-scheme: light;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 2rem;
    background: var(--paper);
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--serif);
    font-size: clamp(1rem, 0.97rem + 0.2vw, 1.08rem);
    line-height: 1.7;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

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

a {
    color: inherit;
    text-decoration-color: color-mix(in srgb, var(--ink) 34%, transparent);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.16em;
}

a:hover {
    color: var(--accent);
    text-decoration-color: var(--accent);
}

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

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

.skip-link {
    position: fixed;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 100;
    padding: 0.55rem 0.85rem;
    background: var(--ink);
    color: var(--paper);
    font-family: var(--sans);
    font-size: 0.85rem;
    transform: translateY(-180%);
    transition: transform 160ms ease;
}

.skip-link:focus {
    transform: translateY(0);
}

.site-shell {
    width: min(100% - 2.5rem, 41rem);
    margin-inline: auto;
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-block: 2.75rem 0;
}

.wordmark {
    color: var(--ink);
    text-decoration: none;
}

.wordmark-name {
    font-size: 1rem;
    font-weight: 650;
    letter-spacing: -0.01em;
}

.wordmark-mark {
    display: none;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    font-family: var(--sans);
    font-size: 0.78rem;
    font-weight: 500;
}

.site-nav > a {
    color: var(--ink-soft);
    text-decoration: none;
}

.site-nav > a:hover {
    color: var(--accent);
}

.theme-toggle {
    display: grid;
    min-width: 2.75rem;
    min-height: 2.75rem;
    padding: 0;
    place-items: center;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
}

.theme-toggle-track {
    position: relative;
    width: 2.15rem;
    height: 1.15rem;
    border: 1px solid var(--ink-soft);
    border-radius: 999px;
}

.theme-toggle-track span {
    position: absolute;
    top: 0.16rem;
    left: 0.18rem;
    width: 0.72rem;
    height: 0.72rem;
    border-radius: 50%;
    background: var(--ink);
    transition: transform 180ms ease, background 180ms ease;
}

.theme-toggle[aria-pressed="true"] .theme-toggle-track span {
    background: var(--accent);
    transform: translateX(0.93rem);
}

main {
    display: block;
}

.intro,
.featured-writing,
.writing,
.about,
.not-found {
    width: 100%;
}

.intro {
    padding-block: clamp(3.5rem, 8vw, 5.5rem) 0;
}

.eyebrow,
.section-label,
.post-meta,
.about-year,
.rss-link,
.back-link,
.elsewhere,
.site-footer {
    font-family: var(--sans);
}

.eyebrow,
.section-label {
    margin: 0 0 1rem;
    color: var(--ink-soft);
    font-size: 0.74rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    line-height: 1.5;
}

.eyebrow span {
    padding-inline: 0.3rem;
    color: var(--line);
}

h1,
h2,
h3,
h4,
p {
    overflow-wrap: break-word;
}

h1,
h2,
h3,
h4 {
    margin-top: 0;
    color: var(--ink);
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.015em;
}

.intro h1 {
    max-width: 26ch;
    margin-bottom: 0;
    font-size: clamp(1.55rem, 3vw, 1.95rem);
}

.featured-writing {
    margin-top: clamp(3rem, 7vw, 4.5rem);
}

.featured-writing .section-label {
    margin-bottom: 0.6rem;
}

.featured-link {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    color: var(--ink);
    text-decoration: none;
}

.featured-copy {
    min-width: 0;
}

.featured-link h2 {
    margin-bottom: 0.4rem;
    font-size: 1.28rem;
}

.featured-link p {
    margin: 0;
    color: var(--ink-soft);
    font-size: 0.95em;
    line-height: 1.6;
}

.featured-link .arrow {
    color: var(--accent);
    font-family: var(--sans);
    font-size: 0.95rem;
}

.featured-link:hover h2 {
    color: var(--accent);
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0.6rem 0 0;
    color: var(--ink-soft);
    font-size: 0.72rem;
    font-weight: 450;
    letter-spacing: 0.01em;
    line-height: 1.5;
}

.writing,
.about {
    padding-block: clamp(3.5rem, 8vw, 5.5rem) 0;
}

.about {
    padding-bottom: clamp(3.5rem, 8vw, 5.5rem);
}

.section-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1.5rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid var(--line);
}

.section-heading .section-label {
    margin-bottom: 0.35rem;
}

.section-heading h2 {
    margin: 0;
    font-size: 1.15rem;
}

.rss-link,
.back-link,
.text-link {
    color: var(--ink-soft);
    font-size: 0.74rem;
    font-weight: 500;
}

.writing-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.writing-list li {
    padding-block: 1.5rem;
    border-bottom: 1px solid var(--line);
}

.writing-list a {
    display: block;
    color: var(--ink);
    text-decoration: none;
}

.writing-title {
    display: block;
    margin-bottom: 0.3rem;
    font-size: 1.08rem;
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: -0.01em;
}

.writing-list a:hover .writing-title {
    color: var(--accent);
}

.writing-description {
    display: block;
    color: var(--ink-soft);
    font-size: 0.95em;
    line-height: 1.6;
}

.writing-list .post-meta {
    margin-top: 0.55rem;
}

.empty-state {
    padding-block: 1.5rem;
    border-bottom: 1px solid var(--line);
    color: var(--ink-soft);
}

.about-year {
    margin: 0;
    color: var(--ink-soft);
    font-size: 0.74rem;
    font-weight: 500;
}

.about-grid {
    padding-block: 1.75rem 0;
}

.about-copy p {
    margin: 0 0 1.3em;
}

.about-facts {
    margin-top: 2.25rem;
}

.about-facts dl {
    margin: 0;
}

.about-facts dl > div {
    display: grid;
    grid-template-columns: 8.5rem minmax(0, 1fr);
    gap: 1rem;
    padding-block: 0.45rem;
}

.about-facts dt {
    color: var(--ink-soft);
    font-family: var(--sans);
    font-size: 0.74rem;
    font-weight: 500;
    padding-top: 0.2em;
}

.about-facts dd {
    margin: 0;
    color: var(--ink-soft);
    font-size: 0.92em;
    line-height: 1.6;
}

.elsewhere {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.4rem;
    margin: 2.25rem 0 0;
    font-size: 0.78rem;
    font-weight: 500;
}

.elsewhere span {
    color: var(--ink-soft);
}

.elsewhere a {
    color: var(--ink-soft);
    text-decoration: none;
}

.elsewhere a:hover {
    color: var(--accent);
}

.site-footer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1.5rem;
    padding-block: 1.75rem 2.5rem;
    border-top: 1px solid var(--line);
    color: var(--ink-soft);
    font-size: 0.76rem;
    line-height: 1.6;
}

.site-footer p {
    max-width: 30rem;
    margin: 0.2rem 0;
}

.site-footer .footer-name {
    color: var(--ink);
    font-size: 0.82rem;
    font-weight: 600;
}

.site-footer nav {
    display: flex;
    flex-wrap: wrap;
    align-items: start;
    justify-content: end;
    gap: 1rem;
}

.site-footer nav a {
    color: var(--ink-soft);
}

.site-footer .footer-small {
    grid-column: 1 / -1;
    padding-top: 0.75rem;
    font-size: 0.7rem;
}

.article-main {
    padding-block: clamp(3.5rem, 8vw, 5.5rem) clamp(4rem, 9vw, 7rem);
}

.article {
    width: 100%;
    margin-inline: auto;
}

.article-header {
    padding-bottom: clamp(2.25rem, 5vw, 3.5rem);
    border-bottom: 1px solid var(--line);
}

.back-link {
    display: inline-block;
    margin-bottom: clamp(2.25rem, 6vw, 4rem);
}

.article-header .section-label {
    margin-bottom: 0.85rem;
}

.article-header h1 {
    max-width: 22ch;
    margin-bottom: 1.1rem;
    font-size: clamp(1.75rem, 4.2vw, 2.4rem);
    line-height: 1.2;
}

.article-deck {
    max-width: 38rem;
    margin: 0;
    color: var(--ink-soft);
    font-size: clamp(1.05rem, 1.8vw, 1.2rem);
    line-height: 1.55;
}

.article-meta {
    margin-top: 1.5rem;
}

.article-body {
    padding-block: clamp(2.5rem, 6vw, 4rem);
    font-size: clamp(1.02rem, 0.98rem + 0.2vw, 1.12rem);
    line-height: 1.75;
}

.article-body > * {
    max-width: 42rem;
    margin-inline: auto;
}

.article-body h2,
.article-body h3,
.article-body h4 {
    margin-top: 2.25em;
    margin-bottom: 0.65em;
}

.article-body h2 {
    font-size: 1.4rem;
}

.article-body h3 {
    font-size: 1.15rem;
}

.article-body h4 {
    color: var(--ink-soft);
    font-family: var(--sans);
    font-size: 0.78rem;
    font-weight: 600;
}

.article-body p,
.article-body ul,
.article-body ol,
.article-body blockquote,
.article-body pre,
.article-body figure {
    margin-top: 0;
    margin-bottom: 1.5em;
}

.article-body ul,
.article-body ol {
    padding-left: 1.35em;
}

.article-body li {
    padding-left: 0.25em;
    margin-bottom: 0.55em;
}

.article-body li::marker {
    color: var(--ink-soft);
}

.article-body blockquote {
    padding: 0.2rem 0 0.2rem 1.4rem;
    border-left: 2px solid var(--line);
    color: var(--ink-soft);
    font-style: italic;
}

.article-body blockquote p {
    margin: 0;
}

.article-body hr {
    width: 4rem;
    margin: 3rem auto;
    border: 0;
    border-top: 1px solid var(--line);
}

.article-body code {
    padding: 0.12em 0.28em;
    border-radius: 0.15rem;
    background: var(--paper-deep);
    font-family: var(--mono);
    font-size: 0.86em;
}

.article-body pre {
    overflow-x: auto;
    padding: 1.25rem;
    border: 1px solid var(--line);
    background: var(--paper-deep);
    font-size: 0.85rem;
    line-height: 1.6;
}

.article-body pre code {
    padding: 0;
    background: transparent;
}

.article-body img {
    display: block;
    width: 100%;
    height: auto;
}

.article-body figcaption {
    margin-top: 0.65rem;
    color: var(--ink-soft);
    font-family: var(--sans);
    font-size: 0.72rem;
    line-height: 1.5;
}

.article-footer {
    padding-top: 2.5rem;
    border-top: 1px solid var(--line);
    color: var(--ink-soft);
    font-size: 0.9em;
}

.article-footer p {
    max-width: 34rem;
    margin-inline: auto;
}

.article-end {
    color: var(--ink-soft);
    font-family: var(--sans);
    font-size: 0.72rem;
    text-align: center;
}

.not-found {
    min-height: 55vh;
    padding-block: clamp(4rem, 10vw, 7rem);
}

.not-found h1 {
    max-width: 18ch;
    margin-bottom: 1.1rem;
    font-size: clamp(1.75rem, 4.5vw, 2.4rem);
}

.not-found > p:not(.section-label) {
    max-width: 33rem;
    color: var(--ink-soft);
}

.not-found .text-link {
    display: inline-block;
    margin-top: 1.5rem;
}

@media (max-width: 720px) {
    .site-shell {
        width: min(100% - 1.75rem, 41rem);
    }

    .site-header {
        padding-block: 1.75rem 0;
    }

    .site-nav {
        gap: 0.9rem;
        font-size: 0.74rem;
    }

    .featured-link {
        gap: 0.75rem;
    }

    .site-footer {
        grid-template-columns: 1fr;
    }

    .site-footer nav {
        justify-content: start;
    }

    .site-footer .footer-small {
        grid-column: auto;
        padding-top: 0.5rem;
    }
}

@media (max-width: 560px) {
    .about-facts dl > div {
        grid-template-columns: 1fr;
        gap: 0.1rem;
    }
}

@media (max-width: 430px) {
    .site-nav > a[href="/#about"] {
        display: none;
    }

    .eyebrow span,
    .eyebrow span + * {
        display: none;
    }
}

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

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}

@media print {
    :root,
    :root[data-theme="dark"] {
        --paper: #ffffff;
        --paper-deep: #f4f4f4;
        --ink: #000000;
        --ink-soft: #333333;
        --line: #bbbbbb;
        --accent: #000000;
        color-scheme: light;
    }

    body {
        background: #ffffff;
        font-size: 11pt;
    }

    .site-header,
    .site-footer,
    .back-link,
    .article-footer {
        display: none;
    }

    .article-main,
    .article-body {
        padding-block: 0;
    }

    .article-header h1 {
        font-size: 24pt;
    }

    a {
        color: #000000;
    }
}
