/* Shared responsive layer, loaded last on every page. */
picture {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

video {
  display: block;
  width: 100%;
  height: auto;
}

#main, #page-content, .wiki > *, .pub-card-content {
  min-width: 0;
}

main, section, .publication-citation-dialog, .vbox-inline {
  overflow-wrap: anywhere;
}

iframe {
  max-width: 100%;
}

button:focus-visible, a:focus-visible, [role="button"]:focus-visible {
  outline: 3px solid #149ddd;
  outline-offset: 3px;
}

button, a, [role="button"] {
  touch-action: manipulation;
}

.mobile-nav-toggle {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 8px #0002;
}

.mobile-nav-toggle i {
  pointer-events: none;
}

#header .profile img {
  height: 120px;
  object-fit: cover;
}

#header .social-links a {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nav-menu a, .pub-card-btn, .publication-citation-copy,
.publication-citation-close, .wiki-nav-toggle,
.portfolio #portfolio-flters li, .back-to-top {
  min-height: 44px;
}

.publication-citation-close, .back-to-top {
  min-width: 44px;
}

.pub-card-footer {
  flex-wrap: wrap;
}

.pub-card-image picture {
  width: 100%;
  height: 100%;
}

.pub-card-image img {
  object-fit: contain;
  background: #fff;
}

mjx-container[display="true"] {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
}

#hero {
  height: auto;
  padding: 3.5rem 1rem 1.5rem;
  gap: 1.5rem;
}

#hero > .row-sm {
  width: min(100%, 960px);
}

#hero h1 {
  font-size: clamp(1.75rem, 4.5vw, 4rem);
  line-height: 1.15;
}

#hero p {
  font-size: clamp(1rem, 2.4vw, 1.625rem);
  line-height: 1.6;
  min-height: 3.2em;
  margin: 0;
}

#hero .carousel-item {
  padding: 0 3.25rem 3.25rem !important;
  text-align: center;
}

#hero .carousel-item > a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  margin-bottom: 0.75rem;
}

#hero .carousel-item .btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

#hero .carousel-item picture {
  width: min(100%, 720px);
  margin: 0 auto;
  aspect-ratio: 1250 / 672;
}

#hero .carousel-item picture img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain;
}

#hero .carousel-caption {
  min-height: 4.5em;
  line-height: 1.5;
  padding: 0.5rem 0;
  margin: 0.5rem auto 0;
}

#hero .carousel-control-prev {
  left: 0;
}

#hero .carousel-control-next {
  right: 0;
}

#hero .carousel-control-prev, #hero .carousel-control-next {
  width: 44px;
  height: 44px;
}

#hero .carousel-indicators {
  margin: 0;
  bottom: 0;
}

#hero .carousel-indicators li {
  width: 32px;
  height: 4px;
  margin: 0 4px;
  border-top: 20px solid transparent;
  border-bottom: 20px solid transparent;
}

.figure-row {
  gap: 0.75rem;
}

.figure-row > div {
  min-width: 0;
}

.vbox-inline {
  max-height: calc(100vh - 5rem);
  max-height: calc(100dvh - 5rem);
  overflow-y: auto !important;
}

.abs-img img, .abs-img-bordered img {
  height: auto;
  max-height: 45vh;
  max-height: 45dvh;
  object-fit: contain;
}

.abs-body, .abs-body-nb {
  overflow-y: visible;
  max-height: none;
}

.vbox-close {
  width: 44px;
  height: 44px;
  font-size: 30px;
}

.publication-citation-dialog {
  max-height: calc(100vh - 2rem);
  max-height: calc(100dvh - 2rem);
}

@media (max-width: 1199px) {
  .container-bg > .container {
    padding: 0;
  }

  #page-content > section {
    margin-left: 0;
  }
}

@media (min-width: 1200px) {
  #page-content > section {
    margin-left: 240px;
  }
}

@media (max-width: 991px) {
  .wiki {
    width: 100%;
    gap: 1.25rem;
  }

  .wiki-nav a {
    min-height: 44px;
    display: flex;
    align-items: center;
    white-space: normal;
    overflow: visible;
  }

  .wiki div[id] {
    scroll-margin-top: 4rem;
  }
}

@media (max-width: 575px) {
  section {
    padding: 3.5rem 0 2rem;
  }

  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  #hero {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }

  #hero .carousel-item {
    padding-left: 2.5rem !important;
    padding-right: 2.5rem !important;
  }

  #hero .carousel-caption {
    min-height: 6em;
  }

  #hero p {
    min-height: 4.8em;
  }

  .figure-row {
    flex-direction: column;
  }

  .figure-row > div {
    flex: 1 1 auto;
    width: 100%;
  }

  [class*="figure-link-center-"] {
    width: 100%;
  }

  .contact .info, .contact .php-email-form {
    padding: 1rem;
  }

  .contact .info p {
    overflow-wrap: anywhere;
  }

  .abs-body p, .abs-body-nb p, .reference-list, .wiki p, .section-title p {
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  [data-aos] {
    opacity: 1 !important;
    transform: none !important;
  }

  .carousel-item, .pub-card, .pub-card-image img {
    transition: none !important;
  }
}
