/* ═══════════════════════════════════════════════════════════
   Scrapios — theme.css
   ═══════════════════════════════════════════════════════════ */

/* ── Tokens ─────────────────────────────────────────────── */
:root {
  /* Neutral palette — zinc scale */
  --z950: #09090b;
  --z900: #18181b;
  --z800: #27272a;
  --z700: #3f3f46;
  --z500: #71717a;
  --z400: #a1a1aa;
  --z200: #e4e4e7;
  --z100: #f4f4f5;
  --z50:  #fafafa;

  /* Brand */
  --violet:     #7c3aed;
  --violet-mid: #8b5cf6;
  --violet-dim: rgba(124,58,237,.12);
  --cyan:       #06b6d4;
  --cyan-dim:   rgba(6,182,212,.1);

  /* Semantic */
  --bg:          var(--z950);
  --bg-card:     var(--z900);
  --bg-raised:   var(--z800);
  --border:      var(--z800);
  --border-subtle: rgba(255,255,255,.06);
  --text:        var(--z50);
  --text-muted:  var(--z400);
  --text-faint:  var(--z500);

  /* Gradient — used sparingly */
  --grad: linear-gradient(135deg, #7c3aed 0%, #06b6d4 100%);

  /* Radius */
  --r-sm:  6px;
  --r:     10px;
  --r-lg:  16px;
  --r-xl:  20px;

  /* Transitions */
  --t: .18s ease;

  --container: 1160px;
  --nav-h:     72px;
}

/* ── Reset ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv02","cv03","cv04","cv11";
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
ul, ol { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ── Type scale ──────────────────────────────────────────── */
h1 { font-size: clamp(2.6rem, 5.5vw, 4.2rem); font-weight: 800; letter-spacing: -.04em; line-height: 1.05; }
h2 { font-size: clamp(1.75rem, 3vw, 2.5rem);  font-weight: 700; letter-spacing: -.03em; line-height: 1.1; }
h3 { font-size: 1.05rem; font-weight: 600; letter-spacing: -.01em; line-height: 1.3; }
p  { line-height: 1.7; }

.gradient-text {
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Layout ──────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}
.section    { padding-block: 96px; }
.section-sm { padding-block: 56px; }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 20px;
  border-radius: var(--r-sm);
  font-size: .875rem;
  font-weight: 600;
  transition: all var(--t);
  white-space: nowrap;
  line-height: 1;
}
.btn-lg { padding: 13px 28px; font-size: .95rem; }

.btn-primary {
  background: var(--violet);
  color: #fff;
  box-shadow: 0 0 0 1px rgba(124,58,237,.5) inset;
}
.btn-primary:hover {
  background: var(--violet-mid);
  box-shadow: 0 4px 20px rgba(124,58,237,.4), 0 0 0 1px rgba(124,58,237,.6) inset;
  transform: translateY(-1px);
}

.btn-ghost {
  color: var(--text-muted);
  border: 1px solid var(--border);
  background: transparent;
}
.btn-ghost:hover {
  color: var(--text);
  border-color: var(--z700);
  background: var(--z900);
}

.btn-outline-light {
  color: var(--z200);
  border: 1px solid rgba(255,255,255,.15);
  background: rgba(255,255,255,.04);
}
.btn-outline-light:hover {
  border-color: rgba(255,255,255,.3);
  background: rgba(255,255,255,.07);
  color: #fff;
}

