/* ============================================
   PREMIUM EFFECTS - Mike Muratore Portfolio
   Ultra-luxury $20k+ design enhancements
   ============================================ */

/* ========== GLASSMORPHISM ========== */
.glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow:
        0 8px 32px 0 rgba(0, 0, 0, 0.37),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.05);
}

.glass-strong {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow:
        0 8px 32px 0 rgba(0, 0, 0, 0.5),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.1);
}

/* ========== CUSTOM CURSOR ========== */
.custom-cursor {
    width: 20px;
    height: 20px;
    border: 2px solid var(--color-accent-primary);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.15s ease-out, width 0.3s ease, height 0.3s ease;
    mix-blend-mode: difference;
    will-change: transform;
}

.custom-cursor::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 4px;
    height: 4px;
    background: var(--color-accent-primary);
    border-radius: 50%;
    opacity: 0.8;
}

.custom-cursor.hover {
    width: 60px;
    height: 60px;
    background: rgba(59, 130, 246, 0.1);
    border-color: var(--color-accent-light);
}

.custom-cursor-follower {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9998;
    transition: transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

/* ========== PARTICLE CANVAS ========== */
#particles-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.6;
}

/* ========== ADVANCED GRADIENTS ========== */
.gradient-mesh {
    background:
        radial-gradient(at 0% 0%, rgba(59, 130, 246, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(139, 92, 246, 0.1) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(59, 130, 246, 0.15) 0px, transparent 50%),
        radial-gradient(at 0% 100%, rgba(16, 185, 129, 0.1) 0px, transparent 50%);
    animation: gradientMeshShift 20s ease infinite;
}

@keyframes gradientMeshShift {

    0%,
    100% {
        background-position: 0% 0%, 100% 0%, 100% 100%, 0% 100%;
    }

    25% {
        background-position: 100% 0%, 100% 100%, 0% 100%, 0% 0%;
    }

    50% {
        background-position: 100% 100%, 0% 100%, 0% 0%, 100% 0%;
    }

    75% {
        background-position: 0% 100%, 0% 0%, 100% 0%, 100% 100%;
    }
}

.gradient-border {
    position: relative;
    background: var(--color-bg-secondary);
    border-radius: var(--radius-xl);
}

.gradient-border::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-xl);
    padding: 2px;
    background: linear-gradient(135deg, var(--color-accent-primary), rgba(139, 92, 246, 0.5), var(--color-accent-primary));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    opacity: 0.5;
    transition: opacity var(--duration-normal) var(--ease-out);
}

.gradient-border:hover::before {
    opacity: 1;
}

/* ========== NOISE TEXTURE OVERLAY ========== */
.noise-overlay {
    position: relative;
}

.noise-overlay::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../assets/noise.png');
    background-repeat: repeat;
    opacity: 0.03;
    pointer-events: none;
    mix-blend-mode: overlay;
}

/* ========== PREMIUM SHADOWS ========== */
.shadow-luxury {
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.1),
        0 8px 16px rgba(0, 0, 0, 0.1),
        0 16px 32px rgba(0, 0, 0, 0.1),
        0 32px 64px rgba(0, 0, 0, 0.15);
}

.shadow-glow-premium {
    box-shadow:
        0 0 20px rgba(59, 130, 246, 0.3),
        0 0 40px rgba(59, 130, 246, 0.2),
        0 0 60px rgba(59, 130, 246, 0.1),
        0 8px 32px rgba(0, 0, 0, 0.3);
}

/* ========== 3D CARD EFFECTS ========== */
.card-3d {
    transform-style: preserve-3d;
    transition: transform 0.3s ease;
    will-change: transform;
}

.card-3d-content {
    transform: translateZ(50px);
    transition: transform 0.3s ease;
}

.card-3d:hover {
    transform: perspective(1000px) rotateX(var(--rotate-x, 0deg)) rotateY(var(--rotate-y, 0deg)) scale(1.02);
}

/* ========== MAGNETIC BUTTONS ========== */
.btn-magnetic {
    position: relative;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
    transform: translate(var(--magnet-x, 0px), var(--magnet-y, 0px));
}

.btn-magnetic::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn-magnetic:hover::before {
    width: 300px;
    height: 300px;
}

.btn-magnetic::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-magnetic:hover::after {
    left: 100%;
}

