:root {
    color-scheme: light;
    --paper: #f8f6f1;
    --ink: #302e29;
    --muted: #706b62;
    --accent: #48634c;
    --line: #dfdcd3;
    --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    background: var(--paper);
    font-synthesis: none;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding-inline: 24px;
    font-size: 16px;
    line-height: 1.6;
    -webkit-text-size-adjust: 100%;
}

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

a {
    color: inherit;
    text-underline-offset: 4px;
    text-decoration-thickness: 1px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: #48634c1a;
}

a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 6px;
    border-radius: 2px;
}

.skip-link {
    position: absolute;
    top: 16px;
    left: 24px;
    z-index: 1;
    padding: 8px 16px;
    background: var(--paper);
    transform: translateY(-200%);
}

.skip-link:focus {
    transform: none;
}

.shell {
    width: 100%;
    max-width: 680px;
    margin-inline: auto;
}

.home .shell {
    max-width: 620px;
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding-block: 56px;
}

.identity {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
}

.identity img {
    display: block;
    border-radius: 50%;
}

.text-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    color: var(--muted);
    font-size: 14px;
    text-decoration: none;
}

.intro {
    padding-block: 112px 52px;
}

.eyebrow {
    margin: 0 0 16px;
    color: var(--accent);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1,
.post-title {
    font-family:
        "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
    font-weight: 400;
    letter-spacing: -0.045em;
    text-wrap: balance;
}

.intro .eyebrow {
    color: var(--muted);
    font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
    font-weight: 400;
    letter-spacing: 0.01em;
    text-transform: none;
}

.intro h1 {
    margin-bottom: 12px;
    font-size: clamp(32px, 4.6vw, 40px);
    line-height: 1.2;
}

.intro-description {
    margin-bottom: 0;
    color: var(--muted);
    font-size: 16px;
}

.writing-section {
    scroll-margin-top: 32px;
}

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

.section-heading h2 {
    margin-bottom: 0;
    font-size: 16px;
    font-weight: 500;
}

.section-note,
.post-meta {
    color: var(--muted);
    font-size: 12px;
}

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

.post-link {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 24px;
    padding-block: 24px;
    border-bottom: 1px solid var(--line);
    text-decoration: none;
}

.post-meta {
    display: block;
    margin-bottom: 10px;
    letter-spacing: 0.02em;
}

.home .post-meta {
    font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
    font-size: 11px;
}

.post-title {
    margin-bottom: 10px;
    font-size: 25px;
    line-height: 1.3;
}

.post-excerpt {
    max-width: 49ch;
    margin-bottom: 16px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.7;
}

.read-story {
    color: var(--accent);
    font-size: 13px;
    font-weight: 500;
}

.post-arrow {
    align-self: center;
    color: var(--accent);
    font-size: 24px;
}

.site-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px 24px;
    padding-block: 48px 32px;
    color: var(--muted);
    font-size: 12px;
}

.home .site-footer {
    padding-top: 28px;
}

.site-footer p {
    margin: 0;
}

.article-header {
    padding-block: 24px 36px;
    border-bottom: 1px solid var(--line);
}

.article-header h1 {
    max-width: 15ch;
    margin-bottom: 24px;
    font-size: clamp(38px, 7vw, 58px);
    line-height: 1.1;
}

.article-header .post-meta {
    margin-bottom: 0;
}

.prose {
    padding-top: 36px;
    font-family:
        "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
    font-size: 19px;
    line-height: 1.85;
    overflow-wrap: break-word;
}

.prose p {
    margin-bottom: 24px;
}

.prose ol {
    margin-block: 0 28px;
    padding-left: 26px;
}

.prose li {
    padding-left: 8px;
    margin-bottom: 14px;
}

.prose li::marker {
    color: var(--accent);
}

.prose .hope {
    margin-block: 32px;
    color: var(--accent);
    font-size: 26px;
}

.prose .closing-note {
    margin-block: 36px 0;
    padding-left: 24px;
    border-left: 2px solid var(--accent);
}

.article-footer {
    margin-top: 48px;
    border-top: 1px solid var(--line);
}

@media (hover: hover) and (pointer: fine) {
    .text-link:hover,
    .identity:hover,
    .post-link:hover .post-title {
        color: var(--accent);
    }

    .text-link:hover,
    .post-link:hover .read-story {
        text-decoration: underline;
    }
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
    .post-arrow {
        transition: transform 160ms var(--ease-out);
    }

    .post-link:hover .post-arrow {
        transform: translateX(4px);
    }

    .post-link:active .post-arrow {
        transform: translateX(4px) scale(0.97);
    }

    .identity:active img {
        transform: scale(0.97);
    }
}

@media (max-width: 480px) {
    .site-header {
        padding-block: 28px;
    }

    .intro {
        padding-block: 64px 40px;
    }

    .post-link {
        gap: 16px;
    }

    .post-title {
        font-size: 23px;
    }

    .article-header {
        padding-top: 20px;
    }

    .prose {
        font-size: 18px;
    }
}
