:root {
  --primary: #2563EB; --primary-dark: #1D4ED8; --primary-soft: #DBEAFE;
  --secondary: #3B82F6; --cta: #F97316; --cta-hover: #EA580C; --cta-soft: #FFF7ED;
  --bg: #F8FAFC; --bg-soft: #F1F5F9; --bg-card: #FFFFFF;
  --text: #0F172A; --text-dim: #334155; --text-muted: #64748B;
  --border: #CBD5E1; --border-soft: #E2E8F0;
  --display: 'Geist', system-ui, sans-serif;
  --sans: 'Geist', system-ui, sans-serif;
  --mono: 'Geist Mono', ui-monospace, monospace;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body { font-family: var(--sans); font-size: 17px; line-height: 1.65; color: var(--text); background: var(--bg); overflow-x: hidden; }
a { color: var(--primary-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
ul { list-style: none; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 32px; }
.post-narrow { max-width: 780px; }

.nav { position: sticky; top: 0; z-index: 100; background: rgba(248,250,252,0.92); backdrop-filter: blur(10px); border-bottom: 2px solid var(--border-soft); padding: 16px 0; }
.nav-inner { display: flex; align-items: center; justify-content: space-between; }
.logo { font-family: 'Geist', system-ui, sans-serif; font-size: 1.45rem; font-weight: 700; color: var(--text); letter-spacing: -0.035em; cursor: pointer; }
.logo span { color: #0EA5E9; text-shadow: 0 0 12px rgba(14,165,233,0.40); }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { color: var(--text-dim); font-weight: 500; font-size: 14px; transition: color 200ms; }
.nav-links a:hover { color: var(--primary); text-decoration: none; }
.nav-cta { background: var(--cta); color: #fff !important; padding: 9px 20px; border-radius: 8px; font-weight: 600; font-size: 14px; cursor: pointer; transition: all 200ms; }
.nav-cta:hover { background: var(--cta-hover); transform: translateY(-1px); }
.nav-burger { display: none; background: transparent; border: none; padding: 8px; cursor: pointer; color: var(--text); }
.nav-burger svg { width: 24px; height: 24px; display: block; }
.nav-mobile { display: none; padding: 14px 32px 18px; background: var(--bg-card); border-bottom: 1px solid var(--border-soft); flex-direction: column; gap: 12px; }
.nav-mobile a { color: var(--text-dim); font-weight: 500; font-size: 16px; padding: 8px 0; }
.nav-mobile .nav-cta { display: inline-block; align-self: flex-start; }
.nav-mobile.open { display: flex; }
@media (max-width: 760px) {
  .nav-links { display: none; }
  .nav-burger { display: inline-flex; }
}

/* Blog index hero */
.blog-hero { padding: 72px 0 36px; position: relative; overflow: hidden; }
.blog-hero::before { content:''; position:absolute; top:-300px; left:50%; transform: translateX(-50%); width:1200px; height:700px; background:radial-gradient(ellipse, rgba(56,189,248,0.16), transparent 60%); pointer-events:none; }
.blog-hero .container { position: relative; z-index: 1; max-width: 760px; }
.blog-eyebrow { display: inline-flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 11px; font-weight: 500; color: var(--primary-dark); letter-spacing: 0.16em; text-transform: uppercase; padding: 6px 12px; background: var(--primary-soft); border-radius: 999px; margin-bottom: 20px; }
.blog-eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--cta); box-shadow: 0 0 8px var(--cta); }
.blog-hero h1 { font-family: var(--display); font-size: clamp(36px, 5vw, 54px); line-height: 1.05; letter-spacing: -0.025em; margin-bottom: 18px; font-weight: 700; }
.blog-hero p.blog-lede { font-size: 19px; color: var(--text-dim); line-height: 1.55; }

/* Filter chips */
.blog-filters-wrap { padding: 8px 0 24px; }
.blog-filters { display: flex; gap: 10px; flex-wrap: wrap; max-width: 760px; margin: 0; }
.filter { font-family: var(--mono); font-size: 12px; font-weight: 600; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--border-soft); background: var(--bg-card); color: var(--text-dim); cursor: pointer; letter-spacing: 0.04em; transition: all 200ms; }
.filter:hover { border-color: var(--primary); color: var(--primary); }
.filter.active { background: var(--text); color: #fff; border-color: var(--text); }

/* Blog grid */
.blog-grid-wrap { padding: 0 0 80px; }
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
@media (max-width: 980px) { .blog-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .blog-grid { grid-template-columns: 1fr; } }
.blog-card { background: var(--bg-card); border: 1px solid var(--border-soft); border-radius: 14px; padding: 24px 22px; transition: all 200ms; cursor: pointer; display: flex; flex-direction: column; }
.blog-card:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: 0 12px 24px -8px rgba(15,23,42,0.10); text-decoration: none; }
.blog-card .card-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.card-tag { display: inline-block; background: var(--tag, #4285F4); color: #fff; padding: 3px 10px; border-radius: 999px; font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.card-date { font-family: var(--mono); font-size: 11px; color: var(--text-muted); }
.blog-card h2.card-title { font-family: var(--display); font-size: 19px; line-height: 1.3; font-weight: 600; letter-spacing: -0.01em; color: var(--text); margin-bottom: 10px; }
.blog-card p.card-desc { font-size: 14px; color: var(--text-dim); line-height: 1.55; margin-bottom: 14px; flex: 1; }
.blog-card .card-read { font-family: var(--mono); font-size: 11px; color: var(--primary); font-weight: 600; letter-spacing: 0.04em; }

/* Single post */
.post-header { padding: 64px 0 24px; position: relative; overflow: hidden; }
.post-header::before { content:''; position:absolute; top:-300px; left:50%; transform: translateX(-50%); width:1200px; height:700px; background:radial-gradient(ellipse, rgba(56,189,248,0.14), transparent 60%); pointer-events:none; }
.post-header .container { position: relative; z-index: 1; }
.post-back { display: inline-block; font-family: var(--mono); font-size: 12px; color: var(--primary); text-transform: uppercase; letter-spacing: 0.12em; font-weight: 600; margin-bottom: 22px; }
.post-meta { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.post-tag { display: inline-block; background: var(--tag, #4285F4); color: #fff; padding: 4px 12px; border-radius: 999px; font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.post-date, .post-read { font-family: var(--mono); font-size: 12px; color: var(--text-muted); }
.post-title { font-family: var(--display); font-size: clamp(32px, 4.5vw, 44px); line-height: 1.1; letter-spacing: -0.025em; margin-bottom: 18px; font-weight: 700; }
.post-lede { font-size: 19px; color: var(--text-dim); line-height: 1.55; }

.post-body { padding: 24px 0 56px; }
.post-body h2 { font-family: var(--display); font-size: 28px; line-height: 1.2; letter-spacing: -0.018em; margin: 44px 0 16px; font-weight: 700; }
.post-body h3 { font-family: var(--display); font-size: 21px; line-height: 1.3; letter-spacing: -0.012em; margin: 32px 0 12px; font-weight: 600; }
.post-body h4 { font-family: var(--display); font-size: 17px; line-height: 1.35; margin: 24px 0 10px; font-weight: 600; }
.post-body p { font-size: 17px; color: var(--text-dim); line-height: 1.7; margin-bottom: 18px; }
.post-body p strong { color: var(--text); font-weight: 600; }
.post-body a { color: var(--primary); font-weight: 500; }
.post-body a:hover { color: var(--primary-dark); text-decoration: underline; }

.post-body ul, .post-body ol { margin: 0 0 22px 0; padding-left: 0; list-style: none; counter-reset: ol-counter; }
.post-body ul li, .post-body ol li { padding-left: 28px; position: relative; margin-bottom: 10px; color: var(--text-dim); line-height: 1.65; }
.post-body ul li::before { content: '→'; position: absolute; left: 0; top: 0; color: var(--cta); font-weight: 700; }
.post-body ol li { counter-increment: ol-counter; }
.post-body ol li::before { content: counter(ol-counter) "."; position: absolute; left: 0; top: 0; color: var(--primary); font-family: var(--mono); font-weight: 700; font-size: 14px; }
.post-body li > strong:first-child { color: var(--text); font-weight: 600; }

.post-body blockquote { border-left: 4px solid var(--cta); padding: 8px 22px; margin: 28px 0; background: var(--bg-card); border-radius: 0 8px 8px 0; color: var(--text); font-family: var(--display); font-size: 19px; line-height: 1.45; font-weight: 500; }
.post-body code { background: var(--bg-soft); border: 1px solid var(--border-soft); padding: 2px 6px; border-radius: 4px; font-family: var(--mono); font-size: 13.5px; color: var(--text); }
.post-body pre { background: #0F172A; color: #E2E8F0; padding: 18px 20px; border-radius: 10px; overflow-x: auto; margin: 22px 0; font-family: var(--mono); font-size: 13px; line-height: 1.55; }
.post-body pre code { background: transparent; border: none; padding: 0; color: inherit; font-size: inherit; }
.post-body table { width: 100%; border-collapse: collapse; margin: 22px 0; font-size: 14.5px; }
.post-body th { background: var(--bg-soft); border: 1px solid var(--border-soft); padding: 10px 14px; text-align: left; font-family: var(--display); font-weight: 600; color: var(--text); }
.post-body td { border: 1px solid var(--border-soft); padding: 10px 14px; vertical-align: top; color: var(--text-dim); }
.post-body img { max-width: 100%; height: auto; border-radius: 10px; margin: 24px 0; }
.post-body hr { border: none; border-top: 1px solid var(--border-soft); margin: 36px 0; }

/* Inline post CTA */
.post-cta { padding: 60px 0; background: var(--text); color: #fff; text-align: center; position: relative; overflow: hidden; }
.post-cta::before { content:''; position:absolute; top:-200px; left:50%; transform:translateX(-50%); width:800px; height:400px; background:radial-gradient(ellipse, rgba(56,189,248,0.18), transparent 60%); pointer-events:none; }
.post-cta-content { position: relative; z-index: 1; max-width: 600px; margin: 0 auto; padding: 0 32px; }
.post-cta h2 { font-family: var(--display); font-size: clamp(26px, 3.5vw, 36px); line-height: 1.15; letter-spacing: -0.02em; margin-bottom: 12px; font-weight: 700; color: #fff; }
.post-cta p { color: rgba(255,255,255,0.72); font-size: 16px; margin-bottom: 24px; }
.post-cta-btn { display: inline-block; background: var(--cta); color: #fff; padding: 14px 28px; border-radius: 10px; font-weight: 700; font-size: 16px; transition: filter 200ms; }
.post-cta-btn:hover { filter: brightness(1.08); text-decoration: none; }

/* Related posts */
.related { max-width: 780px; margin: 0 auto; padding: 56px 32px 0; }
.related h3 { font-family: var(--display); font-size: 14px; letter-spacing: 0.1em; color: var(--text-muted); text-transform: uppercase; margin-bottom: 14px; font-weight: 600; }
.related ul { display: grid; grid-template-columns: 1fr; gap: 10px; list-style: none; padding: 0; }
.related li a { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border: 1px solid var(--border-soft); border-radius: 10px; background: var(--bg-card); color: var(--text); font-weight: 500; transition: all 200ms; }
.related li a:hover { border-color: var(--primary); transform: translateX(4px); text-decoration: none; }
.related-tag { font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; padding: 3px 8px; background: var(--bg-soft); color: var(--text-muted); border-radius: 999px; flex-shrink: 0; }

footer { padding: 40px 0; background: var(--text); color: rgba(255,255,255,0.55); border-top: 1px solid rgba(255,255,255,0.08); font-size: 13px; }
footer .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 18px; }
footer a { color: rgba(255,255,255,0.7); }
footer a:hover { color: #fff; }
