/* Recent Projects — sliding gallery */
.projects-gallery {
  padding: clamp(4rem, 8vw, 6.5rem) 0 clamp(3.25rem, 6vw, 4.75rem);
  background: var(--paper, #fff);
  overflow: hidden;
}

.projects-gallery__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1.5rem 2.5rem;
  margin-bottom: clamp(2rem, 4vw, 2.75rem);
  flex-wrap: wrap;
}

.projects-gallery__head-copy {
  flex: 1 1 280px;
  min-width: 0;
}

.projects-gallery__head .kicker {
  margin-bottom: 0.75rem;
}

.projects-gallery__head .section__title {
  margin-bottom: 0;
  font-size: clamp(2.1rem, 5vw, 3.6rem);
  line-height: 0.96;
}

.projects-gallery__cta {
  flex-shrink: 0;
  align-self: flex-end;
  margin-bottom: 0.15rem;
}

.projects-gallery__viewport {
  position: relative;
  width: 100%;
}

.projects-gallery__track {
  display: flex;
  gap: 0.65rem;
  padding: 0 var(--pad, 24px);
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  cursor: grab;
  scrollbar-width: none;
  outline: none;
}

.projects-gallery__track::-webkit-scrollbar {
  display: none;
}

.projects-gallery__track.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
  user-select: none;
}

.projects-gallery__track:focus-visible {
  box-shadow: inset 0 0 0 2px var(--brand-gold, #AD012E);
}

.projects-gallery__card {
  position: relative;
  flex: 0 0 clamp(260px, 26vw, 380px);
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 2px;
  scroll-snap-align: start;
  background: var(--ink, #0f1011);
  isolation: isolate;
}

.projects-gallery__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.7s var(--ease, cubic-bezier(0.22, 1, 0.36, 1));
  pointer-events: none;
}

.projects-gallery__card:hover .projects-gallery__image {
  transform: scale(1.06);
}

.projects-gallery__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.35rem 1.2rem 1.25rem;
  background: linear-gradient(
    to top,
    rgba(15, 16, 17, 0.88) 0%,
    rgba(15, 16, 17, 0.35) 42%,
    transparent 68%
  );
  color: #fff;
  pointer-events: none;
}

.projects-gallery__cat {
  font-family: var(--font-body, "Manrope", system-ui, sans-serif);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brand-gold, #AD012E);
  margin-bottom: 0.4rem;
}

.projects-gallery__title {
  font-family: var(--font-serif, "Fraunces", Georgia, serif);
  font-style: italic;
  font-weight: 700;
  font-size: clamp(1.15rem, 1.8vw, 1.45rem);
  line-height: 1.2;
  letter-spacing: 0;
  text-transform: none;
  color: #fff;
  margin: 0;
}

.projects-gallery__progress {
  margin-top: 1.5rem;
  padding: 0 0.15rem;
}

.projects-gallery__progress-track {
  position: relative;
  height: 3px;
  background: rgba(15, 16, 17, 0.12);
  border-radius: 999px;
  overflow: hidden;
}

.projects-gallery__progress-bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 20%;
  background: var(--brand-gold, #AD012E);
  border-radius: inherit;
  transform-origin: left center;
  transition: width 0.12s linear;
  will-change: width;
}

@media (max-width: 720px) {
  .projects-gallery__head {
    align-items: flex-start;
  }

  .projects-gallery__cta {
    align-self: flex-start;
  }

  .projects-gallery__card {
    flex-basis: clamp(240px, 72vw, 320px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .projects-gallery__image {
    transition: none;
  }

  .projects-gallery__card:hover .projects-gallery__image {
    transform: none;
  }

  .projects-gallery__progress-bar {
    transition: none;
  }
}
