/* Editorial Press — direction 01.
   Cream paper, deep ink, oxblood accent.
   Newsreader serif + IBM Plex Sans + IBM Plex Mono. */

:root {
  color-scheme: light;
  --paper: #f3ede0;
  --paper-hi: #faf6ec;
  --ink: #1a1714;
  --ink-2: #3a342c;
  --muted: #6b6357;
  --line: #d6cdb8;
  --ox: #8a2c1f;
  --ox-deep: #6b1f15;
  --ox-soft: #e2a899;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "IBM Plex Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --gutter: 56px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration-color: rgba(138, 44, 31, 0.4);
  text-underline-offset: 0.18em;
}

a:hover { color: var(--ox-deep); }

img { display: block; max-width: 100%; }

h1, h2, h3, h4 { margin: 0; font-family: var(--serif); }

p { margin: 0; }

.skip-link {
  background: var(--ink);
  color: var(--paper-hi);
  left: 1rem;
  padding: 0.65rem 0.8rem;
  position: absolute;
  top: -5rem;
  z-index: 20;
}
.skip-link:focus { top: 1rem; }

/* ---------- Nameplate / masthead nav ---------- */

.nameplate {
  border-bottom: 1px solid var(--ink);
  padding: 14px var(--gutter) 12px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.nameplate-left,
.nameplate-right {
  display: flex;
  gap: 18px;
  align-items: center;
}

.nameplate-right { justify-content: flex-end; }

.nameplate-left .muted-issue { color: var(--muted); }

.nameplate-title {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-transform: none;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}

.nameplate-right a {
  text-decoration: none;
  color: inherit;
}

.nameplate-right a[aria-current="page"] {
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
}

.rules-double {
  height: 6px;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

/* ---------- Section padding ---------- */

.section {
  padding: 48px var(--gutter) 56px;
}

.section.notebook {
  background: var(--paper-hi);
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  padding: 72px var(--gutter) 64px;
}

.section.article-section {
  padding: 72px var(--gutter) 80px;
}

.section.about {
  padding: 72px var(--gutter) 60px;
  background: var(--ink);
  color: var(--paper-hi);
}

/* ---------- Eyebrows / kickers ---------- */

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ox);
}

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

.kicker {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ox);
}

/* ---------- Hero (home page lead) ---------- */

.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.hero-lead .eyebrow { margin-bottom: 18px; display: block; }

.hero-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 76px;
  line-height: 0.98;
  letter-spacing: -0.025em;
  margin: 0 0 24px;
  color: var(--ink);
  text-wrap: balance;
}

.hero-title em {
  font-style: italic;
  color: var(--ox-deep);
}

.hero-lede {
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.4;
  color: var(--ink-2);
  margin: 0 0 28px;
  max-width: 46ch;
}

.hero-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.button {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.02em;
  text-decoration: none;
  display: inline-block;
}

.button.primary {
  background: var(--ink);
  color: var(--paper-hi);
  padding: 12px 18px;
}

.button.secondary {
  border: 1px solid var(--ink);
  color: var(--ink);
  padding: 11px 17px;
}

.button.on-dark {
  background: var(--paper-hi);
  color: var(--ink);
  border-color: var(--paper-hi);
}

.hero-meta {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  margin-left: 8px;
}

/* Founder credentials strip */
.credentials {
  margin-top: 56px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.credentials-figure {
  font-family: var(--serif);
  font-size: 36px;
  font-weight: 500;
  line-height: 1;
  color: var(--ink);
}

.credentials-label {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-top: 6px;
}

/* ---------- The Desk panel (right rail / sidebar) ---------- */

.desk {
  background: var(--paper-hi);
  border: 1px solid var(--ink);
  padding: 24px 24px 22px;
}

.desk-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ox);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ox);
  box-shadow: 0 0 0 4px rgba(138, 44, 31, 0.15);
}

.desk-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 22px;
  margin: 0 0 18px;
  line-height: 1.15;
}

