/* ==========================================================================
   paulroebuck.com — site styles
   Built on the Compounding design system. Single column, book-tradition
   typography. No JavaScript. No frameworks.
   ========================================================================== */

@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("fonts/SourceSerif4-Variable.woff2") format("woff2-variations");
}

@font-face {
  font-family: "Source Serif 4";
  font-style: italic;
  font-weight: 200 900;
  font-display: swap;
  src: url("fonts/SourceSerif4-Italic-Variable.woff2") format("woff2-variations");
}

:root {
  --slate:    #1F2937;
  --page:     #FAF9F6;
  --ochre:    #A16207;
  --stone:    #6B7280;
  --hairline: #D1D5DB;

  --serif: "Source Serif 4", "IBM Plex Serif", "EB Garamond", Georgia, serif;

  --fs-h1:        2.75rem;   /* 44px */
  --fs-h2:        2.2rem;    /* 35px */
  --fs-h3:        1.75rem;   /* 28px */
  --fs-h4:        1.375rem;  /* 22px */
  --fs-body:      1.125rem;  /* 18px */
  --fs-small:     0.875rem;  /* 14px */
  --fs-smallcaps: 0.75rem;   /* 12px */

  --lh-body:  1.55;

  --rhythm:     28px;
  --rhythm-2:   56px;
  --rhythm-3:   84px;
  --rhythm-4:   112px;

  --measure: 38rem;   /* ~640px at 18px body */
}

* { box-sizing: border-box; }

html, body {
  background: var(--page);
  color: var(--slate);
  font-family: var(--serif);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-feature-settings: "onum" 1, "kern" 1, "liga" 1;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  margin: 0;
  padding: 0;
}

/* --- Layout shell --------------------------------------------------------- */

.page-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.column {
  max-width: var(--measure);
  width: 100%;
  margin-inline: auto;
  padding-inline: 24px;
}

main {
  flex: 1;
  width: 100%;
}

/* The home main has different vertical centering rules; everything else
   uses the standard top margin. */
main.standard {
  max-width: var(--measure);
  margin: var(--rhythm-3) auto 0;
  padding: 0 24px;
}

/* --- Type ----------------------------------------------------------------- */

h1, h2, h3, h4 {
  font-weight: 400;
  margin: 0;
  letter-spacing: -0.005em;
}

h1 {
  font-size: var(--fs-h1);
  line-height: 1.15;
}

h2 {
  font-size: var(--fs-h3);
  line-height: 1.25;
  letter-spacing: 0;
}

h3 {
  font-size: var(--fs-h4);
  line-height: 1.3;
  letter-spacing: 0;
}

p {
  margin: 0;
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  text-wrap: pretty;
}

em, i { font-style: italic; }

/* Editorial-leader register: paragraphs are spaced, not indented.
   This is the convention for short-form web prose — closer to a leader
   column or reference page than to a book chapter. The book convention
   (indented paragraphs, no blank line) is reserved for long-form
   reading surfaces (the future essay at /writing/compounding). */
.prose p + p { text-indent: 0; margin-top: var(--rhythm); }
.prose h1 + p,
.prose h2 + p,
.prose h3 + p,
.prose hr + p,
.prose .lede + p,
.prose figure + p {
  text-indent: 0;
  margin-top: var(--rhythm);
}

/* Label/metadata paragraphs are not body prose — never indent them, and
   the first body paragraph after one is not indented either (the label
   acts as a sub-heading). */
.prose .meta,
.prose .byline,
.prose .role,
.prose .subtitle,
.prose .standfirst,
.prose .lede,
.prose .essay-meta,
.prose .forthcoming,
.prose .email-line,
.prose .status,
.prose .title,
.prose .essay-foot {
  text-indent: 0;
}
.prose .meta + p,
.prose .byline + p,
.prose .role + p,
.prose .subtitle + p,
.prose .essay-meta + p {
  text-indent: 0;
}

/* "Lede" — the first paragraph after H1, set without indent and slightly
   larger leading. Marks the opening of a page. */
.lede {
  font-size: var(--fs-body);
  line-height: 1.55;
  margin-top: var(--rhythm);
}

/* --- Links ---------------------------------------------------------------- */

