:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --secondary: #64748b;
    --bg-surface: #ffffff;
    --bg-main: #f8fafc;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --gradient-1: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    --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);
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

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

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
    -webkit-font-smoothing: antialiased;
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.1;
}

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

/* Header/Nav */
.navbar-sticky {
    position: sticky;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.navbar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo span {
    color: var(--primary);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 16px;
}

.nav-btn-icon {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.2s;
}

.nav-btn-icon:hover {
    background: #f1f5f9;
    color: var(--text-main);
}

.nav-btn-primary {
    background: #0f172a;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
}

.nav-btn-primary:hover {
    background: #334155;
}

.lang-selector {
    padding: 6px 12px;
    background: #f1f5f9;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: not-allowed;
    opacity: 0.7;
}


/* Button Styles */
.btn-primary {
    background-color: var(--primary);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s, transform 0.1s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid transparent;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-outline {
    background: #fff;
    color: #0f172a;
    border: 1px solid #e2e8f0;
}

.btn-outline:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

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

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 200%;
    /* Wider gradient for safety */
    height: 100%;
    background: radial-gradient(circle at center, rgba(37, 99, 235, 0.08) 0%, transparent 70%);
    z-index: -1;
    pointer-events: none;
}

.badge {
    display: inline-block;
    padding: 6px 16px;
    background: #eff6ff;
    color: var(--primary);
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 24px;
    border: 1px solid #dbeafe;
}

.hero-title {
    font-size: 4rem;
    letter-spacing: -0.03em;
    margin-bottom: 24px;
    background: linear-gradient(to right, #1e293b, #334155);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    line-height: 1.1;
}

.hero-title span {
    color: var(--primary);
    background: none;
    -webkit-text-fill-color: initial;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 40px;
    padding: 0 10px;
}

.hero-actions {
    margin-top: 40px;
    display: flex;
    gap: 15px;
    justify-content: center;
}

/* Code Preview */
.code-window {
    background: #1e293b;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    max-width: 700px;
    margin: 0 auto;
    text-align: left;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.window-header {
    background: rgba(255, 255, 255, 0.05);
    padding: 12px 16px;
    display: flex;
    gap: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red {
    background: #ef4444;
}

.dot.yellow {
    background: #f59e0b;
}

.dot.green {
    background: #10b981;
}

.code-content {
    padding: 24px;
    font-family: 'Fira Code', monospace;
    font-size: 0.95rem;
    color: #e2e8f0;
    line-height: 1.6;
    overflow-x: auto;
    white-space: pre;
}

/* Code tokens */
.token-tag {
    color: #f472b6;
}

.token-attr {
    color: #94a3b8;
}

.token-str {
    color: #a5f3fc;
}

.token-comment {
    color: #64748b;
    font-style: italic;
}

/* Features */
.features-section {
    padding: 80px 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin-top: 40px;
}

.feature-box {
    background: var(--bg-surface);
    padding: 32px;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid #f1f5f9;
    transition: transform 0.2s, box-shadow 0.2s;
    height: 100%;
}

.feature-box:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    width: 48px;
    height: 48px;
    background: #eff6ff;
    color: var(--primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 20px;
}

.feature-box h3 {
    font-size: 1.25rem;
    margin-bottom: 12px;
}

.feature-box p {
    color: var(--text-muted);
}

/* Agent List */
.agent-section {
    padding: 100px 0;
    text-align: center;
    background: #f8fafc;
}

.agent-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-top: 40px;
    text-align: left;
}

.agent-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
    transition: all 0.2s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

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

.agent-name {
    font-weight: 700;
    font-size: 1rem;
    color: #1e293b;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.agent-category {
    font-size: 0.70rem;
    color: #64748b;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.agent-meta {
    font-size: 0.8rem;
    color: #475569;
    background: #f8fafc;
    padding: 6px;
    border-radius: 4px;
    margin-top: auto;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: 'Fira Code', monospace;
}

/* Documentation */
.doc-section {
    margin-top: 0;
}

.docs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

/* Footer */
footer {
    border-top: 1px solid #e2e8f0;
    padding: 60px 0;
    text-align: center;
    color: var(--text-muted);
}

/* Sponsors & Developers */
.sd-section {
    padding: 60px 0;
    text-align: center;
    background: #f8fafc;
    border-top: 1px solid #f1f5f9;
}

.sd-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 32px;
}

.sd-card {
    text-decoration: none;
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    width: 180px;
    transition: all 0.2s ease;
}

.sd-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    border-color: var(--primary);
}

.sd-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    background: #f1f5f9;
    border: 3px solid #f8fafc;
}

.sd-name {
    font-weight: 700;
    font-size: 0.9rem;
    text-align: center;
}

.sd-role {
    font-size: 0.75rem;
    color: var(--primary);
    background: #eff6ff;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 600;
}


/* =========================================
   MOBILE RESPONSIVE QUERIES
   ========================================= */

/* Tablet & Mobile Navigation */
@media (max-width: 900px) {
    .navbar-content {
        padding: 16px 24px;
    }

    .nav-links {
        gap: 8px;
    }
}

/* Small Tablet & Mobile */
@media (max-width: 768px) {
    .container {
        padding: 0 30px;
        /* Safe padding as requested */
    }

    /* Navbar: Minimal layout */
    .navbar-content {
        padding: 20px 30px;
    }

    .logo {
        font-size: 1.35rem;
    }

    /* Hide secondary nav items */
    .nav-btn-icon,
    .nav-btn-primary {
        display: none !important;
    }

    .lang-selector {
        padding: 8px 12px;
        margin-left: auto;
    }

    /* Hero Section */
    .hero {
        padding: 60px 0 80px;
    }

    .hero-title {
        font-size: 2.5rem;
        line-height: 1.2;
        margin-bottom: 20px;
    }

    .hero-subtitle {
        font-size: 1.1rem;
        margin-bottom: 30px;
    }

    /* Stack Hero Buttons */
    .hero-actions {
        flex-direction: column;
        gap: 12px;
    }

    .btn-primary {
        width: 100%;
        justify-content: center;
    }

    /* Code Window */
    .code-window {
        margin: 0;
        border-radius: 8px;
    }

    .code-content {
        padding: 16px;
        font-size: 0.8rem;
        white-space: pre-wrap;
        /* Wrap long lines on mobile */
        word-break: break-all;
    }

    /* Features: Stack vertically */
    .features-grid {
        grid-template-columns: 1fr;
        gap: 24px;
        margin-top: 30px;
    }

    .features-section {
        padding: 60px 0;
    }

    .feature-box {
        text-align: left;
        padding: 24px;
    }

    /* Documentation: Stack vertically */
    .docs-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .docs-container {
        padding: 24px !important;
    }

    #doc-title {
        font-size: 1.75rem !important;
    }

    /* Footer */
    footer {
        padding: 40px 0;
    }
}

/* Agent Grid Responsiveness */
@media (max-width: 1200px) {
    .agent-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 900px) {
    .agent-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .agent-section {
        padding: 60px 0;
    }
}

@media (max-width: 600px) {
    .agent-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Sponsors: 2 per row */
    .sd-grid {
        gap: 12px;
    }

    .sd-card {
        width: calc(50% - 6px);
        padding: 16px;
    }
}

@media (max-width: 400px) {
    .agent-grid {
        grid-template-columns: 1fr;
    }
}