/* ---------- Whole site ---------- */


/* Readable line lengths for long prose pages */
main.content > p,
main.content > ul,
main.content > ol {
  max-width: 42rem;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--lab-hot);
  outline-offset: 2px;
}

/* ---------- Home page: short full-width banner, title below ---------- */

.banner {
  position: relative;
  margin: -1rem 0 0;
  height: clamp(190px, 28vw, 360px);
  overflow: hidden;
  background: #2A2320;
}
.banner video {
  position: absolute !important;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  object-fit: cover;
}
/* Fades the bottom of the video into the page background */
.banner-fade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom,
    rgba(0, 0, 0, 0) 45%,
    var(--bs-body-bg, #FCFCFA) 100%);
  pointer-events: none;
}
.banner-caption,
.banner-toggle {
  position: absolute;
  top: 0.75rem;
  padding: 0.15rem 0.65rem;
  font-size: 0.78rem;
  color: #FFFFFF;
  background: rgba(10, 6, 18, 0.55);
  border: none;
  border-radius: 999px;
}
.banner-caption { left: 1rem; font-style: italic; }
.banner-toggle { right: 1rem; cursor: pointer; }
.banner-toggle:hover { background: rgba(10, 6, 18, 0.8); }
.lab-title {
  position: relative;
  z-index: 1;
  padding: 0.5rem 0 clamp(1rem, 3vw, 2rem);
}
.lab-title h1 {
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1.12;
  letter-spacing: -0.015em;
  font-weight: 600;
  margin: 0 0 0.75rem;
  border-bottom: none;
}
.lab-name { font-weight: 700; }
.lab-place {
  font-size: clamp(1.1rem, 1.8vw, 1.35rem);
  color: var(--lab-muted);
  margin: 0;
}

/* ---------- Research page: photo beside each section ---------- */

.research-photo {
  float: right;
  width: min(40%, 22rem);
  margin: 0.3rem 0 1rem 1.75rem;
}
.research-photo figure { margin: 0; }
.research-photo img { width: 100%; height: auto; border-radius: 6px; }
.research-photo figcaption { font-size: 0.85rem; font-style: italic; margin-top: 0.4rem; }
main.content h2 { clear: both; }
   .research-photo.left {
     float: left;
     margin: 0.3rem 1.75rem 1rem 0;
   }
   @media (max-width: 640px) {
     .research-photo,
     .research-photo.left { float: none; width: 100%; margin: 0 0 1.25rem; }
   }

   /* ---------- People page: photo beside a short bio ---------- */

   .person {
     display: flex;
     gap: 1.75rem;
     align-items: flex-start;
     margin: 0 0 2.25rem;
   }
   .person-photo { flex: 0 0 200px; }
   .person-photo p,
   .person-photo figure { margin: 0; }
   .person-photo img {
     width: 200px !important;
     height: 200px !important;
     max-width: none;
     object-fit: cover;
     border-radius: 50%;
   }
   .person-text { max-width: 40rem; }
   .person-text p { margin: 0 0 0.5rem; }
   .person-name {
     font-family: "Manrope", "Helvetica Neue", Arial, sans-serif;
     font-weight: 700;
     font-size: 1.3rem;
     margin: 0.4rem 0 0.1rem;
   }
   .person-role {
     color: var(--lab-muted);
     font-style: italic;
     margin: 0 0 0.5rem;
   }
   @media (max-width: 560px) {
     .person { flex-direction: column; gap: 0.75rem; }
   }


   /* ---------- Media page: press cards ---------- */

   .media-grid {
     display: grid;
     grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr));
     gap: 2.5rem 2rem;
     margin-top: 2rem;
   }
   .media-image img {
     display: block;
     width: 100%;
     aspect-ratio: 16 / 9;
     object-fit: cover;
     border-radius: 8px;
   }
   .media-figure { margin: 0 0 1rem; }
   .media-caption {
     font-size: 0.8rem;
     font-style: italic;
     color: var(--lab-muted);
     margin-top: 0.4rem;
   }
   h3.media-outlet {
     font-size: 1.35rem;
     margin: 0 0 0.4rem;
     border-bottom: none;
   }
   .media-title {
     font-size: 1.05rem;
     margin: 0 0 0.6rem;
   }
   .media-link { font-weight: 600; }
   
   /* ---------- Home page: photo on the left, text box on the right ---------- */

   .home-hero {
     display: grid;
     grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
     min-height: min(78vh, 680px);
     margin-top: -1rem;
     margin-bottom: 2.5rem;
   }
   .home-photo {
     min-height: 320px;
     background-size: cover;
     background-repeat: no-repeat;
   }
   .home-text {
     display: flex;
     flex-direction: column;
     justify-content: center;
     padding: clamp(2rem, 5vw, 4.5rem);
     background: var(--lab-surface);
   }
   .home-text p { max-width: 34rem; }
   h1.home-title {
     font-size: clamp(1.9rem, 3.2vw, 2.8rem);
     line-height: 1.12;
     letter-spacing: -0.015em;
     font-weight: 600;
     margin: 0 0 1.5rem;
     border-bottom: none;
   }
   .home-credit {
     display: block;
     margin-top: 1rem;
     font-size: 0.8rem;
     font-style: italic;
     color: var(--lab-muted);
   }
   @media (max-width: 760px) {
     .home-hero { grid-template-columns: 1fr; min-height: 0; }
     .home-photo { height: min(55vh, 380px); }
   }
   
   
/* ---------- Banner photo behind page titles (all pages except Home) ---------- */

.quarto-title-banner {
  background-size: cover;
  background-position: 50% 20% !important;
  padding: clamp(5rem, 11vw, 11rem) 0 2rem;
}
.quarto-title-banner h1.title,
.quarto-title-banner .description {
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.35);
}


/* Larger version of the side photo, e.g. on the Contact page */
.research-photo.large {
  width: min(55%, 34rem);
}
@media (max-width: 640px) {
  .research-photo.large { width: 100%; }
}


/* ---------- Home page text box: typographic polish ---------- */

h1.home-title {
  font-size: clamp(1.9rem, 2.8vw, 2.5rem);
  font-style: italic;
  letter-spacing: 0;
}
h1.home-title .lab-name {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.5em;
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--bs-primary);
  margin-bottom: 0.9rem;
}


   .home-credit { font-style: normal; }
   .home-credit::before {
     content: "";
     display: block;
     width: 2.5rem;
     border-top: 2px solid var(--bs-primary);
     opacity: 0.6;
     margin-bottom: 0.6rem;
   }
   .home-text p { text-wrap: pretty; }
   .home-text p:first-of-type { font-size: 1.15rem; }