.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

#sculpture,
#musique,
#duo,
#contact {
  scroll-margin-top: 5.5rem;
}

.site-header .brand {
  flex: 0 0 auto;
}

.menu-toggle {
  display: none;
  padding: .48rem .7rem;
  border: 1px solid currentColor;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-family: var(--display);
  font-size: .78rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
}

.global-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(.75rem, 2vw, 2rem);
}

.global-nav a {
  position: relative;
  border: 0;
  font-family: var(--display);
  font-size: .82rem;
  font-weight: 400;
  letter-spacing: .075em;
  line-height: 1.2;
  text-decoration: none;
  text-transform: uppercase;
}

.global-nav a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -.35rem;
  left: 0;
  height: 2px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .2s ease;
}

.global-nav a:hover::after,
.global-nav a:focus-visible::after,
.global-nav a[aria-current="location"]::after,
.global-nav a[aria-current="page"]::after {
  transform: scaleX(1);
}

.project-navigation {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: clamp(3rem, 7vw, 7rem);
  border-top: 1px solid currentColor;
  border-left: 1px solid currentColor;
}

.project-navigation--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.project-navigation a {
  display: flex;
  min-height: 8rem;
  padding: clamp(1rem, 2.5vw, 2rem);
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.2rem;
  text-decoration: none;
}

.project-navigation a:last-child {
  text-align: right;
}

.project-navigation span {
  font-family: var(--display);
  font-size: .75rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.project-navigation strong {
  font-size: clamp(1rem, 1.5vw, 1.3rem);
  font-weight: 400;
  line-height: 1.2;
}

.project-navigation a:hover,
.project-navigation a:focus-visible {
  background: rgba(255, 255, 255, .32);
}

.gallery-dialog {
  width: min(84vw, 1250px);
  max-width: none;
  height: min(80vh, 820px);
  max-height: none;
  padding: 0;
  border: 1px solid #10110f;
  background: #10110f;
  color: #fffaf0;
  overflow: hidden;
}

.gallery-dialog[open] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.gallery-dialog::backdrop {
  background: rgba(0, 0, 0, .86);
}

.gallery-dialog__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.5rem;
  padding: .75rem 1rem;
}

.gallery-dialog__count {
  margin: 0;
  font-family: var(--display);
  font-size: .78rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.gallery-dialog__controls {
  display: flex;
  gap: .5rem;
}

.gallery-dialog button {
  min-width: 2.65rem;
  min-height: 2.65rem;
  border: 1px solid currentColor;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.gallery-dialog figure {
  display: grid;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: clamp(.75rem, 1.5vw, 1.25rem);
  place-items: center;
  overflow: hidden;
}

.gallery-dialog img {
  display: block;
  width: auto;
  height: auto;
  max-width: min(calc(84vw - 2.5rem), 1210px);
  max-height: min(calc(80vh - 6rem), 724px);
  object-fit: contain;
}

@media (max-width: 820px) {
  .site-header {
    align-items: center;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .global-nav {
    display: none;
    width: 100%;
    align-items: stretch;
    border-top: 1px solid currentColor;
    flex-direction: column;
    gap: 0;
  }

  .global-nav[data-open="true"] {
    display: flex;
  }

  .global-nav a {
    padding: .85rem 0;
    border-bottom: 1px solid currentColor;
  }

  .global-nav a::after {
    display: none;
  }

  .project-navigation {
    grid-template-columns: 1fr;
  }

  .project-navigation a {
    min-height: 6.5rem;
    text-align: left !important;
  }

  .gallery-dialog {
    width: 100vw;
    height: 100dvh;
    border: 0;
  }

  .gallery-dialog img {
    max-width: calc(100vw - 1.5rem);
    max-height: calc(100dvh - 5rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .global-nav a::after {
    transition: none;
  }
}
