/* ---------------------------------------------------------------
   Editorial grid: fixed meta rail + text column.
   Figures break out of the text column into the right margin.
   Homepage carries short entries only; long prose lives on the
   per-project detail pages (not built yet).
   --------------------------------------------------------------- */

:root {
  --paper: #F3F4F1;
  --ink: #171A17;
  --ink-muted: #555B54;
  --rule-soft: #C8CCC4;
  --rule-strong: #23261F;
  --accent: #2F5D46;
  --figure-bg: #E6E9E2;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #141613;
    --ink: #DFE2DC;
    --ink-muted: #8E938A;
    --rule-soft: #2C2F29;
    --rule-strong: #C4C8BF;
    --accent: #8FB8A3;
    --figure-bg: #1A1C18;
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.page {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 40px 96px;
  /* Hairline page edge: gives the whitespace a boundary on wide screens
     instead of letting the content float in a void. Disappears under the
     breakpoint, where the padding collapses anyway. */
  border-left: 1px solid var(--rule-soft);
  border-right: 1px solid var(--rule-soft);
}

/* --- the grid ------------------------------------------------- */

.row {
  display: grid;
  grid-template-columns: 180px minmax(0, 780px);
  gap: 48px;
}

.rail {
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--ink-muted);
  padding-top: 6px;
}

.rail dt {
  font-weight: 700;
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rule-strong);
  margin-bottom: 3px;
}

.rail dd { margin-bottom: 16px; }
.rail dd:last-child { margin-bottom: 0; }

/* --- top bar -------------------------------------------------- */

.topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 24px;
  padding: 28px 0 0;
}

.topbar .mark {
  font-family: 'Libre Bodoni', Georgia, serif;
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  margin-right: auto;
  border-bottom: none;
}

.topbar .mark:hover { color: var(--accent); }

/* --- links ---------------------------------------------------- */

.lnk {
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.875rem;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 1px;
  transition: color .15s, border-color .15s;
}

.lnk:hover, .lnk:focus-visible { color: var(--accent); }

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* --- hero ----------------------------------------------------- */

.hero {
  padding: 72px 0 56px;
  border-bottom: 2px solid var(--rule-strong);
}

.hero-inner {
  display: grid;
  grid-template-columns: 180px minmax(0, 780px);
  gap: 48px;
  align-items: start;
}

.portrait {
  width: 180px;
  height: 180px;
  object-fit: cover;
  display: block;
  filter: grayscale(1) contrast(1.05);
}

.hero h1 {
  font-family: 'Libre Bodoni', Georgia, 'Times New Roman', serif;
  font-size: 2.75rem;
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin-bottom: 14px;
}

.hero .role {
  font-size: 1rem;
  color: var(--ink-muted);
  margin-bottom: 26px;
}

.hero .claim {
  font-family: 'Libre Bodoni', Georgia, serif;
  font-size: 1.375rem;
  line-height: 1.35;
  color: var(--accent);
  margin-bottom: 32px;

}

.hero-facts {
  font-size: 0.875rem;
  color: var(--ink-muted);
  margin-bottom: 32px;
}

/* evidence list – the three projects, above the fold */
.jump {
  list-style: none;
  border-top: 1px solid var(--rule-soft);
}

.jump li { border-bottom: 1px solid var(--rule-soft); }

.jump a {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: baseline;
  padding: 13px 0;
  text-decoration: none;
  color: var(--ink);
  transition: color .15s;
}

.jump a:hover, .jump a:focus-visible { color: var(--accent); }

.jump .what { font-weight: 600; font-size: 0.9375rem; }

.jump .metric {
  font-size: 0.8125rem;
  color: var(--ink-muted);
  white-space: nowrap;
}

/* --- sections ------------------------------------------------- */

section { padding-top: 88px; }

.section-head {
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--rule-strong);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rule-strong);
  margin-bottom: 44px;}

.section-note {
  font-size: 0.9375rem;
  color: var(--ink-muted);
  margin: -24px 0 44px;
}

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

.entry { margin-bottom: 72px; }
.entry:last-child { margin-bottom: 0; }

.entry h3 {
  font-family: 'Libre Bodoni', Georgia, serif;
  font-size: 1.75rem;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin-bottom: 18px;
}

.entry p { margin-bottom: 12px; }
.entry p:last-child { margin-bottom: 0; }

.metric-line {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--accent);
  border-left: 2px solid var(--accent);
  padding: 2px 0 2px 16px;
  margin: 20px 0 24px;
}

/* figure breaks out of the text column to the right */
figure {
  margin: 24px 0;
  width: 100%;
}

figure img {
  width: 100%;
  height: auto;
  display: block;
  background: var(--figure-bg);
}

/* Plots and UI screenshots carry their own light background. Matting them on a
   white plate makes that read as deliberate instead of a hole punched in the
   page – which is exactly how an unmatted white PNG looks in dark mode.
   Photographs do NOT get this: they bleed to the figure edge. */
figure img.plate {
  background: #FFFFFF;
  padding: 14px;
  border: 1px solid var(--rule-soft);
}

/* An image too small for the breakout slot is shown at its natural size rather
   than upscaled into blur. Left-aligned in the text column, it reads as a
   deliberate inset instead of a broken full-width figure. */
figure.inset {
  width: auto;
  max-width: 100%;
}

