/* ============================================================================
   Blog styles. Loaded after styles.css, so it inherits the site's tokens
   (--paper, --ink, --strong, --muted, --hair) and both themes for free.

   Everything the HTML cleaner keeps needs a style here: figures, captions,
   quotes, footnotes, code, tables and embeds. If the cleaner starts letting
   something new through, it needs adding below.
   ========================================================================== */

/* --- Index cards --------------------------------------------------------- */
.blog-cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  /* auto-fill, not auto-fit: with one post auto-fit would collapse the empty
     tracks and stretch that single card across the whole page. */
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr));
  gap: clamp(2rem, 5vw, 3rem);
}

.blog-card-link { display: block; text-decoration: none; }

.blog-card-media {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--wash);
  margin-bottom: 1rem;
}
.blog-card-media img { width: 100%; height: 100%; object-fit: cover; }

.blog-card-title {
  margin: 0.5rem 0 0;
  font-size: 1.1875rem;
  font-weight: 700;
  text-transform: lowercase;
  line-height: 1.15;
  letter-spacing: -0.5px;
  color: var(--strong);
  text-wrap: balance;
  transition: color 240ms ease;
}
/* The colour shifts; nothing in this system is underlined. */
.blog-card-link:hover .blog-card-title { color: var(--hover); }

.blog-card-sub {
  margin: 0.5rem 0 0;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--ink);
}

/* --- Post page ----------------------------------------------------------- */
.post-article { max-width: 46rem; }

.post-header { margin-bottom: 2rem; }

.post-heading {
  margin: 0.6rem 0 0;
  font-size: clamp(2rem, 5.5vw, 3rem);
  font-weight: 700;
  text-transform: lowercase;
  line-height: 1.05;
  letter-spacing: -0.5px;
  color: var(--strong);
  text-wrap: balance;
}

/* The one place a longer measure is wanted: this is reading, not chrome. */
.post-subtitle {
  margin: 0.9rem 0 0;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ink);
  text-wrap: pretty;
}

.post-cover { margin: 0 0 2.5rem; }
.post-cover img { width: 100%; height: auto; }

/* --- Post body: long-form typography ------------------------------------- */
/* Long-form reading text takes the strong colour, not the taupe. The taupe
   is the chrome colour — correct for labels, dates and summaries, but at
   3.36:1 it is too quiet to read a whole article in. This introduces no new
   colour: it is the same near-black the titles and captions already use. */
.post-body {
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--strong);
}

.post-body > * + * { margin-top: 1.4em; }

.post-body h2,
.post-body h3,
.post-body h4 {
  color: var(--strong);
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin-top: 2.2em;
  text-wrap: balance;
}
.post-body h2 { font-size: 1.5rem; font-weight: 700; }
.post-body h3 { font-size: 1.25rem; font-weight: 700; }
.post-body h4 { font-size: 1.0625rem; font-weight: 700; }

.post-body a {
  color: var(--strong);
  text-decoration-color: var(--muted);
  text-underline-offset: 3px;
}
.post-body a:hover { text-decoration-color: var(--strong); }

.post-body ul,
.post-body ol { padding-left: 1.4em; }
.post-body li + li { margin-top: 0.4em; }

.post-body blockquote {
  margin-inline: 0;
  padding-left: 1.25rem;
  border-left: 2px solid var(--strong);
  color: var(--muted);
  font-style: normal;
}

.post-body figure { margin: 2em 0; }
.post-body img { width: 100%; height: auto; display: block; }
.post-body figcaption {
  margin-top: 0.6rem;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--muted);
  text-wrap: pretty;
}

.post-body hr { border: 0; border-top: 1px solid var(--hair); margin: 2.5em 0; }

.post-body pre {
  background: var(--wash);
  padding: 1rem 1.15rem;
  overflow-x: auto;           /* long lines scroll, the page never does */
  font-size: 0.875rem;
  line-height: 1.5;
}
.post-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
}
.post-body :not(pre) > code {
  background: var(--wash);
  padding: 0.1em 0.35em;
  border-radius: 3px;
}

/* Wide content gets its own scroll container, so the page never shifts. */
.post-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  display: block;
  overflow-x: auto;
}
.post-body th,
.post-body td {
  border-bottom: 1px solid var(--hair);
  padding: 0.6rem 0.75rem;
  text-align: left;
}
.post-body th { font-weight: 600; color: var(--strong); }

.post-body iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  border: 0;
}

