@charset "utf-8";
/**
 * 博客系统前台样式（独立主题，不依赖 basis.css / app.css）
 * 修改人：Leek  时间：2026-10-22 00:35
 * 说明：用于首页、文章列表/详情、案例列表/详情、单页；含代码高亮容器、
 *      视频自适应、附件下载卡片、案例卡片等模块
 */

:root {
    --blog-primary: #2f6bff;
    --blog-primary-dark: #1b4fd8;
    --blog-primary-light: #eef3ff;
    --blog-text: #1b1f2a;
    --blog-text-sub: #5b6478;
    --blog-text-mute: #8b93a7;
    --blog-border: #e8ebf2;
    --blog-bg: #f6f8fc;
    --blog-card: #ffffff;
    --blog-radius: 14px;
    --blog-shadow: 0 6px 24px rgba(24, 39, 75, .06);
    --blog-shadow-hover: 0 14px 36px rgba(24, 39, 75, .12);
    --blog-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

    /* 修改人：Leek  时间：2026-10-23 11:38
       暗色模式新增的语义层。原来这些浅色是硬编码在规则里的，
       要换主题必须先把它们提成变量，否则暗色下会留下白色斑块。 */
    --blog-soft: #f1f4fa;             /* 次级填充：行内代码、表头 */
    --blog-tint: #fcfdff;             /* 极浅高光底：首屏卡片、引用块 */
    --blog-line: #cfdcff;             /* 浅蓝描边：卡片 hover、选中态 */
    --blog-article-text: #26303f;     /* 正文色，比标题浅一档 */
    --blog-danger: #f0486d;           /* 点赞激活 */
    --blog-danger-soft: #fff1f5;
    --blog-danger-line: #ffc9d6;
    --blog-hero-a: #eef3ff;           /* 浅色首屏渐变三段 */
    --blog-hero-b: #f8fbff;
    --blog-hero-glow: rgba(223, 233, 255, .92);
    --blog-hero-glow-end: rgba(223, 233, 255, 0);
    --blog-ph-a: #dfe8ff;             /* 无封面时的占位渐变 */
    --blog-ph-b: #f2f6ff;
    --blog-header-bg: rgba(255, 255, 255, .92);  /* 吸顶头部半透明底 */
    --blog-code-bg: #1e2433;
    --blog-code-bar: #181d2b;
    --blog-code-border: #2a3245;
}

/* 修改人：Leek  时间：2026-10-23 11:38
   暗色主题：只覆盖变量，不重写任何规则。
   挂在 <html data-theme="dark"> 上，由 blog.js 按 localStorage / 系统偏好设置。
   注意：首屏 hero、页脚、分享海报、代码块本来就是深色，这里只做轻微提亮，
   不要跟着页面一起「变暗后再变暗」，否则层次全塌。 */
html[data-theme="dark"] {
    --blog-primary: #5b8cff;
    --blog-primary-dark: #4477e8;
    --blog-primary-light: rgba(91, 140, 255, .14);
    --blog-text: #e7ebf3;
    --blog-text-sub: #a3adc2;
    --blog-text-mute: #78829b;
    --blog-border: #28303f;
    --blog-bg: #0f1117;
    --blog-card: #161922;
    --blog-shadow: 0 6px 24px rgba(0, 0, 0, .45);
    --blog-shadow-hover: 0 14px 36px rgba(0, 0, 0, .58);

    --blog-soft: #1c2130;
    --blog-tint: #1a1e28;
    --blog-line: #2c3448;
    --blog-article-text: #ccd4e2;
    --blog-danger: #ff6b86;
    --blog-danger-soft: rgba(255, 107, 134, .12);
    --blog-danger-line: rgba(255, 107, 134, .34);
    --blog-hero-a: #161b26;
    --blog-hero-b: #12151d;
    --blog-hero-glow: rgba(59, 110, 255, .14);
    --blog-hero-glow-end: rgba(59, 110, 255, 0);
    --blog-ph-a: #1d2536;
    --blog-ph-b: #222b3d;
    --blog-header-bg: rgba(15, 17, 23, .88);
    --blog-code-bg: #12151e;
    --blog-code-bar: #0e1119;
    --blog-code-border: #232a3a;

    color-scheme: dark;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
}

body {
    background: var(--blog-bg);
    color: var(--blog-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    font-size: 15px;
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; transition: color .2s; }
a:hover { color: var(--blog-primary); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { margin: 0; padding: 0; list-style: none; }

.blog-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ---------- 顶部加载进度条（跑马灯） ---------- */
/* 修改人：Leek  时间：2026-10-22 16:55
   贴页面最顶端的加载进度条，颜色由后台「内容 → 基础设置 → 进度条颜色」控制，
   通过行内 style 注入 --blog-progress-color；未配置时回落主题色。
   动画逻辑在 blog/header.html 的内联脚本里（必须早于 blog.js 执行）。 */
.blog-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    z-index: 9999;
    pointer-events: none;
    opacity: 0;
    transition: opacity .25s ease;
}

.blog-progress.is-active { opacity: 1; }

.blog-progress.is-done {
    opacity: 0;
    transition: opacity .4s ease;
}

.blog-progress__bar {
    position: relative;
    width: 0;
    height: 100%;
    border-radius: 0 3px 3px 0;
    background-color: var(--blog-progress-color, var(--blog-primary));
    /* 条子里那道流动的白色高光，就是「跑马灯」的动感来源 */
    background-image: linear-gradient(90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, .72) 50%,
        rgba(255, 255, 255, 0) 100%);
    background-size: 45% 100%;
    background-repeat: no-repeat;
    background-position: -60% 0;
    box-shadow: 0 0 8px var(--blog-progress-color, var(--blog-primary)),
                0 0 3px var(--blog-progress-color, var(--blog-primary));
    transition: width .18s ease-out;
    animation: blog-progress-run 1.2s linear infinite;
}

@keyframes blog-progress-run {
    0%   { background-position: -60% 0; }
    100% { background-position: 160% 0; }
}

@media (prefers-reduced-motion: reduce) {
    .blog-progress__bar {
        animation: none;
        transition: none;
    }
}

/* ---------- 顶部导航 ---------- */
.blog-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--blog-header-bg);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--blog-border);
}

.blog-header__inner {
    display: flex;
    align-items: center;
    gap: 28px;
    height: 66px;
}

.blog-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 19px;
    font-weight: 700;
    letter-spacing: .3px;
    white-space: nowrap;
}

/* 修改人：Leek  时间：2026-10-22 16:08
   顶栏 logo 改为读取后台「基础设置 → 网站logo」的图片，方形底图带圆角收边 */
.blog-brand__logo {
    display: block;
    height: 34px;
    width: auto;
    max-width: 180px;
    border-radius: 8px;
    object-fit: contain;
}

/* 修改人：Leek  时间：2026-10-22 16:29
   站点名称始终跟在图标后面显示，不再被 logo 顶掉
   （原来的 .blog-brand__fallback 包裹层已废弃，模板里不再使用） */
.blog-brand__name {
    line-height: 1;
    color: var(--blog-text);
}

.blog-brand__mark {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background: linear-gradient(135deg, var(--blog-primary), #7aa2ff);
    display: inline-block;
    position: relative;
}

.blog-brand__mark::after {
    content: "";
    position: absolute;
    inset: 8px;
    border-radius: 4px;
    background: var(--blog-card);
    opacity: .85;
}

.blog-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
}

.blog-nav > li { position: relative; }

.blog-nav > li > a {
    position: relative;
    display: block;
    padding: 8px 14px;
    border-radius: 9px;
    font-size: 15px;
    color: var(--blog-text-sub);
    font-weight: 500;
    transition: color .18s ease;
}

/* 修改人：Leek  时间：2026-10-22 17:33  导航选中态改成底线样式
   原来选中 / 悬停是浅蓝圆角色块，且选择器写成 .is-active，跟模板输出的 .active 不匹配，等于没生效。
   现在：底部一条 2px 短线，hover 淡入（45% 透明），选中实色，文字同步变主色。 */
.blog-nav > li > a::after {
    content: '';
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 3px;
    height: 2px;
    border-radius: 2px;
    background: var(--blog-primary);
    opacity: 0;
    transform: scaleX(.35);
    transition: opacity .2s ease, transform .24s ease;
}

.blog-nav > li > a:hover { color: var(--blog-primary); }

.blog-nav > li > a:hover::after {
    opacity: .45;
    transform: scaleX(1);
}

