/* ═══════════════════════════════════════════════════════════
   BLOG — index listing + per-post article styling
   ═══════════════════════════════════════════════════════════ */

/* ── Blog index: list of posts ────────────────────────────── */
.blog-list {
    max-width: 820px;
    margin: 0 auto;
    padding: 4rem 3rem 6rem;
}

.blog-list .empty {
    text-align: center;
    color: var(--white-dim);
    padding: 4rem 0;
    font-style: italic;
}

.post-card {
    display: block;
    padding: 2rem 0;
    border-bottom: 1px solid var(--white-faint);
    text-decoration: none;
    color: inherit;
    transition: padding-left 0.25s ease;
}

.post-card:hover {
    padding-left: 0.5rem;
}

.post-card:last-of-type {
    border-bottom: none;
}

.post-card .post-meta {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--copper);
    margin-bottom: 0.6rem;
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.post-card .post-meta .dot {
    width: 4px; height: 4px;
    background: var(--white-faint);
    border-radius: 50%;
}

.post-card h2 {
    font-size: clamp(1.4rem, 2.5vw, 1.8rem);
    font-weight: 800;
    margin: 0 0 0.6rem;
    color: var(--white);
    line-height: 1.25;
}

.post-card:hover h2 {
    color: var(--copper-light);
}

.post-card .post-excerpt {
    color: var(--white-dim);
    font-size: 1rem;
    line-height: 1.65;
    font-weight: 300;
    margin: 0;
}

.post-card .read-more {
    display: inline-block;
    margin-top: 0.75rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--copper-light);
    letter-spacing: 0.5px;
}

/* ── Per-post article body ────────────────────────────────── */
.post-article {
    max-width: 740px;
    margin: 0 auto;
    padding: 3rem 3rem 6rem;
}

.post-article .post-back {
    display: inline-block;
    color: var(--copper-light);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 1rem;
    transition: color 0.2s ease;
}
.post-article .post-back:hover { color: var(--copper); }

.post-article header {
    padding-bottom: 2rem;
    margin-bottom: 2.5rem;
    border-bottom: 1px solid var(--white-faint);
}

.post-article .post-meta {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--copper);
    margin-bottom: 1rem;
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}
.post-article .post-meta .dot {
    width: 4px; height: 4px;
    background: var(--white-faint);
    border-radius: 50%;
}

.post-article h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    line-height: 1.15;
    margin: 0 0 1rem;
}

.post-article .post-lede {
    font-size: 1.15rem;
    color: var(--white-dim);
    line-height: 1.6;
    font-weight: 300;
    margin: 0;
}

/* Body content (pandoc output) */
.post-body {
    font-size: 1.05rem;
    line-height: 1.75;
    color: var(--white);
    font-weight: 300;
}

.post-body h2 {
    font-size: 1.65rem;
    font-weight: 800;
    margin: 3rem 0 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--white-faint);
    line-height: 1.25;
}
.post-body h2:first-child { border-top: none; padding-top: 0; margin-top: 0; }

.post-body h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 2.25rem 0 0.75rem;
    color: var(--white);
}

.post-body h4 {
    font-size: 1rem;
    font-weight: 700;
    margin: 1.75rem 0 0.5rem;
    color: var(--copper-light);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.post-body p {
    margin: 1.1rem 0;
    color: var(--white);
}

.post-body strong { color: var(--white); font-weight: 700; }
.post-body em { color: var(--copper-light); font-style: italic; }

.post-body a {
    color: var(--copper-light);
    text-decoration: underline;
    text-decoration-color: rgba(212, 163, 115, 0.4);
    text-underline-offset: 3px;
    transition: text-decoration-color 0.2s ease, color 0.2s ease;
}
.post-body a:hover {
    color: var(--copper);
    text-decoration-color: var(--copper);
}

.post-body ul, .post-body ol {
    margin: 1.1rem 0;
    padding-left: 1.5rem;
}
.post-body li { margin: 0.4rem 0; }
.post-body li::marker { color: var(--copper); }

.post-body blockquote {
    margin: 1.5rem 0;
    padding: 0.5rem 1.5rem;
    border-left: 3px solid var(--copper);
    color: var(--white-dim);
    font-style: italic;
}

.post-body code {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.92em;
    background: var(--white-faint);
    padding: 0.15em 0.4em;
    border-radius: 4px;
    color: var(--copper-light);
}

.post-body pre {
    background: var(--navy-mid);
    border: 1px solid var(--white-faint);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    overflow-x: auto;
    margin: 1.5rem 0;
    line-height: 1.55;
}
.post-body pre code {
    background: transparent;
    padding: 0;
    color: var(--white);
    font-size: 0.9rem;
}

.post-body img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 1.5rem 0;
    border: 1px solid var(--white-faint);
}

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

.post-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.95rem;
}
.post-body th, .post-body td {
    padding: 0.7rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--white-faint);
}
.post-body th {
    color: var(--copper-light);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.85rem;
}

/* ── Mobile ────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .blog-list { padding: 3rem 1.5rem 4rem; }
    .post-article { padding: 2rem 1.5rem 4rem; }
    .post-body { font-size: 1rem; line-height: 1.7; }
}

/* ── Light theme ───────────────────────────────────────────── */
[data-theme="light"] .post-card h2 { color: #0D1B2A; }
[data-theme="light"] .post-card:hover h2 { color: var(--copper-dark); }
[data-theme="light"] .post-card .post-excerpt { color: rgba(13, 27, 42, 0.7); }
[data-theme="light"] .post-card .post-meta { color: var(--copper-dark); }
[data-theme="light"] .post-card .read-more { color: var(--copper-dark); }
[data-theme="light"] .post-card .post-meta .dot { background: rgba(13, 27, 42, 0.2); }

[data-theme="light"] .post-article h1 { color: #0D1B2A; }
[data-theme="light"] .post-article .post-meta { color: var(--copper-dark); }
[data-theme="light"] .post-article .post-lede { color: rgba(13, 27, 42, 0.75); }
[data-theme="light"] .post-article .post-back { color: var(--copper-dark); }

[data-theme="light"] .post-body { color: rgba(13, 27, 42, 0.85); }
[data-theme="light"] .post-body strong { color: #0D1B2A; }
[data-theme="light"] .post-body h2, [data-theme="light"] .post-body h3 { color: #0D1B2A; }
[data-theme="light"] .post-body h4 { color: var(--copper-dark); }
[data-theme="light"] .post-body em { color: var(--copper-dark); }
[data-theme="light"] .post-body a { color: var(--copper-dark); }
[data-theme="light"] .post-body code {
    background: rgba(13, 27, 42, 0.06);
    color: var(--copper-dark);
}
[data-theme="light"] .post-body pre {
    background: rgba(13, 27, 42, 0.04);
    border-color: rgba(13, 27, 42, 0.08);
}
[data-theme="light"] .post-body pre code { color: #0D1B2A; }
[data-theme="light"] .post-body th { color: var(--copper-dark); }
