/* Custom gradient background */
.gradient-bg {
    background: linear-gradient(135deg, #0f0f0f 0%, #1a1a1a 100%);
    position: relative;
    overflow: hidden;
}

/* Wireframe mesh background */
.wireframe-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.15;
    background-image: 
        linear-gradient(rgba(59, 130, 246, 0.3) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59, 130, 246, 0.3) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
}

/* Flowing curved mesh */
.mesh-curve {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0.1;
    pointer-events: none;
}

/* Custom accent gradient */
.accent-gradient {
    background: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
}

/* Custom hover effects */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(59, 130, 246, 0.1);
}

/* Wireframe wave animation */
@keyframes wave-flow {
    0%, 100% {
        transform: translateX(0) translateY(0);
    }
    50% {
        transform: translateX(-20px) translateY(-10px);
    }
}

.mesh-animate {
    animation: wave-flow 20s ease-in-out infinite;
}

/* Geometric line accents */
.geo-line {
    position: absolute;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.15), transparent);
    pointer-events: none;
    z-index: 0;
}

/* Wireframe card borders */
.wireframe-card {
    position: relative;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.wireframe-card::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    background: linear-gradient(135deg, 
        rgba(59, 130, 246, 0.1) 0%, 
        transparent 50%, 
        rgba(6, 182, 212, 0.1) 100%);
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.wireframe-card:hover::before {
    opacity: 1;
}

/* Technical font styling */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.tech-text {
    font-family: 'Space Mono', monospace;
    letter-spacing: 0.05em;
}

/* Interactive Quiz Styles */
.quiz-card {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05), rgba(6, 182, 212, 0.05));
    border: 1px solid rgba(59, 130, 246, 0.3);
    transition: all 0.3s ease;
}

.quiz-card:hover {
    border-color: rgba(59, 130, 246, 0.6);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.2);
}

.quiz-option {
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid rgba(59, 130, 246, 0.3);
}

.quiz-option:hover {
    border-color: rgba(59, 130, 246, 0.6);
    transform: scale(1.02);
}

.quiz-option.correct {
    background: rgba(34, 197, 94, 0.2);
    border-color: rgb(34, 197, 94);
    animation: pulse-correct 0.5s ease;
}

.quiz-option.wrong {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgb(239, 68, 68);
    animation: shake 0.5s ease;
}

@keyframes pulse-correct {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Floating particles animation with motion blur */
.particles {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.8), transparent);
    border-radius: 50%;
    animation: float-up 15s infinite ease-in-out;
    filter: blur(0.5px);
}

@keyframes float-up {
    0% {
        opacity: 0;
        transform: translateY(100vh) translateX(0) scale(0);
        filter: blur(1px);
    }
    10% {
        opacity: 1;
    }
    50% {
        transform: translateY(50vh) translateX(20px) scale(1);
        filter: blur(0.5px);
    }
    90% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translateY(-100vh) translateX(-10px) scale(1.2);
        filter: blur(1px);
    }
}

/* Gradient animation */
@keyframes gradient-shift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.animate-gradient {
    background-size: 200% 200%;
    animation: gradient-shift 3s ease infinite;
}

/* Glow pulse effect */
@keyframes glow-pulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(59, 130, 246, 0.6), 0 0 60px rgba(6, 182, 212, 0.4);
    }
}

.glow-pulse {
    animation: glow-pulse 2s ease-in-out infinite;
}

/* Card flip effect */
.flip-card {
    perspective: 1000px;
    cursor: pointer;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    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: 1rem;
}

.flip-card-back {
    transform: rotateY(180deg);
}

/* Scroll reveal animation with stagger effect */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* Staggered animation delays for flip cards and timeline */
.flip-card:nth-child(1) {
    transition-delay: 0s;
}

.flip-card:nth-child(2) {
    transition-delay: 0.15s;
}

.flip-card:nth-child(3) {
    transition-delay: 0.3s;
}

/* Timeline stagger effect */
.timeline-item:nth-child(1).scroll-reveal {
    transition-delay: 0s;
}

.timeline-item:nth-child(2).scroll-reveal {
    transition-delay: 0.2s;
}

.timeline-item:nth-child(3).scroll-reveal {
    transition-delay: 0.4s;
}

/* Typewriter effect */
@keyframes blink-caret {
    50% { border-color: transparent; }
}

.typewriter {
    overflow: hidden;
    border-right: 3px solid rgba(59, 130, 246, 0.8);
    white-space: nowrap;
    animation: blink-caret 0.75s step-end infinite;
}

/* Interactive timeline with enhanced hover effects */
.timeline-item {
    position: relative;
    padding-left: 3rem;
    transition: all 0.3s ease;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(to bottom, rgba(59, 130, 246, 0.5), rgba(6, 182, 212, 0.5));
    transition: all 0.3s ease;
}

.timeline-item:hover::before {
    width: 4px;
    background: linear-gradient(to bottom, rgba(59, 130, 246, 0.8), rgba(6, 182, 212, 0.8));
}

.timeline-dot {
    position: absolute;
    left: -8px;
    top: 8px;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #3b82f6, #06b6d4);
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
    transition: all 0.3s ease;
}

.timeline-item:hover .timeline-dot {
    transform: scale(1.3) rotate(180deg);
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.8), 0 0 50px rgba(6, 182, 212, 0.4);
}

/* Parallax and tilt effects */
.parallax-element {
    transition: transform 0.3s ease;
}

@media (hover: hover) {
    .parallax-container:hover .parallax-element {
        transform: perspective(1000px) rotateX(2deg) translateY(-3px);
    }
}

/* Skill progress bars */
.skill-bar {
    position: relative;
    height: 8px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #06b6d4);
    border-radius: 10px;
    transition: width 1.5s ease;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

/* Number counter animation */
.counter {
    font-family: 'Space Mono', monospace;
    font-weight: bold;
}
