/* assets/post.css — shared styling for AMITA blog posts.
   The first three posts each shipped a bespoke ~20KB stylesheet; that does not scale to
   a content programme, so every new post links this one file instead. */

:root {
  --bg: #0f1716;
  --surface: #142320;
  --surface-2: #182b27;
  --text: #e8f1ef;
  --muted: #9fb5b0;
  --brand: #1a3d35;
  --accent: #4ecdc4;
  --border: rgba(255, 255, 255, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.75;
  font-size: 18px;
}

.skip-link {
  position: absolute; left: -9999px;
  background: var(--accent); color: #08110f;
  padding: 10px 16px; border-radius: 0 0 8px 0; font-weight: 600; z-index: 200;
}
.skip-link:focus { left: 0; top: 0; }

/* ---- Navigation ---- */
.post-nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(26, 61, 53, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.post-nav-inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 12px 20px; flex-wrap: wrap;
}
.post-nav a { color: var(--text); text-decoration: none; }
.post-nav .brand { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.post-nav .brand img { width: 32px; height: 32px; border-radius: 8px; }
.post-nav ul { display: flex; gap: 18px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.post-nav ul a { color: var(--muted); font-size: 0.95rem; }
.post-nav ul a:hover, .post-nav ul a:focus { color: var(--accent); }

/* ---- Article ---- */
.post-wrap { max-width: 760px; margin: 0 auto; padding: 48px 20px 80px; }
.breadcrumb { margin-bottom: 24px; font-size: 0.95rem; }
.breadcrumb a { color: var(--accent); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

.post-meta {
  display: flex; gap: 14px; flex-wrap: wrap;
  color: var(--muted); font-size: 0.9rem; margin-bottom: 18px;
}
.post-meta .category {
  background: var(--brand); color: var(--text);
  padding: 3px 12px; border-radius: 20px; font-weight: 600;
}

h1 {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: clamp(1.9rem, 5vw, 2.7rem);
  line-height: 1.2; margin: 0 0 16px;
}
.standfirst { font-size: 1.15rem; color: var(--muted); margin: 0 0 32px; }

.byline {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  margin-bottom: 40px;
}
.byline .avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--brand); color: var(--text);
  display: grid; place-items: center; font-weight: 700; flex-shrink: 0;
}
.byline .who { display: flex; flex-direction: column; }
.byline .name { font-weight: 600; }
.byline .when { color: var(--muted); font-size: 0.88rem; }

article h2 {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: clamp(1.4rem, 3.5vw, 1.8rem);
  margin: 48px 0 14px; line-height: 1.3;
}
article h3 { font-size: 1.2rem; margin: 32px 0 10px; }
article p { margin: 0 0 20px; }
article ul, article ol { margin: 0 0 20px; padding-left: 24px; }
article li { margin-bottom: 10px; }
article a { color: var(--accent); }
article strong { color: #fff; }

blockquote {
  margin: 32px 0; padding: 18px 24px;
  background: var(--surface); border-left: 3px solid var(--accent); border-radius: 0 10px 10px 0;
  color: var(--muted); font-style: italic;
}

.callout {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 20px 24px; margin: 32px 0;
}
.callout h3 { margin-top: 0; }
.callout.script { border-left: 3px solid var(--accent); }
.callout.script p { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.95rem; }

.stat-box {
  background: var(--surface); border-radius: 12px; padding: 26px;
  text-align: center; margin: 32px 0; border: 1px solid var(--border);
}
.stat-box .stat-number {
  display: block; font-size: 2.6rem; font-weight: 800; color: var(--accent);
  font-family: 'Space Grotesk', sans-serif; line-height: 1;
}
.stat-box .stat-text { display: block; color: var(--muted); margin-top: 10px; font-size: 0.98rem; }

table { width: 100%; border-collapse: collapse; margin: 28px 0; font-size: 0.95rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { color: #fff; font-weight: 600; }

/* ---- Conversion + related (every post must have both) ---- */
.post-cta {
  background: linear-gradient(135deg, var(--brand), var(--surface-2));
  border: 1px solid var(--border); border-radius: 16px;
  padding: 32px; margin: 56px 0 40px; text-align: center;
}
.post-cta h3 { margin: 0 0 10px; font-size: 1.35rem; }
.post-cta p { color: var(--muted); margin: 0 0 20px; }
.post-cta .btn {
  display: inline-block; background: var(--accent); color: #08110f;
  padding: 13px 28px; border-radius: 30px; text-decoration: none; font-weight: 700;
}
.post-cta .btn:hover { filter: brightness(1.1); }

.related { margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--border); }
.related h3 { margin: 0 0 16px; }
.related ul { list-style: none; padding: 0; margin: 0; }
.related li { margin-bottom: 12px; }
.related a { color: var(--accent); text-decoration: none; font-weight: 500; }
.related a:hover { text-decoration: underline; }

.post-footer {
  background: var(--brand); border-top: 1px solid var(--border);
  padding: 32px 20px; text-align: center; color: var(--muted); font-size: 0.92rem;
}
.post-footer a { color: var(--accent); }

@media (max-width: 600px) {
  body { font-size: 17px; }
  .post-wrap { padding: 32px 18px 64px; }
  .post-cta { padding: 24px 20px; }
}
