/* ===== Blog 专属样式（扩展 theme.css + common.css）===== */

/* 阅读进度条 */
.read-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    z-index: 200;
    transition: width 0.1s ease;
}

/* ===== Hero ===== */
.blog-hero {
    position: relative;
    padding: 100px 0 50px;
    background: var(--bg-dark);
    color: var(--fg-light);
    overflow: hidden;
}

.blog-hero-bg {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(0, 82, 255, 0.15), transparent 50%),
        radial-gradient(circle at 80% 30%, rgba(77, 124, 255, 0.1), transparent 50%);
}

.blog-hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
    background-size: 32px 32px;
}

.blog-hero .container {
    position: relative;
    text-align: center;
}

.blog-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--accent-2);
    background: rgba(0, 82, 255, 0.12);
    border: 1px solid rgba(0, 82, 255, 0.3);
    padding: 6px 16px;
    border-radius: 100px;
    margin-bottom: 20px;
}

.blog-hero-title {
    font-family: var(--font-display);
    font-size: 38px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 14px;
}

.blog-hero-subtitle {
    font-size: 14px;
    color: var(--muted-fg-light);
    max-width: 560px;
    margin: 0 auto 28px;
    line-height: 1.7;
}

.blog-hero-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.blog-stat-value {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 800;
    color: var(--accent-2);
}

.blog-stat-label {
    font-size: 12px;
    color: var(--muted-fg-light);
    margin-top: 2px;
}

/* ===== 栏目筛选 ===== */
.category-bar {
    position: sticky;
    top: 60px;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
}

.category-list {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

.category-item {
    font-size: 12px;
    font-weight: 600;
    color: var(--muted-fg);
    background: transparent;
    border: 1px solid var(--border);
    padding: 5px 12px;
    border-radius: 100px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.category-item:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.category-item.active {
    background: var(--accent);
    color: var(--accent-fg);
    border-color: var(--accent);
    box-shadow: var(--shadow-accent);
}

.category-count {
    font-size: 11px;
    opacity: 0.7;
    margin-left: 4px;
}

/* ===== 特色文章 ===== */
.featured-post {
    padding: 40px 0 20px;
}

.featured-card {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 0;
    background: var(--card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.featured-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.featured-card-content {
    padding: 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.featured-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 12px;
}

.featured-title {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 10px;
}

.featured-excerpt {
    font-size: 13px;
    color: var(--muted-fg);
    line-height: 1.7;
    margin-bottom: 16px;
}

.featured-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: var(--muted-fg);
    margin-top: auto;
}

.featured-visual {
    background: linear-gradient(135deg, #0F172A, #1E3A5F);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    min-height: 240px;
}

.featured-visual-code {
    font-family: var(--font-mono);
    font-size: 12px;
    color: #93C5FD;
    line-height: 1.8;
    padding: 24px;
    white-space: pre;
    overflow: hidden;
}

/* ===== 文章列表 ===== */
.posts-section {
    padding: 30px 0 50px;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.post-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.post-card-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-card-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    color: var(--accent);
    background: rgba(0, 82, 255, 0.08);
    padding: 3px 10px;
    border-radius: 100px;
    margin-bottom: 10px;
    align-self: flex-start;
}

.post-card-title {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 8px;
}

.post-card-excerpt {
    font-size: 12px;
    color: var(--muted-fg);
    line-height: 1.6;
    margin-bottom: 12px;
    flex: 1;
}

.post-card-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 11px;
    color: var(--muted-fg);
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.post-card-meta .dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--muted-fg);
}

/* ===== 栏目标题 ===== */
.category-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border);
}

.category-section-title {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 10px;
}

.category-section-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(0, 82, 255, 0.1);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.category-section-more {
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
}

.category-section-more:hover {
    text-decoration: underline;
}

/* ===== CTA 下载引导 ===== */
.blog-cta {
    background: var(--bg-dark);
    color: var(--fg-light);
    padding: 50px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.blog-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(0, 82, 255, 0.12) 1px, transparent 1px);
    background-size: 28px 28px;
}

.blog-cta .container {
    position: relative;
}

.blog-cta-title {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 10px;
}

.blog-cta-desc {
    font-size: 13px;
    color: var(--muted-fg-light);
    margin-bottom: 24px;
}

/* ===== 文章详情页 ===== */
.article-layout {
    display: grid;
    grid-template-columns: 1fr 240px;
    gap: 40px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 30px 24px 60px;
}

.article-main {
    min-width: 0;
}

.article-header {
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.article-category {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 12px;
}

.article-title {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.01em;
    margin-bottom: 14px;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 12px;
    color: var(--muted-fg);
    flex-wrap: wrap;
}

.article-meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* 文章正文排版 */
.article-body {
    font-size: 14px;
    line-height: 1.8;
    color: #1E293B;
}

.article-body h2 {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 800;
    margin: 32px 0 14px;
    padding-left: 12px;
    border-left: 4px solid var(--accent);
}

.article-body h3 {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
    margin: 24px 0 10px;
}

.article-body p {
    margin-bottom: 14px;
}

.article-body ul,
.article-body ol {
    margin: 10px 0 14px;
    padding-left: 22px;
}

.article-body li {
    margin-bottom: 6px;
    line-height: 1.7;
}

.article-body blockquote {
    border-left: 4px solid var(--accent);
    background: rgba(0, 82, 255, 0.04);
    padding: 12px 16px;
    margin: 16px 0;
    border-radius: 0 8px 8px 0;
    font-size: 13px;
    color: #334155;
}

.article-body blockquote p {
    margin-bottom: 0;
}

/* 代码块 */
.article-body pre {
    background: #0F172A;
    color: #E2E8F0;
    border-radius: var(--radius);
    padding: 16px 18px;
    overflow-x: auto;
    margin: 16px 0;
    font-family: var(--font-mono);
    font-size: 12.5px;
    line-height: 1.7;
}

.article-body pre code {
    font-family: inherit;
    background: none;
    padding: 0;
    color: inherit;
}

.article-body code {
    font-family: var(--font-mono);
    font-size: 12.5px;
    background: rgba(0, 82, 255, 0.08);
    color: var(--accent);
    padding: 2px 6px;
    border-radius: 4px;
}

.article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: 13px;
}

