/**
 * Erik van de Blaak Portfolio - Essential CSS
 * Only animations and effects that Tailwind cannot handle
 * All layout/spacing/colors handled by Tailwind
 */

/* === SMOOTH SCROLL === */
html {
    scroll-behavior: smooth;
}

/* === THREE.JS ANIMATION STAGE === */
.animation-stage {
    position: relative;
    width: 100%;
    height: 100%;
}

.animation-stage canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.tag {
    position: absolute;
    left: 12px;
    top: 12px;
    font-size: 12px;
    opacity: 0.85;
    background: rgba(11, 16, 48, 0.8);
    border: 1px solid #1b2440;
    padding: 6px 8px;
    border-radius: 10px;
    color: #f0f6ff;
}

.signature {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 13px;
    letter-spacing: 1.2px;
    color: #ffffff;
    opacity: 0;
    text-shadow: 0 0 20px rgba(127,216,255,0.4), 0 0 40px rgba(127,216,255,0.2);
    font-family: 'Georgia', serif;
}

/* === LOADING OVERLAY === */
.loading-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #060912 0%, #0b1239 50%, #060912 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    transition: opacity 0.6s ease-out;
}

.loading-overlay.fade-out {
    opacity: 0;
    pointer-events: none;
}

.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

/* 3D Cube Animation */
.loading-cube {
    width: 50px;
    height: 50px;
    position: relative;
    transform-style: preserve-3d;
    animation: cubeRotate 2s ease-in-out infinite;
}

.cube-face {
    position: absolute;
    width: 50px;
    height: 50px;
    border: 2px solid #7fd8ff;
    background: rgba(127, 216, 255, 0.1);
    box-shadow: 0 0 20px rgba(127, 216, 255, 0.3), inset 0 0 20px rgba(127, 216, 255, 0.1);
}

.cube-face.front  { transform: translateZ(25px); }
.cube-face.back   { transform: rotateY(180deg) translateZ(25px); }
.cube-face.right  { transform: rotateY(90deg) translateZ(25px); }
.cube-face.left   { transform: rotateY(-90deg) translateZ(25px); }
.cube-face.top    { transform: rotateX(90deg) translateZ(25px); }
.cube-face.bottom { transform: rotateX(-90deg) translateZ(25px); }

@keyframes cubeRotate {
    0%, 100% { transform: rotateX(-20deg) rotateY(0deg); }
    25% { transform: rotateX(-20deg) rotateY(90deg); }
    50% { transform: rotateX(-20deg) rotateY(180deg); }
    75% { transform: rotateX(-20deg) rotateY(270deg); }
}

.loading-text {
    color: #7fd8ff;
    font-size: 14px;
    letter-spacing: 3px;
    text-transform: uppercase;
    opacity: 0.9;
}

/* Progress Bar */
.loading-bar {
    width: 150px;
    height: 3px;
    background: rgba(27, 36, 64, 0.8);
    border-radius: 3px;
    overflow: hidden;
}

.loading-progress {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #7fd8ff, #5bb8e8);
    border-radius: 3px;
    transition: width 0.3s ease-out;
    box-shadow: 0 0 10px rgba(127, 216, 255, 0.5);
}

/* === PHOTO GALLERY === */
.photo-gallery {
    position: relative;
    overflow: hidden;
}

.gallery-container {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(5, 1fr);
    gap: 20px;
    max-width: 900px;
    margin: 0 auto;
    padding: 40px;
    justify-items: center;
    align-items: center;
}

.gallery-item {
    width: 150px;
    height: 120px;
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    transform-style: preserve-3d;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.3s ease;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
    will-change: transform, filter;
    backface-visibility: hidden;
    perspective: 1000px;
}

.gallery-item img,
.gallery-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 15px;
    transition: transform 0.3s ease, filter 0.3s ease;
    filter: grayscale(1) contrast(1.4) brightness(1.0) saturate(0);
}

.gallery-item:hover img,
.gallery-item:hover video {
    filter: grayscale(1) contrast(1.6) brightness(1.1) saturate(0) drop-shadow(0 0 10px rgba(255, 255, 255, 0.2));
    transform: scale(1.02);
}

/* Gallery Glow Effect */
.gallery-item::before {
    content: '';
    position: absolute;
    inset: -4px;
    background: linear-gradient(45deg, rgba(127, 216, 255, 0.3), rgba(91, 184, 232, 0.2), rgba(127, 216, 255, 0.3));
    border-radius: 20px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease, filter 0.3s ease;
    filter: blur(8px);
}

.gallery-item:hover::before {
    opacity: 1;
    filter: blur(12px);
}

.gallery-item::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(127, 216, 255, 0.1) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: all 0.6s ease;
    pointer-events: none;
}

.gallery-item:hover::after {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.5);
}

/* Light Sweep Overlay */
.gallery-light-overlay {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(
        from 0deg,
        transparent 0%,
        rgba(127, 216, 255, 0.0) 20%,
        rgba(127, 216, 255, 0.3) 25%,
        rgba(91, 184, 232, 0.2) 30%,
        rgba(127, 216, 255, 0.0) 35%,
        transparent 50%,
        transparent 100%
    );
    pointer-events: none;
    animation: conicalSweep 8s infinite linear;
    transform-origin: center;
}

@keyframes conicalSweep {
    from { transform: rotate(0deg); opacity: 0.6; }
    to { transform: rotate(360deg); opacity: 0.6; }
}

/* Gallery Animation Classes */
.gallery-item.high-glow {
    box-shadow: 0 0 40px rgba(127, 216, 255, 0.6);
}

.gallery-item.scale-peak {
    box-shadow: 0 0 30px rgba(127, 216, 255, 0.4), 0 0 60px rgba(91, 184, 232, 0.2);
}

/* === TOAST SLIDE-IN === */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.animate-slide-in {
    animation: slideIn 0.3s ease;
}

/* === ERIK EXPERIENCE IFRAME === */
.erik-iframe-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(180deg, #060912 0%, transparent 100%);
    pointer-events: none;
    z-index: 2;
}

.erik-iframe-wrapper::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(0deg, #060912 0%, transparent 100%);
    pointer-events: none;
    z-index: 2;
}

/* === RESPONSIVE GALLERY === */
@media (max-width: 1024px) {
    .gallery-container {
        max-width: 750px;
        gap: 15px;
        padding: 30px;
    }

    .gallery-item {
        width: 130px;
        height: 100px;
    }
}

@media (max-width: 768px) {
    .gallery-container {
        max-width: 500px;
        gap: 12px;
        padding: 25px;
    }

    .gallery-item {
        width: 85px;
        height: 70px;
        border-radius: 12px;
    }

    .erik-iframe-wrapper::before,
    .erik-iframe-wrapper::after {
        height: 60px;
    }
}

@media (max-width: 480px) {
    .gallery-container {
        max-width: 350px;
        gap: 8px;
        padding: 20px;
    }

    .gallery-item {
        width: 58px;
        height: 48px;
        border-radius: 8px;
    }

    .erik-iframe-wrapper::before,
    .erik-iframe-wrapper::after {
        height: 40px;
    }
}
