.project-video {
  --pv-accent: #fff;
  --pv-bg: #000;
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--pv-bg);
  border-radius: 12px;
  isolation: isolate;
  user-select: none;
}

/* Provider iframe: fills the box and can never be clicked, so the
   YouTube / Vimeo UI never shows on hover or click. */
.project-video__embed,
.project-video__mount,
.project-video__embed iframe {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  border: 0;
  pointer-events: none;
}

.project-video__poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}
.project-video__poster.is-visible { opacity: 1; }

.project-video__surface {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  cursor: pointer;
  outline: none;
}
.project-video__surface:focus-visible {
  box-shadow: inset 0 0 0 3px var(--pv-accent);
}

.project-video__bigplay {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  font-size: 30px;
  color: #111;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.project-video__bigplay svg { transform: translateX(2px); }
.project-video__surface:hover .project-video__bigplay { transform: scale(1.06); }
.project-video__bigplay.is-hidden { opacity: 0; transform: scale(0.9); }

.project-video__spinner {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 3px solid rgba(0, 0, 0, 0.2);
  border-top-color: #111;
  animation: pv-spin 0.8s linear infinite;
}
@keyframes pv-spin { to { transform: rotate(360deg); } }

/* Control bar: hidden until first play, then appears on hover / pause */
.project-video__controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 28px 16px 14px;
  color: #fff;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.65), transparent);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.project-video[data-started][data-controls-visible] .project-video__controls,
.project-video[data-started][data-keyboard-controls]:focus-within .project-video__controls,
.project-video[data-started].is-paused .project-video__controls,
.project-video[data-started].is-ended .project-video__controls {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.project-video__btn {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  font-size: 20px;
  color: inherit;
  background: transparent;
  cursor: pointer;
}
.project-video__btn:hover { background: rgba(255, 255, 255, 0.15); }
.project-video__btn:focus-visible { outline: 2px solid var(--pv-accent); }

.project-video__time {
  font: 500 12px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  font-variant-numeric: tabular-nums;
  min-width: 36px;
  text-align: center;
}

.project-video__scrub {
  flex: 1;
  height: 4px;
  appearance: none;
  -webkit-appearance: none;
  border-radius: 2px;
  background: linear-gradient(
    to right,
    var(--pv-accent) var(--progress, 0%),
    rgba(255, 255, 255, 0.3) var(--progress, 0%)
  );
  cursor: pointer;
}
.project-video__scrub::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--pv-accent);
}
.project-video__scrub::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 50%;
  background: var(--pv-accent);
}

.project-video__error {
  position: absolute;
  inset: auto 0 50% 0;
  z-index: 4;
  text-align: center;
  color: #fff;
  font-size: 14px;
  transform: translateY(70px);
}

@media (prefers-reduced-motion: reduce) {
  .project-video * { transition: none !important; animation-duration: 2s !important; }
}
/* Fit the supplied component into the portfolio's existing media layout. */
.project-video{margin:25px 0;border-radius:0}.project-video--vertical{max-width:480px;margin:25px auto}
.project-video__bigplay{position:absolute;right:5%;bottom:9%;width:54px;height:54px;font-size:24px}
.project-video__bigplay svg,.project-video__btn svg{width:1em;height:1em}
.project-video__label{position:absolute;left:4%;bottom:7%;z-index:2;color:white;font-size:14px;pointer-events:none;text-shadow:0 1px 6px #000}
.project-video__label[hidden],.project-video__error[hidden]{display:none}.project-video__error{pointer-events:none}
.project-video__poster{object-fit:cover}.project-video__controls{box-sizing:border-box}
@media(max-width:650px){.project-video__bigplay{width:38px;height:38px;font-size:20px}.project-video__label{font-size:11px}.project-video__controls{gap:6px;padding:22px 10px 10px}.project-video__time{font-size:10px;min-width:30px}}
/* Transparent outlined play button with a geometrically centered triangle. */
.project-video__bigplay{background:transparent;border:1px solid #fff;color:#fff;box-shadow:none;box-sizing:border-box}
.project-video__bigplay svg{transform:none}
.project-video__volume-control{display:flex;align-items:center;gap:4px}
.project-video__volume{width:72px;min-width:40px;height:4px;accent-color:#fff;cursor:pointer}
.project-video__volume-step{display:grid;place-items:center;width:24px;height:30px;color:white;font-size:18px;line-height:1;flex-shrink:0}
@media(max-width:650px){.project-video__volume{width:42px}.project-video__volume-control{gap:1px}.project-video__volume-step{width:22px}.project-video__controls{gap:4px}}