.blog-nav > li.active > a,
.blog-nav > li.is-active > a {
    color: var(--blog-primary);
    font-weight: 600;
}

.blog-nav > li.active > a::after,
.blog-nav > li.is-active > a::after {
    opacity: 1;
    transform: scaleX(1);
}

.blog-nav__child {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 150px;
    padding: 8px;
    background: var(--blog-card);
    border: 1px solid var(--blog-border);
    border-radius: 12px;
    box-shadow: var(--blog-shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: all .18s ease;
}

.blog-nav > li:hover .blog-nav__child {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.blog-nav__child dd a {
    display: block;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 14px;
    color: var(--blog-text-sub);
}

.blog-nav__child dd a:hover { background: var(--blog-primary-light); color: var(--blog-primary); }

.blog-header__search {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 38px;
    padding: 0 14px;
    background: var(--blog-bg);
    border: 1px solid var(--blog-border);
    border-radius: 20px;
    min-width: 210px;
}

.blog-header__search input {
    border: 0;
    outline: 0;
    background: transparent;
    font-size: 14px;
    width: 100%;
    color: var(--blog-text);
}

.blog-header__search svg { flex: none; opacity: .45; }

/* ---------- 通用区块 ---------- */
.blog-main { padding: 34px 0 60px; }

.blog-hero {
    position: relative;
    padding: 46px 0 40px;
    background: linear-gradient(160deg, var(--blog-hero-a) 0%, var(--blog-hero-b) 55%, var(--blog-bg) 100%);
    border-bottom: 1px solid var(--blog-border);
}

.blog-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px;
    border-radius: 20px;
    background: var(--blog-card);
    border: 1px solid var(--blog-border);
    font-size: 13px;
    color: var(--blog-primary);
    font-weight: 600;
}

.blog-hero__title {
    margin: 16px 0 10px;
    font-size: 36px;
    line-height: 1.3;
    letter-spacing: -.5px;
}

.blog-hero__title em { font-style: normal; color: var(--blog-primary); }

.blog-hero__desc {
    margin: 0;
    max-width: 620px;
    color: var(--blog-text-sub);
    font-size: 16px;
}

/* ---------- 首页首屏：居中版式 ---------- */
/* 修改人：Leek  时间：2026-10-22 14:56  只保留主标题 + 副标题，居中排版，加一层柔光和淡网格 */
.blog-hero--home {
    padding: 78px 0 68px;
    text-align: center;
    background:
        radial-gradient(820px 340px at 50% -8%, var(--blog-hero-glow) 0%, var(--blog-hero-glow-end) 68%),
        linear-gradient(180deg, var(--blog-hero-b) 0%, var(--blog-bg) 100%);
    border-bottom: 1px solid var(--blog-border);
    overflow: hidden;
}

.blog-hero--home::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(47, 107, 255, .06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(47, 107, 255, .06) 1px, transparent 1px);
    background-size: 40px 40px;
    -webkit-mask-image: radial-gradient(72% 82% at 50% 0%, #000 0%, transparent 76%);
    mask-image: radial-gradient(72% 82% at 50% 0%, #000 0%, transparent 76%);
    pointer-events: none;
}

.blog-hero--home > .blog-container { position: relative; z-index: 1; }

.blog-hero--home .blog-hero__title {
    margin: 0 auto;
    max-width: 900px;
    /* 修改人：Leek  时间：2026-10-22 22:22  主标题 46px → 42px */
    font-size: 42px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -1.4px;
}

/* 高亮词：只做颜色，不再叠下划线，避免和标题下方的分隔线重复 */
.blog-hero--home .blog-hero__title em {
    color: var(--blog-primary);
}

/* 标题与副标题之间的分隔线 */
/* 修改人：Leek  时间：2026-10-22 22:22  色条 96px → 210px，与 42px 标题的横向体量匹配 */
.blog-hero--home .blog-hero__title::after {
    content: "";
    display: block;
    width: 210px;
    height: 3px;
    margin: 26px auto 0;
    border-radius: 999px;
    background: linear-gradient(
        90deg,
        rgba(47, 107, 255, 0) 0%,
        var(--blog-primary) 14%,
        #6ea8ff 86%,
        rgba(110, 168, 255, 0) 100%
    );
}

.blog-hero--home .blog-hero__desc {
    margin: 16px auto 0;
    max-width: 560px;
    font-size: 16.5px;
    line-height: 1.85;
    color: var(--blog-text-mute);
}

/* 修改人：Leek  时间：2026-10-22 08:24  搜索结果页：清除搜索链接 + 关键词高亮 */
.blog-hero__clear {
    color: var(--blog-primary);
    font-size: 14px;
    text-decoration: none;
    border-bottom: 1px dashed currentColor;
    padding-bottom: 1px;
}

.blog-hero__clear:hover { opacity: .78; }

.blog-hl {
    font-style: normal;
    color: #d9480f;
    background: rgba(255, 212, 59, .32);
    border-radius: 3px;
    padding: 0 2px;
}

.blog-section-title {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin: 0 0 18px;
}

.blog-section-title h2 {
    margin: 0;
    font-size: 22px;
    letter-spacing: -.2px;
}

.blog-section-title h2::before {
    content: "";
    display: inline-block;
    width: 5px;
    height: 18px;
    border-radius: 3px;
    margin-right: 10px;
    vertical-align: -2px;
    background: linear-gradient(180deg, var(--blog-primary), #89abff);
}

.blog-section-title a.more { font-size: 14px; color: var(--blog-text-mute); }
.blog-section-title a.more:hover { color: var(--blog-primary); }

/* ---------- 首页：置顶区 ---------- */
/* 修改人：Leek  时间：2026-10-22 09:20
   二次美化：左侧改为杂志式整幅头条（去卡片框、文字直接压在渐变遮罩上），
   右侧改为「编号榜单」卡片（序号 + 缩略图 + 分类 + 标题），整体更轻、更有层次 */
.blog-feature {
    display: grid;
    grid-template-columns: 1.66fr 1fr;
    gap: 22px;
    margin-bottom: 40px;
}

/* 修改人：Leek  时间：2026-10-22 08:58  顶部只配了 1 篇时，主卡独占整行 */
.blog-feature.is-single { grid-template-columns: 1fr; }

/* ---------- 主卡（头条） ---------- */
.blog-feature__main {
    position: relative;
    display: block;
    min-height: 430px;
    border-radius: 20px;
    overflow: hidden;
    background: #070b15;
    color: #fff;
    isolation: isolate;
    box-shadow:
        0 2px 4px rgba(12, 22, 48, .06),
        0 18px 44px -12px rgba(12, 22, 48, .34);
    transition: box-shadow .32s cubic-bezier(.2, .7, .3, 1), transform .32s cubic-bezier(.2, .7, .3, 1);
}

.blog-feature__main:hover {
    transform: translateY(-3px);
    box-shadow:
        0 3px 6px rgba(12, 22, 48, .08),
        0 30px 62px -14px rgba(12, 22, 48, .48);
}

.blog-feature__img {
    position: absolute;
    inset: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* 修改人：Leek  时间：2026-10-22 09:20  封面再压一档，抵消图片自带文字的干扰 */
    /* 修改人：Leek  时间：2026-10-22 09:34  换用无文字的抽象封面后去掉模糊，提亮让底纹透出来 */
    filter: brightness(1.06) saturate(1.14);
    transform: scale(1.02);
    transition: transform .9s cubic-bezier(.2, .7, .3, 1), filter .4s;
}

.blog-feature__main:hover .blog-feature__img {
    transform: scale(1.06);
    filter: brightness(1.16) saturate(1.2);
}

/* 遮罩：自下而上的实色渐变，保证标题区对比度，同时让上半部图片透出来 */
.blog-feature__veil {
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        /* 修改人：Leek  时间：2026-10-22 09:20 */
        /* 修改人：Leek  时间：2026-10-22 09:34  封面已无文字，遮罩改轻，只压底部保障标题对比 */
        linear-gradient(180deg,
            rgba(7, 11, 21, .04) 0%,
            rgba(7, 11, 21, .26) 36%,
            rgba(7, 11, 21, .66) 58%,
            rgba(7, 11, 21, .92) 80%,
            #06090f 100%),
        radial-gradient(90% 70% at 0% 100%, rgba(7, 11, 21, .45) 0%, rgba(7, 11, 21, 0) 62%),
        /* 左下角一抹品牌色辉光 */
        radial-gradient(60% 50% at 4% 100%, rgba(47, 107, 255, .2) 0%, rgba(47, 107, 255, 0) 70%);
}

/* 无封面图时的渐变底 */
.blog-feature__main.is-plain {
    background:
        radial-gradient(120% 90% at 12% 8%, #24407a 0%, rgba(36, 64, 122, 0) 62%),
        linear-gradient(135deg, #101a30 0%, #070b15 70%);
}

/* 角标：轻玻璃胶囊 + 渐变圆点 */
.blog-feature__badge {
    position: absolute;
    top: 20px;
    left: 20px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 30px;
    padding: 0 14px 0 12px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: .6px;
    color: #fff;
    background: rgba(16, 24, 44, .42);
    border: 1px solid rgba(255, 255, 255, .22);
    -webkit-backdrop-filter: blur(12px) saturate(1.4);
    backdrop-filter: blur(12px) saturate(1.4);
    box-shadow: 0 6px 18px rgba(4, 8, 18, .28);
}

.blog-feature__badge i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: linear-gradient(135deg, #5b8cff, #a06bff);
    box-shadow: 0 0 0 3px rgba(120, 150, 255, .22), 0 0 10px rgba(120, 150, 255, .8);
}

/* 文字区：不再用磨砂面板，直接压在遮罩上，更像杂志封面 */
.blog-feature__main .inner {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 0 32px 30px;
}

/* 标题上方的一行信息：分类 · 日期 · 阅读量 + 右侧 CTA */
.blog-feature__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
    font-size: 12.5px;
    color: rgba(255, 255, 255, .62);
}

.blog-feature__meta-main {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    min-width: 0;
}

.blog-feature__cat-chip {
    display: inline-flex;
    align-items: center;
    height: 23px;
    padding: 0 10px;
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: .4px;
    color: #cfe0ff;
    background: rgba(94, 132, 255, .2);
    border: 1px solid rgba(126, 160, 255, .34);
}

.blog-feature__sep {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .34);
}

.blog-feature__cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: none;
    height: 30px;
    padding: 0 14px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .2);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    transition: background .25s, border-color .25s, transform .25s, box-shadow .25s;
}

.blog-feature__cta svg { transition: transform .25s; }

.blog-feature__main:hover .blog-feature__cta {
    color: #0d1424;
    /* 压在首屏深色大图上的悬浮按钮，暗色主题下也必须保持白底深字 */
    background: #fff;
    border-color: #fff;
    box-shadow: 0 8px 22px rgba(0, 0, 0, .3);
}

.blog-feature__main:hover .blog-feature__cta svg { transform: translateX(3px); }

.blog-feature__main h3 {
    margin: 0 0 10px;
    max-width: 96%;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.38;
    letter-spacing: -.4px;
    text-shadow: 0 2px 16px rgba(0, 0, 0, .4);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-feature__main p {
    margin: 0;
    max-width: 92%;
    color: rgba(255, 255, 255, .7);
    font-size: 14px;
    line-height: 1.72;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 修改人：Leek  时间：2026-10-22 08:58  全局 a:hover 会变蓝，深色卡片里文字要锁回白色 */
.blog-feature__main:hover h3 { color: #fff; }
.blog-feature__main:hover p { color: rgba(255, 255, 255, .78); }
.blog-feature__main:hover .blog-feature__meta { color: rgba(255, 255, 255, .62); }

/* ---------- 右列：编号榜单 ---------- */
.blog-feature__list {
    display: grid;
    grid-auto-rows: 1fr;
    gap: 14px;
    min-width: 0;
    counter-reset: feat;
}

.blog-feature__item {
    counter-increment: feat;
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px 14px 14px;
    min-width: 0;
    background: var(--blog-card);
    border: 1px solid var(--blog-border);
    border-radius: 14px;
    overflow: hidden;
    transition: border-color .25s, box-shadow .25s, transform .25s, background .25s;
}

/* 顶部一条渐变线，悬停时展开 */
.blog-feature__item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #2f6bff, #a06bff 60%, rgba(160, 107, 255, 0));
    opacity: 0;
    transform: scaleX(.4);
    transform-origin: left center;
    transition: opacity .3s, transform .35s;
}

/* 序号（01 / 02 / 03） */
.blog-feature__item::after {
    content: counter(feat, decimal-leading-zero);
    position: absolute;
    top: 9px;
    right: 14px;
    font-size: 19px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -.5px;
    font-variant-numeric: tabular-nums;
    color: #e2e9f7;
    transition: color .25s;
    pointer-events: none;
}

.blog-feature__item:hover {
    border-color: var(--blog-line);
    background: var(--blog-tint);
    box-shadow: 0 16px 34px -10px rgba(30, 60, 140, .22);
    transform: translateY(-2px);
}

.blog-feature__item:hover::before { opacity: 1; transform: none; }
.blog-feature__item:hover::after { color: #b7c9f5; }

.blog-feature__thumb {
    position: relative;
    width: 100px;
    height: 78px;
    flex: none;
    border-radius: 11px;
    overflow: hidden;
    background: var(--blog-bg);
    box-shadow: inset 0 0 0 1px rgba(20, 40, 90, .07);
}

.blog-feature__thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.04);
    transition: transform .6s cubic-bezier(.2, .7, .3, 1);
}

.blog-feature__item:hover .blog-feature__thumb img { transform: scale(1.07); }

.blog-feature__txt {
    flex: 1;
    min-width: 0;
    /* 给右上角序号留位 */
    padding-right: 34px;
}

.blog-feature__cat {
    display: inline-block;
    margin-bottom: 6px;
    padding: 1px 7px;
    border-radius: 5px;
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1.6;
    color: var(--blog-primary);
    background: var(--blog-primary-light);
}

.blog-feature__item h4 {
    margin: 0 0 7px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.5;
    color: var(--blog-text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color .2s;
}

.blog-feature__item:hover h4 { color: var(--blog-primary-dark); }

.blog-feature__sub {
    font-size: 12px;
    color: var(--blog-text-mute);
}

.blog-feature__sub i { font-style: normal; margin: 0 6px; opacity: .5; }

.blog-feature__arrow {
    position: absolute;
    right: 14px;
    bottom: 13px;
    flex: none;
    color: var(--blog-primary);
    opacity: 0;
    transform: translateX(-5px);
    transition: opacity .25s, transform .25s;
}

.blog-feature__item:hover .blog-feature__arrow {
    opacity: 1;
    transform: none;
}

/* ---------- 两列布局 ---------- */
.blog-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 312px;
    gap: 28px;
    align-items: start;
}

/* ---------- 文章卡片 ---------- */
.blog-posts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }

.blog-post-card {
    display: flex;
    flex-direction: column;
    background: var(--blog-card);
    border: 1px solid var(--blog-border);
    border-radius: var(--blog-radius);
    overflow: hidden;
    transition: all .22s;
}

.blog-post-card:hover {
    border-color: var(--blog-line);
    box-shadow: var(--blog-shadow-hover);
    transform: translateY(-3px);
}

.blog-post-card__cover {
    display: block;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, var(--blog-ph-a), var(--blog-ph-b)) center/cover no-repeat;
}

.blog-post-card__body { padding: 16px 18px 18px; flex: 1; display: flex; flex-direction: column; }

.blog-post-card__meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12.5px;
    color: var(--blog-text-mute);
    margin-bottom: 8px;
}

