/* =====================================================
   PROJECTS SHOWCASE - CSS
   Inspired by doof.ing geometric effects
   ===================================================== */

:root {
    /* Colors */
    --void: #0a0a0f;
    --surface: #121218;
    --bg: #1a1a24;
    --border: #2a2a35;
    
    --text: #e8e8f0;
    --text-secondary: #b8b8c8;
    --text-muted: #88889a;
    
    --orange: #ff6b35;
    --orange-light: #ff8555;
    --orange-glow: rgba(255, 107, 53, 0.15);
    
    --purple: #a855f7;
    --purple-light: #c084fc;
    --purple-glow: rgba(168, 85, 247, 0.15);
    
    --cyan: #22d3ee;
    --green: #10b981;
    --red: #ef4444;
    
    /* Gradients */
    --gradient-fire: linear-gradient(135deg, var(--orange) 0%, var(--purple) 100%);
    --gradient-cyber: linear-gradient(135deg, var(--cyan) 0%, var(--purple) 100%);
    
    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 6rem;
    
    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-full: 9999px;
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.25);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.35);
    
    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* =====================================================
   RESET & BASE
   ===================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--void);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* =====================================================
   ANIMATED BACKGROUND
   ===================================================== */

.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.4;
}

#geometricCanvas {
    width: 100%;
    height: 100%;
}

/* =====================================================
   TYPOGRAPHY
   ===================================================== */

h1, h2, h3, h4, h5, h6 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    line-height: 1.2;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.25rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.25rem; }

.text-gradient-fire {
    background: var(--gradient-fire);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* =====================================================
   LAYOUT
   ===================================================== */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-xl);
}

.section {
    padding: var(--space-4xl) 0;
    position: relative;
    z-index: 1;
}

/* =====================================================
   NAVIGATION
   ===================================================== */

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-md) var(--space-xl);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.logo-emoji {
    font-size: 1.5rem;
}

.nav-logo:hover {
    color: var(--orange);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-sm);
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    transition: all var(--transition-fast);
}

.nav-links {
    display: flex;
    gap: var(--space-lg);
    list-style: none;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color var(--transition-fast);
}

.nav-link:hover {
    color: var(--orange);
}

/* =====================================================
   PAGE HEADER
   ===================================================== */

.page-header {
    padding: calc(80px + var(--space-4xl)) var(--space-xl) var(--space-4xl);
    text-align: center;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 30% 0%, var(--orange-glow) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 100%, var(--purple-glow) 0%, transparent 50%);
    opacity: 0.5;
    pointer-events: none;
}

.page-header-content {
    position: relative;
    z-index: 1;
}

.page-header h1 {
    margin-bottom: var(--space-md);
}

.page-header p {
    color: var(--text-secondary);
    font-size: 1.125rem;
    max-width: 600px;
    margin: 0 auto var(--space-xl);
}

.stats-bar {
    display: flex;
    gap: var(--space-3xl);
    justify-content: center;
    margin-top: var(--space-2xl);
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--gradient-fire);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* =====================================================
   FILTER BAR
   ===================================================== */

.filter-bar {
    background: var(--surface);
    padding: var(--space-xl) 0;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 60px;
    z-index: 100;
    backdrop-filter: blur(12px);
}

.filter-inner {
    display: flex;
    gap: var(--space-lg);
    align-items: flex-start;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.filter-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    font-weight: 600;
}

.filter-tabs {
    display: flex;
    gap: var(--space-xs);
    flex-wrap: wrap;
}

.filter-tab {
    padding: var(--space-xs) var(--space-sm);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.filter-tab:hover,
.filter-tab.active {
    background: var(--purple);
    border-color: var(--purple);
    color: var(--void);
}

.filter-select {
    padding: var(--space-xs) var(--space-sm);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    color: var(--text);
    font-size: 0.8rem;
    cursor: pointer;
    min-width: 120px;
}

.filter-select:focus {
    outline: none;
    border-color: var(--purple);
}

.filter-search {
    flex: 1;
    min-width: 200px;
}

.filter-search input {
    width: 100%;
    padding: var(--space-xs) var(--space-md);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    color: var(--text);
    font-size: 0.85rem;
}

.filter-search input:focus {
    outline: none;
    border-color: var(--purple);
}

/* =====================================================
   PROJECTS GRID
   ===================================================== */

.projects-section {
    padding: var(--space-3xl) 0;
}

.projects-grid {
    display: grid;
    gap: var(--space-md);
}

.loading-state {
    text-align: center;
    padding: var(--space-4xl);
    color: var(--text-muted);
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border);
    border-top-color: var(--orange);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto var(--space-lg);
}

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

/* =====================================================
   PROJECT CARD
   ===================================================== */

