:root {
    --ink: #0f172a;
    --muted: #64748b;
    --brand: #4f46e5;
    --brand-dark: #4338ca;
    --brand-light: #818cf8;
    --paper: #ffffff;
    --bg: #f6f7fb;
    --border: #e2e8f0;
    --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
    --shadow-lg: 0 25px 50px rgba(15, 23, 42, 0.15);
    --gradient-primary: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #be185d 100%);
    --gradient-secondary: linear-gradient(135deg, #06b6d4 0%, #3b82f6 50%, #8b5cf6 100%);
    --gradient-accent: linear-gradient(135deg, #f59e0b 0%, #ef4444 50%, #ec4899 100%);
}

/* ============ ANIMATIONS ============ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Scroll reveal animation classes - for elements that should animate on scroll */
.reveal {
    opacity: 1;
    transform: translateY(0);
}

.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-on-scroll.active {
    opacity: 1;
    transform: translateY(0);
}

/* Initial page load animations */
.featured-section {
    animation: fadeInUp 0.6s ease-out 0.1s both;
}

.featured-picks-section {
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

.recent-section {
    animation: fadeInUp 0.6s ease-out 0.3s both;
}

.recommended-section {
    animation: fadeInUp 0.6s ease-out 0.4s both;
}

.topics-section {
    animation: fadeInUp 0.6s ease-out 0.5s both;
}

.all-content-section {
    animation: fadeInUp 0.6s ease-out 0.6s both;
}

.cta-section {
    animation: fadeInUp 0.6s ease-out 0.7s both;
}

.reveal-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-left.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }
.stagger-6 { transition-delay: 0.6s; }

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

body {
    font-family: 'Source Serif 4', Georgia, serif;
    color: var(--ink);
    background: var(--bg);
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

.container.wide {
    max-width: 1200px;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(12px);
}

.brand {
    font-family: 'Inter', system-ui, sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--ink);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 16px 24px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 22px;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.95rem;
    color: var(--muted);
}

.nav-links a {
    color: var(--muted);
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--brand);
}

.nav-toggle {
    display: none;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 1rem;
}

.hero {
    padding: 80px 0 50px;
    background: radial-gradient(circle at top left, rgba(79, 70, 229, 0.15), transparent 40%),
                radial-gradient(circle at bottom right, rgba(124, 58, 237, 0.1), transparent 40%),
                radial-gradient(circle at center, rgba(190, 24, 93, 0.05), transparent 50%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(79, 70, 229, 0.08) 0%, transparent 70%);
    animation: float 6s ease-in-out infinite;
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.06) 0%, transparent 70%);
    animation: float 8s ease-in-out infinite reverse;
    pointer-events: none;
}

.hero-content {
    max-width: 720px;
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.8s ease-out;
}

.hero-eyebrow {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--muted);
}

.hero h1 {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 3rem;
    line-height: 1.1;
    margin: 16px 0;
    background: linear-gradient(135deg, var(--ink) 0%, var(--brand) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    color: var(--muted);
    font-size: 1.1rem;
}

.hero-actions {
    margin-top: 24px;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.btn {
    font-family: 'Inter', system-ui, sans-serif;
    padding: 12px 20px;
    border-radius: 999px;
    font-weight: 600;
    border: 1px solid transparent;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn.primary {
    background: var(--brand);
    color: #fff;
    box-shadow: 0 12px 24px rgba(79, 70, 229, 0.25);
}

.btn.primary:hover {
    background: var(--brand-dark);
    transform: translateY(-3px);
    box-shadow: 0 18px 30px rgba(79, 70, 229, 0.35);
}

.btn.ghost {
    border-color: var(--border);
    color: var(--ink);
    background: var(--paper);
}

.btn.ghost:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.1);
    border-color: var(--brand-light);
}

.hero-stats {
    display: flex;
    gap: 32px;
    margin-top: 36px;
    flex-wrap: wrap;
}

.stat {
    display: flex;
    flex-direction: column;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 16px;
    border: 1px solid var(--border);
    backdrop-filter: blur(8px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(79, 70, 229, 0.15);
}

.stat-number {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
}

.stat-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--muted);
}

