/* Perceived-performance layer for local portfolio media. The image itself remains the source of truth. */
img.image-pending {
    background:
        radial-gradient(circle at 20% 20%, rgba(0, 255, 65, 0.28), transparent 38%),
        radial-gradient(circle at 80% 80%, rgba(0, 200, 255, 0.22), transparent 42%),
        linear-gradient(135deg, rgba(8, 18, 22, 0.96), rgba(21, 8, 35, 0.96));
    filter: blur(10px);
    opacity: 0.72;
    transform: scale(1.015);
    transition: filter 220ms cubic-bezier(0.23, 1, 0.32, 1), opacity 220ms ease, transform 220ms cubic-bezier(0.23, 1, 0.32, 1);
}

img.image-ready {
    opacity: 1;
    transform: none;
}

img.image-error {
    filter: none;
    opacity: 0.55;
}

@media (prefers-reduced-motion: reduce) {
    img.image-pending {
        filter: none;
        transform: none;
        transition: none;
    }
}

/* Keep the transparent Profile portrait proportional in every layout. */
.profile-photo {
    width: 100%;
    max-width: 26rem;
    margin-inline: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.profile-photo > img {
    display: block;
    width: min(100%, 26rem) !important;
    height: auto !important;
    aspect-ratio: 671 / 1006;
    object-fit: contain !important;
    object-position: center bottom;
}

/* Gallery media should show the complete source instead of enlarging a cropped thumbnail. */
.coverflow-slide img {
    object-fit: contain !important;
    image-rendering: auto;
}

@media (max-width: 768px) {
    .profile-photo {
        max-width: min(100%, 18rem);
    }

    .profile-photo > img {
        width: min(100%, 18rem) !important;
    }
}
