/* Research Agora — Minimal CSS */

/* Dark theme (default) */
:root {
    --bg: #1a1a2e;
    --bg-secondary: #16213e;
    --text: #e4e4e7;
    --text-muted: #a1a1aa;
    --border: #3f3f46;
    --primary: #60a5fa;
    --primary-light: #1e3a5f;
    --green: #22c55e;
    --green-light: #14532d;
    --yellow: #eab308;
    --yellow-light: #422006;
    --blue: #60a5fa;
    --blue-light: #1e3a5f;
    --gray: #9ca3af;
    --gray-light: #27272a;
    --purple: #a78bfa;
    --purple-light: #2e1065;
    --orange: #fb923c;
    --orange-light: #431407;
    --red: #f87171;
    --red-light: #450a0a;
    --radius: 8px;
    --shadow: 0 1px 3px rgba(0,0,0,0.3);
    --shadow-hover: 0 4px 12px rgba(0,0,0,0.5);
}

/* Light theme */
[data-theme="light"] {
    --bg: #ffffff;
    --bg-secondary: #f8f9fa;
    --text: #212529;
    --text-muted: #6c757d;
    --border: #dee2e6;
    --primary: #2563eb;
    --primary-light: #dbeafe;
    --green: #16a34a;
    --green-light: #dcfce7;
    --yellow: #ca8a04;
    --yellow-light: #fef9c3;
    --blue: #2563eb;
    --blue-light: #dbeafe;
    --gray: #6b7280;
    --gray-light: #f3f4f6;
    --purple: #7c3aed;
    --purple-light: #ede9fe;
    --orange: #ea580c;
    --orange-light: #fff7ed;
    --red: #dc2626;
    --red-light: #fef2f2;
    --shadow: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-hover: 0 4px 12px rgba(0,0,0,0.15);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    transition: background 0.3s ease, color 0.3s ease;
    padding-top: 60px;
}

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

/* Header */
header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    padding: 2rem 0;
    text-align: center;
    position: relative;
}

.theme-toggle {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s ease, transform 0.2s ease;
    flex-shrink: 0;
}

.theme-toggle:hover {
    transform: scale(1.1);
    background: var(--border);
}

header h1 {
    font-size: 2rem;
    margin-bottom: 0.25rem;
}

.subtitle {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.stats {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

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

.install-banner {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.5rem 1rem;
}

.install-banner code {
    font-size: 0.85rem;
    color: var(--primary);
}

.install-banner button {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 0.25rem 0.75rem;
    cursor: pointer;
    font-size: 0.8rem;
}

.install-banner button:hover { opacity: 0.9; }

/* Layout */
.layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 2rem;
    padding: 2rem 0;
}

@media (max-width: 768px) {
    .layout { grid-template-columns: 1fr; }
    .filters { order: -1; }
}

/* Filters */
.filters h2 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.search-box { margin-bottom: 1rem; }

.search-box input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.9rem;
}

.filters details {
    margin-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.75rem;
}

.filters summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.25rem 0;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding-top: 0.5rem;
}

.filter-group label {
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
}

.reset-btn {
    width: 100%;
    padding: 0.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

.reset-btn:hover { background: var(--border); }

/* Skills Grid */
.results-count {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
    align-content: start;
}

.results-count { grid-column: 1 / -1; }

/* Skill Card */
.skill-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    background: var(--bg);
    box-shadow: var(--shadow);
    transition: box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.skill-card:hover { box-shadow: var(--shadow-hover); }

.skill-card.hidden { display: none; }

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
}

.card-header h3 {
    font-size: 1rem;
    font-weight: 600;
}

.card-description {
    font-size: 0.85rem;
    color: var(--text-muted);
    flex: 1;
}

.card-description p {
    margin: 0;
}

.desc-toggle {
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    padding: 0 0.2rem;
    margin-left: 0.2rem;
}

.desc-toggle:hover {
    text-decoration: underline;
}

.desc-full {
    line-height: 1.5;
}

.desc-short, .desc-full {
    display: block;
}

.desc-short.hidden, .desc-full.hidden {
    display: none;
}

.card-meta {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.card-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border);
}

.install-cmd {
    font-size: 0.75rem;
    color: var(--primary);
    background: var(--primary-light);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 250px;
}

.source-link {
    font-size: 0.8rem;
    color: var(--primary);
    text-decoration: none;
    white-space: nowrap;
}

