/* Professional Modern Animations CSS */

:root {
    --premium-easing: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Background Refinement */
.animated-gradient {
    background: linear-gradient(-45deg, #f8fafc, #eff6ff, #f1f5f9, #ffffff);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

.dark .animated-gradient {
    background: linear-gradient(-45deg, #0f172a, #1e1b4b, #020617, #0f172a);
    background-size: 400% 400%;
}

/* Sophisticated Grid Background */
.hero-grid {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 2px 2px, rgba(59, 130, 246, 0.05) 1px, transparent 0);
    background-size: 40px 40px;
    mask-image: radial-gradient(ellipse at center, black, transparent 80%);
    pointer-events: none;
    z-index: 1;
}

.dark .hero-grid {
    background-image: radial-gradient(circle at 2px 2px, rgba(59, 130, 246, 0.1) 1px, transparent 0);
}

/* Modern Reveal Animation */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    filter: blur(4px);
    transition: opacity 0.8s var(--premium-easing), transform 0.8s var(--premium-easing), filter 0.8s var(--premium-easing);
    will-change: opacity, transform, filter;
}

.reveal-on-scroll.revealed {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
}

/* Glassmorphism Refinement */
.tilt-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03);
    transition: all 0.4s var(--premium-easing);
}

.dark .tilt-card {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

.tilt-card:hover {
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 10px 40px rgba(59, 130, 246, 0.1);
}

/* Word Cycle Animation (Professional Typing Replacement) */
.word-cycle {
    display: inline-block;
    position: relative;
    height: 1.2em;
    vertical-align: bottom;
    overflow: hidden;
}

.word-cycle span {
    display: block;
    animation: wordSlide 6s infinite var(--premium-easing);
}

@keyframes wordSlide {
    0%, 30% { transform: translateY(0); }
    33%, 63% { transform: translateY(-100%); }
    66%, 96% { transform: translateY(-200%); }
    100% { transform: translateY(0); }
}

/* Code Window Animations */
.terminal-cursor {
    display: inline-block;
    width: 8px;
    height: 15px;
    background: var(--primary-color, #3b82f6);
    margin-left: 4px;
    animation: blink 1s step-end infinite;
}

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

.window-scanline {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        transparent,
        rgba(59, 130, 246, 0.05) 50%,
        transparent
    );
    background-size: 100% 200%;
    animation: scanline 4s linear infinite;
    pointer-events: none;
    z-index: 5;
}

@keyframes scanline {
    0% { background-position: 0 -100%; }
    100% { background-position: 0 100%; }
}

.code-window-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120%;
    height: 120%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
    z-index: -1;
    animation: glowPulse 4s ease-in-out infinite;
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 0.8; transform: translate(-50%, -50%) scale(1.1); }
}

/* Noise Texture Overlay */
.noise-overlay {
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.02;
    pointer-events: none;
    z-index: 9999;
}

/* Enhanced Buttons */
.hover-scale {
    transition: all 0.3s var(--premium-easing);
}

.hover-scale:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(59, 130, 246, 0.4);
}

/* Magnetic-like Button Effect Container */
.magnetic-wrap {
    display: inline-block;
    transition: transform 0.2s var(--premium-easing);
}