.desk-list {
  margin: 0;
  display: grid;
  grid-template-columns: 88px 1fr;
  row-gap: 12px;
  column-gap: 14px;
}

.desk-list dt {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  padding-top: 2px;
}

.desk-list dd {
  margin: 0;
  font-family: var(--serif);
  font-size: 16px;
  color: var(--ink);
}

.desk-foot {
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
}

/* ---------- Section header (newspaper banner) ---------- */

.section-banner {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
  margin-bottom: 26px;
}

.section-banner .section-num {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.section-banner h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 44px;
  margin: 6px 0 0;
  letter-spacing: -0.02em;
}

.section-banner .section-blurb {
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
  color: var(--ink-2);
  max-width: 36ch;
  text-align: right;
}

/* ---------- Notebook (two-column blog index) ---------- */

.notebook-grid {
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  gap: 40px;
}

.notebook-divider { background: var(--line); }

.column-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding-bottom: 8px;
}

.column-head h3 {
  font-family: var(--serif);
  font-weight: 600;
  font-style: italic;
  font-size: 38px;
  margin: 0;
}

.column-head h3.accent-ink { color: var(--ink); }
.column-head h3.accent-ox  { color: var(--ox-deep); }

.column-head .column-sub {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.column-rule {
  border-top: 2px solid var(--ink);
}

.entry {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  margin-top: 18px;
}

.entry-kicker {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ox);
  margin-bottom: 10px;
}

.entry h4 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 30px;
  line-height: 1.08;
  margin: 0 0 10px;
  letter-spacing: -0.012em;
  color: var(--ink);
}

.entry h4 a {
  color: inherit;
  text-decoration: none;
}

.entry h4 a:hover { color: var(--ox-deep); }

.entry-lede {
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.45;
  color: var(--ink-2);
  margin: 0 0 12px;
}

.entry-meta {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

/* ---------- Article reading layout ---------- */

.article-shell {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 56px;
  align-items: start;
}

/* Grid items default to min-width: auto, so they refuse to shrink below
   their content's intrinsic width. Wide content (e.g. a no-wrap table on
   mobile) would then blow out the 1fr track and force the whole article to
   overflow the viewport. min-width: 0 lets the track shrink to fit; the
   table's own overflow-x: auto then scrolls it internally. */
.article-body,
.marginalia {
  min-width: 0;
}

.article-body {
  overflow-wrap: break-word;
}

.article-body .kicker { display: block; margin-bottom: 12px; }

.article-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 64px;
  line-height: 1;
  letter-spacing: -0.025em;
  margin: 0 0 18px;
  text-wrap: balance;
}

.article-lede {
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.45;
  color: var(--ink-2);
  margin: 0 0 28px;
  max-width: 56ch;
}

.byline {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0 22px;
  margin-bottom: 34px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.byline-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper-hi);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 500;
}

.byline-name { color: var(--ink); }

.byline-tag { color: var(--ox); }

.byline-spacer { margin-left: auto; }

.article-body p,
.article-body li {
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.6;
  color: var(--ink);
  margin: 0 0 18px;
}

.article-body h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-style: italic;
  font-size: 30px;
  margin: 32px 0 12px;
  letter-spacing: -0.012em;
}

.article-body h3 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 22px;
  margin: 24px 0 10px;
}

.article-body sup {
  color: var(--ox);
  font-family: var(--sans);
  font-size: 12px;
}

.article-body code {
  font-family: var(--mono);
  background: rgba(26, 23, 20, 0.06);
  padding: 0.1em 0.3em;
  border-radius: 2px;
  font-size: 0.92em;
}

.article-body pre {
  background: var(--ink);
  color: var(--paper-hi);
  padding: 18px 20px;
  overflow: auto;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.55;
  margin: 0 0 24px;
}

.article-body pre code {
  background: transparent;
  padding: 0;
  font-size: inherit;
  color: inherit;
}

.article-body ul {
  margin: 0 0 18px;
  padding-left: 1.4em;
}

