/* Custom styles to complement Tailwind CSS */
:root {
    --primary-blue: #2563eb;
    --secondary-blue: #1e40af;
    --accent-blue: #3b82f6;
    --dark-bg: #0f172a;
    --dark-card: #1e293b;
    --light-bg: #f8fafc;
    --light-card: #ffffff;
}

/* Shimmer animation for development features */
@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

.animate-shimmer {
    animation: shimmer 2s ease-in-out infinite;
}

* {
    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: #334155;
    transition: all 0.3s ease;
}

.dark body {
    background-color: var(--dark-bg);
    color: #e2e8f0;
}

/* Navigation */
.navbar {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid rgba(226, 232, 240, 0.2);
    min-height: 64px;
}

.dark .navbar {
    background: rgba(15, 23, 42, 0.95);
    border-bottom: 1px solid rgba(71, 85, 105, 0.2);
}

.navbar .container {
    display: flex;
    align-items: center;
    min-height: 64px;
}

.navbar .flex {
    align-items: center;
    height: 100%;
}

.nav-link {
    position: relative;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    min-height: 40px;
    font-weight: 500;
    font-size: 0.95rem;
}

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

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

/* Hero Section */
.hero-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.dark .hero-gradient {
    background: linear-gradient(135deg, #1e40af 0%, #3730a3 100%);
}

/* Cards */
.card {
    background: var(--light-card);
    border: 1px solid rgba(226, 232, 240, 0.3);
    border-radius: 0.75rem;
    padding: 1.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.dark .card {
    background: var(--dark-card);
    border: 1px solid rgba(71, 85, 105, 0.3);
}

/* Buttons */
.btn-primary {
    background: var(--primary-blue);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-weight: 500;
}

.btn-primary:hover {
    background: var(--secondary-blue);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-blue);
    border: 2px solid var(--primary-blue);
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    cursor: pointer;
    font-weight: 500;
}

.btn-secondary:hover {
    background: var(--primary-blue);
    color: white;
    transform: translateY(-2px);
}

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

.timeline::before {
    content: '';
    position: absolute;
    left: 0.5rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--primary-blue);
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -1.75rem;
    top: 0.5rem;
    width: 12px;
    height: 12px;
    background: var(--primary-blue);
    border-radius: 50%;
    border: 3px solid white;
}

.dark .timeline-item::before {
    border-color: var(--dark-bg);
}

/* Code blocks */
.code-block {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 1rem;
    font-family: 'Fira Code', monospace;
    font-size: 0.875rem;
    overflow-x: auto;
}

.dark .code-block {
    background: #1e293b;
    border: 1px solid #475569;
    color: #e2e8f0;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Skills grid */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.skill-item {
    background: var(--light-card);
    padding: 1.5rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(226, 232, 240, 0.3);
    text-align: center;
    transition: all 0.3s ease;
}

.skill-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.dark .skill-item {
    background: var(--dark-card);
    border: 1px solid rgba(71, 85, 105, 0.3);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .timeline {
        padding-left: 1rem;
    }
    
    .timeline::before {
        left: 0.25rem;
    }
    
    .timeline-item::before {
        left: -1.5rem;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
}

/* Dark mode toggle */
.theme-toggle {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1000;
    background: var(--primary-blue);
    color: white;
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    background: var(--secondary-blue);
    transform: scale(1.1);
}

/* Playful Loading Animations */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--primary-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Bouncing Dots Animation */
.bouncing-dots {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.bouncing-dots .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary-blue);
    animation: bounce 1.4s ease-in-out infinite both;
}

.bouncing-dots .dot:nth-child(1) { animation-delay: -0.32s; }
.bouncing-dots .dot:nth-child(2) { animation-delay: -0.16s; }
.bouncing-dots .dot:nth-child(3) { animation-delay: 0s; }

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Pulsing Circle Animation */
.pulsing-circle {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-blue);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(37, 99, 235, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
    }
}

/* Wave Animation */
.wave-animation {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.wave-animation .bar {
    width: 3px;
    height: 16px;
    background: var(--primary-blue);
    border-radius: 2px;
    animation: wave 1.2s ease-in-out infinite;
}

.wave-animation .bar:nth-child(1) { animation-delay: 0s; }
.wave-animation .bar:nth-child(2) { animation-delay: 0.1s; }
.wave-animation .bar:nth-child(3) { animation-delay: 0.2s; }
.wave-animation .bar:nth-child(4) { animation-delay: 0.3s; }
.wave-animation .bar:nth-child(5) { animation-delay: 0.4s; }

@keyframes wave {
    0%, 40%, 100% {
        transform: scaleY(0.4);
    }
    20% {
        transform: scaleY(1);
    }
}

/* Typing Animation */
.typing-animation {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.typing-animation::after {
    content: '';
    width: 2px;
    height: 16px;
    background: var(--primary-blue);
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Gear Rotation Animation */
.gear-animation {
    display: inline-block;
    width: 20px;
    height: 20px;
    color: var(--primary-blue);
    animation: rotate 2s linear infinite;
}

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

/* Progress Step Animations */
.step-item {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.step-item.executing {
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.1) 0%, rgba(37, 99, 235, 0.2) 50%, rgba(37, 99, 235, 0.1) 100%);
    animation: shimmer 2s infinite;
}

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

.step-item.completed {
    animation: celebrateStep 0.6s ease-out;
}

@keyframes celebrateStep {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Robot Animation */
.robot-animation {
    display: inline-block;
    animation: robotMove 3s ease-in-out infinite;
}

@keyframes robotMove {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    25% { transform: translateY(-5px) rotate(2deg); }
    75% { transform: translateY(-2px) rotate(-1deg); }
}

/* Browser Loading Animation */
.browser-loading {
    position: relative;
    display: inline-block;
    width: 24px;
    height: 20px;
}

.browser-loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
}

.browser-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 4px;
    background: var(--primary-blue);
    border-radius: 2px;
    animation: browserProgress 2s ease-in-out infinite;
}

@keyframes browserProgress {
    0% { width: 0%; }
    50% { width: 80%; }
    100% { width: 100%; }
}

/* Playful Status Indicators */
.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.status-indicator.analyzing {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    animation: glow 2s ease-in-out infinite alternate;
}

.status-indicator.executing {
    background: rgba(251, 191, 36, 0.1);
    color: #f59e0b;
    animation: pulse 1.5s ease-in-out infinite;
}

.status-indicator.completed {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    animation: celebrateStatus 0.8s ease-out;
}

@keyframes glow {
    from { box-shadow: 0 0 5px rgba(59, 130, 246, 0.3); }
    to { box-shadow: 0 0 15px rgba(59, 130, 246, 0.6); }
}

@keyframes celebrateStatus {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Scroll indicator */
.scroll-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(37, 99, 235, 0.2);
    z-index: 1000;
}

.scroll-progress {
    height: 100%;
    background: var(--primary-blue);
    transition: width 0.3s ease;
}

/* Print styles */
@media print {
    .navbar,
    .theme-toggle,
    .scroll-indicator {
        display: none;
    }
    
    body {
        color: #000;
        background: #fff;
    }
    
    .card {
        border: 1px solid #ccc;
        box-shadow: none;
    }
}
