/* ============================================================
   Work / Portfolio grid
   ============================================================ */

.work-hero {
  position: relative;
  padding-top: calc(var(--nav-height) + clamp(3rem, 8vw, 6rem));
  padding-bottom: clamp(3rem, 6vw, 6rem);
  text-align: center;
  isolation: isolate;
}
.work-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-brand-soft);
  opacity: 0.55;
  z-index: -1;
}
.work-hero h1 {
  font-size: var(--fs-4xl);
  margin-bottom: var(--space-4);
}
.work-hero p {
  color: var(--fg-muted);
  max-width: 42rem;
  margin: 0 auto var(--space-6);
  font-size: var(--fs-md);
}

/* Filter chips */
.work-filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  justify-content: center;
  margin-bottom: var(--space-6);
}

/* Grid */
.work-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--space-5);
  padding-bottom: clamp(4rem, 8vw, 8rem);
}
.work-grid > a { grid-column: span 6; }
.work-grid > a.feature { grid-column: span 12; aspect-ratio: 21 / 9; }
.work-grid > a.tall { grid-column: span 4; aspect-ratio: 3 / 4; }

@media (max-width: 1024px) {
  .work-grid > a { grid-column: span 6; aspect-ratio: 16 / 10; }
  .work-grid > a.feature { grid-column: span 12; aspect-ratio: 16 / 9; }
  .work-grid > a.tall { grid-column: span 6; aspect-ratio: 4 / 5; }
}
@media (max-width: 640px) {
  .work-grid > a, .work-grid > a.feature, .work-grid > a.tall { grid-column: span 12; aspect-ratio: 16 / 10; }
}

/* Empty filter state */
.work-grid:has(> a:not([style*="display: none"]):nth-of-type(1):last-of-type)::before {
  content: 'No projects in this filter yet.';
  color: var(--fg-muted);
  text-align: center;
  grid-column: span 12;
  padding: var(--space-8);
}
