/* =================================
   3D EFFECTS & TRANSFORMS
   Kyle Dallafior UI/UX Portfolio
   Inspired by Apple Vision Pro
   ================================= */

/* =================================
   3D FOUNDATION
   ================================= */

.perspective-container {
    perspective: 1000px;
    perspective-origin: center center;
}

.preserve-3d {
    transform-style: preserve-3d;
}

/* =================================
   HERO 3D ELEMENTS
   ================================= */

/* .hero-3d-sphere removed - clean background requested */

/* .hero-3d-sphere::before removed - clean background requested */

/* @keyframes float3D removed - clean background requested */

/* =================================
   CARD 3D EFFECTS
   ================================= */

.card-3d {
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
}

.card-3d:hover {
    transform: none;
}

.card-3d::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.1),
        rgba(255, 255, 255, 0.05)
    );
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.card-3d:hover::before {
    opacity: 1;
}

/* =================================
   FLOATING GEOMETRIC SHAPES
   ================================= */

.floating-geometry {
    position: absolute;
    pointer-events: none;
    opacity: 0.6;
}

.geometry-cube {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, 
        rgba(0, 0, 0, 0.05), 
        rgba(0, 0, 0, 0.05)
    );
    transform-style: preserve-3d;
    animation: cubeFloat 8s ease-in-out infinite;
}

.geometry-cube::before,
.geometry-cube::after {
    content: '';
    position: absolute;
    width: 60px;
    height: 60px;
    background: inherit;
}

.geometry-cube::before {
    transform: rotateY(90deg) translateZ(30px);
}

.geometry-cube::after {
    transform: rotateX(90deg) translateZ(30px);
}

@keyframes cubeFloat {
    0%, 100% {
        transform: translateY(0px) rotateY(0deg);
    }
    50% {
        transform: translateY(-20px) rotateY(10deg);
    }
}

/* .geometry-pyramid - REMOVED per user request */

/* @keyframes pyramidFloat - REMOVED with pyramid geometry */

/* =================================
   DEPTH LAYERS
   ================================= */

.depth-layer-1 {
    transform: translateZ(0px);
}

.depth-layer-2 {
    transform: translateZ(50px);
}

.depth-layer-3 {
    transform: translateZ(100px);
}

.depth-layer-4 {
    transform: translateZ(150px);
}

.depth-layer-5 {
    transform: translateZ(200px);
}

/* =================================
   PARALLAX 3D SCROLLING
   ================================= */

.parallax-3d-slow {
    transform: translateZ(-100px) scale(2);
}

.parallax-3d-medium {
    transform: translateZ(-50px) scale(1.5);
}

.parallax-3d-fast {
    transform: translateZ(0px) scale(1);
}

/* =================================
   HOLOGRAPHIC EFFECTS
   ================================= */

.holographic {
    background: linear-gradient(
        45deg,
        rgba(0, 0, 0, 0.05),
        rgba(0, 0, 0, 0.05),
        rgba(169, 163, 161, 0.1),
        rgba(0, 0, 0, 0.05)
    );
    background-size: 400% 400%;
    animation: holographicShift 8s ease-in-out infinite;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

@keyframes holographicShift {
    0%, 100% {
        background-position: 0% 50%;
        filter: hue-rotate(0deg);
    }
    25% {
        background-position: 100% 50%;
        filter: hue-rotate(90deg);
    }
    50% {
        background-position: 100% 100%;
        filter: hue-rotate(180deg);
    }
    75% {
        background-position: 0% 100%;
        filter: hue-rotate(270deg);
    }
}

/* =================================
   GLASS MORPHISM
   ================================= */

.glass-morph {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 
        0 8px 32px rgba(31, 38, 135, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.glass-morph-strong {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 
        0 16px 64px rgba(31, 38, 135, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* =================================
   ISOMETRIC PROJECTIONS
   ================================= */

.isometric {
    transform: rotateX(55deg) rotateY(-45deg) rotateZ(0deg);
    transform-style: preserve-3d;
}

.isometric-cube {
    width: 100px;
    height: 100px;
    transform-style: preserve-3d;
    animation: isometricRotate 20s linear infinite;
}

.isometric-face {
    position: absolute;
    width: 100px;
    height: 100px;
    background: var(--accent-red);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.isometric-face.front {
    transform: translateZ(50px);
}

.isometric-face.back {
    transform: translateZ(-50px) rotateY(180deg);
}

.isometric-face.left {
    transform: rotateY(-90deg) translateZ(50px);
}

.isometric-face.right {
    transform: rotateY(90deg) translateZ(50px);
}

.isometric-face.top {
    transform: rotateX(90deg) translateZ(50px);
}

.isometric-face.bottom {
    transform: rotateX(-90deg) translateZ(50px);
}

@keyframes isometricRotate {
    0% {
        transform: rotateY(0deg);
    }
    100% {
        transform: rotateY(360deg);
    }
}

/* =================================
   MAGNETIC FIELD EFFECTS
   ================================= */

.magnetic-field {
    position: relative;
    overflow: hidden;
}

.magnetic-field::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(
        circle,
        rgba(0, 0, 0, 0.05) 0%,
        transparent 50%
    );
    animation: magneticPulse 4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes magneticPulse {
    0%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.8;
    }
}

/* =================================
   LIQUID MORPHING
   ================================= */

.liquid-morph {
    background: var(--accent-red);
    border-radius: 50%;
    animation: liquidMorph 8s ease-in-out infinite;
    transform-style: preserve-3d;
}

@keyframes liquidMorph {
    0%, 100% {
        border-radius: 50% 50% 50% 50% / 50% 50% 50% 50%;
        transform: rotate(0deg);
    }
    25% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
        transform: rotate(90deg);
    }
    50% {
        border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
        transform: rotate(180deg);
    }
    75% {
        border-radius: 70% 30% 40% 60% / 40% 70% 60% 30%;
        transform: rotate(270deg);
    }
}

/* =================================
   NEURAL NETWORK VISUALIZATION
   ================================= */

.neural-network {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
}

.neural-node {
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--accent-red);
    border-radius: 50%;
    animation: neuralPulse 3s ease-in-out infinite;
}

.neural-connection {
    position: absolute;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent, 
        var(--accent-red), 
        transparent
    );
    animation: neuralFlow 2s linear infinite;
}

@keyframes neuralPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.6;
    }
    50% {
        transform: scale(1.5);
        opacity: 1;
    }
}

