/*=============================================
   FICKLE DEVELOPMENT TECHNOLOGY
   Advanced Animations & Technology Effects
   =============================================*/

/* =============================================
   TECHNOLOGY PARTICLES BACKGROUND
   ============================================= */
.tech-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.tech-particle {
    position: absolute;
    background: var(--primary-orange);
    border-radius: 50%;
    opacity: 0.1;
    animation: floatParticle linear infinite;
}

@keyframes floatParticle {
    0% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 0.2;
    }
    50% {
        opacity: 0.1;
    }
    90% {
        opacity: 0.2;
    }
    100% {
        transform: translateY(-100px) scale(1);
        opacity: 0;
    }
}


/* =============================================
   CIRCUIT BOARD PATTERN
   ============================================= */
.circuit-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.05;
    background-image: 
        linear-gradient(to right, var(--primary-orange) 1px, transparent 1px),
        linear-gradient(to bottom, var(--primary-orange) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: circuitPulse 4s ease-in-out infinite;
}

@keyframes circuitPulse {
    0%, 100% { opacity: 0.03; }
    50% { opacity: 0.07; }
}


/* =============================================
   GLOWING ORB EFFECT
   ============================================= */
.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    animation: orbFloat 8s ease-in-out infinite;
}

.glow-orb-orange {
    background: rgba(255, 102, 0, 0.3);
    width: 300px;
    height: 300px;
}

.glow-orb-white {
    background: rgba(255, 255, 255, 0.2);
    width: 200px;
    height: 200px;
}

@keyframes orbFloat {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(50px, -30px) scale(1.1);
    }
    50% {
        transform: translate(0, -60px) scale(0.9);
    }
    75% {
        transform: translate(-50px, -30px) scale(1.05);
    }
}


/* =============================================
   DIGITAL RAIN EFFECT (Matrix Style)
   ============================================= */
.digital-rain {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    opacity: 0.1;
    pointer-events: none;
}

.rain-column {
    position: absolute;
    top: -100%;
    animation: rainFall linear infinite;
    color: var(--primary-orange);
    font-family: 'Courier New', monospace;
    font-size: 14px;
}

@keyframes rainFall {
    to {
        transform: translateY(100vh);
    }
}


/* =============================================
   NEON TEXT EFFECT
   ============================================= */
.neon-text {
    color: var(--primary-white);
    text-shadow:
        0 0 7px var(--primary-white),
        0 0 10px var(--primary-white),
        0 0 21px var(--primary-white),
        0 0 42px var(--primary-orange),
        0 0 82px var(--primary-orange),
        0 0 92px var(--primary-orange),
        0 0 102px var(--primary-orange),
        0 0 151px var(--primary-orange);
    animation: neonFlicker 2s infinite alternate;
}

@keyframes neonFlicker {
    0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% {
        text-shadow:
            0 0 7px var(--primary-white),
            0 0 10px var(--primary-white),
            0 0 21px var(--primary-white),
            0 0 42px var(--primary-orange),
            0 0 82px var(--primary-orange),
            0 0 92px var(--primary-orange),
            0 0 102px var(--primary-orange),
            0 0 151px var(--primary-orange);
    }
    20%, 24%, 55% {
        text-shadow: none;
    }
}


/* =============================================
   SCANNING LINE EFFECT
   ============================================= */
.scan-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, 
        transparent, 
        var(--primary-orange), 
        transparent
    );
    animation: scanDown 3s linear infinite;
    opacity: 0.5;
}

@keyframes scanDown {
    0% { top: -10%; }
    100% { top: 110%; }
}


/* =============================================
   TYPING EFFECT
   ============================================= */
