@import url("fonts.css");

/* ============================================================
   Dr. Alexandre Zoumman — design system
   Palette, type scale and rhythm inherited from the live site.
   ============================================================ */

:root {
  /* Surfaces */
  --black: #000000;
  --ink: #111111;
  --forest: #123524;
  --forest-deep: #0c2318;
  --forest-rule: #1e4a33;
  --green: #1f5a3c;
  --paper: #ffffff;
  --bone: #f3f2ec;
  --bone-2: #e4e1d6;

  /* Accents */
  --lime: #87c459;
  --gold: #c9a227;
  --gold-deep: #806410;
  --brand-dot: #e02b20;

  /* Text on light */
  --ink-2: #40514a;
  --ink-3: #5c6b63;
  --rule: #dcdcd3;
  --rule-text: #6b776f;

  /* Text on dark */
  --sage: #b9c6bc;
  --sage-dim: #8fa097;

  /* Focus adapts to the surface it sits on */
  --focus: var(--green);

  /* Type */
  --sans: "Inter", ui-sans-serif, system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;

  /* Header — one value drives the bar, the sticky offsets and the drawer */
  --head-h: 68px;
  --nav-fs: clamp(0.8125rem, 0.66rem + 0.2vw, 0.9375rem);
  --nav-gap: clamp(0.9rem, -0.55rem + 1.9vw, 1.9rem);

  /* Rhythm */
  --shell: 1240px;
  --gutter: clamp(1.25rem, 0.55rem + 2.2vw, 2.5rem);
  --section: clamp(4rem, 2rem + 6vw, 8rem);

  /* Depth — every shadow carries an offset and a soft blur */
  --lift: 0 2px 6px -3px rgb(12 35 24 / 0.20), 0 18px 40px -26px rgb(12 35 24 / 0.45);
  --lift-hi: 0 4px 10px -4px rgb(12 35 24 / 0.24), 0 28px 56px -28px rgb(12 35 24 / 0.52);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

@media (max-width: 700px) {
  :root { --head-h: 60px; }
}

/* ---------- Reset ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--head-h) + 1.25rem);
  /* Browser chrome themed from the palette, not left at default */
  scrollbar-color: #9aa8a0 #eceee9;
  scrollbar-width: thin;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(1rem, 0.96rem + 0.14vw, 1.0625rem);
  line-height: 1.65;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, picture, svg, video { display: block; max-width: 100%; }
img { height: auto; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.018em;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; }
/* The UA stylesheet gives <figure> `margin: 1em 40px`. Left in place it was
   silently stealing 80px of width from the hero portrait's column. */
figure { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

a { color: inherit; }

::selection { background: var(--lime); color: #08150e; }

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

/* Dark surfaces get their own focus colour and secondary tints */
.on-dark {
  --focus: var(--lime);
  color: #fff;
}

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: 0.75rem;
  top: -100%;
  z-index: 200;
  padding: 0.7rem 1.1rem;
  background: var(--lime);
  color: #08150e;
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: 0 0 6px 6px;
  transition: top 0.18s var(--ease-out);
}
.skip:focus { top: 0; }

.vh {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ============================================================
   MASTHEAD — identical markup and metrics on every page.
   The nav is guaranteed to stay on ONE line in any language:
   fluid type + fluid gaps hold it down to 1080px, and site.js
   measures real overflow and flips to the drawer if it ever
   would wrap (longer labels, a new item, a new locale).
   ============================================================ */

.masthead {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--black);
  border-bottom: 1px solid rgb(255 255 255 / 0.11);
}

.masthead__inner {
  display: flex;
  align-items: center;
  gap: clamp(1rem, -1.4rem + 3.1vw, 2.25rem);
  height: var(--head-h);
  /* The overflow that site.js measures. Also stops any wrap from
     ever being visible in the split second before JS runs. */
  overflow: hidden;
}

.brand {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  text-decoration: none;
  border-radius: 3px;
}
.brand img {
  height: clamp(21px, 18px + 0.4vw, 28px);
  width: auto;
  aspect-ratio: 300 / 80;
}
.brand:hover img { opacity: 0.82; }
.brand img { transition: opacity 0.2s var(--ease-out); }

/* --- The one-line nav --- */

.mainnav { margin-left: auto; flex: 0 0 auto; }

.mainnav__list {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: var(--nav-gap);
}
.mainnav__list > li { flex: 0 0 auto; }

.mainnav__link {
  display: block;
  position: relative;
  padding-block: 0.5rem;
  font-size: var(--nav-fs);
  font-weight: 500;
  letter-spacing: 0.004em;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s var(--ease-out);
}
.mainnav__link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0.15rem;
  height: 1.5px;
  background: var(--lime);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.28s var(--ease-out);
}
.mainnav__link:hover { color: var(--lime); }
.mainnav__link:hover::after { transform: scaleX(1); }

.mainnav__link[aria-current="page"] { color: var(--lime); }
.mainnav__link[aria-current="page"]::after { transform: scaleX(1); }

/* --- Header end: language + menu button --- */

.masthead__end {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.langswitch {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.36rem 0.7rem;
  border: 1px solid rgb(255 255 255 / 0.26);
  border-radius: 999px;
  font-size: calc(var(--nav-fs) - 0.5px);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 0.2s var(--ease-out), background-color 0.2s var(--ease-out), color 0.2s var(--ease-out);
}
.langswitch:hover {
  border-color: var(--lime);
  background: var(--lime);
  color: #08150e;
}

.menubtn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px; height: 42px;
  margin-right: -8px;
  padding: 0;
  background: none;
  border: 0;
  color: #fff;
  cursor: pointer;
  border-radius: 6px;
}
.menubtn svg { width: 22px; height: 22px; }
.menubtn:hover { color: var(--lime); }

/* Compact state — set by media query AND by the JS overflow guard */
.masthead[data-nav="compact"] .mainnav { display: none; }
.masthead[data-nav="compact"] .langswitch { display: none; }
.masthead[data-nav="compact"] .menubtn { display: inline-flex; }
.masthead[data-nav="compact"] .brand { margin-right: auto; }

@media (max-width: 1079px) {
  .masthead .mainnav,
  .masthead .langswitch { display: none; }
  .masthead .menubtn { display: inline-flex; }
  .masthead .brand { margin-right: auto; }
}

/* ---------- Drawer ---------- */

.drawer {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: grid;
  grid-template-rows: auto 1fr;
  background: var(--black);
  /* The authored moment for the drawer: a clip reveal, not a slide */
  clip-path: inset(0 0 0 100%);
  visibility: hidden;
  transition: clip-path 0.5s var(--ease-out), visibility 0s linear 0.5s;
}
.drawer[data-open="true"] {
  clip-path: inset(0 0 0 0%);
  visibility: visible;
  transition: clip-path 0.55s var(--ease-out), visibility 0s;
}

.drawer__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--head-h);
  border-bottom: 1px solid rgb(255 255 255 / 0.11);
}

