/* School Box Africa — Field Notes (blog). Self-contained, brand tokens mirrored
   from the main site. Deliberately quiet and readable — content-first for both
   human readers and AI crawlers. */

:root {
  --deep-space: #060810;
  --surface: #0C0F1A;
  --border: #141828;
  --mid: #4A5570;
  --light: #E8EEF8;
  --cyan: #00E5FF;
  --violet: #9B6FFF;
  --ghost-stroke: #1E2438;
  --font-display: 'Rajdhani', sans-serif;
  --font-body: 'Space Grotesk', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --measure: 44rem;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--deep-space);
  color: var(--light);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}
::selection { background: var(--cyan); color: var(--deep-space); }
img { display: block; max-width: 100%; height: auto; border-radius: 4px; }
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }

.wrap { max-width: var(--measure); margin: 0 auto; padding: 0 24px; }

/* ---- Masthead ---- */
.masthead {
  border-bottom: 1px solid var(--border);
  padding: 22px 0;
  position: sticky; top: 0;
  background: rgba(6, 8, 16, 0.82);
  backdrop-filter: blur(10px);
  z-index: 10;
}
.masthead__inner {
  max-width: 72rem; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.masthead__brand {
  display: flex; align-items: baseline; gap: 12px;
  font-family: var(--font-display); font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; font-size: 16px;
  color: var(--light);
}
.masthead__brand:hover { text-decoration: none; }
.masthead__tag {
  font-family: var(--font-mono); font-weight: 400;
  font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--mid);
}
.masthead__back {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--mid);
}
.masthead__back:hover { color: var(--cyan); text-decoration: none; }

/* ---- Blog index ---- */
.index-head { padding: 72px 0 40px; }
.index-head .eyebrow {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--cyan); margin-bottom: 18px;
}
.index-head h1 {
  font-family: var(--font-display); font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.02em; line-height: 1.05; font-size: clamp(38px, 6vw, 68px);
}
.index-head p { color: rgba(232, 238, 248, 0.6); margin-top: 20px; max-width: 40rem; }

.post-list { list-style: none; padding: 20px 0 96px; }
.post-list__item { border-top: 1px solid var(--border); }
.post-list__item:last-child { border-bottom: 1px solid var(--border); }
.post-list__link {
  display: block; padding: 30px 0; color: inherit;
  transition: padding-left 0.25s ease;
}
.post-list__link:hover { text-decoration: none; padding-left: 10px; }
.post-list__meta {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--mid); margin-bottom: 10px;
  display: flex; gap: 14px; flex-wrap: wrap;
}
.post-list__title {
  font-family: var(--font-display); font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.03em; font-size: clamp(22px, 3vw, 30px); line-height: 1.15;
}
.post-list__link:hover .post-list__title { color: var(--cyan); }
.post-list__excerpt { color: rgba(232, 238, 248, 0.55); margin-top: 10px; max-width: var(--measure); }
.post-list__empty { color: var(--mid); padding: 40px 0 96px; font-family: var(--font-mono); font-size: 13px; }

/* ---- Article ---- */
.article { padding: 56px 0 40px; }
.breadcrumb {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--mid); margin-bottom: 32px;
}
.breadcrumb a { color: var(--mid); }
.breadcrumb a:hover { color: var(--cyan); text-decoration: none; }
.article__meta {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--mid);
  display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 22px;
}
.article__title {
  font-family: var(--font-display); font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.01em; line-height: 1.06; font-size: clamp(32px, 5vw, 56px);
  margin-bottom: 20px;
}
.article__dek { font-size: 20px; color: rgba(232, 238, 248, 0.7); line-height: 1.6; margin-bottom: 12px; }
.article__tags { margin: 26px 0 4px; display: flex; gap: 10px; flex-wrap: wrap; }
.article__tag {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--violet);
  border: 1px solid var(--ghost-stroke); border-radius: 999px; padding: 5px 12px;
}
.article__divider { border: none; border-top: 1px solid var(--border); margin: 32px 0; }

/* Prose */
.prose { font-size: 17.5px; }
.prose > * + * { margin-top: 1.35em; }
.prose h2 {
  font-family: var(--font-display); font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.02em; font-size: clamp(24px, 3.4vw, 34px); line-height: 1.15;
  margin-top: 2em;
}
.prose h3 {
  font-family: var(--font-display); font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.03em; font-size: clamp(19px, 2.4vw, 24px); margin-top: 1.6em;
}
.prose p { color: rgba(232, 238, 248, 0.82); }
.prose a { color: var(--cyan); text-decoration: underline; text-underline-offset: 3px; }
.prose ul, .prose ol { padding-left: 1.4em; color: rgba(232, 238, 248, 0.82); }
.prose li { margin-top: 0.5em; }
.prose blockquote {
  border-left: 2px solid var(--cyan); padding: 4px 0 4px 22px;
  color: var(--light); font-size: 20px; line-height: 1.55;
}
.prose code {
  font-family: var(--font-mono); font-size: 0.86em;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 3px; padding: 2px 6px;
}
.prose pre {
  background: var(--surface); border: 1px solid var(--border); border-radius: 6px;
  padding: 18px 20px; overflow-x: auto;
}
.prose pre code { background: none; border: none; padding: 0; }
.prose img { margin: 1.6em 0; border: 1px solid var(--border); }
.prose hr { border: none; border-top: 1px solid var(--border); margin: 2em 0; }
.prose .table-wrap { overflow-x: auto; margin: 1.8em 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; }
.prose th, .prose td { border: 1px solid var(--border); padding: 13px 15px; text-align: left; vertical-align: top; }
.prose th {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--mid); background: var(--surface);
}
.prose td { color: rgba(232, 238, 248, 0.8); }
.prose td strong, .prose th strong {
  color: var(--cyan); font-family: var(--font-display);
  font-weight: 700; letter-spacing: 0.02em;
}

/* ---- Article footer / canonical note ---- */
.article-foot {
  border-top: 1px solid var(--border); margin-top: 48px; padding: 32px 0 0;
  color: var(--mid); font-size: 14px;
}
.article-foot__source {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--mid); margin-bottom: 20px;
}
.article-foot__cta a { margin-right: 20px; }

/* ---- Site footer ---- */
.blog-footer {
  border-top: 1px solid var(--border); margin-top: 72px;
  padding: 40px 0; text-align: center;
}
.blog-footer p {
  font-family: var(--font-mono); font-weight: 300; font-size: 11px;
  letter-spacing: 0.12em; color: var(--mid);
}
.blog-footer a { color: var(--mid); }
.blog-footer a:hover { color: var(--cyan); text-decoration: none; }

@media (max-width: 600px) {
  body { font-size: 16px; }
  .masthead__tag { display: none; }
  .index-head { padding: 48px 0 28px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