.typing-text {
    overflow: hidden;
    border-right: 3px solid var(--primary-orange);
    white-space: nowrap;
    animation: typing 3.5s steps(40, end), blink 0.75s step-end infinite;
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink {
    from, to { border-color: transparent; }
    50% { border-color: var(--primary-orange); }
}


/* =============================================
   GLITCH TEXT EFFECT
   ============================================= */
.glitch-text {
    position: relative;
    animation: glitchAnim 2s infinite;
}

.glitch-text::before,
.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch-text::before {
    left: 2px;
    text-shadow: -2px 0 var(--primary-orange);
    clip: rect(44px, 450px, 56px, 0);
    animation: glitchBefore 5s infinite linear alternate-reverse;
}

.glitch-text::after {
    left: -2px;
    text-shadow: -2px 0 var(--primary-orange-light);
    clip: rect(44px, 450px, 56px, 0);
    animation: glitchAfter 5s infinite linear alternate-reverse;
}

@keyframes glitchAnim {
    0%, 100% { transform: none; }
    92% { transform: none; }
    93% { transform: skewX(1deg); }
    94% { transform: skewX(-1deg); }
    95% { transform: skewX(0.5deg); }
    96% { transform: skewX(-0.5deg); }
    97% { transform: none; }
}

@keyframes glitchBefore {
    0%, 100% { clip: rect(0, 9999px, 0, 0); }
    20% { clip: rect(85px, 9999px, 140px, 0); }
    40% { clip: rect(40px, 9999px, 85px, 0); }
    60% { clip: rect(15px, 9999px, 40px, 0); }
    80% { clip: rect(70px, 9999px, 110px, 0); }
}

@keyframes glitchAfter {
    0%, 100% { clip: rect(0, 9999px, 0, 0); }
    20% { clip: rect(50px, 9999px, 100px, 0); }
    40% { clip: rect(25px, 9999px, 70px, 0); }
    60% { clip: rect(90px, 9999px, 130px, 0); }
    80% { clip: rect(20px, 9999px, 60px, 0); }
}


/* =============================================
   ROTATING BORDER
   ============================================= */
.rotating-border {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.rotating-border::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(
        from 0deg,
        transparent,
        var(--primary-orange),
        transparent,
        var(--primary-orange),
        transparent,
        var(--primary-orange),
        transparent
    );
    animation: rotateBorder 4s linear infinite;
    z-index: -1;
}

.rotating-border::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    right: 3px;
    bottom: 3px;
    background: var(--primary-white);
    border-radius: calc(var(--radius-lg) - 3px);
    z-index: -1;
}

@keyframes rotateBorder {
    to { transform: rotate(360deg); }
}


/* =============================================
   PULSE RING EFFECT
   ============================================= */
.pulse-ring {
    position: relative;
}

.pulse-ring::before,
.pulse-ring::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 2px solid var(--primary-orange);
    animation: pulseRing 2s ease-out infinite;
}

.pulse-ring::after {
    animation-delay: 1s;
}

@keyframes pulseRing {
    0% {
        width: 100%;
        height: 100%;
        opacity: 1;
    }
    100% {
        width: 200%;
        height: 200%;
        opacity: 0;
    }
}


/* =============================================
   SHAKE EFFECT
   ============================================= */
.shake {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}


/* =============================================
   BOUNCE EFFECT
   ============================================= */
.bounce {
    animation: bounce 0.8s ease infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}


/* =============================================
   SPIN EFFECT
   ============================================= */
.spin {
    animation: spin 2s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.spin-slow {
    animation: spin 8s linear infinite;
}

.spin-reverse {
    animation: spin 3s linear infinite reverse;
}


/* =============================================
   FLIP CARD EFFECT
   ============================================= */
.flip-card {
    perspective: 1000px;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: var(--radius-lg);
}

.flip-card-front {
    background: var(--primary-white);
}

.flip-card-back {
    background: var(--gradient-primary);
    color: var(--primary-white);
    transform: rotateY(180deg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
}


/* =============================================
   WAVE EFFECT
   ============================================= */
.wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'%3E%3Cpath fill='%23FF6600' fill-opacity='0.1' d='M0,96L48,112C96,128,192,160,288,186.7C384,213,480,235,576,213.3C672,192,768,128,864,128C960,128,1056,192,1152,208C1248,224,1344,192,1392,176L1440,160L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z'%3E%3C/path%3E%3C/svg%3E");
    background-size: cover;
    animation: waveAnim 10s ease-in-out infinite;
}

@keyframes waveAnim {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}


/* =============================================
   MORPH EFFECT
   ============================================= */
.morph {
    animation: morph 8s ease-in-out infinite;
}

@keyframes morph {
    0%, 100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
    50% { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; }
}


/* =============================================
   HOVER LIFT & SHINE
   ============================================= */
.hover-lift {
    transition: var(--transition-base);
}

.hover-lift:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.hover-shine {
    position: relative;
    overflow: hidden;
}

.hover-shine::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transform: skewX(-25deg);
    transition: var(--transition-slow);
}

.hover-shine:hover::after {
    left: 150%;
}


/* =============================================
   DATA FLOW LINES
   ============================================= */
.data-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.3;
}

.data-line {
    position: absolute;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent, 
        var(--primary-orange), 
        transparent
    );
    animation: dataFlow 4s linear infinite;
}

@keyframes dataFlow {
    0% {
        transform: translateX(-100%);
        opacity: 0;
    }
    20% {
        opacity: 1;
    }
    80% {
        opacity: 1;
    }
    100% {
        transform: translateX(200%);
        opacity: 0;
    }
}


/* =============================================
   CODE SCROLL EFFECT
   ============================================= */
.code-scroll {
    font-family: 'Courier New', monospace;
    color: var(--primary-orange);
    opacity: 0.7;
    font-size: 12px;
    line-height: 1.8;
    animation: codeScroll 20s linear infinite;
}

@keyframes codeScroll {
    0% { transform: translateY(0); }
    100% { transform: translateY(-50%); }
}


/* =============================================
   LOADING SPINNER
   ============================================= */