/* ========== SHIMMER EFFECT ========== */
.shimmer {
    position: relative;
    overflow: hidden;
}

.shimmer::before {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 150%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.1),
            transparent);
    animation: shimmerSlide 3s infinite;
}

@keyframes shimmerSlide {
    0% {
        left: -150%;
    }

    100% {
        left: 150%;
    }
}

/* ========== TEXT REVEAL ANIMATIONS ========== */
.text-reveal {
    display: inline-block;
    overflow: hidden;
}

.text-reveal span {
    display: inline-block;
    opacity: 0;
    transform: translateY(100%);
    animation: textRevealUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes textRevealUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stagger delays for characters */
.text-reveal span:nth-child(1) {
    animation-delay: 0.05s;
}

.text-reveal span:nth-child(2) {
    animation-delay: 0.1s;
}

.text-reveal span:nth-child(3) {
    animation-delay: 0.15s;
}

.text-reveal span:nth-child(4) {
    animation-delay: 0.2s;
}

.text-reveal span:nth-child(5) {
    animation-delay: 0.25s;
}

.text-reveal span:nth-child(6) {
    animation-delay: 0.3s;
}

.text-reveal span:nth-child(7) {
    animation-delay: 0.35s;
}

.text-reveal span:nth-child(8) {
    animation-delay: 0.4s;
}

.text-reveal span:nth-child(9) {
    animation-delay: 0.45s;
}

.text-reveal span:nth-child(10) {
    animation-delay: 0.5s;
}

/* ========== IMAGE REVEAL EFFECTS ========== */
.image-reveal {
    position: relative;
    overflow: hidden;
}

.image-reveal img {
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.image-reveal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-accent-primary);
    transform: translateX(-100%);
    transition: transform 0.7s cubic-bezier(0.77, 0, 0.175, 1);
    z-index: 1;
}

.image-reveal.visible::before {
    transform: translateX(100%);
}

.image-reveal.visible img {
    transform: scale(1.1);
}

/* ========== SCROLL PROGRESS INDICATOR ========== */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    z-index: var(--z-fixed);
}

.scroll-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--color-accent-primary), rgba(139, 92, 246, 0.8));
    width: 0%;
    transition: width 0.1s ease-out;
    box-shadow: 0 0 10px var(--color-accent-primary);
}

/* ========== PREMIUM HOVER STATES ========== */
.hover-lift-premium {
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.hover-lift-premium:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.3),
        0 0 40px rgba(59, 130, 246, 0.2);
}

/* ========== ANIMATED UNDERLINES ========== */
.link-premium {
    position: relative;
    text-decoration: none;
    background: linear-gradient(to right, var(--color-accent-primary), var(--color-accent-primary)) no-repeat;
    background-size: 0% 2px;
    background-position: left bottom;
    transition: background-size 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    padding-bottom: 4px;
}

.link-premium:hover {
    background-size: 100% 2px;
}

/* ========== FLOATING ELEMENTS ========== */
@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }
}

.float-animation {
    animation: float 6s ease-in-out infinite;
}

.float-animation-slow {
    animation: float 8s ease-in-out infinite;
}

/* ========== GLOW PULSE PREMIUM ========== */
@keyframes glowPulsePremium {

    0%,
    100% {
        box-shadow:
            0 0 20px rgba(59, 130, 246, 0.3),
            0 0 40px rgba(59, 130, 246, 0.2),
            inset 0 0 20px rgba(59, 130, 246, 0.1);
    }

    50% {
        box-shadow:
            0 0 40px rgba(59, 130, 246, 0.5),
            0 0 80px rgba(59, 130, 246, 0.3),
            inset 0 0 30px rgba(59, 130, 246, 0.2);
    }
}

.glow-pulse-premium {
    animation: glowPulsePremium 3s ease-in-out infinite;
}

/* ========== RESPONSIVE PREMIUM EFFECTS ========== */
@media (max-width: 768px) {

    /* Reduce intensity on mobile for performance */
    .glass,
    .glass-strong {
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }

    .custom-cursor,
    .custom-cursor-follower {
        display: none;
    }

    .card-3d:hover {
        transform: scale(1.02);
    }
}

/* ========== PERFORMANCE OPTIMIZATIONS ========== */
.will-change-transform {
    will-change: transform;
}

.will-change-opacity {
    will-change: opacity;
}

.gpu-accelerate-premium {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}
