body {
    max-width: 900px;
    margin: 0 auto;
    font-family: 'Courier New', Courier, monospace;
    font-size: 16px;
    line-height: 1.65;
    color: var(--text);
    background: var(--bg);
}

:root {
    --bg: #f5f2eb;
    --text: #2a2a2a;
    --muted: #888;
    --rule: #ccc;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #1a1a1a;
        --text: #e0ddd5;
        --muted: #777;
        --rule: #444;
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* header */
.site-header {
    padding: 3rem 2rem 1rem;
}

.site-title-link {
    text-decoration: none;
    display: inline-block;
}

.site-title-img {
    display: block;
    max-height: 60px;
    width: auto;
}

.site-title-text {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--text);
}

/* layout */
.layout {
    display: flex;
    padding: 1rem 2rem 0.5rem;
    gap: 4.5rem;
}

/* posts */
.posts {
    flex: 1;
    min-width: 0;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--rule);
}

.post {
    margin-bottom: 4rem;
}

.post-meta {
    font-size: 0.8rem;
    color: var(--muted);
    margin-bottom: 0.25rem;
}

.post h2 {
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1.5rem;
}

.post-body p {
    margin-bottom: 1em;
}

.post-body blockquote {
    border-left: 2px solid var(--rule);
    padding-left: 1.25rem;
    margin: 1.5em 0;
    font-style: italic;
    color: var(--muted);
}

.post-body img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1.5em 0;
}

.post-body h3, .post-body h4 {
    margin-top: 2em;
    margin-bottom: 0.5em;
}

.post-body hr {
    border: none;
    border-top: 1px solid var(--rule);
    margin: 2.5em 0;
}

.post-body a {
    color: var(--text);
}

.post-body a:hover {
    text-decoration: none;
}

.post-body code {
    font-size: 0.9em;
}

.post-separator {
    border: none;
    border-top: 1px solid var(--rule);
    margin: 0 0 4rem;
}

.loading {
    color: var(--muted);
    font-size: 0.85rem;
}

/* load more */
.load-more {
    display: block;
    margin: 2rem 0;
    padding: 0.5rem 1.5rem;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.85rem;
    color: var(--muted);
    background: transparent;
    border: 1px solid var(--rule);
    cursor: pointer;
    letter-spacing: 0.05em;
}

.load-more:hover {
    color: var(--text);
    border-color: var(--text);
}

/* archive sidebar */
.archive-sidebar {
    width: 190px;
    flex-shrink: 0;
    font-size: 0.8rem;
    position: sticky;
    top: 4rem;
    align-self: flex-start;
    max-height: calc(100vh - 6rem);
    overflow-y: auto;
}

.archive-sidebar h2 {
    font-size: 0.75rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--muted);
    margin-bottom: 0.75rem;
}

.archive-year summary {
    cursor: pointer;
    font-weight: 700;
    color: var(--text);
    list-style: none;
}

.archive-year summary::-webkit-details-marker {
    display: none;
}

.archive-month {
    display: block;
    padding-left: 0.75rem;
    color: var(--muted);
    text-decoration: none;
}

.archive-month:hover {
    color: var(--text);
}

.archive-month .count {
    opacity: 0.5;
}

/* footer */
.site-footer {
    max-width: 900px;
    margin: 0 auto;
    padding: 1.5rem 2rem 2rem;
    font-size: 0.65rem;
    letter-spacing: 0.03em;
}

.site-footer span {
    opacity: 0.5;
    color: var(--muted);
}

.site-footer a {
    color: var(--muted);
    opacity: 0.5;
}

/* responsive */
@media (max-width: 700px) {
    .layout {
        flex-direction: column-reverse;
        padding: 1rem 1.25rem 0.5rem;
        gap: 2rem;
    }

    .archive-sidebar {
        width: 100%;
        position: static;
        max-height: none;
        border-bottom: 1px solid var(--rule);
        padding-bottom: 1.5rem;
    }

    .posts {
        padding-bottom: 0.75rem;
        border-bottom: 1px solid var(--rule);
    }

    .site-header {
        padding: 2rem 1.25rem 0.5rem;
    }

    .site-title-img {
        max-height: 45px;
    }
}
