/* Spacing for featured publication cover images */
.columns .cover-column {
  padding-right: 2.5rem !important;
}

/* People + News listing thumbnails */
.quarto-listing .listing-image img {
  max-width: 140px;
  border-radius: 6px;
}

.quarto-listing .listing-item {
  padding-bottom: 1.5rem;
}

/* ================================
   Vertical centering in columns
   ================================ */

/* Ensure columns can vertically center their contents */
.columns.v-center {
  align-items: center;
}

/* Prevent image baseline alignment issues */
.columns.v-center img {
  display: block;
}

/* Remove top margin from the first heading in the text column
   (fixes People page image centering) */
.columns.v-center > .column h3:first-child {
  margin-top: 0;
}

/* Affiliations 2x2 logo grid */
.affiliations-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  align-items: center;
  margin-top: 1rem;
}

.affiliation-logo{
  width: 100%;
  max-height: 110px;   /* adjust up/down */
  object-fit: contain;
  display: block;
  margin: 0 auto;
  opacity: 0.95;
}

/* Mobile: stack to 1 column */
@media (max-width: 700px){
  .affiliations-grid{
    grid-template-columns: 1fr;
  }
  .affiliation-logo{
    max-height: 95px;
  }
}

/* ================================
   Homepage hero (split layout)
   ================================ */

.hero-split{
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  margin-top: 1.5rem;
  margin-bottom: 2rem;
}

/* left + right halves */
.hero-split > .column{
  flex: 0 0 calc(50% - 0.75rem);
  max-width: calc(50% - 0.75rem);
  min-width: 0;
}

/* make the right column align content to the top */
.hero-split > .column:last-child{
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
}

/* right image */
.hero-img-split{
  width: 100%;
  max-width: 520px;
  max-height: none;
  height: auto;
  object-fit: contain;
  border-radius: 18px;
  display: block;
  margin: 40px 0 0 0;
  background: none;
  padding: 0;
}

.hero-right{
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.25rem;
}

.stanford-hero-logo{
  max-width: 400px;
  height: auto;
  opacity: 0.9;
}

/* Mobile: stack */
@media (max-width: 900px){
  .hero-split{
    flex-direction: column-reverse;
    align-items: center;
    gap: 1.25rem;
  }

  .hero-split > .column{
    flex: 0 0 100%;
    max-width: 100%;
    width: 100%;
  }

  .hero-img-split{
    width: 88vw;
    max-width: 88vw;
    height: auto;
    padding: 10px;
  }

  .hero-kicker{
    font-size: 1.25rem;
    white-space: normal;
  }

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

  .stanford-text{
    font-size: 0.98rem;
  }

  .stanford-logo{
    max-width: 220px;
  }
}

/* dark gradient so text is readable */
.hero-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.75rem;
  background: linear-gradient(
    to top,
    rgba(0,0,0,0.55),
    rgba(0,0,0,0.20),
    rgba(0,0,0,0.05)
  );
  color: white;
}

.hero-kicker {
  font-size: clamp(1.6rem, 2.6vw, 2.05rem);
  font-weight: 700;
  letter-spacing: 0.35px;
  margin-bottom: 0.5rem;
  line-height: 1.15;
  white-space: nowrap;
}

/* Main lab name */
.hero-title {
  color: #0b3c6d;
}

/* Separator */
.hero-sep {
  color: #9aa0a6;
}

/* Descriptor text */
.hero-subtitle {
  color: #9aa0a6;
  font-size: 0.85em;
  font-weight: 400;
  letter-spacing: 0.4px;
}

.hero-tagline {
  font-size: 1.05rem;
  opacity: 0.95;
  max-width: 52rem;
  margin-bottom: 1rem;
}

.hero-buttons {
  display: flex;
  gap: .6rem;
  flex-wrap: wrap;
}

/* Stanford line under hero */
.stanford-line {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  margin-top: .25rem;
  margin-bottom: 1.25rem;
}

.stanford-text {
  font-size: 1.05rem;
  opacity: .85;
}

.stanford-logo {
  width: 100%;
  max-width: 340px;
  height: auto;
  display: block;
  margin-top: 0.5rem;
}

/* Mobile tweaks */
@media (max-width: 700px) {
  .hero-img-split {
    width: 88vw;
    max-width: 88vw;
    height: auto;
  }

  .hero-overlay {
    padding: 1.25rem;
  }

  .hero-kicker {
    font-size: 1.15rem;
  }
}

