/* ═══════════════════════════════════════════════════════════════════════
   Blog — shared styles for the listing page (/blog) and the article pages
   (/blog/<slug>, server-rendered from the posts table). Also used by the
   admin editor's live preview so authors see the real result.
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Listing ─────────────────────────────────────────────────────────── */
.blog-hero { background: var(--bg-subtle); border-bottom: 1px solid var(--border-light); padding: 48px 0 40px; }
.blog-hero .eyebrow { color: var(--color-blue-500); }
.blog-hero h1 { font-size: clamp(32px,4.4vw,52px); color: var(--color-navy-800); letter-spacing:-0.015em; line-height:1.06; margin: 12px 0 14px; }
.blog-hero p { font-size: 17px; color: var(--fg-muted-light); max-width: 60ch; line-height: 1.6; }

.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
@media (max-width: 900px){ .blog-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px){ .blog-grid { grid-template-columns: 1fr; } }

.post-card { overflow: hidden; display: flex; flex-direction: column; text-align: left; }
.post-card .thumb { height: 172px; position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--color-navy-800), var(--color-navy-600)); }
.post-card .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-card .thumb::after { content:""; position:absolute; inset:0; pointer-events:none;
  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: 30px 30px; }
.post-card .thumb.has-img::after { display: none; }
.post-card .pcb { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.post-card .pcb h3 { font-size: 18px; color: var(--color-navy-800); line-height: 1.3; letter-spacing:-0.01em; }
.post-card .pcb p { font-size: 14px; color: var(--fg-muted-light); line-height: 1.55; margin: 0; }
.post-card .pcb .m { font-size: 12.5px; color: var(--fg-muted-light); margin-top: auto; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.post-card .pcb .m .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--color-gray-400); }
.blog-empty { text-align: center; padding: 70px 20px; color: var(--fg-muted-light); }

/* ── Article page ────────────────────────────────────────────────────── */
.art-hero { background: var(--bg-subtle); padding: 36px 0 0; border-bottom: 1px solid var(--border-light); }
.art-head { max-width: 820px; margin: 0 auto; text-align: center; padding-bottom: 36px; }
.art-head h1 { font-size: clamp(30px,4.2vw,48px); color: var(--color-navy-800); letter-spacing:-0.015em; line-height: 1.08; margin: 18px 0 22px; }
.art-byline { display: inline-flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: center; color: var(--fg-muted-light); font-size: 14px; }
.art-byline .au { display: flex; align-items: center; gap: 9px; }
.art-av { width: 38px; height: 38px; border-radius: 50%; background: var(--color-navy-800); color: var(--color-gold-500); display: grid; place-items: center; font-family: var(--font-headline); font-weight: 700; font-size: 14px; }
.art-byline b { color: var(--color-navy-800); }
.art-byline .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--color-gray-400); }
.art-feat { max-width: 1000px; margin: 0 auto; height: clamp(220px,34vw,420px); border-radius: var(--radius-xl) var(--radius-xl) 0 0; position: relative; overflow: hidden;
  background: radial-gradient(600px 300px at 30% 20%, rgba(26,95,200,.5), transparent 60%), linear-gradient(135deg, var(--color-navy-800), var(--color-navy-700)); display: grid; place-items: center; }
.art-feat img { width: 100%; height: 100%; object-fit: cover; }
.art-feat::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: 44px 44px; }
.art-feat.has-img::before { display: none; }
.art-feat .ph { position: relative; text-align: center; color: rgba(255,255,255,.9); padding: 20px; }
.art-feat .ph .big { font-family: var(--font-headline); font-weight: 700; font-size: clamp(26px,4vw,44px); color: #fff; letter-spacing: -0.02em; line-height: 1.1; max-width: 20ch; }
.art-feat .ph .sm { font-family: var(--font-mono); font-size: 13px; color: var(--color-blue-300); margin-top: 12px; }

.art-body { max-width: 760px; margin: 0 auto; }

/* Prose — styles the HTML authored in the admin editor */
.prose { font-size: 17px; line-height: 1.75; color: #2b3550; }
.prose > :first-child { margin-top: 0; }
.prose h2 { font-size: clamp(24px,3vw,32px); color: var(--color-navy-800); letter-spacing:-0.01em; margin: 40px 0 14px; scroll-margin-top: 100px; }
.prose h3 { font-size: 21px; color: var(--color-navy-800); margin: 30px 0 10px; }
.prose h4 { font-size: 18px; color: var(--color-navy-800); margin: 24px 0 8px; }
.prose p { font-size: 17px; line-height: 1.75; color: #2b3550; margin: 0 0 18px; }
.prose a { color: var(--color-blue-500); font-weight: 600; border-bottom: 1px solid rgba(26,95,200,.3); }
.prose ul, .prose ol { margin: 0 0 18px; padding-left: 26px; display: flex; flex-direction: column; gap: 9px; }
.prose li { font-size: 16.5px; line-height: 1.6; color: #2b3550; }
.prose ul { list-style: none; padding-left: 4px; }
.prose ul li { display: flex; gap: 11px; }
.prose ul li::before { content:""; width: 7px; height: 7px; border-radius: 50%; background: var(--color-gold-500); flex: none; margin-top: 10px; }
.prose ol { list-style: decimal; padding-left: 22px; }
.prose strong { color: var(--color-navy-800); }
.prose img { max-width: 100%; height: auto; border-radius: var(--radius-lg); margin: 8px 0 22px; display: block; }
.prose figure { margin: 8px 0 22px; }
.prose figcaption { font-size: 13.5px; color: var(--fg-muted-light); text-align: center; margin-top: 8px; }
.prose blockquote { border-left: 4px solid var(--color-blue-500); padding: 4px 0 4px 22px; margin: 26px 0; font-family: var(--font-headline); font-weight: 500; font-size: clamp(20px,2.4vw,26px); color: var(--color-navy-800); line-height: 1.35; }
.prose blockquote p { font-size: inherit; color: inherit; margin: 0; }
.prose pre { background: var(--color-navy-800); color: #e6ecf5; border-radius: var(--radius-md); padding: 16px 18px; overflow-x: auto; font-family: var(--font-mono); font-size: 13.5px; margin: 0 0 20px; }
.prose code { font-family: var(--font-mono); font-size: .92em; background: var(--bg-subtle); border: 1px solid var(--border-light); border-radius: 6px; padding: 1px 6px; }
.prose pre code { background: none; border: none; padding: 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 22px; font-size: 15px; }
.prose th, .prose td { border: 1px solid var(--border-light); padding: 10px 12px; text-align: left; }
.prose th { background: var(--bg-subtle); color: var(--color-navy-800); font-weight: 700; }
.prose hr { border: none; border-top: 1px solid var(--border-light); margin: 34px 0; }

.author-box { display: flex; gap: 18px; background: var(--bg-subtle); border: 1px solid var(--border-light); border-radius: var(--radius-lg); padding: 24px; margin: 44px 0 0; align-items: flex-start; }
.author-box .av { width: 60px; height: 60px; border-radius: 50%; background: var(--color-navy-800); color: var(--color-gold-500); display: grid; place-items: center; font-family: var(--font-headline); font-weight: 700; font-size: 20px; flex: none; }
.author-box .an { font-family: var(--font-headline); font-weight: 600; font-size: 18px; color: var(--color-navy-800); }
.author-box .ar { font-size: 13px; color: var(--color-blue-500); font-weight: 600; }
.author-box .abio { margin: 9px 0 0; font-size: 14px; line-height: 1.6; color: var(--fg-muted-light); max-width: 62ch; }
