@font-face {
  font-family: "Metropolis PIR";
  src: url("fonts/Metropolis-ExtraLight.otf") format("opentype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #181a1f;
  --muted: #5c636d;
  --paper: #f7f8f7;
  --surface: #ffffff;
  --line: #dde2e1;
  --red: #ba382b;
  --teal: #007c89;
  --green: #3f6b43;
  --blue: #2d5ca8;
  --shadow: 0 18px 45px rgba(16, 24, 32, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

a:hover,
a:focus-visible {
  color: var(--red);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 14px max(24px, calc((100vw - 1180px) / 2));
  border-bottom: 1px solid rgba(221, 226, 225, 0.82);
  background: rgba(247, 248, 247, 0.94);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  font-weight: 700;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 38px;
  border: 1px solid var(--ink);
  border-radius: 6px;
  background: var(--ink);
  color: #fff;
  font-size: 0.84rem;
  letter-spacing: 0;
}

.brand-text {
  max-width: 300px;
  overflow: hidden;
  color: var(--ink);
  font-size: 0.94rem;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 22px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
}

.site-nav > a,
.nav-dropdown summary {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown summary {
  gap: 6px;
  cursor: pointer;
  list-style: none;
}

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

.nav-dropdown summary:hover,
.nav-dropdown summary:focus-visible {
  color: var(--red);
}

.nav-dropdown summary::after {
  width: 0;
  height: 0;
  border-top: 5px solid currentColor;
  border-right: 4px solid transparent;
  border-left: 4px solid transparent;
  content: "";
}

.nav-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  display: grid;
  min-width: 230px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.nav-menu a {
  padding: 8px 10px;
  border-radius: 6px;
  color: var(--ink);
  white-space: nowrap;
}

.nav-menu a:hover,
.nav-menu a:focus-visible {
  background: rgba(186, 56, 43, 0.08);
  color: var(--red);
}

.nav-dropdown:not([open]) .nav-menu {
  display: none;
}

.hero,
.page-hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 72svh;
  padding: 112px max(24px, calc((100vw - 1180px) / 2)) 72px;
  overflow: hidden;
  color: #fff;
  background-color: #dfe7e7;
  background-image: url("imgs/nerf_in_robotics.png");
  background-position: center;
  background-size: cover;
}

.hero::before,
.page-hero::before {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg, rgba(9, 13, 19, 0.86) 0%, rgba(9, 13, 19, 0.56) 46%, rgba(9, 13, 19, 0.12) 100%);
  content: "";
}

.hero-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-hero {
  min-height: 54svh;
}

.join-hero {
  min-height: 38svh;
  padding-bottom: 44px;
  background-position: center 72%;
}

.hero-content,
.page-hero-content {
  position: relative;
  z-index: 2;
  width: min(860px, 100%);
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--red);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.2;
  text-transform: uppercase;
}

.hero .eyebrow,
.page-hero .eyebrow {
  color: #ffcfbd;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 940px;
  margin-bottom: 24px;
  font-family: "Metropolis PIR", "Segoe UI", Arial, sans-serif;
  font-size: 6.1rem;
  font-weight: 300;
  letter-spacing: 0;
  line-height: 0.96;
}

h2 {
  margin-bottom: 0;
  font-size: 2.35rem;
  font-weight: 760;
  letter-spacing: 0;
  line-height: 1.08;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.25rem;
  line-height: 1.2;
}

.hero-copy {
  max-width: 690px;
  margin-bottom: 30px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.2rem;
  line-height: 1.55;
}

.hero-actions,
.link-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.section-actions {
  margin-top: 24px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 0.94rem;
  font-weight: 750;
  line-height: 1.1;
}

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

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

.button.outline-light {
  border-color: rgba(255, 255, 255, 0.72);
  color: #fff;
}

.button:hover,
.button:focus-visible {
  border-color: var(--red);
  color: var(--red);
}

.section {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 82px 0;
  border-bottom: 1px solid var(--line);
}

.section.intro,
.section.split {
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) minmax(0, 1.35fr);
  gap: 56px;
  align-items: start;
}