.drawer__body {
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-block: clamp(1.5rem, 0.6rem + 3vw, 3rem) 2.5rem;
}

.drawer__list { display: grid; gap: 0.15rem; }

.drawer__link {
  display: flex;
  align-items: center;
  min-height: 52px;          /* generous thumb target in the phone menu */
  padding: 0.35rem 0;
  font-family: var(--serif);
  font-size: clamp(1.5rem, 1.1rem + 1.9vw, 2.25rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: #fff;
  text-decoration: none;
  transition: color 0.2s var(--ease-out);
}
.drawer__link[aria-current="page"] { color: var(--lime); }
.drawer__link:hover { color: var(--lime); }

/* Staggered entrance, only while opening */
.drawer[data-open="true"] .drawer__list > li {
  animation: drawerIn 0.6s var(--ease-out) backwards;
  animation-delay: calc(0.1s + var(--i) * 0.035s);
}
@keyframes drawerIn {
  from { opacity: 0; transform: translate3d(1.25rem, 0, 0); }
}

.drawer__foot {
  margin-top: clamp(2rem, 1rem + 3vw, 3rem);
  padding-top: 1.5rem;
  border-top: 1px solid rgb(255 255 255 / 0.11);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
}
.drawer__meta {
  color: var(--sage-dim);
  font-size: 0.875rem;
  text-decoration: none;
}
.drawer__meta:hover { color: var(--lime); }

body[data-locked="true"] { overflow: hidden; }

/* ============================================================
   HERO — text and portrait occupy separate grid tracks, so the
   photograph can never run over the surname at any width.
   ============================================================ */

/* Pure black, deliberately: the portrait is shot on a black ground, so a
   flat field lets the subject sit in the page with no visible photo edge.
   Any wash here would draw the rectangle back. */
.hero {
  position: relative;
  background: var(--black);
  isolation: isolate;
}

.hero__inner {
  display: grid;
  /* The portrait now takes the larger share: the name sits comfortably in a
     narrower column at its reduced size, and the photograph reads at a scale
     that matches its importance on the page. */
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  column-gap: clamp(1.25rem, -0.6rem + 3.6vw, 3.5rem);
  /* The figure stretches the full height of the hero so the portrait fills it
     top to bottom. The top padding belongs to the TEXT alone — on the grid it
     would push the photo down and leave a dead black band above it. */
  align-items: stretch;
  min-height: min(88vh, 820px);
}

.hero__text {
  min-width: 0;
  align-self: center;
  padding-block: clamp(2.5rem, 0.6rem + 5vw, 5rem) clamp(3rem, 1rem + 6vw, 6.5rem);
}

.hero__eyebrow {
  font-family: var(--serif);
  font-size: clamp(0.75rem, 0.68rem + 0.22vw, 0.9375rem);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: clamp(1rem, 0.6rem + 1.2vw, 1.75rem);
}

.hero__name {
  /* Sized for the SHORT display name ("Dr. Mahougnon Zoumman"). The full name
     lives in the <title>, the portrait alt text and the About page. */
  font-size: clamp(2.125rem, 1.15rem + 3.3vw, 4rem);
  line-height: 1.06;
  letter-spacing: -0.022em;
  color: #fff;
  /* A person's name must never be hyphenated: "Mahou-gnon" is a misspelling,
     not a line break. The size above is chosen so the longest word fits the
     column at every width, and break-word stays only as a last resort. */
  hyphens: none;
  overflow-wrap: break-word;
}

.hero__role {
  margin-top: clamp(0.85rem, 0.5rem + 1vw, 1.5rem);
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.0625rem, 0.9rem + 0.6vw, 1.5rem);
  line-height: 1.35;
  color: var(--bone-2);
  letter-spacing: -0.005em;
}

