:root {
  --ink: #11161c;
  --paper: #fcfcfa;
  --paper-alt: #f4f4ef;
  --rule: #dddcd4;
  --muted: #5a6470;
  --link: #1f52c4;
  --flip: #c1443f;
  --logo-red: #FF535B;

  --sans: "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  --serif: "IBM Plex Serif", Georgia, serif;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.65;
}

a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }

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

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 10;
  background: var(--paper);
  padding: .5rem .75rem;
  border: 1px solid var(--ink);
}

.wrap {
  width: min(72rem, 100% - 3rem);
  margin-inline: auto;
}

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

.top {
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
}

.top-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  align-items: baseline;
  justify-content: space-between;
  padding: 1.1rem 0;
}

.brand { text-decoration: none; color: inherit; display: flex; align-items: center; }

.brand-mark { display: block; }

.top nav {
  font-family: var(--sans);
  font-size: .95rem;
  display: flex;
  gap: 1.5rem;
}

.top nav a { color: var(--ink); text-decoration: none; }
.top nav a:hover { text-decoration: underline; text-underline-offset: 4px; }

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

.hero { padding: 5rem 0 4.5rem; }

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 4rem;
  align-items: center;
}

h1 {
  font-family: var(--sans);
  font-weight: 600;
  font-size: clamp(2rem, 4.4vw, 3.1rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
  margin: 0 0 1.4rem;
  max-width: 26ch;
}

.lede {
  font-size: 1.2rem;
  line-height: 1.6;
  max-width: 46ch;
  margin: 0 0 1.3rem;
}

.affil {
  font-family: var(--sans);
  font-size: .95rem;
  color: var(--muted);
  max-width: 44ch;
  margin: 0;
}

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

/* ---------- research diagram motif ---------- */

.motif { margin: 0; }

.motif-diagram {
  display: block;
  width: 100%;
  max-width: 26rem;
  height: auto;
}

.motif figcaption {
  font-family: var(--sans);
  font-size: .875rem;
  line-height: 1.5;
  color: var(--muted);
  max-width: 26rem;
  margin-top: 1rem;
  padding-top: .9rem;
  border-top: 1px solid var(--rule);
}

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

.band {
  padding: 4rem 0;
  border-top: 1px solid var(--rule);
}

.band.alt { background: var(--paper-alt); }

h2 {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1.55rem;
  letter-spacing: -0.015em;
  margin: 0 0 2rem;
}

h3 {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 1rem;
  color: var(--muted);
  margin: 2.4rem 0 .9rem;
}

h3:first-of-type { margin-top: 0; }

.section-note {
  font-family: var(--sans);
  font-size: .95rem;
  color: var(--muted);
  margin: -1.2rem 0 2rem;
}

/* ---------- research ---------- */

.topics {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.topic {
  padding: 1.5rem 1.6rem;
  background: var(--paper-alt);
  border: 1px solid var(--rule);
}

.topic h3 {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--ink);
  margin: 0 0 .5rem;
}

.topic p {
  margin: 0;
  max-width: 44ch;
  color: #252c35;
}

/* ---------- people ---------- */

.people {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: .9rem 2.5rem;
}

.people li {
  display: flex;
  align-items: center;
  gap: .9rem;
  padding-bottom: .8rem;
  border-bottom: 1px solid var(--rule);
}

.person-photo {
  width: 6.5rem;
  height: 6.5rem;
  object-fit: cover;
  border: 1px solid var(--rule);
  flex-shrink: 0;
}

.person-info {
  display: flex;
  flex-direction: column;
}

.name {
  font-family: var(--sans);
  font-weight: 500;
}

.role {
  font-size: .95rem;
  color: var(--muted);
}

/* ---------- publications ---------- */

.pubs {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 1.6rem;
  max-width: 56rem;
  counter-reset: none;
}

.pubs li {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  padding-left: 1.1rem;
  border-left: 2px solid var(--rule);
}

.pub-title {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 1.05rem;
}

.pub-authors { color: #252c35; }

.pub-venue {
  font-family: var(--sans);
  font-size: .9rem;
  color: var(--muted);
}

.pubs-error {
  font-family: var(--sans);
  font-size: .95rem;
  color: var(--muted);
  border-left-color: var(--flip);
}

.pubs-more {
  display: block;
  margin: 1.6rem 0 0;
  padding: 0;
  border: none;
  background: none;
  font-family: var(--sans);
  font-size: .9rem;
  color: var(--link);
  cursor: pointer;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.pubs-more:hover { text-decoration-thickness: 2px; }

/* ---------- grants ---------- */

.grants {
  margin: 0;
  padding: 0;
  list-style: none;
  max-width: 56rem;
}

.grants li {
  display: flex;
  flex-direction: column;
  gap: .2rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--rule);
}

.grants li:first-child { padding-top: 0; }

.grant-title {
  font-family: var(--sans);
  font-weight: 500;
}

.grant-meta {
  font-size: .95rem;
  color: var(--muted);
}

/* ---------- join ---------- */

.join-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 3.5rem;
  align-items: start;
}

.join-inner p { max-width: 50ch; }

.contact-line {
  font-family: var(--sans);
  font-size: 1.05rem;
  margin: 0 0 .9rem;
}

address {
  font-family: var(--sans);
  font-style: normal;
  font-size: .95rem;
  line-height: 1.8;
  color: var(--muted);
}

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

.foot {
  border-top: 1px solid var(--rule);
  padding: 2rem 0 3rem;
  font-family: var(--sans);
  font-size: .9rem;
  color: var(--muted);
}

.foot-inner {
  display: flex;
  align-items: center;
  gap: .8rem;
}

.foot-mark { flex-shrink: 0; }

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

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

@media (max-width: 60rem) {
  .hero-inner,
  .join-inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .hero { padding: 3.5rem 0 3rem; }
}

@media (max-width: 34rem) {
  .wrap { width: min(72rem, 100% - 2rem); }
  .top-inner { flex-direction: column; align-items: flex-start; gap: .8rem; }
  .top nav { gap: 1.1rem; flex-wrap: wrap; }
  .topics { grid-template-columns: 1fr; }
}
