.personal-img-slider {
  --personal-glow: 0;
  --personal-glow-image: none;
  position: relative;
  isolation: isolate;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 28px;
  border: none;
  background-color: #000;
  background-image: url('../projects/samuelrosenthal/generated/images/high/withRigzurechtgeschnitten_high_v3.webp');
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
}

/* glow moved from image-based pseudo-element to box-shadow on the slider */

.personal-img-after,
.personal-img-before {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: inherit;
}

.personal-img-before {
  z-index: 1;
}

.personal-img-after {
  position: absolute;
  inset: 0;
  z-index: 2;
  opacity: 0;
  pointer-events: none;
  overflow: visible;
}

.personal-img-after img,
.personal-img-before img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: inherit;
}

.personal-img-before img {
  width: 100%;
  max-width: none;
}

/* Parent-based glow: renders outside rounded slider while keeping child clipping */
.personalImg {
  position: relative;
}

.personal-img-slider {
  z-index: 1;
  transition: box-shadow 220ms ease, outline-color 220ms ease;
  box-shadow:
    inset 0 0 12px rgb(255 255 255 / calc(var(--personal-glow) * 0.42)),
    0 0 6px rgb(255 255 255 / calc(var(--personal-glow) * 0.98)),
    0 0 22px rgb(255 255 255 / calc(var(--personal-glow) * 0.82)),
    0 0 48px rgb(255 255 255 / calc(var(--personal-glow) * 0.62)),
    0 0 120px rgb(255 255 255 / calc(var(--personal-glow) * 0.45));
}

.personal-intro-video-wrap {
  --intro-video-glow-progress: 0;
  --intro-video-glow-alpha: calc(0.05 + (0.35 * var(--intro-video-glow-progress)));
  --intro-radius: 28px;
  margin-top: 18px;
  width: 100%;
  margin-left: 0;
  padding-bottom: clamp(48px, 6vw, 96px);
  position: relative;
  isolation: isolate;
  overflow: visible;
  border-radius: var(--intro-radius);
  z-index: 1;
}

#heroContent {
  position: relative;
  isolation: isolate;
  background-color: var(--wb-bg-color);
  overflow: visible !important;
}

#heroContent::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 50vh;
  pointer-events: none;
  z-index: 0;
  background: linear-gradient(180deg, rgb(0 0 0 / 0) 0%, rgb(0 0 0 / 1) 100%);
}

#heroContent .heroContentBackground {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  display: block;
  isolation: isolate;
}

#heroContent .heroContentBackground::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 50vh;
  background: linear-gradient(
    180deg,
    rgb(0 0 0 / 0) 0%,
    color-mix(in srgb, var(--wb-bg-color, #000) 55%, transparent) 30%,
    color-mix(in srgb, var(--wb-bg-color, #000) 82%, transparent) 62%,
    var(--wb-bg-color, #000) 100%
  );
  display: block;
  z-index: 2;
}

#heroContent .heroContentBackground::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgb(0 0 0 / 0.38), rgb(0 0 0 / 0.58));
  display: block;
  z-index: 1;
}

#heroContent .heroContentBackground[data-wb-zoom-overlay-hidden='1']::after {
  display: none;
}

#heroContent .heroContentBackground[data-wb-zoom-overlay-hidden='1']::before {
  display: none;
}

#heroContent .heroContentBackground__video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center center;
  position: absolute;
  inset: 0;
  z-index: 0;
}

#heroContent .heroContent {
  position: relative;
  z-index: 1;
}

.personal-intro-video-wrap::after {
  content: none;
}

.personal-intro-video {
  width: 100%;
  height: auto;
  display: block;
  position: relative;
  z-index: 2;
  border-radius: var(--intro-radius);
  border: none;
  outline: 1.5px solid rgb(255 255 255 / calc(var(--intro-video-glow-alpha) * 0.95));
  outline-offset: -1px;
  transition: outline-color 220ms ease, box-shadow 220ms ease;
  box-shadow:
    inset 0 0 34px rgb(255 255 255 / calc(var(--intro-video-glow-alpha) * 0.42)),
    0 0 16px rgb(255 255 255 / calc(var(--intro-video-glow-alpha) * 0.98)),
    0 0 44px rgb(255 255 255 / calc(var(--intro-video-glow-alpha) * 0.82)),
    0 0 96px rgb(255 255 255 / calc(var(--intro-video-glow-alpha) * 0.62)),
    0 0 170px rgb(255 255 255 / calc(var(--intro-video-glow-alpha) * 0.45));
}