.tech-loader {
    width: 50px;
    height: 50px;
    position: relative;
}

.tech-loader::before,
.tech-loader::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    animation: loaderPulse 1.5s ease-in-out infinite;
}

.tech-loader::before {
    width: 100%;
    height: 100%;
    background: var(--primary-orange);
    animation-delay: 0.75s;
}

.tech-loader::after {
    width: 50%;
    height: 50%;
    background: var(--primary-black);
    top: 25%;
    left: 25%;
}

@keyframes loaderPulse {
    0%, 100% { transform: scale(0); opacity: 1; }
    50% { transform: scale(1); opacity: 0.5; }
}


/* =============================================
   PROGRESS BAR ANIMATION
   ============================================= */
.progress-bar-animated {
    background: linear-gradient(90deg, 
        var(--primary-orange) 0%, 
        var(--primary-orange-light) 50%, 
        var(--primary-orange) 100%
    );
    background-size: 200% 100%;
    animation: progressGradient 2s linear infinite;
}

@keyframes progressGradient {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}


/* =============================================
   NOTIFICATION BELL
   ============================================= */
.notification-ring {
    animation: ring 4s ease-in-out infinite;
    transform-origin: top center;
}

@keyframes ring {
    0%, 100% { transform: rotate(0); }
    5%, 15% { transform: rotate(15deg); }
    10%, 20% { transform: rotate(-15deg); }
    25% { transform: rotate(0); }
}


/* =============================================
   PLATFORM ROTATE (3D)
   ============================================= */
.rotate-3d {
    animation: rotate3D 10s linear infinite;
    transform-style: preserve-3d;
}

@keyframes rotate3D {
    0% { transform: rotateY(0deg) rotateX(10deg); }
    100% { transform: rotateY(360deg) rotateX(10deg); }
}


/* =============================================
   COUNT UP ANIMATION
   ============================================= */
.count-up {
    display: inline-block;
    animation: countFade 0.5s ease-out;
}

@keyframes countFade {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* =============================================
   REVEAL ON SCROLL (Alternative to AOS)
   ============================================= */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.8s ease;
}

.reveal-left.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.8s ease;
}

.reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.8s ease;
}

.reveal-scale.active {
    opacity: 1;
    transform: scale(1);
}


/* =============================================
   CURSOR EFFECT
   ============================================= */
.custom-cursor {
    width: 20px;
    height: 20px;
    border: 2px solid var(--primary-orange);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.1s ease;
    mix-blend-mode: difference;
}

.custom-cursor-dot {
    width: 6px;
    height: 6px;
    background: var(--primary-orange);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.05s ease;
}


/* =============================================
   SKELETON LOADING
   ============================================= */
.skeleton {
    background: linear-gradient(90deg, 
        var(--light-gray) 25%, 
        var(--medium-gray) 50%, 
        var(--light-gray) 75%
    );
    background-size: 200% 100%;
    animation: skeletonLoading 1.5s ease-in-out infinite;
    border-radius: var(--radius-sm);
}

@keyframes skeletonLoading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-text {
    height: 15px;
    margin-bottom: 10px;
}

.skeleton-text:last-child {
    width: 70%;
}

.skeleton-image {
    height: 200px;
    margin-bottom: 20px;
}

.skeleton-button {
    height: 45px;
    width: 150px;
}


/* =============================================
   SCROLL INDICATOR
   ============================================= */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.scroll-mouse {
    width: 25px;
    height: 40px;
    border: 2px solid var(--primary-white);
    border-radius: 15px;
    position: relative;
}

.scroll-wheel {
    width: 4px;
    height: 8px;
    background: var(--primary-white);
    border-radius: 2px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: scrollWheel 2s ease-in-out infinite;
}

@keyframes scrollWheel {
    0% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(15px); }
}

.scroll-arrows {
    text-align: center;
    margin-top: 10px;
}

.scroll-arrows span {
    display: block;
    width: 10px;
    height: 10px;
    border-right: 2px solid var(--primary-white);
    border-bottom: 2px solid var(--primary-white);
    transform: rotate(45deg);
    margin: -5px auto 0;
    animation: scrollArrows 2s infinite;
}

.scroll-arrows span:nth-child(2) {
    animation-delay: 0.2s;
}

.scroll-arrows span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes scrollArrows {
    0% { opacity: 0; }
    50% { opacity: 1; }
    100% { opacity: 0; }
}


/* =============================================
   MAGNETIC HOVER EFFECT
   ============================================= */
.magnetic {
    transition: transform 0.3s ease-out;
}


/* =============================================
   GRADIENT TEXT
   ============================================= */
.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-text-animated {
    background: linear-gradient(270deg, 
        var(--primary-orange), 
        var(--primary-orange-light),
        var(--primary-orange-dark),
        var(--primary-orange)
    );
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}


/* =============================================
   REDUCED MOTION
   ============================================= */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}