/* css styles */

/* Make images responsive everywhere */
img {
  max-width: 100%;
  height: auto;
}

/* ===== Full-width background sections (vertical layout) ===== */
.resaz1 {
  background-image: url("images/resaz1.jpg");
  background-size: cover;
  background-position: center;
  padding: 6rem 2rem;
  color: white;
}

.microscopy {
  background-image: url("images/microscopy.jpg");
  background-size: cover;
  background-position: center;
  padding: 6rem 2rem;
  color: white;
}

.agar {
  background-image: url("images/agar.jpg");
  background-size: cover;
  background-position: center;
  padding: 6rem 2rem;
  color: white;
}

/* Space between vertical sections */
.resaz1, .microscopy, .agar {
  margin: 2rem 0;
}

/* Text overlay boxes */
.resaz1-text,
.microscopy-text,
.agar-text {
  /* 3000px makes the overlay absurdly wide; keep it readable */
  max-width: 950px;
  background: rgba(0, 0, 0, 0.8);
  border-radius: 0.5rem;
  margin: 0 auto;
  font-size: 1.1rem;
  line-height: 1.6;
  padding: 1.2rem 2rem; /* top/bottom, left/right */
}

.resaz1-text h2,
.microscopy-text h2,
.agar-text h2 {
  margin-top: 0;
}

/* ===== People page layout ===== */
.person {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 1.5rem;
  align-items: start;
  margin-bottom: 2.5rem;
}

.person-photo img {
  width: 250px;
  height: 250px;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.person-bio {
  max-width: 700px;
}

/* ===== Navbar sizing + alignment ===== */

/* Make navbar container full width (150% causes weird overflow) */
.navbar .container,
.navbar .container-lg,
.navbar .container-xl,
.navbar .container-fluid {
  max-width: 100%;
  padding-left: 2rem;
  padding-right: 2rem;
}

.navbar {
  padding-top: 0.4rem;
  padding-bottom: 0.4rem;
}

.navbar .navbar-nav {
  align-items: baseline;
}

/* 3-line lab title */
.navbar-brand {
  font-size: 2.8rem;
  font-weight: 650;
  line-height: 1.05;   /* tighter for multi-line */
  white-space: normal; /* allow line breaks/wrapping */
}

/* Nav links */
.navbar-nav .nav-link {
  font-size: 1.7rem;
  line-height: 1.2;
  padding-left: 0.8rem;
  padding-right: 0.8rem;
  padding-top: 0.35rem;
  padding-bottom: 0.35rem;
}

/* Align page content with navbar padding */
.page-columns .content {
  padding-left: 2rem;
  padding-right: 2rem;
}

#title-block-header {
  max-width: none;
}

#title-block-header h1 {
  margin-left: 0;
}

/* ===== Global typography ===== */
body {
  font-size: 1.15rem;
  line-height: 1.65;
  /* margin-left: -0.5;  <-- remove: invalid and can cause weird shifts */
}

.site-subtitle {
  display: block;
  font-size: 0.85rem;
  font-weight: 400;
  opacity: 0.85;
  margin-top: -0.2rem;
}

/* ===== Funding logos ===== */
.funding-logos {
  display: flex;
  gap: 2rem;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.funding-logos img {
  height: 70px;
  width: auto;
  object-fit: contain;
}

.funding-logos img.funding-main {
  height: 100px;
}

/* ===== Publications styling ===== */
#refs .csl-entry {
  margin-bottom: 1rem;
}

/* (This selector may or may not exist depending on CSL output; harmless if missing) */
.csl-author[data-family="Cacace"] {
  font-weight: 800;
}

/* (Same note: harmless if class absent; your CSL change is the reliable italics method) */
#refs .csl-container-title {
  font-style: italic;
}

/* ===== Mobile-friendly tweaks ===== */
@media (max-width: 768px) {

  /* Slightly smaller body text on small screens */
  body {
    font-size: 1.05rem;
    line-height: 1.6;
  }

  /* Reduce hero paddings on mobile */
  .resaz1, .microscopy, .agar {
    padding: 2.6rem 1rem;
    margin: 1.2rem 0;
  }

  /* Overlay box should fill nicely */
  .resaz1-text,
  .microscopy-text,
  .agar-text {
    max-width: 100%;
    padding: 1rem 1rem;
    font-size: 1.0rem;
  }

  /* People layout: stack */
  .person {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .person-photo img {
    width: 180px;
    height: 180px;
    margin: 0 auto;
  }

  .person-bio {
    max-width: 100%;
  }

  /* Navbar: scale down so it doesn't dominate mobile */
  .navbar .container,
  .navbar .container-lg,
  .navbar .container-xl,
  .navbar .container-fluid {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .navbar-brand {
    font-size: 1.35rem;
    line-height: 1.05;
  }

  .navbar-nav .nav-link {
    font-size: 1.15rem;
    padding-left: 0;
    padding-right: 0;
  }

  /* Match page content padding to navbar on mobile */
  .page-columns .content {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  /* Funding logos: smaller */
  .funding-logos {
    gap: 1rem;
  }

  .funding-logos img {
    height: 55px;
  }

  .funding-logos img.funding-main {
    height: 75px;
  }
}
