body.page-public-profile.workspace-profile-page:not(.profile-theme-classic) {
    isolation: isolate;
}

body.page-public-profile.workspace-profile-page:not(.profile-theme-classic)::after {
    content: "";
    position: fixed;
    inset: -18%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.24;
    mix-blend-mode: screen;
    background:
        radial-gradient(circle at 18% 20%, rgba(253, 185, 19, 0.18), transparent 24%),
        radial-gradient(circle at 82% 14%, rgba(48, 200, 134, 0.14), transparent 26%),
        linear-gradient(115deg, transparent 0 38%, rgba(255, 255, 255, 0.12) 40%, transparent 44% 100%);
    transform: translate3d(0, 0, 0);
    animation: premiumProfileGenericMotion 18s ease-in-out infinite alternate;
}

body.page-public-profile.workspace-profile-page.profile-theme-creator,
body.page-public-profile.workspace-profile-page.profile-theme-portfolio,
body.page-public-profile.workspace-profile-page.profile-theme-minimal,
body.page-public-profile.workspace-profile-page.profile-theme-spotlight,
body.page-public-profile.workspace-profile-page.profile-theme-aurora-motion,
body.page-public-profile.workspace-profile-page.profile-theme-neon-grid,
body.page-public-profile.workspace-profile-page.profile-theme-glass-studio,
body.page-public-profile.workspace-profile-page.profile-theme-cinematic,
body.page-public-profile.workspace-profile-page.profile-theme-pixel-lab,
body.page-public-profile.workspace-profile-page.profile-theme-fire-embers,
body.page-public-profile.workspace-profile-page.profile-theme-ocean-depth,
body.page-public-profile.workspace-profile-page.profile-theme-forest-mist,
body.page-public-profile.workspace-profile-page.profile-theme-terminal-depth {
    isolation: isolate;
}

body.page-public-profile.workspace-profile-page.profile-theme-creator::after,
body.page-public-profile.workspace-profile-page.profile-theme-portfolio::after,
body.page-public-profile.workspace-profile-page.profile-theme-minimal::after,
body.page-public-profile.workspace-profile-page.profile-theme-spotlight::after,
body.page-public-profile.workspace-profile-page.profile-theme-aurora-motion::after,
body.page-public-profile.workspace-profile-page.profile-theme-neon-grid::after,
body.page-public-profile.workspace-profile-page.profile-theme-glass-studio::after,
body.page-public-profile.workspace-profile-page.profile-theme-cinematic::after,
body.page-public-profile.workspace-profile-page.profile-theme-pixel-lab::after,
body.page-public-profile.workspace-profile-page.profile-theme-fire-embers::after,
body.page-public-profile.workspace-profile-page.profile-theme-ocean-depth::after,
body.page-public-profile.workspace-profile-page.profile-theme-forest-mist::after,
body.page-public-profile.workspace-profile-page.profile-theme-terminal-depth::after {
    content: "";
    position: fixed;
    inset: -18%;
    z-index: 0;
    pointer-events: none;
    opacity: var(--profile-premium-motion-opacity, 0.32);
    mix-blend-mode: screen;
    transform: translate3d(0, 0, 0);
}

body.page-public-profile.workspace-profile-page.profile-theme-creator::after {
    --profile-premium-motion-opacity: 0.34;
    background:
        linear-gradient(115deg, transparent 0 36%, rgba(253, 185, 19, 0.22) 38%, transparent 42% 100%),
        radial-gradient(circle, rgba(48, 200, 134, 0.28) 0 1px, transparent 2px);
    background-size: 100% 100%, 36px 36px;
    animation: premiumProfileDiagonalSweep 16s ease-in-out infinite alternate, premiumProfileParticleDrift 18s linear infinite;
}