.blog-tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 9px;
    border-radius: 20px;
    background: var(--blog-primary-light);
    color: var(--blog-primary);
    font-size: 12px;
    font-weight: 600;
}

.blog-post-card__title {
    margin: 0 0 8px;
    font-size: 17px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-post-card__intro {
    margin: 0;
    font-size: 13.5px;
    color: var(--blog-text-sub);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-post-card__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px dashed var(--blog-border);
    font-size: 12.5px;
    color: var(--blog-text-mute);
}

/* ---------- 侧栏 ---------- */
.blog-aside { display: grid; gap: 20px; position: sticky; top: 86px; }

.blog-widget {
    background: var(--blog-card);
    border: 1px solid var(--blog-border);
    border-radius: var(--blog-radius);
    padding: 18px;
}

.blog-widget__title {
    margin: 0 0 14px;
    font-size: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.blog-widget__title::before {
    content: "";
    width: 4px;
    height: 14px;
    border-radius: 2px;
    background: var(--blog-primary);
}

.blog-widget__list li + li { margin-top: 12px; }

.blog-widget__list a {
    display: flex;
    gap: 10px;
    font-size: 14px;
    line-height: 1.55;
    color: var(--blog-text-sub);
}

.blog-widget__list a:hover { color: var(--blog-primary); }

.blog-widget__list .idx {
    flex: none;
    width: 20px;
    height: 20px;
    border-radius: 6px;
    background: var(--blog-bg);
    color: var(--blog-text-mute);
    font-size: 12px;
    line-height: 20px;
    text-align: center;
    font-weight: 700;
}

.blog-widget__list li:nth-child(-n+3) .idx {
    background: var(--blog-primary);
    color: #fff;
}

.blog-widget__cats { display: flex; flex-wrap: wrap; gap: 8px; }

.blog-widget__cats a {
    padding: 5px 12px;
    border-radius: 20px;
    border: 1px solid var(--blog-border);
    font-size: 13px;
    color: var(--blog-text-sub);
}

.blog-widget__cats a:hover,
.blog-widget__cats a.is-active {
    border-color: var(--blog-primary);
    color: var(--blog-primary);
    background: var(--blog-primary-light);
}

/* ---------- 侧栏：关于我 ---------- */
/* 修改人：Leek  时间：2026-10-22 14:32  头像居中 + 昵称 + 一句话 + 两个图标按钮 */
.blog-about {
    padding: 26px 20px 22px;
    text-align: center;
}

.blog-about__avatar {
    width: 88px;
    height: 88px;
    margin: 0 auto 14px;
    padding: 4px;
    border-radius: 50%;
    background: var(--blog-card);
    border: 1px solid var(--blog-border);
    box-shadow: 0 8px 22px rgba(24, 39, 75, .08);
}

.blog-about__avatar img {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.blog-about__name {
    margin: 0 0 8px;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.4;
    color: var(--blog-text);
}

.blog-about__desc {
    margin: 0 0 16px;
    font-size: 13px;
    line-height: 1.7;
    color: var(--blog-text-mute);
}

.blog-about__links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.blog-about__link {
    width: 40px;
    height: 40px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--blog-border);
    border-radius: 10px;
    background: var(--blog-card);
    color: var(--blog-text-sub);
    cursor: pointer;
    transition: all .2s;
}

.blog-about__link:hover {
    color: var(--blog-primary);
    border-color: var(--blog-primary);
    background: var(--blog-primary-light);
    transform: translateY(-1px);
}

/* ---------- 分页 ---------- */
.blog-pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.blog-pager a,
.blog-pager span {
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--blog-card);
    border: 1px solid var(--blog-border);
    font-size: 14px;
    color: var(--blog-text-sub);
}

.blog-pager a:hover { border-color: var(--blog-primary); color: var(--blog-primary); }
.blog-pager .is-current { background: var(--blog-primary); border-color: var(--blog-primary); color: #fff; }
.blog-pager .is-disabled { opacity: .45; }

/* ---------- 文章详情 ---------- */
.blog-article {
    background: var(--blog-card);
    border: 1px solid var(--blog-border);
    border-radius: var(--blog-radius);
    padding: 34px 40px 40px;
}

.blog-article__head { border-bottom: 1px solid var(--blog-border); padding-bottom: 20px; margin-bottom: 26px; }

.blog-article__title {
    margin: 10px 0 14px;
    font-size: 30px;
    line-height: 1.4;
    letter-spacing: -.4px;
}

.blog-article__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    font-size: 13px;
    color: var(--blog-text-mute);
}

.blog-article__intro {
    margin: 0 0 26px;
    padding: 14px 18px;
    border-left: 3px solid var(--blog-primary);
    background: var(--blog-primary-light);
    border-radius: 0 10px 10px 0;
    color: var(--blog-text-sub);
    font-size: 14.5px;
}

/* 正文排版 */
.blog-content { font-size: 16px; line-height: 1.9; color: var(--blog-article-text); word-break: break-word; }
.blog-content > *:first-child { margin-top: 0; }
.blog-content h1, .blog-content h2, .blog-content h3, .blog-content h4 {
    margin: 1.6em 0 .7em;
    line-height: 1.4;
    color: var(--blog-text);
}
.blog-content h2 { font-size: 22px; padding-bottom: 8px; border-bottom: 1px solid var(--blog-border); }
.blog-content h3 { font-size: 19px; }
.blog-content p { margin: 0 0 1.1em; }
.blog-content ul, .blog-content ol { margin: 0 0 1.1em; padding-left: 1.4em; }
.blog-content ul { list-style: disc; }
.blog-content ol { list-style: decimal; }
.blog-content li { margin: .35em 0; }
.blog-content a { color: var(--blog-primary); border-bottom: 1px solid rgba(47, 107, 255, .3); }
.blog-content blockquote {
    margin: 1.2em 0;
    padding: 12px 18px;
    background: var(--blog-bg);
    border-left: 3px solid var(--blog-line);
    border-radius: 0 10px 10px 0;
    color: var(--blog-text-sub);
}
.blog-content img { border-radius: 10px; margin: 1em auto; box-shadow: var(--blog-shadow); cursor: zoom-in; }
.blog-content hr { border: 0; border-top: 1px solid var(--blog-border); margin: 2em 0; }
.blog-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.2em 0;
    font-size: 14.5px;
}
.blog-content table th, .blog-content table td { border: 1px solid var(--blog-border); padding: 9px 12px; text-align: left; }
.blog-content table th { background: var(--blog-bg); font-weight: 600; }

