/*Flexbox (CSS Flexible Box Layout) is a layout system for arranging items in one direction at a time—either a row or a column—with easy alignment and spacing. 
Here, we use CSS Grid to create a two-column layout for the hero section.*/

@view-transition {
  navigation: auto;
}

/*reset */
* { box-sizing: border-box; }
html {
  min-height: 100%;
  scrollbar-gutter: stable;
  background: #1b2617 url("assets/forest-poster.webp") center / cover fixed no-repeat;
}

html, body { height: 100%;
  /* background-color: thistle; testing background color only */
  margin: 0;
}
body {
  margin: 0;
  background: transparent;
}

.bg-video,
.static-bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: -10;
}

.bg-overlay{
  position: fixed;
  inset: 0;
  z-index: -9;
  background: rgba(0, 0, 0, 0.12);
}

.static-page-overlay {
  background: rgba(255, 248, 225, 0.025);
}

/* Internal-page rendering hints; these do not change layout or appearance. */
.lab-page .static-bg,
.lab-page .bg-overlay,
.publications-page .static-bg,
.publications-page .bg-overlay {
  transform: translateZ(0);
  backface-visibility: hidden;
  will-change: transform;
}

.lab-page .person-card,
.lab-page .collab-card {
  content-visibility: auto;
}

.lab-page .person-card {
  contain-intrinsic-size: auto 520px;
}

.lab-page .collab-card {
  contain-intrinsic-size: auto 100px;
}

/* Reuse the pre-softened internal background instead of recomputing blur on every scroll frame. */
.lab-page .bg-box,
.publications-page .bg-box {
  background:
    linear-gradient(rgba(0, 0, 0, 0.30), rgba(0, 0, 0, 0.30)),
    url("assets/internal-bg-v2.webp") center / cover fixed no-repeat;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}


.site-header {
  flex: 0 0 auto;   
  padding: 12px 24px; /* top and bottom 12px, left and right 24px */
  padding-right: 90px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 6px 18px rgba(0,0,0,0.18);
  view-transition-name: site-header;
}

body > main {
  animation: page-content-in 180ms ease-out both;
}

@keyframes page-content-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

::view-transition-group(root) {
  animation-duration: 240ms;
  animation-timing-function: ease-in-out;
}

::view-transition-group(site-header) {
  animation-duration: 180ms;
  animation-timing-function: ease-out;
}

@media (prefers-reduced-motion: reduce) {
  body > main,
  ::view-transition-group(root),
  ::view-transition-group(site-header) {
    animation-duration: 0.01ms;
  }
}

.logo {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  display: block;        /* removes tiny baseline gap */
  background: transparent;
  position: relative;
}

.nav-bar{
  display: flex;
  gap: 80px;
  align-items: center;
  font-size: 20px;
}

.nav-toggle {
  display: none;
}

.nav-link {
  text-decoration: none;
  color: white;
}

.hero {
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.hero-left {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 48px;
}

.hero-right {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 130px 48px;
}

.avatar {
  width: 100%;
  max-width: 400px;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: center;
  border-radius: 50%;
  border: 0;
  box-shadow: none;
  filter: saturate(0.9) contrast(0.96) sepia(0.04);
}

.intro-box {
  max-width: 560px;
  padding: 28px 32px;
  border-radius: 20px;

  /* “blurry board” */
  background: rgba(9, 14, 10, 0.34);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);

  /* edge + depth */
  border: 0.5px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.35);
}

.intro-box h1 {
  margin: 0 0 12px; /* remove default top margin + add space below */
  font-size: 3em;
  color: white;
}

.intro-box p {
  margin: 0; /* remove default margin so spacing is controlled */
  font-size: 1.2em;
  color: white;
}

/*treat the link like a small inline item, but arrange the icons inside it cleanly in a row*/
.icon-link {
  display: inline-flex;
  gap: 12px;           
  align-items: center;
  text-decoration: none;
}

.icon-link img {
  width: 35px;
  height: 35px;
}

.student-run-note {
  position: fixed;
  left: 18px;
  bottom: 12px;
  z-index: 1;
  color: rgba(255, 255, 255, 0.78);
  font-size: 16px;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.65);
  pointer-events: none;
}

