/* Cursor Effects CSS */

/* Custom Cursor Image */
body.cursor-image {
    cursor: var(--custom-cursor), auto;
}

body.cursor-image a,
body.cursor-image button,
body.cursor-image .social-link,
body.cursor-image .bento-card,
body.cursor-image .portfolio-card {
    cursor: var(--custom-cursor), pointer;
}

/* Reset cursor for iframes and embeds */
body.cursor-image iframe,
body.cursor-image embed,
body.cursor-image object,
body.cursor-glow iframe,
body.cursor-glow embed,
body.cursor-glow object,
iframe,
embed,
object {
    cursor: auto !important;
}

/* Cursor Effect: Trail */
.circle {
    pointer-events: none;
    transition: none;
    position: absolute;
    display: block;
    width: 30px;
    height: 30px;
    border-radius: 20px;
    z-index: 9999;
}

.circle.scaled {
    transform: scale(1.2);
}

body.cursor-trail {
    cursor: none;
}

/* Cursor Effect: Glow */
body.cursor-glow {
    cursor: none;
}

.cursor-glow-circle {
    position: fixed;
    top: 0;
    left: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent-color, #f1c800);
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    opacity: 0.3;
    box-shadow: 0 0 30px var(--accent-color, #f1c800);
    will-change: transform;
}

.cursor-glow-dot {
    position: fixed;
    top: 0;
    left: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-color, #f1c800);
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%, -50%);
    will-change: transform;
}

/* Cursor Effect: Ripple */
.cursor-ripple {
    position: fixed;
    top: 0;
    left: 0;
    border: 2px solid var(--accent-color, #f1c800);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    animation: ripple-expand 0.6s ease-out;
    will-change: transform, opacity;
}

@keyframes ripple-expand {
    0% {
        width: 0;
        height: 0;
        opacity: 1;
    }
    100% {
        width: 80px;
        height: 80px;
        opacity: 0;
    }
}

/* Cursor Effect: Sparkle */
.cursor-sparkle {
    position: fixed;
    top: 0;
    left: 0;
    width: 8px;
    height: 8px;
    background: var(--accent-color, #f1c800);
    pointer-events: none;
    z-index: 9999;
    animation: sparkle-animate 0.8s ease-out forwards;
    transform: rotate(45deg);
    will-change: transform, opacity;
}

@keyframes sparkle-animate {
    0% {
        opacity: 1;
        transform: rotate(45deg) scale(0);
    }
    50% {
        opacity: 1;
        transform: rotate(45deg) scale(1);
    }
    100% {
        opacity: 0;
        transform: rotate(45deg) scale(0.5) translateY(-20px);
    }
}

/* Cursor pointer styles for interactive elements with effects */
body.cursor-glow a,
body.cursor-glow button,
body.cursor-glow .social-link {
    cursor: pointer;
}

/* Accessibility: Disable cursor effects on mobile */
@media (max-width: 768px) {
    body.cursor-image,
    body.cursor-glow {
        cursor: auto !important;
    }

    .circle,
    .cursor-trail-dot,
    .cursor-glow-circle,
    .cursor-glow-dot,
    .cursor-ripple,
    .cursor-sparkle {
        display: none !important;
    }
}

/* Reduce motion preference */
@media (prefers-reduced-motion: reduce) {
    .cursor-trail-dot,
    .cursor-glow-circle,
    .cursor-ripple,
    .cursor-sparkle {
        animation: none !important;
        transition: none !important;
    }
}