/* 行内代码 */
.blog-content :not(pre) > code {
    padding: 2px 6px;
    border-radius: 6px;
    background: var(--blog-soft);
    color: #d94f70;
    font-family: var(--blog-mono);
    font-size: 13.5px;
}

/* 代码块（含 Prism 高亮容器） */
.blog-content pre,
.blog-content pre[class*="language-"] {
    position: relative;
    margin: 1.3em 0;
    padding: 18px 18px;
    border-radius: 12px;
    background: var(--blog-code-bg) !important;
    color: #e6ecf5;
    overflow: auto;
    font-family: var(--blog-mono);
    font-size: 13.5px;
    line-height: 1.7;
    box-shadow: var(--blog-shadow);
    border: 1px solid var(--blog-code-border);
}

.blog-content pre code {
    background: transparent !important;
    padding: 0 !important;
    color: inherit;
    font-family: inherit;
    font-size: inherit;
    text-shadow: none !important;
}

.blog-content pre::-webkit-scrollbar { height: 8px; }
.blog-content pre::-webkit-scrollbar-thumb { background: #3b455c; border-radius: 8px; }

/* 修改人：Leek  时间：2026-10-22 15:31
   Prism 的 toolbar 插件会生成「语言标签 + 英文 Copy」按钮，和下面的中文「复制」重叠，
   工具栏挂在 div.code-toolbar 里（不在 pre 内部），这里一并隐藏兜底 */
.blog-content .toolbar { display: none !important; }
.blog-content .code-toolbar { margin: 0 !important; }

.blog-code__copy {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 3;
    padding: 4px 10px;
    font-size: 12px;
    color: #cfd8e8;
    /* 修改人：Leek  时间：2026-10-22 15:31  原来底色太透，压在长代码上看不清，改成半透明深色 + 模糊 */
    background: rgba(22, 28, 41, .86);
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 7px;
    cursor: pointer;
    opacity: 0;
    transition: opacity .2s, background .2s;
    font-family: inherit;
    backdrop-filter: blur(4px);
}

.blog-content pre:hover .blog-code__copy { opacity: 1; }
.blog-code__copy:hover { background: rgba(255, 255, 255, .2); }

/* 视频自适应（TinyMCE 插入的 video / iframe） */
.blog-content video,
.blog-content iframe {
    width: 100% !important;
    max-width: 100%;
    border: 0;
    border-radius: 12px;
    box-shadow: var(--blog-shadow);
    margin: 1.2em 0;
    background: #000;
    aspect-ratio: 16 / 9;
}

.blog-content .blog-video { margin: 1.4em 0; }
.blog-content .blog-video figcaption { margin-top: 8px; font-size: 13px; color: var(--blog-text-mute); text-align: center; }

/* 附件下载卡片 */
.blog-content a.blog-file {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 1.1em 0;
    padding: 14px 16px;
    border: 1px solid var(--blog-border);
    border-radius: 12px;
    background: var(--blog-tint);
    color: var(--blog-text);
    border-bottom: 1px solid var(--blog-border);
    transition: all .2s;
}

.blog-content a.blog-file:hover {
    border-color: var(--blog-line);
    background: var(--blog-primary-light);
    color: var(--blog-primary);
    transform: translateY(-1px);
}

.blog-file__icon {
    flex: none;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--blog-primary);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .5px;
    text-transform: uppercase;
}