.source-link:hover { text-decoration: underline; }

/* Badges */
.badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    white-space: nowrap;
}

.badge-plugin { background: var(--purple-light); color: var(--purple); }
.badge-type { background: var(--gray-light); color: var(--gray); }

.badge-formal { background: var(--green-light); color: var(--green); }
.badge-heuristic { background: var(--yellow-light); color: var(--yellow); }
.badge-layered { background: var(--blue-light); color: var(--blue); }
.badge-none { background: var(--gray-light); color: var(--gray); }

.badge-opus { background: var(--orange-light); color: var(--orange); }
.badge-sonnet { background: var(--blue-light); color: var(--blue); }
.badge-haiku { background: var(--green-light); color: var(--green); }

/* Intent Buttons */
.intent-section {
    padding: 1.5rem 0 0;
}

.intent-label {
    text-align: center;
    margin: 0 0 0.6rem;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.intent-buttons {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

.intent-btn {
    padding: 0.6rem 1.25rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.intent-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

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

/* Skill Groups */
.skills-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.skill-group {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-secondary);
    overflow: hidden;
}

.skill-group.hidden { display: none; }

.group-header {
    padding: 1rem 1.25rem;
    cursor: pointer;
    display: grid;
    grid-template-columns: auto auto 1fr;
    grid-template-rows: auto auto;
    align-items: center;
    gap: 0 0.75rem;
}

.group-header::-webkit-details-marker { display: none; }
.skill-group > summary { list-style: none; }
.skill-group > summary::-webkit-details-marker { display: none; }

.group-title {
    font-size: 1.1rem;
    font-weight: 700;
    grid-row: 1;
    grid-column: 1;
    margin: 0;
}

.group-count {
    grid-row: 1;
    grid-column: 2;
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--primary-light);
    color: var(--primary);
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
}

.group-desc {
    grid-row: 2;
    grid-column: 1 / -1;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0.25rem 0 0;
}

.group-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0.75rem;
    padding: 0 1rem 1rem;
}

/* Internal Skills Section */
.internal-section {
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    background: var(--bg-secondary);
}

.internal-section.hidden { display: none; }

.internal-heading {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.internal-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.skill-card-internal {
    border-style: dashed;
    opacity: 0.85;
}

/* Internal Toggle */
.internal-toggle {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}

.internal-toggle label {
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem 0;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.85rem;
}

footer a { color: var(--primary); text-decoration: none; }
footer a:hover { text-decoration: underline; }

.generated { margin-top: 0.5rem; font-size: 0.75rem; }

/* Navigation */
.site-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: var(--bg);
    border-bottom: 2px solid var(--border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    height: 60px;
}

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

.nav-brand {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-logo {
    height: 28px;
    width: 28px;
    border-radius: 50%;
}

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

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

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    transition: all 0.2s;
}

.nav-link:hover {
    color: var(--text);
    background: var(--bg-secondary);
}

.nav-link.active {
    color: var(--primary);
    font-weight: 700;
    background: var(--primary-light);
}

@media (max-width: 768px) {
    .nav-brand {
        font-size: 1rem;
    }

    .nav-links {
        gap: 0.5rem;
    }

    .nav-link {
        font-size: 0.9rem;
        padding: 0.4rem 0.75rem;
    }
}

/* Benchmarks */
.benchmark-section {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.benchmark-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.benchmark-meta { display: flex; gap: 0.5rem; align-items: center; }

.benchmark-tags { display: flex; gap: 0.4rem; flex-wrap: wrap; margin: 0.5rem 0; }

/* Leaderboard Table */
.leaderboard {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: 0.9rem;
}

.leaderboard th, .leaderboard td {
    padding: 0.5rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.leaderboard th {
    background: var(--bg-secondary);
    font-weight: 600;
    font-size: 0.85rem;
}

.leaderboard tr:hover { background: var(--bg-secondary); }

.empty-leaderboard {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    margin: 1rem 0;
}

.relevant-skills {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.5rem 0;
}

.relevant-skills code {
    font-size: 0.85rem;
    color: var(--primary);
    background: var(--primary-light);
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
}

/* Smooth transitions for theme switching */
*, *::before, *::after {
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

/* Documentation Page */
.docs-section {
    margin-bottom: 3rem;
}

.docs-section h2 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border);
}

.docs-section h3 {
    font-size: 1.25rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.docs-section p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

.docs-section ul, .docs-section ol {
    margin-bottom: 1rem;
    padding-left: 2rem;
}

.docs-section li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.docs-section a {
    color: var(--primary);
    text-decoration: none;
}

.docs-section a:hover {
    text-decoration: underline;
}

/* General table styles for docs sections */
.docs-section table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0 1.5rem;
    font-size: 0.9rem;
}

.docs-section th,
.docs-section td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
    line-height: 1.5;
}

.docs-section th {
    background: var(--bg-secondary);
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-muted);
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
}

