/* Shared layout rules outside the exhibition homepage. */
body:not(:has(.exhibition-home)) .content.container {
  min-height: 100svh;
  margin-top: 0;
  padding: clamp(1rem, 3vw, 3rem);
}

body:not(:has(.exhibition-home)) .sidebar {
  width: 17.5rem;
  padding: 1.5rem 1.25rem;
}

body:not(:has(.exhibition-home)) .sidebar .container {
  max-width: none;
  padding: 0;
}

body:not(:has(.exhibition-home)) .sidebar-sticky {
  top: 1.5rem;
  right: 1.25rem;
  bottom: 1.5rem;
  left: 1.25rem;
}

body:not(:has(.exhibition-home)) .sidebar-nav {
  max-height: calc(100svh - 12rem);
  margin: 2.5rem 0 0;
  padding: 0;
}

.mobile-menu,
.mobile-menu-toggle {
  display: none;
}

/* Biography and contact retain their image-and-text composition without any
   absolute-position overlap in the available content area. */
.biography-hero,
.contact-hero {
  display: grid;
  min-height: calc(100svh - clamp(2rem, 6vw, 6rem));
  height: auto;
  padding: 0;
  overflow: visible;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(1.5rem, 4vw, 4rem);
}

.biography-hero img,
.contact-hero img {
  position: static;
  grid-row: 1;
  grid-column: 2;
  width: 100%;
  max-width: none;
  height: min(68svh, 42rem);
  max-height: none;
  margin: 0;
  object-fit: cover;
  transform: none;
}

.biography-text,
.contact-text {
  position: static;
  grid-row: 1;
  grid-column: 1;
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  margin: 0;
  font-size: clamp(0.95rem, 1.1vw, 1.1rem);
  transform: none;
}

@media (hover: hover) {
  .biography-hero img:hover,
  .contact-hero img:hover {
    transform: scale(1.015);
  }

  .biography-text:hover,
  .contact-text:hover {
    transform: scale(1.02);
  }
}

@media (max-width: 62rem) {
  .biography-hero,
  .contact-hero {
    min-height: 0;
    grid-template-columns: minmax(0, 1fr);
  }

  .biography-hero img,
  .contact-hero img,
  .biography-text,
  .contact-text {
    grid-row: auto;
    grid-column: auto;
  }

  .biography-hero img,
  .contact-hero img {
    height: auto;
    max-height: min(70svh, 42rem);
  }
}

@media (max-width: 47.99rem) {
  body:not(:has(.exhibition-home)) .content.container {
    min-height: 100svh;
    margin: 0;
    padding: 5rem 1rem 2rem;
  }

  body .sidebar {
    display: none;
  }

  .mobile-menu-toggle {
    position: fixed;
    z-index: 120;
    top: 1rem;
    left: 1rem;
    display: grid;
    width: 2.75rem;
    height: 2.75rem;
    padding: 0.78rem 0.68rem;
    cursor: pointer;
    background: #171717;
    border: 1px solid rgba(244, 242, 237, 0.25);
    place-content: center;
    gap: 0.3rem;
  }

  .mobile-menu-toggle span {
    display: block;
    width: 1.2rem;
    height: 1px;
    background: #f4f2ed;
  }

  .mobile-menu {
    position: fixed;
    z-index: 110;
    inset: 0;
    display: block;
    overflow-y: auto;
    padding: 5.5rem 1.5rem 2rem;
    color: #f4f2ed;
    visibility: hidden;
    background: #121212;
    transform: translateX(-100%);
    transition: transform 180ms ease-out, visibility 0s linear 180ms;
  }

  .mobile-menu.is-open {
    visibility: visible;
    transform: translateX(0);
    transition: transform 180ms ease-out;
  }

  .mobile-menu__inner {
    display: grid;
    max-width: 34rem;
    margin: 0 auto;
    gap: 1.7rem;
  }

  .mobile-menu__name {
    color: inherit;
    font-family: Helvetica, Arial, sans-serif;
    font-size: 2.5rem;
    font-weight: 500;
    letter-spacing: -0.08em;
    line-height: 0.9;
  }

  .mobile-menu__group {
    display: grid;
    gap: 0.45rem;
  }

  .mobile-menu__group h2,
  .mobile-menu__group a,
  .mobile-menu__page {
    margin: 0;
    color: inherit;
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    line-height: 1.4;
  }

  .mobile-menu__group h2 {
    color: rgba(244, 242, 237, 0.55);
    font-size: 0.61rem;
  }

  .mobile-menu__page {
    padding-top: 0.25rem;
    border-top: 1px solid rgba(244, 242, 237, 0.16);
  }

  .mobile-menu a:hover,
  .mobile-menu a:focus {
    color: #f4f2ed;
    letter-spacing: 0.1em;
    transform: none;
  }

  body.mobile-menu-open {
    overflow: hidden !important;
  }

  .contact-hero,
  .biography-hero {
    display: grid;
    height: auto;
    padding: 0;
    gap: 1rem;
  }

  .contact-hero img,
  .biography-hero img {
    position: static;
    display: block;
    width: 100%;
    max-width: none;
    margin: 0;
    border-radius: 0;
    filter: none;
    transform: none !important;
  }

  .contact-text,
  .biography-text {
    position: static;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    color: inherit;
    font-size: 1rem;
    line-height: 1.55;
    text-align: left;
    background: transparent;
    border-radius: 0;
    filter: none;
    transform: none !important;
  }

  .contact-text .socials-link {
    margin-top: 1rem;
  }
}
