/* blog.css — the public blog: article list, article page and the blog block on the home page.
   Shared tokens, nav, footer and buttons live in site.css. */

.wrap-narrow { max-width: 760px; margin: 0 auto; padding: 0 24px; }

/* ── List ───────────────────────────────────────────────────── */
.blog-hero { padding: 80px 0 24px; text-align: center; }
.blog-hero .eyebrow { display: block; margin-bottom: 14px; }
.blog-hero h1 { margin: 0 0 18px; }
.blog-hero .lead { max-width: 620px; margin: 0 auto; }

.blog-list { padding: 48px 0 120px; }

.post-grid {
	display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
@media (max-width: 920px) { .post-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .post-grid { grid-template-columns: 1fr; } }

.post-card {
	display: flex; flex-direction: column;
	padding: 14px 14px 22px;
	background: #fff;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	transition: transform .35s cubic-bezier(.22, .61, .36, 1),
		box-shadow .35s ease, border-color .35s ease;
}
.post-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 24px 50px -24px rgba(0, 0, 0, .18);
	border-color: var(--line-2);
}
.post-cover {
	aspect-ratio: 16 / 9;
	border-radius: 12px;
	overflow: hidden;
	background: var(--bg-alt);
	margin-bottom: 18px;
}
.post-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Articles without a cover still get a picture, so the grid does not look broken. */
.post-cover-0 { background: linear-gradient(135deg, #e6f4fb, #c8e6f7); }
.post-cover-1 { background: linear-gradient(135deg, #f0e8ff, #ddc8ff); }
.post-cover-2 { background: linear-gradient(135deg, #fff4e0, #ffd9a8); }

.post-card .post-meta { padding: 0 8px; }
.post-card h3 {
	margin: 8px 8px 8px;
	font-size: 20px; font-weight: 600; line-height: 1.3;
	letter-spacing: -0.015em;
}
.post-card p {
	margin: 0 8px;
	color: var(--ink-2); font-size: 15px; line-height: 1.5;
	display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
	overflow: hidden;
}

.post-meta {
	display: flex; align-items: center; gap: 10px;
	font-size: 13px; color: var(--ink-3);
}

.blog-empty {
	text-align: center; color: var(--ink-2);
	padding: 48px 0;
}

.blog-pager {
	display: flex; align-items: center; justify-content: center; gap: 16px;
	margin-top: 56px;
	font-size: 14px; color: var(--ink-2);
}
.btn-pager { background: #fff; border-color: var(--line); color: var(--ink); }
.btn-pager:hover { border-color: var(--line-2); }

/* ── Home page block ────────────────────────────────────────── */
.home-blog { background: var(--bg-alt); }
.home-blog-head {
	display: flex; align-items: flex-end; justify-content: space-between; gap: 24px;
	margin-bottom: 40px;
}
.home-blog-head .eyebrow { display: block; margin-bottom: 12px; }
.home-blog-head h2 {
	margin: 0;
	font-size: clamp(30px, 4vw, 48px); font-weight: 600;
	line-height: 1.08; letter-spacing: -0.03em;
}

/* ── Article ────────────────────────────────────────────────── */
.post { padding: 56px 0 40px; }
.post-back {
	display: inline-flex; align-items: center; gap: 6px;
	font-size: 14px; color: var(--accent);
	margin-bottom: 28px;
}
.post-back:hover { color: var(--accent-deep); }
.post-head h1 {
	margin: 14px 0 18px;
	font-size: clamp(34px, 5vw, 56px); font-weight: 600;
	line-height: 1.08; letter-spacing: -0.03em;
}
.post-head .lead { margin: 0; }
.post-draft {
	padding: 2px 9px; border-radius: 980px;
	background: #fff4e0; color: #b87f00;
	font-size: 12px; font-weight: 600;
}
.post-edit { margin-left: auto; color: var(--accent); }
.post-edit:hover { color: var(--accent-deep); }

.post-figure { margin: 40px auto 0; }
.post-figure img {
	display: block; width: 100%;
	border-radius: var(--radius);
	box-shadow: 0 24px 50px -24px rgba(0, 0, 0, .25);
}

/* What the article editor produces: h2, h3, p, lists, quotes, code, links, images. */
.prose { margin-top: 40px; font-size: 18px; line-height: 1.7; }
.prose > :first-child { margin-top: 0; }
.prose h2 {
	margin: 48px 0 14px;
	font-size: 28px; font-weight: 600; line-height: 1.25; letter-spacing: -0.02em;
}
.prose h3 {
	margin: 36px 0 10px;
	font-size: 22px; font-weight: 600; line-height: 1.3; letter-spacing: -0.015em;
}
.prose p { margin: 0 0 20px; }
.prose a { color: var(--accent-deep); text-decoration: underline; text-underline-offset: 3px; }
.prose a:hover { color: var(--accent); }
.prose ul, .prose ol { margin: 0 0 20px; padding-left: 26px; }
.prose li { margin: 6px 0; }
.prose blockquote {
	margin: 28px 0; padding: 4px 0 4px 22px;
	border-left: 3px solid var(--accent);
	color: var(--ink-2);
}
.prose pre {
	margin: 0 0 20px; padding: 18px 20px;
	background: var(--bg-alt); border-radius: 12px;
	font-family: var(--mono); font-size: 14px; line-height: 1.55;
	overflow-x: auto;
}
.prose code {
	font-family: var(--mono); font-size: .88em;
	background: var(--bg-alt); padding: 2px 6px; border-radius: 5px;
}
.prose pre code { background: none; padding: 0; font-size: inherit; }
.prose img {
	display: block; max-width: 100%; height: auto;
	margin: 28px auto; border-radius: 12px;
}

.post-cta { padding: 40px 0 120px; }
.post-cta .wrap-narrow {
	padding-top: 40px;
	border-top: 1px solid var(--line);
}
.post-cta h2 { margin: 0 0 8px; font-size: 26px; font-weight: 600; letter-spacing: -0.02em; }
.post-cta p { margin: 0 0 22px; color: var(--ink-2); }