main {
    padding: 30px 0 80px;
}

section {
    margin-top: 48px;
}

.section-head h2 {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 1.8rem;
    margin-bottom: 6px;
}

.section-head p {
    color: var(--muted);
    margin-bottom: 20px;
}

.featured-section {
    margin-top: 48px;
}

.featured-card {
    background: var(--paper);
    border-radius: 24px;
    padding: 40px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.featured-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
}

.featured-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 30px 60px rgba(15, 23, 42, 0.18);
}

.featured-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: 'Inter', system-ui, sans-serif;
    background: rgba(79, 70, 229, 0.1);
    color: var(--brand);
    border-radius: 999px;
    padding: 6px 12px;
    font-weight: 600;
    font-size: 0.75rem;
    margin-bottom: 16px;
}

.featured-content h2 {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 2rem;
    margin-bottom: 12px;
}

.featured-category {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.85rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.featured-content p {
    color: var(--muted);
    margin-bottom: 16px;
}

.featured-meta {
    color: var(--muted);
    font-size: 0.9rem;
}

.featured-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
    font-family: 'Inter', system-ui, sans-serif;
    color: var(--brand);
    font-weight: 600;
    padding: 10px 20px;
    background: rgba(79, 70, 229, 0.1);
    border-radius: 999px;
    transition: all 0.3s ease;
}

.featured-cta:hover {
    background: var(--brand);
    color: #fff;
    transform: translateX(4px);
}

/* ============ FEATURED GRID (3-4 items) ============ */
.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.featured-item {
    background: var(--paper);
    border-radius: 20px;
    padding: 28px;
    border: 1px solid var(--border);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    display: flex;
    flex-direction: column;
}

.featured-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.featured-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.12);
}

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

.featured-item .item-number {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 32px;
    height: 32px;
    background: rgba(79, 70, 229, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', system-ui, sans-serif;
    font-weight: 700;
    color: var(--brand);
    font-size: 0.9rem;
}

.featured-item h4 {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 1.2rem;
    margin-bottom: 10px;
    padding-right: 40px;
}

.featured-item p {
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.6;
    flex-grow: 1;
}

.featured-item .item-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.85rem;
    font-family: 'Inter', system-ui, sans-serif;
}

.recent-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.recent-card {
    background: var(--paper);
    border-radius: 18px;
    padding: 24px;
    border: 1px solid var(--border);
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
    position: relative;
    overflow: hidden;
}

.recent-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-secondary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.35s ease;
}

.recent-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.14);
    border-color: var(--brand-light);
}

.recent-card:hover::after {
    transform: scaleX(1);
}

.recent-meta {
    display: flex;
    justify-content: space-between;
    color: var(--muted);
    font-size: 0.85rem;
    margin-bottom: 10px;
    font-family: 'Inter', system-ui, sans-serif;
}

.recent-card h4 {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 1.15rem;
    margin-bottom: 8px;
}

.recent-card p {
    color: var(--muted);
    font-size: 0.95rem;
}

.recommended-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
}

.recommended-card {
    background: linear-gradient(145deg, #4f46e5 0%, #7c3aed 50%, #be185d 100%);
    color: #ffffff !important;
    border-radius: 24px;
    padding: 32px 28px;
    position: relative;
    overflow: hidden;
    min-height: 280px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 20px 40px rgba(79, 70, 229, 0.25);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-decoration: none;
}

.recommended-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 30px 60px rgba(79, 70, 229, 0.35);
    color: #ffffff !important;
}

.recommended-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    z-index: 0;
}

.recommended-content {
    position: relative;
    z-index: 1;
    flex-grow: 1;
    padding-top: 32px;
}