/* ── Navigation ──────────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  border-bottom: 1px solid transparent;
  transition: background var(--t), border-color var(--t);
}
.site-header.scrolled {
  background: rgba(9,9,11,.85);
  backdrop-filter: blur(16px) saturate(1.6);
  border-color: var(--border);
}

.navbar {
  display: flex;
  align-items: center;
  height: var(--nav-h);
  gap: 0;
}

.navbar-brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  margin-right: 36px;
}
.brand-logo {
  width: 148px;
  height: auto;
  display: block;
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-right: auto;
}
.navbar-nav li a {
  display: block;
  padding: 6px 12px;
  font-size: .875rem;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: var(--r-sm);
  transition: color var(--t), background var(--t);
}
.navbar-nav li a:hover,
.navbar-nav li.current-menu-item a {
  color: var(--text);
  background: var(--z900);
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.nav-login {
  font-size: .875rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: var(--r-sm);
  transition: color var(--t);
}
.nav-login:hover { color: var(--text); }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 34px; height: 34px;
  margin-left: auto;
  cursor: pointer;
  flex-shrink: 0;
}
.hamburger span {
  display: block;
  width: 20px; height: 1.5px;
  background: var(--text-muted);
  border-radius: 2px;
  transition: all .22s ease;
}
.hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); background: var(--text); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); background: var(--text); }

/* Mobile menu */
.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 2px;
  padding: 12px 16px 20px;
  border-top: 1px solid var(--border);
  background: rgba(9,9,11,.97);
  backdrop-filter: blur(16px);
}
.mobile-menu li a,
.mobile-menu > a {
  display: block;
  padding: 10px 12px;
  font-size: .9rem;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: var(--r-sm);
  transition: color var(--t), background var(--t);
}
.mobile-menu li a:hover,
.mobile-menu > a:hover { color: var(--text); background: var(--z900); }
.mobile-menu .mobile-cta { margin-top: 10px; justify-content: center; width: 100%; }
.mobile-menu.open { display: flex; }

/* ── Hero ────────────────────────────────────────────────── */
.hero {
  padding-top: calc(var(--nav-h) + 72px);
  padding-bottom: 80px;
  /* subtle directional gradient — not a blob */
  background:
    radial-gradient(ellipse 70% 60% at 0% 0%, rgba(124,58,237,.07) 0%, transparent 70%);
}
.hero-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.hero-text { max-width: 520px; }

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--violet-mid);
  margin-bottom: 22px;
}
.hero-eyebrow-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--violet);
  animation: blink 2.4s ease infinite;
}
@keyframes blink {
  0%,100% { opacity: 1; }
  50%      { opacity: .3; }
}

.hero h1 { margin-bottom: 20px; }

.hero-sub {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 36px;
  max-width: 440px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.hero-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .8rem;
  color: var(--text-faint);
}
.hero-meta-item svg { color: var(--z700); flex-shrink: 0; }
.hero-meta-item strong { color: var(--text-muted); font-weight: 600; }

