.portfolio-page .works-section {
  overflow: hidden;
  padding-top: 65px;
}

.portfolio-page .filters {
  margin-bottom: 52px;
}

.portfolio-page .work-carousel {
  position: relative;
}

.portfolio-page .work-grid {
  display: flex;
  grid-template-columns: none;
  gap: clamp(18px, 2.2vw, 34px);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: none;
  scrollbar-width: none;
  cursor: grab;
  padding: 16px 0 38px;
  touch-action: pan-x pan-y;
}

.portfolio-page .work-grid::-webkit-scrollbar {
  display: none;
}

.portfolio-page .work-grid:active {
  cursor: grabbing;
}

.portfolio-page .work {
  flex: 0 0 clamp(375px, 52.5vw, 775px);
  grid-column: auto !important;
  margin: 0 !important;
}

.portfolio-page .work.reveal {
  opacity: 1;
  transform: none;
}

.portfolio-page .work img {
  width: auto;
  height: clamp(538px, 75vh, 850px);
  max-width: min(52.5vw, 775px);
  object-fit: contain;
  background: transparent;
  filter: drop-shadow(0 12px 14px rgba(25, 24, 22, .16));
  user-select: none;
  -webkit-user-drag: none;
}

.portfolio-page .work[data-category="murales"] img {
  object-fit: contain;
}

.portfolio-page .work .meta {
  margin-top: 14px;
}

.portfolio-page .work h3 {
  font: 400 1.1rem var(--sans);
  margin: 5px 0;
  text-transform: uppercase;
}

.carousel-footer {
  display: grid;
  grid-template-columns: auto minmax(120px, 360px) auto;
  align-items: center;
  justify-content: end;
  gap: 20px;
  margin-top: 12px;
}

.carousel-hint {
  color: var(--brown);
  font-size: .68rem;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.carousel-progress {
  width: min(26vw, 360px);
  height: 1px;
  overflow: hidden;
  background: rgba(25, 24, 22, .2);
}

.carousel-progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--ink);
  transform: scaleX(.08);
  transform-origin: left center;
  will-change: transform;
}

.carousel-controls {
  display: flex;
  gap: 8px;
}

.carousel-arrow {
  width: 48px;
  height: 48px;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-size: 1.25rem;
  transition: .25s;
}

.carousel-arrow:hover,
.carousel-arrow:focus-visible {
  color: var(--paper);
  background: var(--ink);
}

.carousel-arrow:disabled {
  color: var(--ink);
  background: transparent;
  cursor: default;
  opacity: .3;
}

@media (max-width: 850px) {
  .portfolio-page .work {
    flex-basis: min(92vw, 538px);
  }

  .portfolio-page .work img {
    height: 72.5vh;
    max-width: min(92vw, 538px);
  }

  .carousel-footer {
    grid-template-columns: 1fr auto;
  }

  .carousel-hint {
    display: none;
  }

  .carousel-progress {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .portfolio-page .work-grid {
    scroll-behavior: auto;
    scroll-snap-type: none;
  }
}