.article-body th,
.article-body td {
    border: 1px solid var(--border);
    padding: 8px 12px;
    text-align: left;
}

.article-body th {
    background: rgba(0, 82, 255, 0.06);
    font-weight: 700;
}

.article-body img {
    border-radius: var(--radius);
    margin: 16px 0;
    box-shadow: var(--shadow-md);
}

/* 提示框 */
.tip-box {
    border-radius: var(--radius);
    padding: 12px 16px;
    margin: 16px 0;
    font-size: 13px;
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.tip-box-tip {
    background: rgba(0, 82, 255, 0.06);
    border: 1px solid rgba(0, 82, 255, 0.2);
}

.tip-box-warn {
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.tip-box-icon {
    font-size: 16px;
    flex-shrink: 0;
}

/* 文章底部 CTA */
.article-cta {
    margin: 36px 0 20px;
    padding: 24px;
    background: linear-gradient(135deg, rgba(0, 82, 255, 0.06), rgba(77, 124, 255, 0.04));
    border: 1px solid rgba(0, 82, 255, 0.15);
    border-radius: var(--radius-lg);
    text-align: center;
}

.article-cta-title {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 6px;
}

.article-cta-desc {
    font-size: 12px;
    color: var(--muted-fg);
    margin-bottom: 14px;
}

/* ===== 侧边栏 TOC ===== */
.article-sidebar {
    position: sticky;
    top: 90px;
    align-self: start;
    max-height: calc(100vh - 110px);
    overflow-y: auto;
}

.toc {
    padding: 16px 0;
}

.toc-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted-fg);
    margin-bottom: 10px;
    padding-left: 12px;
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
    border-left: 2px solid var(--border);
}

.toc-item {
    margin: 0;
}

.toc-link {
    display: block;
    font-size: 12px;
    color: var(--muted-fg);
    padding: 5px 12px;
    border-left: 2px solid transparent;
    margin-left: -2px;
    transition: all 0.15s ease;
    line-height: 1.5;
}

.toc-link:hover {
    color: var(--accent);
}

.toc-link.active {
    color: var(--accent);
    border-left-color: var(--accent);
    font-weight: 600;
}

/* 相关文章 */
.related-posts {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.related-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted-fg);
    margin-bottom: 10px;
}

.related-item {
    display: block;
    font-size: 12px;
    color: #334155;
    padding: 6px 0;
    line-height: 1.5;
}

.related-item:hover {
    color: var(--accent);
}

/* ===== 响应式 ===== */
@media (max-width: 900px) {
    .featured-card {
        grid-template-columns: 1fr;
    }
    .featured-visual {
        min-height: 180px;
    }
    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .article-layout {
        grid-template-columns: 1fr;
    }
    .article-sidebar {
        display: none;
    }
}

@media (max-width: 600px) {
    .blog-hero-title {
        font-size: 26px;
    }
    .posts-grid {
        grid-template-columns: 1fr;
    }
    .blog-hero-stats {
        gap: 24px;
    }
    .article-title {
        font-size: 22px;
    }
    .article-body h2 {
        font-size: 18px;
    }
}

/* 滚动淡入 */
.fade-in {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}
/* ===== 作者介绍板块 ===== */
.author-section { padding: 48px 0; background: var(--bg-dark); }
.author-card {
    max-width: 800px; margin: 0 auto; background: var(--card-dark, #1E293B);
    border: 1px solid rgba(0,82,255,0.2); border-radius: 20px; padding: 36px 32px;
}
.author-header { text-align: center; margin-bottom: 24px; }
.author-name { font-family: var(--font-display); font-size: 26px; font-weight: 800; color: var(--fg-light, #fff); }
.author-en { color: var(--accent-2, #4D7CFF); font-size: 18px; font-weight: 600; margin-left: 8px; }
.author-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 16px; }
.author-tag { font-size: 12px; font-weight: 500; color: var(--accent-2, #4D7CFF); background: rgba(77,124,255,0.1); padding: 5px 12px; border-radius: 100px; }
.author-body { margin-bottom: 24px; }
.author-intro p { font-size: 14px; color: var(--muted-fg-light, #94A3B8); line-height: 1.8; margin-bottom: 12px; }
.author-intro strong { color: var(--fg-light, #fff); font-weight: 600; }
.author-highlights { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 20px; }
.author-highlight { display: flex; align-items: center; gap: 10px; background: rgba(0,82,255,0.06); border-radius: 10px; padding: 10px 14px; }
.highlight-icon { font-size: 18px; flex-shrink: 0; }
.highlight-text { font-size: 12px; color: var(--muted-fg-light, #94A3B8); line-height: 1.4; }
.author-links { display: flex; justify-content: center; gap: 12px; }
@media (max-width: 640px) { .author-highlights { grid-template-columns: 1fr; } .author-card { padding: 24px 20px; } }