/* ========================================
   RETRO COMPUTER VISUAL EFFECTS SYSTEM
   "Alive Computer" Aesthetic
   ======================================== */

/* ========================================
   NEON COLOR PALETTE & GLOW MAP
   ======================================== */
:root {
    /* Retro Neon Colors */
    --neon-blue: #00d9ff;
    --neon-purple: #8A2BE2;
    --neon-cyan: #00AEEF;
    --neon-green: #00ff00;
    --neon-pink: #ff00ff;
    --retro-black: #0a0a0f;
    --holo-white: #e0f7ff;

    /* Glow Intensities */
    --glow-sm: 0 0 5px currentColor, 0 0 10px currentColor;
    --glow-md: 0 0 10px currentColor, 0 0 20px currentColor, 0 0 30px currentColor;
    --glow-lg: 0 0 15px currentColor, 0 0 30px currentColor, 0 0 45px currentColor, 0 0 60px currentColor;

    /* Terminal Window Effects */
    --terminal-border: 2px solid var(--neon-cyan);
    --terminal-glow: 0 0 20px rgba(0, 174, 239, 0.5), inset 0 0 20px rgba(0, 174, 239, 0.1);
    --terminal-bg: rgba(10, 10, 15, 0.85);

    /* Animation Speeds */
    --speed-slow: 3s;
    --speed-medium: 1.5s;
    --speed-fast: 0.5s;
}

/* ========================================
   CRT SCANLINE EFFECT
   ======================================== */
.crt-scanlines {
    position: relative;
    overflow: hidden;
}

.crt-scanlines::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(0deg,
            rgba(0, 0, 0, 0.15) 0px,
            rgba(0, 0, 0, 0.15) 1px,
            transparent 1px,
            transparent 2px);
    pointer-events: none;
    z-index: 10;
    animation: scanline-drift 8s linear infinite;
}

@keyframes scanline-drift {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(4px);
    }
}

/* ========================================
   RETRO NOISE TEXTURE OVERLAY
   ======================================== */
.retro-noise {
    position: relative;
}

.retro-noise::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' /%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.05'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 1;
    mix-blend-mode: overlay;
    opacity: 0.05;
}

/* ========================================
   NEON GRID BACKGROUND (SCROLLING REACTIVE)
   ======================================== */
.neon-grid-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    background: var(--retro-black);
}

.neon-grid {
    position: absolute;
    width: 200%;
    height: 200%;
    background-image:
        linear-gradient(rgba(0, 174, 239, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 174, 239, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    transform: perspective(500px) rotateX(60deg) translateZ(-100px);
    animation: grid-scroll 20s linear infinite;
    will-change: transform;
}

@keyframes grid-scroll {
    0% {
        transform: perspective(500px) rotateX(60deg) translateZ(-100px) translateY(0);
    }

    100% {
        transform: perspective(500px) rotateX(60deg) translateZ(-100px) translateY(50px);
    }
}

/* Grid with parallax effect */
.neon-grid.parallax {
    animation: grid-parallax 30s ease-in-out infinite;
}

@keyframes grid-parallax {

    0%,
    100% {
        transform: perspective(500px) rotateX(60deg) translateZ(-100px) translateY(0) translateX(0);
    }

    50% {
        transform: perspective(500px) rotateX(60deg) translateZ(-100px) translateY(25px) translateX(25px);
    }
}

/* ========================================
   FLOATING HOLOGRAPHIC SHAPES
   ======================================== */
.holo-shapes-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.holo-shape {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(138, 43, 226, 0.15), transparent 70%);
    filter: blur(40px);
    animation: float-drift 20s ease-in-out infinite;
    will-change: transform;
}

.holo-shape:nth-child(1) {
    width: 300px;
    height: 300px;
    top: 10%;
    left: 10%;
    animation-duration: 25s;
    background: radial-gradient(circle, rgba(0, 255, 0, 0.1), transparent 70%);
}

.holo-shape:nth-child(2) {
    width: 400px;
    height: 400px;
    top: 50%;
    right: 10%;
    animation-duration: 30s;
    animation-delay: -5s;
    background: radial-gradient(circle, rgba(0, 174, 239, 0.12), transparent 70%);
}

.holo-shape:nth-child(3) {
    width: 250px;
    height: 250px;
    bottom: 20%;
    left: 50%;
    animation-duration: 22s;
    animation-delay: -10s;
    background: radial-gradient(circle, rgba(138, 43, 226, 0.08), transparent 70%);
}

@keyframes float-drift {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(30px, -30px) scale(1.1);
    }

    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

/* ========================================
   GLOWING TERMINAL WINDOW CARDS
   ======================================== */
.terminal-window {
    position: relative;
    background: var(--terminal-bg);
    border: var(--terminal-border);
    border-radius: 8px;
    padding: 2rem;
    box-shadow: var(--terminal-glow);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.terminal-window::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--neon-cyan), var(--neon-purple), var(--neon-green));
    border-radius: 8px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.terminal-window:hover::before {
    opacity: 0.3;
    animation: border-glow 2s ease-in-out infinite;
}

