/* Loaded only by the explicit GPU experiment. HTML remains the UI layer. */
#profile-webgl-scene { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
html[data-profile-webgl-active] #stars,
html[data-profile-webgl-active] #solar-system { visibility: hidden; }
.profile-webgl-surface { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; overflow: hidden; z-index: 0; }
/* This same surface follows the resume front, keeping its tint continuous. */
.profile-webgl-surface::after { content: ''; position: absolute; inset: 0; border-radius: inherit; background: rgba(198, 215, 238, .035); pointer-events: none; }
#profile-webgl-lens { display: block; width: 100%; height: 100%; }
.profile-webgl-point { position: absolute; width: 0; height: 0; pointer-events: none; }
.card.profile[data-webgl-material],
.resume-flight .resume-front[data-webgl-material] {
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: 0 10px 26px rgba(0, 0, 0, .23);
}
.card.profile[data-webgl-material]::before { display: none; }
/* The fallback background must not fade through white when the front returns. */
#profileCard[data-webgl-material] { transition: box-shadow .25s ease; }
#profileCard[data-webgl-material]:hover { box-shadow: 0 10px 26px rgba(0, 0, 0, .23), 0 0 26px rgba(160, 199, 235, .14), inset 0 1px 1px rgba(220, 237, 255, .2); }
.card.profile[data-webgl-material] > :not(.profile-webgl-surface) { position: relative; z-index: 1; }
@media print { #profile-webgl-scene, .profile-webgl-surface { display: none !important; } }

#profile-webgl-lens[hidden]{display:none}
.profile-webgl-native-defs{position:absolute;width:0;height:0;pointer-events:none}
#profileCard[data-webgl-native="lens"]{backdrop-filter:url("#profile-webgl-native") !important;-webkit-backdrop-filter:url("#profile-webgl-native") !important}

/* Map readiness only changes optics, never card geometry, tint or shadows. */
.card[data-homepage-glass], #profileCard[data-prebaked-profile]:not([data-webgl-material]) {
    backdrop-filter: var(--homepage-glass-filter);
    -webkit-backdrop-filter: var(--homepage-glass-filter);
}
@media (prefers-reduced-motion: reduce) {
    .card[data-homepage-glass], #profileCard[data-webgl-material] { transition: none; }
}

/* Match the finished profile tint from first paint. While native optics load,
   the fallback owns that tint; the renderer surface must not add it twice. */
@media not all and (hover: none) and (pointer: coarse) {
    #profileCard[data-prebaked-profile]:not([data-webgl-material]) {
        background: rgba(198, 215, 238, .035);
        box-shadow: 0 10px 26px rgba(0, 0, 0, .23);
        transition: box-shadow .25s ease;
    }
    #profileCard[data-prebaked-profile]:not([data-webgl-material]) > .profile-webgl-surface {
        visibility: hidden;
    }
}