.research{
  color: white;
  font-size: 100px;
}

.bg-box{
  width: min(5600px, 92vw);
  margin: 50px auto 0;          /* center + push down below header */
  padding: 28px 32px;
  border-radius: 20px;

  background: rgba(0, 0, 0, 0.25);
  -webkit-backdrop-filter: blur(0px);  
  backdrop-filter: blur(14px);

  /* edge + depth */
  border: 0.5px solid rgba(255, 255, 255, 0.899);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);

  color: white;         
  
  position: relative;
}

.bg-box h1{
  margin-top: 0;        /* removes the extra gap at the top */
  margin-bottom: 12px;  /* optional */
}

.lab-introduction {
  max-width: 900px;
  margin: 0 0 28px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
}

.bg-box a:hover {
  text-decoration: underline;
  color: #13294B;
}

.bg-box a:visited {
  color: #13294B;
}

.pub-list{
  list-style-position: inside; 
  padding-left: 0;
  margin: 15px 20px 0;
}

.pub-list li{
  margin: 12px 0;
  line-height: 1.5;
}

.pub-list li::marker{
  color: rgba(255,255,255,0.85);
}

.pub-list li a {
  color: #FF5F05;
  text-decoration: none;
}

.PI-card {
  display: flex;
  align-items: center;
  justify-content: center;   
  gap: 24px;

  max-width: 1100px;         
  margin: 0 130px;            
}

.PI-photo{
  width: 300px;
  height: 300px;
  object-fit: cover;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.PI-title {
  font-size: 22px;        
  font-weight: 700;       
  line-height: 1.25;
  margin: 0 0 14px 0;

  color: #fff;            
  text-shadow: 0 2px 8px rgba(0,0,0,0.25); 
  letter-spacing: 0.2px;
}

.PI-line {
  font-size: 18px;
  line-height: 1.5;
  margin-top: 0;
}

.PI-line a {
  color: white;
  text-decoration: underline;
}

.PI-line a:visited {
  color: white;
}


.people-gridThird {
  width: min(1200px, 100%);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 120px; 
  justify-items: center;
  align-items: start;

  margin: 0 100px;

}

/* Keep the three-column Lab grids inside their translucent background panel. */
.lab-page .people-gridThird {
  width: min(1200px, calc(100% - 80px));
  margin-inline: auto;
}

.lab-page .people-gridThird > .person-card {
  width: min(250px, 100%);
}

.people-gridThird > .person-card {
  width: 100%;
  min-width: 0;
}

.person-card p.major-or-school {
  margin-top: -1rem;      /* smaller than default */
  /* or even 0 if you want it very tight */
}

.person-card-nonPI {
  display: block;
  text-align: center;
  max-width: 250px;     
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center;
  margin: 0;
}

/* .person-card a {
  text-decoration: none;
  color: inherit;
} */

.student-sections {
  margin-top: 40px;
  margin-bottom: 20px;
  font-weight: bold;
  color: white;
}

.collab-gridFour {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  justify-items: center;
}

.collab-card {
  text-align: center;
}

.collab-card h3 {
  margin: 0;
}

.person-card .collab-school {
  margin: 0px 0 0;
}

.person-card .alumni-destination {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.95em;
  font-weight: 400;
}

/* Alumni use a consistent two-part biography: former Lab role, then current role. */
.alumni-grid .person-card h3 {
  margin-bottom: 14px;
}

.alumni-grid .alumni-lab-role,
.alumni-grid .alumni-destination {
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  font-family: inherit;
  font-size: 0.95em;
  font-weight: 400;
  line-height: 1.4;
}

.alumni-grid .alumni-destination {
  margin-top: 7px;
}

.alumni-grid .alumni-dates {
  display: block;
  margin-top: 2px;
}

.alumni-grid .alumni-placeholder {
  color: rgba(255, 255, 255, 0.64);
  font-style: italic;
}

.bg-box .collab-gridFour a,
.bg-box .collab-gridFour a:visited,
.bg-box .collab-gridFour a:hover,
.bg-box .collab-gridFour a:active {
  color: white;
  text-decoration: none; /* or underline on hover if you want */
}

.corner-note {
  position: absolute;
  right: 12px;
  bottom: 10px;
  font-size: 12px;
  line-height: 1.2;
  opacity: 0.8;
  text-align: right;
  max-width: 90%;
  color: white;
}

.teaching-bg-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255, 248, 225, 0.025);
  z-index: -9;
}

