/* ==========================================================================
   ghassemi.xyz — site stylesheet
   Palette kept from the original site (red accent, warm grays); everything
   else rebuilt with modern CSS: custom properties, grid, fluid type.
   ========================================================================== */

:root {
  /* Palette */
  --accent: #f32853;
  --accent-hover: #f21040;
  --accent-soft: rgba(243, 40, 83, 0.08);
  --ink: #2b2b30;
  --text: #55555c;
  --muted: #8a8a92;
  --line: rgba(20, 20, 25, 0.08);
  --bg: #ffffff;
  --bg-alt: #f9f9f9;
  --news: #c1c7ea;
  --link: #0645ad;
  --link-visited: #551a8b;
  --link-hover: #0b0080;

  /* Type */
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-head: "Raleway", var(--font-body);
  --fs-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --fs-h1: clamp(2rem, 1.4rem + 2.4vw, 3rem);
  --fs-h2: clamp(1.375rem, 1.15rem + 0.9vw, 1.75rem);

  /* Layout */
  --content: 1040px;
  --block: 820px;
  --measure: 70ch;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section-y: clamp(3rem, 6vw, 5rem);
  --radius: 14px;
  --nav-h: 64px;
  --shadow-sm: 0 1px 2px rgba(20, 20, 25, 0.05), 0 6px 18px rgba(20, 20, 25, 0.06);
  --shadow-md: 0 10px 30px rgba(20, 20, 25, 0.12);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* --------------------------------------------------------------------------
   Reset & base
   -------------------------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 1rem);
}

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

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

a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: color 0.2s var(--ease);
}
a:visited { color: var(--link-visited); }
a:hover { color: var(--link-hover); text-decoration-thickness: 2px; }
a:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; border-radius: 3px; }

h1, h2, h3 {
  font-family: var(--font-head);
  color: var(--ink);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0;
}

p { margin: 0 0 1.25em; }
p:last-child { margin-bottom: 0; }

