/* =============================================
   GLOBALDEETS - Premium Portfolio Showcase
   A magnificent window into exclusive capabilities
   ============================================= */

:root {
    /* Premium Color Palette */
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --primary-light: #60a5fa;
    --accent: #8b5cf6;
    --accent-pink: #ec4899;
    --accent-cyan: #06b6d4;
    
    /* Advanced Backgrounds */
    --bg-void: #050911;
    --bg-deep: #0a0e1a;
    --bg-surface: #0f1629;
    --bg-elevated: #151b2e;
    
    /* Glass Morphism */
    --glass: rgba(20, 30, 50, 0.4);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-hover: rgba(30, 45, 70, 0.5);
    
    /* Text Hierarchy */
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
    --text-faded: #475569;
    
    /* Shadows & Glows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 30px 70px rgba(0, 0, 0, 0.6);
    --glow-primary: 0 0 40px rgba(59, 130, 246, 0.3);
    --glow-accent: 0 0 40px rgba(139, 92, 246, 0.25);
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    --gradient-accent: linear-gradient(135deg, #ec4899 0%, #8b5cf6 100%);
    --gradient-success: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
    --gradient-aurora: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
}

/* =============================================
   FOUNDATIONS
   ============================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-deep);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* Reduced Motion Preferences */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition: none !important; }
    body::before, body::after { animation: none !important; }
    .project-card:hover, .stat-item:hover { transform: none !important; }
    .scroll-to-top:hover { transform: none !important; }
}

/* Skip Link (moved from inline pages) */
.skip-link {
    position: absolute;
    left: -10000px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
.skip-link:focus {
    position: static;
    width: auto;
    height: auto;
    padding: 0.75rem 1rem;
    background: var(--primary-dark);
    color: #fff;
    border-radius: 0.5rem;
    z-index: 1000;
    box-shadow: 0 0 0 4px rgba(59,130,246,0.3);
}

/* Accessibility: Visually hidden but screen reader visible */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Animated Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(139, 92, 246, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(236, 72, 153, 0.04) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
    animation: pulse 15s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* Floating Particles */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20% 30%, rgba(255, 255, 255, 0.1), transparent),
        radial-gradient(2px 2px at 60% 70%, rgba(255, 255, 255, 0.05), transparent),
        radial-gradient(1px 1px at 50% 50%, rgba(255, 255, 255, 0.08), transparent),
        radial-gradient(1px 1px at 80% 10%, rgba(255, 255, 255, 0.06), transparent);
    background-size: 200% 200%;
    background-position: 0% 0%;
    animation: drift 60s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes drift {
    0%, 100% { background-position: 0% 0%; }
    50% { background-position: 100% 100%; }
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 1;
}

/* =============================================
   HEADER - FLOATING GLASS
   ============================================= */

header {
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 1.5rem 0;
    box-shadow: var(--shadow-md), 0 0 60px rgba(59, 130, 246, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(59, 130, 246, 0.05) 0%, 
        rgba(139, 92, 246, 0.05) 50%, 
        rgba(236, 72, 153, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

header.scrolled {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(32px) saturate(200%);
    -webkit-backdrop-filter: blur(32px) saturate(200%);
    box-shadow: var(--shadow-xl), 0 0 80px rgba(59, 130, 246, 0.2);
}

header.scrolled::before {
    opacity: 1;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 2.2rem;
    font-weight: 800;
    background: linear-gradient(135deg, #60a5fa 0%, #8b5cf6 25%, #ec4899 50%, #f59e0b 75%, #10b981 100%);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 10s ease infinite;
    letter-spacing: -0.02em;
    text-shadow: 0 0 40px rgba(139, 92, 246, 0.4);
}

@keyframes gradientShift {
    0%, 100% { 
        background-position: 0% 50%; 
        filter: hue-rotate(0deg);
    }
    25% { 
        background-position: 50% 50%; 
        filter: hue-rotate(15deg);
    }
    50% { 
        background-position: 100% 50%; 
        filter: hue-rotate(30deg);
    }
    75% { 
        background-position: 50% 50%; 
        filter: hue-rotate(15deg);
    }
}

.tagline {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 0.25rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    opacity: 0.8;
}

/* Navigation Icon Buttons */
.nav-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: var(--glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    color: var(--text-secondary);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.nav-icon-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: 16px;
}

.nav-icon-btn svg {
    position: relative;
    z-index: 1;
    transition: all 0.4s ease;
    filter: drop-shadow(0 0 8px currentColor);
}

.nav-icon-btn:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 12px 40px rgba(139, 92, 246, 0.4);
    border-color: var(--primary);
}

.nav-icon-btn:hover::before {
    opacity: 0.1;
}

.nav-icon-btn:hover svg {
    filter: drop-shadow(0 0 16px currentColor);
    transform: scale(1.1);
}

.nav-icon-btn.active {
    background: var(--gradient-primary);
    border-color: transparent;
    color: white;
    box-shadow: var(--glow-primary);
}

.nav-icon-btn.active::before {
    opacity: 0;
}

.nav-icon-btn.active svg {
    filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.6));
}

.nav-icon-btn:active {
    transform: translateY(-2px) scale(0.98);
}

/* =============================================
   CONTROLS - MODERN INPUTS
   ============================================= */

.controls {
    display: flex;
    gap: 1rem;
    margin: 2rem 0;
    flex-wrap: wrap;
    animation: slideInUp 0.6s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.search-box {
    flex: 1;
    min-width: 300px;
    position: relative;
}

.search-input,
.filter-select {
    width: 100%;
    padding: 0.9rem 1.2rem;
    background: var(--glass);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-input:focus,
.filter-select:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(30, 45, 70, 0.5);
    box-shadow: 
        0 0 0 3px rgba(59, 130, 246, 0.1),
        0 8px 24px rgba(0, 0, 0, 0.3);
    transform: translateY(-1px);
}

.filter-group {
    display: flex;
    gap: 0.75rem;
}

.filter-select {
    min-width: 150px;
    cursor: pointer;
}

/* View Toggle Buttons */
.view-toggle {
    display: flex;
    gap: 0.5rem;
}

.view-btn {
    padding: 0.9rem 1.2rem;
    background: var(--glass);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-secondary);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
}

.view-btn:hover {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.4);
    color: var(--primary-light);
    transform: translateY(-2px);
}

.view-btn.active {
    background: var(--gradient-primary);
    border-color: transparent;
    color: white;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.4);
}