.recommended-card h4 {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.3;
    color: #ffffff !important;
}

.recommended-card p {
    color: rgba(255, 255, 255, 0.95) !important;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

.recommended-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    color: #ffffff !important;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
}

.recommended-footer {
    position: relative;
    z-index: 1;
    margin-top: auto;
}

.recommended-category {
    display: block;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8) !important;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.topics-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.topic-chip {
    border-radius: 999px;
    padding: 10px 20px;
    border: 1px solid var(--border);
    background: var(--paper);
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.9rem;
    color: var(--muted);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.topic-chip::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.topic-chip:hover {
    color: #fff;
    border-color: var(--brand);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(79, 70, 229, 0.2);
}

.topic-chip:hover::before {
    opacity: 1;
}

.topic-chip.active {
    background: var(--brand);
    color: #fff;
    border-color: var(--brand);
    box-shadow: 0 8px 16px rgba(79, 70, 229, 0.25);
}

/* ============ FILTER SECTION ============ */
.filter-section {
    margin-top: 48px;
    padding: 24px;
    background: var(--paper);
    border-radius: 20px;
    border: 1px solid var(--border);
    box-shadow: 0 8px 16px rgba(15, 23, 42, 0.06);
}

.filter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 20px;
}

.filter-header h3 {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 1.2rem;
    color: var(--ink);
}

.filter-controls {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--paper);
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.85rem;
    color: var(--muted);
    cursor: pointer;
    transition: all 0.25s ease;
}

.filter-btn:hover {
    border-color: var(--brand-light);
    color: var(--brand);
}

.filter-btn.active {
    background: var(--brand);
    color: #fff;
    border-color: var(--brand);
}

.view-toggle {
    display: flex;
    gap: 8px;
}

.view-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--paper);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
    color: var(--muted);
}

.view-btn:hover {
    border-color: var(--brand-light);
    color: var(--brand);
}

.view-btn.active {
    background: var(--brand);
    color: #fff;
    border-color: var(--brand);
}

/* ============ ALL ARTICLES GRID ============ */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.articles-grid.list-view {
    grid-template-columns: 1fr;
}

.article-card {
    background: var(--paper);
    border-radius: 16px;
    padding: 24px;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    text-decoration: none;
    display: block;
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.1);
    border-color: var(--brand-light);
}

.article-card .article-category {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(79, 70, 229, 0.1);
    color: var(--brand);
    border-radius: 999px;
    font-size: 0.75rem;
    font-family: 'Inter', system-ui, sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.article-card h4 {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: var(--ink);
}

.article-card p {
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 12px;
}

.article-card .article-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--muted);
    font-size: 0.8rem;
    font-family: 'Inter', system-ui, sans-serif;
}

/* List view specific styles */
.articles-grid.list-view .article-card {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 20px 24px;
}

.articles-grid.list-view .article-card .article-category {
    margin-bottom: 0;
    white-space: nowrap;
}

.articles-grid.list-view .article-card h4 {
    flex-grow: 1;
    margin-bottom: 0;
}

.articles-grid.list-view .article-card p {
    display: none;
}

.articles-grid.list-view .article-card .article-meta {
    white-space: nowrap;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.category-card {
    background: var(--paper);
    border-radius: 20px;
    border: 1px solid var(--border);
    overflow: hidden;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
    transition: all 0.35s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.12);
    border-color: var(--brand-light);
}

.category-header {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.08), rgba(67, 56, 202, 0.08));
    padding: 20px 24px;
    display: flex;
    gap: 16px;
    align-items: flex-start;
    font-family: 'Inter', system-ui, sans-serif;
}

.category-header h3 {
    margin-bottom: 4px;
}

.category-header p {
    color: var(--muted);
    font-size: 0.9rem;
}

.file-list {
    list-style: none;
    padding: 16px 20px 24px;
}

.file-list li + li {
    margin-top: 12px;
}

