.project-gallery {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr;
  gap: 12px;
  margin-top: 46px;
}

.project-gallery figure {
  position: relative;
  min-height: 290px;
  margin: 0;
  overflow: hidden;
  background: #020a17;
}

.project-gallery figure[hidden] { display: none; }

.project-gallery img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}

.project-gallery figure:nth-child(2) img { object-position: 35% center; }
.project-gallery figure:nth-child(3) img { object-position: 70% center; }
.project-gallery figure:hover img { transform: scale(1.035); }

.project-gallery figure::after {
  content: '';
  position: absolute;
  inset: 35% 0 0;
  background: linear-gradient(transparent, #03070ddd);
}

.project-gallery figcaption {
  position: absolute;
  right: 22px;
  bottom: 18px;
  left: 22px;
  z-index: 2;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.gallery-controls > div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 6px 0;
  border-top: 1px solid #ccd1d8;
}

.gallery-controls > div label { min-width: 0; }
.gallery-controls > div input { width: 185px; max-width: 48vw; }
.gallery-controls > div button {
  border: 0;
  background: transparent;
  color: #b01620;
  font-size: .78rem;
  text-decoration: underline;
  cursor: pointer;
}

@media (max-width: 780px) {
  .project-gallery {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 34px;
  }

  .project-gallery figure { min-height: 240px; }
}
