/* Custom CSS for Harvey Kaambwa Portfolio */

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

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

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

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

/* Navigation enhancements */
nav {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

nav.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Hero section enhancements */
#hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 50%, #334155 100%);
    position: relative;
    overflow: hidden;
}

#hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.05)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.05)"/><circle cx="50" cy="0" r="1" fill="rgba(255,255,255,0.03)"/><circle cx="0" cy="50" r="1" fill="rgba(255,255,255,0.03)"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grain)"/></svg>') repeat;
    pointer-events: none;
}

/* Card hover effects */
.hover-lift {
    transition: all 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Expertise cards */
.expertise-card {
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.expertise-card:hover {
    transform: translateY(-8px);
    border-color: #1e3a8a;
    box-shadow: 0 20px 40px rgba(30, 58, 138, 0.2);
}

/* Case study cards */
.case-study-card {
    position: relative;
    overflow: hidden;
}

.case-study-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;
}

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

/* Progress bars for skills */
.skill-bar {
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.skill-progress {
    height: 100%;
    background: linear-gradient(90deg, #1e3a8a, #0f172a);
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

.skill-progress::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Contact form enhancements */
.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
    background: rgba(0, 0, 0, 0.4);
    border-color: #64748b;
    box-shadow: 0 0 0 3px rgba(100, 116, 139, 0.2);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

/* Button enhancements */
.btn-primary {
    background: linear-gradient(135deg, #475569, #1e293b);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.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%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(30, 41, 59, 0.4);
}

/* Timeline styles */
.timeline {
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, #1e3a8a, #0f172a);
    transform: translateX(-50%);
}

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

.timeline-dot {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    background: #1e3a8a;
    border: 4px solid white;
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(30, 58, 138, 0.5);
    z-index: 10;
}

/* Responsive design enhancements */
@media (max-width: 768px) {
    .timeline::before {
        left: 20px;
    }
    
    .timeline-dot {
        left: 20px;
    }
    
    .timeline-item {
        padding-left: 50px;
    }
}

/* Loading animations */
.fade-in-up {
    animation: fadeInUp 0.8s ease forwards;
}

.slide-in-right {
    animation: slideInRight 0.8s ease forwards;
}

/* Section dividers */
.section-divider {
    height: 1px;
    background: linear-gradient(to right, transparent, #e5e7eb, transparent);
    margin: 4rem 0;
}

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

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

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #1e3a8a, #0f172a);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #1e40af, #0f172a);
}

/* Print styles */
@media print {
    nav,
    #contact,
    footer {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .bg-blue-600,
    .bg-blue-800 {
        background: white !important;
        color: black !important;
    }
}

/* Accessibility enhancements */
.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;
}

/* Focus styles */
button:focus,
a:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid #1e3a8a;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .bg-blue-900 { background-color: #000080 !important; }
    .bg-slate-50 { background-color: #ffffff !important; }
    .text-slate-600 { color: #000000 !important; }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Dark mode support (for future enhancement) */
@media (prefers-color-scheme: dark) {
    /* Dark mode styles can be added here for future enhancement */
}

/* Performance optimizations */
.gpu-accelerated {
    transform: translateZ(0);
    will-change: transform;
}

/* Mobile menu animation */
.mobile-menu-enter {
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.mobile-menu-enter-active {
    opacity: 1;
    transform: translateY(0);
}

/* Stats counter animation */
.stat-counter {
    font-variant-numeric: tabular-nums;
}

/* Glassmorphism effects */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Custom checkbox/radio styling */
.custom-checkbox {
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid #1e3a8a;
    border-radius: 4px;
    position: relative;
    cursor: pointer;
}

.custom-checkbox:checked {
    background: #1e3a8a;
}

.custom-checkbox:checked::after {
    content: '✓';
    position: absolute;
    color: white;
    font-size: 14px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Image optimization */
img {
    max-width: 100%;
    height: auto;
}

.lazy-image {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lazy-image.loaded {
    opacity: 1;
}

/* Typography enhancements */
.text-gradient {
    background: linear-gradient(135deg, #1e3a8a, #0f172a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Loading spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f1f5f9;
    border-top: 4px solid #1e3a8a;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Luxury design enhancements */
.luxury-border {
    border: 1px solid transparent;
    background: linear-gradient(white, white) padding-box,
                linear-gradient(135deg, #1e3a8a, #64748b) border-box;
}

.luxury-shadow {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25),
                0 0 0 1px rgba(255, 255, 255, 0.05);
}

.luxury-text-shadow {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.luxury-backdrop {
    backdrop-filter: blur(20px) saturate(180%);
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Premium gradient overlays */
.premium-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(30, 58, 138, 0.1) 0%, 
        rgba(15, 23, 42, 0.2) 50%, 
        rgba(51, 65, 85, 0.1) 100%);
    pointer-events: none;
}

/* Elegant hover transitions */
.elegant-hover {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.elegant-hover:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 32px 64px -12px rgba(0, 0, 0, 0.35);
}

/* Sophisticated text effects */
.sophisticated-text {
    background: linear-gradient(135deg, #1e3a8a 0%, #475569 50%, #64748b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
    letter-spacing: -0.025em;
}

/* Luxury card styling */
.luxury-card {
    background: linear-gradient(145deg, 
        rgba(255, 255, 255, 0.95) 0%, 
        rgba(248, 250, 252, 0.95) 100%);
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 
        0 20px 25px -5px rgba(0, 0, 0, 0.1),
        0 10px 10px -5px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.7);
}

/* Executive-level styling */
.executive-section {
    background: linear-gradient(135deg, 
        #0f172a 0%, 
        #1e3a8a 25%, 
        #334155 50%, 
        #1e3a8a 75%, 
        #0f172a 100%);
    position: relative;
}

.executive-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 70% 80%, rgba(100, 116, 139, 0.1) 0%, transparent 50%);
    pointer-events: none;
}