/* Meet the Experts — standalone one-sheet. No external assets. */

@font-face {
  font-family: "Source Serif 4";
  src: url("../fonts/source-serif-4.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("../fonts/source-serif-4-italic.woff2") format("woff2");
  font-weight: 400 700;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  interpolate-size: allow-keywords;

  --ink: #14213a;
  --ink-2: #22314f;
  --paper: #f7f3ea;
  --card: #fffdf8;
  --text: #1d2230;
  --muted: #5b6070;
  --rule: #e3dccb;
  --oxblood: #7d2230;
  --brass: #b48a4a;
  --brass-soft: #e9dcc2;

  --serif: "Source Serif 4", ui-serif, Georgia, serif;
  --sans: "Inter", ui-sans-serif, system-ui, sans-serif;

  --gutter: 1rem;
  --bar-h: 4rem;
  --panel-h: min(70dvh, 100dvh - var(--bar-h) - 4rem);
  --cols: 1;
}
@media (min-width: 48rem) {
  :root {
    --gutter: 2rem;
    --bar-h: 4.5rem;
    --panel-h: min(26rem, 100dvh - var(--bar-h) - 4rem);
  }
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--bar-h) + 1.5rem);
}
/* Open panel overlays the page; land targets below it. */
html:has(.nav[open]) {
  scroll-padding-top: calc(var(--bar-h) + var(--panel-h) + 1.5rem);
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font: 400 1.0625rem/1.65 var(--serif);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul { margin: 0; padding: 0; list-style: none; }

/* ---------- Sticky header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 0 var(--rule), 0 8px 24px rgb(20 33 58 / 0.08);
}

.bar {
  height: var(--bar-h);
  max-width: 76rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.wordmark {
  font: 600 1.25rem/1 var(--serif);
  letter-spacing: 0.01em;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.wordmark {
  display: inline-flex;
  align-items: center;
}
.wordmark::before {
  content: "";
  width: 1.5rem;
  aspect-ratio: 91.8 / 107;
  margin-right: 0.625rem;
  background: url("../img/oxf-shield.svg") center / contain no-repeat;
}

.nav summary {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.375rem 0.875rem 0.375rem 0.375rem;
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 999px;
  font: 600 0.875rem/1 var(--sans);
  color: #fff;
  cursor: pointer;
  list-style: none;
  user-select: none;
  white-space: nowrap;
  transition: background-color 0.2s, border-color 0.2s;
}
.nav summary::-webkit-details-marker { display: none; }
.nav summary::after {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  rotate: 45deg;
  translate: 0 -0.15rem;
  flex: none;
  transition: rotate 0.2s, translate 0.2s;
}
.nav summary:hover { background: var(--ink-2); border-color: var(--ink-2); }
.nav summary:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }
.nav[open] summary { background: var(--ink-2); border-color: var(--brass); }
.nav[open] summary::after { rotate: 225deg; translate: 0 0.15rem; }

.stack { display: flex; }
.stack img {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: 2px solid var(--ink);
  object-fit: cover;
}
.stack img + img { margin-left: -0.625rem; }

@media (max-width: 30rem) {
  .wordmark { font-size: 1.0625rem; }
  .wordmark::before { width: 1.25rem; margin-right: 0.5rem; }
  .nav summary { gap: 0.5rem; padding-right: 0.75rem; }
  .stack img:nth-child(n + 3) { display: none; }
  .nav-toggle-text .long { display: none; }
}

/* Dropdown panel: overlays content, sized to the viewport. */
.panel {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: var(--panel-h);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--card);
  color: var(--text);
  border-bottom: 1px solid var(--rule);
  box-shadow: 0 24px 48px rgb(20 33 58 / 0.22);
  padding: 1.25rem max(var(--gutter), (100% - 76rem) / 2 + var(--gutter)) 1.5rem;
  container-type: inline-size;
  transition: opacity 0.2s, translate 0.2s;
}
@starting-style {
  .nav[open] .panel { opacity: 0; translate: 0 -0.5rem; }
}

.nav-label {
  margin: 0 0 0.5rem;
  font: 600 0.6875rem/1 var(--sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--oxblood);
}
.people + .nav-label { margin-top: 1.25rem; }

.people {
  --gap: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap);
}
.people li {
  flex: 0 0 calc((100% - (var(--cols) - 1) * var(--gap)) / var(--cols));
  min-width: 0;
}
@container (min-width: 28rem) { .people { --cols: 2; } }
@container (min-width: 46rem) { .people { --cols: 3; } }
@container (min-width: 62rem) { .people { --cols: 4; } }

.people a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem;
  border-radius: 0.75rem;
  color: inherit;
  text-decoration: none;
  transition: background-color 0.15s;
}
.people a:hover { background: var(--paper); }
.people a:focus-visible { outline: 2px solid var(--brass); outline-offset: -2px; }
.people img {
  flex: none;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 2px var(--card), 0 0 0 3px var(--brass-soft);
}
.people a:hover img { box-shadow: 0 0 0 2px var(--card), 0 0 0 3px var(--brass); }
.people span { display: grid; min-width: 0; }
.people strong {
  font: 600 0.9375rem/1.25 var(--sans);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.people small {
  font: 400 0.8125rem/1.3 var(--sans);
  color: var(--muted);
}

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

main {
  max-width: 76rem;
  margin-inline: auto;
  padding: 0 var(--gutter) 4rem;
}

.intro {
  padding: clamp(3rem, 8vw, 6rem) 0 clamp(2rem, 5vw, 3.5rem);
  border-bottom: 1px solid var(--rule);
}
.intro h1 {
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.lede {
  margin-top: 1.25rem;
  max-width: 40rem;
  font-size: clamp(1.125rem, 2vw, 1.3125rem);
  color: var(--muted);
}

.group { padding-top: clamp(2.5rem, 6vw, 4rem); }
.group > h2 {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  font: 600 0.8125rem/1 var(--sans);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
}
.group > h2::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--rule);
}

.profiles { display: grid; gap: 1.25rem; }

.profile {
  display: grid;
  gap: 1.25rem 2.5rem;
  padding: clamp(1.25rem, 4vw, 2.5rem);
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 1.25rem;
  transition: border-color 0.4s, box-shadow 0.4s;
}
.profile:focus { outline: none; }
.profile:target {
  border-color: var(--brass);
  box-shadow: 0 0 0 3px var(--brass-soft);
}
@media (min-width: 48rem) {
  .profile { grid-template-columns: 11rem 1fr; }
}

.profile-photo {
  width: 7rem;
  height: 7rem;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 4px var(--card), 0 0 0 5px var(--brass);
}
@media (min-width: 48rem) {
  .profile-photo { width: 11rem; height: 11rem; }
}

.profile-body { max-width: 44rem; }
.profile-body h3 {
  font-size: clamp(1.75rem, 3.5vw, 2.25rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.role {
  margin: 0.5rem 0 1.25rem;
  font: 600 0.8125rem/1.3 var(--sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--oxblood);
}
.profile-body > p:not(.role) + p:not(.role) { margin-top: 0.9em; }
.profile-body h4 {
  margin: 1.75rem 0 0.75rem;
  font: 600 0.6875rem/1 var(--sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.pubs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.pubs li {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.375rem 0.875rem 0.375rem 0.375rem;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 999px;
  font: 500 0.875rem/1.2 var(--sans);
}
.pubs img {
  width: 2.25rem;
  height: 2.25rem;
  object-fit: contain;
}