.project-card {
    display: grid;
    grid-template-columns: 100px 1fr auto;
    gap: var(--space-sm);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    transition: all var(--transition-base);
    text-decoration: none;
    color: var(--text);
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-fire);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-base);
}

.project-card:hover {
    border-color: var(--orange);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.project-card:hover::before {
    transform: scaleX(1);
}

.project-thumbnail {
    aspect-ratio: 1/1;
    background: var(--bg);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    overflow: hidden;
    position: relative;
}

.project-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-details {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.project-badges {
    display: flex;
    gap: var(--space-xs);
    flex-wrap: wrap;
    margin-bottom: var(--space-sm);
}

.badge {
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-orange { background: var(--orange); color: var(--void); }
.badge-purple { background: var(--purple); color: var(--void); }
.badge-cyan { background: var(--cyan); color: var(--void); }
.badge-green { background: var(--green); color: var(--void); }

.project-title {
    font-size: 1rem;
    margin-bottom: 4px;
    color: var(--text);
    line-height: 1.3;
    font-weight: 600;
}

.project-description {
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-bottom: var(--space-xs);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-tech {
    display: flex;
    gap: var(--space-xs);
    flex-wrap: wrap;
}

.tech-tag {
    padding: 2px 6px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.65rem;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-muted);
}

.project-actions {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: var(--space-sm);
}

.project-stats {
    display: flex;
    gap: var(--space-md);
    align-items: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: var(--space-md);
}

.project-stat {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

/* =====================================================
   BUTTONS
   ===================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-full);
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition-fast);
    cursor: pointer;
    border: none;
    font-size: 0.95rem;
    white-space: nowrap;
}

.btn-primary {
    background: var(--gradient-fire);
    color: var(--void);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg);
    border-color: var(--orange);
}

.btn-sm {
    padding: var(--space-xs) var(--space-md);
    font-size: 0.85rem;
}

/* =====================================================
   YOUTUBE SECTION
   ===================================================== */

.youtube-section {
    background: var(--bg);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-3xl);
}

.section-header h2 {
    margin-bottom: var(--space-md);
}

.section-header p {
    color: var(--text-secondary);
    font-size: 1.125rem;
}

.youtube-grid {
    display: grid;
    gap: var(--space-xl);
}

.youtube-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: all var(--transition-base);
}

.youtube-card.featured {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

.youtube-embed {
    position: relative;
    width: 100%;
    background: var(--void);
}

.youtube-embed iframe {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 400px;
}

.youtube-info {
    padding: var(--space-2xl);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.youtube-info h3 {
    margin-bottom: var(--space-md);
    color: var(--text);
}

.youtube-info p {
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
    line-height: 1.6;
}

.youtube-stats {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
    margin-bottom: var(--space-xl);
}

.youtube-stat {
    padding: var(--space-xs) var(--space-sm);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    color: var(--text-secondary);
}

@media (max-width: 968px) {
    .youtube-card.featured {
        grid-template-columns: 1fr;
    }
    
    .youtube-embed iframe {
        min-height: 300px;
    }
}

/* =====================================================
   SUBMIT CTA
   ===================================================== */

.submit-cta {
    background: var(--void);
    border-top: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.submit-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(circle at 20% 50%, var(--purple-glow) 0%, transparent 40%),
        radial-gradient(circle at 80% 50%, var(--orange-glow) 0%, transparent 40%);
    opacity: 0.5;
}

.submit-cta-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.submit-cta h2 {
    margin-bottom: var(--space-md);
}

.submit-cta p {
    color: var(--text-secondary);
    margin-bottom: var(--space-xl);
}

.submit-methods {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
}

/* =====================================================
   FOOTER
   ===================================================== */

.footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: var(--space-3xl) 0 var(--space-xl);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-2xl);
    margin-bottom: var(--space-2xl);
}

.footer-brand p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

.footer-heading {
    font-size: 0.9rem;
    margin-bottom: var(--space-md);
    color: var(--text);
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--orange);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--space-xl);
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* =====================================================
   RESPONSIVE
   ===================================================== */

@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    
    .nav-toggle {
        display: flex;
    }
    
    .nav-links {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: rgba(18, 18, 24, 0.98);
        backdrop-filter: blur(12px);
        flex-direction: column;
        padding: var(--space-xl);
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
        transition: all var(--transition-base);
        border-bottom: 1px solid var(--border);
    }
    
    .nav-links.open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }
    
    .stats-bar {
        gap: var(--space-xl);
    }
    
    .filter-inner {
        flex-direction: column;
        gap: var(--space-md);
    }
    
    .filter-group {
        width: 100%;
    }
    
    .project-card {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }
    
    .project-actions {
        flex-direction: row;
    }
}