/* Medicine page logo alignment */

.medicine-logo {
  display: block;
  max-width: 280px;
  margin: 8.5rem auto 0 auto;
}

/* Medicine page mobile layout */
@media (max-width: 700px) {
  .medicine-logo {
    width: 85vw;
    max-width: 340px;
    height: auto;
    margin: 1rem auto 0 auto;
    object-fit: contain;
  }

  .columns.v-center > .column {
    width: 100% !important;
    max-width: 100% !important;
  }
}

.mission-quote {
  font-size: 1.4rem;   /* try 1.2–1.4rem */
  line-height: 1.6;
  font-style: italic;
}

/* Make listing cards clearly clickable */
.quarto-listing .card {
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.quarto-listing .card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
}

/* Make logo responsive */
img.lab-logo {
  width: 100%;
  max-width: 300px;   /* desktop size cap */
  height: auto;
}

/* Increase size on mobile */
@media (max-width: 768px) {
  img.lab-logo {
    max-width: 90%;
    margin: 0 auto;
    display: block;
  }
}

/* Where We Are images */
.where-img {
  width: 100%;
  max-width: 420px;
  height: auto;
  border-radius: 14px;
  display: block;
  margin: 0 auto;
}

/* Mobile tweak */
@media (max-width: 700px) {
  .where-img {
    max-width: 90%;
    margin-top: 1rem;
  }
}

/* Mentorship page image */
.mentorship-img {
  display: block;
  margin: 1.5rem auto 0.5rem auto;
  max-width: 600px;
  width: 100%;
  border-radius: 12px;
}

/* Mobile tweak */
@media (max-width: 700px) {
  .mentorship-img {
    max-width: 90%;
    margin-top: 1rem;
  }
}

/* ================================
   Hero artwork (top image)
   ================================ */

.hero-artwork {
  width: 100%;
  max-width: 1300px;
  margin: 1.25rem auto 1.5rem auto;
  padding: 0 1.25rem;
}

.hero-artwork-img {
  width: 100%;
  height: 520px;
  object-fit: cover;
  object-position: center;
  display: block;
  border-radius: 22px;
}

/* ================================
   Intro section below image
   ================================ */

.home-intro {
  max-width: 1300px;
  margin: 0 auto 2.5rem auto;
  padding: 0 1.25rem;
}

.home-intro-main {
  min-width: 0;
  max-width: 860px;
}

.home-intro-text {
  font-size: 1.12rem;
  line-height: 1.75;
  max-width: 46rem;
  color: #2f3a45;
  margin-top: 1.2rem;
}

.home-intro-text-secondary {
  font-size: 1.02rem;
  margin-top: 0.9rem;
  color: #4a5561;
}

.hero-buttons {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.stanford-line {
  margin-top: 1.5rem;
}

.stanford-text {
  font-size: 0.98rem;
  line-height: 1.7;
  color: #555;
}

.home-logo-row {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-top: 2rem;
  padding-top: 1.4rem;
  border-top: 1px solid #e5e7eb;
}

.home-row-logo {
  display: block;
  height: auto;
  object-fit: contain;
}

/* Lab logo = primary */
.home-row-logo.lab-logo {
  width: 320px;
  max-width: 100%;
  border-radius: 12px;
}

/* Stanford logo = secondary */
.home-row-logo.stanford-logo {
  width: 320px;
  max-width: 100%;
}

/* Responsive */
@media (max-width: 991px) {
  .hero-artwork-img {
    height: 420px;
  }
}

@media (max-width: 768px) {
  .hero-artwork {
    padding: 0 1rem;
    margin-top: 0.9rem;
  }

  .hero-artwork-img {
    height: 320px;
    border-radius: 18px;
  }

  .home-intro {
    padding: 0 1rem;
  }
}

@media (max-width: 640px) {
  .hero-artwork-img {
    height: 280px;
  }

  .home-logo-row {
    gap: 1.25rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
    padding-top: 1rem;
  }

  .home-row-logo.lab-logo {
    width: 150px;
  }

  .home-row-logo.stanford-logo {
    width: 130px;
  }

  .home-intro-text,
  .home-intro-text-secondary,
  .stanford-text {
    font-size: 0.98rem;
    line-height: 1.65;
  }
}
