.home-gallery {
  container-type: inline-size;
}

.home-gallery .selected-grid {
  display: block;
  position: relative;
  width: 100%;
  max-width: none;
  height: 46.25cqw;
  margin: 0;
}

.home-gallery .project-card {
  min-width: 0;
  aspect-ratio: auto;
  height: auto;
  margin: 0;
  background: transparent;
}

.home-gallery .selected-grid .project-card { position: absolute; }
.home-gallery .project-card > a { display: block; cursor: pointer; }
.home-gallery .project-card img { display: block; width: 100%; height: auto; }
.home-gallery .project-card:hover img { transform: none; }
.home-gallery .selected-grid img { aspect-ratio: 1394 / 1800; object-fit: contain; object-position: center top; }
.home-gallery .selected-grid .project-card:nth-child(3) img { aspect-ratio: 1380 / 1800; }

.home-gallery .selected-grid .project-card:nth-child(1) { left: 5.416667%; top: 1.614583cqw; width: 24.114583%; }
.home-gallery .selected-grid .project-card:nth-child(2) { left: 30.989583%; top: 5.3125cqw; width: 27.8125%; }
.home-gallery .selected-grid .project-card:nth-child(3) { left: 74.635417%; top: 3.020833cqw; width: 20.46875%; }
.home-gallery .selected-grid .project-card:nth-child(4) { left: 60.260417%; top: 24.84375cqw; width: 15.885417%; z-index: 1; }

.home-gallery .home-more {
  display: grid;
  grid-template-columns: 19fr 39fr 17fr 25fr;
  gap: 1.45cqw;
  align-items: start;
  padding: 2.2cqw 4.895833% 5cqw 5.416667%;
}

.home-gallery .home-more .project-card { align-self: start; overflow: visible; }
.home-gallery .home-more .project-card:nth-child(1) { margin-top: 5.5cqw; }
.home-gallery .home-more .project-card:nth-child(3) { margin-top: 13cqw; }
.home-gallery .home-more .project-card:nth-child(4) { margin-top: 2.5cqw; }
.home-gallery .home-more img.image-loading:not([width]) { aspect-ratio: 3 / 4; }

.home-gallery .home-more:empty,
.home-gallery[data-device="mobile"] .home-more { display: none; }
.home-gallery[data-device="mobile"] .selected-grid { height: 132cqw; }
.home-gallery[data-device="mobile"] .selected-grid .project-card:nth-child(1) { left: 5%; top: 5cqw; width: 43%; }
.home-gallery[data-device="mobile"] .selected-grid .project-card:nth-child(2) { left: 52%; top: 17cqw; width: 43%; }
.home-gallery[data-device="mobile"] .selected-grid .project-card:nth-child(3) { left: 9%; top: 70cqw; width: 38%; }
.home-gallery[data-device="mobile"] .selected-grid .project-card:nth-child(4) { left: 56%; top: 88cqw; width: 28%; }