.file-list a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #f8fafc;
    color: var(--ink);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.file-list a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--brand);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.file-list a:hover {
    transform: translateX(6px);
    background: #eef2ff;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.1);
}

.file-list a:hover::before {
    transform: scaleY(1);
}

.file-icon {
    font-size: 1.1rem;
}

.cta-section {
    margin-top: 64px;
}

.cta-card {
    background: linear-gradient(135deg, var(--ink) 0%, #1e293b 100%);
    border-radius: 24px;
    padding: 40px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.cta-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(79, 70, 229, 0.3) 0%, transparent 70%);
    animation: float 8s ease-in-out infinite;
}

.cta-card::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: 10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.2) 0%, transparent 70%);
    animation: float 6s ease-in-out infinite reverse;
}

.cta-card > * {
    position: relative;
    z-index: 1;
}

.cta-card h2 {
    font-family: 'Inter', system-ui, sans-serif;
    margin-bottom: 8px;
    color: #fff;
}

.cta-card p {
    color: rgba(255, 255, 255, 0.8);
}

.cta-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.cta-actions .btn.primary {
    background: #fff;
    color: var(--ink);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.cta-actions .btn.primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
}

.cta-actions .btn.ghost {
    border-color: rgba(255, 255, 255, 0.3);
    color: #fff;
    background: transparent;
}

.cta-actions .btn.ghost:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

.footer {
    background: linear-gradient(135deg, var(--ink) 0%, #1e293b 100%);
    color: #fff;
    padding: 80px 0 40px;
    margin-top: 80px;
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
}

.footer-content {
    text-align: center;
    position: relative;
    z-index: 1;
}

.footer h3 {
    font-family: 'Inter', system-ui, sans-serif;
    margin-bottom: 10px;
}

.footer p {
    color: rgba(255, 255, 255, 0.7);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin: 24px 0;
}

.footer-links a {
    color: #fff;
    opacity: 0.8;
    font-family: 'Inter', system-ui, sans-serif;
    padding: 8px 16px;
    border-radius: 999px;
    transition: all 0.3s ease;
}

.footer-links a:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.1);
}

.copyright {
    margin-top: 20px;
    font-size: 0.85rem;
    opacity: 0.6;
}

/* Large screens */
@media (min-width: 1400px) {
    .container {
        max-width: 1300px;
    }
    
    .hero-content {
        max-width: 800px;
    }
    
    .hero h1 {
        font-size: 3.5rem;
    }
}