body.page-public-profile.workspace-profile-page.profile-theme-portfolio::after {
    --profile-premium-motion-opacity: 0.28;
    background:
        linear-gradient(rgba(253, 185, 19, 0.14) 1px, transparent 1px),
        linear-gradient(90deg, rgba(48, 200, 134, 0.16) 1px, transparent 1px),
        radial-gradient(circle at 20% 30%, rgba(253, 185, 19, 0.24), transparent 24%);
    background-size: 54px 54px, 54px 54px, 100% 100%;
    animation: premiumProfileGridFlow 24s linear infinite;
}

body.page-public-profile.workspace-profile-page.profile-theme-minimal::after {
    --profile-premium-motion-opacity: 0.18;
    mix-blend-mode: multiply;
    background:
        radial-gradient(circle, rgba(0, 0, 0, 0.11) 0 1px, transparent 2px),
        linear-gradient(120deg, transparent 0 42%, rgba(255, 255, 255, 0.34) 44%, transparent 49% 100%);
    background-size: 34px 34px, 100% 100%;
    animation: premiumProfileSoftPaper 22s ease-in-out infinite alternate;
}

body.page-public-profile.workspace-profile-page.profile-theme-spotlight::after {
    --profile-premium-motion-opacity: 0.36;
    background:
        conic-gradient(from 230deg at 50% -8%, transparent 0 18%, rgba(253, 185, 19, 0.30) 21%, transparent 28% 100%),
        radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.20), transparent 32%);
    animation: premiumProfileSpotlightPan 13s ease-in-out infinite alternate;
}

body.page-public-profile.workspace-profile-page.profile-theme-aurora-motion::after {
    --profile-premium-motion-opacity: 0.30;
    background:
        radial-gradient(ellipse at 22% 34%, rgba(112, 226, 165, 0.34), transparent 28%),
        radial-gradient(ellipse at 76% 18%, rgba(253, 185, 19, 0.22), transparent 26%),
        radial-gradient(circle, rgba(255, 255, 255, 0.20) 0 1px, transparent 2px);
    background-size: 100% 100%, 100% 100%, 42px 42px;
    animation: premiumProfileAuroraPulse 18s ease-in-out infinite alternate, premiumProfileParticleDrift 26s linear infinite;
}

body.page-public-profile.workspace-profile-page.profile-theme-neon-grid::after {
    --profile-premium-motion-opacity: 0.34;
    background:
        linear-gradient(rgba(52, 211, 153, 0.20) 1px, transparent 1px),
        linear-gradient(90deg, rgba(125, 211, 252, 0.20) 1px, transparent 1px),
        radial-gradient(circle, rgba(125, 211, 252, 0.30) 0 1px, transparent 2px);
    background-size: 46px 46px, 46px 46px, 92px 92px;
    animation: premiumProfileNeonGrid 18s linear infinite;
}

body.page-public-profile.workspace-profile-page.profile-theme-glass-studio::after {
    --profile-premium-motion-opacity: 0.26;
    background:
        linear-gradient(110deg, transparent 0 32%, rgba(255, 255, 255, 0.30) 35%, transparent 39% 100%),
        radial-gradient(circle at 80% 16%, rgba(125, 211, 252, 0.22), transparent 28%);
    animation: premiumProfileGlassGlide 15s ease-in-out infinite alternate;
}

body.page-public-profile.workspace-profile-page.profile-theme-cinematic::after {
    --profile-premium-motion-opacity: 0.22;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.13) 0 1px, transparent 1px 7px),
        radial-gradient(circle at 72% 22%, rgba(253, 185, 19, 0.24), transparent 26%),
        radial-gradient(circle at 22% 60%, rgba(193, 39, 45, 0.20), transparent 30%);
    background-size: 100% 8px, 100% 100%, 100% 100%;
    animation: premiumProfileFilmScan 10s linear infinite, premiumProfileAuroraPulse 18s ease-in-out infinite alternate;
}