strong, b { color: var(--ink); font-weight: 600; }
em, i { font-style: italic; }

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  background: var(--ink);
  color: #fff;
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
  z-index: 100;
}
.skip-link:visited { color: #fff; }
.skip-link:focus { top: 1rem; }

/* --------------------------------------------------------------------------
   Header & navigation
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.86);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  max-width: var(--content);
  margin: 0 auto;
  padding: 0 var(--gutter);
  min-height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.brand:visited { color: var(--ink); }
.brand:hover { color: var(--accent); }

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 1.6vw, 1.5rem);
}

.site-nav a {
  position: relative;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  padding: 0.35rem 0;
  transition: color 0.2s var(--ease);
}
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--ease);
}
.site-nav a:visited { color: var(--muted); }
.site-nav a:hover { color: var(--ink); }
.site-nav a:hover::after { transform: scaleX(1); }
.site-nav a[aria-current="page"],
.site-nav a[aria-current="page"]:visited { color: var(--accent); }
.site-nav a[aria-current="page"]::after { transform: scaleX(1); }

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  margin-right: -0.5rem;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  border-radius: 10px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.25s var(--ease), opacity 0.2s var(--ease);
}
.nav-toggle:hover { background: var(--bg-alt); }
.nav-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

@media (max-width: 799px) {
  .nav-toggle { display: flex; }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem var(--gutter) 1rem;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), visibility 0s linear 0.2s;
  }
  .site-header.is-open .site-nav {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), visibility 0s;
  }
  .site-nav a {
    font-size: 0.9rem;
    padding: 0.85rem 0.25rem;
    border-bottom: 1px solid var(--line);
  }
  .site-nav a:last-child { border-bottom: 0; }
  .site-nav a::after { display: none; }
  .site-nav a[aria-current="page"] { color: var(--accent); }

  .site-header.is-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .site-header.is-open .nav-toggle span:nth-child(2) { opacity: 0; }
  .site-header.is-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* --------------------------------------------------------------------------
   Page structure
   -------------------------------------------------------------------------- */

.section {
  padding: var(--section-y) var(--gutter);
  border-top: 1px solid var(--line);
}
.section--alt { background: var(--bg-alt); }
.section--flush { border-top: 0; }

.section__inner {
  max-width: var(--content);
  margin: 0 auto;
}

.section__title {
  font-size: var(--fs-h2);
  text-align: center;
  margin-bottom: 0.5rem;
}
.section__title + .section__text,
.section__title + .trio { margin-top: 2rem; }

.section__refs {
  text-align: center;
  color: var(--muted);
  font-size: 0.92rem;
  max-width: var(--measure);
  margin: 0 auto 2.25rem;
  line-height: 1.9;
}
.section__refs a { white-space: nowrap; }

.section__text {
  max-width: var(--measure);
  margin: 2.25rem auto 0;
}
.section__text p { margin-bottom: 1.1em; }
.section__text p:last-child { margin-bottom: 0; }

/* Page title banner for sub-pages */
.page-head {
  padding: clamp(2.5rem, 6vw, 4.5rem) var(--gutter) clamp(1.5rem, 4vw, 3rem);
  text-align: center;
}
.page-head__title {
  font-size: var(--fs-h1);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.page-head__title::after {
  content: "";
  display: block;
  width: 2.5rem;
  height: 3px;
  background: var(--accent);
  border-radius: 3px;
  margin: 1rem auto 0;
}

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

.hero {
  padding: clamp(3rem, 7vw, 5.5rem) var(--gutter) var(--section-y);
  text-align: center;
}
.hero__inner {
  max-width: var(--content);
  margin: 0 auto;
}
.hero__photo {
  width: clamp(150px, 24vw, 220px);
  aspect-ratio: 1;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 1.75rem;
  filter: drop-shadow(0 8px 20px rgba(20, 20, 25, 0.12));
}
.hero__name {
  font-size: var(--fs-h1);
  font-weight: 600;
  letter-spacing: 0.01em;
}
.hero__links {
  margin: 0.9rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}
.hero__links a { margin: 0 0.15em; }
.hero__intro {
  max-width: var(--measure);
  margin: 2.25rem auto 0;
  text-align: left;
  font-size: 1.05em;
}

/* Wide call-to-action link row (e.g. on the Professional page) */
.section__logo {
  width: clamp(150px, 24vw, 220px);
  margin: 0 auto 1.5rem;
  transition: transform 0.3s var(--ease);
}
.section__logo:hover { transform: translateY(-3px); }

/* --------------------------------------------------------------------------
   News callout
   -------------------------------------------------------------------------- */

.news {
  max-width: var(--measure);
  margin: 0 auto;
  background: color-mix(in srgb, var(--news) 38%, white);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.5rem clamp(1.25rem, 3vw, 2rem);
  box-shadow: var(--shadow-sm);
}
@supports not (background: color-mix(in srgb, red, white)) {
  .news { background: #e9ebf7; }
}
.news__item + .news__item {
  margin-top: 1.1rem;
  padding-top: 1.1rem;
  border-top: 1px solid rgba(20, 20, 25, 0.08);
}
.news__title { color: var(--ink); font-weight: 600; }
.news__date { color: var(--muted); font-style: italic; }

/* --------------------------------------------------------------------------
   Trio: three circular images with captions
   -------------------------------------------------------------------------- */

.trio {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 3vw, 2.5rem);
  max-width: 760px;
  margin: 0 auto;
}
.trio + .trio { margin-top: clamp(1.5rem, 3vw, 2.5rem); }

.trio__item {
  margin: 0;
  text-align: center;
  position: relative;
}
.trio__item img {
  width: clamp(96px, 16vw, 160px);
  aspect-ratio: 1;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto;
  filter: drop-shadow(0 4px 12px rgba(20, 20, 25, 0.10));
  transition: transform 0.3s var(--ease), filter 0.3s var(--ease);
}
.trio__item a { display: inline-block; border-radius: 50%; }
.trio__item a:hover img,
.trio__item a:focus-visible img {
  transform: translateY(-4px);
  filter: drop-shadow(0 10px 22px rgba(20, 20, 25, 0.16));
}
.trio__item figcaption {
  margin-top: 0.85rem;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink);
  letter-spacing: 0.02em;
}

@media (max-width: 520px) {
  .trio { gap: 1rem 0.5rem; }
  .trio__item figcaption { font-size: 0.85rem; }
}

/* Hover note (the poem on the Hobbies row) */
.has-note { cursor: help; outline: none; }
.note {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 0.75rem);
  transform: translate(-50%, 6px);
  width: min(30rem, calc(100vw - 2rem));
  background: var(--ink);
  color: #f2f2f4;
  text-align: left;
  font-size: 0.9rem;
  line-height: 1.65;
  padding: 1rem 1.25rem;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  z-index: 20;
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0s linear 0.25s;
}
.note::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -7px;
  border: 7px solid transparent;
  border-top-color: var(--ink);
}
.has-note:hover .note,
.has-note:focus-within .note,
.has-note:focus .note {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0s;
}
@media (max-width: 640px) {
  .note {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    top: auto;
    width: auto;
    transform: translateY(8px);
  }
  .note::after { display: none; }
  .has-note:hover .note,
  .has-note:focus-within .note,
  .has-note:focus .note { transform: translateY(0); }
}

