:root {
    /* Modern Dark Theme Colors */
    --bg-dark: #0f1115;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-hover: rgba(255, 255, 255, 0.06);
    --border-color: rgba(255, 255, 255, 0.08);
    
    /* Accents */
    --accent-primary: #8b5cf6;
    --accent-secondary: #06b6d4;
    --accent-gradient: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    
    /* Text */
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    
    /* Typography */
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-display: 'Space Grotesk', system-ui, -apple-system, sans-serif;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* Background Ambient Glow */
.bg-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    opacity: 0.15;
}

.bg-glow-1 {
    top: -10%;
    left: -10%;
    width: 600px;
    height: 600px;
    background: var(--accent-primary);
}

.bg-glow-2 {
    bottom: -10%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: var(--accent-secondary);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Glassmorphism Panel Base */
.glass-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 24px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.75rem;
    border-radius: 99px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 4px 14px rgba(139, 92, 246, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

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

.btn-secondary:hover {
    background: var(--bg-card-hover);
    transform: translateY(-2px);
}

/* Hero Section */
.hero {
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 6rem 0 4rem;
}

.hero-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(139, 92, 246, 0.1);
    color: #a78bfa;
    border-radius: 99px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(3rem, 8vw, 5.5rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.04em;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-main);
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.hero-description {
    font-size: 1.125rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 2.5rem;
}

.hero-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Stats Section */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 5rem;
}

.stat-card {
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-icon {
    font-size: 2.5rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-details {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Common Section Styles */
.section {
    margin-bottom: 6rem;
}

.section-header {
    margin-bottom: 3rem;
}

.section-title {
    font-family: var(--font-display);
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 1.125rem;
}

/* Featured Projects Grid */
.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}

.featured-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.featured-image {
    width: 100%;
    height: 200px;
    background-size: cover;
    background-position: center;
    border-bottom: 1px solid var(--border-color);
}

.featured-content {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.featured-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--accent-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.featured-card:hover {
    transform: translateY(-8px);
    background: var(--bg-card-hover);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.featured-card:hover::before {
    opacity: 1;
}

.featured-title {
    font-family: var(--font-display);
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

.featured-description {
    color: var(--text-muted);
    margin-bottom: 2rem;
    flex-grow: 1;
}

.featured-links {
    display: flex;
    gap: 1rem;
}

/* Divider */
.divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-color), transparent);
    margin: 4rem 0;
}

/* Controls Panel (Search & Filter) */
.controls-panel {
    padding: 1.5rem;
    margin-bottom: 3rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .controls-panel {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.search-wrapper {
    position: relative;
    flex: 1;
    max-width: 400px;
}

.search-icon {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-input {
    width: 100%;
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--border-color);
    border-radius: 99px;
    padding: 0.875rem 1.25rem 0.875rem 3rem;
    color: var(--text-main);
    font-family: var(--font-sans);
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: rgba(0,0,0,0.4);
}

.filter-wrapper {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 0.5rem 1rem;
    border-radius: 99px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.filter-btn:hover {
    color: var(--text-main);
    border-color: var(--text-muted);
}

.filter-btn.active {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

/* Regular Repos Grid */
.repos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.repo-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.repo-card:hover {
    background: var(--bg-card-hover);
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.15);
}

.repo-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.repo-name {
    font-weight: 600;
    font-size: 1.25rem;
    color: var(--text-main);
    text-decoration: none;
    word-break: break-word;
}

.repo-name:hover {
    color: var(--accent-primary);
}

.repo-description {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.repo-stats {
    display: flex;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.repo-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.language-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
}

/* State Messages */
.state-message {
    text-align: center;
    padding: 4rem 0;
    color: var(--text-muted);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255,255,255,0.1);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    margin: 0 auto 1rem;
    animation: spin 1s linear infinite;
}

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

/* Footer */
.footer {
    text-align: center;
    padding: 3rem 0;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
}

/* Responsive */
@media (max-width: 768px) {
    .featured-grid {
        grid-template-columns: 1fr;
    }
    
    .hero {
        min-height: auto;
        padding: 4rem 0;
    }
    
    .hero-links {
        flex-direction: column;
    }
}