.blog-file__info { flex: 1; min-width: 0; }
.blog-file__name { display: block; font-size: 14.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.blog-file__hint { display: block; font-size: 12.5px; color: var(--blog-text-mute); margin-top: 2px; }

/* 上一篇 / 下一篇 */
.blog-article__nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 30px;
}

.blog-article__nav a {
    display: block;
    padding: 14px 16px;
    border: 1px solid var(--blog-border);
    border-radius: 12px;
    background: var(--blog-card);
    font-size: 14px;
    color: var(--blog-text-sub);
}

.blog-article__nav a:hover { border-color: var(--blog-primary); color: var(--blog-primary); }
.blog-article__nav .label { display: block; font-size: 12px; color: var(--blog-text-mute); margin-bottom: 4px; }
.blog-article__nav .next { text-align: right; }

/* ---------- 案例 ---------- */
.blog-cases { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }

.blog-case-card {
    display: flex;
    flex-direction: column;
    background: var(--blog-card);
    border: 1px solid var(--blog-border);
    border-radius: var(--blog-radius);
    overflow: hidden;
    transition: all .22s;
}

.blog-case-card:hover { border-color: var(--blog-line); box-shadow: var(--blog-shadow-hover); transform: translateY(-3px); }

.blog-case-card__cover {
    display: block;
    aspect-ratio: 16 / 10;
    background: linear-gradient(135deg, var(--blog-ph-a), var(--blog-ph-b)) center/cover no-repeat;
    position: relative;
}

.blog-case-card__price {
    position: absolute;
    left: 12px;
    bottom: 12px;
    padding: 4px 12px;
    border-radius: 20px;
    background: rgba(12, 18, 32, .72);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    backdrop-filter: blur(4px);
}

.blog-case-card__body { padding: 16px 18px 18px; flex: 1; display: flex; flex-direction: column; }
.blog-case-card__title { margin: 0 0 8px; font-size: 17px; line-height: 1.5; }
.blog-case-card__intro {
    margin: 0 0 14px;
    font-size: 13.5px;
    color: var(--blog-text-sub);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.blog-case-card__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }

.blog-case-card__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px dashed var(--blog-border);
    font-size: 13px;
    color: var(--blog-text-mute);
}

.blog-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding: 0 16px;
    border-radius: 9px;
    background: var(--blog-primary);
    color: #fff;
    font-size: 13.5px;
    font-weight: 600;
    border: 1px solid var(--blog-primary);
    cursor: pointer;
}

.blog-btn:hover { background: var(--blog-primary-dark); border-color: var(--blog-primary-dark); color: #fff; }
.blog-btn--ghost { background: var(--blog-card); color: var(--blog-primary); }
.blog-btn--ghost:hover { background: var(--blog-primary-light); color: var(--blog-primary); }

/* 案例详情 */
.blog-case-hero {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 30px;
    background: var(--blog-card);
    border: 1px solid var(--blog-border);
    border-radius: var(--blog-radius);
    padding: 30px;
    margin-bottom: 24px;
}

.blog-case-hero__cover {
    border-radius: 12px;
    overflow: hidden;
    background: var(--blog-bg);
    aspect-ratio: 16 / 10;
}

.blog-case-hero__cover img { width: 100%; height: 100%; object-fit: cover; }
.blog-case-hero h1 { margin: 0 0 12px; font-size: 27px; line-height: 1.4; }
.blog-case-hero__intro { margin: 0 0 18px; color: var(--blog-text-sub); }

.blog-case-facts { display: grid; gap: 10px; margin-bottom: 20px; }

.blog-case-facts__row {
    display: flex;
    gap: 12px;
    font-size: 14px;
    padding-bottom: 10px;
    border-bottom: 1px dashed var(--blog-border);
}

.blog-case-facts__row dt { flex: none; width: 84px; color: var(--blog-text-mute); margin: 0; }
.blog-case-facts__row dd { margin: 0; flex: 1; word-break: break-all; }
.blog-case-facts__price { color: #e8433f; font-size: 22px; font-weight: 700; }

.blog-case-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; margin-top: 18px; }
.blog-case-gallery img { border-radius: 10px; cursor: zoom-in; aspect-ratio: 16 / 10; object-fit: cover; width: 100%; }

/* 单页 */
.blog-page {
    background: var(--blog-card);
    border: 1px solid var(--blog-border);
    border-radius: var(--blog-radius);
    padding: 40px 44px;
}

.blog-page__cover { border-radius: 12px; overflow: hidden; margin-bottom: 26px; max-height: 300px; }
.blog-page__cover img { width: 100%; height: 100%; object-fit: cover; }
.blog-page h1 { margin: 0 0 20px; font-size: 30px; }

/* 空状态 */
.blog-empty {
    padding: 60px 20px;
    text-align: center;
    color: var(--blog-text-mute);
    background: var(--blog-card);
    border: 1px dashed var(--blog-border);
    border-radius: var(--blog-radius);
}

/* 404 */
.blog-404 { text-align: center; padding: 90px 20px; }
.blog-404 .code { font-size: 84px; font-weight: 800; color: var(--blog-primary); line-height: 1; letter-spacing: -4px; }
.blog-404 p { color: var(--blog-text-sub); margin: 12px 0 24px; }

/* 灯箱 */
.blog-lightbox {
    position: fixed;
    inset: 0;
    z-index: 999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 30px;
    background: rgba(10, 14, 24, .86);
    cursor: zoom-out;
}
.blog-lightbox.is-open { display: flex; }
.blog-lightbox img { max-width: 92vw; max-height: 90vh; border-radius: 10px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); }

/* ---------- 页脚 ---------- */
.blog-footer {
    background: #0f1524;
    color: rgba(255, 255, 255, .68);
    padding: 44px 0 26px;
    font-size: 13.5px;
}

.blog-footer__grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 30px;
    padding-bottom: 26px;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
}