/* Code window */
.code-window {
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--z900);
  border: 1px solid var(--border);
  box-shadow: 0 24px 64px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.04) inset;
}
.code-window-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--border);
}
.code-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--z700);
}
.code-tab {
  font-size: .72rem;
  color: var(--text-faint);
  font-family: 'Menlo', 'Consolas', monospace;
  margin-left: auto;
}
.code-body {
  padding: 22px 24px;
  font-family: 'Menlo', 'Consolas', 'Monaco', monospace;
  font-size: .8rem;
  line-height: 2;
  color: var(--z400);
  overflow-x: auto;
}
.code-body pre { white-space: pre; }
.c-comment { color: var(--z700); font-style: italic; }
.c-key     { color: #93c5fd; }  /* blue-300 */
.c-str     { color: #86efac; }  /* green-300 */
.c-num     { color: #fdba74; }  /* orange-300 */
.c-prop    { color: #c4b5fd; }  /* violet-300 */
.c-prompt  { color: var(--z700); user-select: none; }

/* ── Divider ─────────────────────────────────────────────── */
.divider { height: 1px; background: var(--border); }

/* ── Inline stats strip ──────────────────────────────────── */
.stats-strip {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.stats-strip-inner {
  display: flex;
  align-items: stretch;
}
.stat-cell {
  flex: 1;
  padding: 28px 24px;
  text-align: center;
  border-right: 1px solid var(--border);
}
.stat-cell:last-child { border-right: none; }
.stat-num {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -.05em;
  line-height: 1;
  color: var(--text);
  margin-bottom: 4px;
}
.stat-desc { font-size: .78rem; color: var(--text-faint); font-weight: 500; }

/* ── Features ────────────────────────────────────────────── */
.features-intro {
  max-width: 560px;
  margin-bottom: 72px;
}
.features-intro .eyebrow { margin-bottom: 16px; }
.features-intro h2 { margin-bottom: 14px; }
.features-intro p { color: var(--text-muted); font-size: .975rem; }

/* Big feature row */
.feat-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  padding-block: 56px;
  border-top: 1px solid var(--border);
}
.feat-row:last-child { border-bottom: 1px solid var(--border); }
.feat-row.flipped { direction: rtl; }
.feat-row.flipped > * { direction: ltr; }

.feat-content { max-width: 440px; }
.feat-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--z900);
  border: 1px solid var(--border);
  display: grid; place-items: center;
  margin-bottom: 20px;
  color: var(--violet-mid);
}
.feat-content h3 { font-size: 1.35rem; margin-bottom: 12px; }
.feat-content p  { color: var(--text-muted); font-size: .9rem; line-height: 1.7; margin-bottom: 20px; }
.feat-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.feat-tag {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--text-faint);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 4px;
}

/* Feature visual panels */
.feat-visual {
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--z900);
  border: 1px solid var(--border);
  box-shadow: 0 16px 48px rgba(0,0,0,.4);
  min-height: 240px;
  display: flex;
  flex-direction: column;
}
.feat-visual-bar {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}
.feat-visual-label {
  font-size: .72rem;
  color: var(--text-faint);
  font-family: monospace;
  margin-left: auto;
}
.feat-visual-body {
  padding: 20px;
  flex: 1;
  font-family: monospace;
  font-size: .78rem;
  color: var(--z400);
  line-height: 1.9;
}

/* Minor features grid */
.minor-feats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-top: 72px;
}
.minor-feat {
  background: var(--bg);
  padding: 32px 28px;
}
.minor-feat-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: var(--z900);
  border: 1px solid var(--border);
  display: grid; place-items: center;
  margin-bottom: 16px;
  color: var(--text-muted);
}
.minor-feat h3 { font-size: .95rem; margin-bottom: 8px; color: var(--text); }
.minor-feat p  { font-size: .84rem; color: var(--text-faint); line-height: 1.65; }

/* ── Platform tags ───────────────────────────────────────── */
.platform-section { border-top: 1px solid var(--border); }
.platform-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 32px;
}
.platform-header h2 { font-size: 1.3rem; }
.platform-header a  { font-size: .85rem; color: var(--text-faint); transition: color var(--t); }
.platform-header a:hover { color: var(--text); }

.platform-tags { display: flex; flex-wrap: wrap; gap: 10px; }
.platform-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--z900);
  font-size: .83rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: border-color var(--t), color var(--t), background var(--t);
}
.platform-tag:hover {
  border-color: var(--z700);
  color: var(--text);
  background: var(--z800);
}
.platform-tag-icon { font-size: 1rem; line-height: 1; }

/* ── Blog ────────────────────────────────────────────────── */
.blog-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 40px;
}
.blog-header h2 { font-size: 1.3rem; }
.blog-header a  { font-size: .85rem; color: var(--text-faint); transition: color var(--t); }
.blog-header a:hover { color: var(--text); }

.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-bottom: 0;
}
.post-card {
  background: var(--bg);
  display: flex;
  flex-direction: column;
  transition: background var(--t);
}
.post-card:hover { background: var(--z900); }

.post-card-thumb { overflow: hidden; aspect-ratio: 16/9; }
.post-card-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.post-card:hover .post-card-thumb img { transform: scale(1.03); }
.post-card-no-thumb {
  aspect-ratio: 16/9;
  background: var(--z900);
  display: flex; align-items: center; justify-content: center;
  border-bottom: 1px solid var(--border);
}
.post-card-no-thumb svg { color: var(--z700); }

