/* Blog article page — uses CSS variables from ../style.css */

.blog-nav {
    position: fixed;
    top: 0;
    inset-inline: 0;
    height: 62px;
    background: rgba(9, 9, 15, 0.8);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 36px;
}

.back-home {
    color: var(--accent-light);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.88rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s, gap 0.2s;
}

.back-home:hover {
    color: var(--cyan);
    gap: 10px;
}

.all-posts {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.88rem;
    transition: color 0.2s;
}

.all-posts:hover {
    color: var(--text);
}

.blog-article {
    max-width: 720px;
    margin: 80px auto 60px;
    padding: 0 24px;
}

/* Article header */
.article-header {
    margin-bottom: 44px;
    padding-bottom: 36px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.article-header h1 {
    font-size: clamp(1.8rem, 5vw, 2.4rem);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.03em;
    color: var(--text);
    margin-bottom: 18px;
}

.article-intro {
    font-size: 1.08rem;
    color: var(--text-muted);
    line-height: 1.8;
    margin: 0;
}

/* Article body */
.article-content h2 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text);
    margin-top: 48px;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
    padding-left: 14px;
    border-left: 3px solid var(--accent-light);
    display: block;
}

.article-content h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-top: 32px;
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}

.article-content p {
    line-height: 1.85;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.article-content strong {
    color: var(--text);
    font-weight: 600;
}

/* Code */
.article-content pre {
    background: #0d0d1a;
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: var(--radius-sm);
    padding: 22px 24px;
    overflow-x: auto;
    margin: 22px 0 28px;
    position: relative;
}

.article-content pre code {
    font-family: 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
    font-size: 0.875rem;
    line-height: 1.7;
    color: #c9d1d9;
    background: none;
    padding: 0;
    border-radius: 0;
}

.article-content p code,
.article-content li code {
    background: rgba(99, 102, 241, 0.1);
    color: var(--cyan);
    padding: 2px 8px;
    border-radius: 5px;
    font-size: 0.84rem;
    font-family: 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
    border: 1px solid rgba(99, 102, 241, 0.15);
}

/* Lists */
.article-content ul,
.article-content ol {
    color: var(--text-muted);
    padding-left: 28px;
    margin-bottom: 22px;
}

.article-content li {
    margin-bottom: 9px;
    line-height: 1.78;
    padding-left: 4px;
}

/* Blockquote */
.article-content blockquote {
    border-left: 3px solid var(--accent);
    margin: 28px 0;
    padding: 14px 22px;
    background: rgba(99, 102, 241, 0.06);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-style: italic;
    color: var(--text-muted);
}

.article-content blockquote p { margin: 0; }

/* ─── Blog index / listing ──────────────────────────────────────────────── */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.blog-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 24px 56px rgba(0, 0, 0, 0.45);
    border-color: var(--border-hover);
}

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.blog-card h2 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
    line-height: 1.35;
    margin-bottom: 10px;
}

.blog-card p {
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.65;
    margin-bottom: 20px;
    flex-grow: 1;
}

.blog-card-link {
    color: var(--accent-light);
    font-size: 0.88rem;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 900px) {
    .blog-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
    .blog-nav { padding: 0 18px; }

    .blog-article { padding: 0 18px; }

    .article-header h1 { font-size: 1.6rem; }

    .article-content pre { padding: 16px 18px; }
}
