.gallery-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: none;
  grid-auto-rows: 330px;
}

.gallery-grid .project-card,
.gallery-grid .project-tall,
.gallery-grid .project-wide,
.gallery-grid .project-floor {
  grid-column: auto;
  grid-row: auto;
  display: flex;
  min-height: 0;
}

.gallery-grid .project-image {
  flex: 1;
  min-height: 0;
}

.gallery-grid .project-meta {
  min-height: 68px;
}

.gallery-footnote span:first-child {
  color: var(--sea-dark);
}

.gallery-filter-title {
  max-width: var(--wide);
  margin: -24px auto 12px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: .18em;
}

.gallery-filters {
  max-width: var(--wide);
  margin: 0 auto 8px;
  display: flex;
  gap: 9px;
  overflow-x: auto;
  scrollbar-width: thin;
  padding: 0 0 5px;
}

.gallery-filter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex: 0 0 auto;
  padding: 11px 14px;
  border: 1px solid rgba(18, 38, 45, .22);
  background: transparent;
  color: var(--ink);
  font-size: 12px;
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
}

.gallery-filter small {
  min-width: 20px;
  padding: 2px 5px;
  border-radius: 12px;
  background: rgba(18, 38, 45, .08);
  color: inherit;
  font-size: 10px;
  text-align: center;
}

.gallery-filter[aria-pressed="true"] {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--white);
}

.gallery-filter[aria-pressed="true"] small {
  background: rgba(255, 255, 255, .18);
}

.gallery-status {
  max-width: var(--wide);
  margin: 0 auto 24px;
  color: var(--muted);
  font-size: 12px;
}

.gallery-grid .project-card[hidden] {
  display: none !important;
}

@media (max-width: 900px) {
  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 320px;
  }
}

@media (max-width: 680px) {
  .gallery-filter-title {
    margin-top: -8px;
  }

  .gallery-filters {
    margin-right: -20px;
    padding-right: 20px;
  }

  .gallery-status {
    margin-bottom: 18px;
    font-size: 11px;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: none;
    grid-auto-rows: 270px;
  }

  .gallery-grid .project-card,
  .gallery-grid .project-tall,
  .gallery-grid .project-wide,
  .gallery-grid .project-floor {
    grid-column: auto;
    grid-row: auto;
  }

  .gallery-grid .project-meta {
    min-height: 62px;
  }
}
