/* Ben Shapira. Static page: no scripts, no motion.
   Identity comes from the portrait: navy title band, one bougainvillea-pink accent.
   Shape rule: panels and the portrait use --radius; tags and buttons are pills. */

:root {
  --band: #131b31;
  --band-ink: #eef0f5;
  --band-mute: #a7afc2;
  --band-accent: #f08bb0;

  --bg: #f3f4f1;
  --surface: #fbfbf9;
  --ink: #131b31;
  --text: #3a4257;
  --mute: #5e667c;
  --line: rgba(19, 27, 49, 0.14);
  --accent: #b8245f;
  --accent-soft: rgba(184, 36, 95, 0.1);

  --radius: 14px;
  --display: "Bricolage Grotesque", "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --sans: "Geist", system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(1.25rem, 0.5rem + 3.2vw, 2.75rem);
  --side: 11rem;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }

a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-decoration-color: var(--accent);
  text-underline-offset: 3px;
}
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }
::selection { background: var(--accent); color: #fff; }

.wrap {
  width: min(100% - (var(--gutter) * 2), 66rem);
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  background: var(--accent);
  color: #fff;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  font-size: 0.875rem;
  text-decoration: none;
}
.skip:focus { top: 0.75rem; color: #fff; }

/* ---------- Title band ---------- */

.band {
  background: var(--band);
  color: var(--band-ink);
  padding-bottom: clamp(1.75rem, 1.25rem + 1.75vw, 2.625rem);
}
.band :focus-visible { outline-color: var(--band-accent); }

.top {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  padding-block: 1.5rem;
}
.top-links { display: flex; flex-wrap: wrap; gap: 0.3rem 1.75rem; font-size: 0.9375rem; font-weight: 500; }
.top-links a { color: var(--band-mute); text-decoration: none; }
.top-links a:hover { color: var(--band-ink); }

.band h1 {
  margin-top: clamp(1.5rem, 0.75rem + 3.5vw, 3.5rem);
  font-family: var(--display);
  font-size: clamp(2.75rem, 1.5rem + 5vw, 5rem);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.035em;
}
.band-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem 2.5rem;
  margin-top: 1.5rem;
}
.sub {
  max-width: 52ch;
  font-size: 1.125rem;
  line-height: 1.55;
  color: var(--band-mute);
  text-wrap: pretty;
}
.role { color: var(--band-ink); font-weight: 500; }

.social { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-left: auto; }
.social a {
  display: grid;
  place-items: center;
  width: 2.125rem;
  height: 2.125rem;
  border-radius: 999px;
  border: 1px solid rgba(238, 240, 245, 0.22);
  color: var(--band-ink);
}
.social a:hover { background: var(--band-accent); border-color: var(--band-accent); color: var(--band); }
.social a:active { transform: translateY(1px); }
.social svg { width: 0.875rem; height: 0.875rem; fill: currentColor; }

/* ---------- Section rows: heading on the left, content on the right ---------- */

.row {
  display: grid;
  grid-template-columns: var(--side) minmax(0, 1fr);
  gap: 1.25rem 2rem;
  padding-top: clamp(3rem, 2rem + 4vw, 5rem);
  scroll-margin-top: 1rem;
}
.row > h2 {
  font-family: var(--display);
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--ink);
}

/* ---------- About ---------- */

.about {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(12rem, 30%, 17rem);
  gap: clamp(1.75rem, 1rem + 3vw, 3.5rem);
  align-items: start;
}
.prose p { max-width: 62ch; }
.prose p + p { margin-top: 1.1rem; }

/* The portrait keeps its own 665 x 1172 crop. */
.portrait {
  width: 100%;
  aspect-ratio: 665 / 1172;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--surface);
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.5rem;
  margin-top: 1.75rem;
  font-size: 0.9375rem;
  font-weight: 500;
}

/* ---------- Latest writing ---------- */