/* --------------------------------------------------------------------------
   Reading list
   -------------------------------------------------------------------------- */

.reading {
  max-width: var(--measure);
  margin: 2rem auto 0;
  padding: 0;
  list-style: none;
}
.reading li {
  padding: 1.1rem 0;
  border-top: 1px solid var(--line);
}
.reading li:first-child { border-top: 0; padding-top: 0; }
.reading__title { font-weight: 600; }
.reading__by { color: var(--muted); font-style: italic; }
.reading__note { margin: 0.25rem 0 0; }

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

.site-footer {
  border-top: 1px solid var(--line);
  padding: 2.5rem var(--gutter);
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}
.site-footer p { margin: 0; }

/* --------------------------------------------------------------------------
   Motion preferences
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* --------------------------------------------------------------------------
   Content blocks (2026 content refresh)
   -------------------------------------------------------------------------- */

.hero__role {
  margin: 0.75rem auto 0;
  max-width: none;
  color: var(--text);
  font-size: 1.02rem;
  line-height: 1.55;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: 0.2rem 0;
}
.hero__role-item { white-space: nowrap; }
.hero__sep {
  margin: 0 0.7rem;
  color: var(--muted);
  opacity: 0.6;
}
/* when the two roles wrap onto separate lines on small screens, hide the divider */
@media (max-width: 720px) {
  .hero__role { flex-direction: column; align-items: center; }
  .hero__sep { display: none; }
}
.hero__role strong { font-weight: 600; }

/* Stat strip */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  max-width: 760px;
  margin: 2.5rem auto 0;
  padding: 0;
  list-style: none;
}
.stats li {
  text-align: center;
  padding: 1rem 0.5rem;
  border-top: 2px solid var(--line);
}
.stats__num {
  display: block;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.6rem;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.stats__label {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-top: 0.15rem;
}

@media (max-width: 640px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
}

/* Lede paragraph under a section title */
.section__lede {
  max-width: var(--measure);
  margin: 1.5rem auto 0;
  font-size: 1.05em;
}

/* Three text cards (research pillars, services) */
.pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin: 2.25rem auto 0;
}
.pillar {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1.5rem 1.4rem;
  box-shadow: var(--shadow-sm);
}
.section--alt .pillar { background: #fff; }
.pillar__kicker {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}
.pillar h3 {
  font-size: 1.1rem;
  margin-bottom: 0.6rem;
}
.pillar p { font-size: 0.95rem; margin-bottom: 0.75em; }
.pillar p:last-child { margin-bottom: 0; }
.pillar__more { font-size: 0.9rem; white-space: nowrap; }

/* Entry list: title, meta line, description */
.entries {
  max-width: var(--measure);
  margin: 2rem auto 0;
  padding: 0;
  list-style: none;
}
.entries li {
  padding: 1.15rem 0;
  border-top: 1px solid var(--line);
}
.entries li:first-child { border-top: 0; padding-top: 0.25rem; }
.entry__title {
  display: block;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--ink);
  line-height: 1.35;
}
.entry__title a { color: var(--link); }
.entry__title a:visited { color: var(--link-visited); }
.entry__meta {
  display: block;
  color: var(--muted);
  font-size: 0.88rem;
  margin-top: 0.15rem;
}
.entry__desc { margin: 0.4rem 0 0; font-size: 0.97rem; }
.entry__links { margin: 0.5rem 0 0; font-size: 0.85rem; color: var(--muted); }
.entry__links--meta { margin-top: 0.3rem; }
.entry__meta + .entry__links--meta { margin-top: 0.2rem; }
.entry__links > * { white-space: nowrap; }
.entry__links > *:not(:last-child)::after {
  content: "\00b7";
  display: inline-block;
  margin: 0 0.35rem 0 0.55rem;
  color: var(--muted);
  text-decoration: none;
}