body.page-public-profile.workspace-profile-page.profile-theme-pixel-lab::after {
    --profile-premium-motion-opacity: 0.30;
    background:
        linear-gradient(rgba(253, 185, 19, 0.20) 2px, transparent 2px),
        linear-gradient(90deg, rgba(48, 200, 134, 0.18) 2px, transparent 2px),
        radial-gradient(circle, rgba(253, 185, 19, 0.32) 0 2px, transparent 3px);
    background-size: 22px 22px, 22px 22px, 66px 66px;
    image-rendering: pixelated;
    animation: premiumProfilePixelCrawl 14s steps(18) infinite;
}

body.page-public-profile.workspace-profile-page.profile-theme-fire-embers::after {
    --profile-premium-motion-opacity: 0.34;
    background:
        radial-gradient(circle at 18% 78%, rgba(255, 209, 92, 0.22), transparent 20%),
        radial-gradient(circle at 78% 82%, rgba(255, 122, 24, 0.18), transparent 24%),
        radial-gradient(circle, rgba(255, 209, 92, 0.34) 0 1px, transparent 2px);
    background-size: 100% 100%, 100% 100%, 88px 88px;
    animation: premiumProfileHeatDrift 8s ease-in-out infinite alternate, premiumProfileParticleDrift 16s linear infinite;
}

body.page-public-profile.workspace-profile-page.profile-theme-ocean-depth::after {
    --profile-premium-motion-opacity: 0.26;
    background:
        linear-gradient(110deg, transparent 0 36%, rgba(224, 250, 255, 0.16) 42%, transparent 54% 100%),
        radial-gradient(ellipse at 52% 8%, rgba(224, 250, 255, 0.18), transparent 28%),
        radial-gradient(circle, rgba(125, 211, 252, 0.28) 0 1px, transparent 2px);
    background-size: 100% 100%, 100% 100%, 72px 72px;
    animation: premiumProfileWaterGlide 11s ease-in-out infinite alternate, premiumProfileParticleDrift 22s linear infinite;
}

body.page-public-profile.workspace-profile-page.profile-theme-forest-mist::after {
    --profile-premium-motion-opacity: 0.24;
    background:
        radial-gradient(ellipse at 24% 8%, rgba(217, 249, 157, 0.18), transparent 26%),
        radial-gradient(ellipse at 82% 12%, rgba(34, 197, 94, 0.16), transparent 30%),
        radial-gradient(circle, rgba(217, 249, 157, 0.18) 0 1px, transparent 2px);
    background-size: 100% 100%, 100% 100%, 92px 92px;
    animation: premiumProfileForestMist 14s ease-in-out infinite alternate, premiumProfileParticleDrift 28s linear infinite;
}

body.page-public-profile.workspace-profile-page.profile-theme-terminal-depth::after {
    --profile-premium-motion-opacity: 0.24;
    background:
        linear-gradient(rgba(48, 200, 134, 0.16) 1px, transparent 1px),
        linear-gradient(90deg, rgba(253, 185, 19, 0.10) 1px, transparent 1px),
        radial-gradient(circle, rgba(48, 200, 134, 0.28) 0 1px, transparent 2px);
    background-size: 58px 58px, 58px 58px, 116px 116px;
    animation: premiumProfileTerminalScan 14s linear infinite;
}

@keyframes premiumProfileDiagonalSweep {
    from { transform: translate3d(-3%, -2%, 0) rotate(-1deg); }
    to { transform: translate3d(3%, 2%, 0) rotate(1deg); }
}

@keyframes premiumProfileGenericMotion {
    from { transform: translate3d(-2%, -1%, 0) rotate(-1deg); opacity: 0.18; }
    to { transform: translate3d(2%, 1%, 0) rotate(1deg); opacity: 0.30; }
}

@keyframes premiumProfileParticleDrift {
    from { background-position: 0 0, 0 0, 0 0; }
    to { background-position: 0 0, 180px 120px, 90px 60px; }
}

@keyframes premiumProfileGridFlow {
    from { background-position: 0 0, 0 0, 0 0; }
    to { background-position: 54px 54px, 54px 54px, 4% 2%; }
}

