:root {
    --bg: #f6f0e6;
    --surface: #fbf7f1;
    --text: #161616;
    --muted: #6d655c;
    --border: rgba(22, 22, 22, 0.16);
    --accent: #24463d;
    --max: 1120px;
    --reading: 760px;
    --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
    --sans: "Avenir Next", "Segoe UI", Helvetica, Arial, sans-serif;
}

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

html {
    font-size: 16px;
    min-height: 100%;
}

body {
    margin: 0;
    background:
        radial-gradient(circle at top left, rgba(36, 70, 61, 0.08), transparent 28%),
        linear-gradient(180deg, #f8f3eb 0%, var(--bg) 100%);
    color: var(--text);
    font-family: var(--sans);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

.site-header,
.site-main,
.site-footer {
    width: min(calc(100% - 3rem), var(--max));
    margin: 0 auto;
}

.site-header {
    padding: 2rem 0 1rem;
}

.site-header-inner,
.site-footer-inner,
.post-card-header,
.pagination {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1.5rem;
}

.site-brand,
.intro-title,
.article-title,
.post-card-title,
.kg-content h1,
.kg-content h2,
.kg-content h3,
.kg-content blockquote {
    font-family: var(--serif);
}

.site-brand {
    font-size: 1rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.nav-list {
    display: flex;
    gap: 1.25rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav-item a,
.article-meta,
.post-card-date,
.eyebrow,
.pagination,
.site-footer {
    color: var(--muted);
    font-size: 0.84rem;
    letter-spacing: 0.04em;
}

.nav-current a {
    color: var(--text);
}

.site-main {
    padding: 2rem 0 3.5rem;
    flex: 1 0 auto;
}

.page-shell,
.article-shell {
    width: min(100%, var(--reading));
}

.home-intro,
.article-header {
    margin-bottom: 3rem;
}

.eyebrow {
    margin: 0 0 0.75rem;
    text-transform: uppercase;
}

.intro-title,
.article-title {
    margin: 0;
    font-size: clamp(2.5rem, 7vw, 5.3rem);
    line-height: 0.95;
    font-weight: 400;
    letter-spacing: -0.03em;
}

.intro-copy,
.article-dek,
.home-description p {
    max-width: 38rem;
    margin: 1.25rem 0 0;
    color: var(--muted);
    font-size: 1.1rem;
}

.home-description {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}

.post-feed {
    display: grid;
    gap: 1.25rem;
}

.post-card {
    border-bottom: 1px solid var(--border);
}

.post-card-link {
    display: block;
    padding: 1.15rem 0 1.35rem;
    transition: transform 160ms ease, color 160ms ease;
}

.post-card-link:hover {
    color: var(--accent);
    transform: translateX(4px);
}

.post-card-title {
    margin: 0;
    font-size: clamp(1.5rem, 3vw, 2.35rem);
    line-height: 1.08;
    font-weight: 400;
}

.post-card-date {
    white-space: nowrap;
}

.post-card-excerpt {
    max-width: 44rem;
    margin: 0.65rem 0 0;
    color: var(--muted);
}

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

.meta-separator {
    opacity: 0.65;
}

.article-image {
    margin: 0 0 2.5rem;
}

.article-image img {
    border-radius: 18px;
}

.article-image figcaption {
    margin-top: 0.8rem;
    color: var(--muted);
    font-size: 0.92rem;
}

.article-content {
    font-size: 1.15rem;
}

.article-content > *:first-child {
    margin-top: 0;
}

.article-content > *:last-child {
    margin-bottom: 0;
}

.kg-content p,
.kg-content ul,
.kg-content ol,
.kg-content blockquote,
.kg-content pre,
.kg-content figure,
.kg-content h2,
.kg-content h3 {
    margin: 0 0 1.5rem;
}

.kg-content h2,
.kg-content h3 {
    line-height: 1.1;
    font-weight: 400;
}

.kg-content h2 {
    font-size: clamp(2rem, 4vw, 3rem);
}

.kg-content h3 {
    font-size: clamp(1.5rem, 3vw, 2.1rem);
}

.kg-content p,
.kg-content li {
    color: #23211f;
}

.kg-content a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 0.18em;
}

.kg-content blockquote {
    padding-left: 1.25rem;
    border-left: 2px solid var(--border);
    font-size: 1.45rem;
    line-height: 1.35;
}

.kg-content code,
.kg-content pre {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 0.92em;
}

.kg-content pre {
    overflow-x: auto;
    padding: 1rem 1.1rem;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.45);
}

.pagination {
    margin-top: 2rem;
    padding-top: 1.25rem;
}

.pagination-link:hover,
.kg-content a:hover {
    opacity: 0.8;
}

.site-footer {
    padding: 0 0 2rem;
    margin-top: auto;
}

.site-footer-inner {
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.site-footer p {
    margin: 0;
}

@media (max-width: 720px) {
    .site-header,
    .site-main,
    .site-footer {
        width: min(calc(100% - 1.5rem), var(--max));
    }

    .site-header-inner,
    .site-footer-inner,
    .post-card-header,
    .pagination {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .nav-list {
        flex-wrap: wrap;
        gap: 0.75rem 1rem;
    }

    .post-card-link:hover {
        transform: none;
    }

    .article-content {
        font-size: 1.05rem;
    }
}
.kg-width-wide,
.kg-width-full {
    width: min(calc(100vw - 3rem), var(--max));
    max-width: none;
}

.kg-width-wide {
    margin-left: min(0px, calc((var(--reading) - min(calc(100vw - 3rem), var(--max))) / 2));
}

.kg-width-full {
    margin-left: calc(50% - 50vw + 1.5rem);
}

.kg-width-wide img,
.kg-width-full img {
    width: 100%;
}

.kg-gallery-card,
.kg-image-card {
    margin-left: 0;
    margin-right: 0;
}

@media (max-width: 720px) {
    .kg-width-wide,
    .kg-width-full {
        width: 100%;
        margin-left: 0;
    }
}