/* =============================================
   STATS - PREMIUM METRICS
   ============================================= */

.stats-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin: 2.5rem 0;
    animation: slideInUp 0.6s ease-out 0.2s both;
}

.stat-item {
    background: var(--glass);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2.5rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-item:hover {
    transform: translateY(-6px);
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 
        var(--shadow-lg),
        var(--glow-primary);
}

.stat-item:hover::before {
    transform: scaleX(1);
}

.stat-number {
    display: block;
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, #60a5fa 0%, #8b5cf6 25%, #ec4899 50%, #f59e0b 75%, #10b981 100%);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    line-height: 1;
    transition: transform 0.3s ease;
    animation: gradientShift 12s ease infinite;
}

.stat-item:hover .stat-number {
    transform: scale(1.15);
    animation-duration: 3s;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

/* =============================================
   PROJECT CARDS - 3D GLASS MORPHISM
   ============================================= */

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
    animation: slideInUp 0.6s ease-out 0.3s both;
}

.project-card {
    background: var(--glass);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
    will-change: transform, box-shadow;
    contain: layout style paint;
}

/* Card Glow Effect */
.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(
        circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
        rgba(59, 130, 246, 0.15) 0%,
        transparent 50%
    );
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.project-card:hover::before {
    opacity: 1;
}

/* Top Gradient Border */
.project-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card:hover::after {
    transform: scaleX(1);
}

.project-card:hover {
    transform: translateY(-12px) scale(1.02) perspective(1000px) rotateX(2deg);
    transform-style: preserve-3d;
    border-color: rgba(59, 130, 246, 0.6);
    box-shadow: 
        0 32px 80px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(59, 130, 246, 0.4),
        var(--glow-primary),
        0 0 60px rgba(59, 130, 246, 0.2);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.2rem;
    position: relative;
    z-index: 1;
}

.project-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
    letter-spacing: -0.01em;
    transition: all 0.3s ease;
}

.project-card:hover .project-title {
    color: var(--primary-light);
    transform: translateX(4px);
}

.project-url {
    font-size: 0.85rem;
    color: var(--accent);
    text-decoration: none;
    opacity: 0.8;
    transition: all 0.3s ease;
}

.project-url:hover {
    opacity: 1;
    text-decoration: underline;
}