.teaching-courses {
  width: min(1100px, 92vw);
  margin: 72px auto 0;
  color: white;
}

.teaching-heading {
  margin-bottom: 28px;
}

.teaching-heading h1 {
  margin: 4px 0 10px;
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.05;
  text-shadow: 0 3px 14px rgba(0, 0, 0, 0.35);
}

.teaching-heading > p:last-child {
  max-width: 650px;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 17px;
}

.teaching-eyebrow {
  margin: 0;
  color: rgba(214, 168, 90, 0.96);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

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

.course-card {
  display: flex;
  flex-direction: column;
  min-height: 200px;
  padding: 24px;
  border: 1px solid rgba(214, 168, 90, 0.42);
  border-radius: 18px;
  background: rgba(14, 18, 14, 0.42);
  box-shadow:
    inset 0 1px 0 rgba(214, 168, 90, 0.10),
    0 12px 30px rgba(0, 0, 0, 0.16);
  transition: transform 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

.course-card:hover {
  transform: translateY(-3px);
  border-color: rgba(214, 168, 90, 0.70);
  background: rgba(14, 18, 14, 0.55);
}

.course-card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.course-code {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.course-school {
  color: rgba(255, 255, 255, 0.67);
  font-size: 13px;
  text-align: right;
}

.course-card h2 {
  max-width: 440px;
  margin: 30px 0 22px;
  font-size: clamp(23px, 3vw, 31px);
  line-height: 1.15;
}

.course-terms {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
}

.course-terms > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 11px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  color: white;
  font-size: 14px;
  font-weight: 600;
}

.mentorship-archive {
  width: min(1100px, 92vw);
  margin: 82px auto 100px;
  color: white;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
}

.mentorship-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
  align-items: end;
  gap: 56px;
  margin-bottom: 34px;
}

.mentorship-eyebrow {
  margin: 0 0 7px;
  color: rgba(214, 168, 90, 0.96);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.mentorship-heading h2 {
  margin: 0;
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.06;
}

.mentorship-heading > p {
  margin: 0 0 4px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 16px;
  line-height: 1.5;
}

.mentorship-year {
  border-top: 1px solid rgba(214, 168, 90, 0.48);
}

.mentorship-year:last-child {
  border-bottom: 1px solid rgba(214, 168, 90, 0.48);
}

.mentorship-year > summary {
  display: grid;
  grid-template-columns: 1fr auto 28px;
  align-items: center;
  gap: 20px;
  padding: 20px 0;
  cursor: pointer;
  list-style: none;
}

.mentorship-year > summary::-webkit-details-marker,
.mentorship-roster > summary::-webkit-details-marker {
  display: none;
}

.mentorship-year-label {
  color: rgba(255, 255, 255, 0.94);
  font-size: clamp(24px, 2.5vw, 34px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
}

.mentorship-year-count {
  color: rgba(255, 255, 255, 0.64);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.mentorship-year-toggle {
  color: rgba(255, 224, 172, 1);
  font-size: 30px;
  font-weight: 600;
  line-height: 1;
  text-align: right;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}

.mentorship-year-toggle::before {
  content: "+";
}

.mentorship-year[open] .mentorship-year-toggle::before {
  content: "−";
}

.mentorship-projects {
  padding-bottom: 10px;
}

.mentorship-project {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) minmax(180px, 230px);
  align-items: start;
  gap: 26px;
  padding: 24px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.13);
}

.mentorship-term {
  padding-top: 4px;
  color: rgba(214, 168, 90, 0.98);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.mentorship-project-copy h3 {
  margin: 0;
  color: white;
  font-size: clamp(19px, 2.4vw, 24px);
  line-height: 1.25;
  transition: color 160ms ease;
}

.mentorship-project:hover .mentorship-project-copy h3 {
  color: rgba(255, 224, 172, 0.98);
}

.mentorship-collaboration {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.66);
  font-size: 14px;
}

.mentorship-mentor {
  padding-top: 3px;
}

.mentorship-mentor span {
  display: block;
  margin-bottom: 7px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  line-height: 1.35;
  text-transform: uppercase;
}

.mentorship-mentor strong {
  display: block;
  color: rgba(255, 255, 255, 0.92);
  font-size: 15px;
  line-height: 1.4;
}

.mentorship-roster {
  margin-top: 15px;
}

.mentorship-roster > summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 222, 167, 0.90);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  list-style: none;
}

