/* Shared styles for blog posts — mirrors the tokens in /index.html */
:root {
    --bg: #fbfaf7;
    --surface: #ffffff;
    --ink: #15191f;
    --text: #2d323a;
    --muted: #5d6470;
    --faint: #8b919b;
    --rule: #e5e2da;
    --rule-soft: #efede7;
    --accent: #1f4e79;
    --accent-ink: #143859;
    --serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
    --sans: 'Source Sans 3', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --wrap: 68rem;
}
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 16px; }
@media (min-width: 640px) { html { font-size: 17px; } }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--serif);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 2px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1.25rem; }
@media (min-width: 768px) { .wrap { padding: 0 2rem; } }

/* Header (same as the main site) */
.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(251, 250, 247, 0.94);
    backdrop-filter: saturate(1.4) blur(8px);
    -webkit-backdrop-filter: saturate(1.4) blur(8px);
    border-bottom: 1px solid var(--rule);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 3.5rem; }
.brand { font-weight: 600; font-size: 1.12rem; color: var(--ink); white-space: nowrap; }
.brand:hover { color: var(--ink); text-decoration: none; }
.site-nav { overflow-x: auto; scrollbar-width: none; }
.site-nav::-webkit-scrollbar { display: none; }
.site-nav ul { display: flex; gap: 0.15rem; margin: 0; padding: 0; list-style: none; }
.site-nav a {
    display: block;
    font-family: var(--sans);
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--muted);
    padding: 1.05rem 0.7rem 0.95rem;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
}
.site-nav a:hover { color: var(--ink); text-decoration: none; }
.site-nav a.active { color: var(--ink); border-bottom-color: var(--accent); }
@media (max-width: 767px) {
    /* Name row scrolls away; the tab row stays pinned */
    .site-header { top: -2.75rem; }
    .header-inner { flex-direction: column; align-items: stretch; gap: 0; }
    .brand { line-height: 2.75rem; font-size: 1.05rem; }
    .site-nav {
        margin: 0 -1.25rem;
        padding: 0 0.6rem;
        -webkit-mask-image: linear-gradient(to right, #000 82%, transparent);
        mask-image: linear-gradient(to right, #000 82%, transparent);
    }
    .site-nav a { padding: 0.55rem 0.6rem 0.6rem; font-size: 0.9rem; }
    .nav-long { display: none; }
    .post { padding: 1.5rem 0 3rem; }
    .post-header h1 { font-size: 1.6rem; }
    .article { font-size: 1rem; }
    .article p { line-height: 1.7; }
    .article figure { margin: 1.25rem 0; }
}

/* Post */
.post { max-width: 42rem; margin: 0 auto; padding: 2.25rem 0 4rem; }
@media (min-width: 768px) { .post { padding-top: 3rem; } }
.back {
    font-family: var(--sans);
    font-size: 0.88rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.post-header { margin-top: 1.5rem; padding-bottom: 1.25rem; border-bottom: 1px solid var(--rule); }
.post-kicker {
    font-family: var(--sans);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--faint);
    margin: 0;
}
.post-header h1 {
    color: var(--ink);
    font-size: 1.85rem;
    font-weight: 600;
    line-height: 1.25;
    margin: 0.4rem 0 0;
}
@media (min-width: 640px) { .post-header h1 { font-size: 2.2rem; } }
.post-meta {
    font-family: var(--sans);
    font-size: 0.88rem;
    color: var(--muted);
    margin: 0.7rem 0 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.6rem;
}
.tag {
    font-size: 0.74rem;
    font-weight: 600;
    line-height: 1;
    padding: 0.26rem 0.5rem;
    border: 1px solid var(--rule);
    border-radius: 3px;
    background: var(--surface);
    color: var(--muted);
}
.article { margin-top: 1.75rem; font-size: 1.04rem; }
.article p { margin: 0 0 1.15rem; line-height: 1.75; }
.article h2 { color: var(--ink); font-size: 1.3rem; font-weight: 600; margin: 2.25rem 0 0.75rem; }
.article ul { margin: 0 0 1.15rem; padding-left: 1.25rem; }
.article li { margin-top: 0.6rem; line-height: 1.7; }
.article strong { color: var(--ink); font-weight: 600; }
.article figure { margin: 1.5rem 0; }
.article figure img { width: 100%; border: 1px solid var(--rule); border-radius: 4px; }
.article figcaption { font-family: var(--sans); font-size: 0.85rem; color: var(--muted); margin-top: 0.55rem; }

.site-footer { border-top: 1px solid var(--rule); padding: 1.5rem 0 2rem; font-family: var(--sans); font-size: 0.82rem; color: var(--faint); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem; }