/* Footnotes: the anchors are kept by the cleaner, so they need to work here. */
.post-body sup a {
  text-decoration: none;
  font-size: 0.75em;
  padding: 0 0.15em;
}
.post-body .footnote,
.post-body [id^="footnote-"] {
  font-size: 0.9375rem;
  color: var(--muted);
}
.post-body [id^="footnote-"]:target {
  background: var(--wash);
  outline: 2px solid var(--hair);
}

/* --- Subscribe, navigation ----------------------------------------------- */
.subscribe-cta {
  margin-top: 3rem;
  padding: 1.75rem;
  border: 1px solid var(--hair);
  text-align: center;
}
.subscribe-cta p { margin: 0 0 1rem; color: var(--ink); }
.subscribe-cta .also-on { margin: 1rem 0 0; font-size: 0.875rem; }
.subscribe-cta .also-on a { color: var(--muted); text-underline-offset: 3px; }

.post-nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--hair);
}
.post-nav-link { text-decoration: none; display: block; }
.post-nav-link.next { text-align: right; }
.post-nav-title {
  display: block;
  margin-top: 0.35rem;
  font-weight: 600;
  color: var(--strong);
  line-height: 1.3;
}
.post-nav-link:hover .post-nav-title { text-decoration: underline; text-underline-offset: 3px; }

.muted-note { color: var(--muted); }

@media (max-width: 40rem) {
  .post-nav-link.next { text-align: left; }
}

/* ============================================================================
   The Year I Hired Myself — the framing above the posts.

   These were designed as a mock-up first; the styles come across unchanged so
   the live page matches what was approved. They use the same tokens as the
   rest of the site, so both themes work without anything extra.
   ========================================================================== */

/* The title carries a full stop, so the subtitle needs air above it rather
   than reading as a second line of the heading. */
.page-sub {
  margin: -0.75rem 0 1.5rem;
  max-width: var(--measure);
  font-size: clamp(1rem, 2vw, 1.125rem);
  font-weight: 600;
  line-height: 1.4;
  color: var(--muted);
  text-wrap: balance;
}

.project-lead {
  font-size: clamp(1.125rem, 2.4vw, 1.3125rem);
  line-height: 1.5;
  color: var(--ink);
  max-width: var(--measure);
  margin: 0 0 1.5rem;
}

.project-body { max-width: var(--measure); }
.project-body p { margin: 0 0 1.15rem; color: var(--ink); }

/* Unused since 12 Oct 2026: the "two parts" section was removed from /blog/.
   Kept because .ventures below is built on the same shape, and because the
   section may come back — its copy is still in site.mjs. */
.strands {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  gap: clamp(1.5rem, 4vw, 2.5rem);
  margin: 0;
  padding: 0;
  list-style: none;
}
.strand { border-top: 2px solid var(--strong); padding-top: 1rem; }
.strand .meta { display: block; margin-bottom: 0.5rem; }
.strand h3 {
  margin: 0 0 0.6rem;
  font-size: 1.1875rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--strong);
}
.strand p { margin: 0; font-size: 0.9375rem; color: var(--muted); }

/* The running list of what's actually being built. Same shape as the two
   parts above, a hairline rather than a rule, so it reads as subordinate. */
.ventures {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr));
  gap: clamp(1.5rem, 4vw, 2.5rem);
  margin: 0;
  padding: 0;
  list-style: none;
}
.venture { border-top: 1px solid var(--hair); padding-top: 1rem; }
.venture .meta { display: block; margin-bottom: 0.5rem; }
.venture h3 {
  margin: 0 0 0.6rem;
  font-size: 1.1875rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--strong);
}
.venture h3 a { color: inherit; text-decoration-color: var(--muted); text-underline-offset: 3px; }
.venture h3 a:hover { text-decoration-color: var(--strong); }
.venture p { margin: 0; font-size: 0.9375rem; color: var(--muted); }

/* Also unused since 12 Oct 2026 — "Where I want to be by the end". */
.outcomes { margin: 0; padding: 0; list-style: none; max-width: var(--measure); }
.outcomes li {
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--hair);
  display: flex;
  gap: 1rem;
  align-items: baseline;
}
.outcomes li:first-child { border-top: 1px solid var(--hair); }
.outcomes .n {
  color: var(--strong);
  font-weight: 700;
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
  flex: none;
}

/* Also unused since 12 Oct 2026 — "What I'm looking for". */
.ask {
  padding: 1.5rem;
  border: 1px solid var(--hair);
  max-width: var(--measure);
}
.ask .section-label { margin-bottom: 0.5rem; padding-bottom: 0; border-bottom: 0; }
.ask p { margin: 0; color: var(--ink); }

.project-closing {
  max-width: var(--measure);
  margin: 2rem 0 0;
  font-size: 1.0625rem;
  color: var(--ink);
}