@keyframes neuralFlow {
    0% {
        background-position: -100% 0;
    }
    100% {
        background-position: 100% 0;
    }
}

/* =================================
   VOLUMETRIC LIGHTING
   ================================= */

.volumetric-light {
    position: relative;
    overflow: hidden;
}

.volumetric-light::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -10%;
    width: 120%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(0, 0, 0, 0.05) 50%,
        transparent 70%
    );
    animation: lightSweep 4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes lightSweep {
    0%, 100% {
        transform: translateX(-100%) skewX(-15deg);
    }
    50% {
        transform: translateX(100%) skewX(-15deg);
    }
}

/* =================================
   PARTICLE FIELD
   ================================= */

/* Particle field and 3D particles removed - clean background requested */

/* =================================
   DEPTH OF FIELD
   ================================= */

.depth-blur {
    filter: blur(0px);
    transition: filter 0.3s ease;
}

.depth-blur.far {
    filter: blur(2px);
}

.depth-blur.very-far {
    filter: blur(4px);
}

/* =================================
   SURFACE MATERIALS
   ================================= */

.metallic-surface {
    background: linear-gradient(135deg, 
        #c0c0c0, 
        #a8a8a8, 
        #d3d3d3
    );
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2),
        0 5px 20px rgba(0, 0, 0, 0.1);
}

.carbon-fiber {
    background: 
        radial-gradient(circle at 25% 25%, #222 2px, transparent 2px),
        radial-gradient(circle at 75% 75%, #222 2px, transparent 2px),
        linear-gradient(45deg, #333 25%, transparent 25%),
        linear-gradient(-45deg, #333 25%, transparent 25%),
        #444;
    background-size: 10px 10px, 10px 10px, 5px 5px, 5px 5px;
}

.crystal-surface {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.9),
        rgba(255, 255, 255, 0.7)
    );
    backdrop-filter: blur(10px);
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.8),
        inset 0 -1px 0 rgba(255, 255, 255, 0.3),
        0 15px 35px rgba(31, 38, 135, 0.1);
}

/* =================================
   PERFORMANCE OPTIMIZATIONS
   ================================= */

.hardware-accelerated {
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

/* =================================
   RESPONSIVE 3D EFFECTS
   ================================= */

@media (max-width: 768px) {
    .card-3d:hover {
        transform: none;
    }
    
    .hero-3d-sphere {
        width: 150px;
        height: 150px;
    }
    
    .geometry-cube {
        width: 40px;
        height: 40px;
    }
}

/* =================================
   ACCESSIBILITY
   ================================= */

@media (prefers-reduced-motion: reduce) {
    .hero-3d-sphere,
    .geometry-cube,
    .holographic,
    .isometric-cube,
    .liquid-morph,
    .neural-node,
    .neural-connection,
    .particle-3d {
        animation: none !important;
    }
    
    .card-3d:hover {
        transform: translateY(-5px);
    }
}

/* =================================
   GPU LAYER CREATION
   ================================= */

.create-layer {
    transform: translateZ(0);
    will-change: transform, opacity;
}