@keyframes premiumProfileSoftPaper {
    from { transform: translate3d(-1%, -1%, 0); background-position: 0 0, -8% 0; }
    to { transform: translate3d(1%, 1%, 0); background-position: 24px 18px, 8% 0; }
}

@keyframes premiumProfileSpotlightPan {
    from { transform: translate3d(-7%, -2%, 0) rotate(-6deg); opacity: 0.22; }
    to { transform: translate3d(7%, 2%, 0) rotate(6deg); opacity: 0.42; }
}

@keyframes premiumProfileAuroraPulse {
    from { transform: translate3d(-2%, -1%, 0) scale(1); opacity: 0.24; }
    to { transform: translate3d(2%, 1%, 0) scale(1.05); opacity: 0.38; }
}

@keyframes premiumProfileNeonGrid {
    from { background-position: 0 0, 0 0, 0 0; }
    to { background-position: 46px 46px, 46px 46px, 92px 92px; }
}

@keyframes premiumProfileGlassGlide {
    from { transform: translate3d(-8%, -1%, 0) skewX(-8deg); opacity: 0.20; }
    to { transform: translate3d(8%, 1%, 0) skewX(8deg); opacity: 0.34; }
}

@keyframes premiumProfileFilmScan {
    from { background-position: 0 0, 0 0, 0 0; }
    to { background-position: 0 80px, 0 0, 0 0; }
}

@keyframes premiumProfilePixelCrawl {
    from { background-position: 0 0, 0 0, 0 0; }
    to { background-position: 44px 44px, 44px 44px, 66px 66px; }
}

@keyframes premiumProfileHeatDrift {
    from { transform: translate3d(-2%, 1%, 0) scale(1.01); opacity: 0.22; }
    to { transform: translate3d(2%, -1%, 0) scale(1.06); opacity: 0.38; }
}

@keyframes premiumProfileWaterGlide {
    from { transform: translate3d(-3%, -1%, 0) skewX(-3deg); opacity: 0.18; }
    to { transform: translate3d(3%, 1%, 0) skewX(4deg); opacity: 0.32; }
}

@keyframes premiumProfileForestMist {
    from { transform: translate3d(-1%, -1%, 0) scale(1.01); opacity: 0.18; }
    to { transform: translate3d(2%, 1%, 0) scale(1.055); opacity: 0.31; }
}

@keyframes premiumProfileTerminalScan {
    from { background-position: 0 0, 0 0, 0 0; }
    to { background-position: 116px 116px, 116px 116px, 116px 116px; }
}

/* Performance guard: full-page moving backgrounds caused heavy jank on phones,
   PWA and weaker desktops. Premium themes keep their static visual identity,
   but page-wide motion, filters and blur layers are disabled by default. */
body.page-public-profile.workspace-profile-page[class*="profile-theme-"] > .container::before,
body.page-public-profile.workspace-profile-page[class*="profile-theme-"]::before,
body.page-public-profile.workspace-profile-page[class*="profile-theme-"]::after,
body.page-public-profile.workspace-profile-page[class*="profile-theme-"] .profile-cover:not(.has-profile-cover)::before {
    animation: none !important;
    transition: none !important;
    transform: none !important;
    filter: none !important;
    will-change: auto !important;
}

body.page-public-profile.workspace-profile-page .profile-avatar-large.premium-avatar-frame::before {
    animation: premiumFrameBreath 6s ease-in-out infinite !important;
    will-change: transform, opacity !important;
}

body.page-public-profile.workspace-profile-page .profile-avatar-large.premium-avatar-frame::after {
    animation: premiumFrameSparkDrift 7s ease-in-out infinite !important;
    will-change: transform !important;
}

body.page-public-profile.workspace-profile-page[class*="profile-theme-"] .profile-header,
body.page-public-profile.workspace-profile-page[class*="profile-theme-"] .profile-smart-strip,
body.page-public-profile.workspace-profile-page[class*="profile-theme-"] .p-card,
body.page-public-profile.workspace-profile-page[class*="profile-theme-"] .project-item {
    backdrop-filter: none !important;
}