/* Compact list (talks, service, alumni) */
.compact {
  max-width: var(--measure);
  margin: 1.5rem auto 0;
  padding: 0;
  list-style: none;
  columns: 1;
}
.compact li {
  padding: 0.45rem 0;
  border-top: 1px solid var(--line);
  font-size: 0.97rem;
  break-inside: avoid;
}
.compact li:first-child { border-top: 0; }
.compact .when {
  color: var(--muted);
  font-size: 0.85rem;
  margin-left: 0.4rem;
  white-space: nowrap;
}
.compact--2col { columns: 2; column-gap: 2.5rem; }
@media (max-width: 640px) { .compact--2col { columns: 1; } }

/* Simple inline list of names / logos-in-text */
.inline-list {
  max-width: var(--measure);
  margin: 1.25rem auto 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.6rem;
}
.inline-list li {
  font-size: 0.85rem;
  color: var(--ink);
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.3rem 0.8rem;
}
.section--alt .inline-list li { background: #fff; }

/* Disclosure (poem) */
.disclosure {
  max-width: var(--measure);
  margin: 1.5rem auto 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 0 1.25rem;
}
.disclosure summary {
  cursor: pointer;
  padding: 0.9rem 0;
  font-family: var(--font-head);
  font-weight: 600;
  color: var(--ink);
  list-style: none;
}
.disclosure summary::-webkit-details-marker { display: none; }
.disclosure summary::before {
  content: "+";
  display: inline-block;
  width: 1.4rem;
  color: var(--accent);
  font-weight: 700;
}
.disclosure[open] summary::before { content: "–"; }
.disclosure .poem {
  max-width: 34rem;
  margin: 0.25rem auto 0;
  padding: 0.5rem 0 1.6rem;
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--ink);
  text-align: center;
}
.disclosure .poem p { margin: 0 0 1.35rem; }
.disclosure .poem p:last-child { margin-bottom: 0; }
.disclosure .poem p:last-child::after {
  content: "";
  display: block;
  width: 2rem;
  height: 2px;
  margin: 1.4rem auto 0;
  background: var(--accent);
  border-radius: 2px;
  opacity: 0.6;
}

/* Buttons */
.button {
  display: inline-block;
  padding: 0.7rem 1.3rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  transition: background 0.2s var(--ease), transform 0.2s var(--ease);
}
.button:visited { color: #fff; }
.button:hover { background: var(--accent-hover); color: #fff; transform: translateY(-1px); }
.button--ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
.button--ghost:visited { color: var(--ink); }
.button--ghost:hover { background: var(--bg-alt); color: var(--ink); }
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1.75rem;
}

/* Subheading inside a section */
.section__sub {
  max-width: var(--measure);
  margin: 2.5rem auto 0;
  font-size: 1.15rem;
  color: var(--ink);
}
.section__sub:first-of-type { margin-top: 2rem; }

/* Entries with a small greyed institution mark on the left */
.entries--logos > li {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 1.1rem;
  align-items: start;
}
.entry__logo {
  width: 52px;
  height: 52px;
  object-fit: contain;
  object-position: center top;
  filter: grayscale(1);
  opacity: 0.5;
  margin-top: 0.2rem;
  transition: filter 0.3s var(--ease), opacity 0.3s var(--ease);
}
.entries--logos > li:hover .entry__logo { filter: none; opacity: 1; }
.entry__sub {
  list-style: none;
  margin: 0.6rem 0 0;
  padding: 0;
}
.entry__sub li {
  padding: 0.55rem 0 0;
  border-top: 0;
}
.entry__sub li + li { padding-top: 1.1rem; }
.entry__sub .entry__title { font-size: 0.98rem; }
@media (max-width: 520px) {
  .entries--logos > li { grid-template-columns: 40px minmax(0, 1fr); gap: 0.85rem; }
  .entry__logo { width: 40px; height: 40px; }
}

/* Thesis line: sits between the degree and its description */
.entry__thesis {
  margin: 0.5rem 0 0;
  font-size: 0.95rem;
  line-height: 1.5;
}
.entry__thesis i { color: var(--ink); }
.entry__label {
  display: inline-block;
  margin-right: 0.35rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.entry__thesis + .entry__desc { margin-top: 0.35rem; }

/* Role / degree header: title left, dates right */
.entry__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem 1.25rem;
}
.entry__head .entry__title { flex: 1 1 auto; min-width: 0; }
.entry__when {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Nav submenu (hover / focus on desktop, inline list on phones)
   -------------------------------------------------------------------------- */

.site-nav__item { position: relative; }
.site-nav__item > a { display: inline-block; }

.submenu {
  list-style: none;
  margin: 0;
  padding: 0;
}
.submenu a {
  text-transform: none;
  letter-spacing: 0.01em;
  font-size: 0.88rem;
  font-weight: 500;
}
.submenu a::after { display: none; }

@media (min-width: 800px) {
  .submenu {
    position: absolute;
    top: calc(100% + 0.6rem);
    left: 50%;
    transform: translate(-50%, 6px);
    min-width: 13.5rem;
    padding: 0.4rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.18s var(--ease), transform 0.18s var(--ease), visibility 0s linear 0.18s;
    z-index: 60;
  }
  /* invisible bridge so the pointer can travel from the link to the menu */
  .submenu::before {
    content: "";
    position: absolute;
    left: 0; right: 0;
    top: -0.7rem;
    height: 0.7rem;
  }
  .has-menu:hover .submenu,
  .has-menu:focus-within .submenu {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
    transition: opacity 0.18s var(--ease), transform 0.18s var(--ease), visibility 0s;
  }
  .submenu li a {
    display: block;
    padding: 0.5rem 0.8rem;
    border-radius: 8px;
    color: var(--ink);
    white-space: nowrap;
  }
  .submenu li a:visited { color: var(--ink); }
  .submenu li a:hover,
  .submenu li a:focus-visible { background: var(--bg-alt); color: var(--accent); }
}

@media (max-width: 799px) {
  .site-nav__item { display: block; }
  .site-nav__item > a { display: block; }
  .submenu { padding: 0 0 0.6rem 1rem; }
  .submenu li a {
    display: block;
    padding: 0.45rem 0.25rem;
    border-bottom: 0;
    color: var(--text);
  }
  .submenu li a:visited { color: var(--text); }
}

/* --------------------------------------------------------------------------
   Impact: three themed stat cards under the hero
   -------------------------------------------------------------------------- */

#impact { padding-top: 0; }
#impact .section__inner { max-width: var(--block); }
.impact {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}
.impact__card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem 1.3rem;
  box-shadow: var(--shadow-sm);
  text-align: center;
}
.impact__caption {
  margin: 0.15rem 0 0;
  min-height: 3em;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}
.impact__stats {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
}
.impact__stats li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-top: 1px solid var(--line);
}
.impact__stats .stats__num { font-size: 1.2rem; }
.impact__stats .stats__label { font-size: 0.68rem; line-height: 1.3; margin-top: 0; text-align: right; }
.impact__card { text-align: left; }
.impact__card .pillar__kicker, .impact__caption { text-align: left; }