@keyframes border-glow {

    0%,
    100% {
        opacity: 0.3;
    }

    50% {
        opacity: 0.6;
    }
}

.terminal-window:hover {
    transform: translateY(-5px);
    box-shadow:
        0 0 30px rgba(0, 174, 239, 0.6),
        inset 0 0 30px rgba(0, 174, 239, 0.15);
}

/* Terminal Window Header */
.terminal-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(0, 174, 239, 0.3);
}

.terminal-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--neon-green);
    box-shadow: 0 0 10px var(--neon-green);
}

.terminal-dot:nth-child(2) {
    background: var(--neon-cyan);
    box-shadow: 0 0 10px var(--neon-cyan);
}

.terminal-dot:nth-child(3) {
    background: var(--neon-purple);
    box-shadow: 0 0 10px var(--neon-purple);
}

/* ========================================
   HOLOGRAPHIC SHIMMER EFFECT
   ======================================== */
.holo-shimmer {
    position: relative;
    overflow: hidden;
}

.holo-shimmer::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg,
            transparent 30%,
            rgba(255, 255, 255, 0.1) 50%,
            transparent 70%);
    transform: translateX(-100%) translateY(-100%);
    transition: transform 0.6s ease;
}

.holo-shimmer:hover::after {
    transform: translateX(100%) translateY(100%);
}

/* ========================================
   NEON TEXT GLOW EFFECTS
   ======================================== */
.neon-text {
    color: var(--neon-cyan);
    text-shadow: var(--glow-md);
    animation: neon-flicker 3s ease-in-out infinite;
}

.neon-text-green {
    color: var(--neon-green);
    text-shadow: var(--glow-md);
}

.neon-text-purple {
    color: var(--neon-purple);
    text-shadow: var(--glow-md);
}

@keyframes neon-flicker {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.95;
    }

    51% {
        opacity: 1;
    }

    52% {
        opacity: 0.97;
    }

    53% {
        opacity: 1;
    }
}

/* ========================================
   GLOWING BORDERS & OUTLINES
   ======================================== */
.glow-border {
    border: 2px solid currentColor;
    box-shadow:
        0 0 10px currentColor,
        inset 0 0 10px rgba(255, 255, 255, 0.1);
}

.glow-border-green {
    border-color: var(--neon-green);
    box-shadow:
        0 0 15px var(--neon-green),
        inset 0 0 15px rgba(0, 255, 0, 0.1);
}

.glow-border-cyan {
    border-color: var(--neon-cyan);
    box-shadow:
        0 0 15px var(--neon-cyan),
        inset 0 0 15px rgba(0, 174, 239, 0.1);
}

.glow-border-purple {
    border-color: var(--neon-purple);
    box-shadow:
        0 0 15px var(--neon-purple),
        inset 0 0 15px rgba(138, 43, 226, 0.1);
}

/* ========================================
   PARALLAX SCROLL LAYERS
   ======================================== */
.parallax-layer {
    will-change: transform;
    transition: transform 0.1s ease-out;
}

.parallax-slow {
    transform: translateZ(-1px) scale(1.1);
}

.parallax-medium {
    transform: translateZ(-0.5px) scale(1.05);
}

.parallax-fast {
    transform: translateZ(0);
}

/* ========================================
   SECTION FADE-IN ANIMATIONS
   ======================================== */
.fade-in-section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-section.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   RESPONSIVE UTILITIES
   ======================================== */
@media (max-width: 768px) {
    .neon-grid {
        background-size: 30px 30px;
    }

    .holo-shape {
        filter: blur(20px);
    }

    .terminal-window {
        padding: 1.5rem;
    }
}

/* ========================================
   PERFORMANCE OPTIMIZATIONS
   ======================================== */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .neon-grid,
    .holo-shape,
    .crt-scanlines::before {
        animation: none !important;
    }
}

/* GPU Acceleration for smooth animations */
.neon-grid,
.holo-shape,
.terminal-window,
.parallax-layer {
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
}