.year-gallery {
  padding-top: clamp(28px, 4vw, 62px);
}
.year-gallery-heading {
  margin: 0 0 clamp(18px, 2.5vw, 32px);
  font-size: clamp(48px, 6vw, 86px);
  font-weight: 400;
  line-height: 1.05;
}
.year-gallery-media {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: space-between;
  gap: 0 clamp(6px, 1vw, 16px);
  border-block: 1px solid currentColor;
}
.year-gallery-medium {
  display: grid;
  align-items: center;
  min-height: 48px;
  padding: 2px 4px;
  white-space: nowrap;
  color: var(--soft);
  font-size: clamp(16px, 1.6vw, 22px);
}
.year-gallery-medium[aria-current] {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: .24em;
  text-decoration-thickness: 1px;
}
.year-gallery-medium:focus-visible { outline-offset: -3px; }

@media (max-width: 750px) {
  .year-gallery-media {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0 4px;
  }
  .year-gallery-medium {
    min-width: 0;
    min-height: 44px;
    padding-inline: 0;
    text-align: center;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .year-gallery-media:has(> :only-child) { grid-template-columns: 1fr; }
  .year-gallery-media:has(> :nth-child(2):last-child) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 450px) {
  .year-gallery-medium { font-size: 15px; }
}
@media (max-width: 385px) {
  .year-gallery-media { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.artwork-wall {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  padding: 0;
  margin: 0 auto;
  list-style: none;
  background: #fff;
}
.artwork-wall > li {
  position: absolute;
  left: var(--tile-x);
  top: var(--tile-y);
  width: var(--tile-width);
  height: var(--tile-height);
  margin: 0;
  padding: 0;
}
@media (max-width: 680px) {
  .artwork-wall-stacked { aspect-ratio: var(--stack-aspect); }
  .artwork-wall-stacked > li {
    left: var(--compact-x);
    top: var(--compact-y);
    width: var(--compact-width);
    height: var(--compact-height);
  }
}
.artwork-tile {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}
.artwork-tile img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
body[data-page="gallery"] .artwork-wall > li:only-child img { object-fit: contain; }
.artwork-tile:focus-visible {
  position: relative;
  z-index: 1;
  outline: 2px solid #191919;
  outline-offset: 1px;
  box-shadow: 0 0 0 3px #fff;
}
.year-gallery .artwork-wall { margin-top: clamp(20px, 2.3vw, 34px); }
.year-gallery-empty { margin: 2em 0; color: var(--soft); }
