/* docs.css — Documentation-specific styles
 * Layers on top of blog-post.css for doc pages.
 * Adds: docs index grid, section navigation, code blocks,
 * keyboard shortcuts, file paths, and prev/next pagination.
 */

/* ==========================================================================
   1. Docs Index Page
   ========================================================================== */

.docs-hero {
    padding: calc(var(--nav-height) + var(--space-4xl)) 0 var(--space-2xl);
}

.docs-hero .container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

@media (min-width: 769px) {
    .docs-hero .container {
        padding: 0 32px;
    }
}

.docs-hero-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 500;
    color: var(--white);
    margin: 0 0 var(--space-md);
}

.docs-hero-subtitle {
    font-size: 18px;
    color: var(--text-muted);
    max-width: 540px;
    line-height: 1.7;
    margin: 0;
}

.docs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px var(--space-4xl);
}

.docs-grid .blog-card-title {
    color: var(--white);
}

.docs-grid .blog-card-read {
    color: var(--text-dim);
}

.docs-grid .blog-card:hover .blog-card-read {
    color: var(--accent);
}

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

/* ==========================================================================
   2. Docs Section Navigation (sidebar)
   ========================================================================== */

.docs-nav {
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid var(--border);
}

.docs-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.docs-nav-link {
    display: block;
    font-size: 13px;
    color: var(--text-dim);
    text-decoration: none;
    padding: 5px 0 5px var(--space-md);
    border-left: 2px solid transparent;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.docs-nav-link:hover {
    color: var(--text-muted);
}

.docs-nav-link.active {
    color: var(--accent);
    border-left-color: var(--accent);
}

/* ==========================================================================
   3. Code Blocks
   ========================================================================== */

.article-body pre {
    background-color: var(--bg-accent);
    border: 1px solid var(--border);
    border-radius: var(--border-radius-sm);
    padding: var(--space-lg);
    overflow-x: auto;
    margin-bottom: 1.5rem;
}

.article-body pre code {
    background: none;
    border: none;
    padding: 0;
    color: var(--text);
    font-size: 13px;
    line-height: 1.7;
}

/* ==========================================================================
   4. Keyboard Shortcuts
   ========================================================================== */

kbd {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text);
    background-color: var(--bg-accent);
    border: 1px solid var(--border-light);
    border-radius: 4px;
    padding: 2px 7px;
    box-shadow: 0 1px 0 var(--border);
    line-height: 1.4;
}

/* ==========================================================================
   5. File Paths
   ========================================================================== */

.file-path {
    font-family: var(--font-mono);
    font-size: 0.9em;
    color: var(--text-muted);
    word-break: break-all;
}

/* ==========================================================================
   6. Prev/Next Pagination
   ========================================================================== */

.docs-pagination {
    display: flex;
    justify-content: space-between;
    padding-top: var(--space-2xl);
    margin-top: var(--space-2xl);
    border-top: 1px solid var(--border);
}

.docs-pagination a {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--text-dim);
    text-decoration: none;
    transition: color 0.15s ease;
}

.docs-pagination a:hover {
    color: var(--accent);
}

.docs-pagination-next {
    margin-left: auto;
}