.post-card-body { padding: 24px; flex: 1; display: flex; flex-direction: column; }
.post-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.post-category {
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--violet-mid);
}
.meta-dot {
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--z700);
  flex-shrink: 0;
  display: inline-block;
}
.post-reading-time { font-size: .78rem; color: var(--text-faint); }
.post-date { font-size: .78rem; color: var(--text-faint); }
.post-card-body h3 { font-size: .93rem; margin-bottom: 8px; color: var(--text); }
.post-card-body h3 a { transition: color var(--t); }
.post-card-body h3 a:hover { color: var(--violet-mid); }
.post-card-body p { font-size: .84rem; color: var(--text-faint); flex: 1; margin-bottom: 16px; line-height: 1.6; }
.post-read-more {
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-faint);
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color var(--t), gap var(--t);
}
.post-read-more::after { content: '→'; }
.post-card:hover .post-read-more { color: var(--text); gap: 7px; }

/* ── CTA ─────────────────────────────────────────────────── */
.cta-section {
  border-top: 1px solid var(--border);
}
.cta-inner {
  padding: 80px 0;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 48px;
  align-items: center;
}
.cta-text h2 { margin-bottom: 10px; }
.cta-text p  { color: var(--text-muted); font-size: .95rem; max-width: 480px; }
.cta-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; justify-content: flex-end; }

/* ── Eyebrow / label ─────────────────────────────────────── */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 14px;
}
.eyebrow-line {
  width: 20px; height: 1px;
  background: var(--z700);
}

/* ── Footer ──────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding-top: 64px;
  padding-bottom: 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}
.footer-brand .navbar-brand { margin-bottom: 14px; }
.footer-brand p {
  font-size: .85rem;
  color: var(--text-faint);
  line-height: 1.7;
  margin-bottom: 20px;
  max-width: 240px;
}
.footer-col h4 {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-faint);
  margin-bottom: 16px;
}
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col ul li a {
  font-size: .85rem;
  color: var(--text-faint);
  transition: color var(--t);
}
.footer-col ul li a:hover { color: var(--text); }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.footer-bottom p { font-size: .78rem; color: var(--z700); }
.footer-links { display: flex; gap: 16px; }
.footer-links a { font-size: .78rem; color: var(--z700); transition: color var(--t); }
.footer-links a:hover { color: var(--text-muted); }

/* ── Inner pages ─────────────────────────────────────────── */
.page-hero {
  padding-top: calc(var(--nav-h) + 56px);
  padding-bottom: 56px;
  border-bottom: 1px solid var(--border);
}
.page-hero-inner { max-width: 680px; }
.page-hero h1 { margin-bottom: 14px; }
.page-hero p  { font-size: 1.05rem; color: var(--text-muted); }
.page-content {
  max-width: 720px;
  padding-block: 64px;
  padding-inline: 24px;
  margin-inline: auto;
  color: var(--text-muted);
  font-size: .95rem;
  line-height: 1.85;
}
.page-content h2, .page-content h3 { color: var(--text); margin: 2em 0 .75em; }
.page-content p { margin-bottom: 1.2em; }
.page-content a { color: #93c5fd; text-decoration: underline; text-underline-offset: 3px; }
.page-content code {
  font-family: 'Menlo', 'Consolas', monospace;
  font-size: .84em;
  color: #93c5fd;
  background: var(--z900);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 4px;
}
.page-content pre {
  background: var(--z900);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 22px;
  overflow-x: auto;
  margin: 1.4em 0;
}
.page-content pre code { background: none; border: none; padding: 0; color: var(--z400); font-size: .82rem; }

/* ── Archive / Blog listing ──────────────────────────────── */
.blog-listing-header {
  padding-top: calc(var(--nav-h) + 64px);
  padding-bottom: 56px;
  border-bottom: 1px solid var(--border);
}
.blog-listing-header h1 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); margin-bottom: 10px; }
.blog-listing-header p  { color: var(--text-muted); font-size: .95rem; }

