/* Custom CSS for additional styling and animations */

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

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
}

/* Enhanced Hero Animations */
@keyframes heroGradient {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.hero-text {
    background: linear-gradient(-45deg, #ffffff, #fbbf24, #f59e0b, #3b82f6, #8b5cf6);
    background-size: 400% 400%;
    animation: heroGradient 8s ease infinite;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: #fbbf24; }
}

.fade-in-text {
    animation: fadeInUp 1.5s ease-out 0.5s both;
}

/* Floating Shapes */
.floating-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.shape {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 15s infinite ease-in-out;
}

.shape-1 {
    width: 80px;
    height: 80px;
    top: 20%;
    left: 10%;
    animation-delay: -2s;
}

.shape-2 {
    width: 120px;
    height: 120px;
    top: 60%;
    right: 10%;
    animation-delay: -7s;
}

.shape-3 {
    width: 60px;
    height: 60px;
    bottom: 20%;
    left: 20%;
    animation-delay: -12s;
}

.shape-4 {
    width: 100px;
    height: 100px;
    top: 30%;
    right: 30%;
    animation-delay: -5s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    33% {
        transform: translateY(-30px) rotate(120deg);
    }
    66% {
        transform: translateY(15px) rotate(240deg);
    }
}

/* Hero Icon Animation */
.hero-icon {
    animation: pulse-grow 3s ease-in-out infinite;
}

@keyframes pulse-grow {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 40px rgba(255, 255, 255, 0.3);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 60px rgba(255, 255, 255, 0.5);
    }
}

/* Enhanced Profile Photo Styling */
.hero-icon img,
.profile-photo {
    transition: all 0.4s ease;
    filter: brightness(1.05) contrast(1.1) saturate(1.1);
}

.hero-icon img:hover,
.profile-photo:hover {
    filter: brightness(1.1) contrast(1.15) saturate(1.2);
    transform: scale(1.02);
}

/* Professional Photo Container */
.hero-photo-container {
    position: relative;
    transition: transform 0.3s ease;
    animation: gentle-float 6s ease-in-out infinite;
}

.hero-photo-container:hover {
    transform: translateY(-5px);
}

.hero-photo-container::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    background: linear-gradient(45deg, transparent, rgba(59, 130, 246, 0.1), transparent);
    border-radius: 2rem;
    z-index: -1;
    transition: opacity 0.3s ease;
    opacity: 0;
}

.hero-photo-container:hover::before {
    opacity: 1;
}

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

/* Pulse Ring Effect */
.pulse-ring {
    animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    }
    70% {
        transform: scale(1.1);
        box-shadow: 0 0 0 10px rgba(34, 197, 94, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }
}

/* Grid Pattern Background */
.bg-grid-pattern {
    background-image: 
        linear-gradient(rgba(59, 130, 246, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59, 130, 246, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
}

/* Custom animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

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

/* Navigation active state */
.nav-link.active {
    color: #0f172a;
    font-weight: 700;
    position: relative;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    right: 0;
    height: 2px;
    background: #0f172a;
    border-radius: 1px;
}

/* Enhanced Skill Badge Effects */
.skill-badge {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: default;
    position: relative;
    overflow: hidden;
    border: 1px solid transparent;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(59, 130, 246, 0.05));
}

.skill-badge:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.25);
    border-color: rgba(37, 99, 235, 0.3);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.2), rgba(59, 130, 246, 0.1));
}

.skill-badge::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.6s ease;
}

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

/* Skill Category Cards */
.skill-category-card {
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}

.skill-category-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(37, 99, 235, 0.15);
}

.skill-category-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #2563eb, #8b5cf6, #ec4899);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

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

/* Enhanced Experience Card Animations */
.experience-card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}

.experience-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 25px 50px rgba(37, 99, 235, 0.2);
}

.experience-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, #2563eb, #8b5cf6, #ec4899, #f59e0b);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.experience-card:hover::before {
    transform: scaleX(1);
}

/* Experience Card Icon Glow */
.experience-card:hover .fas {
    text-shadow: 0 0 10px rgba(37, 99, 235, 0.5);
    transition: text-shadow 0.3s ease;
}

/* Contact Card Enhancements */
.contact-card {
    position: relative;
    overflow: hidden;
}

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

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

/* Enhanced Project List Animations */
.project-list {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
    opacity: 0;
}

.project-list.expanded {
    max-height: 1200px;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
    opacity: 1;
}

/* Project Item Animations */
.project-item {
    transform: translateX(-20px);
    opacity: 0;
    transition: all 0.3s ease;
}

.project-list.expanded .project-item {
    transform: translateX(0);
    opacity: 1;
}

.project-list.expanded .project-item:nth-child(1) { transition-delay: 0.1s; }
.project-list.expanded .project-item:nth-child(2) { transition-delay: 0.2s; }
.project-list.expanded .project-item:nth-child(3) { transition-delay: 0.3s; }
.project-list.expanded .project-item:nth-child(4) { transition-delay: 0.4s; }
.project-list.expanded .project-item:nth-child(5) { transition-delay: 0.5s; }

/* Loading states */
.loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

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

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

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

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #2563eb, #1d4ed8);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #1d4ed8, #1e40af);
}

/* Section dividers */
.section-divider {
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #2563eb, #3b82f6);
    border-radius: 2px;
}

/* Enhanced Button Styles */
.btn-primary {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(37, 99, 235, 0.4);
}

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

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

/* Glass Card Effects */
.glass-card {
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.glass-card:hover {
    backdrop-filter: blur(25px);
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.15);
}

