:root {
  --bg: #fbfaf7;
  --ink: #0f172a;
  --ink-soft: #475569;
  --accent: #2563eb;
  --accent-dark: #1e40af;
  --gold: #facc15;
  --card: #ffffff;
  --line: #e5e2da;
  --radius: 16px;
  --shadow: 0 1px 3px rgba(15,23,42,.06), 0 8px 24px rgba(15,23,42,.06);
  --font: "Avenir Next", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--bg); color: var(--ink); line-height: 1.7; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
a { color: inherit; }
img { max-width: 100%; }

header { position: sticky; top: 0; z-index: 50; background: rgba(251,250,247,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
nav { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { font-weight: 800; font-size: 18px; letter-spacing: -.01em; text-decoration: none; }
.logo span { color: var(--accent); }
.nav-links { display: flex; gap: 24px; list-style: none; }
.nav-links a { text-decoration: none; font-size: 14.5px; font-weight: 600; color: var(--ink-soft); }
.nav-links a:hover { color: var(--ink); }
.nav-links a.current { color: var(--accent); }
.nav-cta { background: var(--accent); color: #fff !important; padding: 9px 18px; border-radius: 999px; }
.nav-cta:hover { background: var(--accent-dark); }
/* Burger menu */
.burger { display: none; flex-direction: column; justify-content: center; gap: 5px; width: 40px; height: 40px; background: none; border: none; cursor: pointer; padding: 8px; }
.burger span { display: block; height: 2px; width: 100%; background: var(--ink); border-radius: 2px; transition: transform .2s, opacity .2s; }
.burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
nav { gap: 12px; }
@media (max-width: 860px) {
  .nav-links { position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); display: none; padding: 10px 20px 16px; }
  .nav-links.open { display: flex; }
  .nav-links a { display: block; padding: 12px 4px; font-size: 15px; border-bottom: 1px solid var(--line); white-space: normal; }
  .nav-links a:last-child { border-bottom: none; }
  .nav-links .nav-cta { text-align: center; border-bottom: none; margin-top: 8px; }
  .burger { display: flex; }
}

/* Blog intro */
.blog-hero { padding: 56px 0 24px; }
.kicker { text-transform: uppercase; letter-spacing: .08em; font-size: 12.5px; font-weight: 800; color: var(--accent); margin-bottom: 10px; }
h1 { font-size: clamp(28px, 4vw, 40px); line-height: 1.15; letter-spacing: -.02em; font-weight: 800; margin-bottom: 14px; }
.lede { color: var(--ink-soft); font-size: 17px; max-width: 72ch; margin-bottom: 8px; }
.lede a { color: var(--accent); text-decoration: none; border-bottom: 1px solid #bfd0fb; }
.lede a:hover { color: var(--accent-dark); }

/* Post list */
.posts { padding: 32px 0 72px; }
.posts-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
@media (max-width: 860px) { .posts-grid { grid-template-columns: 1fr; } }
.post { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px; transition: transform .15s; }
.post:hover { transform: translateY(-2px); }
.post .date { font-size: 12.5px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .06em; }
.post h2 { font-size: 19px; letter-spacing: -.01em; line-height: 1.35; }
.post h2 a { text-decoration: none; }
.post h2 a:hover { color: var(--accent); }
.post p { color: var(--ink-soft); font-size: 14.5px; }
.post .more { margin-top: auto; font-weight: 700; font-size: 14px; color: var(--accent); text-decoration: none; }
.post .more:hover { color: var(--accent-dark); }

/* Article */
.article { max-width: 760px; margin: 0 auto; padding: 40px 20px 80px; }
.article .date { font-size: 13px; font-weight: 700; color: var(--ink-soft); margin-bottom: 12px; }
.article h1 { font-size: clamp(28px, 4vw, 38px); }
.article .excerpt { font-size: 19px; color: var(--ink-soft); margin: 6px 0 28px; }
.article .byline { display: flex; align-items: center; gap: 12px; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 32px; }
.article .byline img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.article .byline .who b { display: block; font-size: 14.5px; }
.article .byline .who small { color: var(--ink-soft); font-size: 13px; }
.article h2 { font-size: 24px; letter-spacing: -.02em; margin: 40px 0 12px; font-weight: 800; }
.article h3 { font-size: 19px; margin: 28px 0 8px; font-weight: 800; }
.article p { margin-bottom: 18px; }
.article ul, .article ol { margin: 0 0 18px 22px; }
.article li { margin-bottom: 8px; }
.article ul li::marker { color: var(--accent); }
.article blockquote { border-left: 4px solid var(--accent); background: #eef2ff; padding: 16px 20px; border-radius: 0 12px 12px 0; margin: 24px 0; font-size: 16.5px; color: var(--ink-soft); }
.article blockquote b { color: var(--ink); }
.article a { color: var(--accent); text-decoration: none; border-bottom: 1px solid #bfd0fb; }
.article a:hover { color: var(--accent-dark); }
.article .infobox { background: #fffbeb; border: 1px solid #fde68a; border-radius: 12px; padding: 18px 22px; margin: 24px 0; font-size: 15px; }
.article .infobox b { color: #92400e; }
.article .toc { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 18px 24px; margin: 24px 0 32px; box-shadow: var(--shadow); font-size: 14.5px; }
.article .toc b { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); }
.article .toc ol { margin: 10px 0 0 20px; }
.article .toc a { border: none; }
.article .tags { display: flex; gap: 8px; flex-wrap: wrap; margin: 28px 0 8px; }
.article .tags span { background: #eef2ff; color: var(--accent-dark); font-size: 12.5px; font-weight: 700; padding: 5px 12px; border-radius: 999px; }
.article table { width: 100%; border-collapse: collapse; margin: 24px 0; font-size: 14.5px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); }
.article .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 24px 0; border-radius: 12px; }
.article .table-wrap > table { margin: 0; }
.article th { text-align: left; background: linear-gradient(90deg, #1e3a8a, #2563eb); color: #fff; padding: 14px 14px; font-size: 14px; }
.article th:nth-child(4) { background: #16a34a; }
.article td { padding: 12px 14px; border-top: 1px solid var(--line); color: var(--ink-soft); vertical-align: top; }
.article tr:nth-child(even) td { background: #f8fafc; }
.article td:first-child { font-weight: 700; color: var(--ink); }
.article td:nth-child(4) { color: #166534; }
.article code { font-family: "SF Mono", Menlo, Consolas, monospace; font-size: .9em; background: #f1f5f9; padding: 2px 6px; border-radius: 6px; color: var(--ink); }
.article pre { background: #0f172a; color: #e2e8f0; padding: 18px 20px; border-radius: 12px; overflow-x: auto; font-size: 13.5px; line-height: 1.65; margin: 20px 0; }
.article pre code { background: none; padding: 0; color: #e2e8f0; }
.article .checklist { list-style: none; margin-left: 0; }
.article .checklist li { position: relative; padding-left: 34px; margin-bottom: 10px; }
.article .checklist input { position: absolute; left: 0; top: 3px; width: 18px; height: 18px; accent-color: var(--accent); }
.article table.compare th:nth-child(2) { background: #16a34a; }
.article table.compare td:nth-child(2) { color: #166534; }
.article details { border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; margin-bottom: 12px; background: var(--card); box-shadow: var(--shadow); }
.article details summary { cursor: pointer; font-weight: 700; color: var(--ink); }
.article details[open] summary { margin-bottom: 10px; }
.article details div p { margin: 0; }
.article details div { color: var(--ink-soft); font-size: 15px; }
.article .faq-item { border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; margin-bottom: 12px; background: var(--card); box-shadow: var(--shadow); }
.article .faq-item .faq-q { font-weight: 800; color: var(--accent-dark); font-size: 15.5px; margin-bottom: 6px; }
.article .faq-item p { color: var(--ink-soft); font-size: 15px; margin-bottom: 0; }
.article .faq-item p:last-child { margin-bottom: 0; }
.article .related { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 20px 24px; margin-top: 40px; box-shadow: var(--shadow); }
.article .related b { display: block; font-size: 12.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); margin-bottom: 12px; }
.article .related ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.article .related li { margin: 0; padding-left: 20px; position: relative; font-size: 15px; }
.article .related li::before { content: "→"; position: absolute; left: 0; color: var(--accent); font-weight: 800; }
@media (max-width: 640px) { .article table { font-size: 13px; } }

.cta-box { background: var(--ink); color: #fff; border-radius: 24px; padding: 36px; margin-top: 48px; text-align: center; }
.cta-box h2 { color: #fff; font-size: 26px; margin-bottom: 10px; }
.cta-box p { color: #cbd5e1; font-size: 15.5px; margin-bottom: 20px; }
.btn { display: inline-block; text-decoration: none; font-weight: 700; font-size: 15.5px; padding: 13px 26px; border-radius: 999px; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 4px 14px rgba(37,99,235,.35); }
.btn-primary:hover { background: var(--accent-dark); }
.cta-box .btn-primary { color: #fff; }

footer { border-top: 1px solid var(--line); padding: 32px 0; color: var(--ink-soft); font-size: 13.5px; }
footer .container { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
footer a { color: var(--accent); text-decoration: none; }

/* Mobile */
@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .blog-hero { padding: 36px 0 16px; }
  h1 { font-size: 28px; }
  .lede { font-size: 16px; }
  .posts-grid { gap: 14px; }
  .post { padding: 20px; }
  .article { padding: 24px 16px 60px; }
  .article h2 { font-size: 21px; margin: 32px 0 10px; }
  .article h3 { font-size: 18px; }
  .article .excerpt { font-size: 17px; }
  .cta-box { padding: 24px 20px; border-radius: 18px; }
  footer .container { flex-direction: column; gap: 8px; }
}