/* Fonts */
@font-face {
  font-family: et-book;
  src: url('./assets/fonts/et-book-roman.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: laude-mono;
  src: url('./assets/fonts/laude-aptos-mono.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Base */
:root {
  color-scheme: light;
  --ink: #111;
  --muted: #666;
  --line: #dedede;
  --serif: et-book, Palatino, 'Palatino Linotype', 'Palatino LT STD', 'Book Antiqua', Georgia, serif;
  --sans: Arial, Helvetica, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-padding-top: 28px;
}

body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: var(--serif);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}

a:hover {
  text-decoration-color: #999;
}

a:focus-visible, button:focus-visible, .mobile-menu summary:focus-visible {
  outline: 2px solid #111;
  outline-offset: 5px;
}

.shell {
  width: min(100% - 96px, 1280px);
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 20px;
  padding: 12px;
  background: #fff;
  z-index: 2;
}

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

h2 {
  margin: 0;
  font-size: 38px;
  font-weight: 400;
  letter-spacing: -0.02em;
}

/* Header and navigation */
.site-header {
  width: 100%;
  min-height: 104px;
  display: flex;
  align-items: center;
  background: #fff;
  color: #000;
}

.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  font: 14px var(--sans);
}

.nav-separator {
  color: #777;
}

.header-nav a {
  display: inline-flex;
  flex: none;
  align-items: center;
  min-height: 44px;
  margin: 0;
  padding: 0;
  white-space: nowrap;
}

.mobile-menu {
  display: none;
  font: 14px var(--sans);
}

.mobile-menu summary {
  display: flex;
  align-items: center;
  min-height: 44px;
  cursor: pointer;
  list-style: none;
  text-decoration: underline;
  text-underline-offset: 5px;
}

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

.mobile-menu nav {
  position: absolute;
  z-index: 3;
  right: 0;
  top: 100%;
  min-width: 160px;
  padding: 12px 20px;
  background: #fff;
  border: 1px solid var(--line);
}

.mobile-menu nav a {
  display: flex;
  align-items: center;
  min-height: 44px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  white-space: nowrap;
  font: 400 31px/1 var(--serif);
}

.brand-project {
  color: #777;
}

/* Align the visible mark: the 112px logo asset has 4px of left whitespace. */
.brand img {
  display: block;
  width: 64px;
  height: 64px;
  transform: translateX(-3.5714286%);
}

/* Hero video */
.hero {
  background: #000;
  color: #fff;
  padding-bottom: 40px;
}

.hero-intro {
  padding: 40px 0 30px;
}

h1 {
  margin: 0;
  font-size: clamp(39px, 4.5vw, 64px);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -0.025em;
}

.hero-film {
  margin: 0;
}

.film-annotations {
  padding-top: 10px;
  color: #ccc;
  font: 12px/1.5 var(--sans);
  text-align: right;
}

.video-frame {
  position: relative;
  background: #000;
  aspect-ratio: 14 / 5;
  overflow: hidden;
  border-radius: 3px;
}

video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.video-toggle {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
}

.video-toggle:focus-visible {
  outline: 2px solid #fff;
  outline-offset: -5px;
}

.playback-icon {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid #ffffff70;
  border-radius: 50%;
  background: #0008;
}

.playback-icon svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.video-toggle .pause-icon, .video-toggle[data-playing="true"] .play-icon {
  display: none;
}

.video-toggle[data-playing="true"] .pause-icon {
  display: block;
}

@media (hover: hover) {
  .video-toggle[data-playing="true"] .playback-icon {
    opacity: 0;
  }
  .video-toggle:hover .playback-icon, .video-toggle:focus-visible .playback-icon {
    opacity: 1;
  }
}

.video-toggle[hidden] {
  display: none;
}

/* Research panels */
.how-it-works, .performance {
  padding: 64px 0;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

#whats-next {
  border-bottom-color: #555;
}

.how-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(28px, 5vw, 72px);
}

.how-copy h2, .performance h2 {
  font-size: clamp(32px, 3.2vw, 46px);
  line-height: 1.1;
}

.how-copy p {
  margin: 22px 0 0;
  max-width: 34rem;
  font-size: clamp(20px, 2vw, 25px);
  line-height: 1.5;
}

.how-copy sub {
  font-size: 0.65em;
  line-height: 0;
}

.setup-diagram {
  margin: 0;
  min-width: 0;
}

.setup-diagram img, .performance-charts img {
  display: block;
  width: 100%;
  height: auto;
}

.diagram-link {
  position: relative;
  display: block;
}

.diagram-enlarge {
  position: absolute;
  right: 0;
  bottom: 0;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  background: #fff;
  color: #666;
  border: 1px solid var(--line);
  font: 24px/1 var(--sans);
}

.performance-copy {
  margin: 22px 0 32px;
  font-size: clamp(20px, 2vw, 25px);
  line-height: 1.5;
}

.performance-charts {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  align-items: start;
  gap: 28px;
  max-width: 1280px;
  margin-inline: auto;
}

.performance-charts figure {
  min-width: 0;
  margin: 0;
}

.performance-charts a {
  display: block;
}

/* People */
#team {
  --team-gap: clamp(48px, 6vw, 80px);
  --profile-gap: 32px;
  --headshot-width: 112px;
  --bio-gap: 14px;
  padding-top: 48px;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--profile-gap) var(--team-gap);
  margin: 32px 0 40px;
  padding: 0;
  list-style: none;
}