/* Disclosure placed inside an entry (e.g. the poem under the Ph.D.) */
.disclosure--inline {
  max-width: none;
  margin: 0.9rem 0 0;
  background: var(--bg);
}
.disclosure--inline summary { font-size: 0.95rem; }
.disclosure--inline .poem { max-width: 32rem; }

/* News items use the shared entry layout inside the callout card */
.news { max-width: var(--block); margin-top: 2rem; }
.entries--news .entry__title { font-size: 1.02rem; }
.entries--news { margin-top: 0; }
.entries--news li { border-top-color: rgba(20, 20, 25, 0.1); }
.entries--news li:first-child { padding-top: 0; }
.entries--news li:last-child { padding-bottom: 0.25rem; }
.entries--news .entry__desc { margin-top: 0.3rem; }

/* --------------------------------------------------------------------------
   Split hero: photo left, text right. The photo takes the height of the
   text block beside it; on small screens it stacks and centers.
   -------------------------------------------------------------------------- */

.hero--split { padding-bottom: clamp(2rem, 4vw, 3rem); }
.hero--split .hero__inner {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 2rem;
  width: 100%;
  max-width: var(--block);
  margin: 0 auto;
  text-align: left;
}
.hero--split .hero__photo {
  flex: 0 0 auto;
  width: 200px;
  height: 200px;
  aspect-ratio: 1 / 1;
  margin: 0;
}
/* Fixed text width on desktop so the block's height depends only on its words,
   which lets the portrait match that height exactly. Shrinks only when it must. */
.hero--split .hero__body { flex: 0 0 540px; min-width: 0; }
.hero--split .hero__name { font-size: clamp(1.9rem, 1.3rem + 2.2vw, 2.7rem); }
.hero--split .hero__role {
  flex-direction: column;
  align-items: flex-start;
  margin-top: 0.5rem;
  font-size: 0.92rem;
}
.hero--split .hero__sep { display: none; }
.hero--split .hero__links { margin-top: 0.6rem; }
.hero--split .hero__intro { margin: 1.25rem 0 0; max-width: none; font-size: 1.02em; }