.post {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 1rem + 2vw, 2.5rem);
}
.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.75rem;
  font-size: 0.9375rem;
  color: var(--mute);
}
.tag {
  display: inline-block;
  padding: 0.1rem 0.65rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.6;
}
.post-title {
  font-family: var(--display);
  font-size: clamp(1.6rem, 1.15rem + 1.7vw, 2.3rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin: 0.9rem 0 1rem;
  max-width: 26ch;
  text-wrap: balance;
}
.post-title a { text-decoration-color: transparent; }
.post-title a:hover { text-decoration-color: var(--accent); }
.post-summary { max-width: 60ch; }

.facts {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 1.5rem clamp(1.5rem, 4vw, 3rem);
  margin-top: 2rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--line);
}
.fact--main { grid-row: span 2; }
.fact dt {
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.fact--main dt { font-size: clamp(2.6rem, 1.8rem + 3vw, 3.75rem); line-height: 1; color: var(--accent); }
.fact dd { margin-top: 0.4rem; font-size: 0.9375rem; line-height: 1.55; color: var(--mute); max-width: 34ch; }
.fact--main dd { margin-top: 0.7rem; }

.post-cta { margin-top: 2rem; font-size: 0.9375rem; color: var(--mute); }
.button {
  display: inline-block;
  padding: 0.55rem 1.2rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}
.button:hover { background: var(--accent); color: #fff; }
.button:active { transform: translateY(1px); }

/* ---------- Research path ---------- */

.path { position: relative; padding-left: 1.9rem; }
.path::before {
  content: "";
  position: absolute;
  left: 0.3rem;
  top: 0.55rem;
  bottom: 0.5rem;
  width: 1.5px;
  background: var(--line);
}
.step { position: relative; }
.step + .step { margin-top: 2.25rem; }
.step::before {
  content: "";
  position: absolute;
  left: -1.9rem;
  top: 0.4rem;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: var(--bg);
  border: 1.5px solid var(--mute);
}
.step--now::before { background: var(--accent); border-color: var(--accent); }
.step-when { font-size: 0.875rem; font-weight: 500; line-height: 1.5; color: var(--mute); }
.step--now .step-when { color: var(--accent); }
.step h3 {
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 0.1rem 0 0.4rem;
}
.step > p:last-child { max-width: 62ch; }

/* Logos sit in a fixed slot to the right of each story. */
.step--logo { padding-right: 7rem; }
.step-logo {
  position: absolute;
  top: 0.15rem;
  right: 0;
  width: 4.75rem;
  height: auto;
}
/* The Granite lockup carries its name, so it gets a wider slot. */
.step--wide { padding-right: 10.5rem; }
.step-logo--wide { width: 8.25rem; }

/* ---------- Publications ---------- */

.pubs li + li { margin-top: 1.9rem; }
.pubs h3 {
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: var(--ink);
  max-width: 56ch;
}
.pubs h3 a { text-decoration-color: transparent; }
.pubs h3 a:hover { text-decoration-color: var(--accent); color: var(--ink); }
.authors { margin-top: 0.3rem; font-size: 0.9375rem; line-height: 1.55; color: var(--mute); max-width: 68ch; }
.authors b { color: var(--ink); font-weight: 600; }
.pub-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 1.1rem;
  margin-top: 0.4rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text);
}


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

.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  margin-top: clamp(4rem, 2.5rem + 5vw, 6rem);
  padding-block: 1.75rem 3rem;
  border-top: 1px solid var(--line);
  font-size: 0.875rem;
  color: var(--mute);
}
.foot .links { margin-top: 0; font-size: inherit; }

/* ---------- Narrow screens ---------- */

@media (max-width: 899px) {
  .row { grid-template-columns: minmax(0, 1fr); gap: 1.1rem; }
}

@media (max-width: 620px) {
  .about { grid-template-columns: minmax(0, 1fr); }
  .portrait { order: -1; width: min(58%, 13.5rem); }
  .top-links { gap: 0.3rem 1.15rem; }
  .facts { grid-template-columns: minmax(0, 1fr); }
  .fact--main { grid-row: auto; }
  .step--logo { padding-right: 0; }
  .step-logo { position: static; width: 3.75rem; margin-bottom: 0.6rem; }
  .step-logo--wide { width: 7rem; }
}

@media print {
  .band { background: none; color: #000; }
  .skip, .top-links { display: none; }
}