.article-body blockquote {
  font-family: var(--serif);
  font-style: italic;
  font-size: 22px;
  line-height: 1.4;
  color: var(--ink-2);
  margin: 24px 0;
  padding-left: 18px;
  border-left: 2px solid var(--ox);
}

.footnotes {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.footnotes .marker { color: var(--ox); }

/* Marginalia rail */
.marginalia { position: sticky; top: 24px; }

.toc {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 20px 20px 18px;
  margin-bottom: 18px;
}

.toc-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-bottom: 12px;
}

.toc ol {
  margin: 0;
  padding: 0 0 0 18px;
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.6;
}

.toc ol li { margin: 4px 0; }

.toc ol li a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.toc ol li a:hover {
  color: var(--ox);
  border-bottom-color: var(--ox);
}

.pull-quote {
  background: var(--ink);
  color: var(--paper-hi);
  padding: 20px 20px 18px;
}

.pull-quote-label {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(250, 246, 236, 0.6);
  margin-bottom: 10px;
}

.pull-quote p {
  font-family: var(--serif);
  font-style: italic;
  font-size: 22px;
  line-height: 1.35;
  margin: 0;
}

/* ---------- About (dark band) ---------- */

.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 64px;
  align-items: start;
}

.about .eyebrow,
.about .eyebrow.muted {
  color: rgba(250, 246, 236, 0.55);
  margin-bottom: 16px;
  display: block;
}

.about-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 60px;
  line-height: 1;
  letter-spacing: -0.025em;
  margin: 0 0 24px;
  text-wrap: balance;
}

.about-title em {
  font-style: italic;
  color: var(--ox-soft);
}

.about-text {
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.5;
  color: rgba(250, 246, 236, 0.85);
  margin: 0 0 14px;
  max-width: 54ch;
}

.about-text:last-of-type { margin-bottom: 0; }

.about-cols {
  margin-top: 36px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.about-cols .col-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(250, 246, 236, 0.55);
  margin-bottom: 12px;
}

.about-project {
  border-top: 1px solid rgba(250, 246, 236, 0.18);
  padding-top: 12px;
}

.about-project + .about-project { margin-top: 14px; }

.about-project .name {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
}

.about-project .desc {
  font-family: var(--serif);
  font-size: 15px;
  color: rgba(250, 246, 236, 0.7);
  margin-top: 4px;
}

.about-links {
  list-style: none;
  padding: 0;
  margin: 0;
  font-family: var(--serif);
  font-size: 17px;
}

.about-links li {
  border-top: 1px solid rgba(250, 246, 236, 0.18);
}

.about-links a {
  text-decoration: none;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 0;
  color: inherit;
}

.about-links .label {
  flex: none;
}

.about-links a:hover,
.section.about a:hover {
  color: var(--ox-soft);
}

.about-links .handle {
  color: rgba(250, 246, 236, 0.6);
  font-family: var(--mono);
  font-size: 13px;
  text-align: right;
  overflow-wrap: anywhere;
}

.about-links a:hover .handle {
  color: var(--ox-soft);
}

.role-note {
  margin: 6px 0 0;
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.5;
  color: var(--muted);
  font-weight: 400;
}

.portrait {
  width: 100%;
  aspect-ratio: 4 / 5;
  background:
    repeating-linear-gradient(135deg,
      rgba(250, 246, 236, 0.06) 0 12px,
      rgba(250, 246, 236, 0.02) 12px 24px);
  border: 1px solid rgba(250, 246, 236, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(250, 246, 236, 0.55);
}

.colophon {
  margin-top: 18px;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.7;
  color: rgba(250, 246, 236, 0.55);
  letter-spacing: 0.04em;
}

.colophon div:first-child { color: rgba(250, 246, 236, 0.75); }

/* ---------- Projects page cards ---------- */

.projects-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.project-card {
  border: 1px solid var(--ink);
  background: var(--paper-hi);
  padding: 28px 28px 26px;
  display: grid;
  gap: 14px;
}

.project-card .entry-kicker { margin-bottom: 0; }

.project-card h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 34px;
  line-height: 1.05;
  margin: 0;
}

