@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500&family=IBM+Plex+Sans:wght@400;500;600&display=swap');

/* A restrained technical type system. */
body {
  font-family: 'IBM Plex Sans', Arial, sans-serif;
}

.wordmark,
.eyebrow,
.hero-footer,
.hero-visual-label,
.card-number,
.footer,
.contact-meta,
.publication-count small,
.year-marker span,
.paper-venue,
.paper-status,
.paper-note,
.person-avatar,
.person-role,
.activity-card > span,
.talk-list li > span,
.news-list time {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
}

h1,
h2,
.research-grid h3,
.publication-count,
.year-marker h3,
.paper-title,
.person h3,
.team-subsection h3,
.activity-card h3 {
  font-family: 'IBM Plex Sans', Arial, sans-serif;
  font-style: normal;
  letter-spacing: -0.035em;
}

h1,
h2 {
  font-weight: 500;
}

h1 {
  font-size: clamp(68px, 7.8vw, 126px);
  line-height: 0.94;
  letter-spacing: -0.055em;
}

h1 em,
h2 em,
.service-copy em,
.team-subsection em {
  font-style: normal;
}

h2 {
  font-size: clamp(42px, 5vw, 72px);
  line-height: 1.06;
}

.research-grid h3,
.person h3,
.team-subsection h3,
.activity-card h3,
.paper-title {
  font-weight: 500;
}

.publication-count,
.year-marker h3 {
  font-weight: 500;
}

.section-body > p:not(.availability) a {
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  transition: color .2s, border-color .2s;
}

.section-body > p:not(.availability) a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* Keep the expanded research themes readable within the three-column grid. */
.research-grid article {
  min-height: 430px;
  padding-bottom: 36px;
}

.research-grid h3 {
  font-size: clamp(25px, 2.35vw, 34px);
  line-height: 1.16;
}

.research-grid p {
  max-width: 380px;
  line-height: 1.72;
}

.section {
  padding-top: 88px;
  padding-bottom: 88px;
}

#about,
#research,
#publications {
  padding-top: 32px;
  padding-bottom: 72px;
}

.about-section-head,
.research-section-head,
.publications-section-head {
  display: block;
  margin-bottom: 12px;
}

.about-section-head .eyebrow,
.research-section-head .eyebrow,
.publications-section-head .eyebrow {
  display: block;
  padding-top: 0;
  margin-bottom: 0;
}

.research-intro {
  max-width: 780px;
  margin: 0 0 28px auto;
  color: var(--soft);
  font-size: 18px;
  line-height: 1.78;
}

#team .section-head h2 {
  font-size: clamp(34px, 3.6vw, 52px);
  line-height: 1.1;
}

#team {
  padding-top: 54px;
  padding-bottom: 64px;
}

#team .section-head {
  margin-bottom: 22px;
}

#team .team-intro {
  line-height: 1.6;
}

#team .team-grid {
  margin-top: 26px;
}

.team-grid .person-group {
  grid-column: 1 / -1;
  min-height: 0;
  align-items: center;
  padding-top: 24px;
  padding-bottom: 24px;
}

.person-group h3 {
  margin-bottom: 8px;
}

.person-group p {
  color: var(--soft);
  font-size: 14px;
}

/* Compact first viewport with a scrollable news rail. */
.hero {
  min-height: auto;
  display: grid;
  grid-template-columns: minmax(330px, 1.12fr) minmax(270px, .9fr) minmax(190px, 240px);
  grid-template-areas: "copy news visual";
  column-gap: clamp(22px, 3.2vw, 46px);
  align-items: start;
  padding-top: clamp(18px, 2.2vw, 30px);
  padding-bottom: clamp(42px, 4.5vw, 62px);
}

.hero-copy {
  grid-area: copy;
  padding: 8px 0 0;
}

.hero-copy h1 {
  margin: 0 0 20px;
  font-size: clamp(56px, 6vw, 92px);
}

.hero-intro {
  max-width: 475px;
  font-size: clamp(17px, 1.45vw, 21px);
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px 24px;
  margin-top: 28px;
}

.hero-actions .text-link {
  font-size: 12px;
  white-space: nowrap;
}

.hero-news {
  grid-area: news;
  height: 360px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(213, 232, 149, .035), rgba(255, 255, 255, 0));
}

.hero-news-head {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 2px 13px;
  border-bottom: 1px solid var(--line);
}

.hero-news-hint,
.hero-news-item time {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.hero-news-hint {
  color: var(--muted);
  font-size: 10px;
}

.hero-news-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--accent) transparent;
}

.hero-news-list:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 3px;
}

.hero-news-list::-webkit-scrollbar {
  width: 4px;
}

