:root {
    --background: #fbfbfa;
    --surface: #f1f1ef;
    --ink: #111111;
    --muted: #666663;
    --line: #dededa;
    --serif: var(--gh-font-heading, "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif);
    --sans: var(--gh-font-body, Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
    --inner: 1120px;
    --article: 720px;
}

* {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    background: var(--background);
    color: var(--ink);
    font-family: var(--sans);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

button,
input,
textarea {
    font: inherit;
}

a {
    color: inherit;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.18em;
}

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

.site-shell {
    min-height: 100vh;
}

.outer {
    padding-inline: 32px;
}

.inner {
    width: min(100%, var(--inner));
    margin-inline: auto;
}

.article-width {
    width: min(100%, var(--article));
    margin-inline: auto;
}

.image-width {
    width: min(100%, 1040px);
    margin-inline: auto;
}

.site-header {
    border-bottom: 1px solid transparent;
}

.site-header-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    min-height: 118px;
    gap: 32px;
}

.site-brand {
    justify-self: start;
    font-size: 1.08rem;
    font-weight: 800;
    letter-spacing: -0.035em;
    text-decoration: none;
}

.site-brand img {
    width: auto;
    max-width: 210px;
    max-height: 44px;
}

.site-navigation .nav {
    display: flex;
    align-items: center;
    gap: 30px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-navigation a {
    font-size: 0.93rem;
    text-decoration: none;
}

.site-navigation a:hover,
.site-navigation .nav-current a {
    text-decoration: underline;
}

.search-button {
    display: grid;
    width: 42px;
    height: 42px;
    justify-self: end;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--ink);
    cursor: pointer;
}

.search-button:hover {
    background: var(--surface);
}

.search-button svg {
    width: 21px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-width: 1.6;
}

.home-hero {
    padding-top: clamp(68px, 10vw, 128px);
    padding-bottom: clamp(72px, 9vw, 112px);
}

.home-hero-inner {
    max-width: 780px;
}

.eyebrow {
    margin: 0 0 22px;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.home-hero h1,
.archive-header h1,
.error-page h1 {
    margin: 0;
    font-family: var(--serif);
    font-size: clamp(3.25rem, 7vw, 6.25rem);
    font-weight: 600;
    letter-spacing: -0.055em;
    line-height: 0.98;
}

.home-hero-description {
    max-width: 660px;
    margin: 30px 0 0;
    color: #30302e;
    font-size: clamp(1.05rem, 1.8vw, 1.24rem);
    line-height: 1.55;
}

.entry-feed {
    padding-bottom: 112px;
}

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

.section-heading h2 {
    margin: 0;
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.section-heading span {
    color: var(--muted);
    font-size: 0.78rem;
}

.entry-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 64px 38px;
}

.entry-card-image {
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    border-radius: 5px;
    background: var(--surface);
}

.entry-card-image img,
.entry-card-image picture {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.entry-card-image img {
    transition: transform 450ms cubic-bezier(0.2, 0.65, 0.3, 1);
}

.entry-card:hover .entry-card-image img {
    transform: scale(1.018);
}

.entry-card-placeholder {
    position: relative;
    display: grid;
    width: 100%;
    height: 100%;
    place-items: center;
    background:
        radial-gradient(circle at 20% 10%, #dfdfdb 0 2px, transparent 3px),
        linear-gradient(135deg, #eeeeeb, #d8d8d3);
}

.entry-card-placeholder::before,
.entry-card-placeholder::after,
.entry-card-placeholder i {
    position: absolute;
    content: "";
    border: 1px solid rgba(17, 17, 17, 0.24);
    border-radius: 50%;
}

.entry-card-placeholder::before {
    width: 86px;
    height: 86px;
}

.entry-card-placeholder::after {
    width: 44px;
    height: 44px;
}

.entry-card-placeholder i {
    width: 130px;
    height: 1px;
    border-width: 1px 0 0;
    border-radius: 0;
    transform: rotate(-28deg);
}

.entry-card-body {
    padding-top: 20px;
}

.entry-card h3 {
    margin: 0;
    font-family: var(--serif);
    font-size: clamp(1.55rem, 2.6vw, 2.2rem);
    font-weight: 600;
    letter-spacing: -0.035em;
    line-height: 1.12;
}

.entry-card h3 a {
    text-decoration: none;
}

.entry-card h3 a:hover {
    text-decoration: underline;
}

.entry-card-body > p {
    display: -webkit-box;
    overflow: hidden;
    margin: 14px 0 0;
    color: var(--muted);
    font-size: 0.94rem;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.entry-card-meta {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 20px;
    margin-top: 22px;
    color: var(--muted);
    font-size: 0.76rem;
}

.tag-pill {
    width: max-content;
    padding: 5px 9px;
    border-radius: 5px;
    background: var(--surface);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 0.72rem;
    font-weight: 500;
    line-height: 1;
    text-decoration: none;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 76px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.82rem;
}

.pagination div {
    display: flex;
    gap: 24px;
}

.archive-header {
    padding-top: 90px;
    padding-bottom: 88px;
}

.archive-header-inner {
    max-width: 780px;
}

.archive-header p:last-child {
    max-width: 620px;
    margin: 28px 0 0;
    color: var(--muted);
    font-size: 1.1rem;
}

.article {
    padding-top: clamp(70px, 9vw, 116px);
    padding-bottom: 110px;
}

.article-header h1 {
    margin: 24px 0 0;
    font-family: var(--serif);
    font-size: clamp(3rem, 6.5vw, 5.5rem);
    font-weight: 600;
    letter-spacing: -0.055em;
    line-height: 1.01;
}

.article-deck {
    margin: 28px 0 0;
    color: #3f3f3c;
    font-size: clamp(1.08rem, 1.8vw, 1.28rem);
    line-height: 1.55;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
    margin-top: 28px;
    color: var(--muted);
    font-size: 0.8rem;
}

.article-authors a {
    color: var(--ink);
    font-family: var(--serif);
    font-weight: 700;
    text-decoration: none;
}

.article-image {
    margin-top: 62px;
    margin-bottom: 68px;
}

.article-image img {
    width: 100%;
    max-height: 760px;
    object-fit: cover;
    border-radius: 5px;
}

figcaption {
    margin-top: 10px;
    color: var(--muted);
    font-size: 0.74rem;
    text-align: center;
}

.gh-content {
    font-family: var(--serif);
    font-size: clamp(1.12rem, 1.5vw, 1.25rem);
    line-height: 1.72;
}

.gh-content > * {
    margin-top: 0;
    margin-bottom: 1.45em;
}

.gh-content h2,
.gh-content h3,
.gh-content h4 {
    margin-top: 2.15em;
    margin-bottom: 0.7em;
    letter-spacing: -0.035em;
    line-height: 1.15;
}

.gh-content h2 {
    font-size: 2rem;
}

.gh-content h3 {
    font-size: 1.55rem;
}

.gh-content a {
    text-decoration-color: #999;
}

.gh-content blockquote {
    margin-left: 0;
    padding-left: 24px;
    border-left: 2px solid var(--ink);
    font-size: 1.35em;
    font-style: italic;
    line-height: 1.45;
}

.gh-content img {
    height: auto;
    border-radius: 4px;
}

.gh-content .kg-width-wide {
    width: min(920px, calc(100vw - 64px));
    margin-left: 50%;
    transform: translateX(-50%);
}

.gh-content .kg-width-full {
    width: 100vw;
    margin-left: 50%;
    transform: translateX(-50%);
}

.gh-content pre,
.gh-content code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.gh-content pre {
    overflow-x: auto;
    padding: 22px;
    border-radius: 5px;
    background: #191918;
    color: #f5f5f2;
    font-size: 0.82em;
}

.gh-content :not(pre) > code {
    padding: 0.15em 0.35em;
    border-radius: 3px;
    background: var(--surface);
    font-size: 0.88em;
}

.gh-content hr {
    width: 90px;
    margin: 3em auto;
    border: 0;
    border-top: 1px solid var(--line);
}

.gh-content table {
    display: block;
    overflow-x: auto;
    width: 100%;
    border-collapse: collapse;
    font-family: var(--sans);
    font-size: 0.82em;
}

.gh-content th,
.gh-content td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
}

.article-footer {
    margin-top: 72px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
    font-size: 0.86rem;
}

.article-footer a,
.text-link {
    text-decoration: none;
}

.page-article .article-header {
    text-align: center;
}

.empty-state {
    padding: 80px 0;
    color: var(--muted);
    font-family: var(--serif);
    font-size: 1.4rem;
}

.error-page {
    min-height: 62vh;
    padding-top: 120px;
    padding-bottom: 120px;
}

.error-page h1 {
    font-size: clamp(3rem, 8vw, 6rem);
}

.error-page .text-link {
    display: inline-block;
    margin-top: 28px;
    font-weight: 700;
}

.site-footer {
    padding-bottom: 44px;
}

.site-footer-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 24px;
    padding-top: 30px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.78rem;
}

.site-footer-inner p {
    margin: 0;
    text-align: center;
}

.site-footer-inner > span {
    justify-self: end;
}

.footer-brand {
    color: var(--ink);
    font-size: 0.92rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    text-decoration: none;
}

@media (max-width: 760px) {
    .outer {
        padding-inline: 20px;
    }

    .site-header-inner {
        grid-template-columns: 1fr auto;
        min-height: 88px;
        gap: 18px;
    }

    .site-navigation {
        grid-column: 1 / -1;
        grid-row: 2;
        padding-bottom: 20px;
    }

    .site-navigation .nav {
        gap: 22px;
        overflow-x: auto;
        padding-bottom: 3px;
    }

    .home-hero {
        padding-top: 64px;
        padding-bottom: 74px;
    }

    .entry-grid {
        grid-template-columns: 1fr;
        gap: 54px;
    }

    .section-heading span {
        display: none;
    }

    .article {
        padding-top: 64px;
        padding-bottom: 80px;
    }

    .article-image {
        margin-top: 44px;
        margin-bottom: 48px;
    }

    .gh-content .kg-width-wide {
        width: calc(100vw - 40px);
    }

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

    .site-footer-inner p {
        display: none;
    }
}

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

    .entry-card-image img {
        transition: none;
    }
}