.hero__rule {
  width: 88px;
  height: 2px;
  margin: clamp(1.5rem, 0.9rem + 1.8vw, 2.5rem) 0;
  background: var(--gold);
}

.hero__intro {
  max-width: 52ch;
  color: var(--sage);
  font-size: clamp(0.9375rem, 0.89rem + 0.2vw, 1.0625rem);
  line-height: 1.72;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  margin-top: clamp(1.75rem, 1rem + 2.2vw, 2.75rem);
}

.hero__figure {
  min-width: 0;
  align-self: stretch;
  display: flex;
  justify-content: center;
  align-items: flex-end;
}

.hero__portrait {
  width: 100%;
  height: 100%;
  /* No caps here: the portrait takes the whole hero column and `contain`
     keeps it in proportion, anchored to the bottom edge. */
  object-fit: contain;
  object-position: bottom center;
}

@media (max-width: 900px) {
  .hero__inner {
    grid-template-columns: minmax(0, 1fr);
    row-gap: clamp(1.5rem, 0.5rem + 4vw, 3rem);
    min-height: 0;
    padding-bottom: 0;
  }
  /* Stacked: the figure no longer fills a column, so give the portrait its
     natural height back and cap it instead. */
  .hero__text { align-self: auto; padding-bottom: 0; }
  .hero__figure { align-self: auto; }
  .hero__portrait { height: auto; max-height: 58vh; max-width: 460px; }
}

/* On a phone the hero is the whole first impression and it has to earn its
   height: tighten the vertical rhythm so the name, the role and the buttons
   are reachable without a long scroll. */
