/* Custom CSS for Gibson Nyendwa Portfolio Website */

/* Root Variables */
:root {
    --gibson-blue: #1e40af;
    --sky-blue: #0ea5e9;
    --gibson-orange: #f97316;
    --gibson-light-blue: #bae6fd;
    --gibson-dark: #1f2937;
    --gibson-gray: #6b7280;
    --gibson-light-gray: #f3f4f6;
}

/* Base Styles */
* {
    scroll-behavior: smooth;
}

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

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: var(--sky-blue);
}

/* Navigation Enhancements */
.nav-link {
    position: relative;
    font-weight: 500;
    padding: 0.5rem 0;
}

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

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

/* Hero Section Enhancements */
.hero-gradient {
    background: linear-gradient(135deg, var(--gibson-blue) 0%, var(--sky-blue) 50%, var(--gibson-light-blue) 100%);
}

/* Certification Cards */
.certification-card {
    transition: all 0.3s ease;
    transform: translateY(0);
}

.certification-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Floating Animations */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.float-animation {
    animation: float 3s ease-in-out infinite;
}

/* Glowing Effect for CTA Buttons */
.glow-button {
    position: relative;
    overflow: hidden;
}

.glow-button::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.5s;
}

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

/* Timeline Enhancements */
.timeline-item {
    position: relative;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 32px;
    top: 64px;
    bottom: -48px;
    width: 2px;
    background: var(--gibson-blue);
}

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

/* Skills Progress Bars */
.skill-bar {
    background: #e5e7eb;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 8px;
}

.skill-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--gibson-blue), var(--sky-blue));
    border-radius: 4px;
    transition: width 2s ease-in-out;
}

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

.expertise-card:hover {
    border-color: var(--gibson-blue);
    transform: translateY(-5px);
}

/* Profile Image Effects */
.profile-image {
    position: relative;
    overflow: hidden;
}

.profile-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, var(--gibson-blue) 0%, var(--sky-blue) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.profile-image:hover::after {
    opacity: 0.1;
}

/* Badge Animations */
.badge-pulse {
    animation: pulse 2s infinite;
}

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

/* Social Icons */
.social-icon {
    transition: all 0.3s ease;
}

.social-icon:hover {
    transform: translateY(-3px) scale(1.1);
}

/* Contact Form Enhancements */
.form-input {
    transition: all 0.3s ease;
}

.form-input:focus {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.15);
}

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

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

/* Success/Error Messages */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-top: 16px;
    font-weight: 500;
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* Media Queries for Enhanced Responsiveness */
@media (max-width: 768px) {
    .certification-card {
        margin-bottom: 1rem;
    }
    
    .timeline-item::before {
        left: 16px;
    }
    
    .hero-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* Dark Mode Support (Future Enhancement) */
@media (prefers-color-scheme: dark) {
    :root {
        --gibson-dark: #f9fafb;
        --gibson-gray: #d1d5db;
        --gibson-light-gray: #1f2937;
    }
}

/* Print Styles */
@media print {
    .no-print {
        display: none;
    }
    
    .print-break {
        page-break-before: always;
    }
    
    * {
        color: black !important;
        background: white !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 */
.focus-visible:focus {
    outline: 2px solid var(--gibson-orange);
    outline-offset: 2px;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .certification-card {
        border: 2px solid currentColor;
    }
    
    .nav-link::after {
        height: 3px;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Custom Utilities */
.text-gradient {
    background: linear-gradient(135deg, var(--gibson-blue), var(--sky-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-gradient-gibson {
    background: linear-gradient(135deg, var(--gibson-blue) 0%, var(--sky-blue) 50%, var(--gibson-light-blue) 100%);
}

.shadow-gibson {
    box-shadow: 0 4px 6px -1px rgba(30, 64, 175, 0.1), 0 2px 4px -1px rgba(30, 64, 175, 0.06);
}

.shadow-gibson-lg {
    box-shadow: 0 10px 15px -3px rgba(30, 64, 175, 0.1), 0 4px 6px -2px rgba(30, 64, 175, 0.05);
}

/* Logo Animations */
.logo-hover {
    transition: all 0.3s ease;
}

.logo-hover:hover {
    transform: scale(1.05) rotate(2deg);
    filter: brightness(1.1);
}

/* Section Dividers */
.section-divider {
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--gibson-blue), var(--gibson-orange));
    margin: 2rem auto;
    border-radius: 2px;
}

/* Expertise Icons */
.expertise-icon {
    transition: all 0.3s ease;
}

.expertise-card:hover .expertise-icon {
    transform: scale(1.1) rotate(5deg);
}

/* Stats Counter Animation */
.counter {
    font-variant-numeric: tabular-nums;
}

/* Mobile Menu Enhancements */
@media (max-width: 768px) {
    .mobile-menu {
        backdrop-filter: blur(10px);
        background: rgba(255, 255, 255, 0.95);
    }
    
    .mobile-menu-item {
        border-bottom: 1px solid rgba(30, 64, 175, 0.1);
        padding: 1rem;
        transition: background-color 0.2s ease;
    }
    
    .mobile-menu-item:hover {
        background-color: rgba(30, 64, 175, 0.05);
    }
}

/* Certification Badge Styles */
.cert-badge {
    position: relative;
    overflow: hidden;
}

.cert-badge::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(45deg);
    transition: all 0.5s ease;
    opacity: 0;
}

.cert-badge:hover::before {
    opacity: 1;
    animation: shimmer 1.5s ease-in-out;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

/* Contact Form Specific Styles */
.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

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

/* Professional Badge */
.professional-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, var(--gibson-blue), var(--sky-blue));
    color: white;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.875rem;
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.3);
}

.professional-badge::before {
    content: '✓';
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

/* Enhanced Button Styles */
.btn-primary {
    background: linear-gradient(135deg, var(--gibson-orange), #ea580c);
    border: none;
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(249, 115, 22, 0.3);
}

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

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* Smooth Reveal Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Enhanced Typography */
.font-playfair {
    font-family: 'Playfair Display', serif;
}

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

/* Card Stack Effect */
.card-stack {
    position: relative;
}

.card-stack::before,
.card-stack::after {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    right: -4px;
    bottom: -4px;
    background: linear-gradient(135deg, var(--gibson-blue), var(--sky-blue));
    opacity: 0.1;
    border-radius: inherit;
    z-index: -1;
}

.card-stack::after {
    top: 8px;
    left: 8px;
    right: -8px;
    bottom: -8px;
    opacity: 0.05;
}

/* Industry Recognition Badges */
.recognition-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    background: rgba(249, 115, 22, 0.1);
    color: var(--gibson-orange);
    border: 1px solid rgba(249, 115, 22, 0.2);
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 500;
}

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

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

/* Footer Enhancements */
.footer-link {
    transition: all 0.3s ease;
    position: relative;
}

.footer-link:hover {
    color: var(--gibson-orange);
    transform: translateX(4px);
}

.footer-link::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 2px;
    background: var(--gibson-orange);
    transition: width 0.3s ease;
}

.footer-link:hover::before {
    width: 4px;
}

/* Enhanced Scrolling */
html {
    scroll-padding-top: 80px;
}

/* Custom Checkbox/Radio Styles */
.custom-checkbox {
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid var(--gibson-blue);
    border-radius: 4px;
    position: relative;
    cursor: pointer;
}

.custom-checkbox:checked {
    background: var(--gibson-blue);
}

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

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

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

/* Success Stories Section Enhancement */
.success-metric {
    position: relative;
    overflow: hidden;
}

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

.success-metric:hover::before {
    left: 100%;
}