.personal-intro-video-glow {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  border-radius: var(--intro-radius);
  filter: blur(20px);
  transform: scale(1.02);
  opacity: 0;
  pointer-events: none;
}

.personal-intro-video-wrap .intro-video-container {
  width: min(100%, 90%); /* so lassen, ist so gewünscht */
  margin: 0 auto;
  position: relative;
  border-radius: var(--intro-radius);
}

.dynamic-video-controls-wrap {
  position: relative;
  z-index: 32;
  isolation: isolate;
  width: 100%;
}

.dynamic-video-controls-wrap video {
  display: block;
  width: 100%;
  position: relative;
  z-index: 1;
}

.personal-intro-video-wrap .overlay-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 70px;
  height: 70px;
  padding: 0;
  line-height: 0;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.26);
  background: linear-gradient(135deg, rgba(255,255,255,0.12), rgba(12,12,12,0.08));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.03);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 4;
}

.dynamic-video-controls-wrap .overlay-play {
  z-index: 34;
}

.personal-intro-video-wrap .overlay-icon {
  width: 40%;
  height: 40%;
  display: block;
}

.personal-intro-video-wrap .controls-bar {
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  width: min(95%, 900px);
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(20, 7, 43, 0.25);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 4;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.5s ease, visibility 0s linear 0.5s;
}

.dynamic-video-controls-wrap .controls-bar {
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  width: min(95%, 900px);
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(20, 7, 43, 0.25);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 34;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.5s ease, visibility 0s linear 0.5s;
}

.personal-intro-video-wrap .intro-video-container.controls-active:hover .controls-bar,
.personal-intro-video-wrap .intro-video-container.controls-active:focus-within .controls-bar,
.dynamic-video-controls-wrap.controls-active:hover .controls-bar,
.dynamic-video-controls-wrap.controls-active:focus-within .controls-bar {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.5s ease, visibility 0s linear 0s;
}

@media (hover: none) {
  .personal-intro-video-wrap .intro-video-container.controls-active .controls-bar {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
}

.personal-intro-video-wrap .controls-bar button {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: none;
  background: none;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  flex-shrink: 0;
}

.dynamic-video-controls-wrap .controls-bar button {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: none;
  background: none;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  flex-shrink: 0;
}

.personal-intro-video-wrap #introPlayStopBtn {
  flex: 0 0 auto;
}

