/* ====== Theme ====== */
:root{
  --header-from:#3E0986;
  --header-to:#6F0F7B;
  --bg:#0f172a;              /* deep slate */
  --bg-elev:#111827;         /* slightly lighter */
  --paper:#0b1220;           /* cards */
  --text:#e5e7eb;
  --muted:#9ca3af;
  --accent:#f13656;          /* brand accent from your earlier style */
  --border:rgba(255,255,255,.06);
  --shadow:0 10px 30px rgba(0,0,0,.35);
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,"Helvetica Neue",Arial,"Apple Color Emoji","Segoe UI Emoji";
  background:linear-gradient(180deg,#0f172a,#0b1322 60%, #0a1020);
  color:var(--text);
  line-height:1.65;
}

/* ====== Helpers ====== */
.container{max-width:1200px;margin:0 auto;padding:0 20px}
a{color:var(--accent);text-decoration:none}
a:hover{text-decoration:underline}
code{background:rgba(255,255,255,.06);border:1px solid var(--border);border-radius:6px;padding:.1rem .35rem}

/* ====== Header ====== */
.site-header{
  position:sticky;top:0;z-index:50;
  background:linear-gradient(90deg,var(--header-from),var(--header-to));
  box-shadow:var(--shadow);
}
.header-inner{
  display:flex;align-items:center;justify-content:space-between;
  height:64px;
}
.brand{display:flex;align-items:center;gap:.6rem;color:#fff;text-decoration:none}
.brand-mark{
  display:inline-grid;place-items:center;width:36px;height:36px;
  border-radius:10px;background:#fff;color:#1f2937;font-weight:800
}
.brand-name{font-weight:700;letter-spacing:.2px;color:#fff}
.main-nav{display:flex;gap:20px}
.nav-link{color:#fff;opacity:.9}
.nav-link:hover{opacity:1;text-decoration:none}

/* ====== Hero ====== */
.post-hero{padding:40px 0 22px;border-bottom:1px solid var(--border);background:linear-gradient(180deg,#0e1627,#0c1424)}
.post-eyebrow{color:var(--accent);text-transform:uppercase;font-weight:800;letter-spacing:.12em;margin-bottom:8px}
.post-title{font-size:clamp(28px,3.4vw,46px);line-height:1.12;margin:0 0 8px}
.post-meta{margin:0;color:var(--muted)}

/* ====== Layout ====== */
.post-wrap{display:grid;grid-template-columns:280px 1fr;gap:28px;padding-top:28px;padding-bottom:60px}
@media (max-width: 980px){
  .post-wrap{grid-template-columns:1fr}
}

/* ====== Sidebar ====== */
.post-aside{position:relative}
.toc-card{
  position:sticky;top:100px;
  background:var(--paper);border:1px solid var(--border);border-radius:14px;box-shadow:var(--shadow);
  padding:14px 12px;margin-bottom:18px;
}
.toc-title{font-weight:700;margin:4px 8px 8px;color:#fff}
.toc-list{display:flex;flex-direction:column;gap:.25rem}
.toc-link{display:block;padding:.35rem .6rem;border-radius:8px;color:var(--text)}
.toc-link:hover{background:rgba(255,255,255,.06);text-decoration:none}
.toc-link.level-h2{font-weight:600}
.toc-link.level-h3{padding-left:1.2rem;font-size:.95em;color:#d1d5db}
.toc-link.level-h4{padding-left:2rem;font-size:.9em;color:#bfc5cf}

.author-card{
  background:var(--paper);border:1px solid var(--border);border-radius:14px;box-shadow:var(--shadow);
  padding:16px;text-align:center
}
.author-avatar{width:92px;height:92px;border-radius:50%;object-fit:cover;border:2px solid var(--border);background:#0a0f1d;margin:6px auto 10px;display:block}
.author-name{font-weight:700}
.author-role{font-size:.95em;color:var(--muted);margin-top:4px}
.author-social{display:flex;gap:10px;justify-content:center;margin-top:10px}
.author-social a{display:inline-grid;place-items:center;width:34px;height:34px;border:1px solid var(--border);border-radius:10px;color:#fff;background:#121a2b}
.author-social a:hover{transform:translateY(-1px);box-shadow:0 8px 18px rgba(0,0,0,.35)}

/* ====== Article ====== */
.post-content{
  background:var(--paper);border:1px solid var(--border);
  border-radius:16px;box-shadow:var(--shadow);padding:24px 22px;
}
.post-cover{margin:0 0 12px}
.post-cover img{width:100%;height:auto;border-radius:12px;border:1px solid var(--border);display:block}
.post-cover figcaption{color:var(--muted);font-size:.95em;margin-top:6px}

.post-content h2,.post-content h3,.post-content h4{scroll-margin-top:90px}
.post-content h2{margin:22px 0 10px;font-size:1.6rem}
.post-content h3{margin:18px 0 8px;font-size:1.25rem;color:#fff}
.post-content h4{margin:14px 0 6px;font-size:1.05rem;color:#d1d5db}
.post-content p{margin:12px 0;color:var(--text)}
.post-content figure{margin:16px 0}
.post-content img{max-width:100%;height:auto;border-radius:12px;border:1px solid var(--border)}
.post-divider{border:0;border-top:1px solid var(--border);margin:26px 0}

/* Code blocks */
pre{background:#0a1020;border:1px solid var(--border);border-radius:12px;padding:14px 16px;overflow:auto;box-shadow:inset 0 0 0 1px rgba(255,255,255,.02)}
code{font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;font-size:.95em}

/* ====== Footer ====== */
.site-footer{border-top:1px solid var(--border);background:#0d1425;padding:28px 0}
.footer-inner{display:flex;align-items:center;justify-content:space-between;gap:16px}
.brand--footer .brand-mark{background:#fff;color:#111827}
.footer-link{color:var(--muted);margin-left:16px}
.footer-link:hover{color:#fff;text-decoration:none}
.copyright{color:var(--muted);margin:.4rem 0 0}

/* ====== Share / Post nav ====== */
.post-footer{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px;margin-top:8px}
.share{display:flex;align-items:center;gap:10px}
.share-label{color:var(--muted);margin-right:4px}
.share-btn{display:inline-grid;place-items:center;width:36px;height:36px;border:1px solid var(--border);border-radius:10px;background:#11182a;color:#fff}
.share-btn:hover{transform:translateY(-1px)}

.post-nav{display:flex;flex-direction:column;gap:6px;margin-left:auto;text-align:right}
.post-prev,.post-next{color:#d1d5db}
.post-prev:hover,.post-next:hover{color:#fff;text-decoration:none}
