:root {
  color-scheme: light;
  --page: #eef1ef;
  --surface: #fafbf8;
  --ink: #3f4946;
  --muted: #65716c;
  --link: #155c8c;
  --accent: #10476f;
  --link-underline: rgba(21, 92, 140, 0.48);
  --line: #dce3de;
  --tint: #e7ede9;
  --heading: #344b43;
  --venue: #9c3c3c;
  --highlight: #238247;
  --section-padding: 18px;
  --section-gap: 16px;
  --heading-gap: 10px;
  --paragraph-gap: 10px;
  --paper-gap: 18px;
  --paper-row-gap: 1px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 28px;
  background: var(--page);
}

body {
  width: min(860px, calc(100% - 40px));
  margin: 24px auto;
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

h1, h2, h3, p, ul, ol, pre {
  margin: 0;
  padding: 0;
}

a {
  color: var(--link);
  text-decoration-line: none;
  text-decoration-color: var(--link-underline);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-skip-ink: auto;
  transition: color 150ms ease, text-decoration-color 150ms ease;
}

a:hover, a:focus-visible {
  color: var(--accent);
  text-decoration-line: underline;
}

a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 4px;
  border-radius: 3px;
}

::selection {
  background: var(--line);
  color: var(--heading);
}

img {
  max-width: 100%;
  height: auto;
  border: 0;
}

/* Warm surfaces on a cool, muted backdrop, without outlines or shadows. */
.profile {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr) 178px;
  align-items: center;
  gap: 20px;
  padding: var(--section-padding);
  margin-bottom: var(--section-gap);
  background: var(--surface);
  border: 0;
  border-radius: 10px;
}

.profile-photo {
  display: block;
  width: 190px;
  border-radius: 7px;
}

.profile h1 {
  color: var(--heading);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.profile-affiliation {
  margin-top: var(--paragraph-gap);
  font-size: 13px;
  line-height: 1.5;
}

.profile-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-top: var(--paragraph-gap);
  font-size: 13px;
}

.lab-link {
  display: block;
  padding-left: 17px;
  border-left: 1px solid var(--line);
  text-decoration: none;
}

.lab-link img {
  display: block;
  width: 160px;
  mix-blend-mode: multiply;
}

.section {
  clear: both;
  margin-bottom: var(--section-gap);
}

.about-section, .lab-section, .publications-section {
  padding: var(--section-padding);
  background: var(--surface);
  border-radius: 10px;
}

.about-section {
  line-height: 1.45;
}

.about-section .bio {
  margin: 0;
  padding: 0;
}

.about-section .bio + .bio {
  margin-top: var(--paragraph-gap);
}

.about-section .bio > * + * {
  margin-top: var(--paragraph-gap);
}

.about-section li {
  padding-bottom: 4px;
}

.about-section li:last-child {
  padding-bottom: 0;
}

h2 {
  display: flex;
  align-items: center;
  margin: 0 0 var(--heading-gap);
  color: var(--heading);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.35px;
  line-height: 1.3;
}

h3 {
  font-size: 16px;
}

.bio, .paper, .paper2, .res, .award {
  clear: both;
  padding: 10px 15px;
  margin: 0 0 8px;
  background: transparent;
  border: 0;
  overflow-wrap: break-word;
}

#pubs {
  display: grid;
  gap: var(--paper-gap);
}

.paper, .paper2 {
  padding: 0;
  margin: 0;
  background: transparent;
  line-height: 1.45;
}

/* Use the same distinction color for plain labels and linked awards. */
#pubs font[color="#B71C1C" i] {
  color: var(--venue);
}

#pubs font[color="Gray" i] {
  color: var(--muted);
}

#pubs font[color^="#239B56" i],
#pubs .paper-distinction {
  color: var(--highlight);
}

#pubs .paper-distinction {
  text-decoration-color: currentColor;
}

/* Both publication views share the same compact row spacing. */
.paper-authors,
.paper-venue,
.paper-resources {
  margin-top: var(--paper-row-gap);
}

ul {
  list-style: disc;
}

li {
  margin-left: 1.35em;
  padding-bottom: 6px;
}

#biosection li::marker {
  color: #939c9b;
}

.lab-intro {
  margin: 0 0 var(--paragraph-gap);
}

.lab-intro > p {
  margin-bottom: 4px;
}

.lab-directory {
  padding: 0;
}

.lab-row {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 16px;
  margin-bottom: 10px;
}

.lab-row h3 {
  padding-top: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
}

.people-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  max-width: 608px;
  gap: 2px 16px;
  list-style: none;
}

.people-grid li {
  min-width: 0;
  margin: 0;
  padding: 0;
  line-height: 1.4;
}

