/* ============================================
   CYBERPUNK PORTFOLIO - MAIN STYLES
   Author: Haddalene Samy
   ============================================ */

/* ADVANCED CYBERPUNK ANIMATIONS */

@keyframes glitch {
    0%, 100% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
}

@keyframes glitch-text {
    0% { text-shadow: 3px 3px 0px #ff007f, -3px -3px 0px #00f3ff; }
    25% { text-shadow: -3px -3px 0px #ff007f, 3px 3px 0px #00f3ff; }
    50% { text-shadow: 3px -3px 0px #ff007f, -3px 3px 0px #00f3ff; }
    75% { text-shadow: -3px 3px 0px #ff007f, 3px -3px 0px #00f3ff; }
    100% { text-shadow: 3px 3px 0px #ff007f, -3px -3px 0px #00f3ff; }
}

@keyframes neon-glow {
    0%, 100% { 
        text-shadow: 0 0 10px #00f3ff, 0 0 20px #00f3ff, 0 0 30px #00f3ff;
        filter: brightness(1);
    }
    50% { 
        text-shadow: 0 0 20px #00f3ff, 0 0 30px #00f3ff, 0 0 40px #00f3ff, 0 0 50px #00f3ff;
        filter: brightness(1.3);
    }
}

@keyframes neon-flicker {
    0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% { opacity: 1; }
    20%, 24%, 55% { opacity: 0.7; }
    22% { opacity: 0.4; }
}

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

@keyframes slide-in {
    from { transform: translateX(-50px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes fade-in-up {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes border-flow {
    0% { border-color: #00f3ff; box-shadow: 0 0 10px #00f3ff; }
    33% { border-color: #ff007f; box-shadow: 0 0 10px #ff007f; }
    66% { border-color: #bc13fe; box-shadow: 0 0 10px #bc13fe; }
    100% { border-color: #00f3ff; box-shadow: 0 0 10px #00f3ff; }
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 5px #00f3ff, 0 0 10px #00f3ff; }
    50% { box-shadow: 0 0 10px #00f3ff, 0 0 20px #00f3ff, 0 0 30px #00f3ff; }
}

@keyframes scan-line {
    0% { top: 0%; }
    100% { top: 100%; }
}

@keyframes grid-pulse {
    0%, 100% { opacity: 0.05; }
    50% { opacity: 0.15; }
}

@keyframes glitch-interval {
    0%, 96%, 100% { transform: translate(0); filter: none; opacity: 1; }
    97% { transform: translate(-2px, 2px); filter: contrast(150%) brightness(110%); opacity: 0.9; }
    98% { transform: translate(2px, -2px); filter: hue-rotate(90deg) contrast(170%); }
    99% { transform: translate(-1px, -1px); filter: invert(10%); opacity: 0.8; }
}

/* Animated grid background */
.cyber-grid-bg {
    background-image: 
        linear-gradient(rgba(0, 243, 255, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 243, 255, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: grid-pulse 4s ease-in-out infinite;
}

/* Animation utility classes */
.glitch-hover:hover { animation: glitch 0.3s infinite; }
.glitch-text-anim { animation: glitch-text 4s infinite; }
.neon-glow-anim { animation: neon-glow 2s ease-in-out infinite; }
.neon-flicker-anim { animation: neon-flicker 8s infinite; }
.float-anim { animation: float 3s ease-in-out infinite; }
.slide-in-anim { animation: slide-in 0.8s ease-out forwards; }
.fade-in-up-anim { animation: fade-in-up 0.6s ease-out forwards; }
.border-flow-anim { animation: border-flow 3s linear infinite; }
.pulse-glow-anim { animation: pulse-glow 2s ease-in-out infinite; }
.glitch-interval-anim { animation: glitch-interval 6s infinite; }

/* Stagger animation delays */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }

/* Animated scan line effect */
.scan-line {
    position: absolute;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #00f3ff, transparent);
    animation: scan-line 4s linear infinite;
    pointer-events: none;
    z-index: 1001;
}

/* Neon underline hover effect */
.neon-underline {
    position: relative;
}
.neon-underline::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #00f3ff, #ff007f);
    box-shadow: 0 0 10px #00f3ff;
    transition: width 0.3s ease;
}
.neon-underline:hover::after {
    width: 100%;
}

/* 3D perspective card effect */
.perspective-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.perspective-card:hover {
    transform: perspective(1000px) rotateY(5deg) translateZ(20px);
    box-shadow: -20px 20px 40px rgba(0, 243, 255, 0.3);
}

/* Existing glitch border effect */
.glitch-border {
    position: relative;
    border: 2px solid #00f3ff;
    box-shadow: 4px 4px 0px #ff007f;
}
.glitch-border::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    width: calc(100% + 10px);
    height: calc(100% + 10px);
    border: 1px solid #bc13fe;
    pointer-events: none;
    z-index: -1;
}

/* Chromatic aberration effect */
.chromatic-aberration {
    position: relative;
    filter: contrast(150%) brightness(110%);
}
.chromatic-aberration::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(255,0,127,0.1), rgba(0,243,255,0.1));
    mix-blend-mode: color-burn;
    pointer-events: none;
}

/* Distorted headline effect */
.distorted-headline {
    letter-spacing: 0.15em;
    text-shadow: 3px 3px 0px #ff007f, -3px -3px 0px #00f3ff;
}

/* Scanlines overlay */
.scanlines-overlay {
    background: linear-gradient(
        to bottom,
        transparent 50%,
        rgba(0, 0, 0, 0.3) 50%
    );
    background-size: 100% 4px;
    pointer-events: none;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: #050505;
}
::-webkit-scrollbar-thumb {
    background: #00f3ff;
    border: 2px solid #050505;
}
::-webkit-scrollbar-thumb:hover {
    background: #ff007f;
    box-shadow: 0 0 10px #ff007f;
}

/* Utility classes */
.pixel-text {
    font-size: 0.65rem;
    line-height: 1.6;
    letter-spacing: -0.02em;
}

.hard-shadow {
    box-shadow: 8px 8px 0px #000;
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        animation: none !important;
        transition: none !important;
    }
}
