/* Custom Fonts */
.font-inter {
    font-family: 'Inter', sans-serif;
}

.font-playfair {
    font-family: 'Playfair Display', serif;
}

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

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

@keyframes icon-pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(59, 130, 246, 0);
    }
}

@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes particle {
    0%, 100% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
}

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

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

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

/* Particles Animation */
.particles-container {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.particles-container::before,
.particles-container::after {
    content: '';
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    animation: particle 20s linear infinite;
}

.particles-container::before {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.particles-container::after {
    top: 60%;
    left: 70%;
    animation-delay: 10s;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #3b82f6, #9333ea);
    border-radius: 10px;
}

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

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

/* Navigation Active Link */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #3b82f6, #9333ea);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Project Card Hover Effect */
.project-card {
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.project-card:hover::before {
    left: 100%;
}

.project-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

/* Modal Animation */
.modal-content {
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        transform: scale(0.9) translateY(50px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

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

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

/* Gradient Text Effect */
.gradient-text {
    background: linear-gradient(90deg, #3b82f6, #9333ea, #ec4899);
    background-size: 200% auto;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    animation: gradient-shift 3s ease infinite;
}

/* Card Glow Effect */
.card-glow {
    position: relative;
}

.card-glow::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(45deg, #3b82f6, #9333ea, #ec4899, #3b82f6);
    background-size: 300% 300%;
    border-radius: inherit;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
    animation: gradient-shift 3s ease infinite;
}

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

/* Skill Bar Animation */
.skill-bar {
    position: relative;
    height: 8px;
    background: #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
}

.skill-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #9333ea);
    border-radius: 10px;
    transition: width 1s ease;
}

/* Timeline Dot Animation */
.timeline-dot {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 0 0 15px rgba(59, 130, 246, 0);
    }
}

/* Button Ripple Effect */
.btn-ripple {
    position: relative;
    overflow: hidden;
}

.btn-ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-ripple:active::after {
    width: 300px;
    height: 300px;
}

/* Tag Cloud Animation */
.tag-cloud {
    display: inline-block;
    transition: all 0.3s ease;
}

.tag-cloud:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(59, 130, 246, 0.3);
}

/* Fade In Up Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Section Divider */
.section-divider {
    position: relative;
    height: 2px;
    background: linear-gradient(90deg, transparent, #3b82f6, #9333ea, transparent);
    margin: 4rem 0;
}

/* Contact Card Hover */
.contact-card {
    transition: all 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.3);
}

/* Mobile Menu Slide */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

#mobile-menu.active {
    max-height: 400px;
}

/* Image Zoom Effect */
.zoom-effect {
    overflow: hidden;
}

.zoom-effect img {
    transition: transform 0.5s ease;
}

.zoom-effect:hover img {
    transform: scale(1.1);
}

/* Text Gradient Animation */
@keyframes text-gradient {
    0%, 100% {
        background-position: 0% center;
    }
    50% {
        background-position: 100% center;
    }
}

.animated-gradient-text {
    background: linear-gradient(90deg, #3b82f6, #9333ea, #ec4899, #3b82f6);
    background-size: 300% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: text-gradient 4s linear infinite;
}

/* Stats Counter Animation */
.stats-counter {
    font-variant-numeric: tabular-nums;
    transition: all 0.5s ease;
}

/* Project Tag */
.project-tag {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.project-tag:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.4);
    transform: translateY(-2px);
}

/* Timeline Animation */
.timeline-item {
    opacity: 0;
    transform: translateX(-50px);
    animation: slideInLeft 0.6s ease forwards;
}

.timeline-item:nth-child(even) {
    transform: translateX(50px);
    animation-name: slideInRight;
}

@keyframes slideInLeft {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Certification Badge */
.cert-badge {
    position: relative;
    overflow: hidden;
}

.cert-badge::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(45deg);
    transition: all 0.5s ease;
}

.cert-badge:hover::before {
    left: 100%;
}

/* Responsive Utilities */
@media (max-width: 768px) {
    .animate-float {
        animation-duration: 4s;
    }
    
    .particles-container::before,
    .particles-container::after {
        display: none;
    }
    
    h1 {
        font-size: 2.5rem !important;
    }
    
    h2 {
        font-size: 2rem !important;
    }
}

/* Performance Optimizations */
* {
    -webkit-tap-highlight-color: transparent;
}

img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Focus Styles for Accessibility */
a:focus,
button:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
    
    a {
        text-decoration: underline;
    }
}