.person-note {
  display: inline;
  margin-left: 4px;
  white-space: nowrap;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.lab-disclosure summary {
  width: fit-content;
  color: var(--muted);
  cursor: pointer;
  list-style: none;
  line-height: 1.5;
}

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

.lab-disclosure summary::after {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin: 0 0 3px 9px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg);
}

.lab-disclosure[open] > summary::after {
  margin-bottom: 0;
  transform: rotate(225deg);
}

.lab-disclosure summary span {
  color: var(--link);
}

.lab-disclosure summary span, .lab-alumni > summary {
  text-decoration-line: none;
  text-decoration-color: var(--link-underline);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.lab-disclosure summary:hover,
.lab-disclosure summary:hover span,
.lab-disclosure summary:focus-visible,
.lab-disclosure summary:focus-visible span {
  color: var(--accent);
}

.lab-disclosure summary:hover span,
.lab-disclosure summary:focus-visible span,
.lab-alumni > summary:hover,
.lab-alumni > summary:focus-visible {
  text-decoration-line: underline;
}

.joining-notes {
  margin-top: var(--paragraph-gap);
  padding: 12px;
  background: var(--tint);
  border-radius: 6px;
  font-size: 13px;
}

.joining-notes li:last-child {
  padding-bottom: 0;
}

.lab-alumni > summary {
  color: var(--link);
  font-size: 13px;
  font-weight: 400;
}

.alumni-list {
  display: grid;
  gap: 10px;
  margin: 10px 0 2px 120px;
  list-style: none;
  font-size: 13px;
}

.alumni-list li {
  padding: 0;
  margin: 0;
}

.alumni-note {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

pre {
  margin: 10px 0 2px;
  padding: 12px;
  background: var(--tint);
  border: 0;
  border-radius: 5px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.5;
}

.paper pre, .paper2 pre {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
}

#options {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 0;
  margin: 0 0 16px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
}

.publication-switch {
  display: inline-flex;
  gap: 3px;
  padding: 3px;
  background: var(--tint);
  border: 0;
  border-radius: 8px;
}

.publication-switch button {
  padding: 5px 12px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  line-height: 1.4;
  cursor: pointer;
}

.publication-switch button:hover {
  color: var(--link);
  background: var(--surface);
}

.publication-switch button[aria-pressed="true"] {
  color: var(--link);
  background: var(--surface);
}

#nav {
  position: fixed;
  top: 40px;
  left: calc(50% + 456px);
  width: 96px;
  padding-left: 12px;
  border-left: 1px solid var(--line);
  list-style: none;
}

#nav li {
  padding: 0;
  margin: 0 0 4px;
}

#nav a {
  display: block;
  padding: 7px 10px;
  border-radius: 5px;
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
}

#nav a:hover, #nav a:focus-visible {
  background: var(--tint);
  color: var(--link);
}

.site-footer {
  padding: 12px 0 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.site-footer img {
  vertical-align: baseline;
}

@media (max-width: 1140px) {
  body {
    margin-top: 16px;
  }

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

  nav[aria-label="Main navigation"] {
    position: sticky;
    top: 0;
    z-index: 10;
    padding: 6px 0;
    background: var(--page);
  }

  #nav {
    display: flex;
    position: static;
    gap: 4px;
    width: auto;
    margin: 0 0 4px;
    padding: 0;
    border: 0;
  }

  #nav li {
    margin: 0;
  }

  #nav a {
    padding: 8px 13px;
  }
}

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

@media (max-width: 760px) {
  .lab-row {
    grid-template-columns: 100px minmax(0, 1fr);
    gap: 16px;
  }

  .alumni-list {
    margin-left: 116px;
  }

  .profile {
    grid-template-columns: 155px minmax(0, 1fr);
    gap: 16px;
  }

  .lab-link {
    grid-column: 2;
    padding: 10px 0 0;
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .lab-link img {
    width: 150px;
  }
}

@media (max-width: 640px) {
  .lab-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }

  .alumni-list {
    margin-left: 0;
  }
}

@media (max-width: 540px) {
  body {
    --section-padding: 14px;
    --section-gap: 12px;
    width: calc(100% - 28px);
    margin-top: 6px;
  }

  .profile {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .profile-photo {
    width: 150px;
  }

  .lab-link {
    grid-column: 1;
  }

  .res, .award {
    padding: 10px 13px;
  }

  pre {
    padding: 9px;
  }
}

@media (max-width: 480px) {
  .person-with-note {
    grid-column: 1 / -1;
  }
}

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

  a, .paper, .paper2 {
    transition: none;
  }
}
