:root {
    /* Colors - Light Mode */
    --bg-light: #f5f9ff;
    --bg-white: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.7);
    --bg-card-hover: rgba(255, 255, 255, 0.95);

    /* Primary Brand Colors */
    --primary-gradient: linear-gradient(135deg, #3b82f6, #8b5cf6);
    /* Bright Blue to Purple */
    --accent-glow: rgba(59, 130, 246, 0.15);

    /* Text Colors */
    --text-main: #1a202c;
    --text-muted: #64748b;
    --text-light: #ffffff;

    /* Borders & Shadows */
    --border-light: rgba(226, 232, 240, 0.8);
    --shadow-sm: 0 2px 4px rgba(148, 163, 184, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(148, 163, 184, 0.1), 0 2px 4px -1px rgba(148, 163, 184, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(148, 163, 184, 0.1), 0 4px 6px -2px rgba(148, 163, 184, 0.05);

    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

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

body {
    background-color: var(--bg-light);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    background-image:
        radial-gradient(at 0% 0%, rgba(59, 130, 246, 0.05) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(139, 92, 246, 0.05) 0px, transparent 50%);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    color: #0f172a;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s ease;
}

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.btn {
    padding: 0.75rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    display: inline-block;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

.btn-text {
    color: var(--text-main);
}

.btn-text:hover {
    color: #3b82f6;
}

/* Navbar */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    background: rgba(255, 255, 255, 0.7);
    border-bottom: 1px solid var(--border-light);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: #0f172a;
}

.logo i {
    color: #3b82f6;
}

.logo span {
    background: var(--primary-gradient);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
}

.nav-link:hover {
    color: #3b82f6;
}

/* Hero Section */
.hero {
    padding: 180px 0 100px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 1000px;
    height: 1000px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.08) 0%, transparent 70%);
    z-index: -1;
    pointer-events: none;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 2.5rem;
    letter-spacing: -1.5px;
    line-height: 1.1;
    background: linear-gradient(to right, #0f172a, #334155);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.search-container {
    max-width: 640px;
    margin: 0 auto;
    position: relative;
    box-shadow: var(--shadow-lg);
    border-radius: 16px;
}

.search-input {
    width: 100%;
    padding: 1.4rem 1.5rem 1.4rem 3.8rem;
    border-radius: 16px;
    background: white;
    border: 1px solid transparent;
    color: var(--text-main);
    font-size: 1.15rem;
    outline: none;
    transition: all 0.3s ease;
}

.search-input::placeholder {
    color: #94a3b8;
}

.search-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.search-icon {
    position: absolute;
    left: 1.4rem;
    top: 50%;
    transform: translateY(-50%);
    color: #3b82f6;
    font-size: 1.3rem;
    opacity: 0.8;
}

/* Categories Section */
.categories {
    padding: 50px 0 100px;
}

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

.card {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 24px;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    /* Left aligned for modern look */
    text-align: left;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

/* Light mode hover effect */
.card:hover {
    border-color: #bfdbfe;
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.card-icon {
    width: 64px;
    height: 64px;
    background: #eff6ff;
    border-radius: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1.5rem;
    color: #3b82f6;
    font-size: 1.6rem;
    transition: all 0.4s ease;
}

.card:hover .card-icon {
    background: var(--primary-gradient);
    color: white;
    transform: rotate(-5deg) scale(1.05);
    border-radius: 16px;
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.2);
}

.card h3 {
    font-size: 1.4rem;
    margin-bottom: 0.75rem;
    color: #1e293b;
}

.card p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.6;
}

/* Footer */
footer {
    border-top: 1px solid var(--border-light);
    padding: 80px 0 40px;
    background: white;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-brand p {
    color: var(--text-muted);
    margin-top: 1rem;
    max-width: 300px;
}

.footer-col h4 {
    margin-bottom: 1.5rem;
    color: #0f172a;
    font-size: 1.1rem;
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 0.8rem;
}

.footer-col a {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.footer-col a:hover {
    color: #3b82f6;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-decoration-color: rgba(59, 130, 246, 0.3);
}

.footer-bottom {
    border-top: 1px solid var(--border-light);
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.socials {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #f1f5f9;
    color: #64748b;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: 0.3s ease;
    font-size: 1.2rem;
}

.social-link:hover {
    background: var(--primary-gradient);
    color: white;
    transform: translateY(-3px);
}

.copyright {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero,
.grid,
header {
    animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.grid {
    animation-delay: 0.1s;
}

@media (max-width: 900px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.8rem;
    }

    .grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1.5rem;
    }
}

/* --- Inner Page Layouts --- */

/* Breadcrumbs */
.breadcrumbs {
    padding: 2rem 0 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.breadcrumbs a {
    color: var(--text-muted);
}

.breadcrumbs a:hover {
    color: #3b82f6;
}

.breadcrumbs span {
    margin: 0 0.5rem;
    color: #cbd5e1;
}

/* Page Layout (Sidebar + Content) */
.page-container {
    display: flex;
    gap: 4rem;
    padding-bottom: 6rem;
}

.sidebar {
    width: 280px;
    flex-shrink: 0;
}

.sidebar-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #0f172a;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #f1f5f9;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.sidebar-link {
    color: var(--text-muted);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    transition: 0.2s;
    font-size: 0.95rem;
    font-weight: 500;
}

.sidebar-link:hover,
.sidebar-link.active {
    color: #3b82f6;
    background: #eff6ff;
    padding-left: 1rem;
}

.main-content {
    flex: 1;
}

.article-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.article-item {
    padding: 2rem;
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 16px;
    transition: 0.3s;
    box-shadow: var(--shadow-sm);
}

.article-item:hover {
    box-shadow: var(--shadow-md);
    border-color: #bfdbfe;
    transform: translateY(-2px);
}

.article-item h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: #1e293b;
}

.article-item p {
    font-size: 1rem;
    color: var(--text-muted);
}

/* Article Detail Content */
.article-header {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-light);
}

.article-header h1 {
    font-size: 2.8rem;
    margin-bottom: 1rem;
    color: #0f172a;
    letter-spacing: -1px;
}

.article-meta {
    font-size: 0.95rem;
    color: var(--text-muted);
    display: flex;
    gap: 1rem;
    align-items: center;
}

.article-body {
    color: #334155;
    font-size: 1.1rem;
    line-height: 1.8;
}

.article-body h2 {
    margin: 2.5rem 0 1.25rem;
    color: #0f172a;
    font-size: 1.8rem;
}

.article-body p {
    margin-bottom: 1.5rem;
}

.article-body ol,
.article-body ul {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.article-body li {
    margin-bottom: 0.5rem;
}

.article-body strong {
    color: #0f172a;
    font-weight: 600;
}

/* Download Page Specific */
.download-section {
    padding: 60px 0 100px;
    text-align: center;
}

.download-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

.download-card {
    background: white;
    padding: 3rem 2rem;
    border-radius: 24px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
    transition: 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.download-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: #bfdbfe;
}

.download-icon {
    font-size: 3rem;
    color: #3b82f6;
    margin-bottom: 0.5rem;
}

.download-btn {
    width: 100%;
    padding: 1rem;
    background: #eff6ff;
    color: #3b82f6;
    border-radius: 12px;
    font-weight: 600;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.download-btn:hover {
    background: #3b82f6;
    color: white;
}

.qr-code {
    width: 120px;
    height: 120px;
    background: #eee;
    /* Placeholder for QR */
    margin-top: 1rem;
    border-radius: 12px;
}