a {
  color: var(--slate);
  text-decoration: underline;
  text-decoration-color: currentColor;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: text-decoration-thickness 120ms linear;
}
a:hover,
a:focus-visible {
  color: var(--slate);
  text-decoration-thickness: 2px;
  outline: none;
}

/* --- Small caps ----------------------------------------------------------- */

.smallcaps {
  font-size: var(--fs-smallcaps);
  font-variant-caps: all-small-caps;
  font-feature-settings: "smcp" 1, "c2sc" 1, "lnum" 1;
  letter-spacing: 0.12em;
}

.smallcaps--stone { color: var(--stone); }

/* --- Rules ---------------------------------------------------------------- */

hr {
  border: 0;
  border-top: 1px solid var(--hairline);
  margin: 0;
  width: 100%;
}

/* --- Footer --------------------------------------------------------------- */

.site-footer {
  width: 100%;
  margin-top: var(--rhythm-4);
  padding: 0 24px var(--rhythm-2);
}
.site-footer .inner {
  max-width: var(--measure);
  margin: 0 auto;
}
.site-footer hr {
  margin-bottom: 14px;
}
.site-footer .line {
  font-size: 13px;
  color: var(--stone);
  font-variant-caps: all-small-caps;
  letter-spacing: 0.1em;
  font-feature-settings: "lnum" 1;
}
.site-footer .line a {
  color: var(--stone);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
.site-footer .sep {
  color: var(--hairline);
  margin: 0 0.5em;
}

/* --- Page title (internal pages) ----------------------------------------- */

.page-title {
  font-size: var(--fs-h1);
  line-height: 1.15;
  margin: 0 0 var(--rhythm);
  letter-spacing: -0.005em;
}

/* --- Vertical rhythm utilities ------------------------------------------- */

.mt-1 { margin-top: var(--rhythm); }
.mt-2 { margin-top: var(--rhythm-2); }
.mt-3 { margin-top: var(--rhythm-3); }

.mb-1 { margin-bottom: var(--rhythm); }
.mb-2 { margin-bottom: var(--rhythm-2); }
.mb-3 { margin-bottom: var(--rhythm-3); }

/* ==========================================================================
   Page-specific
   ========================================================================== */

/* --- Home ----------------------------------------------------------------- */

main.home {
  max-width: var(--measure);
  margin: 0 auto;
  padding: var(--rhythm-4) 24px var(--rhythm-2);
  width: 100%;
}

.home h1 {
  font-size: var(--fs-h1);
  line-height: 1.1;
  margin: 0;
  letter-spacing: -0.01em;
}
.home .standfirst {
  font-size: 1.375rem; /* 22px — slightly larger leading for the standfirst */
  line-height: 1.45;
  margin: var(--rhythm) 0 0;
  color: var(--slate);
  text-wrap: balance;
}
.home .lede-para {
  margin-top: var(--rhythm-2);
}

/* Single line of body-text links separated by middots. The links are
   the labels. */
.home .home-nav {
  margin-top: var(--rhythm-2);
  font-size: var(--fs-body);
  display: flex;
  flex-wrap: wrap;
  gap: 0 14px;
  align-items: baseline;
}
.home .home-nav a {
  color: var(--slate);
}
.home .home-nav .sep {
  color: var(--hairline);
}

/* --- Work entries --------------------------------------------------------- */

.work-list {
  margin-top: var(--rhythm-2);
}
.work-entry {
  margin-bottom: var(--rhythm-2);
}
.work-entry:last-child {
  margin-bottom: 0;
}
.work-entry .role {
  font-size: var(--fs-body);
  font-style: italic;
  margin: 0 0 6px;
  line-height: 1.4;
}
.work-entry .meta {
  font-size: var(--fs-smallcaps);
  font-variant-caps: all-small-caps;
  letter-spacing: 0.12em;
  color: var(--stone);
  margin: 0 0 var(--rhythm);
  font-feature-settings: "smcp" 1, "c2sc" 1, "lnum" 1;
}
.work-entry p {
  margin: 0;
}

.section-marker {
  margin-top: var(--rhythm-3);
  margin-bottom: var(--rhythm);
  font-size: var(--fs-smallcaps);
  font-variant-caps: all-small-caps;
  letter-spacing: 0.16em;
  color: var(--slate);
}

.section-marker--stone {
  color: var(--stone);
}

/* --- Writing index -------------------------------------------------------- */

.writing-list {
  margin-top: var(--rhythm-2);
}
.writing-entry {
  margin-bottom: var(--rhythm-2);
}
.writing-entry .title {
  font-size: var(--fs-h4);
  line-height: 1.3;
  margin: 0 0 6px;
  letter-spacing: 0;
}
.writing-entry .status {
  font-size: var(--fs-small);
  color: var(--stone);
  font-style: italic;
}

/* --- The Compounding (thesis) page --------------------------------------- */

/* The killer sentence — the load-bearing claim of the project. Earns
   standalone treatment: italic, H4 size, generous breathing room. */
.thesis .killer {
  font-style: italic;
  font-size: var(--fs-h4);
  line-height: 1.4;
  margin-top: var(--rhythm-2);
  margin-bottom: var(--rhythm-2);
  text-wrap: balance;
}

.thesis .essay-meta {
  font-size: var(--fs-smallcaps);
  font-variant-caps: all-small-caps;
  letter-spacing: 0.12em;
  color: var(--stone);
  margin-bottom: var(--rhythm);
}
.thesis h1 {
  font-size: var(--fs-h1);
  line-height: 1.12;
  margin: 0 0 14px;
  letter-spacing: -0.005em;
  text-wrap: balance;
}
.thesis .subtitle {
  font-size: var(--fs-h4);
  font-style: italic;
  color: var(--slate);
  margin: 0 0 var(--rhythm);
  font-weight: 400;
  line-height: 1.35;
}
.thesis .byline {
  font-size: var(--fs-small);
  color: var(--stone);
  margin: 0 0 var(--rhythm);
  font-feature-settings: "lnum" 1;
}
.thesis hr.opener {
  margin-bottom: var(--rhythm-2);
}
.thesis h2 {
  margin-top: var(--rhythm-2);
  margin-bottom: var(--rhythm);
  display: flex;
  align-items: baseline;
  gap: 18px;
  font-size: var(--fs-h3);
  line-height: 1.25;
}
.thesis h2 .numeral {
  font-style: italic;
  font-size: var(--fs-h4);
  color: var(--stone);
  flex-shrink: 0;
  font-feature-settings: "lnum" 1;
}
.thesis .essay-foot {
  margin-top: var(--rhythm-2);
  padding-top: var(--rhythm);
  border-top: 1px solid var(--hairline);
  font-size: var(--fs-small);
  color: var(--stone);
}
.thesis .essay-foot a {
  color: var(--slate);
  font-size: var(--fs-body);
}
.thesis .essay-foot .sep {
  margin: 0 12px;
  color: var(--hairline);
}

/* --- /writing/compounding placeholder ------------------------------------ */

.locked-block .forthcoming {
  font-style: italic;
  color: var(--stone);
  margin: var(--rhythm) 0 var(--rhythm-2);
}
.locked-block ul.return {
  list-style: none;
  padding: 0;
  margin: 0;
}
.locked-block ul.return li {
  font-size: var(--fs-body);
  margin-bottom: 8px;
  padding-left: 1.2em;
  text-indent: -1.2em;
}
.locked-block ul.return li::before {
  content: "— ";
  color: var(--stone);
}

/* --- Contact -------------------------------------------------------------- */

.contact .email-line {
  font-size: var(--fs-h4);
  margin: var(--rhythm) 0 0;
}
.contact .email-line a {
  color: var(--slate);
}

/* --- Responsive ----------------------------------------------------------- */

@media (max-width: 640px) {
  :root {
    --fs-h1: 2.25rem;     /* 36px */
    --fs-h3: 1.5rem;      /* 24px */
  }
  .home .standfirst {
    font-size: 1.25rem;   /* 20px */
  }
  main.home {
    padding-top: var(--rhythm-3);
  }
  main.standard {
    margin-top: var(--rhythm-2);
  }
}

/* --- Print ---------------------------------------------------------------- */

@media print {
  html, body { background: white; color: black; }
  .site-footer { display: none; }
  a { text-decoration: none; }
}