/* Featured (first) post */
.post-featured {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--z900);
  margin-bottom: 1px;
  transition: background var(--t);
}
.post-featured:hover { background: var(--z800); }
.post-featured-thumb {
  overflow: hidden;
}
.post-featured-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.post-featured:hover .post-featured-thumb img { transform: scale(1.03); }
.post-featured-no-thumb {
  background: linear-gradient(135deg, var(--z900), var(--z800));
  display: flex; align-items: center; justify-content: center;
  min-height: 260px;
}
.post-featured-no-thumb svg { color: var(--z700); }
.post-featured-body {
  padding: 40px;
  display: flex;
  flex-direction: column;
}
.post-featured-body .post-meta { margin-bottom: 16px; }
.post-featured-body h2 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--text);
  margin-bottom: 12px;
  line-height: 1.2;
  transition: color var(--t);
}
.post-featured:hover .post-featured-body h2 { color: var(--z200); }
.post-featured-body p {
  font-size: .9rem;
  color: var(--text-faint);
  line-height: 1.7;
  flex: 1;
  margin-bottom: 24px;
}
.post-featured-link {
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: auto;
  transition: color var(--t), gap var(--t);
}
.post-featured-link::after { content: '→'; }
.post-featured:hover .post-featured-link { color: var(--text); gap: 9px; }

/* Regular post grid */
.archive-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-bottom-left-radius: var(--r-lg);
  border-bottom-right-radius: var(--r-lg);
  border-top: none;
  overflow: hidden;
}

/* ── Single post ─────────────────────────────────────────── */
.post-header {
  padding-top: calc(var(--nav-h) + 64px);
  padding-bottom: 56px;
  border-bottom: 1px solid var(--border);
}
.post-header-inner {
  max-width: 680px;
  margin-inline: auto;
  padding-inline: 24px;
}
.post-header-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.post-header-meta .post-category {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--violet-mid);
  background: var(--violet-dim);
  padding: 4px 10px;
  border-radius: 4px;
}
.post-header-meta .post-date,
.post-header-meta .post-reading-time {
  font-size: .8rem;
  color: var(--text-faint);
}
.post-header-meta .meta-dot {
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--z700);
  flex-shrink: 0;
}
.post-header h1 {
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  margin-bottom: 18px;
  letter-spacing: -.03em;
  line-height: 1.1;
}
.post-header-excerpt {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 32px;
}
.post-header-author {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.post-author-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--z800);
  border: 1px solid var(--border);
  display: grid; place-items: center;
  font-size: .8rem;
  color: var(--text-faint);
  font-weight: 600;
  flex-shrink: 0;
  overflow: hidden;
}
.post-author-avatar img { width: 100%; height: 100%; object-fit: cover; }
.post-author-name { font-size: .85rem; font-weight: 600; color: var(--text); }
.post-author-role { font-size: .75rem; color: var(--text-faint); }

/* Cover image */
.post-cover {
  max-width: 860px;
  margin-inline: auto;
  padding-inline: 24px;
  padding-top: 48px;
}
.post-cover img {
  width: 100%;
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  display: block;
}

/* Article body */
.article-body {
  max-width: 680px;
  margin-inline: auto;
  padding-inline: 24px;
  padding-block: 56px;
}
.article-body > * + * { margin-top: 1.4em; }