body.page-public-profile.workspace-profile-page.profile-theme-fire-embers::after,
body.page-public-profile.workspace-profile-page.profile-theme-ocean-depth::after,
body.page-public-profile.workspace-profile-page.profile-theme-forest-mist::after,
body.page-public-profile.workspace-profile-page.profile-theme-terminal-depth::after,
body.page-public-profile.workspace-profile-page.profile-theme-spirit-moon::after,
body.page-public-profile.workspace-profile-page.profile-theme-real-sky::after,
body.page-public-profile.workspace-profile-page.profile-theme-space-orbit::after {
    content: none !important;
    display: none !important;
    animation: none !important;
}

body.page-public-profile.workspace-profile-page[class*="profile-theme-"] .profile-cover.has-profile-cover::after,
body.page-public-profile.workspace-profile-page[class*="profile-theme-"] .profile-cover.has-premium-cover::after {
    content: none !important;
    display: none !important;
    animation: none !important;
}

@media (max-width: 900px), (hover: none) {
    body.page-public-profile.workspace-profile-page:not(.profile-theme-classic)::after {
        content: none !important;
        display: none !important;
        animation: none !important;
    }
    body.page-public-profile.workspace-profile-page.profile-theme-creator::before,
    body.page-public-profile.workspace-profile-page.profile-theme-portfolio::before,
    body.page-public-profile.workspace-profile-page.profile-theme-minimal::before,
    body.page-public-profile.workspace-profile-page.profile-theme-spotlight::before,
    body.page-public-profile.workspace-profile-page.profile-theme-aurora-motion::before,
    body.page-public-profile.workspace-profile-page.profile-theme-neon-grid::before,
    body.page-public-profile.workspace-profile-page.profile-theme-glass-studio::before,
    body.page-public-profile.workspace-profile-page.profile-theme-cinematic::before,
    body.page-public-profile.workspace-profile-page.profile-theme-pixel-lab::before,
    body.page-public-profile.workspace-profile-page.profile-theme-fire-embers::before,
    body.page-public-profile.workspace-profile-page.profile-theme-ocean-depth::before,
    body.page-public-profile.workspace-profile-page.profile-theme-forest-mist::before,
    body.page-public-profile.workspace-profile-page.profile-theme-terminal-depth::before,
    body.page-public-profile.workspace-profile-page .profile-cover:not(.has-profile-cover)::before {
        animation: none !important;
        filter: none !important;
    }
    body.page-public-profile.workspace-profile-page .profile-header,
    body.page-public-profile.workspace-profile-page .profile-smart-strip,
    body.page-public-profile.workspace-profile-page .p-card,
    body.page-public-profile.workspace-profile-page .project-item {
        backdrop-filter: none !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.page-public-profile.workspace-profile-page:not(.profile-theme-classic)::after,
    body.page-public-profile.workspace-profile-page.profile-theme-creator::after,
    body.page-public-profile.workspace-profile-page.profile-theme-portfolio::after,
    body.page-public-profile.workspace-profile-page.profile-theme-minimal::after,
    body.page-public-profile.workspace-profile-page.profile-theme-spotlight::after,
    body.page-public-profile.workspace-profile-page.profile-theme-aurora-motion::after,
    body.page-public-profile.workspace-profile-page.profile-theme-neon-grid::after,
    body.page-public-profile.workspace-profile-page.profile-theme-glass-studio::after,
    body.page-public-profile.workspace-profile-page.profile-theme-cinematic::after,
    body.page-public-profile.workspace-profile-page.profile-theme-pixel-lab::after,
    body.page-public-profile.workspace-profile-page.profile-theme-fire-embers::after,
    body.page-public-profile.workspace-profile-page.profile-theme-ocean-depth::after,
    body.page-public-profile.workspace-profile-page.profile-theme-forest-mist::after,
    body.page-public-profile.workspace-profile-page.profile-theme-terminal-depth::after {
        animation: none !important;
    }
}
