:root {
    --background: #0d0d0d;
    --surface: #151515;
    --surface-elevated: #1b1b1b;
    --foreground: #f4f1ea;
    --muted: #aca498;
    --hairline: #2a2a2a;
    --accent: #d59a4b;
    --shadow: 0 28px 80px rgba(0, 0, 0, 0.36);
    --content-width: min(720px, calc(100vw - 40px));
    --stream-width: min(760px, calc(100vw - 40px));
    --font-sans: 'Avenir Next', 'Inter', 'SF Pro Display',
        'Helvetica Neue', Helvetica, Arial, sans-serif;
    --font-body: 'Avenir Next', 'Inter', 'SF Pro Text',
        'Helvetica Neue', Helvetica, Arial, sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--background);
    color: var(--foreground);
    font-family: var(--font-body);
    line-height: 1.7;
    text-rendering: optimizeLegibility;
    color-scheme: dark;
}

a {
    color: inherit;
    text-decoration-color: rgba(213, 154, 75, 0.58);
    text-underline-offset: 0.18em;
}

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

img,
video,
iframe,
audio {
    max-width: 100%;
}

img {
    display: block;
    height: auto;
}

pre,
code {
    font-family: 'SFMono-Regular', Menlo, Consolas, monospace;
}

pre {
    overflow-x: auto;
    padding: 18px 20px;
    border: 1px solid var(--hairline);
    background: #171717;
    color: #eee9df;
    font-size: 0.94rem;
    line-height: 1.55;
}

code {
    font-size: 0.92em;
}

blockquote {
    margin: 32px 0;
    padding-left: 18px;
    border-left: 2px solid rgba(213, 154, 75, 0.48);
    color: #d1cbc2;
}

hr {
    margin: 48px 0;
    border: 0;
    border-top: 1px solid var(--hairline);
}

.page-shell {
    padding: 48px 0 96px;
}

.site-header {
    width: var(--content-width);
    margin: 0 auto 88px;
    text-align: center;
}

.site-header--compact {
    margin-bottom: 56px;
}

.post-hero {
    width: var(--content-width);
    margin: 0 auto 56px;
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    column-gap: 28px;
    row-gap: 14px;
    align-items: center;
}

.post-hero__name {
    margin: 0;
    width: 64px;
    color: var(--muted);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0;
    text-transform: none;
    align-self: center;
    text-align: center;
}

.post-hero__name a {
    text-decoration: none;
}

.post-hero__avatar {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border-radius: 999px;
    overflow: hidden;
    background: #23201c;
    color: #e5c49c;
    box-shadow: var(--shadow);
    text-decoration: none;
    align-self: center;
}

.post-hero__avatar-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-hero__avatar-fallback {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 0;
}

.post-hero__title,
.post-stream__title {
    margin: 0;
    font-size: 2em;
    line-height: 1.25;
    font-weight: 600;
    letter-spacing: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI',
        'Noto Sans', Helvetica, Arial, sans-serif,
        'Apple Color Emoji', 'Segoe UI Emoji';
    overflow-wrap: break-word;
    min-width: 0;
    word-wrap: break-word;
}

.post-hero__title {
    align-self: center;
}

.post-hero__title a {
    text-decoration: none;
}

.site-mark {
    display: grid;
    place-items: center;
    width: 128px;
    height: 128px;
    margin: 0 auto 26px;
    border-radius: 999px;
    overflow: hidden;
    background: #23201c;
    color: #e5c49c;
    box-shadow: var(--shadow);
}

.site-mark--link {
    display: grid;
    place-items: center;
    text-decoration: none;
}

.site-mark__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.site-mark__fallback {
    font-size: 2.8rem;
    font-weight: 700;
    letter-spacing: 0;
}

.site-header__copy {
    width: var(--content-width);
    margin: 0 auto;
    text-align: center;
}

.site-header__eyebrow {
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 0.88rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.site-header__eyebrow a {
    text-decoration: none;
}

.site-header__title {
    margin: 0;
    font-size: 36px;
    line-height: 0.98;
    font-weight: 650;
    letter-spacing: 0;
    font-family: var(--font-sans);
}

.site-header__title a {
    text-decoration: none;
}

.site-header__description,
.site-header__meta {
    margin: 18px auto 0;
    max-width: 36rem;
    color: var(--muted);
    font-size: 1.02rem;
}

.social-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin: 22px auto 0;
}

.social-links__item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--hairline);
    border-radius: 999px;
    background: var(--surface-elevated);
    color: var(--muted);
    text-decoration: none;
    box-shadow: var(--shadow);
    transition: color 0.16s ease, border-color 0.16s ease,
        transform 0.16s ease;
}

.social-links__item:hover {
    color: var(--foreground);
    border-color: rgba(213, 154, 75, 0.5);
    transform: translateY(-1px);
}

.social-links__icon {
    display: inline-flex;
    width: 18px;
    height: 18px;
}