.blog-footer h4 { margin: 0 0 14px; color: #fff; font-size: 14.5px; }
.blog-footer a { color: rgba(255, 255, 255, .68); }
.blog-footer a:hover { color: #fff; }
.blog-footer__links li + li { margin-top: 9px; }
.blog-footer__bottom { padding-top: 20px; display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; font-size: 12.5px; color: rgba(255, 255, 255, .45); }

/* ---------- 响应式 ---------- */
@media (max-width: 980px) {
    /* 修改人：Leek  时间：2026-10-22 08:55  单列时置顶主卡不再需要撑高 */
    .blog-feature { grid-template-columns: 1fr; }
    .blog-feature__main { min-height: 360px; }
    .blog-feature__list { grid-auto-rows: auto; }
    /* 修改人：Leek  时间：2026-10-22 22:36  原来写 1fr 等价 minmax(auto,1fr)，网格项被内容的最小宽度撑开，
       详情页正文（长表格 / 长代码行）在 390 屏会横溢出屏；改成 minmax(0,1fr) 与桌面那一行保持一致 */
    .blog-layout { grid-template-columns: minmax(0, 1fr); }
    .blog-aside { position: static; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
    .blog-case-hero { grid-template-columns: 1fr; }
    .blog-article { padding: 24px 20px 30px; }
    .blog-page { padding: 26px 20px; }
    .blog-footer__grid { grid-template-columns: 1fr 1fr; }
    /* 修改人：Leek  时间：2026-10-22 14:58  首页居中首屏在平板下收紧 */
    .blog-hero--home { padding: 60px 0 52px; }
    /* 修改人：Leek  时间：2026-10-22 22:22  桌面提到 42px 后，平板同步到 36px，保持与桌面拉开层次 */
    .blog-hero--home .blog-hero__title { font-size: 36px; letter-spacing: -1px; }
}

@media (max-width: 720px) {
    /* 修改人：Leek  时间：2026-10-22 16:10  原来 padding:12px 0 会把 .blog-container 的左右 20px 覆盖掉，顶栏内容贴屏幕边 */
    .blog-header__inner { height: auto; padding-top: 12px; padding-bottom: 12px; flex-wrap: wrap; gap: 12px; }
    /* 修改人：Leek  时间：2026-10-23 11:50
       顶栏多了主题切换按钮，第一行放不下（会把「联系我」挤到第三行），
       所以让主题按钮跟着导航排到第二行右侧，导航不再占满整行。 */
    .blog-nav { flex: 1 1 auto; order: 3; width: auto; overflow-x: auto; }
    .blog-theme { order: 4; }
    .blog-header__search { flex: 1; min-width: 140px; }
    .blog-posts { grid-template-columns: 1fr; }
    .blog-hero__title { font-size: 26px; }
    .blog-article__title { font-size: 23px; }
    .blog-article__nav { grid-template-columns: 1fr; }
    .blog-footer__grid { grid-template-columns: 1fr; }
    .blog-hero { padding: 30px 0 26px; }
    /* 修改人：Leek  时间：2026-10-22 14:58  首页居中首屏手机端字号与间距 */
    .blog-hero--home { padding: 44px 0 38px; }
    .blog-hero--home .blog-hero__title { font-size: 28px; letter-spacing: -.7px; }
    /* 修改人：Leek  时间：2026-10-22 22:22  色条 72px → 150px，跟随桌面 210px 的宽度比例 */
    .blog-hero--home .blog-hero__title::after { margin-top: 16px; width: 150px; height: 2px; }
    .blog-hero--home .blog-hero__desc { margin-top: 12px; font-size: 14px; line-height: 1.75; }
    .blog-cases { grid-template-columns: 1fr; }
    /* 修改人：Leek  时间：2026-10-22 08:55  置顶区移动端收窄 */
    /* 修改人：Leek  时间：2026-10-22 09:20  配合新版头条布局调整移动端间距 */
    .blog-feature { gap: 14px; margin-bottom: 26px; }
    .blog-feature__main { min-height: 300px; border-radius: 15px; }
    .blog-feature__main .inner { left: 0; right: 0; bottom: 0; padding: 0 18px 20px; }
    .blog-feature__main h3 { font-size: 20px; margin-bottom: 8px; }
    .blog-feature__main p { font-size: 13px; max-width: 100%; -webkit-line-clamp: 2; }
    .blog-feature__meta { margin-bottom: 10px; gap: 8px; font-size: 12px; }
    .blog-feature__badge { top: 16px; left: 14px; height: 26px; font-size: 11.5px; padding: 0 11px 0 9px; }
    .blog-feature__cta { display: none; }
    /* 修改人：Leek  时间：2026-10-22 09:40  移动端榜单卡片收紧，减少纵向长度 */
    .blog-feature__list { gap: 10px; }
    .blog-feature__item { padding: 10px 12px 10px 10px; gap: 11px; border-radius: 12px; }
    .blog-feature__item::after { font-size: 15px; top: 7px; right: 11px; }
    .blog-feature__txt { padding-right: 20px; }
    .blog-feature__cat { margin-bottom: 4px; font-size: 11px; padding: 0 6px; }
    .blog-feature__thumb { width: 78px; height: 62px; border-radius: 9px; }
    .blog-feature__item h4 { font-size: 14px; line-height: 1.45; margin-bottom: 5px; }
    .blog-feature__sub { font-size: 11.5px; }
    .blog-feature__arrow { display: none; }
}

/* ==========================================================================
   修改人：Leek  时间：2026-10-22 09:50
   新增：封面 img（懒加载）、列表分页工具条、面包屑、联系方式、点赞与分享海报
   ========================================================================== */

/* ---------- 封面：由 background-image 改为 img，才能吃到 loading="lazy" ---------- */
.blog-post-card__cover,
.blog-case-card__cover { position: relative; overflow: hidden; }

.blog-post-card__cover img,
.blog-case-card__cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .5s cubic-bezier(.2, .7, .3, 1);
}

.blog-post-card:hover .blog-post-card__cover img,
.blog-case-card:hover .blog-case-card__cover img { transform: scale(1.05); }

/* ---------- 列表分类筛选：从右侧栏移到列表上方，横向胶囊条 ----------
   修改人：Leek  时间：2026-10-22 14:02 */
.blog-filter {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    padding: 12px 16px;
    margin: 0 0 18px;
    background: var(--blog-card);
    border: 1px solid var(--blog-border);
    border-radius: var(--blog-radius);
    box-shadow: var(--blog-shadow);
}

.blog-filter__label {
    flex: none;
    padding-right: 14px;
    border-right: 1px solid var(--blog-border);
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    color: var(--blog-text-mute);
}

.blog-filter__list { display: flex; flex-wrap: wrap; gap: 8px; }

.blog-filter__list a {
    padding: 6px 14px;
    border: 1px solid transparent;
    border-radius: 20px;
    background: var(--blog-bg);
    font-size: 13px;
    color: var(--blog-text-sub);
    transition: all .2s;
}

.blog-filter__list a:hover {
    color: var(--blog-primary);
    background: var(--blog-primary-light);
}

.blog-filter__list a.is-active {
    background: var(--blog-primary);
    border-color: var(--blog-primary);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 6px 14px rgba(47, 107, 255, .24);
}

/* ---------- 列表分页：位于列表下方，居中 ----------
   修改人：Leek  时间：2026-10-22 14:02 */
.blog-pager__nav { font-weight: 600; }

.blog-pager .blog-pager__gap {
    min-width: 24px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--blog-text-mute);
    font-weight: 700;
    letter-spacing: 2px;
}

/* ---------- 面包屑 ---------- */
.blog-crumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 16px;
    font-size: 13px;
    line-height: 1.6;
    color: var(--blog-text-mute);
}

.blog-crumb a {
    color: var(--blog-text-sub);
    text-decoration: none;
    transition: color .18s;
}

.blog-crumb a:hover { color: var(--blog-primary); }

.blog-crumb__sep { color: #c6cbdb; user-select: none; }

.blog-crumb__cur {
    color: var(--blog-text);
    max-width: 460px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ---------- 详情页：正文末尾的点赞 / 分享海报 ----------
   修改人：Leek  时间：2026-10-22 14:09  挪到正文末尾后改为居中收尾条 */
.blog-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 36px;
    padding-top: 28px;
    border-top: 1px dashed var(--blog-border);
}

.blog-like,
.blog-share {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 44px;
    padding: 0 20px;
    border-radius: 24px;
    border: 1px solid var(--blog-border);
    background: var(--blog-card);
    color: var(--blog-text-sub);
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    transition: all .22s;
}

.blog-like:hover {
    border-color: var(--blog-danger-line);
    color: var(--blog-danger);
    background: var(--blog-danger-soft);
}

.blog-like svg { transition: transform .28s cubic-bezier(.2, 1.6, .4, 1); }

.blog-like.is-on {
    border-color: var(--blog-danger-line);
    background: var(--blog-danger-soft);
    color: var(--blog-danger);
}

.blog-like.is-on svg { fill: currentColor; transform: scale(1.12); }

.blog-like.is-bump svg { animation: blog-like-bump .45s ease; }

@keyframes blog-like-bump {
    0% { transform: scale(1); }
    45% { transform: scale(1.42); }
    100% { transform: scale(1.12); }
}

.blog-like__num { font-weight: 700; font-variant-numeric: tabular-nums; }

.blog-share {
    border-color: transparent;
    background: linear-gradient(135deg, var(--blog-primary), #7c5cff);
    color: #fff;
    box-shadow: 0 6px 18px rgba(47, 107, 255, .26);
}

.blog-share:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(47, 107, 255, .34); }

.blog-actions__tip {
    /* 修改人：Leek  时间：2026-10-22 14:11  提示文字单独占一行并居中，按钮组才是严格居中 */
    flex: 0 0 100%;
    text-align: center;
    margin-top: 2px;
    font-size: 12.5px;
    color: var(--blog-text-mute);
}

/* ---------- 海报弹层 ---------- */
.blog-poster {
    position: fixed;
    inset: 0;
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(9, 14, 26, .72);
    backdrop-filter: blur(6px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .24s, visibility .24s;
}

.blog-poster.is-open { opacity: 1; visibility: visible; }

.blog-poster__box {
    max-height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    transform: translateY(12px) scale(.97);
    transition: transform .28s cubic-bezier(.2, .8, .3, 1);
}

.blog-poster.is-open .blog-poster__box { transform: none; }

.blog-poster__img {
    max-height: 68vh;
    width: auto;
    max-width: 100%;
    border-radius: 14px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
    /* 分享海报是导出图，白底属于设计的一部分，不跟主题走 */
    background: #fff;
}

.blog-poster__ops { display: flex; gap: 10px; }

.blog-poster__ops button,
.blog-poster__ops a {
    display: inline-flex;
    align-items: center;
    height: 40px;
    padding: 0 22px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, .28);
    background: rgba(255, 255, 255, .12);
    color: #fff;
    font-size: 14px;
    font-family: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: all .2s;
}

.blog-poster__ops button:hover,
.blog-poster__ops a:hover { background: rgba(255, 255, 255, .22); }

.blog-poster__ops .is-primary { background: #fff; color: #101828; border-color: #fff; }

.blog-poster__hint { font-size: 12.5px; color: rgba(255, 255, 255, .6); }

/* ---------- 首页联系方式 ---------- */
.blog-contact {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 34px;
    padding: 38px 42px;
    border-radius: 22px;
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(120% 130% at 0% 0%, #1c2c50 0%, #0f1729 45%, #080c16 100%);
    box-shadow: 0 18px 46px rgba(12, 22, 44, .22);
}

.blog-contact__glow {
    position: absolute;
    width: 420px;
    height: 420px;
    right: -90px;
    top: -160px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(47, 107, 255, .5) 0%, rgba(124, 92, 255, .18) 45%, transparent 70%);
    pointer-events: none;
}

.blog-contact__main { position: relative; min-width: 0; }

.blog-contact__eyebrow {
    display: inline-block;
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .55);
    margin-bottom: 12px;
}

.blog-contact__title {
    margin: 0 0 10px;
    font-size: 26px;
    line-height: 1.35;
    letter-spacing: -.4px;
    font-weight: 700;
}

.blog-contact__sub {
    margin: 0 0 24px;
    font-size: 14px;
    line-height: 1.75;
    color: rgba(255, 255, 255, .62);
    max-width: 520px;
}

.blog-contact__list {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.blog-contact__item {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, .12);
    background: rgba(255, 255, 255, .06);
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: all .22s;
}

.blog-contact__item:hover {
    border-color: rgba(111, 155, 255, .55);
    background: rgba(47, 107, 255, .16);
    transform: translateY(-2px);
}

.blog-contact__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    border-radius: 11px;
    background: linear-gradient(135deg, rgba(47, 107, 255, .9), rgba(124, 92, 255, .9));
    color: #fff;
}

