:root {
  color: #000;
  background: #fff;
  font-family: "EB Garamond", Garamond, Georgia, serif;
  font-synthesis: none;
  scrollbar-gutter: stable;
}

* {
  box-sizing: border-box;
}

body {
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  flex-direction: column;
  background: #fff;
  color: #000;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

p,
figure {
  margin: 0;
}

a,
a:visited {
  color: inherit;
  font-weight: 400;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.wrapper {
  width: min(100%, 1200px);
  margin-inline: auto;
  padding-inline: 24px;
}

.site-header {
  border-bottom: 1px solid #e5e5e5;
  text-align: center;
}

.site-header .wrapper {
  display: flex;
  padding-block: 1rem;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.site-title {
  color: #000;
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.site-meta {
  color: #000;
  font-size: 0.95rem;
}

.page-content {
  flex: 1;
  padding-block: 3.5rem;
}

.gallery-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.gallery-filters {
  display: flex;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: 0.35rem 1rem;
}

.gallery-filter {
  padding: 0.15rem 0;
  appearance: none;
  border: 0;
  background: none;
  color: #000;
  cursor: pointer;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1.25;
  text-align: left;
  white-space: nowrap;
}

.gallery-filter::after {
  display: block;
  height: 0;
  overflow: hidden;
  content: attr(data-label);
  font-weight: 600;
  visibility: hidden;
}

.gallery-filter:hover,
.gallery-filter:focus-visible,
.gallery-filter[aria-pressed="true"] {
  font-weight: 600;
}

.gallery-filter:focus-visible {
  outline: 1px solid #000;
  outline-offset: 3px;
}

.about-panel {
  width: min(100%, 34rem);
  padding: clamp(1.25rem, 3vw, 2rem);
  justify-self: center;
  font-size: 1.05rem;
}

.about-panel[hidden],
.image-column[hidden] {
  display: none;
}

.image-column {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: center;
}

.image-column__item {
  width: fit-content;
  max-width: min(100%, 720px);
}

.image-column__item[hidden] {
  display: none;
}

.image-column__open {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin-inline: auto;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
}

.image-column__open:focus {
  outline: none;
}

.image-column__item img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 86vh;
  max-height: 86dvh;
  margin-inline: auto;
}

.image-column__caption {
  display: flex;
  padding-top: 0.85rem;
  flex-direction: column;
  gap: 0.27rem;
  color: #000;
}

.image-column__title,
.image-column__meta {
  margin: 0;
}

.image-column__title {
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.image-column__meta,
.gallery-status {
  color: #000;
  font-size: 0.95rem;
  font-weight: 400;
}

.gallery-status {
  width: 100%;
  text-align: center;
}

.gallery-status--error {
  color: #8b0000;
}

.artwork-viewer {
  max-width: none;
  max-height: none;
  padding: 1rem;
  border: 0;
  background: transparent;
  color: #fff;
  overflow: visible;
}

.artwork-viewer::backdrop {
  background: rgb(0 0 0 / 88%);
}

.artwork-viewer__content,
.artwork-viewer__figure {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.artwork-viewer__content {
  max-width: calc(100vw - 2rem);
  max-height: calc(100dvh - 2rem);
  touch-action: pan-y;
}

.artwork-viewer__figure {
  width: fit-content;
}

.artwork-viewer__image {
  display: block;
  width: auto;
  max-width: calc(100vw - 2rem);
  height: auto;
  max-height: calc(100vh - 8rem);
  max-height: calc(100dvh - 8rem);
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

.artwork-viewer__caption {
  display: grid;
  width: 100%;
  padding-top: 0.75rem;
  grid-template-columns: 2.75rem minmax(0, max-content) 2.75rem;
  align-items: center;
  justify-content: center;
  gap: clamp(0.35rem, 1.5vw, 0.8rem);
  color: #fff;
}

.artwork-viewer__wall-text {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 0.27rem;
  text-align: left;
}

.artwork-viewer__title,
.artwork-viewer__meta {
  margin: 0;
}

.artwork-viewer__title {
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.artwork-viewer__meta {
  font-size: 0.95rem;
  font-weight: 400;
}

.artwork-viewer__arrow {
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  place-items: center;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 1.55rem;
  font-weight: 400;
  line-height: 1;
  opacity: 0.78;
}

.artwork-viewer__arrow:hover,
.artwork-viewer__arrow:focus-visible {
  opacity: 1;
}

.artwork-viewer__arrow:focus {
  outline: none;
}

.artwork-viewer__close {
  position: fixed;
  top: 1rem;
  right: 1.25rem;
  padding: 0.35rem 0.65rem;
  border: 1px solid rgb(255 255 255 / 55%);
  background: rgb(0 0 0 / 35%);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 500;
}

.artwork-viewer__close:hover,
.artwork-viewer__close:focus-visible {
  border-color: #fff;
}

.artwork-viewer__close:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.artwork-viewer[open] .artwork-viewer__content {
  animation: artwork-viewer-in 160ms ease-out;
}

.artwork-viewer[open]::backdrop {
  animation: artwork-backdrop-in 160ms ease-out;
}

@keyframes artwork-viewer-in {
  from {
    opacity: 0;
    transform: scale(0.985);
  }
}

@keyframes artwork-backdrop-in {
  from {
    background: rgb(0 0 0 / 0%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .artwork-viewer[open] .artwork-viewer__content,
  .artwork-viewer[open]::backdrop {
    animation: none;
  }
}

@media (min-width: 641px) {
  .image-column__item {
    max-width: 100%;
  }

  .image-column__item img {
    max-height: 82vh;
    max-height: 82dvh;
  }
}

@media (max-width: 800px) {
  .wrapper {
    padding-inline: 12px;
  }
}

@media (max-width: 640px) {
  .page-content {
    padding-block: 2.75rem 3rem;
  }

  .gallery-filters {
    margin-bottom: 1.25rem;
    column-gap: 0.85rem;
  }

  .image-column {
    gap: 1.5rem;
  }

  .image-column__meta {
    font-size: 0.9rem;
  }
}

@media (min-width: 1100px) {
  .gallery-layout {
    grid-template-columns:
      minmax(10rem, 1fr)
      minmax(0, 52rem)
      minmax(10rem, 1fr);
  }

  .gallery-filters {
    position: sticky;
    top: 1.5rem;
    grid-column: 1;
    align-self: start;
    margin: 0;
    padding-right: 0.25rem;
    flex-direction: column;
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 0.35rem;
  }

  .image-column {
    grid-column: 2;
  }

  .about-panel {
    grid-column: 2;
  }
}
