/* Blog-specific styles.
 *
 * Every blog page loads /public/css/style.css FIRST, which supplies the theme
 * tokens, the spacing scale, the shell (header, nav, footer) and the shared
 * list/heading rules. This file only adds the post index and the rendered
 * Markdown prose. Don't hardcode colours or spacing here — use the tokens so
 * the blog and the portfolio can never drift apart.
 */

/* Keep the footer at the bottom of the viewport on short pages (a one-post
   index, an error state). */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1 0 auto;
}

/* ---------- Index ---------- */

.blog-intro {
    color: var(--muted);
}

.blog-disclaimer {
    margin: 0 0 var(--space-4);
    padding-left: var(--space-2);
    border-left: 2px solid var(--rule);
    color: var(--muted);
    font-size: 0.92rem;
}

.post-list li h3 {
    font-size: 1.05rem;
}

/* Dates are data, so they follow the mono treatment .item-meta uses. */
.post-date {
    display: block;
    margin-top: 0.15rem;
    font-family: var(--mono);
    font-size: 0.78rem;
    color: var(--muted);
}

/* ---------- Single post ---------- */

.post-header {
    padding-bottom: var(--space-3);
    margin-bottom: var(--space-4);
    border-bottom: 1px solid var(--rule);
}

.post-header h1 {
    margin: var(--space-1) 0 0;
    font-size: 1.9rem;
}

.post-body {
    max-width: var(--measure);
}

.post-body p,
.post-body ul,
.post-body ol,
.post-body pre,
.post-body blockquote,
.post-body table {
    margin: 0 0 var(--space-3);
}

.post-body h1,
.post-body h2,
.post-body h3,
.post-body h4 {
    margin: var(--space-4) 0 var(--space-2);
    color: var(--text);
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.005em;
    text-transform: none;
}

.post-body h1 { font-size: 1.4rem; }
.post-body h2 { font-size: 1.2rem; }
.post-body h3 { font-size: 1.05rem; }
.post-body h4 { font-size: 1rem; }

.post-body ul,
.post-body ol {
    padding-left: var(--space-3);
}

.post-body li {
    margin-bottom: var(--space-1);
}

/* The one place the accent does structural work in prose. */
.post-body li::marker {
    color: var(--accent);
}

.post-body li > ul,
.post-body li > ol {
    margin: var(--space-1) 0 0;
}

.post-body code {
    font-family: var(--mono);
    font-size: 0.88em;
}

.post-body pre {
    padding: var(--space-2);
    overflow-x: auto;
    border: 1px solid var(--rule);
}

.post-body pre code {
    font-size: 0.85rem;
    line-height: 1.65;
}

.post-body blockquote {
    padding-left: var(--space-2);
    border-left: 2px solid var(--rule);
    color: var(--muted);
}

.post-body img {
    max-width: 100%;
    height: auto;
}

.post-body hr {
    height: 0;
    border: 0;
    border-top: 1px solid var(--rule);
    margin: var(--space-4) 0;
}

.post-body table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.post-body th,
.post-body td {
    padding: var(--space-1) 0.7rem;
    border: 1px solid var(--rule);
    text-align: left;
}

.post-body th {
    font-weight: 600;
}

.back-link {
    display: inline-block;
    margin-top: var(--space-4);
    font-size: 0.9rem;
}
