:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --secondary: #8b5cf6;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-900: #111827;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--gray-900);
    background: var(--gray-50);
}

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

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 80px 20px;
    text-align: center;
}

.hero h1 {
    font-size: 3em;
    margin-bottom: 16px;
    font-weight: 700;
}

.hero .subtitle {
    font-size: 1.25em;
    opacity: 0.95;
}

/* Sections */
section {
    margin: 60px 0;
}

section h2 {
    font-size: 2em;
    margin-bottom: 24px;
    color: var(--gray-900);
}

.intro {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-top: -40px;
    position: relative;
}

.intro p {
    font-size: 1.1em;
    color: var(--gray-600);
}

/* Project Grid */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 24px;
}

.project-card {
    background: white;
    border-radius: 12px;
    padding: 28px;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.15);
    border-color: var(--primary);
}

.project-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.project-status {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.project-status.active {
    background: #d1fae5;
    color: #065f46;
}

.project-status.in-progress {
    background: #fef3c7;
    color: #92400e;
}

.project-status.archived {
    background: var(--gray-200);
    color: var(--gray-600);
}

/* Project Type Badge */
.project-type {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.project-type.literature-review {
    background: #e0e7ff;
    color: #4338ca;
}

.project-type.analysis {
    background: #fef3c7;
    color: #b45309;
}

.project-date {
    font-size: 0.85em;
    color: var(--gray-600);
}

.project-card h3 {
    font-size: 1.4em;
    margin-bottom: 12px;
    color: var(--primary);
    line-height: 1.3;
}

.project-card p {
    color: var(--gray-600);
    margin-bottom: 20px;
    flex-grow: 1;
}

.project-stats {
    display: flex;
    gap: 20px;
    padding: 16px 0;
    border-top: 1px solid var(--gray-200);
    margin-bottom: 12px;
}

.project-stats span {
    font-size: 0.9em;
    color: var(--gray-600);
}

.project-stats strong {
    color: var(--primary);
    font-size: 1.2em;
}

.project-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.project-author {
    font-size: 0.85em;
    color: var(--gray-600);
    font-style: italic;
}

.project-link {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.95em;
}

/* Type Filter */
.type-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.type-btn {
    padding: 12px 24px;
    background: var(--gray-100);
    border: 2px solid transparent;
    border-radius: 24px;
    font-size: 1em;
    font-weight: 600;
    color: var(--gray-700);
    cursor: pointer;
    transition: all 0.3s ease;
}

.type-btn:hover {
    background: var(--gray-200);
    transform: translateY(-2px);
}

.type-btn.active[data-type="all"] {
    background: var(--primary);
    color: white;
    border-color: var(--primary-dark);
}

.type-btn.active[data-type="literature-review"] {
    background: #4338ca;
    color: white;
    border-color: #3730a3;
}

.type-btn.active[data-type="analysis"] {
    background: #d97706;
    color: white;
    border-color: #b45309;
}

/* Category Filter */
.category-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 32px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.filter-btn {
    padding: 10px 20px;
    background: var(--gray-100);
    border: 2px solid transparent;
    border-radius: 24px;
    font-size: 0.9em;
    font-weight: 600;
    color: var(--gray-700);
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background: var(--gray-200);
    transform: translateY(-2px);
}

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

/* Color-coded filter buttons when active */
.filter-btn.active[data-category="Higher Education"] {
    background: #2563eb;
    border-color: #1e40af;
}

.filter-btn.active[data-category="Workforce"] {
    background: #d97706;
    border-color: #92400e;
}

.filter-btn.active[data-category="Inequality"] {
    background: #e11d48;
    border-color: #9f1239;
}

.filter-btn.active[data-category="Community"] {
    background: #059669;
    border-color: #065f46;
}

.filter-btn.active[data-category="Energy & Environment"] {
    background: #16a34a;
    border-color: #166534;
}

.filter-btn.active[data-category="Technology & Data"] {
    background: #4f46e5;
    border-color: #3730a3;
}

.filter-btn.active[data-category="Social Infrastructure"] {
    background: #be185d;
    border-color: #831843;
}

/* Category Tags on Cards */
.project-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.category-tag {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: 600;
    white-space: nowrap;
}

/* Color-coded category tags */
.category-tag[data-category="Higher Education"] {
    background: #dbeafe;
    color: #1e40af;
}

.category-tag[data-category="Workforce"] {
    background: #fef3c7;
    color: #92400e;
}

.category-tag[data-category="Inequality"] {
    background: #fce7f3;
    color: #9f1239;
}

.category-tag[data-category="Community"] {
    background: #d1fae5;
    color: #065f46;
}

.category-tag[data-category="Energy & Environment"] {
    background: #dcfce7;
    color: #166534;
}

.category-tag[data-category="Technology & Data"] {
    background: #e0e7ff;
    color: #3730a3;
}

.category-tag[data-category="Social Infrastructure"] {
    background: #fce7f3;
    color: #831843;
}

/* CTA Section */
.cta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.cta-card {
    background: white;
    padding: 32px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border-left: 4px solid var(--primary);
}

.cta-card h3 {
    color: var(--gray-900);
    margin-bottom: 12px;
}

.cta-card p {
    color: var(--gray-600);
}

.cta-card a {
    color: var(--primary);
    text-decoration: underline;
}

/* Footer */
footer {
    background: var(--gray-900);
    color: white;
    padding: 40px 20px;
    margin-top: 80px;
    text-align: center;
}

footer a {
    color: white;
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2em;
    }
    
    .project-grid {
        grid-template-columns: 1fr;
    }
    
    .project-stats {
        flex-direction: column;
        gap: 8px;
    }
}