figure.inset img {
  width: auto;
  max-width: 100%;
}

figure.inset figcaption {
  font-size: 0.8125rem;
  color: var(--ink-muted);
  padding-top: 10px;
  border-top: 1px solid var(--rule-soft);
  margin-top: 8px;
  text-align: center;
}

figcaption {
  font-size: 0.8125rem;
  color: var(--ink-muted);
  padding-top: 10px;
  border-top: 1px solid var(--rule-soft);
  margin-top: 8px;
  text-align: center;
}

.entry-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--rule-soft);
  margin-top: 24px;
}

.stack {
  font-size: 0.8125rem;
  color: var(--ink-muted);
}

.entry-links { display: flex; flex-wrap: wrap; gap: 20px; }

/* --- compact lists -------------------------------------------- */

.group-head {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ink-muted);
  margin-bottom: 8px;
}

.group-note {
  font-size: 0.9375rem;
  color: var(--ink-muted);
  margin-bottom: 16px;
}

.minor { list-style: none; margin-bottom: 48px; }
.minor:last-child { margin-bottom: 0; }

.minor li {
  padding: 16px 0;
  border-bottom: 1px solid var(--rule-soft);
}

.minor li:first-child { border-top: 1px solid var(--rule-soft); }

.minor b { font-weight: 600; display: block; margin-bottom: 3px; }

.minor p { font-size: 0.9375rem; color: var(--ink-muted); margin-bottom: 8px; }

.no-link {
  font-size: 0.8125rem;
  color: var(--ink-muted);
}

/* --- about ---------------------------------------------------- */

.about p {
  margin-bottom: 18px;
}

.about p:last-child { margin-bottom: 0; }

/* --- contact call to action ----------------------------------- */

.cta h2 {
  font-family: 'Libre Bodoni', Georgia, serif;
  font-size: 1.875rem;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin-bottom: 20px;

}

.cta p {
  margin-bottom: 28px;

}

/* --- profile -------------------------------------------------- */

.job { margin-bottom: 36px; }
.job:last-child { margin-bottom: 0; }

.job h4 {
  font-family: 'Libre Bodoni', Georgia, serif;
  font-size: 1.1875rem;
  font-weight: 500;
  margin-bottom: 4px;
}

.job .when {
  font-size: 0.8125rem;
  color: var(--ink-muted);
  margin-bottom: 14px;
}

.job ul { list-style: none; }

.job li {
  padding-left: 18px;
  position: relative;
  margin-bottom: 10px;
  font-size: 0.9375rem;
}

.job li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 7px;
  height: 1px;
  background: var(--accent);
}

.job li b { font-weight: 600; }

.pairs { width: 100%; border-collapse: collapse; }

.pairs th {
  text-align: left;
  vertical-align: top;
  font-weight: 600;
  font-size: 0.875rem;
  width: 190px;
  padding: 12px 20px 12px 0;
  border-bottom: 1px solid var(--rule-soft);
}

.pairs td {
  vertical-align: top;
  font-size: 0.9375rem;
  color: var(--ink-muted);
  padding: 12px 0;
  border-bottom: 1px solid var(--rule-soft);
}

.sub-head {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ink-muted);
  margin: 40px 0 18px;
}

.sub-head:first-child { margin-top: 0; }

/* --- footer --------------------------------------------------- */

footer {
  margin-top: 88px;
  padding-top: 40px;
  border-top: 2px solid var(--rule-strong);
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 28px;
}

.fineprint {
  font-size: 0.8125rem;
  color: var(--ink-muted);
}

.fineprint a { color: var(--ink-muted); }

/* --- responsive ----------------------------------------------- */

@media (max-width: 900px) {
  .page { padding: 0 28px 72px; }
  .row, .hero-inner { grid-template-columns: 1fr; gap: 24px; }
  .rail { padding-top: 0; }
  .rail dl { display: flex; flex-wrap: wrap; gap: 6px 28px; }
  .rail dd { margin-bottom: 0; }
  figure { width: 100%; max-width: 100%; }
  .portrait { width: 140px; height: 140px; }
  .hero { padding: 48px 0 40px; }
  .hero h1 { font-size: 2.125rem; }
  .hero .claim { font-size: 1.1875rem; }
  section { padding-top: 64px; }
  .entry h3 { font-size: 1.5rem; }
  .cta h2 { font-size: 1.625rem; }
  .pairs th, .pairs td { display: block; width: auto; border: 0; padding: 0; }
  .pairs th { padding-top: 14px; }
  .pairs td { padding-bottom: 14px; border-bottom: 1px solid var(--rule-soft); }
  .jump a { grid-template-columns: 1fr; gap: 2px; }
}

@media print {
  /* Reset the palette for paper. Without this, printing from dark mode
     carries the dark-mode tokens onto a white sheet – muted text lands at
     3.4:1 and the accent at 2.7:1. */
  :root {
    --paper: #FFFFFF;
    --ink: #000000;
    --ink-muted: #3A3A3A;
    --rule-soft: #B0B0B0;
    --rule-strong: #000000;
    --accent: #000000;
    --figure-bg: #FFFFFF;
  }
  .jump, figure, .topbar { display: none; }
  body { font-size: 11pt; color: #000; background: #fff; }
  .row, .hero-inner { grid-template-columns: 150px 1fr; }
  a { color: #000; }
}