.mentorship-roster > summary::after {
  content: "+";
  font-size: 16px;
  font-weight: 400;
}

.mentorship-roster[open] > summary::after {
  content: "−";
}

.mentorship-roster p {
  max-width: 680px;
  margin: 9px 0 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 14px;
  line-height: 1.5;
}

.teaching-bg-box{
  width: min(5600px, 92vw);
  margin: 50px auto 0;          /* center + push down below header */
  padding: 28px 32px;
  border-radius: 20px;

  background: rgba(0, 0, 0, 0.25);
  -webkit-backdrop-filter: blur(0px);  
  backdrop-filter: blur(14px);

  /* edge + depth */
  border: 0.5px solid rgba(255, 255, 255, 0.899);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);

  color: white;         
  
  position: relative;
}

.teaching-bg-box h2{
  margin-top: 0;        /* removes the extra gap at the top */
  margin-bottom: 12px;  /* optional */
}

.teaching-bg-box a:hover {
  text-decoration: underline;
  color: #13294B;
}

.teaching-bg-box a:visited {
  color: #13294B;
}

.iml-projects {
  margin-bottom: 20px;
  font-size: 18px;
}

.iml-projects:last-child {
  margin-bottom: 0;
}

.research-bg-box{
  width: min(5600px, 92vw);
  margin: 50px auto 0;          /* center + push down below header */
  padding: 28px 32px;
  border-radius: 20px;

  background: rgba(0, 0, 0, 0.25);
  -webkit-backdrop-filter: blur(0px);  
  backdrop-filter: blur(14px);

  /* edge + depth */
  border: 0.5px solid rgba(255, 255, 255, 0.899);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);

  color: white;         
  
  position: relative;
}

.research-bg-box h2{
  margin-top: 0;        /* removes the extra gap at the top */
  margin-bottom: 12px;  /* optional */
}

.research-bg-box a:hover {
  text-decoration: underline;
  color: #13294B;
}

.research-bg-box a:visited {
  color: #13294B;
}

.research-row{
  display: flex;
  align-items: flex-start;
  gap: 28px;
}

.research-desc{
  flex: 1;
  min-width: 0;
}

.MLS-pic{
  flex: 0 0 auto;
  width: min(520px, 38%);
  height: auto;
  max-height: 300px; /* optional, reduces box height */
  object-fit: contain;
  border-radius: 14px;
}

/* mobile: stack */
@media (max-width: 900px){
  .research-row{ flex-direction: column; }
  .MLS-pic{ width: 100%; max-width: 520px; margin-left: 0; }
}