@media (max-width: 560px) {
  .hero__inner { padding-top: clamp(1.75rem, 1rem + 3vw, 2.5rem); }
  .hero__eyebrow { letter-spacing: 0.12em; margin-bottom: 0.85rem; }
  .hero__rule { margin-block: 1.15rem; width: 64px; }
  .hero__intro { font-size: 0.9375rem; line-height: 1.65; }
  .hero__cta { margin-top: 1.5rem; gap: 0.65rem; }
  /* Height, not width, is what limits the portrait on a phone — so raise the
     height cap to let it fill the column rather than float small in it. */
  .hero__portrait { max-height: 54vh; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 48px;          /* comfortable thumb target */
  padding: 0.85rem 1.5rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.005em;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.22s var(--ease-out), background-color 0.22s var(--ease-out),
              color 0.22s var(--ease-out), border-color 0.22s var(--ease-out), box-shadow 0.22s var(--ease-out);
}
.btn:hover { transform: translateY(-2px); }

/* One-handed use: side-by-side buttons become full-width rows on a phone,
   so either one can be hit without aiming. */
@media (max-width: 480px) {
  .hero__cta, .article__foot { display: grid; gap: 0.65rem; }
  .hero__cta .btn, .article__foot .btn { width: 100%; }
}
.btn:active { transform: translateY(0); }

.btn--primary {
  background: var(--lime);
  color: #08150e;
  box-shadow: var(--lift);
}
.btn--primary:hover { background: #96d465; box-shadow: var(--lift-hi); }

.btn--ghost {
  border-color: rgb(255 255 255 / 0.32);
  color: #fff;
}
.btn--ghost:hover { border-color: #fff; background: rgb(255 255 255 / 0.08); }

.btn--solid {
  background: var(--forest);
  color: #fff;
  box-shadow: var(--lift);
}
.btn--solid:hover { background: var(--green); box-shadow: var(--lift-hi); }

.btn svg { width: 1em; height: 1em; flex: 0 0 auto; }

/* Inline text link with an arrow */
.arrowlink {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--green);
  text-decoration: none;
  border-bottom: 1.5px solid transparent;
  transition: color 0.2s var(--ease-out), border-color 0.2s var(--ease-out);
}
.arrowlink svg { width: 0.95em; height: 0.95em; transition: transform 0.28s var(--ease-out); }
.arrowlink:hover { color: var(--forest); border-bottom-color: var(--gold); }
.arrowlink:hover svg { transform: translateX(4px); }

.on-dark .arrowlink { color: var(--lime); }
.on-dark .arrowlink:hover { color: #a5d97f; border-bottom-color: var(--lime); }

/* ============================================================
   PAGE BANNER (interior pages)
   ============================================================ */

.banner {
  background: var(--forest);
  position: relative;
  overflow: hidden;
}
.banner__inner {
  padding-block: clamp(3rem, 1.5rem + 5vw, 6rem);
}
.banner__eyebrow {
  font-family: var(--serif);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.9rem;
}
.banner__title {
  font-size: clamp(2rem, 1.2rem + 2.9vw, 3.5rem);
  color: #fff;
  max-width: 20ch;
}
.banner__intro {
  margin-top: clamp(1rem, 0.7rem + 1vw, 1.5rem);
  max-width: 62ch;
  color: var(--sage);
  font-size: clamp(1rem, 0.95rem + 0.2vw, 1.125rem);
  line-height: 1.7;
}

/* ============================================================
   SECTIONS
   ============================================================ */

.section { padding-block: var(--section); }
.section--bone { background: var(--bone); }
.section--forest { background: var(--forest); }
.section--tight { padding-block: clamp(3rem, 1.5rem + 4.5vw, 6rem); }

/* More space above a heading than below it */
.section__head { margin-bottom: clamp(2rem, 1.2rem + 2.4vw, 3.25rem); }
.section__head + * { margin-top: 0; }

/* A short gold rule above every section title. It is the one repeated mark
   that ties the light pages back to the gold used on the dark banners. */
.section__title {
  font-size: clamp(1.5rem, 1.15rem + 1.3vw, 2.25rem);
}
.section__title::before {
  content: "";
  display: block;
  width: 52px;
  height: 2px;
  margin-bottom: clamp(0.9rem, 0.7rem + 0.6vw, 1.35rem);
  background: var(--gold);
}
.on-dark .section__title::before { background: var(--lime); }
.section__lead {
  margin-top: 0.9rem;
  max-width: 68ch;
  color: var(--ink-2);
}
.on-dark .section__lead { color: var(--sage); }

.headrow {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem 2rem;
}

/* ---------- Prose ---------- */

.prose {
  max-width: 68ch;
  display: grid;
  gap: 1.35em;
  font-size: clamp(1rem, 0.97rem + 0.16vw, 1.0938rem);
  line-height: 1.75;
  color: var(--ink-2);
}
.prose > h2, .prose > h3 {
  color: var(--ink);
  margin-top: 0.6em;
}
.prose > h2 { font-size: clamp(1.375rem, 1.15rem + 0.9vw, 1.875rem); }
.prose > h3 { font-size: clamp(1.1875rem, 1.05rem + 0.6vw, 1.5rem); }
.prose strong { color: var(--ink); font-weight: 600; }
.prose a {
  color: var(--green);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.19em;
  text-decoration-color: rgb(31 90 60 / 0.4);
  transition: text-decoration-color 0.2s var(--ease-out), color 0.2s var(--ease-out);
}
.prose a:hover { color: var(--forest); text-decoration-color: var(--gold); }
.prose figure { margin: 0.6em 0; }
.prose img {
  width: 100%;
  /* --iw is the photo's real pixel width, written by the build. Capping at it
     keeps small originals sharp instead of blurring them up. */
  max-width: min(100%, var(--iw, 100%));
  margin-inline: auto;
  border-radius: 4px;
  box-shadow: var(--lift);
}
.prose blockquote {
  margin: 0.4em 0;
  padding-left: 1.4rem;
  border-left: 1px solid var(--gold);
  font-family: var(--serif);
  font-size: 1.15em;
  font-style: italic;
  line-height: 1.5;
  color: var(--ink);
}
.prose ul.bullets { display: grid; gap: 0.6em; padding-left: 1.15rem; list-style: disc; }
.prose ol.bullets { display: grid; gap: 0.6em; padding-left: 1.35rem; list-style: decimal; }
.prose ul.bullets li::marker { color: var(--gold); }
.prose ol.bullets li::marker { color: var(--gold-deep); font-weight: 600; }

.embed {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: var(--lift);
}
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- Two-column page layout ---------- */

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 20rem);
  gap: clamp(2rem, 0.8rem + 3.6vw, 4.5rem);
  align-items: start;
}
@media (max-width: 900px) {
  .split { grid-template-columns: minmax(0, 1fr); }
}

.facts {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--rule);
}
.facts > div {
  display: grid;
  gap: 0.2rem;
  padding-block: 1rem;
  border-bottom: 1px solid var(--rule);
}
.facts dt {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.facts dd {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.0625rem;
  color: var(--ink);
}

/* ---------- Ruled topic list (instead of a card wall) ---------- */

.topics { display: grid; border-top: 1px solid var(--rule); }
.on-dark .topics { border-top-color: var(--forest-rule); }

.topics li {
  display: grid;
  grid-template-columns: 2.75rem minmax(0, 1fr);
  gap: 0 0.5rem;
  align-items: baseline;
  padding-block: clamp(0.95rem, 0.7rem + 0.7vw, 1.35rem);
  border-bottom: 1px solid var(--rule);
  font-size: clamp(1rem, 0.94rem + 0.28vw, 1.1875rem);
  color: var(--ink);
}
.on-dark .topics li { border-bottom-color: var(--forest-rule); color: #fff; }

.topics li > span:first-child {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
  color: var(--gold-deep);
}
.on-dark .topics li > span:first-child { color: var(--gold); }
.topics li i { font-style: italic; }

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

.pubs { display: grid; border-top: 1px solid var(--rule); }
.section--bone .pubs { border-top-color: #d8d6cb; }

.pub {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr);
  gap: 0.35rem clamp(1rem, 0.5rem + 1.5vw, 2rem);
  padding-block: clamp(1.4rem, 1rem + 1.4vw, 2.25rem);
  border-bottom: 1px solid var(--rule);
}
.section--bone .pub { border-bottom-color: #d8d6cb; }

.pub__year {
  font-family: var(--serif);
  font-size: clamp(1.125rem, 1rem + 0.5vw, 1.5rem);
  font-variant-numeric: tabular-nums;
  color: var(--gold-deep);
  line-height: 1.2;
}
.pub__body { min-width: 0; display: grid; gap: 0.55rem; }
.pub__title {
  font-family: var(--serif);
  font-size: clamp(1.0625rem, 0.98rem + 0.42vw, 1.375rem);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.012em;
  color: var(--ink);
}
.pub__journal {
  font-style: italic;
  font-size: 0.9375rem;
  color: var(--ink-3);
}
.pub__meta { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; align-items: center; }

@media (max-width: 560px) {
  .pub { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Timeline (research experience, awards) ---------- */

.timeline { display: grid; }

.tl {
  display: grid;
  grid-template-columns: 9.5rem minmax(0, 1fr);
  gap: 0.4rem clamp(1rem, 0.5rem + 1.5vw, 2.25rem);
  padding-block: clamp(1.4rem, 1rem + 1.4vw, 2.25rem);
  border-top: 1px solid var(--rule);
}
.tl:last-child { border-bottom: 1px solid var(--rule); }

.tl__when {
  font-size: 0.8125rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold-deep);
  padding-top: 0.3rem;
}
.tl__body { min-width: 0; display: grid; gap: 0.45rem; }
.tl__role {
  font-family: var(--serif);
  font-size: clamp(1.0625rem, 0.98rem + 0.42vw, 1.375rem);
  font-weight: 500;
  line-height: 1.3;
  color: var(--ink);
}
.tl__org { font-size: 0.9375rem; font-weight: 500; color: var(--ink-3); }
.tl__text { color: var(--ink-2); font-size: 0.9688rem; line-height: 1.7; max-width: 62ch; }
.tl__text i { font-style: italic; }

/* Bulleted duties, mirroring the CV's own structure */
.tl__points {
  display: grid;
  gap: 0.5rem;
  max-width: 64ch;
  color: var(--ink-2);
  font-size: 0.9688rem;
  line-height: 1.7;
}
.tl__points li {
  position: relative;
  padding-left: 1.1rem;
}
.tl__points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
}
.tl__points i { font-style: italic; }

@media (max-width: 640px) {
  .tl { grid-template-columns: minmax(0, 1fr); }
  .tl__when { padding-top: 0; }
}

/* ---------- Organisation blocks ---------- */

.orgs { display: grid; gap: clamp(2rem, 1rem + 3vw, 3.5rem); }

.org {
  display: grid;
  grid-template-columns: minmax(0, 13rem) minmax(0, 1fr);
  gap: 0.5rem clamp(1.5rem, 0.6rem + 2.8vw, 3.5rem);
  padding-top: clamp(1.5rem, 1rem + 1.6vw, 2.25rem);
  border-top: 2px solid var(--forest);
}
.org__name {
  font-family: var(--serif);
  font-size: clamp(1.75rem, 1.35rem + 1.6vw, 2.75rem);
  line-height: 1;
  color: var(--forest);
}
.org__full {
  margin-top: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink-3);
  text-wrap: balance;
}
.org__body { min-width: 0; display: grid; gap: 1.1rem; }
.org__text { color: var(--ink-2); max-width: 62ch; line-height: 1.72; }

@media (max-width: 760px) {
  .org { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Projects ---------- */

.projects { display: grid; gap: clamp(1.75rem, 1rem + 2.4vw, 2.75rem); }

.project {
  padding-top: clamp(1.25rem, 0.9rem + 1.2vw, 1.75rem);
  border-top: 1px solid var(--rule);
  display: grid;
  gap: 0.75rem;
}
.project__name {
  font-family: var(--serif);
  font-size: clamp(1.125rem, 1.02rem + 0.5vw, 1.4375rem);
  font-weight: 500;
  line-height: 1.28;
  color: var(--ink);
}
.project__text { color: var(--ink-2); max-width: 66ch; line-height: 1.72; }
.project__funding {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 0.65rem 0.95rem;
  background: rgb(201 162 39 / 0.10);
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #6b5309;
  max-width: 60ch;
  line-height: 1.55;
}
.project__funding svg { width: 1.05em; height: 1.05em; flex: 0 0 auto; margin-top: 0.18em; color: var(--gold-deep); }

/* ============================================================
   NEWS
   ============================================================ */

.newsgrid { display: grid; gap: clamp(2rem, 1rem + 3vw, 3.5rem); }

.newsitem {
  display: grid;
  grid-template-columns: minmax(0, 18rem) minmax(0, 1fr);
  gap: clamp(1rem, 0.4rem + 2vw, 2.5rem);
  align-items: start;
  padding-top: clamp(1.5rem, 1rem + 1.6vw, 2.25rem);
  border-top: 1px solid var(--rule);
}
/* The lead story reads larger — not a grid of identical cards */
.newsitem--lead {
  grid-template-columns: minmax(0, 1fr);
  border-top: 0;
  padding-top: 0;
}
.newsitem--lead .newsitem__figure { aspect-ratio: 21 / 9; }
.newsitem--lead .newsitem__title { font-size: clamp(1.5rem, 1.1rem + 1.7vw, 2.375rem); }
.newsitem--lead .newsitem__excerpt { font-size: clamp(1rem, 0.96rem + 0.2vw, 1.125rem); max-width: 68ch; }

.newsitem__figure {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 4px;
  background: var(--bone-2);
  box-shadow: var(--lift);
}
.newsitem__figure img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out);
}
.newsitem:hover .newsitem__figure img { transform: scale(1.035); }

.newsitem__body { min-width: 0; display: grid; gap: 0.7rem; }

.newsitem__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.8rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.newsitem__meta time { font-variant-numeric: tabular-nums; }
.newsitem__cat { color: var(--gold-deep); }
.newsitem__meta .dot { color: var(--rule-text); }

.newsitem__title {
  font-family: var(--serif);
  font-size: clamp(1.125rem, 1.02rem + 0.55vw, 1.5rem);
  font-weight: 500;
  line-height: 1.26;
  letter-spacing: -0.014em;
}
.newsitem__title a {
  color: var(--ink);
  text-decoration: none;
  background-image: linear-gradient(var(--gold), var(--gold));
  background-size: 0% 1.5px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size 0.35s var(--ease-out), color 0.2s var(--ease-out);
}
.newsitem__title a:hover { color: var(--forest); background-size: 100% 1.5px; }

.newsitem__excerpt { color: var(--ink-2); font-size: 0.9688rem; line-height: 1.7; max-width: 66ch; }

@media (max-width: 720px) {
  .newsitem { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Photo cards (home page) ----------
   The photographs are the richest thing this site owns, so the home page
   leads with them rather than with another ruled list. On a phone the same
   markup becomes a swipeable strip: one card fills the screen, and the
   thumb does the work instead of a long vertical scroll. */

.cardgrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.25rem, 0.6rem + 2vw, 2.25rem);
}

.card {
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 0.85rem;
  align-content: start;
  text-decoration: none;
  color: inherit;
}

.card__figure {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 4px;
  background: var(--bone-2);
  box-shadow: var(--lift);
  transition: box-shadow 0.35s var(--ease-out), transform 0.35s var(--ease-out);
}
.card__figure img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out);
}
.card:hover .card__figure { transform: translateY(-3px); box-shadow: var(--lift-hi); }
.card:hover .card__figure img { transform: scale(1.04); }

