/* ============================================
   MODERN UI/UX PORTFOLIO STYLES
   Professional & Animated Design
   ============================================ */

/* Root Variables - Modern Color Palette */
:root {
    --primary: #10b981;
    --primary-light: #34d399;
    --primary-dark: #059669;
    --secondary: #1f2937;
    --secondary-light: #374151;
    --accent: #8b5cf6;
    --accent-light: #a78bfa;
    --bg-light: #f9fafb;
    --bg-white: #ffffff;
    --text-dark: #111827;
    --text-gray: #6b7280;
    --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-2: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --gradient-3: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.2);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    overflow-x: hidden;
}

/* ============================================
   NAVIGATION ANIMATIONS
   ============================================ */
nav {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

nav.scrolled {
    background: rgba(255, 255, 255, 0.95) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

nav a {
    position: relative;
    transition: all 0.3s ease;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-2);
    transition: width 0.3s ease;
}

nav a:hover::after {
    width: 100%;
}

/* ============================================
   HERO SECTION ANIMATIONS
   ============================================ */
.gradient-bg {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    position: relative;
    overflow: hidden;
}

.gradient-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(16, 185, 129, 0.2) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.2) 0%, transparent 50%);
    animation: float 20s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
}

/* Profile Image Animation */
.profile-image {
    position: relative;
    animation: profileFloat 6s ease-in-out infinite;
    box-shadow: 0 20px 60px rgba(16, 185, 129, 0.4);
}

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

.online-border {
    border: 4px solid var(--primary);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2),
                0 0 30px rgba(16, 185, 129, 0.4),
                0 10px 40px rgba(0, 0, 0, 0.2);
    animation: pulse-ring 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse-ring {
    0%, 100% {
        box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2),
                    0 0 30px rgba(16, 185, 129, 0.4),
                    0 10px 40px rgba(0, 0, 0, 0.2);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(16, 185, 129, 0.1),
                    0 0 50px rgba(16, 185, 129, 0.6),
                    0 15px 50px rgba(0, 0, 0, 0.25);
    }
}

.online-border::after {
    content: '';
    position: absolute;
    bottom: 12px;
    right: 12px;
    width: 20px;
    height: 20px;
    background: var(--primary);
    border: 4px solid white;
    border-radius: 50%;
    animation: pulse-dot 2s ease-in-out infinite;
}

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

/* Text Animations */
.text-gradient {
    background: var(--gradient-2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Button Animations */
.btn-primary {
    position: relative;
    overflow: hidden;
    background: var(--gradient-2);
    transition: all 0.4s ease;
}

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

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.4);
}

.btn-secondary {
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
}

.btn-secondary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: var(--secondary);
    transform: translate(-50%, -50%);
    transition: width 0.5s ease, height 0.5s ease;
}

.btn-secondary:hover::before {
    width: 300%;
    height: 300%;
}

.btn-secondary span {
    position: relative;
    z-index: 1;
}

/* ============================================
   FADE-IN ANIMATIONS
   ============================================ */
.fade-in {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.fade-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.fade-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.scale-in {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.scale-in.visible {
    opacity: 1;
    transform: scale(1);
}

/* ============================================
   CARD ANIMATIONS
   ============================================ */
.card-hover {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.card-hover::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-2);
    opacity: 0;
    border-radius: inherit;
    transition: opacity 0.4s ease;
    z-index: -1;
}

.card-hover:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 60px rgba(16, 185, 129, 0.3);
}

.card-hover:hover::before {
    opacity: 0.1;
}

/* Skill Card Animation */
.skill-card {
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.skill-card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.1) 0%, transparent 70%);
    transform: scale(0);
    transition: transform 0.6s ease;
}

.skill-card:hover::after {
    transform: scale(1);
}

.skill-card:hover {
    transform: translateY(-8px) rotate(2deg);
    box-shadow: 0 15px 40px rgba(16, 185, 129, 0.25);
}

/* Icon Animation */
.icon-bounce {
    animation: bounce 2s ease-in-out infinite;
}

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

/* ============================================
   PROJECT CARD ANIMATIONS
   ============================================ */
.project-card {
    position: relative;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.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.7s ease;
}

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

.project-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.2);
}

.project-image {
    transition: transform 0.5s ease;
}

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

/* ============================================
   SECTION BACKGROUNDS
   ============================================ */
.section-gradient-1 {
    background: linear-gradient(135deg, #f9fafb 0%, #e5e7eb 100%);
    position: relative;
}

.section-gradient-1::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
}

.section-gradient-2 {
    background: linear-gradient(135deg, #ffffff 0%, #f3f4f6 100%);
}

/* ============================================
   CONTACT SECTION
   ============================================ */
.contact-icon {
    transition: all 0.4s ease;
}

.contact-icon:hover {
    transform: scale(1.15) rotate(5deg);
    background: var(--gradient-2);
}

.contact-icon:hover i {
    color: white;
}

/* Form Input Animations */
input, textarea {
    transition: all 0.3s ease;
}

input:focus, textarea:focus {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.2);
}

/* ============================================
   LOADING ANIMATIONS
   ============================================ */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(16, 185, 129, 0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   SCROLL PROGRESS BAR
   ============================================ */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: var(--gradient-2);
    z-index: 9999;
    transition: width 0.1s ease;
}

/* ============================================
   RESPONSIVE ANIMATIONS
   ============================================ */
@media (max-width: 768px) {
    .card-hover:hover {
        transform: translateY(-5px) scale(1.01);
    }
    
    .project-card:hover {
        transform: translateY(-8px);
    }
    
    .skill-card:hover {
        transform: translateY(-5px) rotate(0deg);
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.blur-bg {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.glass-effect {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.text-shadow {
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.hover-glow {
    transition: all 0.3s ease;
}

.hover-glow:hover {
    filter: drop-shadow(0 0 20px rgba(16, 185, 129, 0.5));
}

/* Stagger Animation Delays */
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
.stagger-5 { animation-delay: 0.5s; }
.stagger-6 { animation-delay: 0.6s; }