.project-card h3 a { text-decoration: none; }

.project-card p {
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.45;
  color: var(--ink-2);
  margin: 0;
}

.project-card .proof {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

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

.page-title-block {
  padding: 56px var(--gutter) 32px;
  border-bottom: 1px solid var(--line);
}

.page-title-block .eyebrow { display: block; margin-bottom: 14px; }

.page-title-block h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 68px;
  line-height: 1;
  letter-spacing: -0.025em;
  margin: 0 0 18px;
  max-width: 18ch;
  text-wrap: balance;
}

.page-title-block .lede {
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.4;
  color: var(--ink-2);
  max-width: 56ch;
}

/* ---------- Now / list-clean ---------- */

.list-clean {
  list-style: none;
  padding: 0;
  margin: 0;
  font-family: var(--serif);
  font-size: 19px;
}

.list-clean li {
  border-top: 1px solid var(--line);
  padding: 12px 0;
}

.split {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 56px;
  align-items: start;
}

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

.site-footer {
  padding: 24px var(--gutter);
  background: var(--paper);
  border-top: 1px solid var(--ink);
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.site-footer .vol { color: var(--ox); }

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

@media (max-width: 1100px) {
  :root { --gutter: 36px; }

  .hero-title { font-size: 60px; }
  .article-title { font-size: 52px; }
  .about-title { font-size: 48px; }
  .page-title-block h1 { font-size: 56px; }
  .section-banner h2 { font-size: 36px; }

  /* The links column gets too narrow here for the label-left / URL-right
     ledger layout, so stack the URL under its label instead of cramming it
     beside the label. */
  .about-links a {
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
  }
  .about-links .handle { text-align: left; }
}

@media (max-width: 860px) {
  :root { --gutter: 24px; }

  .nameplate {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 10px;
  }
  .nameplate-left,
  .nameplate-right { justify-content: center; }

  .hero,
  .article-shell,
  .about-grid,
  .split {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .notebook-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .notebook-divider { display: none; }

  .projects-grid { grid-template-columns: 1fr; gap: 20px; }

  .credentials { grid-template-columns: repeat(2, 1fr); }

  .about-cols { grid-template-columns: 1fr; }

  .section-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .section-banner .section-blurb { text-align: left; }

  .marginalia { position: static; }
}

@media (max-width: 560px) {
  .hero-title { font-size: 44px; }
  .article-title { font-size: 38px; }
  .about-title { font-size: 36px; }
  .page-title-block h1 { font-size: 40px; }
  .section-banner h2 { font-size: 28px; }
  .entry h4 { font-size: 24px; }
  .project-card h3 { font-size: 26px; }
  .credentials { grid-template-columns: 1fr 1fr; gap: 16px; }
  .credentials-figure { font-size: 28px; }
  .site-footer { flex-wrap: wrap; }
  .byline { flex-wrap: wrap; }
  .byline-spacer { margin-left: 0; }
}

/* ---------- Long-form prose: tables, quotes, ordered lists ---------- */

.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 28px 0;
  font-family: var(--sans);
  font-size: 14px;
}

.article-body table th,
.article-body table td {
  border: 1px solid var(--line);
  padding: 9px 13px;
  text-align: left;
  vertical-align: top;
}

.article-body table thead th {
  background: var(--paper-hi);
  border-bottom: 2px solid var(--ink);
  font-weight: 600;
}

.article-body table tbody tr:nth-child(even) td {
  background: rgba(214, 205, 184, 0.2);
}

.article-body blockquote {
  margin: 26px 0;
  padding: 2px 0 2px 22px;
  border-left: 3px solid var(--ox);
  color: var(--ink-2);
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.1em;
}

.article-body ol {
  margin: 18px 0;
  padding-left: 1.45em;
}

.article-body ol li { margin: 8px 0; }

.article-body em { font-style: italic; }

@media (max-width: 640px) {
  .article-body table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}