.status-badge {
    padding: 0.4rem 1rem;
    border-radius: 24px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.status-badge::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 8px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    transform: translateY(-50%);
}

.project-card:hover .status-badge {
    transform: scale(1.08);
    box-shadow: var(--shadow-md);
}

.status-active {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.25), rgba(52, 211, 153, 0.25));
    color: #6ee7b7;
    border: 1px solid rgba(16, 185, 129, 0.6);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
}

.status-active::before {
    background: #6ee7b7;
    box-shadow: 0 0 10px #6ee7b7;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: translateY(-50%) scale(1);
    }
    50% {
        opacity: 0.5;
        transform: translateY(-50%) scale(1.2);
    }
}

.status-beta {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(251, 191, 36, 0.25));
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.6);
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.3);
}

.status-beta::before {
    background: #fbbf24;
    box-shadow: 0 0 10px #fbbf24;
}

.status-maintenance {
    background: linear-gradient(135deg, rgba(100, 116, 139, 0.25), rgba(148, 163, 184, 0.25));
    color: #94a3b8;
    border: 1px solid rgba(100, 116, 139, 0.6);
    box-shadow: 0 4px 16px rgba(100, 116, 139, 0.2);
}

.status-maintenance::before {
    background: #94a3b8;
    box-shadow: 0 0 10px #94a3b8;
}

.project-description {
    color: var(--text-secondary);
    font-size: 0.98rem;
    line-height: 1.7;
    margin-bottom: 1.2rem;
    position: relative;
    z-index: 1;
}

.project-meta {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.meta-item svg {
    width: 16px;
    height: 16px;
    opacity: 0.6;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 1.2rem;
    position: relative;
    z-index: 1;
}

.tag {
    background: rgba(59, 130, 246, 0.12);
    color: var(--primary-light);
    padding: 0.4rem 1rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid rgba(59, 130, 246, 0.3);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.project-card:hover .tag {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.5);
    transform: translateY(-2px);
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1.2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.85rem;
    color: var(--text-muted);
    position: relative;
    z-index: 1;
}

.last-updated {
    font-weight: 500;
}

.footer-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.btn-feedback {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
}

.btn-feedback:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-feedback:active {
    transform: translateY(0);
}

.view-link,
.view-details {
    color: var(--primary-light);
    text-decoration: none;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    border-radius: 10px;
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(59, 130, 246, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    font-size: 0.9rem;
}

.view-link:hover,
.view-details:hover {
    gap: 0.8rem;
    background: rgba(59, 130, 246, 0.25);
    border-color: rgba(59, 130, 246, 0.5);
    color: #93c5fd;
    transform: translateX(4px);
}

/* =============================================
   FOOTER
   ============================================= */

.footer {
    background: var(--glass);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    margin: 4rem 0 2rem;
    text-align: center;
}

.footer p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--primary-light);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.footer-links button {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--primary-light);
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    padding: 0.6rem 1.1rem;
    border-radius: 12px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all 0.3s ease;
}

.footer-links button:hover,
.footer-links a:hover {
    color: var(--accent);
    transform: translateY(-2px);
    background: rgba(59,130,246,0.12);
    border-color: rgba(59,130,246,0.4);
}

.footer-links button:focus-visible,
.footer-links a:focus-visible,
.view-details:focus-visible,
.nav-icon-btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

.footer-links a:hover {
    color: var(--accent);
    transform: translateY(-2px);
}

/* =============================================
   MODAL
   ============================================= */

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 9, 17, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: var(--glass);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    margin: 5% auto;
    padding: 2.5rem;
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    width: 90%;
    max-width: 700px;
    box-shadow: var(--shadow-xl);
    position: relative;
    animation: slideInUp 0.4s ease-out;
}

.close {
    position: absolute;
    right: 1.5rem;
    top: 1.5rem;
    color: var(--text-muted);
    font-size: 2rem;
    font-weight: 300;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}

.close:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    transform: rotate(90deg);
}

/* =============================================
   UTILITIES
   ============================================= */

.no-results {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Ripple Effect */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transform: scale(0);
    animation: rippleEffect 0.6s ease-out;
    pointer-events: none;
}

