.work {
  --portfolio-background: #10100f;
  background: var(--portfolio-background);
  color: #f7f3e9;
}

.portfolio-collection {
  max-width: 67rem;
  margin-inline: auto;
}

.portfolio-collection + .portfolio-collection {
  margin-top: clamp(3.5rem, 8vw, 6rem);
  padding-top: clamp(2rem, 5vw, 3.5rem);
  border-top: 1px solid #4a4843;
}

.portfolio-collection > h3 {
  margin: 0 0 clamp(1.5rem, 4vw, 2.5rem);
  font: 400 clamp(2.6rem, 6vw, 4.75rem)/1 var(--serif);
  letter-spacing: -.035em;
  text-align: center;
}

.portfolio-collection .portfolio-gallery {
  max-width: 62rem;
  margin-inline: auto;
}

.portfolio-gallery__stage {
  --photo-height: clamp(14rem, 38vw, 34rem);
  --photo-gap: clamp(.35rem, .8vw, .75rem);
  position: relative;
  isolation: isolate;
  height: var(--photo-height);
  overflow: hidden;
}

.portfolio-gallery__track,
.portfolio-gallery__strip {
  display: flex;
  width: max-content;
}

.portfolio-gallery__strip {
  position: relative;
  flex: none;
  gap: var(--photo-gap);
  padding-right: var(--photo-gap);
}

.portfolio-gallery__stage img {
  display: block;
  flex: none;
  width: auto;
  height: var(--photo-height);
  max-width: none;
  object-fit: contain;
}

.portfolio-gallery__status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.portfolio-gallery__playback {
  position: absolute;
  z-index: 2;
  right: .5rem;
  bottom: .5rem;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid #fff9eb80;
  border-radius: 50%;
  background: #161612de;
  color: #fff9eb;
}

.portfolio-gallery__playback[hidden] {
  display: none;
}

.portfolio-gallery__playback:hover,
.portfolio-gallery__playback:focus-visible {
  background: #161612;
}

.portfolio-gallery__playback::before {
  content: "";
  margin-left: 2px;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 9px solid currentColor;
}

.portfolio-gallery__playback[data-playing="true"]::before {
  width: 10px;
  height: 12px;
  margin-left: 0;
  border: 0;
  border-inline: 3px solid currentColor;
}

@media (max-width: 700px) {
  .portfolio-gallery__stage {
    --photo-height: clamp(10rem, 45vw, 15rem);
  }
}
