/* Shared typography and colors */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #fff;
  color: #222;
  font-family: "Montserrat", sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
}

/* Match the publications page's content width and spacing */
main {
  max-width: 1040px;
  margin: 0 auto;
  padding: 40px 28px 80px;
}

/* Main page titles */
main > h1:not(.intro),
#research-focus,
.methods-heading {
  margin: 0 0 48px;
  text-align: center;
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 500;
  letter-spacing: 0.06em;
  line-height: 1.25;
}

/* Red links, with an underline on hover */
main a {
  color: #b30815;
  text-decoration: none;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}

main a:hover,
main a:focus-visible {
  text-decoration: underline;
}

main a:focus-visible,
summary:focus-visible {
  outline: 2px solid #b30815;
  outline-offset: 4px;
  border-radius: 2px;
}

/* Homepage */
.stangl-home-main {
  padding-top: 0;
}

.intro {
  color: #222;
  font-size: 19px;
  font-weight: 500;
  line-height: 1.6;
}

/* Join Us page */
main > section[aria-labelledby="postdocs"] h2,
main > section[aria-labelledby="prospective-phd"] h2,
main > section[aria-labelledby="admitted-phd"] h2,
main > section[aria-labelledby="student-opportunities"] h2,
main > section[aria-labelledby="vr-ar"] h2 {
  margin: 0 0 10px;
  color: #b30815;
  font-size: 19px;
  font-weight: 500;
  line-height: 1.45;
}

main > section[aria-labelledby="postdocs"] ~ section {
  margin-top: 32px;
}

/* Team page */
.team-name {
  color: #b30815;
  font-size: 19px;
  font-weight: 500;
  line-height: 1.45;
}

.team-role,
.alumni-role {
  color: #666;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.7;
}

.alumni {
  border-top-color: #e8e8e8;
}

.alumni h2 {
  color: #222;
  font-size: 26px;
  font-weight: 500;
  letter-spacing: 0.06em;
  line-height: 1.3;
}

.alumni-name {
  color: #b30815;
  font-size: 19px;
  font-weight: 500;
  line-height: 1.45;
}

/* Research page */
.research-goals {
  font-weight: 500;
  line-height: 1.6;
}

.method-card {
  border: 1px solid #e8e8e8;
  background: #fff;
  box-shadow: none;
}

.method-card summary {
  padding: 18px;
}

.method-title {
  color: #b30815;
  font-size: 19px;
  font-weight: 500;
  line-height: 1.45;
}

.method-toggle {
  border-color: #e8e8e8;
  color: #b30815;
  font-size: 12px;
  letter-spacing: 0.03em;
}

.method-body {
  border-top-color: #e8e8e8;
  line-height: 1.6;
}

/* Identical footer on every page */
.stangl-footer {
  padding: 32px 24px;
  background: #e6e6e6;
  color: #222;
  text-align: center;
  font-family: "Montserrat", sans-serif;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.8;
}

.stangl-footer p {
  margin: 0;
}

.stangl-footer strong {
  font-weight: 700;
}

/* Mobile */
@media (max-width: 600px) {
  main {
    padding: 30px 20px 55px;
  }

  .stangl-home-main {
    padding-top: 0;
  }

  main > h1:not(.intro),
  #research-focus,
  .methods-heading {
    margin-bottom: 34px;
  }

  .intro,
  .team-name,
  .alumni-name,
  .method-title {
    font-size: 17px;
  }

  main > section[aria-labelledby="postdocs"] h2,
  main > section[aria-labelledby="prospective-phd"] h2,
  main > section[aria-labelledby="admitted-phd"] h2,
  main > section[aria-labelledby="student-opportunities"] h2,
  main > section[aria-labelledby="vr-ar"] h2 {
    font-size: 17px;
  }

  .team-role,
  .alumni-role {
    font-size: 13px;
  }
}


/* Consistent menu typography on every page */
.stangl-menu a {
  font-family: "Montserrat", sans-serif;
  color: #222;
  font-weight: 400;
  line-height: 1.4;
  text-decoration: none;
}

.stangl-menu a:hover,
.stangl-menu a[aria-current="page"] {
  color: #b30815;
}

/* Same full-width header divider on every page */
.stangl-header::after,
.stangl-header-home::after {
  display: block;
  height: 4px;
  background: #ccc;
}

.stangl-header-home .stangl-menu::after {
  display: none;
}

/* Let each team member's text follow its natural height */
.team-grid {
  align-items: start;
}

.team-name {
  min-height: 0;
  margin: 0 0 3px;
}

.team-role {
  min-height: 0;
  margin: 0 0 2px;
  line-height: 1.5;
}

.team-icons {
  margin: 0;
}

/* More visible separators and research boxes */
.alumni {
  border-top: 2px solid #ccc;
}

.publication {
  border-bottom: 2px solid #ccc;
}

.method-card {
  border: 2px solid #ccc;
}

.method-body {
  border-top: 2px solid #ccc;
}

.method-toggle {
  border: 2px solid #ccc;
}

.method-toggle::after {
  border-right-width: 2px;
  border-bottom-width: 2px;
}

/* Subpages: match the Alumni divider's thickness and color */
.stangl-header::after {
  display: block;
  height: 2px;
  background: #ccc;
}

/* Homepage: hide the full-width divider */
.stangl-header-home::after {
  display: none;
}

/* Homepage: show the divider only beneath the menu */
.stangl-header-home .stangl-menu::after {
  content: "";
  display: block;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: #ccc;
}

/* Remove the internal divider in expanded research boxes */
.method-card .method-body {
  border-top: none;
}

/* Fit the homepage introduction on one line on wider screens */
@media (min-width: 1040px) {
  .stangl-home-main .intro {
    font-size: 18px;
  }
}

/* More compact footer on every page */
.stangl-footer {
  padding: 18px 24px;
  line-height: 1.6;
}

/* Alumni: two columns */
.alumni-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px 40px;
  max-width: 700px;
  margin: 0 auto;
}

/* One column on small screens */
@media (max-width: 500px) {
  .alumni-list {
    grid-template-columns: 1fr;
  }
}

/* Consistent, smaller headings in all research boxes */
.method-card .method-title {
  font-size: 16px;
  line-height: 1.4;
}

/* Desktop homepage: keep the existing large logo. */
.stangl-header-home .stangl-brand {
  display: none;
}

/* Mobile homepage: use the same header logo as other pages. */
@media (max-width: 800px) {
  .stangl-header-home .stangl-brand {
    display: block;
  }

  .stangl-home-main .lab-logo {
    display: none;
  }

  .stangl-home-main {
    padding-top: 30px;
  }
}