.social-links__icon svg {
    width: 100%;
    height: 100%;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.post-stream {
    width: var(--stream-width);
    margin: 0 auto;
}

.post-stream__item {
    margin-bottom: 120px;
    content-visibility: auto;
    contain-intrinsic-size: 1px 900px;
}

.post-stream__header {
    width: var(--content-width);
    margin: 0 auto 34px;
    text-align: center;
}

.post-hero__meta {
    margin: 0;
    color: #8f8880;
    font-size: 1rem;
    line-height: 1.2;
    align-self: center;
}

.post-stream__title a {
    text-decoration: none;
}

.post-stream__date {
    margin: 14px 0 0;
    color: #8f8880;
    font-size: 1rem;
}

.post-stream__content,
.post-detail,
.comments,
.post-taxonomy {
    width: var(--content-width);
    margin-left: auto;
    margin-right: auto;
}

.prose {
    font-family: var(--font-body);
    font-size: 1.02rem;
    line-height: 1.95;
    color: #ddd7ce;
}

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

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

.prose h1,
.prose h2,
.prose h3,
.prose h4 {
    font-family: var(--font-sans);
    line-height: 1.15;
    letter-spacing: 0;
    color: var(--foreground);
}

.prose p,
.prose ul,
.prose ol,
.prose pre,
.prose blockquote {
    margin-top: 1.2em;
    margin-bottom: 1.2em;
}

.prose p,
.prose li {
    color: #ddd7ce;
}

.prose ul,
.prose ol {
    padding-left: 1.3em;
    color: #d4cec5;
}

.prose li + li {
    margin-top: 0.35em;
}

.prose strong {
    color: #f3eee5;
}

.prose a > img,
.prose p > img,
.prose figure > img {
    width: auto;
    max-width: 100%;
    margin: 28px 0;
}

.prose video,
.prose iframe {
    width: auto;
    max-width: 100%;
    margin: 28px 0;
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.04);
    box-shadow: var(--shadow);
}

.prose a > img {
    display: block;
}

.comments,
.post-taxonomy {
    margin-top: 72px;
    padding-top: 32px;
    border-top: 1px solid var(--hairline);
}

.pagination {
    width: var(--content-width);
    margin: 12px auto 72px;
    display: grid;
    grid-template-columns: minmax(96px, auto) 1fr minmax(96px, auto);
    grid-template-areas:
        'newer meta older'
        'decade decade decade';
    align-items: center;
    gap: 15px 18px;
}

.pagination > :first-child {
    grid-area: newer;
}

.pagination > :last-child {
    grid-area: older;
}

.pagination__meta {
    grid-area: meta;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pagination__status {
    margin: 0;
    color: var(--muted);
    font-size: 0.96rem;
    font-weight: 600;
    text-align: center;
}

.pagination__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    min-height: 42px;
    padding: 0 14px;
    border: 1px solid var(--hairline);
    background: var(--surface-elevated);
    color: var(--foreground);
    text-decoration: none;
    font-size: 0.96rem;
    font-weight: 600;
    box-shadow: var(--shadow);
}

.pagination__link--edge {
    min-width: 96px;
}

.pagination__link.is-current {
    border-color: var(--accent);
    color: var(--accent);
}

.pagination__link.is-disabled {
    color: #78736d;
    box-shadow: none;
}

.decade-jump {
    grid-area: decade;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0;
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.5;
}

.decade-jump__link {
    display: inline-block;
    color: var(--muted);
    text-decoration: none;
}

.decade-jump__separator {
    margin: 0 0.6rem;
    color: #78736d;
}

.decade-jump__link:hover {
    color: var(--foreground);
}

.comments h2 {
    margin: 0 0 18px;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: 0;
}

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

.site-footer {
    width: var(--content-width);
    margin: 64px auto 0;
    padding-top: 26px;
    border-top: 1px solid var(--hairline);
    color: var(--muted);
    text-align: center;
    font-size: 0.94rem;
}

.site-footer p {
    margin: 0;
}

.site-footer a {
    text-decoration: none;
}

.meta-label {
    margin-right: 10px;
    color: var(--muted);
    font-size: 0.88rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.comments__item + .comments__item {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--hairline);
}

.comments__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: baseline;
    color: var(--muted);
    font-size: 0.95rem;
}

.comments__content {
    margin-top: 10px;
    font-family: var(--font-body);
}

@media (max-width: 720px) {
    .page-shell {
        padding-top: 28px;
        padding-bottom: 72px;
    }

    .site-header {
        margin-bottom: 64px;
    }

    .post-hero {
        width: var(--content-width);
        margin-bottom: 44px;
        grid-template-columns: 1fr;
        gap: 24px;
        text-align: center;
        align-items: start;
    }

    .post-hero__avatar,
    .post-hero__title,
    .post-hero__name,
    .post-hero__meta {
        justify-self: center;
    }

    .post-hero__avatar {
        width: 64px;
        height: 64px;
    }

    .site-mark {
        width: 92px;
        height: 92px;
        margin-bottom: 20px;
    }

    .site-header__description,
    .site-header__meta,
    .prose {
        font-size: 1rem;
    }

    .social-links {
        gap: 10px;
    }

    .post-stream__item {
        margin-bottom: 88px;
    }

    .comments,
    .post-taxonomy {
        margin-top: 56px;
    }

    .pagination {
        margin-bottom: 56px;
        display: grid;
        grid-template-columns: minmax(80px, auto) 1fr minmax(80px, auto);
        grid-template-areas:
            'newer meta older'
            'decade decade decade';
        align-items: center;
        gap: 18px 10px;
    }

    .pagination__meta {
        justify-self: center;
    }

    .pagination__link--edge {
        width: 100%;
        min-width: 80px;
        padding: 0 10px;
    }

    .pagination__status {
        width: auto;
        font-size: 0.92rem;
    }

    .decade-jump {
        width: 100%;
        font-size: 0.9rem;
        line-height: 1.45;
    }

    .site-footer {
        margin-top: 56px;
    }
}
