:root {
  --bg: #ffffff;
  --bg-raised: #ffffff;
  --bg-inset: #f7f7f8;
  --bg-hover: #f1f1f5;
  --line: #e5e5ea;
  --line-soft: #ededf1;
  --text: #0e0e10;
  --text-dim: #6b6b73;
  --text-faint: #9b9ba4;
  --accent: #5b46e8;
  --accent-strong: #4934cf;
  --accent-ink: #211a63;
  --accent-soft: rgba(91, 70, 232, .10);
  --accent-softer: rgba(91, 70, 232, .055);
  --ink: #0e0e10;
  --radius: 10px;
  --radius-lg: 14px;
  --font-display: 'Sora', system-ui, sans-serif;
  --font-body: -apple-system, "Segoe UI", system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; width: 100%; overflow-x: hidden; }
body {
  background:
    radial-gradient(900px 420px at 12% -10%, rgba(91,70,232,.065), transparent 60%),
    radial-gradient(700px 380px at 100% 0%, rgba(14,14,16,.025), transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

.topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px max(18px, calc((100vw - 1120px) / 2));
  min-height: 62px;
  border-bottom: 1px solid rgba(229,229,234,.92);
  background: rgba(255,255,255,.84);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  flex-wrap: wrap; gap: 10px;
  position: sticky; top: 0; z-index: 20;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; min-width: 0; }
.brand-mark {
  display: grid; place-items: center;
  width: 32px; height: 32px;
  font-family: var(--font-mono); font-size: 11px; font-weight: 600; letter-spacing: .02em;
  color: #fff; background: linear-gradient(135deg, #0e0e10, #2a2850);
  border-radius: 8px; box-shadow: 0 5px 16px rgba(14,14,16,.09);
}
.brand-mark svg { width: 15px; height: 15px; }
.brand-name { font-family: var(--font-display); font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
.brand-sub { font-size: 11px; color: var(--text-faint); border-left: 1px solid var(--line); padding-left: 10px; margin-left: 1px; text-transform: lowercase; }
.topbar-right { display: flex; align-items: center; gap: 6px; }
.nav-link, .btn-pill {
  min-height: 40px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; text-decoration: none; white-space: nowrap;
  font-size: 12.5px; font-weight: 650; transition: background .16s, color .16s, border-color .16s, transform .12s;
}
.nav-link { padding: 8px 13px; color: var(--text-dim); }
.nav-link:hover { background: var(--bg-inset); color: var(--text); }
.nav-link.active { color: var(--accent); background: var(--accent-soft); }
.btn-pill { padding: 8px 16px; color: #fff; background: var(--accent); box-shadow: 0 7px 18px rgba(91,70,232,.15); }
.btn-pill:hover { background: var(--accent-strong); }
.btn-pill:active, .nav-link:active { transform: translateY(1px); }

main { max-width: 720px; margin: 0 auto; padding: 44px 20px 92px; }
.blog-wide main { max-width: 980px; }

.blog-hero {
  padding: 26px 26px 24px;
  margin-bottom: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(91,70,232,.07), rgba(255,255,255,.96) 58%);
  box-shadow: 0 10px 28px rgba(14,14,16,.045);
}
.blog-kicker, .article-meta {
  font-family: var(--font-mono); font-size: 10.5px; color: var(--accent);
  text-transform: uppercase; letter-spacing: .06em;
}
.blog-kicker { margin-bottom: 9px; }
.blog-hero h1 { font-family: var(--font-display); font-size: clamp(28px, 5vw, 38px); font-weight: 700; letter-spacing: -.035em; line-height: 1.1; margin: 0 0 10px; }
.blog-hero p { color: var(--text-dim); font-size: 14.5px; max-width: 62ch; margin: 0; line-height: 1.65; }

.post-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.post-card {
  display: block; text-decoration: none; color: inherit;
  padding: 20px 21px; border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: rgba(255,255,255,.9);
  box-shadow: 0 5px 18px rgba(14,14,16,.035);
  transition: border-color .16s, background .16s, transform .16s, box-shadow .16s;
}
.post-card:hover { border-color: rgba(91,70,232,.28); background: #fff; transform: translateY(-2px); box-shadow: 0 10px 26px rgba(14,14,16,.06); }
.post-meta { font-family: var(--font-mono); font-size: 10.5px; color: var(--text-faint); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 8px; }
.post-title { font-family: var(--font-display); font-size: 18px; font-weight: 700; margin: 0 0 7px; letter-spacing: -.015em; line-height: 1.3; }
.post-excerpt { color: var(--text-dim); font-size: 13.5px; line-height: 1.65; margin: 0; max-width: 70ch; }
.post-arrow { display: inline-flex; align-items: center; gap: 5px; margin-top: 13px; font-size: 11.5px; font-weight: 650; color: var(--accent); }

.back-link {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px;
  font-size: 12.5px; font-weight: 650; color: var(--text-dim); text-decoration: none;
  margin-bottom: 24px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 999px; background: #fff;
}
.back-link:hover { color: var(--accent); border-color: rgba(91,70,232,.25); }

.article-header { margin-bottom: 30px; padding-bottom: 25px; border-bottom: 1px solid var(--line); }
.article-meta { margin-bottom: 10px; color: var(--text-faint); }
.article-header h1 { font-family: var(--font-display); font-size: clamp(28px, 5.3vw, 38px); font-weight: 700; letter-spacing: -.04em; line-height: 1.14; margin: 0 0 12px; }
.article-dek { font-size: 15.5px; color: var(--text-dim); margin: 0; line-height: 1.62; }

article { font-size: 15.2px; }
article h2 { font-family: var(--font-display); font-size: 20px; font-weight: 700; letter-spacing: -.018em; margin: 34px 0 11px; line-height: 1.3; }
article h3 { font-family: var(--font-display); font-size: 16px; font-weight: 700; margin: 24px 0 9px; }
article p { font-size: 15px; color: #24242a; margin: 0 0 17px; line-height: 1.78; }
article ul, article ol { font-size: 15px; color: #24242a; margin: 0 0 18px; padding-left: 21px; }
article li { margin-bottom: 8px; line-height: 1.72; }
article a { color: var(--accent-strong); text-decoration-color: rgba(91,70,232,.35); text-underline-offset: 3px; font-weight: 560; }
article a:hover { text-decoration-color: var(--accent); }
article strong { font-weight: 700; color: var(--text); }
article code { font-family: var(--font-mono); font-size: .86em; background: var(--bg-inset); border: 1px solid var(--line-soft); padding: 2px 6px; border-radius: 5px; }
article blockquote {
  margin: 26px 0; padding: 16px 18px;
  border: 1px solid rgba(91,70,232,.18); border-left: 3px solid var(--accent);
  border-radius: 10px; background: var(--accent-softer);
  font-size: 15.5px; color: var(--accent-ink); font-style: italic;
}

.article-callout {
  margin: 28px 0 30px; padding: 17px 18px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--bg-inset);
}
.article-callout strong { display: block; font-family: var(--font-display); font-size: 13px; margin-bottom: 4px; }
.article-callout p { font-size: 13px; margin: 0; color: var(--text-dim); }

.post-cta {
  margin-top: 44px; padding: 23px;
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  border: 1px solid rgba(91,70,232,.16); border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(91,70,232,.075), rgba(247,247,248,.94));
}
.post-cta h3 { font-family: var(--font-display); font-size: 18px; margin: 0 0 5px; }
.post-cta p { margin: 0; color: var(--text-dim); font-size: 13.5px; max-width: 52ch; line-height: 1.55; }

footer.site-footer {
  border-top: 1px solid var(--line); padding: 28px 20px; text-align: center;
  font-size: 12px; color: var(--text-faint); background: rgba(255,255,255,.72);
}
footer.site-footer a { color: var(--text-dim); text-decoration: none; }
footer.site-footer a:hover { color: var(--accent); }
.social-links { display: flex; align-items: center; justify-content: center; gap: 9px; margin-bottom: 14px; }
.social-icon {
  display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px;
  border-radius: 10px; border: 1px solid var(--line); color: var(--text-faint); background: #fff;
  transition: color .16s ease, border-color .16s ease, background .16s ease, transform .14s ease;
}
.social-icon svg { width: 15px; height: 15px; max-width: 100%; max-height: 100%; }
.social-icon:hover { transform: translateY(-1px); border-color: rgba(91,70,232,.25); background: var(--accent-soft); color: var(--accent); box-shadow: none; }
.footer-contact { margin-top: 5px; }
.footer-contact a { font-weight: 650; }

@media (max-width: 680px) {
  .topbar { padding: 10px 14px; flex-wrap: nowrap; gap: 8px; }
  .topbar-right { width: auto; margin-left: auto; display: flex; align-items: center; gap: 4px; min-width: 0; }
  .topbar-right .nav-link, .topbar-right .btn-pill { width: auto; min-height: 36px; padding: 7px 9px; text-align: center; font-size: 11.5px; }
  main { padding: 30px 16px 70px; }
  .blog-hero { padding: 20px; margin-bottom: 16px; }
  .blog-hero h1 { font-size: 28px; }
  .blog-hero p { font-size: 14px; }
  .post-card { padding: 17px; }
  .article-header { margin-bottom: 24px; padding-bottom: 20px; }
  .article-header h1 { font-size: 28px; }
  .article-dek { font-size: 14.5px; }
  article h2 { font-size: 19px; margin-top: 30px; }
  article p, article ul, article ol { font-size: 14.25px; }
  .post-cta { display: grid; grid-template-columns: 1fr; padding: 20px; }
  .post-cta .btn-pill { width: 100%; }
  footer.site-footer { padding: 24px 16px; }
}

@media (max-width: 380px) {
  .brand-sub { display: none; }
  .brand { gap: 8px; }
  .brand-mark { width: 30px; height: 30px; }
  .topbar-right { gap: 5px; }
}