.card__title {
  font-family: var(--serif);
  font-size: clamp(1.0625rem, 0.99rem + 0.35vw, 1.25rem);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.014em;
  color: var(--ink);
}
.card:hover .card__title { color: var(--forest); }
.card__title { transition: color 0.2s var(--ease-out); }

@media (max-width: 860px) {
  /* Swipeable strip. scroll-padding keeps the first card off the edge. */
  .cardgrid {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: minmax(15rem, 78%);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--gutter);
    padding-inline: var(--gutter);
    margin-inline: calc(var(--gutter) * -1);
    padding-bottom: 0.5rem;
    scrollbar-width: none;
  }
  .cardgrid::-webkit-scrollbar { height: 0; }
  .cardgrid > * { scroll-snap-align: start; }
}

/* ============================================================
   ARTICLE — the "magazine" layout from zoumman.com

   Transposed from the custom CSS on the live WordPress site so the
   static articles read exactly the same: white card on a tinted
   page, serif body, gold drop cap on the opening paragraph, green
   headings underlined by a hairline, rounded shadowed photographs,
   and an italic closing note ruled off from the body.
   ============================================================ */

.post {
  background: #f0f5fa;              /* the tint the live site puts behind the card */
  padding-block: clamp(1.5rem, 0.8rem + 2.4vw, 3rem) clamp(3rem, 1.5rem + 5vw, 6rem);
}

