/* =========================================================
   01. INTRO VIDEO ALIGNMENT & WRAPPER
   Ensures the video is vertically centered in the 2-column
   intro grid, perfectly balanced with the text block.
   ========================================================= */

.intro__media--video,
.intro__media:has(#videoWrap) {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-self: center;
  width: 100%;
}

.intro__media-card {
  width: 100%;
  position: relative;
}

.project-video-wrap {
  position: relative;
  width: 100%;
  height: 540px;
  overflow: hidden;
  background: var(--navy-950, #060d22);
  border-radius: var(--r-lg, 22px);
  box-shadow: var(--shadow-lift);
  border: 1px solid rgba(18, 87, 196, 0.14);
  transition: transform 0.4s var(--ease, cubic-bezier(0.16, 1, 0.3, 1)),
              box-shadow 0.4s var(--ease, cubic-bezier(0.16, 1, 0.3, 1)),
              border-color 0.4s var(--ease, cubic-bezier(0.16, 1, 0.3, 1));
}

.project-video-wrap:hover {
  box-shadow: var(--ring-glow);
  border-color: rgba(46, 156, 226, 0.35);
}

/* =========================================================
   02. VIDEO ELEMENT
   Natural widescreen fit, crisp scaling
   ========================================================= */

.project-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  transition: transform 0.7s var(--ease, cubic-bezier(0.16, 1, 0.3, 1));
}

.project-video-wrap:hover .project-video {
  transform: scale(1.02);
}

/* =========================================================
   03. BADGE & INTERACTIVE CONTROLS
   Modern glassmorphic overlay elements
   ========================================================= */

.project-video-badge {
  position: absolute;
  top: 1.15rem;
  left: 1.15rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.8rem;
  background: rgba(6, 13, 34, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  font-family: var(--f-mono, 'JetBrains Mono', monospace);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #e4edfb;
  z-index: 3;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.project-video-badge__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10a683;
  box-shadow: 0 0 8px #10a683;
  animation: mp-pulse 2s infinite ease-in-out;
}

@keyframes mp-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.85); }
}

.project-video-controls {
  position: absolute;
  bottom: 1.15rem;
  right: 1.15rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  z-index: 3;
}

.project-video-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(6, 13, 34, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  cursor: pointer;
  transition: all 0.25s var(--ease, ease);
  padding: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.project-video-btn:hover {
  background: rgba(18, 87, 196, 0.9);
  border-color: rgba(91, 155, 245, 0.6);
  transform: scale(1.08);
  box-shadow: 0 0 16px rgba(46, 156, 226, 0.4);
}

.project-video-btn:focus-visible {
  outline: 2px solid var(--c-accent, #1257c4);
  outline-offset: 2px;
}

.project-video-btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
}

/* =========================================================
   04. MINI MODE
   Maintains compatibility if floating mini-player is triggered
   ========================================================= */

.project-video-wrap.is-mini {
  position: relative;
  width: 0;
  height: 0;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  overflow: visible;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.project-video-wrap.is-mini .project-video {
  position: fixed;
  right: var(--mp-gap, 24px);
  bottom: var(--mp-gap, 24px);
  width: var(--mp-w, 360px);
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  margin: 0;
  padding: 0;
  border-radius: var(--r-md, 16px);
  box-shadow: 0 24px 60px -12px rgba(0, 0, 0, 0.55), 0 2px 8px rgba(0, 0, 0, 0.3);
  z-index: 9999;
}

.project-video-wrap.is-mini .project-video-badge,
.project-video-wrap.is-mini .project-video-controls {
  display: none;
}

/* =========================================================
   05. RESPONSIVE BREAKPOINTS
   ========================================================= */

@media (max-width: 900px) {
  .intro__media--video {
    margin-top: 1.5rem;
  }
  .project-video-wrap {
    height: auto;
    aspect-ratio: 16 / 10;
  }
}

@media (max-width: 560px) {
  .project-video-badge {
    top: 0.75rem;
    left: 0.75rem;
    padding: 0.25rem 0.6rem;
    font-size: 0.625rem;
  }
  .project-video-controls {
    bottom: 0.75rem;
    right: 0.75rem;
  }
  .project-video-btn {
    width: 32px;
    height: 32px;
  }
  .project-video-btn svg {
    width: 14px;
    height: 14px;
  }
}
