.projects-archive {
  min-height: 100vh;
}

.projects-archive__intro {
  font-size: 2.4vw;
  line-height: 1.2;
  color: #000000;
  max-width: 48ch;
  margin-bottom: 8rem;
}

.project__hero img,
.project__image-2 img,
.project__image-3 img,
.project__image-4 img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background-color: #f2f2f2;
}

.project__hero,
.project__image-2,
.project__image-3,
.project__image-4 {
  background-color: #f2f2f2;
}

.js .project__hero,
.js .project__image-2,
.js .project__image-3,
.js .project__image-4 {
  position: relative;
  overflow: hidden;
}

.js .project__hero::after,
.js .project__image-2::after,
.js .project__image-3::after,
.js .project__image-4::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.55) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: translateX(-100%);
  animation: project-img-shimmer 1.8s linear infinite;
  will-change: transform;
}

.js .project__hero:has(img.is-img-loaded)::after,
.js .project__image-2:has(img.is-img-loaded)::after,
.js .project__image-3:has(img.is-img-loaded)::after,
.js .project__image-4:has(img.is-img-loaded)::after {
  animation: none;
  opacity: 0;
}

@keyframes project-img-shimmer {
  to {
    transform: translateX(100%);
  }
}

.js .project img {
  position: relative;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.js .project img.is-img-loaded {
  opacity: 1;
}

.project {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 2rem;
  margin-bottom: 5rem;
  padding-bottom: 5rem;
  max-width: 1440px;
}

.project__meta {
  grid-area: meta;
  display: flex;
  flex-direction: column;
}
.project__content {
  grid-area: tech;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.project__hero {
  grid-area: hero;
}
.project__image-2 {
  grid-area: image2;
}
.project__image-3 {
  grid-area: image3;
}
.project__image-4 {
  grid-area: image4;
}

.project--layout-1 {
  grid-template-areas:
    "meta meta meta hero hero hero"
    "image2 image2 image2 image2 tech tech"
    "image3 image3 image3 image4 image4 image4";
}

.project--layout-2 {
  grid-template-areas:
    "meta meta meta hero hero hero"
    "image2 image2 image2 image3 image3 image3"
    "image2 image2 image2 tech tech tech";
}

.project__title {
  font-size: 1.875rem;
  font-weight: 400;
  color: #000000;
  margin-bottom: 0.5rem;
}

.project__year,
.project__location {
  font-size: 1rem;
  color: #000000;
  line-height: 1;
}

.project__description {
  margin-top: auto;
}

.project__description p {
  font-size: 0.9375rem;
  line-height: 1.125;
  color: #000000;
  font-weight: 300;
  margin-bottom: 1rem;
  max-width: 48ch;
}

.project__description p:last-child {
  margin-bottom: 0;
}

.project__partners h3 {
  font-size: 1rem;
  font-weight: 400;
  color: #000000;
  margin-bottom: 0.5rem;
}

.project__partners ul {
  list-style: disc;
  padding-left: 1.1em;
}

.project__partners li {
  font-size: 0.9375rem;
  line-height: 1.125;
  color: #000000;
}

.project__partners a {
  display: inline-flex;
  align-items: center;
  color: inherit;
  text-decoration: none;
  font-weight: 300;
  transition: font-weight 0.2s ease;
}

.project__partners a:hover {
  font-weight: 700;
}

.partner-link__arrow {
  width: 0;
  height: 20px;
  margin-left: 0;
  overflow: hidden;
  flex-shrink: 0;
  transition:
    width 0.3s ease,
    margin-left 0.3s ease;
}

.project__partners a:hover .partner-link__arrow {
  width: 20px;
  margin-left: 6px;
}

.project__hero img {
  aspect-ratio: 3 / 2;
}

.project--layout-1 .project__image-2 img {
  aspect-ratio: 16 / 10;
}

.project--layout-1 .project__image-3 img,
.project--layout-1 .project__image-4 img {
  aspect-ratio: 3 / 2;
}

.project--layout-2 .project__image-2 img {
  aspect-ratio: 2 / 3;
}

.project--layout-2 .project__image-3 img {
  aspect-ratio: 16 / 9;
}

.project__tech h3 {
  font-size: 1rem;
  font-weight: 400;
  color: #000000;
  margin-bottom: 0.5rem;
}

.project__tech p {
  font-size: 0.9375rem;
  line-height: 1.375;
  color: #000000;
  margin-bottom: 1rem;
  font-weight: 300;
}

.project__tech p:last-child {
  margin-bottom: 0;
}

.projects-pagination {
  margin-top: 3rem;
}

.projects-pagination ul.page-numbers {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem;
  color: #000000;
}

.projects-pagination li .page-numbers {
  font-size: 2rem;
  font-weight: 400;
  opacity: 0.3;
  color: #000000;
}

.projects-pagination a.page-numbers:visited {
  color: #000000;
}

.projects-pagination a.page-numbers:hover {
  opacity: 0.6;
}

.projects-pagination span.page-numbers.current {
  opacity: 1;
  font-weight: 600;
}

.projects-pagination span.page-numbers.dots {
  color: #767676;
}

.projects-archive__more {
  margin-top: 4rem;
}

.projects-archive__more h2 {
  font-size: 1.5rem;
  font-weight: 500;
  color: #000000;
  margin-bottom: 1.25rem;
}

.projects-archive__cta {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border: 1px solid #000000;
  color: #000000;
  transition: opacity 0.2s ease;
}

.projects-archive__cta:hover {
  opacity: 0.65;
}

.projects-archive__cta--secondary {
  display: block;
  margin-top: 1.25rem;
  border: none;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 1023px) {
  .projects-archive__intro {
    font-size: 24px;
    margin-top: 6rem;
  }

  .project__location {
    margin-bottom: 0.85rem;
  }

  .project {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .project--layout-1 {
    grid-template-areas:
      "meta"
      "hero"
      "image2"
      "tech"
      "image3"
      "image4";
  }

  .project--layout-2 {
    grid-template-areas:
      "meta"
      "hero"
      "image2"
      "tech"
      "image3";
  }

  .project__tech + .project__partners {
    margin-top: 1.5rem;
  }
}