.article-body p {
  font-size: 1rem;
  line-height: 1.85;
  color: var(--text-muted);
}
.article-body h2 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--text);
  margin-top: 2.4em;
  margin-bottom: .5em;
  padding-bottom: .5em;
  border-bottom: 1px solid var(--border);
}
.article-body h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
  margin-top: 2em;
  margin-bottom: .4em;
}
.article-body h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-top: 1.75em;
}
.article-body a {
  color: #93c5fd;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(147,197,253,.3);
  transition: text-decoration-color var(--t);
}
.article-body a:hover { text-decoration-color: #93c5fd; }

.article-body strong { color: var(--text); font-weight: 600; }
.article-body em     { font-style: italic; }

.article-body ul,
.article-body ol {
  padding-left: 1.5rem;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.85;
}
.article-body ul { list-style: disc; }
.article-body ol { list-style: decimal; }
.article-body li { margin-top: .4em; }
.article-body li::marker { color: var(--z700); }

.article-body blockquote {
  border-left: 3px solid var(--violet);
  margin-left: 0;
  padding: 4px 0 4px 24px;
  color: var(--text-muted);
  font-size: 1.05rem;
  font-style: italic;
}
.article-body blockquote p { color: inherit; }

.article-body code {
  font-family: 'Menlo', 'Consolas', monospace;
  font-size: .84em;
  color: #c4b5fd;
  background: var(--z900);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 4px;
}
.article-body pre {
  background: var(--z900);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 22px 24px;
  overflow-x: auto;
  margin-block: 1.6em;
}
.article-body pre code {
  background: none;
  border: none;
  padding: 0;
  color: var(--z400);
  font-size: .82rem;
  line-height: 1.8;
}
.article-body img {
  max-width: 100%;
  border-radius: var(--r);
  border: 1px solid var(--border);
  display: block;
  margin-inline: auto;
}
.article-body figure { margin: 0; }
.article-body figcaption {
  text-align: center;
  font-size: .78rem;
  color: var(--text-faint);
  margin-top: 8px;
}
.article-body hr {
  border: none;
  border-top: 1px solid var(--border);
  margin-block: 2.4em;
}
.article-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: .88rem;
}
.article-body th {
  text-align: left;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-faint);
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}
.article-body td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
}

/* Post nav */
.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-top: 56px;
}
.post-nav-link {
  background: var(--bg);
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: background var(--t);
}
.post-nav-link:hover { background: var(--z900); }
.post-nav-link.next { text-align: right; }
.post-nav-direction {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-faint);
}
.post-nav-title {
  font-size: .9rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: color var(--t);
}
.post-nav-link:hover .post-nav-title { color: var(--text); }

/* ── 404 ─────────────────────────────────────────────────── */
.not-found {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-height: 80vh;
  padding-top: var(--nav-h);
  padding-inline: 24px;
  max-width: 520px;
  margin-inline: auto;
}
.not-found .four-oh-four {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 20px;
  border: 1px solid var(--border);
  padding: 5px 12px;
  border-radius: 4px;
  display: inline-block;
}
.not-found h2 { font-size: 2.2rem; margin-bottom: 12px; }
.not-found p  { color: var(--text-muted); margin-bottom: 28px; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 1024px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid   { grid-template-columns: 1fr 1fr; gap: 32px; }
  .minor-feats   { grid-template-columns: 1fr 1fr; }
  .cta-inner     { grid-template-columns: 1fr; gap: 24px; }
  .cta-actions   { justify-content: flex-start; }
}