@keyframes rippleEffect {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Smooth Stagger Animations */
.stagger-animation {
    animation: staggerFadeIn 0.6s ease-out backwards;
}

@keyframes staggerFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Button Press Effect */
.btn-press {
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-press:active {
    transform: scale(0.95);
}

/* Smooth Color Transitions */
* {
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

/* Scroll to Top */
.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 56px;
    height: 56px;
    background: var(--gradient-primary);
    border: none;
    border-radius: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 99;
    color: white;
    font-size: 1.5rem;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl), var(--glow-primary);
}

/* Selection */
::selection {
    background: rgba(59, 130, 246, 0.3);
    color: var(--text-primary);
}

/* Focus */
*:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
    border-radius: 4px;
}

/* Theme-specific focus refinement */
:root[data-theme='dark'] *:focus-visible {
    outline-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(139,92,246,0.35);
}

:root[data-theme='light'] {
    --bg-deep: #f5f7fa;
    --bg-surface: #ffffff;
    --text-primary: #0f1629;
    --text-secondary: #374151;
    --text-muted: #6b7280;
    --glass: rgba(255,255,255,0.7);
    --glass-border: rgba(0,0,0,0.08);
    --glass-hover: rgba(255,255,255,0.85);
}

:root[data-theme='light'] *:focus-visible {
    outline-color: var(--primary-dark);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.35);
}

/* =============================================
   RESPONSIVE DESIGN
   ============================================= */

@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }

    .logo h1 {
        font-size: 1.8rem;
    }

    .controls {
        flex-direction: column;
    }

    .search-box {
        min-width: 100%;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .stats-bar {
        grid-template-columns: 1fr;
    }

    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 2rem;
    }

    .project-card {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .logo h1 {
        font-size: 1.5rem;
    }

    .stat-number {
        font-size: 2.5rem;
    }

    .project-title {
        font-size: 1.2rem;
    }

    .view-toggle {
        width: 100%;
    }

    .view-btn {
        flex: 1;
    }
}

/* =============================================
   THEME TOGGLE (if needed)
   ============================================= */

.theme-toggle {
    padding: 0.9rem;
    background: var(--glass);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.4);
    transform: scale(1.05);
}

/* =============================================
   LIST VIEW VARIANT
   ============================================= */

.projects-grid.list-view {
    grid-template-columns: 1fr;
}

.projects-grid.list-view .project-card {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 2rem;
    align-items: start;
}

.projects-grid.list-view .card-header {
    margin-bottom: 0;
}

.projects-grid.list-view .project-description {
    margin-bottom: 0;
}

.projects-grid.list-view .card-footer {
    border-top: none;
    padding-top: 0;
    flex-direction: column;
    align-items: flex-end;
}

@media (max-width: 968px) {
    .projects-grid.list-view .project-card {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .projects-grid.list-view .card-header {
        margin-bottom: 1rem;
    }

    .projects-grid.list-view .project-description {
        margin-bottom: 1rem;
    }

    .projects-grid.list-view .card-footer {
        flex-direction: row;
        align-items: center;
        padding-top: 1rem;
        border-top: 1px solid rgba(255, 255, 255, 0.06);
    }
}

/* =============================================
   LOADING & TOAST
   ============================================= */

.loading-indicator {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(5, 9, 17, 0.85);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.loading-indicator.active {
    display: flex;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--glass);
    backdrop-filter: blur(24px) saturate(180%);
    color: var(--text-primary);
    padding: 1rem 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--glass-border);
    z-index: 1001;
    opacity: 0;
    transition: all 0.3s ease;
    max-width: 90%;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast.success {
    border-left: 4px solid #10b981;
}

.toast.error {
    border-left: 4px solid #ef4444;
}

.toast.info {
    border-left: 4px solid var(--primary);
}

/* =============================================
   PWA INSTALL BANNER
   ============================================= */

.install-banner {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--glass);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    max-width: 600px;
    width: 90%;
    box-shadow: var(--shadow-lg), var(--glow-primary);
    z-index: 999;
    animation: slideInUp 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.install-banner.hidden {
    display: none;
}

.install-content strong {
    display: block;
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.install-content p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
}

.install-actions {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
}

.install-actions button {
    white-space: nowrap;
    min-width: 80px;
}

@media (max-width: 640px) {
    .install-banner {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .install-actions {
        width: 100%;
        justify-content: center;
    }
}

/* ==============================================
   Contact Form Styles
   ============================================= */

.contact-hero {
    text-align: center;
    margin-bottom: var(--spacing-xl);
    padding: var(--spacing-xl) 0;
}

.contact-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 0.6s ease;
}

.contact-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    animation: fadeInUp 0.6s ease 0.1s backwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.contact-form {
    padding: var(--spacing-xl);
    position: relative;
    overflow: hidden;
}

.contact-form::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.03) 0%, transparent 70%);
    pointer-events: none;
}

