/*--------------------------------------
  1. Base & Font
--------------------------------------*/
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

body {
    font-family: 'Inter', sans-serif;
    scroll-behavior: smooth;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

/*--------------------------------------
  2. Glass Morphism Effects
--------------------------------------*/
.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.section-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/*--------------------------------------
  3. Enhanced Animations
--------------------------------------*/
.card-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

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

/*--------------------------------------
  4. Enhanced Navigation
--------------------------------------*/
.nav-link {
    position: relative;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transition: width 0.3s ease;
}

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

/*--------------------------------------
  5. Enhanced Typography
--------------------------------------*/
.gradient-text {
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
}

p {
    line-height: 1.7;
}

/*--------------------------------------
  6. Enhanced Buttons
--------------------------------------*/
.btn-primary {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn-primary::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;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(102, 126, 234, 0.4);
}

/*--------------------------------------
  7. Enhanced Project Cards
--------------------------------------*/
.project-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

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

.project-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

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

.project-card img {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card:hover img {
    transform: scale(1.1);
}

/*--------------------------------------
  8. Enhanced Skill Progress
--------------------------------------*/
.skill-progress {
    transition: width 1s ease-in-out;
    animation: progressFill 1.5s ease-out;
}

@keyframes progressFill {
    from {
        width: 0%;
    }
    to {
        width: var(--progress-width);
    }
}

/*--------------------------------------
  9. Enhanced Mobile Menu
--------------------------------------*/
#mobile-menu {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: top;
}

#mobile-menu.hidden {
    transform: scaleY(0);
    opacity: 0;
}

#mobile-menu:not(.hidden) {
    transform: scaleY(1);
    opacity: 1;
}

/*--------------------------------------
  10. Enhanced Scrollbar
--------------------------------------*/
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #667eea, #764ba2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #5a67d8, #6b46c1);
}

/*--------------------------------------
  11. Enhanced Focus States
--------------------------------------*/
.nav-link:focus,
.btn-primary:focus,
.project-card:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/*--------------------------------------
  12. Enhanced Loading States
--------------------------------------*/
.loading {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease-out;
}

.loading.loaded {
    opacity: 1;
    transform: translateY(0);
}

/*--------------------------------------
  13. Enhanced Section Animations
--------------------------------------*/
.section-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.section-animate.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/*--------------------------------------
  14. Enhanced Image Loading
--------------------------------------*/
.image-loading {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/*--------------------------------------
  15. Enhanced Responsive Design
--------------------------------------*/
@media (max-width: 768px) {
    .gradient-text {
        background-size: 150% 150%;
    }

    .project-card:hover {
        transform: translateY(-4px) scale(1.01);
    }

    .btn-primary:hover {
        transform: translateY(-1px);
    }

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

/*--------------------------------------
  16. Enhanced Performance
--------------------------------------*/
* {
    box-sizing: border-box;
}

img {
    max-width: 100%;
    height: auto;
}

.section-animate,
.project-card,
.skill-card,
.certification-card,
.btn-primary {
    will-change: transform, opacity;
}

/*--------------------------------------
  17. Enhanced Print Styles
--------------------------------------*/
@media print {
    .nav-link::after,
    .project-card::before,
    .skill-card::before,
    .certification-card::before {
        display: none;
    }

    .gradient-text {
        color: #000 !important;
        background: none !important;
    }

    body {
        background: white !important;
    }
}

/*--------------------------------------
  18. Enhanced Dark Mode Support
--------------------------------------*/
@media (prefers-color-scheme: dark) {
    .section-card {
        background: rgba(0, 0, 0, 0.8);
        color: white;
    }

    .section-card h3,
    .section-card p {
        color: white;
    }
}

/*--------------------------------------
  19. Enhanced Accessibility
--------------------------------------*/
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .floating-animation {
        animation: none;
    }
}

/*--------------------------------------
  20. Enhanced Hover Effects
--------------------------------------*/
.section-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.skill-progress:hover {
    transform: scale(1.05);
}

/*--------------------------------------
  21. Enhanced Text Selection
--------------------------------------*/
::selection {
    background: rgba(102, 126, 234, 0.3);
    color: white;
}

::-moz-selection {
    background: rgba(102, 126, 234, 0.3);
    color: white;
}

/*--------------------------------------
  22. Enhanced Loading Animation
--------------------------------------*/
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/*--------------------------------------
  23. Enhanced Gradient Background
--------------------------------------*/
.hero-gradient {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
}

/*--------------------------------------
  24. Enhanced Card Shadows
--------------------------------------*/
.card-shadow {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.card-shadow:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/*--------------------------------------
  25. Enhanced Icon Animations
--------------------------------------*/
.fas, .fab {
    transition: transform 0.3s ease;
}

.section-card:hover .fas,
.section-card:hover .fab {
    transform: scale(1.1);
}