:root {
    /* Color Palette */
    --bg-color: #ffffff;
    --card-bg: #ffffff;
    --text-primary: #0a0a0a;
    --text-secondary: #525252;
    --accent-color: #e50913; /* specified pure red */
    --accent-hover: #b8070f;
    --border-color: #e5e5e5;
    
    /* Tag Colors */
    --tag-bg: rgba(229, 9, 19, 0.1);
    --tag-text: #e50913;

    /* Geometry */
    --radius-sm: 0.5rem;
    --radius-md: 1rem;
    --radius-lg: 1.5rem;
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    height: 60px;
    background-color: var(--accent-color);
    color: white;
}

.navbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.nav-brand {
    font-weight: 700;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-link {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    transition: color 0.2s;
}

.nav-link:hover, .nav-link.active {
    color: white;
}

/* Layout */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Hero Section */
.header {
    background-color: var(--bg-color);
    color: var(--text-primary);
    text-align: center;
    padding: 3.5rem 1.5rem 4rem;
    margin-top: 60px; /* offset for fixed navbar */
    margin-bottom: 3rem;
    border-bottom: 1px solid var(--border-color);
}

.hero-container {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.search-container {
    max-width: 500px;
    margin: 0 auto;
    position: relative;
}

#searchInput {
    width: 100%;
    padding: 1.25rem 2rem;
    font-size: 1.1rem;
    font-family: inherit;
    background: #ffffff;
    border: 1px solid #d4d4d4;
    border-radius: 50px;
    color: var(--text-primary);
    outline: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
}

#searchInput::placeholder {
    color: #a3a3a3;
}

#searchInput:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 4px rgba(229, 9, 19, 0.2);
}

/* Main Content */
.main-content {
    flex: 1;
    padding-bottom: 4rem;
}

.loading {
    text-align: center;
    font-size: 1.2rem;
    color: var(--text-secondary);
    padding: 3rem;
}

.hidden {
    display: none !important;
}

/* Filters */
.filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
}

.filter-btn {
    background: white;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.filter-btn:hover {
    border-color: #d4d4d4;
    color: var(--text-primary);
}

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

/* Grid Layout */
.docs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

/* Card Design */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
    color: inherit;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    border-color: #d4d4d4;
}

.card-category {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent-hover);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-category::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-color);
}

.card-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.card-desc {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 1.5rem;
    flex: 1; /* Pushes tags to bottom */
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: auto;
}

.tag {
    background: var(--tag-bg);
    color: var(--tag-text);
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 4rem;
    background: rgba(0, 0, 0, 0.02);
    border-radius: var(--radius-lg);
    border: 1px dashed var(--border-color);
    color: var(--text-secondary);
    font-size: 1.2rem;
}

/* Clean Footer */
.footer {
    border-top: 1px solid var(--border-color);
    padding: 2.5rem 0;
    margin-top: 4rem;
    color: var(--text-secondary);
    background-color: #ffffff;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-content p {
    margin: 0;
    font-size: 0.95rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--accent-color);
}

/* Responsive */
@media (max-width: 768px) {
    .logo {
        font-size: 2.5rem;
    }
    
    .subtitle {
        font-size: 1.1rem;
    }
    
    .header {
        padding: 3rem 0 2rem;
    }
    
    .docs-grid {
        grid-template-columns: 1fr;
    }
}
