/* Blog styles. Tokens and components mirror the landing page (ui/index.html). */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --cream: #faf7f0;
  --yellow: #f5e642;
  --coral: #ff5c38;
  --coral-dark: #d43e1f;
  --navy: #1a1f2e;
  --ink: #1a1f2e;
  --muted: #6b7385;
  --rule: #e8e4d8;
  --border: 2.5px solid var(--ink);
  --shadow: 4px 4px 0 var(--ink);
  --shadow-lg: 6px 6px 0 var(--ink);
  --fr: 'Fraunces', serif;
  --mo: 'DM Mono', monospace;
  --sa: 'DM Sans', sans-serif;
  --radius: 12px;
}

html { background: var(--cream); }
body { font-family: var(--sa); background: var(--cream); color: var(--ink); line-height: 1.6; overflow-x: hidden; }
body::before {
  content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
}
.wrap { position: relative; z-index: 1; }

/* ---- NAV (same as landing) ---- */
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 48px; border-bottom: var(--border);
  background: var(--cream); position: sticky; top: 0; z-index: 100;
}
.logo {
  font-family: var(--fr); font-weight: 900; font-size: 22px;
  color: var(--ink); letter-spacing: -0.5px; text-decoration: none;
  display: flex; align-items: center; gap: 8px;
}
.logo-mark {
  width: 30px; height: 30px; background: var(--yellow); border: var(--border);
  border-radius: 6px; display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 900; box-shadow: 2px 2px 0 var(--ink); color: var(--ink);
}
.nav-links { display: flex; gap: 28px; font-size: 14px; font-weight: 500; }
.nav-links a { color: var(--muted); text-decoration: none; }
.nav-links a:hover, .nav-links a[aria-current] { color: var(--ink); }
.nav-cta, .btn-primary {
  font-family: var(--sa); font-weight: 700; background: var(--coral); color: white;
  border: var(--border); border-radius: 8px; cursor: pointer; text-decoration: none;
  display: inline-block; transition: transform 0.1s, box-shadow 0.1s;
}
.nav-cta { font-size: 13px; padding: 10px 20px; box-shadow: var(--shadow); }
.btn-primary { font-size: 15px; padding: 14px 28px; border-radius: 10px; box-shadow: var(--shadow-lg); }
.nav-cta:hover { transform: translate(-2px,-2px); box-shadow: var(--shadow-lg); }
.btn-primary:hover { transform: translate(-2px,-2px); box-shadow: 8px 8px 0 var(--ink); }
.nav-cta:active, .btn-primary:active { transform: translate(2px,2px); box-shadow: 2px 2px 0 var(--ink); }

.nav-hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 4px; background: none; border: none; }
.nav-hamburger span { display: block; width: 22px; height: 2px; background: var(--ink); border-radius: 2px; }
.mobile-menu {
  display: none; position: fixed; inset: 0; background: var(--cream);
  z-index: 200; flex-direction: column; padding: 24px;
}
.mobile-menu.open { display: flex; }
.mobile-menu-close { align-self: flex-end; font-size: 28px; background: none; border: none; cursor: pointer; color: var(--ink); margin-bottom: 20px; line-height: 1; }
.mobile-menu a {
  font-family: var(--fr); font-weight: 700; font-size: 28px; color: var(--ink);
  text-decoration: none; padding: 10px 0; border-bottom: 1.5px solid var(--rule); letter-spacing: -0.5px;
}
.mobile-menu .nav-cta { margin-top: 24px; text-align: center; font-family: var(--sa); font-size: 16px; padding: 14px 24px; border-bottom: var(--border); color: white; }

/* ---- PAGE ---- */
main { max-width: 760px; margin: 0 auto; padding: 56px 24px 80px; }
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 20px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font-size: 11px;
  font-weight: 700; letter-spacing: 0.12em; color: var(--muted); text-transform: uppercase; margin-bottom: 16px;
}
.eyebrow-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--coral); }

h1 { font-family: var(--fr); font-weight: 900; font-size: 48px; line-height: 1.05; letter-spacing: -1.5px; margin-bottom: 16px; }
.meta { font-family: var(--mo); font-size: 12px; color: var(--muted); margin-bottom: 32px; }