.personal-intro-video-wrap .intro-quality-select {
  flex: 0 0 auto;
  min-width: 108px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(18, 8, 36, 0.45);
  color: #fff;
  font-size: 13px;
  padding: 0 28px 0 12px;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.dynamic-video-controls-wrap .intro-quality-select {
  flex: 0 0 auto;
  min-width: 108px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(18, 8, 36, 0.45);
  color: #fff;
  font-size: 13px;
  padding: 0 28px 0 12px;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.personal-intro-video-wrap .intro-quality-select option {
  color: #111;
}

.dynamic-video-controls-wrap .intro-quality-select option {
  color: #111;
}

.personal-intro-video-wrap .controls-bar input[type="range"] {
  flex: 1;
  height: 4px;
  border: none;
  border-radius: 2px;
  background: #ddd;
}

.dynamic-video-controls-wrap .controls-bar input[type="range"] {
  flex: 1;
  height: 4px;
  border: none;
  border-radius: 2px;
  background: #ddd;
}

.personal-intro-video-wrap .controls-bar input[type="range"]::-webkit-slider-thumb {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: #707070;
}

.dynamic-video-controls-wrap .controls-bar input[type="range"]::-webkit-slider-thumb {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: #707070;
}

.personal-intro-video-wrap .controls-bar input[type="range"]::-moz-range-thumb {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: #707070;
}

.dynamic-video-controls-wrap .controls-bar input[type="range"]::-moz-range-thumb {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: #707070;
}

.intro-volume-control {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 124px;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
}

.dynamic-video-controls-wrap .intro-volume-control {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 124px;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
}

.intro-volume-icon {
  font-size: 14px;
  line-height: 1;
  color: #fff;
  width: auto;
  height: auto;
  display: grid;
  place-items: center;
  text-shadow: none;
  box-shadow: none;
  filter: none;
}

.dynamic-video-controls-wrap .intro-volume-icon {
  font-size: 14px;
  line-height: 1;
  color: #fff;
  width: auto;
  height: auto;
  display: grid;
  place-items: center;
  text-shadow: none;
  box-shadow: none;
  filter: none;
}

.intro-volume-icon i {
  text-shadow: none;
  box-shadow: none;
  filter: none;
}

.dynamic-video-controls-wrap .intro-volume-icon i {
  text-shadow: none;
  box-shadow: none;
  filter: none;
}

.intro-volume-slider {
  width: 88px;
  height: 4px;
  margin: 0;
  accent-color: #fff;
  appearance: none;
  -webkit-appearance: none;
  background: #ddd;
}

.dynamic-video-controls-wrap .intro-volume-slider {
  width: 88px;
  height: 4px;
  margin: 0;
  accent-color: #fff;
  appearance: none;
  -webkit-appearance: none;
  background: #ddd;
}

.intro-volume-slider::-webkit-slider-runnable-track {
  height: 4px;
  background: #ddd;
  border-radius: 2px;
}

.intro-volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #707070;
  margin-top: -3px;
}

.intro-volume-slider::-moz-range-track {
  height: 4px;
  background: #ddd;
  border-radius: 2px;
}

.intro-volume-slider::-moz-range-thumb {
  width: 10px;
  height: 10px;
  border: 0;
  background: #707070;
  border-radius: 50%;
}

.intro-volume-slider:focus {
  outline: none;
}

.personal-intro-video-wrap .about-vid {
  width: 100%;
  max-width: none;
  height: auto;
  display: block;
}

/* Hide volume control until the video is fullscreen/native-expanded.
   Volume is visible only when the wrapper is fullscreen or explicitly
   marked as a native fullscreen host. This prevents showing the sound
   control in small/inline previews. */
.dynamic-video-controls-wrap .intro-volume-control {
  display: none !important;
}
/* Show volume control when the video is presented in an expanded/fullscreen
   context: native fullscreen, the JS-driven custom overlay (`in-video-fs-overlay`),
   or when the wrapper is marked as a native fullscreen host. */
.dynamic-video-controls-wrap:fullscreen .intro-volume-control,
.dynamic-video-controls-wrap:-webkit-full-screen .intro-volume-control,
.dynamic-video-controls-wrap.is-native-fullscreen-host .intro-volume-control,
.dynamic-video-controls-wrap.in-video-fs-overlay .intro-volume-control,
#video-fs-overlay .dynamic-video-controls-wrap .intro-volume-control {
  display: flex !important;
}

/* Mobile: center the intro video and keep a tall, square-friendly viewport fit. */
@media (max-width: 1199px) {
  #heroContent .heroContentBackground__video {
    display: none;
  }

  .personal-intro-video-wrap {
    --intro-radius: 28px;
    border-radius: var(--intro-radius);
    margin-left: 0;
    width: 100%;
    overflow: visible;
      padding-bottom: 80px;
    margin-top:0;
  }

  .personal-intro-video-wrap .intro-video-container {
    width: 100% !important;
    max-width: none !important;
    margin: 0 auto;
    padding:0px 20px;

    border-radius: var(--intro-radius);
    display: block;
    height: auto;
    min-height: 0;
    max-height: none;
    overflow: visible;
  }

  .personal-intro-video,
  .personal-intro-video-glow {
    border-radius: var(--intro-radius) !important;
  }

  .personal-intro-video {
    height: auto;
    width: 100%;
    aspect-ratio: 1.618 / 1;
    object-fit: cover;
    object-position: center center;
    outline: none;
    box-shadow:
      0 0 8px rgb(255 255 255 / 0.90),
      0 0 24px rgb(255 255 255 / 0.72),
      0 0 60px rgb(255 255 255 / 0.50),
      0 0 120px rgb(255 255 255 / 0.32);
  }

  .personal-intro-video-wrap .dynamic-video-controls-wrap {
    width: 100%;
    height: auto;
  }

  .personal-intro-video-wrap .dynamic-video-controls-wrap video {
    width: 100%;
    height: auto;
  }

  .personal-intro-video-wrap .controls-bar {
    width: min(95%, 900px);
    left: 50%;
    transform: translateX(-50%);
  }

  .personal-img-slider {
    aspect-ratio: 1 / 1.618;
    border: 5px solid white;
    overflow: hidden;
    box-shadow:
      0 0 8px rgb(255 255 255 / 0.90),
      0 0 24px rgb(255 255 255 / 0.72),
      0 0 60px rgb(255 255 255 / 0.50),
      0 0 120px rgb(255 255 255 / 0.32);
  }

  .personal-img-before {
    display: none !important;
  }

  .personal-img-after {
    display: block !important;
    opacity: 1 !important;

  }

  .personal-img-after picture,
  .personal-img-after img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    border-radius: 0;
  }


}