.team-group-title {
  margin: 28px 0 0;
  color: var(--muted);
  font: 14px/1.5 var(--sans);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.research-team {
  margin-top: 40px;
  padding-top: 32px;
}

.research-team .team-group-title {
  margin-top: 0;
}

.research-team-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px var(--team-gap);
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  font-size: 26px;
}

.research-team-list li, .team-member-heading {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.research-team-list li {
  line-height: 1.2;
}

.team-grid h4 {
  margin: 0;
  font-size: 28px;
  font-weight: 400;
  line-height: 1.25;
}

.team-member-with-photo {
  display: grid;
  grid-template-columns: var(--headshot-width) minmax(0, 1fr);
  align-items: start;
  gap: 24px;
  min-width: 0;
}

.team-headshot {
  display: block;
  width: var(--headshot-width);
  height: auto;
  border: 1px solid #aaa;
  filter: grayscale(1);
}

.team-member-with-photo > div {
  min-width: 0;
}

.team-bio {
  max-width: 54ch;
  margin: var(--bio-gap) 0 0;
  font-size: 20px;
  line-height: 1.5;
}

.team-website {
  display: inline-block;
  font: 14px/1.4 var(--sans);
}

.team-bio + .team-website {
  margin-top: var(--bio-gap);
}

.team-member-featured {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: var(--team-gap);
  padding-top: 32px;
}

.team-video {
  min-width: 0;
  width: 100%;
  margin: 0;
}

.team-video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}

.team-video-preview {
  display: block;
  width: 100%;
  height: 100%;
}

.team-video-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1);
}

.team-video-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid #ffffffb0;
  border-radius: 50%;
  background: #0009;
  color: #fff;
}

.team-video-play svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.team-video-frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.team-video figcaption {
  margin-top: 10px;
  color: var(--muted);
  font: 13px/1.5 var(--sans);
  text-align: right;
}

.affiliation {
  margin: 0;
  font: 14px/1.5 var(--sans);
  color: var(--muted);
}

/* Contact */
.contact {
  margin-top: 64px;
  padding: 40px 0 50px;
  background: #000;
  color: #fff;
}

.contact a {
  font-size: clamp(18px, 2vw, 24px);
}

.contact a:focus-visible {
  outline-color: #fff;
}

.contact-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.contact .awardee-link {
  max-width: 34rem;
  color: #fff;
  font: 400 13px/1.6 laude-mono, monospace;
  letter-spacing: 0.025em;
  text-align: right;
  text-decoration: none;
}

.awardee-program {
  color: #e1cd6b;
}

/* Responsive layouts */
@media (min-width: 1500px) {
  .hero-intro {
    padding-top: 48px;
    padding-bottom: 36px;
  }
}

@media (max-width: 1000px) {
  .shell {
    width: calc(100% - 64px);
  }
  .site-header {
    min-height: 90px;
  }
  h1 {
    font-size: clamp(38px, 5vw, 52px);
  }
  #team {
    --headshot-width: 88px;
  }
  .team-member-with-photo {
    gap: 18px;
  }
  .how-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .how-copy p {
    max-width: none;
  }
  .setup-diagram {
    width: 100%;
    max-width: 720px;
    margin-inline: auto;
  }
  .performance-charts {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

@media (max-width: 900px) {
  .team-grid {
    grid-template-columns: 1fr;
    margin-bottom: 0;
  }
  .team-member-featured {
    grid-column: auto;
    grid-template-columns: 1fr;
    gap: var(--profile-gap);
    padding-top: 0;
  }
  .research-team {
    margin-top: var(--profile-gap);
    padding-top: 0;
  }
}

@media (max-width: 700px) {
  .shell {
    width: calc(100% - 36px);
  }
  .site-header {
    min-height: 80px;
  }
  .header-nav {
    display: none;
  }
  .mobile-menu {
    display: block;
  }
  .brand {
    font-size: 24px;
    gap: 8px;
  }
  .brand img {
    width: 48px;
    height: 48px;
  }
  .hero-intro {
    padding: 32px 0 24px;
  }
  .hero {
    padding-bottom: 28px;
  }
  .how-it-works, .performance {
    padding: 40px 0;
  }
  .performance-charts {
    gap: 28px;
  }
  #team {
    --profile-gap: 48px;
    padding-top: 32px;
  }
  h1 {
    font-size: clamp(36px, 7.8vw, 52px);
    line-height: 1.08;
  }
  .playback-icon {
    right: 6px;
    bottom: 6px;
  }
  h2 {
    font-size: 32px;
  }
  .team-grid {
    margin-top: 24px;
  }
  .team-grid h4 {
    font-size: 27px;
  }
  .team-member-with-photo {
    row-gap: 0;
  }
  .team-member-with-photo > div {
    display: contents;
  }
  .team-member-with-photo .team-headshot {
    grid-column: 1;
    grid-row: 1;
  }
  .team-member-heading {
    grid-column: 2;
    grid-row: 1;
  }
  .team-member-with-photo .team-bio,
  .team-member-with-photo .team-website {
    grid-column: 1 / -1;
    justify-self: start;
  }
  .team-bio {
    font-size: 18px;
  }
  .research-team-list {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .contact {
    margin-top: 40px;
    padding: 32px 0 36px;
  }
  .contact-inner {
    flex-wrap: wrap;
    gap: 20px;
  }
  .contact .awardee-link {
    font-size: 12px;
    text-align: left;
  }
}

@media (max-width: 370px) {
  .brand {
    font-size: 21px;
  }
  .brand img {
    width: 44px;
    height: 44px;
  }
}
