:root {
        /* Light theme */
        --bg-primary: #ffffff;
        --bg-secondary: #f8fafc;
        --bg-tertiary: #f1f5f9;
        --text-primary: #1e293b;
        --text-secondary: #475569;
        --text-muted: #64748b;
        --border-color: #e2e8f0;
        --border-hover: #cbd5e1;
        --accent-primary: #3b82f6;
        --accent-hover: #2563eb;
        --success: #10b981;
        --warning: #f59e0b;
        --danger: #ef4444;
        --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
        --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
        --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    }

    [data-theme="dark"] {
        /* Dark theme */
        --bg-primary: #0f172a;
        --bg-secondary: #1e293b;
        --bg-tertiary: #334155;
        --text-primary: #f8fafc;
        --text-secondary: #cbd5e1;
        --text-muted: #94a3b8;
        --border-color: #334155;
        --border-hover: #475569;
        --accent-primary: #60a5fa;
        --accent-hover: #3b82f6;
        --success: #34d399;
        --warning: #fbbf24;
        --danger: #f87171;
        --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
        --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.3), 0 2px 4px -2px rgb(0 0 0 / 0.3);
        --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.3), 0 4px 6px -4px rgb(0 0 0 / 0.3);
    }

    /* Apply theme to entire page */
    html[data-theme="dark"] {
        color-scheme: dark;
    }

    html[data-theme="light"] {
        color-scheme: light;
    }

    body {
        background-color: var(--bg-primary);
        color: var(--text-primary);
        transition: background-color 0.3s ease, color 0.3s ease;
    }

    /* Use default header from main.css - no overrides */

    /* Using default header styles from main.css */
        background: transparent !important;
    }

    .btn-outline:hover {
        background: var(--accent-primary) !important;
        color: white !important;
    }

    .btn-solid {
        background: var(--accent-primary) !important;
        color: white !important;
    }

    .container {
        max-width: 1200px;
        margin: 0 auto;
        padding: 0 1rem;
    }

    /* Theme toggle button */
    .theme-toggle {
        background: var(--bg-tertiary);
        border: 1px solid var(--border-color);
        border-radius: 8px;
        padding: 0.5rem;
        cursor: pointer;
        font-size: 1.2rem;
        transition: all 0.3s ease;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        position: fixed;
        top: 1rem;
        right: 1rem;
        z-index: 1001;
    }

    .theme-toggle:hover {
        background: var(--accent-primary);
        color: white;
        transform: scale(1.05);
    }

    /* Breadcrumb */
    .breadcrumb {
        padding: 1rem 0;
        border-bottom: 1px solid var(--border-color);
        margin-bottom: 2rem;
    }

    .breadcrumb a {
        color: var(--accent-primary);
        text-decoration: none;
        transition: color 0.3s ease;
    }

    .breadcrumb a:hover {
        color: var(--accent-hover);
    }

    /* Category header */
    .category-header {
        margin-bottom: 2rem;
        padding: 2rem;
        background: var(--bg-secondary);
        border: 1px solid var(--border-color);
        border-radius: 12px;
    }

    .category-icon {
        width: 48px;
        height: 48px;
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        font-size: 1.5rem;
        flex-shrink: 0;
        margin-right: 1rem;
    }

    .category-title {
        font-size: 1.75rem;
        font-weight: bold;
        color: var(--text-primary);
        margin-bottom: 0.5rem;
    }

    .category-description {
        font-size: 1.1rem;
        color: var(--text-secondary);
    }

    /* Filters */
    .filters-section {
        background: var(--bg-secondary);
        border: 1px solid var(--border-color);
        border-radius: 12px;
        padding: 1.5rem;
        margin-bottom: 2rem;
    }

    .filter-input {
        background: var(--bg-primary);
        border: 1px solid var(--border-color);
        border-radius: 8px;
        padding: 0.75rem;
        color: var(--text-primary);
        transition: all 0.3s ease;
    }

    .filter-input:focus {
        outline: none;
        border-color: var(--accent-primary);
        box-shadow: 0 0 0 3px rgb(59 130 246 / 0.1);
    }

    .filter-button {
        background: var(--accent-primary);
        color: white;
        border: none;
        border-radius: 8px;
        padding: 0.75rem 1rem;
        cursor: pointer;
        transition: all 0.3s ease;
    }

    .filter-button:hover {
        background: var(--accent-hover);
    }

    .filter-button-secondary {
        background: var(--bg-tertiary);
        color: var(--text-primary);
        border: 1px solid var(--border-color);
        border-radius: 8px;
        padding: 0.75rem 1rem;
        cursor: pointer;
        transition: all 0.3s ease;
    }

    .filter-button-secondary:hover {
        background: var(--border-hover);
    }

    /* Articles */
    .articles-grid {
        display: grid;
        gap: 2rem;
    }

    .article-card {
        background: var(--bg-secondary);
        border: 1px solid var(--border-color);
        border-radius: 12px;
        overflow: hidden;
        transition: all 0.3s ease;
    }

    .article-card:hover {
        border-color: var(--border-hover);
        box-shadow: var(--shadow-lg);
        transform: translateY(-2px);
    }

    .article-header {
        padding: 1.5rem;
        cursor: default; /* Default cursor on desktop */
        border-bottom: 1px solid var(--border-color);
    }
    
    /* Pointer cursor only on mobile for toggle functionality */
    @media (max-width: 768px) {
        .article-header {
            cursor: pointer;
        }
        
        /* Ensure links still work on mobile */
        .article-title a {
            position: relative;
            z-index: 2;
        }
    }
    
    /* On desktop, ensure clicks go to links */
    @media (min-width: 769px) {
        .article-header {
            cursor: default;
            pointer-events: none; /* Disable header clicks */
        }
        
        .article-title a {
            pointer-events: auto; /* Re-enable link clicks */
            cursor: pointer;
        }
        
        .read-more-link {
            pointer-events: auto; /* Re-enable link clicks */
        }
    }

    .article-title {
        font-size: 1.25rem;
        font-weight: 600;
        color: var(--text-primary);
        margin-bottom: 0.5rem;
        line-height: 1.4;
    }
    
    .article-title a {
        color: var(--text-primary);
        text-decoration: none;
        transition: color 0.3s ease;
    }
    
    .article-title a:hover {
        color: var(--accent-primary);
        text-decoration: underline;
    }

    .article-meta {
        display: flex;
        align-items: center;
        gap: 1rem;
        color: var(--text-muted);
        font-size: 0.9rem;
    }

    .article-content {
        padding: 1.5rem;
        transition: max-height 0.3s ease-in-out;
        overflow: hidden;
    }

    .article-summary {
        color: var(--text-secondary);
        line-height: 1.6;
        margin-bottom: 1rem;
    }

    .read-more-link {
        display: inline-flex;
        align-items: center;
        color: var(--accent-primary);
        text-decoration: none;
        font-weight: 500;
        transition: color 0.3s ease;
    }

    .read-more-link:hover {
        color: var(--accent-hover);
    }

    .expand-icon {
        transition: transform 0.3s ease;
        display: none !important; /* Hidden by default */
    }
    
    /* Show expand icon only on mobile */
    @media (max-width: 768px) {
        .expand-icon {
            display: block;
        }
        
        .article-content.hidden {
            max-height: 0;
            display: none; /* Completely hide content when collapsed */
        }
    }
    
    /* Always show content on desktop */
    @media (min-width: 769px) {
        .article-content {
            max-height: none !important;
            display: block !important;
        }
        
        .article-content.hidden {
            max-height: none !important;
            display: block !important;
        }
        
        .article-header {
            cursor: default; /* Remove pointer cursor on desktop */
        }
        
        .expand-icon {
            display: none !important; /* Force hide on desktop */
        }
    }

    /* Use default header from main.css - no overrides */

    /* Pagination */
    .pagination {
        margin-top: 3rem;
        display: flex;
        justify-content: center;
        gap: 0.5rem;
        flex-wrap: wrap;
    }

    .pagination a, .pagination span {
        padding: 0.75rem 1rem;
        border-radius: 8px;
        text-decoration: none;
        font-weight: 500;
        transition: all 0.3s ease;
    }

    .pagination a {
        background: var(--bg-secondary);
        color: var(--text-primary);
        border: 1px solid var(--border-color);
    }

    .pagination a:hover {
        background: var(--accent-primary);
        color: white;
        border-color: var(--accent-primary);
    }

    .pagination .current {
        background: var(--accent-primary);
        color: white;
        border: 1px solid var(--accent-primary);
    }

    /* Empty state */
    .empty-state {
        text-align: center;
        padding: 4rem 2rem;
        color: var(--text-muted);
    }

    .empty-state-icon {
        font-size: 4rem;
        margin-bottom: 1rem;
        opacity: 0.5;
    }

    /* Back to hub button */
    .back-to-hub-btn {
        display: inline-flex;
        align-items: center;
        padding: 0.75rem 1.5rem;
        background: var(--accent-primary);
        color: white;
        text-decoration: none;
        border-radius: 8px;
        font-weight: 500;
        transition: all 0.3s ease;
    }

    .back-to-hub-btn:hover {
        background: var(--accent-hover);
    }

    /* Responsive */
    @media (max-width: 768px) {
        .container {
            padding: 0 0.5rem;
        }

        .category-header {
            flex-direction: column;
            text-align: center;
            padding: 0.75rem; /* Further reduced padding */
            margin-bottom: 0.75rem; /* Further reduced margin */
        }

        .category-icon {
            margin-right: 0;
            margin-bottom: 0.25rem; /* Minimal margin */
            width: 40px; /* Even smaller icon */
            height: 40px;
            font-size: 1.25rem; /* Smaller emoji */
        }

        .category-title {
            font-size: 1.25rem; /* Even smaller title */
            margin-bottom: 0.125rem;
            line-height: 1.2;
        }

        .category-description {
            display: none; /* Hide description on mobile */
        }

        /* Hide stats on mobile for even more space */
        .category-header .mobile-hidden-stats {
            display: none;
        }

        .filters-section {
            display: none; /* Hide entire filters section on mobile */
        }

        .filters-section form {
            flex-direction: column;
            gap: 1rem;
        }

        .theme-toggle {
            top: 0.5rem;
            right: 0.5rem;
        }
    }

    /* Animations */
    @keyframes fadeIn {
        from {
            opacity: 0;
            transform: translateY(20px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .article-card {
        animation: fadeIn 0.5s ease-out;
    }

    .article-card:nth-child(1) { animation-delay: 0.1s; }
    .article-card:nth-child(2) { animation-delay: 0.2s; }
    .article-card:nth-child(3) { animation-delay: 0.3s; }
    .article-card:nth-child(4) { animation-delay: 0.4s; }

    /* Fix emoji sizing */
    .category-icon svg, .category-icon img {
        width: 2.5rem;
        height: 2.5rem;
        object-fit: contain;
    }

    @media (max-width: 768px) {
        .category-icon svg, .category-icon img {
            width: 1.5rem;
            height: 1.5rem;
        }
    }