/* ---- ARTICLE BODY ---- */
article { font-size: 17px; line-height: 1.75; }
article > p, article > ul, article > ol, article > blockquote, article > pre, article > .table-wrap, article > table { margin-bottom: 20px; }
article h2 { font-family: var(--fr); font-weight: 900; font-size: 32px; line-height: 1.15; letter-spacing: -1px; margin: 48px 0 16px; }
article h3 { font-family: var(--fr); font-weight: 700; font-size: 22px; line-height: 1.25; letter-spacing: -0.3px; margin: 32px 0 10px; }
article a { color: var(--coral-dark); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
article a:hover { color: var(--coral); }
article ul, article ol { padding-left: 1.4em; }
article li { margin-bottom: 6px; }
article strong { font-weight: 700; }
article hr { border: none; border-top: var(--border); margin: 40px 0; }
article blockquote { padding: 16px 20px; background: white; border: var(--border); border-left: 8px solid var(--coral); border-radius: 10px; color: var(--ink); }
article blockquote p:last-child { margin-bottom: 0; }

article :not(pre) > code { font-family: var(--mo); font-size: 0.86em; background: white; border: 1.5px solid var(--ink); border-radius: 5px; padding: 1px 6px; }
article pre {
  font-family: var(--mo); font-size: 13px; line-height: 1.8; background: #0d1117; color: #e6edf3;
  border: var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; overflow-x: auto;
}
article pre code { font-family: inherit; }

.table-wrap { border: var(--border); border-radius: var(--radius); background: white; overflow-x: auto; }
article table { width: 100%; border-collapse: collapse; font-size: 14px; }
article th { background: var(--yellow); padding: 12px 16px; text-align: left; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; border-bottom: var(--border); }
article td { padding: 12px 16px; border-bottom: 1px solid var(--rule); vertical-align: top; }
article tr:last-child td { border-bottom: none; }

/* ---- QUICK ANSWER + TOC ---- */
.tldr { background: var(--yellow); border: var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 24px; margin-bottom: 28px; font-size: 16px; }
.tldr strong { font-family: var(--mo); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; display: block; margin-bottom: 6px; }
.toc { background: white; border: var(--border); border-radius: var(--radius); padding: 18px 24px; margin-bottom: 40px; font-size: 15px; }
.toc p { font-family: var(--mo); font-size: 11px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.toc ol { padding-left: 1.2em; }
.toc li { margin-bottom: 4px; }
.toc a { color: var(--ink); text-decoration: none; }
.toc a:hover { color: var(--coral); }
h2[id], h3[id] { scroll-margin-top: 90px; }

/* ---- CTA + RELATED ---- */
.cta { margin-top: 56px; background: var(--navy); color: white; border: var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 32px; }
.cta h2 { font-family: var(--fr); font-weight: 900; font-size: 30px; letter-spacing: -1px; line-height: 1.1; margin: 0 0 10px; color: white; }
.cta p { color: #c8d0e0; font-size: 15px; margin-bottom: 22px; }
.cta .btn-primary { color: white; text-decoration: none; }
.related { margin-top: 48px; }
.related h2 { font-size: 24px; margin-top: 0; }
.related ul { list-style: none; padding: 0; display: grid; gap: 12px; }
.related li { margin: 0; }
.related a { display: block; background: white; border: var(--border); border-radius: 10px; padding: 14px 18px; color: var(--ink); text-decoration: none; font-weight: 700; box-shadow: var(--shadow); transition: transform 0.15s, box-shadow 0.15s; }
.related a:hover { transform: translate(-2px,-2px); box-shadow: var(--shadow-lg); color: var(--ink); }

/* ---- BLOG INDEX ---- */
.blog-head p { font-size: 17px; color: var(--muted); max-width: 560px; margin-bottom: 40px; }
.posts { list-style: none; display: grid; gap: 20px; }
.posts li { background: white; border: var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; transition: transform 0.15s, box-shadow 0.15s; }
.posts li:hover { transform: translate(-2px,-2px); box-shadow: var(--shadow-lg); }
.posts li a { font-family: var(--fr); font-weight: 900; font-size: 24px; letter-spacing: -0.5px; line-height: 1.2; color: var(--ink); text-decoration: none; }
.posts li a:hover { color: var(--coral); }
.posts li p { color: var(--muted); font-size: 15px; margin: 8px 0 12px; }
.posts time { font-family: var(--mo); font-size: 12px; color: var(--muted); }
.posts .empty { box-shadow: none; color: var(--muted); }
.posts .empty:hover { transform: none; box-shadow: none; }

/* ---- FOOTER (same as landing) ---- */
.footer { background: var(--navy); padding: 40px 48px; }
.footer-inner { max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; align-items: start; gap: 40px; }
.footer-brand .logo { color: white; }
.footer-brand p { font-size: 13px; color: #6b7a99; max-width: 240px; line-height: 1.6; margin-top: 8px; }
.footer-col h4 { font-size: 11px; font-weight: 700; letter-spacing: 0.1em; color: #c8d0e0; margin-bottom: 14px; }
.footer-col a { display: block; font-size: 13px; color: #6b7a99; text-decoration: none; margin-bottom: 8px; }
.footer-col a:hover { color: var(--yellow); }
.footer-bottom { max-width: 1200px; margin: 28px auto 0; padding-top: 20px; border-top: 1px solid #2d3548; display: flex; justify-content: space-between; font-size: 12px; color: #4a5568; }

/* ---- RESPONSIVE (breakpoints match landing) ---- */
@media (max-width: 1024px) {
  .nav, .footer { padding-left: 32px; padding-right: 32px; }
}
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .footer-inner { flex-wrap: wrap; gap: 32px; }
  .footer-brand { flex-basis: 100%; }
}
@media (max-width: 600px) {
  .nav { padding: 14px 16px; }
  .nav-arrow { display: none; }
  main { padding: 36px 16px 56px; }
  h1 { font-size: 36px; letter-spacing: -1px; }
  article { font-size: 16px; }
  article h2 { font-size: 26px; }
  article h3 { font-size: 20px; }
  .cta { padding: 24px; }
  .cta h2 { font-size: 26px; }
  .footer { padding: 32px 16px; }
  .footer-inner { flex-direction: column; gap: 28px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
}