.blog-contact__txt { display: flex; flex-direction: column; line-height: 1.35; }

.blog-contact__label { font-size: 11.5px; color: rgba(255, 255, 255, .52); }

.blog-contact__value {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: .2px;
    font-variant-numeric: tabular-nums;
}

.blog-contact__act {
    margin-left: 6px;
    padding: 3px 10px;
    border-radius: 20px;
    background: rgba(255, 255, 255, .14);
    font-size: 11.5px;
    color: rgba(255, 255, 255, .9);
}

.blog-contact__tip {
    margin: 18px 0 0;
    font-size: 12.5px;
    color: rgba(255, 255, 255, .42);
}

.blog-contact__qr {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.blog-contact__qr img {
    width: 132px;
    height: 132px;
    object-fit: cover;
    border-radius: 12px;
    background: #fff;
    padding: 6px;
    box-shadow: 0 10px 26px rgba(0, 0, 0, .32);
}

.blog-contact__qr span { font-size: 12px; color: rgba(255, 255, 255, .55); }

/* ---------- 顶栏「联系我」按钮 + 联系方式弹窗 ----------
   修改人：Leek  时间：2026-10-22 14:18 */
.blog-header__cta {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    flex: none;
    height: 38px;
    padding: 0 18px;
    border: 0;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--blog-primary), #7c5cff);
    color: #fff;
    font-size: 13.5px;
    font-weight: 600;
    font-family: inherit;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(47, 107, 255, .28);
    transition: transform .2s, box-shadow .2s;
}

.blog-header__cta:hover { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(47, 107, 255, .38); }
.blog-header__cta:active { transform: none; }

.blog-modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.blog-modal[hidden] { display: none; }

.blog-modal__mask {
    position: absolute;
    inset: 0;
    background: rgba(8, 12, 24, .58);
    backdrop-filter: blur(5px);
    animation: blog-modal-fade .22s ease both;
}

.blog-modal__dialog {
    position: relative;
    width: 100%;
    max-width: 620px;
    max-height: 88vh;
    overflow-y: auto;
    border-radius: 22px;
    animation: blog-modal-pop .28s cubic-bezier(.2, .9, .3, 1) both;
}

.blog-modal__x {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 50%;
    background: rgba(255, 255, 255, .1);
    color: rgba(255, 255, 255, .8);
    cursor: pointer;
    transition: all .2s;
}

.blog-modal__x:hover { background: rgba(255, 255, 255, .2); color: #fff; transform: rotate(90deg); }

/* 弹窗里的联系卡：去掉底部区块时期的外边距 */
.blog-contact--modal { margin: 0; }

/* 修改人：Leek  时间：2026-10-22 14:20  未配置二维码时收窄，内容在弹窗里更聚拢 */
.blog-modal__dialog.is-narrow { max-width: 520px; }
.blog-contact--modal.is-no-qr { grid-template-columns: 1fr; gap: 0; }

@keyframes blog-modal-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes blog-modal-pop {
    from { opacity: 0; transform: translateY(16px) scale(.97); }
    to { opacity: 1; transform: none; }
}

/* ---------- 移动端 ---------- */
@media (max-width: 980px) {
    .blog-contact { grid-template-columns: 1fr; padding: 30px 26px; gap: 24px; }
    .blog-contact__qr { flex-direction: row; align-self: flex-start; }
    .blog-contact__qr img { width: 96px; height: 96px; }
    .blog-contact__title { font-size: 22px; }

    /* 修改人：Leek  时间：2026-10-22 14:22  顶栏多了「联系我」按钮，平板及以下导航整体换到第二行，避免把导航挤成竖排 */
    /* 修改人：Leek  时间：2026-10-22 16:10  原来 padding:12px 0 会把 .blog-container 的左右 20px 覆盖掉，顶栏内容贴屏幕边 */
    .blog-header__inner { height: auto; padding-top: 12px; padding-bottom: 12px; flex-wrap: wrap; gap: 12px; }
    /* 修改人：Leek  时间：2026-10-23 11:50
       顶栏多了主题切换按钮，第一行放不下（会把「联系我」挤到第三行），
       所以让主题按钮跟着导航排到第二行右侧，导航不再占满整行。 */
    .blog-nav { flex: 1 1 auto; order: 3; width: auto; overflow-x: auto; }
    .blog-theme { order: 4; }
    .blog-header__search { flex: 1; min-width: 140px; }
}

@media (max-width: 720px) {
    /* 修改人：Leek  时间：2026-10-22 14:02  移动端分类条改为竖排，分页按钮收紧 */
    .blog-filter { padding: 12px 14px; gap: 10px; }
    .blog-filter__label { width: 100%; padding: 0 0 8px; border-right: 0; border-bottom: 1px solid var(--blog-border); }
    .blog-filter__list a { padding: 5px 12px; font-size: 12.5px; }
    .blog-pager { gap: 6px; margin-top: 24px; }
    .blog-pager a,
    .blog-pager span { min-width: 34px; height: 34px; padding: 0 10px; font-size: 13px; }
    .blog-crumb { font-size: 12.5px; }
    .blog-crumb__cur { max-width: 190px; }
    .blog-contact { padding: 26px 20px; border-radius: 16px; }
    .blog-contact__list { gap: 10px; }
    .blog-contact__item { width: 100%; }
    .blog-contact__sub { margin-bottom: 18px; }
    .blog-actions { gap: 10px; }
    .blog-like, .blog-share { height: 40px; padding: 0 16px; font-size: 13.5px; }
    .blog-actions__tip { display: none; }

    /* 修改人：Leek  时间：2026-10-22 14:18  移动端「联系我」只留图标，弹窗贴边更省空间 */
    .blog-header__cta { padding: 0 12px; }
    .blog-header__cta span { display: none; }
    /* 修改人：Leek  时间：2026-10-22 16:08  手机端顶栏 logo 收小，避免把导航挤下去 */
    .blog-brand__logo { height: 30px; max-width: 140px; }
    .blog-modal { padding: 12px; align-items: flex-end; }
    .blog-modal__dialog { max-height: 90vh; border-radius: 20px; }
    .blog-modal__x { top: 10px; right: 10px; width: 30px; height: 30px; }

    /* 修改人：Leek  时间：2026-10-22 14:44  手机端侧栏关于我收小，避免在正文后面占太多高度 */
    .blog-about { padding: 20px 16px 18px; }
    .blog-about__avatar { width: 66px; height: 66px; padding: 3px; margin-bottom: 10px; }
    .blog-about__name { font-size: 16px; margin-bottom: 6px; }
    .blog-about__desc { margin-bottom: 12px; font-size: 12.5px; }
    .blog-about__link { width: 36px; height: 36px; border-radius: 9px; }
}

/* ==========================================================================
   修改人：Leek  时间：2026-10-22 16:40
   懒加载图片淡入：is-img-fading / is-img-shown 两个类由 blog.js 的 fadeImages() 添加。
   JS 未执行时不会加类，图片照常立刻显示，不会出现「图永久透明」。
   这里用 animation 而不是 transition，是为了不覆盖封面图 hover 放大的 transform 过渡。
   ========================================================================== */
img[loading="lazy"].is-img-fading { opacity: 0; }

img[loading="lazy"].is-img-fading.is-img-shown {
    opacity: 1;
    animation: blog-img-fade .55s ease both;
}

@keyframes blog-img-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    img[loading="lazy"].is-img-fading { opacity: 1; }
    img[loading="lazy"].is-img-fading.is-img-shown { animation: none; }
}

