/* Enhanced Custom CSS with improved animations and styling */
:root {
    --primary-color: #3b82f6;
    --secondary-color: #8b5cf6;
    --accent-color: #06b6d4;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --text-light: #f8fafc;
    --text-dark: #1f2937;
    --bg-dark: #111827;
    --bg-darker: #0f172a;
    --border-color: #374151;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-light);
    background-color: var(--bg-dark);
    overflow-x: hidden;
    scroll-behavior: smooth;
}

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

::-webkit-scrollbar-track {
    background: var(--bg-darker);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary-color), var(--secondary-color));
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--secondary-color), var(--accent-color));
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-darker);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.5s ease;
}

.loader {
    text-align: center;
    color: white;
}

.loader-logo {
    font-size: 4rem;
    font-weight: bold;
    margin-bottom: 2rem;
    animation: pulse 2s infinite;
}

.loader-text {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: var(--text-light);
}

.loader-progress {
    width: 300px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin: 0 auto;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: width 0.3s ease;
    border-radius: 2px;
}

/* Scroll Progress */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    z-index: 9999;
    transition: width 0.3s ease;
}

/* Enhanced Navigation */
.nav-link {
    position: relative;
    transition: var(--transition);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

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

/* Mobile menu enhanced */
#mobile-menu {
    transition: all 0.3s ease;
}

#mobile-menu.show {
    transform: translateY(0);
    opacity: 1;
}

/* Enhanced Hero Section */
.hero-name {
    animation: fadeInUp 1s ease-out;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-text-animated {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color), var(--accent-color));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 3s ease infinite;
}

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

/* Typewriter Effect */
.typewriter {
    border-right: 2px solid var(--primary-color);
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { border-color: transparent; }
    51%, 100% { border-color: var(--primary-color); }
}

/* Enhanced CTA Buttons */
.cta-button {
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
}

.cta-button::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: var(--transition);
}

.cta-button:hover::before {
    left: 100%;
}

.cta-button.primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.cta-button.secondary {
    background: transparent;
    border: 2px solid var(--primary-color);
}

.cta-button.tertiary {
    background: transparent;
    border: 2px solid var(--secondary-color);
}

/* Enhanced Social Links */
.social-link {
    transition: var(--transition);
    padding: 0.5rem;
    border-radius: 50%;
}

.social-link:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.social-link.linkedin:hover {
    background: #0077b5;
    color: white;
}

.social-link.github:hover {
    background: #333;
    color: white;
}

.social-link.email:hover {
    background: #ea4335;
    color: white;
}

.social-link.website:hover {
    background: var(--accent-color);
    color: white;
}

/* Enhanced Scroll Indicator */
.scroll-indicator {
    animation: bounce 2s infinite;
}

.scroll-down-arrow {
    padding: 1rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition);
}

.scroll-down-arrow:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* Enhanced Section Styling */
.section-header {
    position: relative;
    margin-bottom: 3rem;
}

.section-divider {
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
    margin: 0 auto;
}

/* Enhanced Cards */
.hover-card {
    transition: var(--transition);
    border: 1px solid transparent;
    backdrop-filter: blur(10px);
}

.hover-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 20px 40px rgba(59, 130, 246, 0.1);
}

/* Enhanced Skills Section */
.skill-card {
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.skill-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 1rem;
}

.skill-icon {
    box-shadow: var(--shadow-md);
}

.skill-tag {
    transition: var(--transition);
    cursor: pointer;
    backdrop-filter: blur(5px);
}

.skill-tag:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* Enhanced Timeline */
.timeline-line {
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
}

.timeline-marker {
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
    animation: pulse 2s infinite;
}

.experience-card {
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.experience-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.tech-badge {
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Enhanced Projects Section */
.project-card {
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.project-image {
    background-size: cover;
    background-position: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.project-card:hover .tech-badge {
    transform: scale(1.05);
}

/* Enhanced Achievements */
.achievement-card {
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.achievement-icon {
    box-shadow: var(--shadow-md);
}

.achievement-badge {
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Enhanced Contact Section */
.contact-item {
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.contact-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.contact-icon {
    box-shadow: var(--shadow-md);
}

/* Enhanced Social Cards */
.social-card {
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
}

.social-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

/* Contact Form Enhancements */
.contact-form-container {
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.form-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(55, 65, 81, 0.5);
    border: 1px solid rgba(156, 163, 175, 0.3);
    border-radius: 0.5rem;
    color: var(--text-light);
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background: rgba(55, 65, 81, 0.7);
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-light);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(156, 163, 175, 0.7);
}

/* Stats Section */
.stat-card {
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: 0.75rem;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.875rem;
    color: rgba(156, 163, 175, 0.8);
}

/* About Section Enhancements */
.about-visual {
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.focus-item {
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
}

.focus-item:hover {
    background: rgba(55, 65, 81, 0.7);
    transform: translateX(5px);
}

.highlight-box {
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Timeline Enhancements */
.timeline-item {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 2rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 2px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary-color), var(--secondary-color));
}

.experience-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.experience-list {
    list-style: none;
    padding: 0;
}

.experience-list li {
    margin-bottom: 0.75rem;
    padding-left: 1.5rem;
    position: relative;
}

.experience-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.5rem;
    width: 6px;
    height: 6px;
    background: var(--primary-color);
    border-radius: 50%;
}

.experience-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

/* Project Card Enhancements */
.project-header {
    display: flex;
    align-items: center;
    justify-content: between;
    margin-bottom: 1rem;
}

.project-links {
    display: flex;
    gap: 0.75rem;
}

.project-links a {
    color: rgba(156, 163, 175, 0.7);
    transition: var(--transition);
}

.project-links a:hover {
    color: var(--primary-color);
}

.project-impact {
    padding: 0.5rem 1rem;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 0.375rem;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.project-cta {
    display: flex;
    gap: 1rem;
}

.project-cta a {
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

/* Achievement Card Enhancements */
.achievement-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.achievement-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.achievement-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem;
    background: rgba(55, 65, 81, 0.3);
    border-radius: 0.375rem;
    transition: var(--transition);
}

.achievement-item:hover {
    background: rgba(55, 65, 81, 0.5);
}

.achievement-number {
    font-size: 1.5rem;
    font-weight: 700;
}

.stars {
    display: flex;
    gap: 0.25rem;
}

/* Footer Enhancements */
footer {
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Utility Classes */
.text-content {
    line-height: 1.7;
}

.text-content strong {
    color: var(--primary-color);
    font-weight: 600;
}

.will-change-transform {
    will-change: transform;
}

.will-change-opacity {
    will-change: opacity;
}

.gpu-accelerated {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

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

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translate3d(0, 0, 0);
    }
    40%, 43% {
        transform: translate3d(0, -10px, 0);
    }
    70% {
        transform: translate3d(0, -5px, 0);
    }
    90% {
        transform: translate3d(0, -2px, 0);
    }
}

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

/* Accessibility Enhancements */
.focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

@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;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .hover-card {
        border: 2px solid currentColor;
    }
    
    .cta-button {
        border: 2px solid currentColor;
    }
}

/* Print styles */
@media print {
    * {
        background: white !important;
        color: black !important;
    }
    
    .no-print {
        display: none !important;
    }
    
    .hover-card {
        border: 1px solid #ccc;
    }
}

/* Performance optimizations */
.section {
    contain: layout style paint;
}

.card {
    contain: layout style;
}
