/* Projects — was Projects.module.css. The bundler's hashed class names are
   replaced by a plain c-Projects_ prefix so the stylesheet stands alone. */

.c-Projects_projects {
  position: relative;
  width: 100%;
  padding: 0.5rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  overflow: hidden;
  background-color: var(--base-200);
  color: var(--base-1000);
}

.c-Projects_row {
  width: 125%;
  display: flex;
  gap: 1rem;
}

.c-Projects_project {
  flex: 1;
  aspect-ratio: 7 / 5;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
}

.c-Projects_image {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  border-radius: 0.25rem;
}

.c-Projects_info {
  display: flex;
  justify-content: space-between;
  padding: 0.25rem 0;
}

/* The wall is the desktop view; the flat list below is the mobile one. Each
   hides the other, so only one of the two ever paints. */
.c-Projects_projectsMobile { display: none; }

@media (max-width: 1000px) {
  .c-Projects_projects { display: none; }

  .c-Projects_projectsMobile {
    position: relative;
    width: 100%;
    background-color: var(--base-200);
    color: var(--base-1000);
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    height: auto;
    overflow: visible;
    padding: 1rem 1.25rem 3rem;
    align-items: stretch;
  }

  .c-Projects_projectsMobile .c-Projects_project {
    flex: none;
    width: 100%;
    /* The wall card is a fixed 7:5 box with the caption inside it; in the list
       the box belongs to the image alone and the caption sits under it. */
    aspect-ratio: auto;
  }

  .c-Projects_projectsMobile .c-Projects_image {
    aspect-ratio: 7 / 5;
    flex: none;
  }
}