.section-header {
  max-width: 760px;
}

.section-header.wide {
  max-width: 960px;
  margin-bottom: 34px;
}

.overview-copy {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 34px;
  max-width: 1040px;
  margin-bottom: 30px;
  color: var(--muted);
}

.direction-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}

.direction-card {
  position: relative;
  display: block;
  min-height: 245px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 1px 0 rgba(16, 24, 32, 0.03);
}

.direction-card:not(:last-child)::after {
  position: absolute;
  top: 50%;
  right: -24px;
  z-index: 2;
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper);
  color: var(--green);
  content: "\2192";
  font-size: 0.82rem;
  font-weight: 900;
  line-height: 1;
  transform: translateY(-50%);
}

.direction-card:hover,
.direction-card:focus-visible {
  border-color: var(--red);
  box-shadow: var(--shadow);
  color: inherit;
}

.direction-card p {
  color: var(--muted);
}

.direction-card p:last-child {
  margin-bottom: 0;
}

.intro-copy {
  columns: 2;
  column-gap: 42px;
  color: var(--muted);
  font-size: 1.02rem;
}

.intro-copy p {
  break-inside: avoid;
}

.research-grid,
.group-grid,
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

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

.research-card,
.group-card,
.metric,
.callout {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 1px 0 rgba(16, 24, 32, 0.03);
}

.research-card {
  overflow: hidden;
}

.research-card img,
.research-card video {
  width: 100%;
  height: 210px;
  object-fit: cover;
  background: #dfe7e7;
}

.research-card video {
  display: block;
}

.research-card div {
  padding: 24px;
}

.research-card p,
.group-card p,
.paper p,
.callout p,
.leader p,
.metric p {
  color: var(--muted);
}

.research-card a,
.link-row a,
.footer-links a {
  color: var(--blue);
  font-weight: 750;
}

.topic-index,
.group-card span,
.paper-area {
  display: block;
  margin-bottom: 10px;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 820;
  letter-spacing: 0;
  text-transform: uppercase;
}