@media (max-width: 720px){
  .teaching-courses {
    margin-top: 42px;
  }

  .course-card-grid {
    grid-template-columns: 1fr;
  }

  .course-card {
    min-height: 0;
    padding: 20px;
  }

  .course-card h2 {
    margin-top: 24px;
  }

  .mentorship-archive {
    margin-top: 62px;
  }

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

  .mentorship-year > summary {
    grid-template-columns: 1fr auto 22px;
  }

  .mentorship-project {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .mentorship-mentor {
    margin-top: 6px;
  }
}


.mathbio-main {
  width: min(1180px, 92vw);
  margin: 68px auto 90px;
  color: white;
  animation: none;
}

.mathbio-hero {
  max-width: 820px;
  margin-bottom: 34px;
}

.mathbio-eyebrow,
.mb-section-kicker {
  margin: 0;
  color: rgba(214, 168, 90, 0.92);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.mathbio-hero h1 {
  margin: 7px 0 12px;
  font-size: clamp(38px, 5vw, 58px);
  line-height: 1.05;
  text-shadow: 0 3px 16px rgba(0, 0, 0, 0.32);
}

.mathbio-hero > p:last-child {
  max-width: 720px;
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 19px;
  line-height: 1.5;
}

.mb-section {
  margin-top: 24px;
  padding: 28px;
  border: 1px solid rgba(214, 168, 90, 0.38);
  border-radius: 20px;
  background: rgba(10, 17, 12, 0.54);
  box-shadow:
    inset 0 1px 0 rgba(214, 168, 90, 0.10),
    0 16px 42px rgba(0, 0, 0, 0.20);
}

.mb-section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 36px;
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.mb-section-heading h2 {
  margin: 5px 0 0;
  font-size: clamp(27px, 3vw, 38px);
  line-height: 1.12;
}

.mb-section-heading > p {
  max-width: 480px;
  margin: 0;
  color: rgba(255, 255, 255, 0.70);
  font-size: 15px;
  line-height: 1.45;
  text-align: right;
}

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

.seminar-card {
  display: flex;
  flex-direction: column;
  min-height: 248px;
  padding: 21px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  background: rgba(4, 11, 7, 0.38);
}

.seminar-card-wide {
  grid-column: 1 / -1;
  min-height: 218px;
}

.seminar-card-topline,
.featured-course-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 13px;
}

.seminar-badge {
  padding: 5px 9px;
  border: 1px solid rgba(214, 168, 90, 0.35);
  border-radius: 999px;
  color: rgba(255, 231, 190, 0.92);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.seminar-card h3 {
  margin: 22px 0 8px;
  font-size: 24px;
  line-height: 1.18;
}

.seminar-card h3 a,
.seminar-card h3 a:visited,
.featured-course-card h3 a,
.featured-course-card h3 a:visited {
  color: white;
  text-decoration: none;
}

.seminar-card h3 a:hover,
.featured-course-card h3 a:hover {
  color: rgba(255, 222, 166, 0.96);
}

.seminar-subtitle {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 15px;
  line-height: 1.45;
}

.seminar-meta {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
}

.seminar-meta p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
  line-height: 1.4;
}

.seminar-meta p:last-child {
  text-align: right;
}

.featured-course-card {
  padding: 30px;
  border: 1px solid rgba(214, 168, 90, 0.50);
  border-radius: 18px;
  background:
    linear-gradient(120deg, rgba(92, 69, 28, 0.25), rgba(6, 14, 9, 0.50));
}

.featured-course-code {
  color: rgba(255, 229, 183, 0.96);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.featured-course-card h3 {
  max-width: 760px;
  margin: 28px 0 12px;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.06;
}

.featured-course-description {
  max-width: 880px;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 17px;
  line-height: 1.55;
}

.course-topic-list {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 24px;
}

.course-topic-list span {
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.20);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.90);
  font-size: 13px;
  font-weight: 600;
}

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

.course-directory a {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 62px;
  padding: 14px 17px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background: rgba(4, 11, 7, 0.34);
  color: white;
  text-decoration: none;
  transition: border-color 160ms ease, background-color 160ms ease;
}

.course-directory a:visited {
  color: white;
}

.course-directory a:hover,
.course-directory a:focus-visible {
  border-color: rgba(214, 168, 90, 0.62);
  background: rgba(214, 168, 90, 0.10);
}

.course-directory a:hover strong,
.course-directory a:focus-visible strong {
  color: rgba(255, 222, 166, 1);
}

.course-directory strong {
  color: rgba(214, 168, 90, 0.92);
  font-size: 13px;
  letter-spacing: 0.04em;
}

.course-directory a > span:not(.course-link-arrow) {
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
  line-height: 1.35;
}

.course-link-arrow {
  color: rgba(255, 255, 255, 0.42);
  font-size: 16px;
}

.iml-feature {
  padding: 26px;
  border: 1px solid rgba(214, 168, 90, 0.34);
  border-radius: 18px;
  background: rgba(4, 11, 7, 0.38);
}

.iml-intro {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 34px;
}

.iml-intro h3 {
  margin: 0 0 8px;
  font-size: 25px;
}

.iml-intro p {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 16px;
  line-height: 1.5;
}

