/* Increase contrast for better readability */
body {
  color: #2b2b2b;
}

/* Slightly more breathing room in publication-heavy pages */
#quarto-document-content p {
  line-height: 1.6;
}

/* Improve contrast of the contact/profile buttons below the portrait */
.quarto-about-trestles .about-entity .about-links .about-link {
  color: #595959;
}

.quarto-about-trestles .about-entity .about-links .about-link:hover,
.quarto-about-trestles .about-entity .about-links .about-link:focus-visible {
  color: #2b2b2b;
}

/* ---------------------------------------------------------
   Navbar
   --------------------------------------------------------- */

/* Mark active page */
.navbar-nav .nav-link.active {
  position: relative;
  font-weight: 600;
}

.navbar-nav .nav-link.active::after {
  content: "";
  position: absolute;
  left: 0.75rem;
  right: 0.75rem;
  bottom: 0.35rem;
  height: 2px;
  background: currentColor;
  opacity: 0.9;
}

@media (max-width: 991.98px) {
  .navbar-nav .nav-link.active {
    display: inline-block;
  }

  .navbar-nav .nav-link.active::after {
    left: 0;
    right: 0;
    bottom: 0.1rem;
  }
}

/* Center desktop navbar */
.navbar .navbar-nav {
  margin-left: auto;
  margin-right: auto;
}

/* Non-capitalized headlines */
.custom-heading {
  text-transform: none;
  letter-spacing: normal;
}

/* Make bold font bolder */
strong {
  font-weight: 600;
}


/* ---------------------------------------------------------
   Publications
   --------------------------------------------------------- */

.pub-list ul {
  list-style-type: square;
}

.pub-list li {
  margin-bottom: 2.5rem;
}

/* Pull resource links closer to the citation */
.pub-list li > p:first-child {
  margin-bottom: 0.2rem;
}

/* Publication resource links */
.pub-links {
  margin-top: 0.1rem;
}

.pub-links > p {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 1.15rem;
  margin: 0;
}

.pub-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  white-space: nowrap;
  text-decoration: none;
}

/* Collapsible abstract */
.pub-abstract-box {
  margin-top: 0.85rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.5rem;
  line-height: 1.6;
}


/* ---------------------------------------------------------
   Experience
   --------------------------------------------------------- */

.experience-list {
  display: grid;
  grid-template-columns: 8rem minmax(0, 1fr);
  column-gap: 1.25rem;
  max-width: 900px;
  margin: 0 0 1.25rem 0;
}

.experience-list dt,
.experience-list dd {
  margin: 0;
}

/* Main entries */
.experience-list .experience-primary {
  border-top: 1px solid #e5e5e5;
  padding-top: 0.7rem;
  padding-bottom: 0.35rem;
}

.experience-list > dt:first-child,
.experience-list > dt:first-child + dd {
  border-top: none;
  padding-top: 0.15rem;
}

.experience-list dt.experience-primary {
  font-weight: 600;
}

.experience-title {
  font-weight: 800;
  color: #000;
}

/* Visiting positions and exchanges */
.experience-list .experience-secondary {
  padding-top: 0.15rem;
  padding-bottom: 0.5rem;
  color: #666;
  font-size: 0.95rem;
}

.experience-list dt.experience-secondary {
  font-weight: 400;
}

/* Short explanatory notes */
.experience-note {
  display: block;
  margin-top: 0.2rem;
  color: #666;
  font-size: 0.95rem;
}

/* Mobile experience list */
@media (max-width: 600px) {
  .experience-list {
    grid-template-columns: 1fr;
  }

  .experience-list dt.experience-primary {
    border-top: 1px solid #e5e5e5;
    padding-top: 0.65rem;
    padding-bottom: 0.05rem;
  }

  .experience-list dd.experience-primary {
    border-top: none;
    padding-top: 0;
    padding-bottom: 0.45rem;
  }

  .experience-list > dt:first-child {
    border-top: none;
  }

  .experience-list .experience-secondary {
    padding-top: 0.05rem;
    padding-bottom: 0.35rem;
  }
}


/* ---------------------------------------------------------
   Experience map
   --------------------------------------------------------- */

.experience-map {
  width: 100%;
  margin: 0 auto 2rem auto;
}

.experience-map iframe {
  display: block;
  width: 100%;
  height: 530px;
  border: 0;
}

@media (max-width: 700px) {
  .experience-map iframe {
    height: 300px;
  }

  .experience-map {
    margin-bottom: 1.25rem;
  }
}


/* ---------------------------------------------------------
   Shared stats strip
   --------------------------------------------------------- */

.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 2rem 0 1.25rem 0;
  border-top: 1px solid #dddddd;
  border-bottom: 1px solid #dddddd;
}

.stat-item {
  text-align: center;
  padding: 1.4rem 0.75rem;
}