.docs-section tbody tr:hover {
    background: var(--bg-secondary);
}

.docs-section tbody tr:last-child td {
    border-bottom: none;
}

/* Wrap table in a container for overflow on small screens */
.docs-section table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.platform-guide {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.platform-guide h3 {
    margin-top: 0;
    color: var(--primary);
}

.code-block {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 0.75rem 1rem;
    margin: 0.75rem 0;
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    font-size: 0.85rem;
    overflow-x: auto;
}

.code-block code {
    color: var(--primary);
    background: transparent;
    padding: 0;
}

/* ── Slim onboarding banner (main page) ────────────────────────────── */

.onboarding-banner {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    padding: 0.65rem 0;
}

.onboarding-banner-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    flex-wrap: wrap;
}

.onboarding-banner-inner > span:first-child {
    font-weight: 600;
    color: var(--text);
}

.onboarding-banner-inner a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.onboarding-banner-inner a:hover {
    text-decoration: underline;
}

.onboarding-banner-sep {
    color: var(--text-muted);
}

.onboarding-banner-cta code {
    background: var(--primary-light);
    color: var(--primary);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
}

/* ── Pathway cards (docs page) ─────────────────────────────────────── */

.pathway-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.875rem;
    margin: 1.25rem 0 1.75rem;
}

@media (max-width: 640px) {
    .pathway-cards {
        grid-template-columns: 1fr;
    }
}

.pathway-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-left: 3px solid var(--pathway-accent, var(--primary));
    border-radius: var(--radius);
    padding: 1.125rem 1.25rem;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    box-shadow: var(--shadow);
    transition: box-shadow 0.2s, border-left-color 0.2s, transform 0.15s;
}

.pathway-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.pathway-card-role {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text);
}

.pathway-card-icon {
    font-size: 1.1rem;
    line-height: 1;
}

.pathway-card-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.55;
    margin: 0;
}

.pathway-card-link {
    font-size: 0.78rem;
    color: var(--pathway-accent, var(--primary));
    font-weight: 600;
    margin-top: 0.35rem;
}

.pathway-card--pi   { --pathway-accent: var(--blue); }
.pathway-card--res  { --pathway-accent: var(--green); }
.pathway-card--stu  { --pathway-accent: var(--yellow); }

/* ── Getting Started nav link ───────────────────────────────────────── */

.nav-link-cta {
    background: var(--primary);
    color: #fff !important;
    border-radius: var(--radius);
    font-weight: 700;
}

.nav-link-cta:hover {
    background: var(--primary);
    opacity: 0.88;
    color: #fff !important;
}

/* ── Nav logo ───────────────────────────────────────────────────────── */

.nav-logo {
    height: 38px;
    width: 38px;
    /* Remove border-radius: 50% — spiral extends to corners */
    display: block;
}

.nav-logo-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    /* Dark pill backing makes colored lines visible on both themes */
    background: rgba(30, 30, 50, 0.55);
    flex-shrink: 0;
}

[data-theme="light"] .nav-logo-wrap {
    background: rgba(240, 240, 248, 0.7);
}

/* ── Hero layout ────────────────────────────────────────────────────── */

.hero-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.hero-top-group {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1.5rem;
}

.hero-logo-wrap {
    flex-shrink: 0;
    width: 160px;
    height: 160px;
    border-radius: 20px;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-logo {
    width: 160px;
    height: 160px;
    display: block;
}

.hero-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    text-align: left;
}

.hero-text .stats {
    justify-content: flex-start;
}

/* Mobile: stack logo above text */
@media (max-width: 640px) {
    .hero-top-group {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }

    .hero-logo-wrap,
    .hero-logo {
        width: 120px;
        height: 120px;
    }

    .hero-text {
        align-items: center;
        text-align: center;
    }

    .hero-text .stats {
        justify-content: center;
    }
}
