:root {
    /* Emerald Green / Tech Theme */
    --bg-color: #0b0c15;
    --bg-secondary: #151621;
    --sidebar-bg: #0b0c15;
    
    --primary-color: #10b981; /* Emerald Green */
    --primary-light: #34d399;
    --accent-color: #0ea5e9; /* Sky Blue */
    --accent-cyan: #22d3ee;
    
    --text-color: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-tertiary: #64748b;
    
    /* Clean, solid card style */
    --card-bg: #151621;
    --card-bg-hover: #1e1f2e;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(16, 185, 129, 0.5);
    
    --sidebar-width: 280px;
    --header-height: 64px;
    --radius: 12px;
    
    --font-main: 'Inter', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Background Effect */
.bg-decoration {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -1;
    background: 
        radial-gradient(circle at 80% 10%, rgba(16, 185, 129, 0.08), transparent 40%),
        radial-gradient(circle at 20% 80%, rgba(14, 165, 233, 0.06), transparent 40%);
    pointer-events: none;
}

/* Layout Wrapper */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styling */
.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    padding: 24px;
    overflow-y: auto;
}

.sidebar-header {
    margin-bottom: 40px;
    padding-left: 12px;
}

.logo {
    font-size: 1.2rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.03em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo span {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.nav-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
    padding-left: 12px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.03);
    color: #fff;
}

.nav-item.active {
    background: rgba(16, 185, 129, 0.1);
    color: var(--primary-light);
    font-weight: 600;
}

.nav-icon {
    font-size: 1.1rem;
    width: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Main Content Area */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* Mobile Header */
.mobile-header {
    display: none;
    height: var(--header-height);
    align-items: center;
    padding: 0 20px;
    background: rgba(11, 12, 21, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 90;
    gap: 16px;
}

.menu-toggle {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Hero Section - Compact & Green */
.hero-section {
    padding: 60px 40px 40px; /* Reduced padding */
    background: linear-gradient(180deg, rgba(16, 185, 129, 0.05) 0%, transparent 100%);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 40px;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    align-items: center;
    gap: 40px;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: linear-gradient(to bottom, black, transparent);
    -webkit-mask-image: linear-gradient(to bottom, black, transparent);
    z-index: -1;
    pointer-events: none;
}

.hero-content {
    max-width: 100%;
}

.hero-section h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 16px;
    line-height: 1.1;
    color: #fff;
    letter-spacing: -0.02em;
}

.highlight {
    background: linear-gradient(135deg, #34d399 0%, #22d3ee 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-desc {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 32px;
    line-height: 1.6;
    max-width: 540px;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px; /* Tighter gap */
}

.stat-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 16px; /* Compact padding */
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: all 0.3s;
}

.stat-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--primary-color);
    transform: translateY(-4px);
}

.stat-number {
    font-size: 2rem; /* Smaller font */
    font-weight: 800;
    color: #fff;
    line-height: 1;
    background: linear-gradient(to right, #fff, #cbd5e1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.stat-icon {
    width: 32px;
    height: 32px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    margin-bottom: 4px;
    font-size: 1rem;
}

/* Content Container */
.content-container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 40px 60px;
}

/* Sections */
.section-block {
    margin-bottom: 80px;
    scroll-margin-top: 40px;
}

.section-header {
    margin-bottom: 24px;
    display: flex;
    align-items: baseline;
    gap: 16px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 16px;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-subtitle {
    font-size: 0.9rem;
    color: var(--text-tertiary);
    font-weight: 500;
}

/* Grids & Cards */
.grid-container {
    display: grid;
    gap: 24px;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(16, 185, 129, 0.03), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.card:hover {
    transform: translateY(-4px);
    border-color: var(--primary-color);
    box-shadow: 0 12px 24px -10px rgba(0, 0, 0, 0.3);
}

.card:hover::before {
    opacity: 1;
}

.card-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: #1a1b26;
    padding: 8px;
    object-fit: contain;
    border: 1px solid rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
}

.card-content {
    min-width: 0;
}

.card-content h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Article & Video Grid */
.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 16px;
}

.article-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
    transition: all 0.2s;
}

.article-card:hover {
    background: var(--card-bg-hover);
    border-color: var(--primary-color);
    transform: translateX(4px);
}

.article-card h3 {
    font-size: 0.95rem;
    color: #fff;
    line-height: 1.4;
    font-weight: 500;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-card h3 {
    font-size: 0.95rem;
    color: #fff;
    line-height: 1.4;
    font-weight: 500;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Unified Green Tag Style */
.article-card .tag {
    flex-shrink: 0;
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: 4px;
    background: rgba(16, 185, 129, 0.1);
    color: var(--primary-color);
    font-weight: 600;
    width: 50px;
    text-align: center;
}

/* Repo Grid */
.repo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.repo-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    padding: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    transition: all 0.2s;
}

.repo-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--primary-color);
}

.repo-icon {
    font-size: 1.2rem;
    color: var(--text-tertiary);
}

.repo-name {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Tech Docs */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.tech-card {
    background: linear-gradient(180deg, var(--card-bg) 0%, #0f1019 100%);
    border: 1px solid var(--border-color);
    padding: 24px;
    border-radius: 12px;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s;
}

.tech-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-4px);
}

.tech-title {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 8px;
}

.tech-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Tool Grid */
.tool-grid-large {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

.tool-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    padding: 12px;
    border-radius: 6px;
    text-align: center;
    font-size: 0.85rem;
    color: #fff;
    text-decoration: none;
    transition: all 0.2s;
}

.tool-card:hover {
    background: rgba(16, 185, 129, 0.1);
    color: #fff;
    border-color: var(--primary-color);
}

/* Footer */
.site-footer {
    border-top: 1px solid var(--border-color);
    padding: 40px 0;
    text-align: center;
    margin-top: auto;
}

.site-footer p {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.9rem;
}

.footer-sub {
    font-size: 0.8rem !important;
    opacity: 0.6;
    margin-top: 4px;
    font-weight: 400 !important;
}

/* Back to Top */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 44px;
    height: 44px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-4px);
    background: var(--primary-light);
}

/* Responsive */
@media (max-width: 1024px) {
    :root {
        --sidebar-width: 0px;
    }
    
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        width: 280px;
        box-shadow: 20px 0 40px rgba(0,0,0,0.5);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .sidebar.open::after {
        content: '';
        position: fixed;
        top: 0;
        right: -100vw;
        bottom: 0;
        left: 280px;
        background: rgba(0,0,0,0.5);
        z-index: -1;
        pointer-events: auto;
    }
    
    .mobile-header {
        display: flex;
    }
    
    .hero-section, .content-container {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    .hero-section h1 {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .grid-container, .article-grid, .repo-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-stats {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .hero-section {
        grid-template-columns: 1fr;
        padding: 40px 20px;
        gap: 32px;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}