/* ── reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── tokens ── */
:root {
    --font-sans: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --font-body: Georgia, 'Times New Roman', Times, serif;
    --size-base: 16px;
    --size-sm: 13px;
    --size-nav: 13px;
    --size-post: 15px;
    --line: 1.75;
    --color-bg: #ffffff;
    --color-text: #111111;
    --color-muted: #888888;
    --max-width: 680px;
    --pad-x: 2rem;
    --pad-y: 3rem;
}

html, body { height: 100%; }

body {
    font-family: var(--font-body);
    font-size: var(--size-base);
    line-height: var(--line);
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
}

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

/* ── layout ── */
.site-wrapper {
    max-width: var(--max-width);
    width: 100%;
    margin: 0 auto;
    padding: var(--pad-y) var(--pad-x);
    padding-bottom: 5rem;
    min-height: 100vh;
    position: relative;
}

.site-main { flex: none; }
.spacer { flex: 1; }

/* ── header ── */
.site-header {
    text-align: center;
    margin-bottom: 3rem;
}

/* ── site title ── */
.site-title {
    font-family: var(--font-sans);
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    line-height: 1.1;
    display: block;
    color: var(--color-text);
    margin-bottom: 0.35rem;
    cursor: default;
}

/* ── site description ── */
.site-desc {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-muted);
    margin-bottom: 1.5rem;
}

/* ── nav ── */
.site-nav {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 2rem;
    width: 100%;
}

.site-nav a {
    font-family: var(--font-sans);
    font-size: var(--size-nav);
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--color-muted);
    text-decoration: none;
    line-height: 1.8;
    transition: color 0.1s;
}

.site-nav a:hover { color: var(--color-text); text-decoration: none; }

.home-template .site-nav a:first-child,
.tag-template .site-nav a:first-child,
.paged .site-nav a:first-child { color: var(--color-text); }

.page-template .site-nav a:nth-child(2) { color: var(--color-text); }

/* ── post list ── */
.post-item { padding: 0.3rem 0; line-height: 1.6; }

.post-title {
    font-family: var(--font-body);
    font-size: var(--post-header);
    font-weight: 700;
}

.post-title a { color: var(--color-text); }
.post-title a:hover { text-decoration: underline; }

.post-subtitle {
    font-family: var(--font-body);
    font-size: var(--size-post);
    font-weight: 400;
    color: var(--color-muted);
    margin-top: 0.2rem;
}

/* ── tags ── */
.post-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 0.2rem; }

.tag {
    font-family: var(--font-body);
    font-size: 11px;
    color: var(--color-muted);
    text-decoration: none;
}

.tag:hover { color: var(--color-text); text-decoration: none; }

/* ── tag archive ── */
.tag-header { margin-bottom: 2rem; }
.tag-label { font-family: var(--font-sans); font-size: var(--size-sm); font-weight: 300; letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-muted); display: block; margin-bottom: 0.25rem; }
.tag-name { font-family: var(--font-sans); font-size: 2rem; font-weight: 300; text-transform: uppercase; letter-spacing: 0.1em; }
.tag-description { color: var(--color-muted); margin-top: 0.5rem; }

/* ── single post ── */
.post-full { max-width: 100%; }
.post-header { margin-bottom: 0.75rem; }

.post-header .post-title {
    font-family: var(--font-body);
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
    display: block;
    margin-bottom: 0.4rem;
}

.post-header .post-subtitle {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 400;
    font-style: italic;
    color: var(--color-muted);
    display: block;
    margin-bottom: 0.6rem;
}

.post-header .post-meta {
    font-family: var(--font-sans);
    font-size: var(--size-sm);
    font-weight: 300;
    letter-spacing: 0.05em;
    color: var(--color-muted);
    display: flex;
    gap: 1rem;
}

/* ── post content ── */
.post-content {
    font-family: var(--font-body);
    font-size: var(--size-base);
    line-height: var(--line);
    padding-top: 0.75rem;
}

.post-content p { margin-bottom: 1.3rem; }
.post-content h2 { font-family: var(--font-body); font-size: 1.2rem; font-weight: 700; margin: 2.5rem 0 0.75rem; }
.post-content h3 { font-family: var(--font-body); font-size: 1rem; font-weight: 700; margin: 1.75rem 0 0.5rem; }
.post-content a { text-decoration: underline; }

.post-content blockquote {
    padding-left: 1.25rem;
    color: var(--color-muted);
    font-style: italic;
    margin: 1.5rem 0;
}

.post-content pre {
    font-family: 'Courier New', monospace;
    background: #f5f5f5;
    padding: 1rem;
    overflow-x: auto;
    margin: 1.5rem 0;
    border-radius: 3px;
    font-size: 13px;
}

.post-content code {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    background: #f5f5f5;
    padding: 1px 5px;
    border-radius: 2px;
}

.post-content pre code { background: none; padding: 0; }
.post-content img { max-width: 100%; height: auto; margin: 1.5rem 0; }
.post-content ul, .post-content ol { padding-left: 1.5rem; margin-bottom: 1.25rem; }
.post-content li { margin-bottom: 0.25rem; }
.post-content hr { border: none; margin: 2rem 0; }

.post-content .footnotes {
    font-size: 13px;
    color: var(--color-muted);
    margin-top: 3rem;
    padding-top: 1rem;
}

/* ── footer ── */
.site-footer {
    position: absolute;
    bottom: 1.5rem;
    left: var(--pad-x);
    right: var(--pad-x);
}

/* ── pagination ── */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-body);
    font-size: var(--size-sm);
    color: var(--color-muted);
}

.pagination-prev, .pagination-next { color: var(--color-text); }
.pagination-placeholder { width: 60px; }

/* ── responsive ── */
@media (max-width: 600px) {
    :root { --pad-x: 1.25rem; --pad-y: 1.75rem; }
}
