/* ---------- Floating device mockups ---------- */

.floater {
  position: absolute;
  z-index: 2;
  pointer-events: none;
  width: min(220px, 22vw);
  user-select: none;
}

.floater--sm {
  width: min(170px, 18vw);
}

.floater--lg {
  width: min(250px, 26vw);
}

.floater__orb {
  position: absolute;
  left: 50%;
  top: 48%;
  width: 145%;
  aspect-ratio: 1;
  translate: -50% -50%;
  border-radius: 50%;
  z-index: 0;
  filter: blur(0.5px);
}

.floater__orb--coral {
  background: radial-gradient(circle, rgba(255, 112, 90, 0.42) 0%, rgba(255, 112, 90, 0.12) 42%, transparent 68%);
}

.floater__orb--sky {
  background: radial-gradient(circle, rgba(56, 189, 248, 0.4) 0%, rgba(56, 189, 248, 0.1) 42%, transparent 68%);
}

.floater__orb--mint {
  background: radial-gradient(circle, rgba(52, 211, 153, 0.38) 0%, rgba(52, 211, 153, 0.1) 42%, transparent 68%);
}

.floater__orb--warm {
  background: radial-gradient(circle, rgba(251, 146, 60, 0.38) 0%, rgba(251, 146, 60, 0.1) 42%, transparent 68%);
}

.floater__orb--violet {
  background: radial-gradient(circle, rgba(168, 85, 247, 0.4) 0%, rgba(236, 72, 153, 0.14) 42%, transparent 68%);
}

/* Pre-framed PNG mockups (already include a device) */
.floater__img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 24px 42px rgba(15, 19, 24, 0.32));
  transform-origin: center center;
  animation: floater-bob 7s ease-in-out infinite;
}

/* Hide black studio backdrops on dark sections */
.about-me .floater__img,
.training .floater__img {
  mix-blend-mode: lighten;
}

/* CSS phone chassis for rectangular screenshots */
.floater__phone {
  position: relative;
  z-index: 1;
  width: 100%;
  aspect-ratio: 9 / 19.2;
  border-radius: 2.15rem;
  background:
    linear-gradient(160deg, #3a3d44 0%, #1a1c20 42%, #0c0d10 100%);
  padding: 0.55rem;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    inset 0 -1px 0 rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(0, 0, 0, 0.45),
    0 28px 50px -18px rgba(15, 19, 24, 0.55);
  animation: floater-bob 7s ease-in-out infinite;
  transform-origin: center center;
}

.floater__phone::before,
.floater__phone::after {
  content: '';
  position: absolute;
  z-index: 3;
  background: #0a0b0e;
  border-radius: 2px;
}

/* Volume rockers */
.floater__phone::before {
  left: -2px;
  top: 18%;
  width: 3px;
  height: 14%;
  box-shadow: 0 22px 0 #0a0b0e;
}

/* Power button */
.floater__phone::after {
  right: -2px;
  top: 24%;
  width: 3px;
  height: 10%;
}

.floater__screen-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 1.65rem;
  overflow: hidden;
  background: #020617;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.floater__island {
  position: absolute;
  z-index: 4;
  top: 0.55rem;
  left: 50%;
  translate: -50% 0;
  width: 32%;
  height: 1.05rem;
  border-radius: 999px;
  background: #050507;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.floater__island::after {
  content: '';
  position: absolute;
  right: 0.35rem;
  top: 50%;
  translate: 0 -50%;
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #1e293b, #020617 70%);
  box-shadow: inset 0 0 0 1px rgba(56, 189, 248, 0.15);
}

.floater__screen {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  background: #0f172a;
}

.floater__home {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 0.45rem;
  translate: -50% 0;
  width: 34%;
  height: 0.28rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
}

.floater--delay .floater__img,
.floater--delay .floater__phone {
  animation-delay: -2.4s;
}

.floater--delay-2 .floater__img,
.floater--delay-2 .floater__phone {
  animation-delay: -4.2s;
}

.floater--tilt-left .floater__img,
.floater--tilt-left .floater__phone {
  animation-name: floater-bob-left;
}

.floater--tilt-right .floater__img,
.floater--tilt-right .floater__phone {
  animation-name: floater-bob-right;
}

.floater--tr {
  top: 6%;
  right: max(-1vw, calc((100vw - var(--container, 1200px)) / -2 - 8px));
}

.floater--br {
  bottom: 4%;
  right: max(-1vw, calc((100vw - var(--container, 1200px)) / -2 - 4px));
}

.floater--tl {
  top: 10%;
  left: max(-1vw, calc((100vw - var(--container, 1200px)) / -2 - 8px));
}

.floater--bl {
  bottom: 8%;
  left: max(-1vw, calc((100vw - var(--container, 1200px)) / -2 - 4px));
}

.floater--mr {
  top: 42%;
  right: max(-2vw, calc((100vw - var(--container, 1200px)) / -2 - 18px));
  translate: 0 -50%;
}

@keyframes floater-bob {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -12px;
  }
}

@keyframes floater-bob-left {
  0%,
  100% {
    transform: rotate(-7deg) translateY(0);
  }
  50% {
    transform: rotate(-7deg) translateY(-12px);
  }
}

@keyframes floater-bob-right {
  0%,
  100% {
    transform: rotate(6deg) translateY(0);
  }
  50% {
    transform: rotate(6deg) translateY(-12px);
  }
}

.about-me,
.impact,
.platforms,
.training,
.contact {
  position: relative;
  overflow: visible;
}

.about-me__inner,
.impact__inner,
.platforms > .container,
.training__inner,
.contact > .container {
  position: relative;
  z-index: 3;
}

@media (max-width: 1100px) {
  .floater {
    width: min(180px, 24vw);
    opacity: 0.92;
  }

  .floater--lg {
    width: min(200px, 26vw);
  }
}

@media (max-width: 800px) {
  .floater {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .floater__img,
  .floater__phone,
  .floater--tilt-left .floater__img,
  .floater--tilt-left .floater__phone,
  .floater--tilt-right .floater__img,
  .floater--tilt-right .floater__phone {
    animation: none;
  }
}