/* Desktop */
@media (max-width: 1200px) {
    .recent-grid {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    }
    
    .categories-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

/* Tablet landscape */
@media (max-width: 1024px) {
    .container {
        padding: 0 20px;
    }
    
    .featured-card {
        padding: 32px;
        gap: 24px;
    }
    
    .recommended-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

/* Tablet portrait */
@media (max-width: 900px) {
    .featured-card {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .cta-card {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }
    
    .hero h1 {
        font-size: 2.6rem;
    }
    
    .recommended-grid {
        grid-template-columns: 1fr;
    }
    
    .recent-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    }
}

/* Mobile */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }
    
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 64px;
        right: 16px;
        background: var(--paper);
        padding: 16px;
        border: 1px solid var(--border);
        border-radius: 12px;
        box-shadow: var(--shadow);
        min-width: 160px;
    }

    body.nav-open .nav-links {
        display: flex;
    }

    .nav-toggle {
        display: inline-flex;
    }

    .hero {
        padding: 60px 0 40px;
    }
    
    .hero h1 {
        font-size: 2.3rem;
        line-height: 1.15;
    }
    
    .hero p {
        font-size: 1.05rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: 16px;
        margin-top: 28px;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .btn {
        text-align: center;
    }
    
    .featured-card {
        padding: 24px;
    }
    
    .recent-grid {
        grid-template-columns: 1fr;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
    }
    
    .topics-grid {
        gap: 8px;
    }
    
    .topic-chip {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
    
    .section-head h2 {
        font-size: 1.6rem;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }
    
    .site-header .container {
        padding: 12px;
    }
    
    .hero {
        padding: 40px 0 30px;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero-eyebrow {
        font-size: 0.8rem;
    }
    
    .featured-card {
        padding: 20px;
    }
    
    .recommended-card {
        padding: 24px 20px;
        min-height: 240px;
    }
    
    .recent-card {
        padding: 20px;
    }
    
    .category-header {
        padding: 16px 20px;
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
    
    .file-list {
        padding: 12px 16px 20px;
    }
    
    .cta-card {
        padding: 24px;
    }
    
    .footer {
        padding: 40px 0;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 12px;
    }
    
    .featured-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
    }
    
    .articles-grid.list-view .article-card {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .articles-grid.list-view .article-card h4 {
        margin-bottom: 8px;
    }
}

/* ============ ALL CONTENT SECTION ENHANCED ============ */
.all-content-section {
    margin-top: 64px;
}

.all-content-section > h2 {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 2rem;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.all-content-section > h2 .section-icon {
    width: 48px;
    height: 48px;
    background: rgba(79, 70, 229, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============ SEARCH BAR ============ */
.search-container {
    margin-bottom: 32px;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 16px 24px 16px 52px;
    border: 2px solid var(--border);
    border-radius: 16px;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 1rem;
    background: var(--paper);
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 8px 24px rgba(79, 70, 229, 0.15);
}

.search-input::placeholder {
    color: var(--muted);
}

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

/* ============ BACK TO TOP BUTTON ============ */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--brand);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(79, 70, 229, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(79, 70, 229, 0.4);
}

/* ============ LOADING SKELETON ============ */
.skeleton {
    background: linear-gradient(90deg, var(--border) 25%, #f1f5f9 50%, var(--border) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}

/* ============ COUNT BADGE ============ */
.count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 8px;
    background: rgba(79, 70, 229, 0.1);
    color: var(--brand);
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 8px;
}

/* ============ SMOOTH SCROLL BEHAVIOR ============ */
html {
    scroll-behavior: smooth;
}

/* ============ HEADER SHRINK ON SCROLL ============ */
.site-header.scrolled {
    padding: 8px 0;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.1);
}

/* ============ READING PROGRESS BAR ============ */
.reading-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: var(--gradient-primary);
    z-index: 10000;
    transition: width 0.1s ease;
}

/* ============ NAV LINK ACTIVE STATE ============ */
.nav-links a.active {
    color: var(--brand);
    font-weight: 600;
}

/* ============ ARTICLE CARD ANIMATIONS ============ */
.article-card,
.recent-card,
.category-card,
.recommended-card,
.featured-item {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

.article-card:nth-child(1),
.recent-card:nth-child(1),
.category-card:nth-child(1),
.recommended-card:nth-child(1),
.featured-item:nth-child(1) { animation-delay: 0.1s; }

.article-card:nth-child(2),
.recent-card:nth-child(2),
.category-card:nth-child(2),
.recommended-card:nth-child(2),
.featured-item:nth-child(2) { animation-delay: 0.2s; }

.article-card:nth-child(3),
.recent-card:nth-child(3),
.category-card:nth-child(3),
.recommended-card:nth-child(3),
.featured-item:nth-child(3) { animation-delay: 0.3s; }

.article-card:nth-child(4),
.recent-card:nth-child(4),
.category-card:nth-child(4),
.recommended-card:nth-child(4),
.featured-item:nth-child(4) { animation-delay: 0.4s; }

.article-card:nth-child(5),
.recent-card:nth-child(5),
.category-card:nth-child(5) { animation-delay: 0.5s; }

.article-card:nth-child(6),
.recent-card:nth-child(6) { animation-delay: 0.6s; }

/* ============ REDUCE MOTION ============ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}