.post__card {
  /* One measure for the card and everything inside it. 680px of Georgia at
     18px is ~72 characters a line: the live site declares 760px but its own
     container renders narrower, and this matches what it actually looks like. */
  --measure: 680px;
  max-width: calc(var(--measure) + 2 * clamp(1.5rem, 0.6rem + 3.4vw, 3.5rem));
  margin-inline: auto;
  background: var(--paper);
  border-radius: 6px;
  box-shadow: var(--lift);
  padding: clamp(1.5rem, 0.6rem + 3.4vw, 3.5rem);
}

.post__head { margin-bottom: clamp(1.25rem, 0.9rem + 1.2vw, 1.75rem); }

.post__title {
  max-width: var(--measure);
  font-size: clamp(1.625rem, 1.15rem + 1.9vw, 2.375rem);   /* 38px at the top end */
  font-weight: 600;
  line-height: 1.22;
  color: var(--forest);
}

.post__meta {
  max-width: var(--measure);
  margin-top: 0.85rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--sage-dim);
}
.post__meta time { font-variant-numeric: tabular-nums; }

.post__content {
  max-width: var(--measure);
  /* Georgia first, exactly as the live site declares it, so the article
     renders identically there; self-hosted Fraunces is the fallback. */
  font-family: Georgia, "Fraunces", "Times New Roman", serif;
  font-size: 1.125rem;
  line-height: 1.85;
  color: #2a2e2b;
}

