/* Blog stylesheet — shared by /blog index and posts. Mirrors the palette,
   fonts and nav/footer of index.html so the blog reads as one site. */

@font-face {
  font-family: 'Inter';
  src: url('/fonts/Inter-Regular.woff2') format('woff2'),
       url('/fonts/Inter-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
}
@font-face {
  font-family: 'Inter';
  src: url('/fonts/Inter-Bold.woff2') format('woff2'),
       url('/fonts/Inter-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('/fonts/JetBrainsMono-Regular.woff2') format('woff2'),
       url('/fonts/JetBrainsMono-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
}

:root {
  --vault: #0B0E14;
  --panel: #171C26;
  --raised: #232A38;
  --brand: #8c32c7;
  --brand-light: #C77DFF;
  --green: #7BC67E;
  --white: #DCDFE4;
  --gray: #808C99;
  --red: #E06C75;
  --amber: #E5C07B;
  --brand-dim: #7321A3;
  --font: 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', 'Cascadia Code', 'Fira Code', monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; -webkit-font-smoothing: antialiased; }

body {
  font-family: var(--font);
  background: var(--vault);
  color: var(--white);
  line-height: 1.7;
  min-height: 100vh;
}

a { color: var(--brand-light); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

.container { max-width: 960px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 720px; }

/* ── Nav (same structure as index.html) ── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 14, 20, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--raised);
}
nav .container { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.nav-brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 18px; color: var(--white); text-decoration: none;
}
.nav-brand svg { width: 28px; height: 28px; }
.nav-links { display: flex; gap: 20px; align-items: center; }
.nav-links a { color: var(--gray); text-decoration: none; font-size: 14px; transition: color 0.2s; }
.nav-links a:hover { color: var(--brand); }
.nav-dl {
  background: var(--brand-light); color: var(--vault) !important;
  padding: 6px 16px; border-radius: 6px; font-weight: 700; font-size: 13px;
}
.nav-dl:hover { background: #D9A1FF !important; color: var(--vault) !important; }

/* ── Masthead ── */
.masthead { padding: 56px 0 8px; }
.masthead h1 { font-size: 40px; font-weight: 700; letter-spacing: -0.5px; line-height: 1.2; }
.masthead .lede { color: var(--gray); font-size: 18px; margin-top: 12px; max-width: 640px; }

/* ── Post list (index) ── */
.post-list { list-style: none; padding: 32px 0 64px; display: grid; gap: 4px; }
.post-list li { border-top: 1px solid var(--raised); }
.post-list a {
  display: block; padding: 22px 0; text-decoration: none; color: var(--white);
  transition: color 0.2s;
}
.post-list a:hover h2 { color: var(--brand); }
.post-list h2 { font-size: 22px; font-weight: 700; line-height: 1.3; }
.post-list p { color: var(--gray); font-size: 15px; margin-top: 6px; }
.post-meta { color: var(--gray); font-size: 13px; margin-top: 8px; }
.post-meta .pillar {
  background: var(--panel); border: 1px solid var(--raised); border-radius: 999px;
  padding: 2px 10px; color: var(--brand-light); font-size: 12px;
}

/* ── Article ── */
main.post { padding: 40px 0 72px; }
.post-hero h1 { font-size: 38px; line-height: 1.2; letter-spacing: -0.5px; }
.post-hero .byline { color: var(--gray); font-size: 14px; margin-top: 14px; }
.post-hero .byline .pillar { color: var(--brand-light); }
article { margin-top: 28px; }
article > * + * { margin-top: 20px; }
article h2 { font-size: 26px; font-weight: 700; margin-top: 40px; letter-spacing: -0.3px; }
article h3 { font-size: 20px; font-weight: 700; margin-top: 28px; }
article p, article li { font-size: 17px; color: #C6CBD3; }
article strong { color: var(--white); }
article a { color: var(--brand-light); text-underline-offset: 3px; }
article ul, article ol { padding-left: 24px; }
article li + li { margin-top: 8px; }
article code {
  font-family: var(--mono); font-size: 0.9em; background: var(--panel);
  border: 1px solid var(--raised); border-radius: 4px; padding: 1px 6px;
}
article pre {
  background: var(--panel); border: 1px solid var(--raised); border-radius: 8px;
  padding: 16px; overflow-x: auto;
}
article pre code { background: none; border: none; padding: 0; }
article blockquote {
  border-left: 3px solid var(--brand); padding: 4px 0 4px 18px; color: var(--gray);
}
article table { width: 100%; border-collapse: collapse; font-size: 15px; }
article th, article td { border: 1px solid var(--raised); padding: 8px 12px; text-align: left; }
article th { background: var(--panel); color: var(--white); }

/* ── CTA + related ── */
.cta {
  margin-top: 48px; background: var(--panel); border: 1px solid var(--raised);
  border-radius: 12px; padding: 28px;
}
.cta h2 { font-size: 20px; margin: 0 0 8px; }
.cta p { color: var(--gray); font-size: 15px; margin-bottom: 18px; }
.cta a.button {
  display: inline-block; background: var(--brand-light); color: var(--vault);
  text-decoration: none; padding: 11px 22px; border-radius: 8px; font-weight: 700; font-size: 15px;
}
.cta a.button:hover { background: #D9A1FF; }
.related { margin-top: 40px; }
.related h2 { font-size: 16px; color: var(--gray); text-transform: uppercase; letter-spacing: 0.5px; }
.related ul { list-style: none; padding: 12px 0 0; }
.related li + li { margin-top: 8px; }

/* ── Footer (same as index.html) ── */
footer { border-top: 1px solid var(--raised); padding: 28px 0; text-align: center; }
footer, footer a { font-size: 13px; color: var(--gray); }
footer a { text-decoration: none; margin: 0 12px; }
footer a:hover { color: var(--brand); }

@media (max-width: 768px) {
  nav .container { flex-direction: column; height: auto; min-height: 56px; padding: 8px 0; gap: 6px; }
  .nav-brand { font-size: 17px; }
  .nav-links { flex-wrap: wrap; justify-content: center; gap: 8px 16px; }
  .post-hero h1, .masthead h1 { font-size: 28px; }
}
@media (max-width: 480px) {
  .nav-links { gap: 6px 12px; font-size: 12px; }
  .post-hero h1, .masthead h1 { font-size: 24px; }
  article p, article li { font-size: 16px; }
}


/* ── Footer grid (matches index.html) ── */
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 32px;
  padding: 40px 0 20px;
}
.footer-brand p { color: var(--gray); font-size: 13px; margin: 6px 0 0; max-width: 300px; line-height: 1.55; }
.footer-brand .f-logo { color: var(--white); font-weight: 700; text-decoration: none; }
.footer-col h4 {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gray);
  margin: 0 0 10px;
}
.footer-col a { display: block; color: var(--gray); font-size: 13px; text-decoration: none; padding: 3px 0; }
.footer-col a:hover { color: var(--brand-light); }
.footer-bottom { border-top: 1px solid var(--raised); padding: 12px 0 20px; font-size: 13px; color: var(--gray); }
@media (max-width: 600px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