/* ==========================================================================
   代码块卡片 / 阅读进度 / 浮动目录
   修改人：Leek  时间：2026-10-23 11:25
   ========================================================================== */

/* 1. 代码块卡片：容器负责圆角和边框，内部的 pre 去掉自己那套，避免双层描边 */
.blog-code {
    position: relative;
    margin: 1.3em 0;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--blog-code-border);
    box-shadow: var(--blog-shadow);
    background: var(--blog-code-bg);
}

.blog-code > pre,
.blog-code > pre[class*="language-"] {
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    /* 折叠时由 .is-folded 接管高度，展开后靠这段过渡回来 */
    transition: max-height .32s ease;
}

.blog-code__bar {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 38px;
    padding: 0 10px 0 15px;
    background: var(--blog-code-bar);
    border-bottom: 1px solid #262e40;
    font-family: var(--blog-mono);
    user-select: none;
}

.blog-code__lang {
    flex: 1;
    font-size: 11.5px;
    line-height: 1;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #7d8aa3;
}

/* 复制按钮原本绝对定位在 pre 右上角，搬进标签栏后走正常文档流 */
.blog-code__bar .blog-code__copy {
    position: static;
    opacity: 1;
    padding: 3px 10px;
    background: rgba(255, 255, 255, .06);
    border-color: rgba(255, 255, 255, .12);
}

.blog-code__bar .blog-code__copy:hover {
    background: rgba(255, 255, 255, .16);
}

.blog-code__fold {
    padding: 3px 10px;
    font-size: 12px;
    line-height: 1.4;
    color: #cfd8e8;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 7px;
    cursor: pointer;
    font-family: inherit;
    transition: background .2s, color .2s;
    white-space: nowrap;
}

.blog-code__fold:hover {
    background: rgba(255, 255, 255, .16);
    color: #fff;
}

/* 「共 N 行」只在折叠状态显示，展开后按钮直接变「收起」 */
.blog-code:not(.is-folded) .blog-code__fold-num { display: none; }

.blog-code.is-folded > pre {
    max-height: 320px;
    /* 只裁纵向：横向长代码行仍然要能左右滚动，否则右侧内容直接被切掉 */
    overflow-x: auto;
    overflow-y: hidden;
}

/* 折叠时底部压一层渐变，暗示「下面还有」 */
.blog-code::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 64px;
    background: linear-gradient(to top, var(--blog-code-bg) 20%, transparent);
    pointer-events: none;
    opacity: 0;
    transition: opacity .25s ease;
}

.blog-code.is-folded::after { opacity: 1; }

/* 2. 阅读进度：右侧竖线，和顶部那条加载进度条互不干扰 */
.blog-reading {
    position: fixed;
    top: 0;
    right: 0;
    width: 3px;
    height: 100vh;
    z-index: 9998;
    pointer-events: none;
    opacity: 0;
    transition: opacity .3s ease;
    background: rgba(47, 107, 255, .07);
}

.blog-reading.is-active { opacity: 1; }

.blog-reading__bar {
    width: 100%;
    height: 100%;
    transform: scaleY(0);
    transform-origin: top center;
    background: linear-gradient(180deg, var(--blog-primary) 0%, #7b98ff 100%);
    border-radius: 0 0 3px 3px;
    will-change: transform;
}

/* 3. 浮动目录 */
.blog-toc[hidden] { display: none !important; }

.blog-toc {
    padding: 18px 16px 16px;
    background: var(--blog-card);
    border-radius: var(--blog-radius);
    box-shadow: var(--blog-shadow);
    border: 1px solid var(--blog-border);
}

.blog-toc__title {
    margin: 0 0 12px 4px;
    font-size: 14px;
    font-weight: 600;
    color: var(--blog-text);
    letter-spacing: .02em;
}

.blog-toc__list {
    display: grid;
    gap: 1px;
    max-height: calc(100vh - 320px);
    overflow: auto;
    overscroll-behavior: contain;
}

.blog-toc__item a {
    display: block;
    padding: 6px 10px;
    font-size: 13.5px;
    line-height: 1.55;
    color: var(--blog-text-sub);
    border-left: 2px solid transparent;
    border-radius: 0 6px 6px 0;
    transition: color .18s, background .18s, border-color .18s;
}

.blog-toc__item.is-sub a {
    padding-left: 22px;
    font-size: 13px;
    color: var(--blog-text-mute);
}

.blog-toc__item a:hover {
    color: var(--blog-primary);
    background: var(--blog-primary-light);
}

.blog-toc__item a.is-cur {
    color: var(--blog-primary);
    background: var(--blog-primary-light);
    border-left-color: var(--blog-primary);
    font-weight: 600;
}

/* 点目录跳转时别被 sticky 头部盖住标题 */
.blog-content h2,
.blog-content h3 {
    scroll-margin-top: 92px;
}

.blog-toc__list::-webkit-scrollbar { width: 6px; }
.blog-toc__list::-webkit-scrollbar-thumb {
    background: var(--blog-border);
    border-radius: 6px;
}

/* 窄屏：目录在正文之后才出现，价值不大，直接收起；竖向进度条也收窄一档 */
@media (max-width: 980px) {
    .blog-toc { display: none !important; }
    .blog-reading { width: 2px; }
}

/* 窄屏代码块：语言标签可省略号，按钮收紧，保证「复制 + 展开」放得下 */
@media (max-width: 600px) {
    .blog-code__bar {
        height: 34px;
        padding: 0 8px 0 12px;
        gap: 6px;
    }

    .blog-code__lang {
        min-width: 0;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
        font-size: 10.5px;
    }

    .blog-code__bar .blog-code__copy,
    .blog-code__fold {
        flex: none;
        padding: 2px 8px;
        font-size: 11px;
    }

    .blog-code__fold-num { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
    .blog-code > pre { transition: none; }
    .blog-reading { transition: none; }
    .blog-reading__bar { transition: none; }
}

/* ==========================================================================
   暗色模式：顶栏切换按钮
   修改人：Leek  时间：2026-10-23 11:45
   图标由 html[data-theme] 控制显隐，JS 只切属性，不碰 DOM 结构。
   ========================================================================== */

.blog-theme {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid var(--blog-border);
    border-radius: 10px;
    background: var(--blog-card);
    color: var(--blog-text-sub);
    cursor: pointer;
    transition: color .2s, border-color .2s, background .2s, transform .2s;
}

.blog-theme:hover {
    color: var(--blog-primary);
    border-color: var(--blog-line);
    transform: translateY(-1px);
}

.blog-theme:active { transform: none; }

/* 浅色看月亮（点一下进暗），暗色看太阳。
   注意别写成 .blog-theme svg { display: block }：那个选择器权重 (0,1,1)
   会压过 .blog-theme__sun 的 (0,1,0)，两个图标会一起显示出来。 */
.blog-theme__moon { display: block; }
.blog-theme__sun { display: none; }
html[data-theme="dark"] .blog-theme__moon { display: none; }
html[data-theme="dark"] .blog-theme__sun { display: block; }

/* 暗色下首屏深色区块和页面底几乎同色，补一道细边把层次拉开 */
html[data-theme="dark"] .blog-hero--home { border-bottom: 1px solid var(--blog-border); }

/* 暗色下正文里的图片容易过亮，轻微降一点，但不加滤镜失真 */
html[data-theme="dark"] .blog-content img { opacity: .94; }