.leader {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.leader img {
  width: 190px;
  aspect-ratio: 1;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: var(--shadow);
}

.paper-list {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.paper-list + .paper-list {
  margin-top: 32px;
}

.paper {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 26px;
  align-items: center;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.paper img {
  width: 210px;
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  object-fit: cover;
  background: #e6eceb;
}

.paper h3 {
  margin-bottom: 8px;
  font-size: 1.16rem;
}

.paper p {
  margin-bottom: 10px;
}

.selected-work-grid,
.case-grid,
.member-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.selected-work-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.selected-work-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.project-media-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.project-media-grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.selected-work-card,
.case-card,
.member-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.selected-work-card img,
.selected-work-card video {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #dfe7e7;
}

.selected-work-card video {
  display: block;
}

.selected-work-copy,
.case-card,
.member-card {
  padding: 22px;
}

.people-grid,
.alumni-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.people-grid + .section-header,
.alumni-grid + .section-header {
  margin-top: 46px;
}

.person-card,
.alumni-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.person-top {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.person-top img,
.avatar-initials {
  flex: 0 0 auto;
  width: 76px;
  height: 76px;
  border-radius: 8px;
  background: #dfe7e7;
  object-fit: cover;
}

.avatar-initials {
  display: inline-grid;
  place-items: center;
  background: var(--ink);
  color: #fff;
  font-weight: 850;
}

.person-card h3,
.alumni-card h3 {
  margin-bottom: 4px;
}

.person-card p,
.alumni-card p {
  color: var(--muted);
}

.person-card a,
.alumni-card a {
  color: var(--blue);
  font-weight: 750;
}

.person-card p:last-child,
.alumni-card p:last-child {
  margin-bottom: 0;
}

.selected-work-copy p,
.case-card p,
.member-card p,
.publication-list p {
  color: var(--muted);
}

.selected-work-copy h3,
.case-card h3,
.member-card h3 {
  margin-bottom: 8px;
}

.publication-list {
  display: grid;
  gap: 0;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.publication-list li {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 20px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.pub-year {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 76px;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--green);
  font-size: 0.82rem;
  font-weight: 850;
  line-height: 1;
}

.pub-kind {
  display: inline-flex;
  margin-bottom: 8px;
  color: var(--teal);
  font-size: 0.76rem;
  font-weight: 820;
  letter-spacing: 0;
  text-transform: uppercase;
}

.publication-list strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
  line-height: 1.28;
}

.publication-list a {
  color: var(--blue);
}

.publication-list p {
  margin-bottom: 0;
}

.publication-list .pub-venue {
  margin-top: 6px;
  color: var(--green);
  font-weight: 700;
}

.publication-list .pub-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
  font-weight: 750;
}

.result-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.result-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.result-table th,
.result-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

.result-table th {
  color: var(--green);
  font-weight: 850;
}

.result-table tr:last-child td {
  border-bottom: 0;
}

.group-card {
  min-height: 245px;
  padding: 26px;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.group-card:hover,
.group-card:focus-visible {
  border-color: var(--red);
  box-shadow: var(--shadow);
  color: inherit;
  transform: translateY(-2px);
}

.callout {
  padding: 28px;
}

.timeline {
  display: grid;
  gap: 0;
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.timeline li {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 22px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.timeline time {
  color: var(--green);
  font-weight: 800;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 44px 0 56px;
  color: var(--muted);
}

.footer-brand {
  margin-bottom: 2px;
  color: var(--ink);
  font-weight: 850;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 16px;
}

.page-body .section:first-of-type {
  border-top: 0;
}

.page-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 38px;
  color: var(--muted);
}

.focus-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 30px;
}

.focus-item {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.metric {
  padding: 22px;
}

.metric strong {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 1.65rem;
  line-height: 1;
}

.back-link {
  display: inline-flex;
  margin-bottom: 18px;
  color: var(--blue);
  font-weight: 760;
}

.content-block {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.content-block p:last-child,
.focus-item p:last-child,
.callout p:last-child,
.metric p:last-child {
  margin-bottom: 0;
}

.nav-current {
  color: var(--ink);
}

@media (max-width: 940px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    padding: 14px 24px;
  }

  .site-nav {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 14px;
    padding-bottom: 4px;
  }

  .nav-menu {
    right: auto;
    left: 0;
  }

  h1 {
    font-size: 4rem;
  }

  h2 {
    font-size: 1.95rem;
  }

  .section.intro,
  .section.split,
  .leader,
  .page-summary,
  .overview-copy,
  .direction-flow {
    grid-template-columns: 1fr;
  }

  .direction-card:not(:last-child)::after {
    top: auto;
    right: 50%;
    bottom: -24px;
    transform: translateX(50%) rotate(90deg);
  }

  .intro-copy {
    columns: 1;
  }

  .research-grid,
  .group-grid,
  .metrics-grid,
  .focus-list,
  .content-grid,
  .selected-work-grid,
  .selected-work-grid.three,
  .project-media-grid,
  .project-media-grid.four,
  .case-grid,
  .member-grid,
  .people-grid,
  .alumni-grid {
    grid-template-columns: 1fr;
  }

  .paper {
    grid-template-columns: 160px minmax(0, 1fr);
  }

  .publication-list li {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .paper img {
    width: 160px;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 15px;
  }

  .brand-text {
    max-width: 220px;
  }

  .hero,
  .page-hero {
    min-height: 64svh;
    padding: 112px 24px 48px;
  }

  .join-hero {
    min-height: 40svh;
    background-position: center 74%;
  }

  h1 {
    font-size: 2.75rem;
  }

  .hero-copy {
    font-size: 1rem;
  }

  .section {
    width: calc(100% - 32px);
    padding: 58px 0;
  }

  .paper {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .paper img {
    width: 100%;
  }

  .timeline li {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .site-footer {
    flex-direction: column;
    width: calc(100% - 32px);
  }

  .footer-links {
    justify-content: flex-start;
  }
}
