/* Modern CSS animations and utilities */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
    --primary-50: #eff6ff;
    --primary-400: #60a5fa;
    --primary-500: #3b82f6;
    --primary-600: #2563eb;
    --primary-700: #1d4ed8;
    --dark-800: #1e293b;
    --dark-900: #0f172a;
}

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

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

::-webkit-scrollbar-track {
    background: var(--dark-900);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-500);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-600);
}

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

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from { 
        opacity: 0; 
        transform: translateY(-20px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

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

@keyframes glow {
    from {
        box-shadow: 0 0 20px var(--primary-500);
    }
    to {
        box-shadow: 0 0 30px var(--primary-600);
    }
}

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

@keyframes blink-caret {
    from, to {
        border-color: transparent;
    }
    50% {
        border-color: var(--primary-500);
    }
}

/* Navigation styles */
.nav-link {
    color: #d1d5db;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    position: relative;
}

.nav-link:hover {
    color: #60a5fa;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #60a5fa, #2563eb);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

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

.nav-link-active {
    color: #60a5fa;
}

.mobile-nav-link {
    color: #d1d5db;
    display: block;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 1rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.mobile-nav-link:hover {
    color: #60a5fa;
}

.mobile-nav-link-active {
    color: #60a5fa;
    background-color: #334155;
}

/* Card styles */
.glass-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    padding: 1.5rem;
    transition: all 0.5s ease;
    box-shadow: 
        0 8px 32px 0 rgba(31, 38, 135, 0.37),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.glass-card:hover {
    transform: translateY(-8px);
    box-shadow: 
        0 20px 40px 0 rgba(31, 38, 135, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Button styles */
.btn-primary {
    background: linear-gradient(to right, #3b82f6, #1d4ed8);
    color: white;
    font-weight: 600;
    padding: 0.75rem 2rem;
    border-radius: 9999px;
    transition: all 0.3s ease;
    transform: scale(1);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.3);
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 40px rgba(59, 130, 246, 0.5);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-weight: 600;
    padding: 0.75rem 2rem;
    border-radius: 9999px;
    transition: all 0.3s ease;
    transform: scale(1);
    cursor: pointer;
}

.btn-secondary:hover {
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.2);
}

/* Form styles */
.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.75rem;
    color: white;
    transition: all 0.3s ease;
}

.form-input::placeholder {
    color: #9ca3af;
}

.form-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.1);
    border-color: #3b82f6;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

/* Text effects */
.gradient-text {
    background: linear-gradient(135deg, var(--primary-400), #8b5cf6, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: var(--primary-400); /* fallback color for browsers that don't support background-clip */
}

.typing-animation {
    border-right: 3px solid var(--primary-500);
    white-space: nowrap;
    overflow: hidden;
    animation: typing 3.5s steps(40, end), blink-caret .75s step-end infinite;
}

/* Loading spinner */
.loading-spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Particles background */
.particles-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    background: var(--primary-500);
    border-radius: 50%;
    opacity: 0.1;
    animation: float 10s ease-in-out infinite;
}

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

.timeline-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.5rem;
    width: 0.75rem;
    height: 0.75rem;
    background: var(--primary-500);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--primary-500);
}

.timeline-item::after {
    content: '';
    position: absolute;
    left: 0.375rem;
    top: 1.25rem;
    width: 2px;
    height: 100%;
    background: linear-gradient(to bottom, var(--primary-500), transparent);
}

.timeline-item:last-child::after {
    display: none;
}

/* Skill tag styles */
.skill-tag {
    display: inline-block;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.skill-tag:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* Blog card styles */
.blog-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    padding: 1.5rem;
    transition: all 0.5s ease;
    box-shadow: 
        0 8px 32px 0 rgba(31, 38, 135, 0.37),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.blog-card:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-8px);
}

.blog-card:hover .blog-title {
    color: #60a5fa;
}

/* Responsive utilities */
@media (max-width: 768px) {
    .glass-card {
        padding: 1rem;
    }
    
    .btn-primary,
    .btn-secondary {
        padding: 0.5rem 1.5rem;
        font-size: 0.875rem;
    }
}

/* Performance optimizations */
.will-change-transform {
    will-change: transform;
}

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

/* Focus styles for accessibility */
.focus-visible:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px var(--primary-500);
}

/* Profile image centering */
.profile-image {
    object-fit: cover;
    object-position: center center;
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
}