.iml-button {
  flex: 0 0 auto;
  padding: 10px 14px;
  border: 1px solid rgba(214, 168, 90, 0.46);
  border-radius: 999px;
  color: white;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.iml-button:visited {
  color: white;
}

.iml-button:hover {
  background: rgba(214, 168, 90, 0.15);
}

.current-projects-label {
  margin: 26px 0 12px;
  color: rgba(255, 229, 183, 0.90);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.10em;
  text-transform: uppercase;
}

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

.project-card {
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
}

.project-card h4 {
  margin: 0 0 10px;
  font-size: 17px;
  line-height: 1.38;
}

.project-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 14px;
}

@media (max-width: 860px) {
  .mathbio-main {
    margin-top: 44px;
  }

  .mb-section-heading,
  .iml-intro {
    display: block;
  }

  .mb-section-heading > p {
    margin-top: 10px;
    text-align: left;
  }

  .seminar-grid,
  .course-directory,
  .project-grid {
    grid-template-columns: 1fr;
  }

  .seminar-card-wide {
    grid-column: auto;
  }

  .iml-button {
    display: inline-flex;
    margin-top: 18px;
  }
}

@media (max-width: 560px) {
  .mb-section,
  .featured-course-card,
  .iml-feature {
    padding: 20px;
  }

  .seminar-meta {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .seminar-meta p:last-child {
    text-align: left;
  }
}

/* Tablet and phone navigation. Desktop navigation remains unchanged. */
@media (max-width: 980px) {
  .site-header {
    position: relative;
    z-index: 20;
    flex-wrap: wrap;
    padding: 10px max(14px, env(safe-area-inset-right)) 10px max(14px, env(safe-area-inset-left));
    background: rgba(8, 13, 9, 0.56);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
  }

  .logo {
    width: 52px;
    height: 52px;
  }

  .nav-toggle {
    display: inline-flex;
    width: 44px;
    height: 44px;
    margin-left: auto;
    padding: 10px 8px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    background: rgba(5, 10, 7, 0.32);
    color: white;
    cursor: pointer;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 5px;
  }

  .nav-toggle-line {
    display: block;
    width: 100%;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    transform-origin: center;
    transition: transform 160ms ease, opacity 160ms ease;
  }

  .site-header.nav-open .nav-toggle-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .site-header.nav-open .nav-toggle-line:nth-child(2) {
    opacity: 0;
  }

  .site-header.nav-open .nav-toggle-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .nav-bar {
    display: none;
    width: 100%;
    flex: 0 0 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 0 2px;
    font-size: 17px;
  }

  .site-header.nav-open .nav-bar {
    display: flex;
  }

  .nav-link {
    padding: 12px 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
  }
}

/* Phone layout. All overrides are scoped below the desktop breakpoint. */
@media (max-width: 768px) {
  html {
    height: auto;
    min-height: 100%;
    scrollbar-gutter: auto;
    background-attachment: scroll !important;
  }

  body {
    height: auto;
    min-height: 100%;
    overflow-x: hidden;
  }

  .bg-video,
  .static-bg {
    height: 100dvh;
  }

  .hero {
    display: block;
  }

  .hero-left {
    padding: 30px 20px 12px;
  }

  .avatar-wrap {
    width: min(58vw, 230px);
  }

  .avatar {
    max-width: none;
  }

  .hero-right {
    padding: 10px 16px 42px;
  }

  .intro-box {
    width: 100%;
    max-width: none;
    padding: 22px 20px;
    border-radius: 18px;
  }

  .intro-box h1 {
    margin-bottom: 10px;
    font-size: clamp(34px, 11vw, 43px);
    line-height: 1.02;
  }

  .intro-box p {
    font-size: 16px;
    line-height: 1.55;
  }

  .intro-box > .icon-link {
    margin-top: 16px;
    margin-right: 5px;
  }

  .icon-link img {
    width: 32px;
    height: 32px;
  }

  .student-run-note {
    position: static;
    display: block;
    margin: 0;
    padding: 0 16px calc(14px + env(safe-area-inset-bottom));
  }

  .bg-box,
  .teaching-bg-box,
  .research-bg-box {
    width: calc(100% - 24px);
    margin: 24px auto 40px;
    padding: 22px 18px;
    border-radius: 16px;
  }

  .lab-page .bg-box,
  .publications-page .bg-box {
    background-attachment: scroll;
  }

  .bg-box h1 {
    font-size: 32px;
  }

  .lab-introduction {
    margin-bottom: 22px;
    font-size: 0.95rem;
  }

  .bg-box h2 {
    font-size: 23px;
  }

  .pub-list {
    margin: 12px 0 0;
    padding-left: 1.25em;
    list-style-position: outside;
  }

  .pub-list li {
    margin: 14px 0;
    font-size: 15px;
    line-height: 1.55;
    overflow-wrap: anywhere;
  }

  .PI-card {
    max-width: none;
    margin: 0;
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }

  .PI-photo {
    width: min(100%, 260px);
    height: auto;
    aspect-ratio: 1;
  }

  .person-text {
    width: 100%;
  }

  .PI-title {
    font-size: 18px;
    line-height: 1.4;
  }

  .PI-line {
    font-size: 16px;
    line-height: 1.55;
    overflow-wrap: anywhere;
  }

  .student-sections {
    margin-top: 34px;
  }

  .people-gridThird,
  .lab-page .people-gridThird {
    width: 100%;
    margin: 0;
    grid-template-columns: 1fr;
    gap: 38px;
  }

  .lab-page .people-gridThird > .person-card,
  .people-gridThird > .person-card {
    width: min(100%, 280px);
    margin-inline: auto;
  }

  .person-card-nonPI {
    max-width: none;
  }

  .person-card h3 {
    margin-bottom: 12px;
  }

  .person-card h4,
  .person-card h5,
  .person-card p {
    line-height: 1.45;
    overflow-wrap: anywhere;
  }

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

  .collab-card h3 {
    font-size: 16px;
    line-height: 1.25;
  }

  .collab-card p {
    font-size: 13px;
    line-height: 1.35;
  }

  .corner-note {
    position: static;
    max-width: none;
    margin-top: 34px;
  }

  .teaching-courses,
  .mentorship-archive {
    width: calc(100% - 32px);
  }

  .teaching-courses {
    margin-top: 34px;
  }

  .teaching-heading h1 {
    font-size: 38px;
  }

  .course-card-grid {
    gap: 14px;
  }

  .course-card {
    padding: 20px 18px;
    border-radius: 16px;
  }

  .course-card h2 {
    margin: 22px 0 20px;
    font-size: 25px;
  }

  .mentorship-archive {
    margin-top: 56px;
    margin-bottom: 64px;
  }

  .mentorship-heading h2 {
    font-size: 31px;
  }

  .mentorship-year > summary {
    gap: 12px;
    padding: 17px 0;
  }

  .mentorship-year-label {
    font-size: 27px;
  }

  .mentorship-year-count {
    font-size: 10px;
  }

  .mentorship-project {
    padding: 20px 0;
  }

  .mentorship-project-copy h3 {
    font-size: 20px;
  }

  .mathbio-main {
    width: calc(100% - 28px);
    margin: 34px auto 56px;
  }

  .mathbio-hero {
    margin-bottom: 28px;
  }

  .mathbio-hero h1 {
    font-size: clamp(34px, 10vw, 42px);
  }

  .mathbio-hero > p:last-child {
    font-size: 17px;
  }

  .mb-section {
    margin-top: 18px;
    padding: 18px;
    border-radius: 16px;
  }

  .mb-section-heading {
    margin-bottom: 20px;
    padding-bottom: 16px;
  }

  .mb-section-heading h2 {
    font-size: 28px;
  }

  .seminar-card {
    min-height: 0;
    padding: 18px;
  }

  .seminar-card-topline,
  .featured-course-topline {
    flex-wrap: wrap;
  }

  .seminar-card h3 {
    margin-top: 18px;
    font-size: 22px;
  }

  .featured-course-card,
  .iml-feature {
    padding: 18px;
  }

  .featured-course-card h3 {
    margin-top: 22px;
    font-size: 28px;
  }

  .featured-course-description,
  .iml-intro p {
    font-size: 15px;
  }

  .course-directory a {
    grid-template-columns: 72px minmax(0, 1fr) auto;
    gap: 10px;
    padding: 13px 14px;
  }

  .project-card h4,
  .seminar-card h3 a,
  .featured-course-card h3 a {
    overflow-wrap: anywhere;
  }

  .research-bg-box h2 {
    font-size: 25px;
  }
}