@media (max-width: 900px) {
  .hero-layout { grid-template-columns: 1fr; }
  .code-window { display: none; }
  .hero-text   { max-width: 100%; }
  .feat-row    { grid-template-columns: 1fr; gap: 32px; }
  .feat-row.flipped { direction: ltr; }
  .post-featured { grid-template-columns: 1fr; }
  .post-featured-no-thumb { min-height: 180px; }
  .post-featured-body { padding: 28px; }
  .post-nav { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .navbar-nav,
  .navbar-actions { display: none; }
  .hamburger      { display: flex; }

  .stats-strip-inner { flex-wrap: wrap; }
  .stat-cell { border-right: none; border-bottom: 1px solid var(--border); flex-basis: 50%; }
  .stat-cell:nth-child(odd) { border-right: 1px solid var(--border); }
  .stat-cell:nth-last-child(-n+2) { border-bottom: none; }

  .posts-grid    { grid-template-columns: 1fr; }
  .archive-grid  { grid-template-columns: 1fr; }
  .post-featured { grid-template-columns: 1fr; }
  .minor-feats   { grid-template-columns: 1fr; }
  .footer-grid   { grid-template-columns: 1fr; gap: 24px; }

  h1 { font-size: 2.2rem; }
  .section { padding-block: 64px; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
}

@media (max-width: 480px) {
  .platform-tags { gap: 7px; }
  .hero-actions  { flex-direction: column; align-items: flex-start; }
  .hero-actions .btn { width: 100%; justify-content: center; }
}

/* ── Docs layout ─────────────────────────────────────────── */
.docs-wrap {
  display: flex;
  align-items: flex-start;
  min-height: 100vh;
  padding-top: var(--nav-h);
}

.docs-sidebar {
  width: 240px;
  flex-shrink: 0;
  position: sticky;
  top: var(--nav-h);
  height: calc(100vh - var(--nav-h));
  overflow-y: auto;
  border-right: 1px solid var(--border);
  scrollbar-width: thin;
  scrollbar-color: var(--z800) transparent;
}
.docs-sidebar::-webkit-scrollbar { width: 4px; }
.docs-sidebar::-webkit-scrollbar-thumb { background: var(--z800); border-radius: 4px; }

.docs-sidebar-inner { padding: 28px 0 48px; }

.docs-nav-group { margin-bottom: 28px; }
.docs-nav-label {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-faint);
  padding: 0 20px;
  margin-bottom: 6px;
}
.docs-nav-link {
  display: block;
  padding: 5px 20px;
  font-size: .83rem;
  color: var(--text-faint);
  border-left: 2px solid transparent;
  transition: color var(--t), border-color var(--t), background var(--t);
  line-height: 1.4;
}
.docs-nav-link:hover { color: var(--text-muted); background: rgba(255,255,255,.02); }
.docs-nav-link.active {
  color: var(--violet-mid);
  border-color: var(--violet);
  background: rgba(124,58,237,.06);
}

/* ── Docs content ────────────────────────────────────────── */
.docs-content {
  flex: 1;
  min-width: 0;
  max-width: 820px;
  padding: 48px 56px 96px;
}

.docs-section {
  padding-bottom: 56px;
  margin-bottom: 56px;
  border-bottom: 1px solid var(--border);
}
.docs-section:last-child { border-bottom: none; margin-bottom: 0; }

.docs-page-title {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -.04em;
  margin-bottom: 16px;
}
.docs-lead {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 24px;
}

.docs-content h2 {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -.025em;
  color: var(--text);
  margin-bottom: 14px;
  margin-top: 0;
}
.docs-content h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-top: 28px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.docs-content p {
  font-size: .9rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 14px;
}
.docs-content ul {
  list-style: disc;
  padding-left: 1.4rem;
  margin-bottom: 14px;
}
.docs-content ul li {
  font-size: .9rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 6px;
}
.docs-content ul li strong { color: var(--text); }
.docs-content a { color: #93c5fd; text-decoration: underline; text-underline-offset: 3px; }
.docs-content code {
  font-family: 'Menlo', 'Consolas', monospace;
  font-size: .8em;
  color: #c4b5fd;
  background: var(--z900);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 4px;
}

/* Endpoint pill */
.docs-endpoint {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--z900);
  border: 1px solid var(--border);
  border-radius: var(--r);
  margin-bottom: 16px;
  font-family: 'Menlo', 'Consolas', monospace;
  font-size: .83rem;
  color: var(--z400);
}
.docs-endpoint code {
  background: none;
  border: none;
  padding: 0;
  color: var(--z300, #d4d4d8);
  font-size: .83rem;
}
.docs-method {
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .07em;
  padding: 3px 8px;
  border-radius: 4px;
  flex-shrink: 0;
}
.docs-method-get    { background: rgba(16,185,129,.15);  color: #6ee7b7; }
.docs-method-post   { background: rgba(59,130,246,.15);  color: #93c5fd; }
.docs-method-put    { background: rgba(245,158,11,.15);  color: #fcd34d; }
.docs-method-delete { background: rgba(239,68,68,.15);   color: #fca5a5; }

/* Badges */
.docs-badge {
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 4px;
}
.docs-badge-green  { background: rgba(16,185,129,.1);  color: #6ee7b7;  border: 1px solid rgba(16,185,129,.2); }
.docs-badge-blue   { background: rgba(59,130,246,.1);  color: #93c5fd;  border: 1px solid rgba(59,130,246,.2); }
.docs-badge-red    { background: rgba(239,68,68,.1);   color: #fca5a5;  border: 1px solid rgba(239,68,68,.2); }
.docs-badge-gray   { background: var(--z900);           color: var(--text-faint); border: 1px solid var(--border); }

/* Code block */
.docs-code-block {
  background: var(--z900);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  margin: 14px 0 20px;
}
.docs-code-block pre {
  padding: 18px 20px;
  overflow-x: auto;
  margin: 0;
}
.docs-code-block pre code {
  background: none;
  border: none;
  padding: 0;
  color: var(--z400);
  font-family: 'Menlo', 'Consolas', monospace;
  font-size: .8rem;
  line-height: 1.85;
}
/* Syntax colours inside docs code blocks */
.dc-str     { color: #86efac; }
.dc-key     { color: #93c5fd; }
.dc-num     { color: #fdba74; }
.dc-comment { color: var(--z700); font-style: italic; }
.dc-kw      { color: #c4b5fd; }

/* Tabbed code */
.docs-code-tabs {
  background: var(--z900);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  margin: 14px 0 20px;
}
.docs-tabs-bar {
  display: flex;
  border-bottom: 1px solid var(--border);
  padding: 0 4px;
}
.docs-tab {
  padding: 9px 14px;
  font-size: .75rem;
  font-weight: 600;
  color: var(--text-faint);
  border-radius: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color var(--t), border-color var(--t);
  cursor: pointer;
}
.docs-tab:hover  { color: var(--text-muted); }
.docs-tab.active { color: var(--violet-mid); border-color: var(--violet); }
.docs-tab-content { padding: 0; }
.docs-tab-content pre {
  padding: 18px 20px;
  overflow-x: auto;
  margin: 0;
  font-family: 'Menlo', 'Consolas', monospace;
  font-size: .8rem;
  line-height: 1.85;
  color: var(--z400);
}
.docs-tab-content.hidden { display: none; }

/* Table */
.docs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .83rem;
  margin: 14px 0 20px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
}
.docs-table thead tr { background: var(--z900); }
.docs-table th {
  text-align: left;
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-faint);
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.docs-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  vertical-align: top;
  line-height: 1.5;
}
.docs-table tbody tr:last-child td { border-bottom: none; }
.docs-table code {
  font-family: 'Menlo', 'Consolas', monospace;
  font-size: .8em;
  color: #c4b5fd;
  background: var(--z800);
  border: none;
  padding: 2px 5px;
  border-radius: 3px;
}

/* Callouts */
.docs-callout {
  padding: 14px 18px;
  border-radius: var(--r);
  font-size: .87rem;
  line-height: 1.65;
  margin: 16px 0 20px;
  border-left: 3px solid;
}
.docs-callout strong { color: var(--text); }
.docs-callout a { color: inherit; text-decoration: underline; }
.docs-callout-info {
  background: rgba(59,130,246,.07);
  border-color: rgba(59,130,246,.4);
  color: #93c5fd;
}
.docs-callout-tip {
  background: rgba(16,185,129,.07);
  border-color: rgba(16,185,129,.4);
  color: #6ee7b7;
}
.docs-callout-warning {
  background: rgba(245,158,11,.07);
  border-color: rgba(245,158,11,.4);
  color: #fcd34d;
}

/* ── Docs responsive ─────────────────────────────────────── */
@media (max-width: 900px) {
  .docs-sidebar { display: none; }
  .docs-content { padding: 32px 24px 80px; max-width: 100%; }
}
@media (max-width: 480px) {
  .docs-content { padding: 24px 16px 64px; }
  .docs-table { font-size: .78rem; }
  .docs-table th, .docs-table td { padding: 8px 10px; }
}