@media (max-width: 899px) {
  .hero--split .hero__inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .hero--split .hero__photo { width: clamp(150px, 45vw, 200px); height: auto; align-self: center; }
  .hero--split .hero__body { flex: 0 1 auto; width: 100%; }
  .hero--split .hero__role { align-items: center; }
  .hero--split .hero__role-item { white-space: normal; text-align: center; }
  .hero--split .hero__intro { text-align: left; }
}

.section__note {
  max-width: var(--measure);
  margin: 1.5rem auto 0;
  color: var(--muted);
  font-size: 0.92rem;
}

/* --------------------------------------------------------------------------
   Left-aligned sections: one shared left edge for headings and content.
   The page banner (.page-head) stays centered as the masthead.
   -------------------------------------------------------------------------- */

.section__inner { max-width: var(--block); }

.section__title {
  text-align: left;
}
.section__title::before {
  content: "";
  display: block;
  width: 2rem;
  height: 3px;
  background: var(--accent);
  border-radius: 3px;
  margin-bottom: 0.7rem;
}

.section__lede,
.section__text,
.section__note,
.reading,
.compact,
.inline-list,
.entries,
.disclosure,
.news {
  margin-left: 0;
  margin-right: 0;
}
.section__refs { text-align: left; margin-left: 0; margin-right: 0; }
.section__sub { margin-left: 0; margin-right: 0; }
.actions { justify-content: flex-start; }
.hero--split .hero__inner { margin-left: auto; margin-right: auto; }

/* Nested entry lists under a cluster heading (e.g. In the Media) */
.entries--nested {
  margin-top: 1rem;
  margin-left: 0.4rem;
  padding-left: 1.5rem;
  border-left: 2px solid var(--line);
}
.entries--nested li:first-child { padding-top: 0; }
.entries--nested + .section__sub { margin-top: 2.75rem; }
@media (max-width: 520px) {
  .entries--nested { margin-left: 0.15rem; padding-left: 1rem; }
}

/* Collapsible paper clusters on the Research page */
.cluster {
  max-width: var(--measure);
  margin: 1.1rem 0 0;
  border-top: 1px solid var(--line);
  padding-top: 1.1rem;
}
.section__text + .cluster,
.section__title + .cluster { margin-top: 2rem; border-top: 0; padding-top: 0; }
.cluster > summary {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  cursor: pointer;
  list-style: none;
  max-width: none;
  margin: 0;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.15rem;
  line-height: 1.4;
  color: var(--ink);
}
.cluster > summary::-webkit-details-marker { display: none; }
.cluster > summary::before {
  content: "+";
  flex: 0 0 1.4rem;
  color: var(--accent);
  font-weight: 700;
}
.cluster[open] > summary::before { content: "–"; }
.cluster__title { flex: 1 1 auto; min-width: 0; transition: color 0.2s var(--ease); }
.cluster > summary:hover .cluster__title { color: var(--accent-hover); }
.cluster__count {
  flex: 0 0 auto;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.85rem;
  color: var(--muted);
  white-space: nowrap;
}
.cluster > .entries--nested { margin: 1rem 0 0.75rem 0.5rem; padding-left: 1.6rem; }
@media (max-width: 520px) {
  .cluster > summary { gap: 0.6rem; font-size: 1.05rem; }
  .cluster > .entries--nested { margin-left: 0.3rem; padding-left: 1rem; }
}

/* Greyed logo banners (Collaborators and Support) */
.logo-banner__label {
  margin: 2rem 0 0;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.section__title + .logo-banner__label,
.section__lede + .logo-banner__label { margin-top: 1.5rem; }
.logo-banner {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem 1.75rem;
}
.logo-banner li { display: flex; align-items: center; }
.logo-banner img {
  display: block;
  height: 44px;
  width: auto;
  max-width: 150px;
  object-fit: contain;
  filter: grayscale(1);
  opacity: 0.55;
  transition: filter 0.3s var(--ease), opacity 0.3s var(--ease);
}
.logo-banner li:hover img { filter: none; opacity: 1; }
@media (max-width: 520px) {
  .logo-banner { gap: 1rem 1.5rem; }
  .logo-banner img { height: 34px; max-width: 130px; }
}

/* Collapsed people box (Alumni) */
.entries + .cluster--people { margin-top: 2.5rem; border-top: 0; padding-top: 0; }
.cluster--people > summary { font-size: 1.15rem; }
