/* Custom CSS Styles and Animations */

/* Gradient Text Effect */
.text-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Fade in up animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 1s ease-out;
}

/* Skill bars */
.skill-bar {
    width: 100%;
    height: 8px;
    background-color: #374151;
    border-radius: 4px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    border-radius: 4px;
    transition: width 2s ease-in-out;
    animation: skillLoad 2s ease-in-out;
}

@keyframes skillLoad {
    from {
        width: 0%;
    }
}

/* Timeline Styles */
.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, #3b82f6, #8b5cf6, #ef4444);
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    padding-left: 2rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -2rem;
    top: 0.5rem;
    width: 12px;
    height: 12px;
    background: #3b82f6;
    border-radius: 50%;
    border: 3px solid #1f2937;
    z-index: 1;
}

.timeline-content {
    background: rgba(31, 41, 55, 0.5);
    padding: 2rem;
    border-radius: 0.5rem;
    border-left: 4px solid #3b82f6;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline-content:hover {
    transform: translateX(10px);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.2);
}

/* Floating animation for hero elements */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

.float-animation {
    animation: float 3s ease-in-out infinite;
}

/* Glowing effect for buttons */
.glow-on-hover {
    position: relative;
    transition: all 0.3s ease;
}

.glow-on-hover:hover {
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.6);
}

/* Particle background effect */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: #3b82f6;
    border-radius: 50%;
    opacity: 0.7;
    animation: particleFloat 20s linear infinite;
}

@keyframes particleFloat {
    0% {
        transform: translateY(100vh) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 0.7;
    }
    90% {
        opacity: 0.7;
    }
    100% {
        transform: translateY(-100px) translateX(100px);
        opacity: 0;
    }
}

/* Smooth scrolling enhancement */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #1f2937;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #3b82f6, #8b5cf6);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #2563eb, #7c3aed);
}

/* Loading animation for skill items */
.skill-item {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.skill-item.animate {
    opacity: 1;
    transform: translateY(0);
}

/* Hover effects for cards */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Typing animation */
@keyframes typing {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes blink {
    50% {
        border-color: transparent;
    }
}

.typing-animation {
    overflow: hidden;
    border-right: 2px solid #3b82f6;
    white-space: nowrap;
    animation: typing 3s steps(40, end), blink 0.75s step-end infinite;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .timeline {
        padding-left: 1rem;
    }
    
    .timeline-item {
        padding-left: 1.5rem;
    }
    
    .timeline-item::before {
        left: -1.5rem;
    }
    
    .timeline-content:hover {
        transform: none;
    }
}

/* Dark/Light theme variables */
:root {
    --bg-primary: #111827;
    --bg-secondary: #1f2937;
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --accent-blue: #3b82f6;
    --accent-purple: #8b5cf6;
}

.light-theme {
    --bg-primary: #f9fafb;
    --bg-secondary: #ffffff;
    --text-primary: #111827;
    --text-secondary: #6b7280;
}

/* Form focus effects */
input:focus, textarea:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Button pulse animation */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

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

/* Navigation link active state */
nav a.active {
    color: #3b82f6;
    position: relative;
}

nav a.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    border-radius: 1px;
}

/* Intersection observer animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

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

/* Social media hover effects */
.social-link {
    transition: all 0.3s ease;
}

.social-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.3);
}

/* Loading spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #374151;
    border-top: 4px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Passport Photo Styles */
.passport-photo-container {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 0 auto;
    border-radius: 50%;
    overflow: hidden;
    border: 6px solid transparent;
    background: linear-gradient(45deg, #3b82f6, #8b5cf6, #ef4444, #10b981);
    background-size: 400% 400%;
    animation: gradientShift 4s ease-in-out infinite;
    box-shadow: 0 20px 40px rgba(59, 130, 246, 0.3);
}

@media (min-width: 768px) {
    .passport-photo-container {
        width: 400px;
        height: 400px;
    }
}

@media (min-width: 1024px) {
    .passport-photo-container {
        width: 500px;
        height: 500px;
    }
}

.passport-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    transition: all 0.6s ease;
    opacity: 0;
    animation: photoFadeIn 2s ease-in-out 0.5s forwards;
}

.passport-photo-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1f2937, #374151);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 4rem;
    transition: all 0.6s ease;
}

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

/* Photo fade in animation */
@keyframes photoFadeIn {
    0% {
        opacity: 0;
        transform: scale(1.1);
        filter: blur(10px);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.05);
        filter: blur(5px);
    }
    100% {
        opacity: 1;
        transform: scale(1);
        filter: blur(0);
    }
}

/* Hover effects for photo */
.passport-photo-container:hover {
    transform: scale(1.05);
    box-shadow: 0 30px 60px rgba(59, 130, 246, 0.4);
    animation-duration: 2s;
}

.passport-photo-container:hover .passport-photo {
    transform: scale(1.1);
    filter: brightness(1.1) contrast(1.1);
}

.passport-photo-container:hover .passport-photo-placeholder {
    transform: scale(1.1);
    background: linear-gradient(135deg, #374151, #4b5563);
}

/* Floating animation for photo container */
.photo-float {
    animation: photoFloat 6s ease-in-out infinite;
}

@keyframes photoFloat {
    0%, 100% {
        transform: translateY(0px);
    }
    33% {
        transform: translateY(-10px);
    }
    66% {
        transform: translateY(5px);
    }
}

/* Pulse effect on load */
.photo-pulse {
    animation: photoPulse 2s ease-in-out;
}

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

/* Glow effect */
.photo-glow {
    position: relative;
}

.photo-glow::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: linear-gradient(45deg, #3b82f6, #8b5cf6, #ef4444, #10b981);
    border-radius: 50%;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
    filter: blur(20px);
}

.photo-glow:hover::before {
    opacity: 0.7;
}

/* Responsive adjustments for photo */
@media (max-width: 768px) {
    .passport-photo-container {
        width: 250px;
        height: 250px;
    }
    
    .passport-photo-placeholder {
        font-size: 3rem;
    }
}

/* Photo loading animation */
.photo-loading {
    position: relative;
    overflow: hidden;
}

.photo-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: photoShimmer 2s infinite;
}

@keyframes photoShimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}
