.wp-block-child-theme-projects {
  container: projects/inline-size;
  display: flex;
  flex-direction: column;
  gap: var(--wp--preset--spacing--60);
}

.projects-grid {
  display: grid;
  column-gap: var(--wp--preset--spacing--40);
  row-gap: var(--wp--preset--spacing--50);
  grid-template-columns: 1fr;
}
.projects-grid > p {
  grid-column: 1/-1;
}
@container projects (min-width: 992px) {
  .projects-grid {
    grid-template-columns: repeat(10, 1fr);
  }
  .projects-grid > .project-card:nth-child(4n+1) {
    grid-column: span 4;
  }
  .projects-grid > .project-card:nth-child(4n+2) {
    grid-column: span 6;
  }
  .projects-grid > .project-card:nth-child(4n+3) {
    grid-column: span 6;
  }
  .projects-grid > .project-card:nth-child(4n+4) {
    grid-column: span 4;
  }
}

.project-card__image-link:focus-visible {
  outline-offset: 4px;
}

.project-card {
  background-color: transparent;
  color: var(--wp--preset--color--base);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
}
.project-card:hover {
  transform: translateY(-5px);
}
.project-card:hover .project-card__image-link img {
  transform: scale(1.05);
}
.project-card:hover .project-card__title a::after {
  transform: scaleX(1);
}
.project-card__image-link {
  display: block;
  overflow: hidden;
  aspect-ratio: 1/1;
}
@container projects (min-width: 992px) {
  .project-card__image-link {
    aspect-ratio: unset;
    height: 28cqi;
  }
}
.project-card__image-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.project-card__content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: var(--wp--preset--spacing--20);
}
.project-card__title {
  font-size: var(--wp--preset--font-size--60);
  font-family: var(--wp--preset--font-family--reckless-neue);
  font-weight: 400;
  line-height: 1.3;
  margin: 0;
}
.project-card__title a {
  position: relative;
  text-decoration: none;
  color: inherit;
}
.project-card__title a::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: var(--wp--preset--color--accent-1);
  transform: scaleX(0);
  transform-origin: bottom left;
  transition: transform 0.3s ease-out;
}

.projects-sort {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: 100%;
}

.wp-block-child-theme-projects.has-scroll-reveal .project-card {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.wp-block-child-theme-projects.has-scroll-reveal .project-card.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .project-card {
    transition: none;
  }
  .project-card:hover {
    transform: none;
  }
  .project-card__image-link img {
    transition: none;
  }
  .project-card__title a::after {
    transition: none;
  }
  .wp-block-child-theme-projects .project-card {
    opacity: 1;
    transform: none;
    transition: none;
  }
}