.form-group {
    margin-bottom: var(--spacing-lg);
    position: relative;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
    font-size: 1rem;
}

.required {
    color: var(--danger);
    font-weight: 600;
}

.form-input {
    width: 100%;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.form-input:hover {
    border-color: rgba(37, 99, 235, 0.4);
    background: rgba(255, 255, 255, 0.08);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
    background: rgba(255, 255, 255, 0.1);
}

.form-input.error {
    border-color: var(--danger);
    animation: shake 0.3s ease;
}

.form-input.error:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    75% { transform: translateX(8px); }
}

.form-select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.6)' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 16px;
    padding-right: 3rem;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.form-select option {
    background: #1a1a2e;
    color: white;
    padding: var(--spacing-sm);
}

.form-textarea {
    resize: vertical;
    min-height: 150px;
    line-height: 1.6;
}

.form-hint {
    display: block;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: var(--spacing-xs);
}

.form-error {
    display: block;
    font-size: 0.875rem;
    color: var(--danger);
    margin-top: var(--spacing-xs);
    min-height: 1.25rem;
    font-weight: 500;
}

.checkbox-label {
    display: flex;
    align-items: start;
    gap: var(--spacing-sm);
    cursor: pointer;
    font-size: 0.95rem;
    transition: color 0.2s ease;
    line-height: 1.5;
}

.checkbox-label:hover {
    color: var(--primary);
}

.checkbox-label input[type="checkbox"] {
    margin-top: 0.25rem;
    cursor: pointer;
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
    accent-color: var(--primary);
}

.btn-submit {
    width: 100%;
    position: relative;
    font-size: 1.1rem;
    padding: 1.25rem var(--spacing-xl);
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border: none;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.btn-submit:hover {
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
    transform: translateY(-2px);
}

.btn-submit:active {
    transform: translateY(0);
}

.btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
}

.spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.contact-info {
    padding: var(--spacing-xl);
    height: fit-content;
    animation: fadeInUp 0.6s ease 0.2s backwards;
    margin-top: calc(var(--spacing-xl) * 2);
}

.info-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: var(--spacing-lg);
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.info-list {
    list-style: none;
    padding: 0;
    margin: 0 0 var(--spacing-xl);
}

.info-list li {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    color: var(--text-secondary);
    padding: var(--spacing-sm);
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
}

.info-list li:hover {
    background: rgba(37, 99, 235, 0.05);
    transform: translateX(4px);
}

.info-list svg {
    color: var(--primary);
    flex-shrink: 0;
}

.privacy-notice {
    padding: var(--spacing-md);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.05), rgba(139, 92, 246, 0.05));
    border-left: 3px solid var(--primary);
    border-radius: var(--radius-sm);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.05);
}

.privacy-notice h4 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 var(--spacing-sm);
    color: var(--primary);
}

.privacy-notice p {
    font-size: 0.875rem;
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.5;
}

.success-message {
    text-align: center;
    padding: var(--spacing-xxl);
    max-width: 600px;
    margin: var(--spacing-xxl) auto;
    animation: fadeInUp 0.6s ease;
}

.success-message svg {
    color: var(--success);
    margin-bottom: var(--spacing-lg);
    animation: checkmark 0.6s ease;
}

@keyframes checkmark {
    0% {
        transform: scale(0) rotate(-45deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.2) rotate(5deg);
    }
    100% {
        transform: scale(1) rotate(0);
        opacity: 1;
    }
}

.success-message h2 {
    font-size: 2rem;
    margin-bottom: var(--spacing-md);
}

.success-message p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xl);
}

@media (min-width: 1200px) {
    .contact-wrapper {
        grid-template-columns: 2fr 1fr;
        max-width: 1400px;
    }
    
    .contact-info {
        position: sticky;
        top: calc(var(--header-height) + var(--spacing-lg));
    }
}

@media (max-width: 768px) {
    .contact-title {
        font-size: 2rem;
    }
    
    .contact-subtitle {
        font-size: 1rem;
    }
    
    .form-input {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* Section transition (bb-content) */
.section { opacity:0; transform: translateY(12px); transition: opacity .4s ease, transform .4s ease; }
.section.active { opacity:1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) { .section { transition: none !important; } }

