/* Blog pages (/blog and /blog/<slug>, rendered by src/worker.js). Same tokens, header, buttons and footer as landing.html. */
:root {
  --bg: #0b0b0c; --surface: #141416; --surface-2: #1b1b1e; --border: #26262a; --border-strong: #34343a;
  --text: #f2f2f3; --text-2: #c4c4c8; --text-3: #8b8b93; --text-body: #a8a8b1; --accent: #f59e0b; --accent-soft: rgba(245, 158, 11, .12);
  --accent-border: rgba(245, 158, 11, .45); --max: 1200px;
  --font: "DM Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; color-scheme: dark; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); color: var(--text); font: 16px/1.6 var(--font); -webkit-font-smoothing: antialiased; }
main { flex: 1; }
a { color: inherit; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
img { max-width: 100%; height: auto; display: block; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.wrap.narrow { max-width: 760px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
@media (max-width: 520px) { .wrap { padding: 0 16px; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

/* ---------- buttons (as on the landing page) ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 48px; padding: 0 24px; border-radius: 999px; font: 600 15.5px/1 var(--font); white-space: nowrap; text-decoration: none; cursor: pointer; border: 1px solid transparent; transition: transform .15s ease, background .15s ease, border-color .15s ease, box-shadow .15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-sm { height: 40px; padding: 0 18px; font-size: 14.5px; gap: 8px; }
.btn-primary { background: var(--accent); color: #111; box-shadow: 0 10px 30px -12px rgba(245, 158, 11, .65); }
.btn-primary:hover { background: #fbb024; }
.btn-ghost { background: rgba(255, 255, 255, .02); color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { background: var(--surface); border-color: #4a4a50; }
.btn-nav { background: #2a2a2e; color: #fff; border-color: #3a3a40; }
.btn-nav:hover { background: #34343a; }

/* ---------- nav ---------- */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(11, 11, 12, .82); backdrop-filter: saturate(160%) blur(12px); -webkit-backdrop-filter: saturate(160%) blur(12px); border-bottom: 1px solid transparent; transition: border-color .2s ease; }
.nav.scrolled { border-bottom-color: var(--border); }
.nav-in { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 28px; height: 68px; }
.brand { justify-self: start; display: inline-flex; align-items: center; gap: 12px; font-weight: 700; font-size: 22px; line-height: 1; text-decoration: none; letter-spacing: -.02em; }
.brand-mark { flex: none; width: 42px; height: 42px; border-radius: 11px; background: var(--surface); border: 1px solid var(--accent-border); box-shadow: 0 0 0 4px var(--accent-soft), 0 6px 18px rgba(245, 158, 11, .18); display: grid; place-items: center; }
.brand-mark svg { width: 26px; height: 26px; }
.nav-links { display: flex; gap: 28px; }
.nav-links a { color: var(--text-2); text-decoration: none; font-size: 14.5px; font-weight: 500; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); }
.nav-cta { justify-self: end; display: flex; align-items: center; gap: 10px; }
.nav-signin { color: var(--text-2); text-decoration: none; font-size: 14.5px; font-weight: 500; padding: 8px 10px; }
.nav-signin:hover { color: var(--text); }
@media (max-width: 860px) { .nav-links { display: none; } .nav-in { grid-template-columns: 1fr auto; gap: 12px; } }
@media (max-width: 420px) { .nav-signin { display: none; } .brand { font-size: 19px; gap: 10px; } .brand-mark { width: 36px; height: 36px; } .brand-mark svg { width: 22px; height: 22px; } }

/* ---------- page hero ---------- */
.b-hero { position: relative; padding: 80px 0 48px; text-align: center; overflow: hidden; }
.b-hero::before { content: ""; position: absolute; left: 50%; top: -300px; width: 1200px; height: 680px; transform: translateX(-50%); background: radial-gradient(ellipse 50% 50% at 50% 50%, rgba(245, 158, 11, .14), transparent 70%); pointer-events: none; }
.b-hero > .wrap { position: relative; }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; padding: 7px 15px 7px 12px; border-radius: 999px; background: rgba(245, 158, 11, .08); border: 1px solid rgba(245, 158, 11, .35); color: #fcd34d; font-weight: 500; font-size: 13.5px; }
.eyebrow i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(245, 158, 11, .18); }
.b-hero h1 { margin: 22px auto 16px; max-width: 820px; font-size: clamp(38px, 5.4vw, 64px); line-height: 1.04; letter-spacing: -.04em; font-weight: 700; }
em { font-style: normal; }
h1 em, h2 em { background: linear-gradient(180deg, #fcd34d, #f59e0b); -webkit-background-clip: text; background-clip: text; color: transparent; }
.b-sub { max-width: 600px; margin: 0 auto; color: var(--text-body); font-size: clamp(17px, 1.8vw, 19px); line-height: 1.6; }
.b-hero .btn { margin-top: 28px; }

.meta { display: flex; flex-wrap: wrap; gap: 6px 0; color: var(--text-3); font-size: 14px; margin: 0; }
.meta > * + *::before { content: "·"; margin: 0 9px; }

/* ---------- blog list ---------- */
.b-list { padding-bottom: 24px; }
.empty { text-align: center; color: var(--text-3); padding: 40px 0; }
.featured a, .card a { display: block; height: 100%; color: inherit; text-decoration: none; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; overflow: hidden; transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease; }
.featured a:hover, .card a:hover { border-color: var(--accent-border); transform: translateY(-2px); box-shadow: 0 30px 70px -40px rgba(245, 158, 11, .45); }
.thumb { aspect-ratio: 1200 / 630; background: var(--surface-2); overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
a:hover .thumb img { transform: scale(1.025); }
.thumb-blank { width: 100%; height: 100%; display: grid; place-items: center; background: radial-gradient(ellipse 60% 70% at 50% 0%, rgba(245, 158, 11, .2), transparent 70%), var(--surface-2); }

.featured a { display: grid; grid-template-columns: 1.2fr 1fr; align-items: center; }
.featured .thumb { margin: 14px; border-radius: 14px; border: 1px solid var(--border); }
.f-body { padding: 32px 40px 32px 20px; display: flex; flex-direction: column; justify-content: center; gap: 14px; }
.tag { align-self: flex-start; padding: 4px 11px; border-radius: 999px; background: var(--accent-soft); border: 1px solid var(--accent-border); color: #fcd34d; font-size: 12.5px; font-weight: 600; }
.f-body h2 { margin: 0; font-size: clamp(26px, 2.8vw, 34px); line-height: 1.12; letter-spacing: -.03em; }
.f-body p { margin: 0; color: var(--text-body); font-size: 16.5px; }
.more { color: var(--accent); font-weight: 600; font-size: 15px; margin-top: 6px; }
@media (max-width: 860px) { .featured a { grid-template-columns: 1fr; } .featured .thumb { margin: 10px 10px 0; } .f-body { padding: 22px 24px 28px; } }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; margin-top: 20px; }
.card .thumb { border-bottom: 1px solid var(--border); }
.c-body { padding: 22px 24px 26px; }
.c-body h3 { margin: 10px 0 8px; font-size: 21px; line-height: 1.25; letter-spacing: -.02em; }
.c-body p:not(.meta) { margin: 0; color: var(--text-body); font-size: 15.5px; }
@media (max-width: 400px) { .grid { grid-template-columns: 1fr; } }

/* ---------- post ---------- */
.post-hero { padding-bottom: 40px; }
.crumbs { display: inline-flex; gap: 10px; align-items: center; color: var(--text-3); font-size: 14px; }
.crumbs a { color: var(--accent); text-decoration: none; font-weight: 600; }
.crumbs a:hover { text-decoration: underline; }
.post-hero h1 { font-size: clamp(34px, 4.8vw, 54px); margin-top: 18px; }
.post-hero .meta { justify-content: center; margin-top: 24px; }
.cover-wrap { max-width: 948px; margin-bottom: 48px; }
.cover { width: 100%; border-radius: 22px; border: 1px solid var(--border); box-shadow: 0 50px 120px -50px rgba(0, 0, 0, .95), 0 0 0 1px rgba(245, 158, 11, .08); }

.toc { margin: 2em 0 0; padding: 20px 24px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); }
.toc b { display: block; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); margin-bottom: 10px; }
.prose .toc ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 7px; }
.prose .toc li { margin: 0; padding: 0; }
.prose .toc a { color: var(--text-2); text-decoration: none; font-size: 15.5px; line-height: 1.45; }
.prose .toc a:hover { color: var(--accent); }

.prose { color: var(--text-2); font-size: 18px; line-height: 1.75; }
.prose > :first-child { margin-top: 0; }
.prose p { margin: 0 0 1.25em; }
.prose h2 { color: var(--text); font-size: clamp(25px, 3vw, 30px); line-height: 1.2; letter-spacing: -.025em; margin: 2.1em 0 .6em; scroll-margin-top: 90px; }
.prose h3 { color: var(--text); font-size: 21px; line-height: 1.3; letter-spacing: -.015em; margin: 1.7em 0 .5em; }
.prose h4 { color: var(--text); font-size: 18px; margin: 1.5em 0 .4em; }
.prose strong { color: var(--text); font-weight: 600; }
.prose a { color: var(--accent); text-decoration: underline; text-decoration-color: rgba(245, 158, 11, .4); text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: var(--accent); }
.prose ul, .prose ol { margin: 0 0 1.25em; padding-left: 1.3em; }
.prose li { margin: .45em 0; padding-left: .2em; }
.prose li::marker { color: var(--accent); }
.prose blockquote { margin: 1.8em 0; padding: 18px 22px; border-radius: 0 14px 14px 0; border-left: 3px solid var(--accent); background: var(--accent-soft); color: var(--text); font-size: 18px; }
.prose code { background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; padding: 1px 6px; font-size: .88em; }
.prose figure { margin: 2em 0; }
.prose figure img { width: 100%; border-radius: 14px; border: 1px solid var(--border); }
.prose figcaption { color: var(--text-3); font-size: 14px; margin-top: 10px; text-align: center; }
@media (max-width: 520px) { .prose { font-size: 17px; } }

.cta { display: flex; gap: 18px; align-items: flex-start; margin: 56px 0 0; padding: 26px; border-radius: 20px; background: radial-gradient(ellipse 70% 100% at 0% 0%, rgba(245, 158, 11, .16), transparent 70%), var(--surface); border: 1px solid var(--accent-border); }
.cta b { font-size: 19px; letter-spacing: -.01em; }
.cta p { margin: 6px 0 16px; color: var(--text-body); }
.brand-mark.sm { width: 40px; height: 40px; }
.brand-mark.sm svg { width: 22px; height: 22px; }
@media (max-width: 520px) { .cta { flex-direction: column; padding: 22px; } }

.keep { padding-top: 72px; }
.keep h2 { font-size: 28px; letter-spacing: -.025em; margin: 0; }

/* ---------- final call to action + footer (as on the landing page) ---------- */
.final { text-align: center; padding: 88px 24px; }
.final-box { border: 1px solid var(--accent-border); border-radius: 24px; padding: 60px 24px; background: radial-gradient(ellipse 60% 80% at 50% 0%, rgba(245, 158, 11, .14), transparent 70%), var(--surface); }
.final-box h2 { margin: 0 auto 14px; max-width: 640px; font-size: clamp(30px, 4vw, 44px); line-height: 1.08; letter-spacing: -.035em; }
.final-box p { color: var(--text-2); font-size: 18px; max-width: 560px; margin: 0 auto 28px; }
.final-box .fine { margin: 16px auto 0; font-size: 14px; color: var(--text-3); }
footer { border-top: 1px solid var(--border); padding: 40px 0 56px; color: var(--text-3); font-size: 14px; }
.foot { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.foot .brand { font-size: 19px; gap: 10px; }
.foot .brand-mark { width: 36px; height: 36px; border-radius: 10px; }
.foot .brand-mark svg { width: 22px; height: 22px; }
.foot nav { display: flex; gap: 20px; flex-wrap: wrap; margin-left: auto; }
.foot nav a { color: var(--text-3); text-decoration: none; }
.foot nav a:hover { color: var(--text); }
