/* BLOG SHELL */
.blog-main {
    min-height: 60vh;
    padding-top: 56px;
    padding-bottom: 80px;
}

/* BLOG INDEX */
.blog-hero {
    margin-bottom: 48px;
    padding: clamp(40px, 6vw, 72px) clamp(24px, 4vw, 56px);
    background: var(--bg);
    border-radius: var(--radius);
}

.blog-title {
    font-family: var(--display);
    font-weight: 700;
    font-size: clamp(56px, 8vw, 112px);
    line-height: 0.95;
    letter-spacing: -0.03em;
    color: var(--ink);
}

.blog-subtitle {
    margin-top: 20px;
    max-width: 52ch;
    font-size: 18px;
}

.tag-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 40px;
}

.tag-chip {
    font: inherit;
    font-size: 14px;
    color: var(--ink-mid);
    background: transparent;
    border: 1px solid var(--rule);
    border-radius: 999px;
    padding: 6px 14px;
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.tag-filter .tag-chip:hover {
    color: var(--ink);
    border-color: var(--ink);
}

.tag-filter .tag-chip.active {
    color: #fff;
    background: var(--ink);
    border-color: var(--ink);
}

.tag-chip.small {
    padding: 3px 10px;
    font-size: 13px;
    cursor: default;
}

.post-card {
    display: block;
    padding: 36px 0;
    border-top: 1px solid var(--rule);
    text-decoration: none;
    color: inherit;
}

.post-card-date,
.post-date {
    font-size: 14px;
    color: var(--ink-dim);
}

.post-card-title {
    font-family: var(--display);
    font-weight: 700;
    font-size: clamp(26px, 2.6vw, 34px);
    line-height: 1.15;
    letter-spacing: -0.01em;
    color: var(--ink);
    margin: 6px 0 10px;
    transition: color 0.2s ease;
}

.post-card:hover .post-card-title { color: var(--accent); }

/* blog.js hides filtered-out posts with [hidden]; display: block above would override it */
.post-card[hidden] { display: none; }

.post-card-excerpt {
    max-width: 62ch;
    font-size: 17px;
    margin-bottom: 16px;
}

.post-card-tags,
.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* SINGLE POST */
.post {
    max-width: 760px;
}

.post-back {
    display: inline-block;
    margin-bottom: 40px;
    font-size: 15px;
    text-decoration: none;
    transition: color 0.2s ease;
}

.post-back:hover { color: var(--ink); }

.post-header { margin-bottom: 48px; }

.post-title {
    font-family: var(--display);
    font-weight: 700;
    font-size: clamp(44px, 6vw, 80px);
    line-height: 1;
    letter-spacing: -0.03em;
    color: var(--ink);
    margin: 8px 0 24px;
}

.post-content {
    font-size: 18px;
    line-height: 1.7;
}

.post-content p { margin-bottom: 24px; }

.post-content h2,
.post-content h3 {
    font-family: var(--display);
    font-weight: 700;
    line-height: 1.2;
    color: var(--ink);
}

.post-content h2 {
    font-size: clamp(26px, 2.6vw, 32px);
    margin: 48px 0 16px;
}

.post-content h3 {
    font-size: 22px;
    margin: 36px 0 12px;
}

.post-content a {
    color: var(--ink);
    text-decoration: underline;
    text-decoration-color: var(--accent-dim);
    text-underline-offset: 3px;
}

.post-content ul,
.post-content ol { margin: 0 0 24px 24px; }

.post-content li { margin-bottom: 10px; }

.post-content blockquote {
    margin: 32px 0;
    padding-left: 24px;
    border-left: 2px solid var(--accent);
    font-size: 20px;
    font-style: italic;
    color: var(--ink);
}

.post-content code {
    font-family: var(--mono);
    font-size: 0.85em;
    background: var(--surface);
    padding: 2px 6px;
    border-radius: 3px;
}

.post-content pre {
    background: var(--surface);
    border: 1px solid var(--rule);
    padding: 24px;
    border-radius: 4px;
    overflow-x: auto;
    margin: 32px 0;
}

.post-content pre code {
    background: none;
    padding: 0;
}

.post-content img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 8px 0;
}

@media (max-width: 720px) {
    .blog-main { padding-top: 24px; }
}
