/* ============================================
   OPTIONAL MODERN EFFECTS
   To enable: Uncomment the @import line in index.html
   To disable: Comment out the @import line in index.html
   ============================================ */

/* ============================================
   1. FILM GRAIN TEXTURE OVERLAY
   Adds a subtle vintage film grain effect
   ============================================ */
body.effect-grain::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    animation: grain 8s steps(10) infinite;
}

@keyframes grain {
    0%, 100% { transform: translate(0, 0); }
    10% { transform: translate(-5%, -10%); }
    20% { transform: translate(-15%, 5%); }
    30% { transform: translate(7%, -25%); }
    40% { transform: translate(-5%, 25%); }
    50% { transform: translate(-15%, 10%); }
    60% { transform: translate(15%, 0%); }
    70% { transform: translate(0%, 15%); }
    80% { transform: translate(3%, 35%); }
    90% { transform: translate(-10%, 10%); }
}

/* ============================================
   2. GLITCH TEXT EFFECT
   Adds a cyberpunk-style glitch to hero title
   ============================================ */
.effect-glitch .hero-title {
    position: relative;
}

.effect-glitch .hero-title::before,
.effect-glitch .hero-title::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
}

.effect-glitch .hero-title::before {
    left: 2px;
    text-shadow: -2px 0 #ff00de;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}

.effect-glitch .hero-title::after {
    left: -2px;
    text-shadow: -2px 0 #00fff9, 2px 2px #ff00de;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
    animation-delay: 0.5s;
}

@keyframes glitch-anim {
    0% { clip: rect(31px, 9999px, 94px, 0); }
    5% { clip: rect(70px, 9999px, 71px, 0); }
    10% { clip: rect(28px, 9999px, 17px, 0); }
    15% { clip: rect(92px, 9999px, 2px, 0); }
    20% { clip: rect(18px, 9999px, 93px, 0); }
    25% { clip: rect(53px, 9999px, 55px, 0); }
    30% { clip: rect(76px, 9999px, 82px, 0); }
    35% { clip: rect(39px, 9999px, 48px, 0); }
    40% { clip: rect(12px, 9999px, 69px, 0); }
    45% { clip: rect(61px, 9999px, 34px, 0); }
    50% { clip: rect(86px, 9999px, 15px, 0); }
    55% { clip: rect(43px, 9999px, 77px, 0); }
    60% { clip: rect(8px, 9999px, 58px, 0); }
    65% { clip: rect(94px, 9999px, 26px, 0); }
    70% { clip: rect(52px, 9999px, 89px, 0); }
    75% { clip: rect(19px, 9999px, 4px, 0); }
    80% { clip: rect(67px, 9999px, 41px, 0); }
    85% { clip: rect(35px, 9999px, 63px, 0); }
    90% { clip: rect(81px, 9999px, 20px, 0); }
    95% { clip: rect(5px, 9999px, 75px, 0); }
    100% { clip: rect(45px, 9999px, 37px, 0); }
}

/* ============================================
   3. MAGNETIC BUTTON EFFECT
   Buttons follow cursor on hover
   ============================================ */
.effect-magnetic .cta-button,
.effect-magnetic .contact-email-button {
    transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

/* JavaScript required for this effect - see effects.js */

/* ============================================
   4. 3D TILT CARDS
   Cards tilt based on mouse position
   ============================================ */
.effect-tilt .about-images,
.effect-tilt .carousel-item {
    transform-style: preserve-3d;
    transition: transform 0.3s ease;
}

/* JavaScript required for this effect - see effects.js */

/* ============================================
   5. PARALLAX SCROLL SECTIONS
   Enhanced parallax scrolling
   ============================================ */
.effect-parallax .about,
.effect-parallax .media,
.effect-parallax .contact {
    background-attachment: fixed;
    background-size: cover;
}

/* ============================================
   6. ANIMATED GRADIENT BACKGROUND
   Morphing gradient colors
   ============================================ */
.effect-gradient-animate .hero-gradient {
    background:
        radial-gradient(circle at 20% 50%, rgba(255, 107, 53, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(247, 147, 30, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 50% 20%, rgba(255, 0, 222, 0.1) 0%, transparent 50%);
    animation: gradientMorph 15s ease infinite;
}

@keyframes gradientMorph {
    0%, 100% {
        background-position: 0% 50%;
        background-size: 100% 100%;
    }
    25% {
        background-position: 100% 50%;
        background-size: 120% 120%;
    }
    50% {
        background-position: 50% 100%;
        background-size: 100% 100%;
    }
    75% {
        background-position: 0% 0%;
        background-size: 110% 110%;
    }
}

/* ============================================
   7. SECTION REVEAL ANIMATION
   Sections slide in with blur effect
   ============================================ */
.effect-reveal [data-animate] {
    opacity: 0;
    transform: translateY(50px);
    filter: blur(10px);
    transition: opacity 1s ease, transform 1s ease, filter 1s ease;
}

.effect-reveal [data-animate].animate-in {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
}

/* ============================================
   8. NEON GLOW EFFECT
   Adds neon glow to buttons and text
   ============================================ */
.effect-neon .cta-button {
    box-shadow:
        0 0 10px rgba(255, 107, 53, 0.5),
        0 0 20px rgba(255, 107, 53, 0.4),
        0 0 30px rgba(255, 107, 53, 0.3),
        0 0 40px rgba(255, 107, 53, 0.2);
    animation: neonPulse 2s ease-in-out infinite alternate;
}

.effect-neon .hero-logo img {
    filter: brightness(1.4) saturate(1.3)
            drop-shadow(0 0 30px rgba(255, 107, 53, 1))
            drop-shadow(0 0 60px rgba(255, 107, 53, 0.8))
            drop-shadow(0 0 90px rgba(255, 107, 53, 0.6));
}

@keyframes neonPulse {
    from {
        box-shadow:
            0 0 10px rgba(255, 107, 53, 0.5),
            0 0 20px rgba(255, 107, 53, 0.4),
            0 0 30px rgba(255, 107, 53, 0.3);
    }
    to {
        box-shadow:
            0 0 20px rgba(255, 107, 53, 0.8),
            0 0 30px rgba(255, 107, 53, 0.6),
            0 0 40px rgba(255, 107, 53, 0.5),
            0 0 50px rgba(255, 107, 53, 0.4);
    }
}

/* ============================================
   9. TYPEWRITER EFFECT
   Text types out on load
   ============================================ */
.effect-typewriter .hero-subtitle {
    overflow: hidden;
    border-right: 3px solid var(--color-primary);
    white-space: nowrap;
    margin: 0 auto;
    letter-spacing: 0.15em;
    animation:
        typing 3.5s steps(40, end) 1s 1 normal both,
        blink-caret 0.75s step-end infinite;
    width: fit-content;
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: var(--color-primary); }
}

/* ============================================
   10. SCROLL PROGRESS BAR
   Shows reading progress at top
   ============================================ */
.effect-progress::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: var(--scroll-progress, 0%);
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
    z-index: 10000;
    transition: width 0.1s ease;
    box-shadow: 0 0 10px rgba(255, 107, 53, 0.5);
}

/* ============================================
   11. FLOATING PARTICLES (Canvas-based)
   Particle system in background
   ============================================ */
#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    opacity: 0.3;
}

/* ============================================
   12. SMOOTH CURSOR TRAIL
   Custom cursor with trail effect
   ============================================ */
.effect-cursor {
    cursor: none;
}

.cursor-dot,
.cursor-outline {
    pointer-events: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    opacity: 1;
    z-index: 10000;
}

.cursor-dot {
    width: 8px;
    height: 8px;
    background: var(--color-primary);
    box-shadow: 0 0 10px var(--color-primary);
}

.cursor-outline {
    width: 40px;
    height: 40px;
    border: 2px solid var(--color-primary);
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.cursor-outline.active {
    transform: translate(-50%, -50%) scale(1.5);
    opacity: 0.5;
}

/* ============================================
   13. ENHANCED LOGO EFFECTS
   More dramatic logo animations
   ============================================ */
.effect-logo-enhanced .hero-logo img {
    animation: logoFloat 3s ease-in-out infinite, logoRotate 20s linear infinite, logoPulse 2s ease-in-out infinite;
}

@keyframes logoRotate {
    from { transform: rotate(0deg) translateY(0px); }
    25% { transform: rotate(5deg) translateY(-10px); }
    50% { transform: rotate(0deg) translateY(0px); }
    75% { transform: rotate(-5deg) translateY(-10px); }
    to { transform: rotate(0deg) translateY(0px); }
}

@keyframes logoPulse {
    0%, 100% {
        filter: drop-shadow(0 8px 24px rgba(255, 107, 53, 0.3));
        transform: scale(1);
    }
    50% {
        filter: drop-shadow(0 8px 40px rgba(255, 107, 53, 0.6));
        transform: scale(1.05);
    }
}

/* ============================================
   14. SECTION BACKGROUND EFFECTS
   Animated backgrounds for sections
   ============================================ */
.effect-bg-animated .about,
.effect-bg-animated .media,
.effect-bg-animated .contact {
    position: relative;
    overflow: hidden;
}

.effect-bg-animated .about::before,
.effect-bg-animated .media::before,
.effect-bg-animated .contact::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background: radial-gradient(circle, rgba(255, 107, 53, 0.05) 0%, transparent 70%);
    animation: bgRotate 30s linear infinite;
}

@keyframes bgRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ============================================
   15. TEXT SHADOW DEPTH
   3D text depth effect
   ============================================ */
.effect-text-depth .hero-title .title-word {
    text-shadow:
        1px 1px 0 rgba(255, 107, 53, 0.5),
        2px 2px 0 rgba(255, 107, 53, 0.4),
        3px 3px 0 rgba(255, 107, 53, 0.3),
        4px 4px 0 rgba(255, 107, 53, 0.2),
        5px 5px 0 rgba(255, 107, 53, 0.1),
        6px 6px 10px rgba(0, 0, 0, 0.5);
}

/* ============================================
   PERFORMANCE NOTE
   Some effects may impact performance on older devices.
   Test on target devices before deploying.
   ============================================ */
