/* 
   Tech-inspired animations for Changamire Website
   Adds futuristic animations and effects
*/

/* Glowing border animation */
.glow-border {
    position: relative;
    overflow: hidden;
}

.glow-border::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-color));
    animation: glowBorderX 3s linear infinite;
}

.glow-border::after {
    content: '';
    position: absolute;
    top: -100%;
    right: 0;
    width: 2px;
    height: 100%;
    background: linear-gradient(180deg, transparent, var(--accent-color));
    animation: glowBorderY 3s linear infinite;
    animation-delay: 0.75s;
}

@keyframes glowBorderX {
    0% {
        left: -100%;
    }
    50%, 100% {
        left: 100%;
    }
}

@keyframes glowBorderY {
    0% {
        top: -100%;
    }
    50%, 100% {
        top: 100%;
    }
}

/* Tech loading animation */
.tech-loading {
    position: relative;
}

.tech-loading::before {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    box-shadow: 0 0 10px var(--accent-color);
    transition: width 0.5s ease;
}

.tech-loading:hover::before {
    width: 100%;
}

/* Circuit pattern overlay */
.circuit-overlay {
    position: relative;
    overflow: hidden;
}

.circuit-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/backgrounds/circuit-bg.jpg');
    background-size: 50%;
    opacity: 0.05;
    mix-blend-mode: screen;
    pointer-events: none;
    z-index: 1;
}

/* Pulse animation */
.pulse {
    position: relative;
}

.pulse::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: inherit;
    border: 2px solid var(--accent-color);
    opacity: 0;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: translate(-50%, -50%) scale(0.9);
        opacity: 0.7;
    }
    70% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 0;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0;
    }
}

/* Data stream animation */
.data-stream {
    position: relative;
    overflow: hidden;
}

.data-stream::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(0, 194, 255, 0.05) 50%, 
        transparent 100%);
    animation: dataStream 2s infinite linear;
    z-index: 0;
}

@keyframes dataStream {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* Typing cursor animation */
.typing-cursor::after {
    content: '|';
    display: inline-block;
    animation: blink 1s infinite;
    color: var(--accent-color);
    font-weight: 100;
}

@keyframes blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0;
    }
}

/* Floating animation */
.floating {
    animation: floating 3s ease-in-out infinite;
}

@keyframes floating {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Tech icon glow */
.tech-icon {
    position: relative;
    transition: all 0.3s ease;
}

.tech-icon:hover {
    color: var(--accent-color);
    text-shadow: 0 0 10px var(--accent-color);
    transform: scale(1.1);
}

/* Gradient text */
.gradient-text {
    background: linear-gradient(90deg, var(--accent-color), #80dfff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: inline-block;
}

/* Digital noise effect */
.digital-noise {
    position: relative;
    overflow: hidden;
}

.digital-noise::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect width="1" height="1" fill="%2300c2ff" opacity="0.05" x="10" y="10"/><rect width="1" height="1" fill="%2300c2ff" opacity="0.1" x="30" y="40"/><rect width="1" height="1" fill="%2300c2ff" opacity="0.05" x="50" y="20"/><rect width="1" height="1" fill="%2300c2ff" opacity="0.1" x="70" y="50"/><rect width="1" height="1" fill="%2300c2ff" opacity="0.05" x="90" y="30"/><rect width="1" height="1" fill="%2300c2ff" opacity="0.1" x="20" y="60"/><rect width="1" height="1" fill="%2300c2ff" opacity="0.05" x="40" y="80"/><rect width="1" height="1" fill="%2300c2ff" opacity="0.1" x="60" y="70"/><rect width="1" height="1" fill="%2300c2ff" opacity="0.05" x="80" y="90"/></svg>');
    opacity: 0.3;
    z-index: 0;
}