.stat-item:not(:last-child) {
  border-right: 1px solid #e5e5e5;
}

.stat-number {
  font-size: 1.55rem;
  font-weight: 700;
  color: #000;
  line-height: 1.2;
}

.stat-label {
  margin-top: 0.25rem;
  font-size: 0.9rem;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}


/* ---------------------------------------------------------
   Teaching areas
   --------------------------------------------------------- */

.teaching-areas {
  margin-bottom: 2.5rem;
  font-size: 0.95rem;
}

.teaching-areas > p {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem 2.5rem;
  margin: 0;
}

.teaching-areas span {
  white-space: nowrap;
}

.teaching-areas i {
  margin-right: 0.4rem;
  color: #555;
}


/* ---------------------------------------------------------
   Responsive stats strip
   --------------------------------------------------------- */

@media (max-width: 700px) {
  .stats-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  .stat-item:nth-child(2) {
    border-right: none;
  }

  .stat-item:nth-child(-n+2) {
    border-bottom: 1px solid #e5e5e5;
  }
}


/* ---------------------------------------------------------
   Teaching areas carousel
   --------------------------------------------------------- */

.teaching-carousel {
  margin: 1.5rem 0 3rem 0;
}

.teaching-slide {
  min-height: 250px;
  padding: 2rem 5rem 3rem 5rem;
  text-align: center;
}

.teaching-slide-icon {
  font-size: 1.4rem;
  color: #555;
  margin-bottom: 0.5rem;
}

.teaching-slide h3 {
  margin-top: 0;
  margin-bottom: 1rem;
}

.teaching-slide p {
  max-width: 650px;
  margin: 0 auto;
  text-align: left;
}

.teaching-carousel .carousel-control-prev,
.teaching-carousel .carousel-control-next {
  width: 3rem;
  color: #555;
  font-size: 1.4rem;
  opacity: 0.7;
}

.teaching-carousel .carousel-control-prev:hover,
.teaching-carousel .carousel-control-next:hover {
  color: #000;
  opacity: 1;
}

.teaching-carousel .carousel-indicators {
  margin-bottom: 0.8rem;
}

.teaching-carousel .carousel-indicators button {
  background-color: #666;
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

@media (max-width: 700px) {
  .teaching-slide {
    min-height: 330px;
    padding: 1.5rem 3rem 3rem 3rem;
  }
}


/* ---------------------------------------------------------
   Page height
   --------------------------------------------------------- */

/*
 * Quarto normally gives the content row flexible height so
 * short pages stretch toward the bottom of the viewport.
 * Let the actual page content determine the height instead.
 */
#quarto-content.page-rows-contents {
  min-height: 0 !important;

  grid-template-rows:
    [content-top] auto
    [content-bottom] auto
    [page-bottom] !important;
}


/* ---------------------------------------------------------
   Footer
   --------------------------------------------------------- */

/*
 * Two-row footer on all screen sizes:
 *
 *   LinkedIn   Bluesky   GitHub   Mail
 *          Datenschutz   Impressum
 */

.nav-footer {
  display: grid !important;

  grid-template-columns: 1fr !important;
  grid-template-areas:
    "social"
    "legal" !important;

  row-gap: 0.45rem;

  margin-top: 1rem !important;
  padding: 0.75rem 1rem 1rem !important;

  font-size: 1rem;
}

/* No copyright/name row */
.nav-footer-left {
  display: none !important;
}

/* First row: social/contact icons */
.nav-footer-center {
  grid-area: social !important;
}

/* Second row: legal links */
.nav-footer-right {
  grid-area: legal !important;
}

.nav-footer-center,
.nav-footer-right {
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;

  text-align: center !important;
  justify-content: center !important;
}

/* Content inside both footer rows */
.nav-footer-center .footer-items,
.nav-footer-right .footer-items {
  display: flex !important;

  align-items: center;
  justify-content: center !important;
  flex-wrap: wrap;

  margin: 0 !important;
  padding: 0 !important;
}

/* Social icons */
.nav-footer-center .footer-items {
  gap: 2rem;
}

/* Datenschutz / Impressum */
.nav-footer-right .footer-items {
  gap: 1.5rem;
}

/* Slightly larger footer icons */
.nav-footer .bi {
  font-size: 1.1rem;
}


/* ---------------------------------------------------------
   Mobile footer refinements
   --------------------------------------------------------- */

@media (max-width: 767.98px) {
  .nav-footer {
    margin-top: 0.75rem !important;
    padding: 0.7rem 0.75rem 0.9rem !important;
    row-gap: 0.4rem;
  }

  .nav-footer-center .footer-items {
    gap: 2rem;
  }

  .nav-footer-right .footer-items {
    gap: 1.25rem;
  }
}