/* Final home-card layout guard.
   This file loads after the motion styles, so it owns the final geometry. */
.grid,
.project,
.project .visual {
  min-width: 0;
  max-width: 100%;
}

.project,
.project.motion-edge-card {
  overflow: hidden !important;
}

.project .visual {
  position: relative !important;
  aspect-ratio: auto !important;
  padding: 18px !important;
  overflow: hidden !important;
  contain: paint;
}

.project .visual > img {
  position: static !important;
  inset: auto !important;
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  margin: 0 !important;
  aspect-ratio: 1.414 / 1 !important;
  object-fit: cover !important;
  object-position: center !important;
  border-radius: 20px;
}

.project.wide .visual > img {
  aspect-ratio: 1.9 / 1 !important;
}

.project.motion-edge-card > .motion-edge-glow {
  inset: 0 !important;
}

@media (max-width: 900px) {
  .grid {
    width: 100%;
    overflow: hidden;
  }

  .project,
  .project.wide {
    width: 100%;
    grid-column: 1 / -1;
  }
}

@media (max-width: 650px) {
  .project.wide .visual > img {
    aspect-ratio: 1.414 / 1 !important;
  }
}
