/* Blog index. Shares the article palette so the two feel like one site. */

:root {
  color-scheme: light;
  --ink: #172226;
  --muted: #526166;
  --faint: #718086;
  --paper: #fbfaf6;
  --panel: #f2f3ee;
  --panel-strong: #e7ebe4;
  --line: #d2d8d2;
  --green: #176b52;
  --blue: #315f78;
  --blue-soft: #dde9ef;
  --radius: 14px;
  --shadow: 0 12px 34px rgba(28, 45, 46, .07);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: #e9ece7;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--green); }

.page {
  width: min(920px, calc(100% - 40px));
  margin: 0 auto 28px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.home-hero {
  padding: clamp(46px, 8vw, 92px) clamp(26px, 7vw, 72px) 40px;
  border-bottom: 1px solid var(--line);
}

.home-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(2rem, 5.2vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.home-hero p {
  margin: 0;
  max-width: 62ch;
  color: var(--muted);
  font-size: clamp(1rem, 2.2vw, 1.14rem);
}

.posts { padding: 12px clamp(26px, 7vw, 72px) 56px; }

.post {
  display: block;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
}
.post:last-child { border-bottom: none; }
.post:hover h2 { color: var(--blue); }

.post-date {
  display: block;
  margin-bottom: 7px;
  color: var(--faint);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.post h2 {
  margin: 0 0 10px;
  font-size: clamp(1.3rem, 3vw, 1.66rem);
  line-height: 1.22;
  letter-spacing: -0.02em;
  transition: color .15s;
}

.post p {
  margin: 0 0 14px;
  max-width: 68ch;
  color: var(--muted);
  font-size: 0.98rem;
}

.tags { display: flex; flex-wrap: wrap; gap: 8px; }

.tag {
  padding: 3px 11px;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.78rem;
}

.empty {
  padding: 60px 0;
  color: var(--muted);
  text-align: center;
}

/* ── M.I.R.D.A. ─────────────────────────────────────────── */

.licence-body {
  max-width: 66ch;
  padding: 8px 0 4px;
}

.licence-body p {
  margin: 0 0 20px;
  font-size: 1.04rem;
}

/* The opening line carries the tone; give it a little more weight. */
.licence-body p:first-child {
  font-size: 1.14rem;
  line-height: 1.5;
  color: var(--ink);
}

.licence-body p:last-child {
  font-style: italic;
  color: var(--green);
}

.licence-note {
  max-width: 66ch;
  margin: 30px 0 0;
  padding: 16px 18px;
  border-left: 3px solid var(--line);
  background: var(--panel);
  border-radius: 0 8px 8px 0;
  color: var(--muted);
  font-size: 0.92rem;
}

/* Must out-specify `.home-hero p { margin: 0 }`, or the note collides
   with the bio above it. */
.home-hero .about-note {
  margin: 18px 0 0;
  max-width: 62ch;
  color: var(--muted);
  font-size: 0.96rem;
}

/* ── Brand lockup ───────────────────────────────────────── */

.home-brand {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 14px;
}

.home-brand-mark {
  display: block;
  width: clamp(52px, 9vw, 68px);
  height: clamp(52px, 9vw, 68px);
  flex: none;
}
.home-brand-mark svg { display: block; width: 100%; height: 100%; }

.home-brand h1 { margin: 0; }
.home-hero h1 .ai { color: var(--green); }
.home-hero h1 .tld { color: var(--muted); font-weight: 600; }

@media (max-width: 520px) {
  .home-brand { gap: 13px; }
}

/* ── Hero figure ────────────────────────────────────────── */
/* The figure is the hero's backdrop: the flame lockup sits at the left, the
   morning star at the right, and the scatter bridges them. */

.home-hero { position: relative; overflow: hidden; }

.home-figure {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* xMaxYMid keeps the star anchored to the right edge at any width; the slack
   from a wider viewport opens up on the left, which is exactly where the
   text lives. */
.home-figure svg {
  display: block;
  width: 100%;
  height: 100%;
}

.home-hero-body { position: relative; z-index: 1; }

/* Keep the text out of the figure's half. Without this the tagline wraps
   into the scatter at intermediate widths and the dots sit on the words. */
@media (min-width: 861px) {
  .home-hero-body { max-width: 60%; }
}

/* Narrower than that, constraining the text would leave it too cramped, so
   the backdrop steps aside entirely instead. */
@media (max-width: 860px) {
  .home-figure { display: none; }
}

/* ── Hero figure palette ────────────────────────────────── */
/* Parameterised so a dark theme is a colour swap rather than a regenerated
   figure. Deliberately NOT hooked to prefers-color-scheme: the site declares
   color-scheme: light, so reacting to the OS alone would put dark-tuned
   colours on a light page. The moment a real theme toggle exists, it sets
   data-theme and this block takes over. */
:root {
  --hero-faint: #a9b4b8;
  --hero-signal: #176b52;
  --hero-star: #8a5a18;
  --hero-line: #d2d8d2;
}

:root[data-theme="dark"] {
  --hero-faint: #4d5a5e;
  --hero-signal: #5fc9a4;
  --hero-star: #d9a34a;
  --hero-line: #384144;
}

/*
 * Site chrome injected into every article: a slim top bar and a site footer.
 * Deliberately minimal — each article carries its own design, and the chrome
 * must not compete with it.
 */

.site-bar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 11px clamp(16px, 4vw, 34px);
  background: rgba(251, 250, 246, .88);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line, #d2d8d2);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.9rem;
}

.site-bar a { text-decoration: none; }

.site-bar-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink, #172226);
}

/* 32px keeps the tile clearly legible in a slim bar — below ~24px the
   inner flame stops reading and the mark turns into an amber blob. */
.site-bar-mark {
  display: block;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
}
.site-bar-mark svg { display: block; width: 100%; height: 100%; }

.site-bar-word { font-size: 1.02rem; }
.site-bar-word .ai { color: var(--green, #176b52); }
.site-bar-word .tld { color: var(--muted, #526166); font-weight: 600; }

.site-bar-brand:hover .site-bar-word { color: var(--blue, #315f78); }
.site-bar-brand:hover .ai { color: var(--blue, #315f78); }

@media (max-width: 560px) {
  .site-bar-word .tld { display: none; }
}

.site-bar-nav { display: flex; align-items: center; gap: 18px; }
.site-bar-nav a { color: var(--muted, #526166); }
.site-bar-nav a:hover { color: var(--blue, #315f78); }

.site-foot {
  padding: 30px clamp(16px, 4vw, 34px) 44px;
  color: var(--faint, #718086);
  text-align: center;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.84rem;
}
.site-foot a { color: inherit; }

@media print {
  .site-bar, .site-foot, .cw { display: none; }
}