/* Highlight Boxes with Enhanced Effects */
.highlight-box {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(59, 130, 246, 0.05));
    border-left: 4px solid #2563eb;
    position: relative;
    overflow: hidden;
}

.highlight-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent);
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.highlight-box:hover::before {
    opacity: 0.7;
}

/* Gradient Text Effects */
.gradient-text {
    background: linear-gradient(135deg, #2563eb, #8b5cf6, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Loading Animations */
@keyframes shimmer {
    0% {
        background-position: -468px 0;
    }
    100% {
        background-position: 468px 0;
    }
}

.shimmer {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

/* Enhanced Responsive Design */
@media (max-width: 640px) {
    .text-6xl {
        font-size: 2.5rem;
        line-height: 1.1;
    }
    
    .text-5xl {
        font-size: 2rem;
    }
    
    .text-4xl {
        font-size: 1.875rem;
    }
    
    .text-3xl {
        font-size: 1.5rem;
    }
    
    /* Hero section mobile layout */
    .lg\:grid-cols-2 {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .order-1 {
        order: 1;
    }
    
    .order-2 {
        order: 2;
    }
    
    .experience-card {
        border-left-width: 3px;
    }
    
    .skill-badge {
        font-size: 0.75rem;
        padding: 0.375rem 0.75rem;
    }
    
    /* Disable complex animations on mobile */
    .hero-photo-container {
        animation: none !important;
    }
}

/* Tablet optimizations */
@media (min-width: 641px) and (max-width: 1023px) {
    .text-6xl {
        font-size: 3.5rem;
    }
    
    /* Grid adjustments for tablets */
    .lg\:grid-cols-2 {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .order-1 {
        order: 1;
    }
    
    .order-2 {
        order: 2;
    }
}

/* Large screen optimizations */
@media (min-width: 1024px) {
    .experience-card:hover {
        transform: translateY(-10px) scale(1.02);
    }
    
    .skill-badge:hover {
        transform: translateY(-4px) scale(1.05);
    }
    
    .contact-card:hover {
        transform: scale(1.05) translateY(-8px);
    }
}

/* Ultra-wide screen optimizations */
@media (min-width: 1536px) {
    .floating-shapes .shape {
        filter: blur(1px);
    }
}

/* Focus states for accessibility */
.nav-link:focus,
button:focus,
a:focus {
    outline: 2px solid #64748b;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Skip to content link for screen readers */
.skip-to-content {
    position: absolute;
    left: -9999px;
    z-index: 999;
    padding: 8px;
    background-color: #2563eb;
    color: white;
    text-decoration: none;
}

.skip-to-content:focus {
    left: 50%;
    transform: translateX(-50%);
    top: 10px;
}

/* Print styles */
@media print {
    .fixed {
        position: static;
    }
    
    .bg-gradient-to-br,
    .bg-gradient-primary {
        background: #2563eb !important;
        color: white !important;
    }
    
    .shadow-lg,
    .shadow-md,
    .shadow-sm {
        box-shadow: none !important;
    }
    
    .project-list {
        max-height: none !important;
        opacity: 1 !important;
    }
    
    .experience-card::before,
    .skill-badge::before,
    .highlight-box::before {
        display: none;
    }
}

/* Enhanced Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --primary-color: #3b82f6;
        --primary-light: #60a5fa;
        --background-color: #0f172a;
        --card-background: #1e293b;
        --text-color: #f8fafc;
        --text-secondary: #94a3b8;
    }
    
    .skill-category-card {
        background: linear-gradient(135deg, var(--card-background) 0%, #334155 100%);
    }
    
    .experience-card {
        background: linear-gradient(135deg, var(--card-background) 0%, #334155 100%);
    }
}

/* Custom Scrollbar Enhancements */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: linear-gradient(180deg, #f1f5f9, #e2e8f0);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #2563eb, #1d4ed8);
    border-radius: 6px;
    border: 2px solid #f1f5f9;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #1d4ed8, #1e40af);
}

/* Custom Selection Colors */
::selection {
    background: rgba(37, 99, 235, 0.3);
    color: #1e293b;
}

::-moz-selection {
    background: rgba(37, 99, 235, 0.3);
    color: #1e293b;
}

/* Enhanced Accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .fade-in-up,
    .fade-in,
    .hero-text,
    .typing-effect,
    .floating-shapes,
    .pulse-ring,
    .hero-icon {
        animation: none !important;
    }
    
    .skill-badge:hover,
    .experience-card:hover,
    .contact-card:hover {
        transform: none !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .skill-badge {
        border: 2px solid currentColor;
    }
    
    .experience-card,
    .skill-category-card {
        border: 2px solid #2563eb;
    }
    
    .contact-card {
        border: 2px solid rgba(255, 255, 255, 0.8);
    }
}

/* Focus Visible for Better Accessibility */
.skill-badge:focus-visible,
.experience-card:focus-visible,
.contact-card:focus-visible {
    outline: 3px solid #fbbf24;
    outline-offset: 2px;
    border-radius: 8px;
}

/* Screen Reader Only Content */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}


/* Hero Section Animation Classes */
.hero-title-animation {
    animation: fadeInUp 1s ease-out 0.3s both;
}

.hero-subtitle-animation {
    animation: fadeInUp 1s ease-out 0.6s both;
}

.hero-description-animation {
    animation: fadeInUp 1s ease-out 0.9s both;
}

.hero-buttons-animation {
    animation: fadeInUp 1s ease-out 1.2s both;
}

.hero-stats-animation {
    animation: fadeInUp 1s ease-out 1.5s both;
}