.post__content > * + * { margin-top: 1.5em; }

/* Opening paragraph: larger, green, with the gold drop cap */
.post__content > p:first-of-type {
  font-size: 1.3125rem;
  color: var(--forest);
}
.post__content > p:first-of-type::first-letter {
  float: left;
  font-family: "Fraunces", Georgia, serif;
  font-size: 74px;
  line-height: 0.8;
  font-weight: 600;
  color: var(--gold);
  padding: 6px 10px 0 0;
}

.post__content strong { color: var(--forest); font-weight: 700; }
.post__content em, .post__content i { color: #4b564f; font-style: italic; }

.post__content h2, .post__content h3 {
  font-family: "Fraunces", Georgia, serif;
  color: var(--forest);
  font-weight: 600;
  margin-top: 1.6em;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--bone-2);
}
.post__content h2 { font-size: clamp(1.375rem, 1.15rem + 0.9vw, 1.875rem); line-height: 1.3; }
.post__content h3 { font-size: clamp(1.1875rem, 1.05rem + 0.6vw, 1.5rem); line-height: 1.3; }

.post__content img {
  display: block;
  margin: 2em auto;
  max-width: min(100%, var(--iw, 100%));   /* never upscale a small original */
  height: auto;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgb(18 53 36 / 0.15);
}

.post__content blockquote {
  margin: 2em 0;
  padding: 6px 0 6px 28px;
  border-left: 3px solid var(--gold);
  font-family: "Fraunces", Georgia, serif;
  font-style: italic;
  font-size: 1.5rem;
  line-height: 1.5;
  color: var(--forest);
}

.post__content hr { border: none; border-top: 1px solid var(--bone-2); margin: 2.5em 0; }

.post__content ul.bullets { display: grid; gap: 0.6em; padding-left: 1.25rem; list-style: disc; }
.post__content ol.bullets { display: grid; gap: 0.6em; padding-left: 1.4rem; list-style: decimal; }
.post__content li::marker { color: var(--gold-deep); }

.post__content a {
  color: var(--green);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: color 0.2s var(--ease-out);
}
.post__content a:hover { color: var(--forest); }

/* Closing note: ruled off, italic, green.
   The live site uses `p:last-of-type`, which matches the last PARAGRAPH even
   when photographs follow it — so the closing treatment lands mid-article on
   several posts. `last-child` applies it only when the paragraph genuinely
   ends the piece, which is what the rule was written to do. */
.post__content > p:last-child {
  margin-top: 2.5em;
  padding-top: 1.2em;
  border-top: 2px solid var(--forest);
  font-style: italic;
  font-weight: 600;
  color: var(--forest);
}

.post__content .embed { margin: 2em auto; }

.post__foot {
  margin-top: clamp(2.25rem, 1.4rem + 3vw, 3.5rem);
  padding-top: 1.75rem;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  align-items: center;
  justify-content: space-between;
}

@media (max-width: 480px) {
  .post__content > p:first-of-type::first-letter { font-size: 58px; padding-right: 8px; }
  .post__foot { display: grid; }
  .post__foot .btn { width: 100%; }
}

/* ---------- Article (legacy heading styles, kept for the 404 page) ---------- */

.article__head { padding-block: clamp(2.5rem, 1.4rem + 4vw, 4.5rem) clamp(1.75rem, 1rem + 2.5vw, 3rem); }
.article__title {
  font-size: clamp(1.875rem, 1.15rem + 2.7vw, 3.25rem);
  max-width: 24ch;
  color: #fff;
}
.article__cover {
  width: 100%;
  max-width: min(100%, var(--iw, 100%));
  margin-inline: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: var(--lift-hi);
}
.article__coverwrap { margin-bottom: clamp(2rem, 1rem + 3vw, 3.5rem); }

.article__foot {
  margin-top: clamp(2.5rem, 1.5rem + 3.5vw, 4rem);
  padding-top: 1.75rem;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  align-items: center;
  justify-content: space-between;
}

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

.contactgrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(17rem, 100%), 1fr));
  gap: clamp(1.5rem, 0.8rem + 2.4vw, 3rem);
  border-top: 1px solid var(--rule);
  padding-top: clamp(1.75rem, 1rem + 2.4vw, 2.75rem);
}
.contactgrid > div { display: grid; gap: 0.45rem; align-content: start; }
.contactgrid dt {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.contactgrid dd { margin: 0; }
.contactgrid a, .contactgrid .plain {
  font-family: var(--serif);
  font-size: clamp(1.0625rem, 0.98rem + 0.35vw, 1.3125rem);
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1.5px solid var(--rule);
  padding-bottom: 2px;
  transition: border-color 0.2s var(--ease-out), color 0.2s var(--ease-out);
  overflow-wrap: break-word;
}
.contactgrid dd > a { display: inline-block; max-width: 100%; }
.contactgrid .plain { border-bottom: 0; }
.contactgrid a:hover { color: var(--forest); border-bottom-color: var(--gold); }

.sociallist { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; }
.sociallist a {
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-weight: 500;
  border-bottom-width: 1px;
}

/* ============================================================
   FOOTER — identical markup and metrics on every page
   ============================================================ */

.sitefoot {
  background: var(--forest);
  color: #fff;
  padding-block: clamp(3rem, 1.8rem + 3.6vw, 5rem) clamp(1.5rem, 1.2rem + 1vw, 2rem);
}

.sitefoot__top {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 1rem + 3.2vw, 4rem);
  padding-bottom: clamp(2.25rem, 1.4rem + 2.8vw, 3.5rem);
}
@media (max-width: 860px) {
  .sitefoot__top { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .sitefoot__brand { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .sitefoot__top { grid-template-columns: minmax(0, 1fr); }
}

.sitefoot__logo { height: 26px; width: auto; aspect-ratio: 300 / 80; }

.sitefoot__name {
  margin-top: 1.1rem;
  font-family: var(--serif);
  font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.625rem);
  color: #fff;
}
.sitefoot__bio {
  margin-top: 0.7rem;
  max-width: 42ch;
  color: var(--sage);
  font-size: 0.9375rem;
  line-height: 1.7;
}

.sitefoot__h {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.1rem;
}

.sitefoot__list { display: grid; gap: 0.6rem; }
.sitefoot__list a, .sitefoot__list .plain {
  font-size: 0.9375rem;
  color: var(--sage);
  text-decoration: none;
  transition: color 0.2s var(--ease-out);
  overflow-wrap: anywhere;
}
.sitefoot__list a:hover { color: var(--lime); }

.sitefoot__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.75rem;
  padding-top: clamp(1.25rem, 1rem + 1vw, 1.75rem);
  border-top: 1px solid var(--forest-rule);
}
.sitefoot__copy { font-size: 0.8125rem; color: var(--sage-dim); font-variant-numeric: tabular-nums; }

.sociallinks { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 1.1rem; }
.sociallinks a {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--sage);
  text-decoration: none;
  transition: color 0.2s var(--ease-out);
}
.sociallinks a:hover { color: var(--lime); }

.totop {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--sage);
  text-decoration: none;
  transition: color 0.2s var(--ease-out);
}
.totop svg { width: 0.9em; height: 0.9em; transition: transform 0.28s var(--ease-out); }
.totop:hover { color: var(--lime); }
.totop:hover svg { transform: translateY(-3px); }

/* ============================================================
   ENTRANCE — one authored moment, on the hero only.
   Elements rest visible; the animation only plays them in.
   ============================================================ */

@media (prefers-reduced-motion: no-preference) {
  .rise {
    animation: rise 0.95s var(--ease-out) backwards;
    animation-delay: calc(var(--i, 0) * 0.09s);
  }
  @keyframes rise {
    from { opacity: 0; transform: translate3d(0, 1.5rem, 0); filter: blur(7px); }
  }

  .hero__portrait {
    animation: portraitIn 1.35s var(--ease-out) 0.12s backwards;
  }
  @keyframes portraitIn {
    from {
      opacity: 0;
      transform: translate3d(0, 2.5rem, 0);
      -webkit-mask-image: linear-gradient(to top, transparent 0%, transparent 24%, #000 62%);
      mask-image: linear-gradient(to top, transparent 0%, transparent 24%, #000 62%);
    }
    to {
      -webkit-mask-image: linear-gradient(to top, #000 0%, #000 100%, #000 100%);
      mask-image: linear-gradient(to top, #000 0%, #000 100%, #000 100%);
    }
  }
}

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

@media print {
  .masthead, .drawer, .sitefoot__bottom .totop, .skip { display: none !important; }
  body { color: #000; background: #fff; }
  .hero, .banner, .section--forest, .sitefoot { background: #fff !important; color: #000 !important; }
  .hero__name, .banner__title, .sitefoot__name { color: #000 !important; }
  a { text-decoration: underline; }
}