.hero-news-list::-webkit-scrollbar-thumb {
  background: var(--accent);
}

.hero-news-item {
  padding: 18px 14px 20px 2px;
  border-bottom: 1px solid var(--line);
}

.hero-news-item:last-child {
  border-bottom: 0;
}

.hero-news-item time {
  display: block;
  color: var(--accent);
  font-size: 10px;
  line-height: 1.5;
}

.hero-news-item h3 {
  margin: 10px 0 8px;
  font-family: 'IBM Plex Sans', Arial, sans-serif;
  font-size: 19px;
  font-weight: 500;
  line-height: 1.28;
  letter-spacing: -.02em;
}

.hero-news-item h3 a {
  transition: color .2s;
}

.hero-news-item h3 a:hover {
  color: var(--accent);
}

.hero-news-item h3 span {
  color: var(--accent);
  font-size: 14px;
  white-space: nowrap;
}

.hero-news-item p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.hero-visual {
  grid-area: visual;
  width: 100%;
  height: 360px;
  min-height: 0;
  max-height: none;
  align-self: start;
  justify-self: end;
  filter: none;
}

.hero-visual img {
  object-position: center 22%;
  mix-blend-mode: normal;
}

@media (max-width: 960px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) 250px;
    grid-template-areas:
      "copy visual"
      "news news";
    column-gap: 38px;
    row-gap: 32px;
  }

  .hero-news {
    height: 270px;
  }

  .hero-visual {
    height: 350px;
  }
}

@media (max-width: 720px) {
  h1 {
    font-size: clamp(62px, 17vw, 92px);
  }

  .hero {
    grid-template-columns: 1fr;
    grid-template-areas:
      "copy"
      "visual"
      "news";
    row-gap: 28px;
    padding-top: 22px;
    padding-bottom: 48px;
  }

  .hero-copy {
    padding: 0;
  }

  .hero-copy h1 {
    margin-bottom: 18px;
    font-size: clamp(56px, 15vw, 76px);
  }

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

  .hero-visual {
    width: min(68vw, 250px);
    height: 340px;
    justify-self: start;
  }

  .hero-news {
    width: 100%;
    height: 300px;
  }

  .section {
    padding-top: 60px;
    padding-bottom: 60px;
  }

  .research-grid article {
    min-height: 0;
  }

  #about,
  #research,
  #publications {
    padding-top: 24px;
    padding-bottom: 56px;
  }

  .research-intro {
    margin-bottom: 24px;
    font-size: 16px;
  }

  #team .section-head h2 {
    font-size: clamp(32px, 9vw, 44px);
  }

  #team {
    padding-top: 40px;
    padding-bottom: 50px;
  }

  #team .section-head {
    margin-bottom: 18px;
  }

  #team .team-grid {
    margin-top: 22px;
  }
}

/* Theme control and light palette. */
html[data-theme='dark'] {
  color-scheme: dark;
}

html[data-theme='light'] {
  color-scheme: light;
  --bg: #f4f5ef;
  --panel: #ffffff;
  --ink: #171914;
  --soft: #444740;
  --muted: #6d7068;
  --line: #c9cdc0;
  --accent: #59720d;
}

.nav-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
}

.theme-toggle {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--soft);
  padding: 6px 10px;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color .2s, border-color .2s, background .2s;
}

.theme-toggle:hover {
  color: var(--ink);
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}

.theme-toggle-icon {
  color: var(--accent);
  font-size: 13px;
  line-height: 1;
}

html[data-theme='light'] .site-header {
  background: rgba(244, 245, 239, .9);
}

html[data-theme='light'] .mobile-nav {
  background: #f4f5ef;
}

html[data-theme='light'] .hero-visual {
  background: #dfe2d8;
}

html[data-theme='light'] .hero-visual-label {
  background: rgba(255, 255, 255, .86);
  color: var(--ink);
}

html[data-theme='light'] .hero-visual::after {
  box-shadow: inset 0 0 0 1px rgba(23, 25, 20, .16);
}

html[data-theme='light'] .person-avatar {
  background: #e8ecdc;
  border-color: #a9b77c;
}

html[data-theme='light'] .paper-status {
  border-color: var(--line);
}

html[data-theme='light'] .contact-section {
  background: #e7e9df;
}

html[data-theme='light'] ::selection {
  background: var(--accent);
  color: #fff;
}

@media (max-width: 960px) {
  .nav-actions {
    gap: 11px;
  }
}

@media (max-width: 720px) {
  .nav {
    gap: 12px;
  }

  .nav-actions {
    margin-left: auto;
    gap: 9px;
  }

  .theme-toggle {
    min-height: 30px;
    padding: 5px 8px;
  }

  .theme-toggle-icon {
    display: none;
  }
}
