/* ==========================================================================
   Blog listing and article pages. Load after site.css.
   Pages are generated by tools/build-blog.js.
   ========================================================================== */

/* ---------- Page hero (listing) and post hero ---------- */

.page-hero, .post-hero {
    background:
        radial-gradient(70% 120% at 100% 0%, rgba(198,255,0,.12) 0%, rgba(198,255,0,0) 55%),
        var(--ink-900);
    color: var(--text-on-dark);
}
.page-hero { padding: 96px 0 80px; }
.page-hero h1 { font-size: clamp(38px, 5vw, 58px); letter-spacing: -0.03em; line-height: 1.05; max-width: 760px; }
.page-hero p { margin-top: 20px; font-size: 19px; line-height: 1.6; color: #CBD5E1; max-width: 640px; }
.page-hero .hero-note {
    margin-top: 28px; display: inline-flex; align-items: center; gap: 10px;
    font-size: 14px; color: var(--text-on-dark-muted);
}
.page-hero .hero-note::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }

.post-hero { padding: 72px 0 64px; }
.post-container { max-width: 760px; }
.post-back {
    display: inline-flex; align-items: center; gap: 8px; margin-bottom: 32px;
    font-size: 14px; color: var(--text-on-dark-muted); transition: color .15s;
}
.post-back:hover { color: var(--brand); }
.post-hero .eyebrow { display: flex; }
.post-hero h1 { font-size: clamp(32px, 4.4vw, 50px); letter-spacing: -0.03em; line-height: 1.08; }
.post-lede { margin-top: 20px; font-size: 19px; line-height: 1.6; color: #CBD5E1; }
.post-meta {
    margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line-dark);
    display: flex; flex-wrap: wrap; gap: 10px 28px; font-size: 14px; color: var(--text-on-dark-muted);
}
.post-meta i { margin-right: 8px; color: var(--brand); font-size: 12px; }

/* ---------- Article body ---------- */

.prose { font-size: 17.5px; line-height: 1.75; color: var(--text); }
.prose > * + * { margin-top: 1.15em; }
.prose h2 { margin-top: 2.2em; font-size: 28px; line-height: 1.2; }
.prose h3 { margin-top: 1.8em; font-size: 21px; line-height: 1.3; }
.prose h2 + *, .prose h3 + * { margin-top: .7em; }
.prose > :first-child { margin-top: 0; }
.prose a { color: var(--brand-ink); text-decoration: underline; text-underline-offset: 3px; }
.prose a:hover { color: var(--text); }
.prose strong { font-weight: 600; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: .45em; }
.prose li::marker { color: var(--text-muted); }
.prose blockquote {
    margin-left: 0; padding: 4px 0 4px 22px; border-left: 3px solid var(--brand-ink);
    color: var(--text-muted); font-style: italic;
}
.prose code {
    font: 500 .88em/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    background: var(--surface-alt); border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px;
}
.prose pre {
    background: var(--ink-900); color: #E2E8F0; border-radius: var(--radius);
    padding: 20px 22px; overflow-x: auto; font-size: 14.5px; line-height: 1.6;
}
.prose pre code { background: none; border: 0; padding: 0; color: inherit; font-size: inherit; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15.5px; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { font-weight: 600; background: var(--surface-alt); }
.prose .callout {
    background: #F1F7E2; border: 1px solid #CFE3A6; border-radius: var(--radius);
    padding: 20px 24px; font-size: 16.5px;
}
.prose .callout > * + * { margin-top: .6em; }

.post-sources {
    margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--line);
    font-size: 15px; color: var(--text-muted);
}
.post-sources h2 { font-size: 16px; letter-spacing: 0; margin-bottom: 12px; color: var(--text); }
.post-sources ol { list-style: decimal; padding-left: 1.4em; display: grid; gap: 6px; }
.post-sources a { color: var(--text-muted); text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
.post-sources a:hover { color: var(--text); }

/* ---------- Article CTA ---------- */

.post-cta { display: flex; align-items: center; justify-content: space-between; gap: 40px; }
.post-cta h2 { font-size: clamp(28px, 3.2vw, 38px); }
.post-cta p { margin-top: 14px; font-size: 17px; color: var(--text-on-dark-muted); max-width: 560px; }
.post-cta__actions { display: flex; flex-wrap: wrap; gap: 12px; flex: none; }
@media (max-width: 860px) {
    .post-cta { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 480px) {
    .post-cta__actions { width: 100%; }
    .post-cta__actions .button { width: 100%; white-space: normal; }
}

/* ---------- Listing ---------- */

.featured-post {
    display: grid; grid-template-columns: 1.4fr 1fr; overflow: hidden;
    border-radius: 20px; background: var(--ink-900); color: var(--text-on-dark);
    transition: box-shadow .2s ease;
}
.featured-post:hover { box-shadow: var(--shadow-md); }
.featured-post__copy { padding: 52px; display: flex; flex-direction: column; align-items: flex-start; }
.featured-post .eyebrow { color: var(--brand); }
.featured-post h2 { font-size: clamp(26px, 3vw, 36px); line-height: 1.15; }
.featured-post p { margin-top: 16px; font-size: 17px; color: var(--text-on-dark-muted); }
.featured-post .article-meta { margin-top: 20px; font-size: 14px; color: var(--text-on-dark-muted); }
.featured-post .button { margin-top: 28px; }
.featured-post__art {
    position: relative; display: flex; align-items: center; justify-content: center;
    background:
        radial-gradient(120% 90% at 100% 0%, rgba(198,255,0,.16) 0%, rgba(198,255,0,0) 55%),
        var(--ink-800);
    border-left: 1px solid var(--line-dark);
}
.featured-post__art::before {
    content: ""; position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
    background-size: 28px 28px;
}
.featured-post__art i { position: relative; font-size: 96px; color: rgba(198,255,0,.85); }
@media (max-width: 860px) {
    .featured-post { grid-template-columns: 1fr; }
    .featured-post__copy { padding: 36px 28px; }
    .featured-post__art { display: none; }
}

.filter-chips { margin: 64px 0 32px; display: flex; flex-wrap: wrap; gap: 10px; }
.filter-chip {
    font: 500 14px/1 var(--font-sans); padding: 10px 16px; border-radius: 999px; cursor: pointer;
    border: 1px solid var(--line); background: var(--surface); color: var(--text);
    transition: background-color .15s, color .15s, border-color .15s;
}
.filter-chip:hover { border-color: var(--text); }
.filter-chip.is-active { background: var(--ink-900); border-color: var(--ink-900); color: #fff; }

#blog-grid > [hidden] { display: none; }

/* "From around the web": curated external articles */
.reading-list {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
    background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden;
}
.reading-item { background: var(--surface); padding: 26px 28px; display: flex; flex-direction: column; transition: background-color .15s; }
.reading-item:hover { background: #FBFCFD; }
.reading-item__meta { font-size: 13px; color: var(--text-muted); }
.reading-item__meta span { font-weight: 600; color: var(--brand-ink); }
.reading-item h3 { margin-top: 10px; font-size: 17.5px; line-height: 1.35; }
.reading-item h3 i { font-size: 11px; margin-left: 4px; color: var(--text-muted); vertical-align: 2px; }
.reading-item:hover h3 { text-decoration: underline; text-underline-offset: 3px; }
.reading-item p { margin-top: 8px; font-size: 14.5px; color: var(--text-muted); }
@media (max-width: 1024px) { .reading-list { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .reading-list { grid-template-columns: 1fr; } .reading-item { padding: 22px 20px; } }
.blog-empty { margin-top: 24px; color: var(--text-muted); }
