.portfolio-hero {
  aspect-ratio: auto;
  height: min(56.25vw, 100svh);
  min-height: 560px;
  isolation: isolate;
}

.portfolio-hero-poster,
.portfolio-hero-poster img,
.portfolio-hero-video {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
  pointer-events: none;
}

.portfolio-hero-video { opacity: 0; transition: opacity 180ms ease; }
.portfolio-hero-video.is-playing { opacity: 1; }
.portfolio-hero-shade {
  background: linear-gradient(90deg, rgba(0, 5, 15, .48), rgba(0, 5, 15, .16) 64%, rgba(0, 5, 15, .1));
}

.portfolio-hero-playback {
  position: absolute;
  z-index: 3;
  left: 4.6%;
  bottom: 28px;
  display: grid;
  width: 44px;
  height: 44px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 50%;
  background: rgba(0, 0, 0, .22);
  color: #fff;
  cursor: pointer;
}
.portfolio-hero-playback:hover { background: rgba(0, 0, 0, .4); }
.portfolio-hero-playback:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }
.portfolio-hero-playback span { width: 10px; height: 13px; border-inline: 3px solid currentColor; }
.portfolio-hero-playback.is-paused span {
  width: 0;
  height: 0;
  margin-left: 3px;
  border: 7px solid transparent;
  border-right: 0;
  border-left: 10px solid currentColor;
}

@media (max-width: 900px) {
  .portfolio-hero { height: 100svh; min-height: 560px; }
  .portfolio-hero-content {
    height: 100%;
    justify-content: center;
    padding: 100px 24px 104px;
    transform: none;
  }
  .portfolio-hero-shade {
    background: linear-gradient(180deg, rgba(0, 5, 15, .18), rgba(0, 5, 15, .4) 55%, rgba(0, 5, 15, .3));
  }
  .portfolio-hero-playback { left: 24px; bottom: max(24px, env(safe-area-inset-bottom)); }
  .portfolio-hero .portfolio-scroll { bottom: max(32px, env(safe-area-inset-bottom)); }
}

@media (max-width: 560px) {
  .portfolio-hero-content { padding-right: 20px; padding-left: 20px; }
  .portfolio-hero h1 { font-size: clamp(32px, 9.2vw, 42px); line-height: 1.16; }
  .portfolio-hero-playback { left: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .portfolio-hero-video { transition: none; }
}
