:root {
  --ink: #0b0b0c;
  --paper: #fbfbfa;
  --panel: #ffffff;
  --muted: #6c6e72;
  --faint: #8c8f93;
  --line: rgba(11, 11, 12, 0.11);
  --line-strong: rgba(11, 11, 12, 0.22);
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --radius: 4px;
  --max: 1060px;
  --gutter: clamp(20px, 5vw, 48px);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
h4,
p,
dl,
dd,
figure {
  margin: 0;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

img {
  max-width: 100%;
}

/* ---------- brand watermark + intro ---------- */

.intro-logo {
  position: fixed;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  background: var(--paper) url("../img/wordmark-stacked.png") center 44% / min(74vw, 620px) auto no-repeat;
  opacity: 0;
  visibility: hidden;
  transition: opacity 800ms ease, visibility 0s linear 800ms;
}

body.intro-pending .intro-logo {
  opacity: 1;
  visibility: visible;
  transition: opacity 800ms ease;
}

.site-header,
main,
.site-footer {
  position: relative;
  z-index: 1;
}

.site-header,
main,
.site-footer {
  transition: transform 760ms ease, opacity 760ms ease;
}

.js body.intro-pending .site-header,
.js body.intro-pending main,
.js body.intro-pending .site-footer {
  transform: translateY(14px);
  opacity: 0;
  pointer-events: none;
}

.skip-link {
  position: absolute;
  top: -60px;
  left: var(--gutter);
  z-index: 40;
  padding: 10px 16px;
  border-radius: var(--radius);
  background: var(--ink);
  color: white;
  font-size: 14px;
  font-weight: 600;
}

.skip-link:focus {
  top: 12px;
}

/* ---------- shell ---------- */

.site-header,
.hero,
.section,
.site-footer {
  width: min(var(--max), 100% - var(--gutter) * 2);
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 78px;
  border-bottom: 1px solid var(--line);
  background: rgba(251, 251, 250, 0.82);
  backdrop-filter: blur(14px);
}

.brand {
  display: block;
  flex-shrink: 0;
  width: 116px;
}

.brand img {
  display: block;
  width: 100%;
  height: auto;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.nav {
  display: flex;
  gap: 22px;
}

.nav a {
  padding: 4px 0;
  border-bottom: 1px solid transparent;
  color: #3a3c40;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: color 160ms ease, border-color 160ms ease;
}

.nav a:hover,
.nav a:focus-visible {
  border-bottom-color: var(--ink);
  color: var(--ink);
  outline: none;
}

.lang-toggle {
  display: flex;
  flex-shrink: 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
}

.lang-btn {
  padding: 6px 11px;
  border: 0;
  background: transparent;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease;
}

.lang-btn + .lang-btn {
  border-left: 1px solid var(--line);
}

.lang-btn:hover {
  color: var(--ink);
}

.lang-btn[aria-pressed="true"] {
  background: var(--ink);
  color: #fff;
}

/* ---------- typography ---------- */

.eyebrow {
  margin-bottom: 20px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1 {
  max-width: 19ch;
  font-size: clamp(38px, 6vw, 62px);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

h2 {
  max-width: 22ch;
  font-size: clamp(26px, 3.4vw, 36px);
  font-weight: 600;
  line-height: 1.16;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h3 {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

h4 {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.lead {
  max-width: 52ch;
  margin-top: 26px;
  color: #34363a;
  font-size: clamp(17px, 1.7vw, 19px);
  line-height: 1.62;
}

/* ---------- buttons ---------- */

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 38px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.button-primary {
  background: var(--ink);
  color: #fff;
}

.button-primary:hover,
.button-primary:focus-visible {
  transform: translateY(-2px);
  outline: none;
}

.button-ghost {
  border-color: var(--line-strong);
  background: transparent;
}

.button-ghost:hover,
.button-ghost:focus-visible {
  border-color: var(--ink);
  outline: none;
}

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

.hero {
  display: flex;
  align-items: center;
  min-height: min(78svh, 640px);
  padding: 80px 0 96px;
}

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

.section {
  padding: 92px 0;
  border-top: 1px solid var(--line);
}

.section-head {
  max-width: 640px;
  margin-bottom: 56px;
}

.section-note {
  max-width: 56ch;
  margin-top: 20px;
  color: var(--muted);
}

/* ---------- about ---------- */

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

.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.card {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  transition: border-color 200ms ease, transform 200ms ease;
}

.card:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
}

.index {
  display: block;
  margin-bottom: 34px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.card h3 {
  margin-bottom: 10px;
}

.card p {
  max-width: 40ch;
  color: var(--muted);
  font-size: 15px;
}

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

.avatar {
  display: grid;
  place-items: center;
  width: 100%;
  max-width: 320px;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--panel);
  color: var(--faint);
  font-family: var(--mono);
  font-size: 34px;
  font-weight: 500;
  letter-spacing: 0.06em;
}

.avatar.has-photo {
  overflow: hidden;
}

.avatar img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.person {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: flex-start;
}

.person-body {
  min-width: 0;
}

.person h4 {
  margin-bottom: 6px;
}

.role {
  color: var(--muted);
  font-size: 14px;
}

.focus {
  margin-top: 10px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.6;
  letter-spacing: 0.02em;
}

.group-label {
  margin: 0 0 22px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.group-label + .people-grid {
  margin-top: 0;
}

.people-grid + .group-label {
  margin-top: 52px;
}

.people-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 54px 40px;
  margin-top: 46px;
}

.bio {
  margin-top: 16px;
}

.bio summary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  list-style: none;
}

.bio summary::-webkit-details-marker {
  display: none;
}

.bio summary::before {
  content: "+";
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  font-size: 11px;
  line-height: 1;
}

.bio[open] summary::before {
  content: "−";
}

.bio summary:hover,
.bio summary:focus-visible {
  color: #000;
  outline: none;
}

.bio p {
  max-width: 62ch;
  margin-top: 14px;
  color: var(--muted);
  font-size: 15px;
}

.bio p + p {
  margin-top: 12px;
}

.people-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 56px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 15px;
}

.people-cta a {
  border-bottom: 1px solid var(--line-strong);
  color: var(--ink);
  font-weight: 500;
}

.people-cta a:hover {
  border-bottom-color: var(--ink);
}

/* ---------- news ---------- */

.news {
  border-top: 1px solid var(--line);
}

.news a {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 24px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  transition: padding-left 200ms ease;
}

.news a:hover,
.news a:focus-visible {
  padding-left: 8px;
  outline: none;
}

.news time {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.news span {
  max-width: 62ch;
  font-size: 16px;
  font-weight: 500;
}

/* ---------- contact ---------- */

.contact .button {
  margin-top: 34px;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  justify-content: space-between;
  padding: 30px 0 44px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 13px;
}

/* ---------- reveal ---------- */

.js [data-reveal] {
  transform: translateY(12px);
  opacity: 0;
  transition: transform 640ms ease, opacity 640ms ease;
}

.js [data-reveal].is-visible {
  transform: none;
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] {
    transform: none;
    opacity: 1;
  }
}

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

@media (max-width: 900px) {
  .people-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 46px 32px;
  }
}

@media (max-width: 720px) {
  .site-header {
    height: auto;
    flex-wrap: wrap;
    padding: 14px 0 0;
    gap: 12px;
  }

  .header-right {
    order: 2;
    width: 100%;
    justify-content: space-between;
    padding-bottom: 12px;
  }

  .nav {
    gap: 16px;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .nav::-webkit-scrollbar {
    display: none;
  }

  .nav a {
    font-size: 13px;
  }

  .hero {
    min-height: auto;
    padding: 64px 0 76px;
  }

  .section {
    padding: 68px 0;
  }

  .section-head {
    margin-bottom: 40px;
  }

  .cards,
  .people-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .people-grid {
    gap: 44px;
  }

  .avatar {
    max-width: 260px;
    font-size: 30px;
  }

  .news a {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .button {
    width: 100%;
  }

  .people-cta a {
    width: auto;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    transition-duration: 1ms !important;
  }
}
