@import url('tokens.css?v=10');

/* =========================================================
   YunQing Blog — 深黑质感程序员博客设计系统
   主色 #1A1A1A · 卡片 #2D2D2D · 颗粒/纸张纹理
   ========================================================= */

/* ---- 主题专属变量（纹理/渐变/头像/视觉卡） ---- */
:root {
    --bg-glow-1: rgba(10, 132, 255, 0.08);
    --bg-glow-2: rgba(88, 86, 214, 0.06);
    --bg-base-grad:
        radial-gradient(ellipse 80% 60% at 50% 30%, rgba(255,255,255,0.025), transparent 70%),
        radial-gradient(1200px 600px at 80% -10%, var(--bg-glow-1), transparent 60%),
        radial-gradient(900px 500px at 0% 0%, var(--bg-glow-2), transparent 55%),
        linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 100%);
    --avatar-grad: linear-gradient(135deg, #1a1a1d 0%, #2a2a2d 100%);
    --avatar-shadow: 0 4px 12px rgba(0,0,0,0.5), 0 12px 32px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.14), inset 0 -2px 6px rgba(0,0,0,0.6);
    --card-grad-hero: linear-gradient(135deg, var(--bg-card) 0%, #181818 100%);
    --fold-grad: linear-gradient(180deg, transparent 0%, transparent 48%, rgba(255,255,255,0.018) 50%, transparent 52%, transparent 100%);
    --visual-edge-border: 1px solid rgba(255, 255, 255, 0.12);
    --visual-edge-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
    color-scheme: dark;
}

/* ---------- 浅色主题纹理派生（基础令牌见 tokens.css） ---------- */
[data-theme="light"] {
    /* 纹理/渐变派生变量（基础令牌见 tokens.css） */
    --card-grad-hero: linear-gradient(135deg, var(--bg-card) 0%, #dedee3 100%);
    --fold-grad: linear-gradient(180deg, transparent 48%, rgba(0,0,0,0.02) 50%, transparent 52%);
    --bg-glow-1: rgba(0, 113, 227, 0.06);
    --bg-glow-2: rgba(88, 86, 214, 0.04);
    --bg-base-grad:
        radial-gradient(ellipse 80% 60% at 50% 30%, rgba(255,255,255,0.6), transparent 70%),
        radial-gradient(1200px 600px at 80% -10%, var(--bg-glow-1), transparent 60%),
        radial-gradient(900px 500px at 0% 0%, var(--bg-glow-2), transparent 55%),
        linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 100%);
    --avatar-grad: linear-gradient(135deg, #1d1d1f 0%, #424245 100%);
    --avatar-shadow: 0 4px 12px rgba(0,0,0,0.12), 0 12px 32px rgba(0,0,0,0.18), inset 0 2px 4px rgba(255,255,255,0.25), inset 0 -2px 6px rgba(0,0,0,0.3);
    --visual-edge-border: 1px solid rgba(0, 0, 0, 0.06);
    --visual-edge-shadow: inset 0 1px 0 rgba(255, 255, 255, 1);
}

/* 跨文档视图过渡（渐进增强） */
@view-transition { navigation: auto; }

/* 主题切换：禁用默认 cross-fade（避免先全白再过渡），由 main.js 的圆形 clip-path 独占 */
::view-transition-old(root),
::view-transition-new(root) {
    animation: none;
    mix-blend-mode: normal;
}
::view-transition-old(root) { z-index: 10; }
::view-transition-new(root) { z-index: 20; }

/* ---------- 基础重置 ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
    text-size-adjust: 100%;
    /* 常驻滚动条槽：幕布/intro 切换 overflow:hidden 时整页不再横向跳动 */
    scrollbar-gutter: stable;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-sans);
    font-size: 17px;
    line-height: 1.5;
    letter-spacing: -0.01em;
    overflow-x: hidden;
    /* 页面加载淡入 */
    animation: page-fade-in 0.5s var(--ease-out);
}
@keyframes page-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 背景层 —— 空间深度径向渐变 + 极淡折痕（z-index:-1，不覆盖文字） */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background: var(--bg-base-grad);
    pointer-events: none;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

::selection { background: color-mix(in srgb, var(--accent) 30%, transparent); color: var(--ink); }

code, pre, kbd, samp { font-family: var(--font-mono); }

/* ---------- 通用区块 ---------- */
.section-head {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 var(--gutter);
    margin-bottom: 36px;
}
.section-head--row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}
.section-head__title {
    margin: 0;
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 600;
    letter-spacing: -0.025em;
    line-height: 1.1;
}
.section-head__sub {
    margin: 10px 0 0;
    color: var(--ink-3);
    font-size: 16px;
    font-weight: 400;
}
.section-head__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--accent);
    font-size: 15px;
    font-weight: 500;
    transition: gap var(--dur) var(--ease);
}
.section-head__link:hover { gap: 10px; }

/* 页面标题区（内页通用） */
.page-head {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 140px var(--gutter) 40px;
}
.page-head__eyebrow {
    display: inline-block;
    font-size: 13px;
    color: var(--accent);
    font-weight: 500;
    letter-spacing: 0.02em;
    margin-bottom: 16px;
    font-family: var(--font-mono);
}
.page-head__title {
    margin: 0;
    font-size: clamp(34px, 5.5vw, 56px);
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.05;
}
.page-head__desc {
    margin: 20px 0 0;
    color: var(--ink-3);
    font-size: clamp(16px, 1.6vw, 19px);
    max-width: 620px;
    line-height: 1.55;
}

/* =========================================================
   导航栏 —— 极简悬浮玻璃 · 丝滑滑动胶囊
   ========================================================= */
.nav {
    view-transition-name: nav;
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    /* 顶部：轻薄玻璃、无边界线；滚动后加浓、出现发丝线与投影 */
    background: var(--glass-bg);
    backdrop-filter: saturate(180%) blur(24px);
    -webkit-backdrop-filter: saturate(180%) blur(24px);
    border-bottom: 1px solid transparent;
    transition: background 0.5s var(--ease),
                border-color 0.5s var(--ease),
                box-shadow 0.5s var(--ease);
}
.nav.is-scrolled {
    background: var(--glass-bg-strong);
    border-bottom-color: var(--line);
    box-shadow: var(--shadow-sm);
}
.nav__inner {
    position: relative;
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 var(--gutter);
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logo —— 融入环境，不抢视觉 */
.nav__logo {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 9px;
    transition: opacity var(--dur-fast) var(--ease-out);
}
.nav__logo:hover { opacity: 0.72; }
.nav__logo:active { opacity: 0.55; }
.nav__logo-img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    transition: filter 0.5s var(--ease);
}
.nav__logo-text {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.015em;
    color: var(--ink);
}
:root:not([data-theme="light"]) .nav__logo-img { filter: invert(1); }
[data-theme="light"] .nav__logo-img { filter: none; }

/* 链接组：桌面端绝对居中 */
.nav__links {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 4px;
}

/* 滑动胶囊指示器（JS 注入，桌面端） */
.nav__indicator {
    position: absolute;
    top: 50%;
    left: 0;
    height: 34px;
    margin-top: -17px;
    border-radius: var(--radius-pill);
    background: var(--nav-pill-bg);
    border: 1px solid var(--nav-pill-border);
    box-shadow: var(--nav-pill-shadow);
    opacity: 0;
    pointer-events: none;
    z-index: 0;
    transform: translate3d(0, 0, 0);
    transform-origin: 50% 50%;
    will-change: transform;
    /* 只过渡合成属性：宽度由 JS 瞬切，位移/拉伸走 translateX+scaleX，零 layout */
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
                opacity 0.3s var(--ease);
}
.nav__indicator.is-ready { opacity: 1; }

.nav__link {
    position: relative;
    z-index: 1;
    padding: 8px 15px;
    border-radius: var(--radius-pill);
    font-size: 13.5px;
    font-weight: 400;
    letter-spacing: 0.01em;
    color: var(--ink-3);
    white-space: nowrap;
    transition: color var(--dur-fast) var(--ease-out);
}
/* 悬停柔光层（中性，不用强调色） */
.nav__link::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    background: var(--hover-bg);
    opacity: 0;
    transform: scale(0.88);
    transition: opacity 0.28s var(--ease-out),
                transform 0.28s var(--ease-out),
                background var(--dur-fast) var(--ease-out);
}
.nav__link:hover { color: var(--ink); }
.nav__link:hover::before { opacity: 1; transform: scale(1); }
.nav__link:active::before { background: var(--hover-bg-strong); }
/* 当前页：文字提亮，背景交给胶囊指示器 */
.nav__link[aria-current="page"] {
    color: var(--ink);
    font-weight: 500;
}
.nav__link[aria-current="page"]::before { opacity: 0; }

/* 右侧操作区 */
.nav__actions {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 4px;
}
.nav__icon, .theme-toggle {
    width: 36px; height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--ink-3);
    transition: color var(--dur-fast) var(--ease-out),
                background var(--dur-fast) var(--ease-out),
                transform 0.15s var(--ease-out);
}
.nav__icon:hover, .theme-toggle:hover {
    background: var(--hover-bg);
    color: var(--ink);
}
.nav__icon:active, .theme-toggle:active {
    background: var(--hover-bg-strong);
    transform: scale(0.92);
}

/* 主题切换按钮 —— 日月旋转 morph */
.theme-toggle { position: relative; }
.theme-toggle__icon {
    position: absolute;
    width: 18px; height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1),
                opacity 0.35s var(--ease);
}
.theme-toggle__icon--sun {
    opacity: 0;
    transform: rotate(-100deg) scale(0.4);
}
.theme-toggle__icon--moon {
    opacity: 1;
    transform: rotate(0) scale(1);
}
/* 默认深色主题 → 显示月亮；浅色 → 显示太阳 */
[data-theme="light"] .theme-toggle__icon--sun {
    opacity: 1;
    transform: rotate(0) scale(1);
}
[data-theme="light"] .theme-toggle__icon--moon {
    opacity: 0;
    transform: rotate(100deg) scale(0.4);
}

/* 移动端菜单按钮（桌面隐藏） */
.nav__menu-btn {
    display: none;
    width: 38px; height: 38px;
    border-radius: 50%;
    position: relative;
    transition: background var(--dur-fast) var(--ease-out),
                transform 0.15s var(--ease-out);
}
.nav__menu-btn:hover { background: var(--hover-bg); }
.nav__menu-btn:active { transform: scale(0.92); }
.nav__menu-btn span {
    position: absolute;
    left: 50%;
    width: 16px; height: 1.5px;
    background: var(--ink-2);
    border-radius: 1px;
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
                top 0.3s var(--ease-out);
}
.nav__menu-btn span:nth-child(1) { top: 14.5px; transform: translateX(-50%); }
.nav__menu-btn span:nth-child(2) { top: 22px; transform: translateX(-50%); }
.nav__menu-btn.is-open span:nth-child(1) {
    top: 50%;
    transform: translateX(-50%) translateY(-50%) rotate(45deg);
}
.nav__menu-btn.is-open span:nth-child(2) {
    top: 50%;
    transform: translateX(-50%) translateY(-50%) rotate(-45deg);
}

/* 移动端抽屉内的搜索入口（JS 注入，桌面隐藏） */
.nav__mobile-search { display: none; }

/* 搜索面板 —— grid 行高展开，丝滑无跳变 */
.nav__search {
    position: absolute;
    top: 100%; left: 0; right: 0;
    display: grid;
    grid-template-rows: 0fr;
    background: var(--glass-bg-strong);
    backdrop-filter: saturate(180%) blur(24px);
    -webkit-backdrop-filter: saturate(180%) blur(24px);
    border-bottom: 1px solid transparent;
    transition: grid-template-rows 0.42s cubic-bezier(0.22, 1, 0.36, 1),
                border-color 0.42s var(--ease),
                box-shadow 0.42s var(--ease);
}
.nav__search.is-open {
    grid-template-rows: 1fr;
    border-bottom-color: var(--line);
    box-shadow: var(--shadow-md);
}
.nav__search-inner {
    min-height: 0;
    overflow: hidden;
    width: 100%;
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 var(--gutter);
    display: flex;
    align-items: center;
    gap: 12px;
    transition: padding 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}
.nav__search.is-open .nav__search-inner { padding: 14px var(--gutter); }
.nav__search-inner > * {
    opacity: 0;
    transform: translateY(-5px);
    transition: opacity 0.3s var(--ease) 0.06s,
                transform 0.38s cubic-bezier(0.22, 1, 0.36, 1) 0.06s;
}
.nav__search.is-open .nav__search-inner > * {
    opacity: 1;
    transform: translateY(0);
}
.nav__search-icon { color: var(--ink-3); flex-shrink: 0; }
#searchInput {
    flex: 1;
    border: none;
    background: none;
    outline: none;
    font-size: 16px;
    font-family: inherit;
    color: var(--ink);
    letter-spacing: -0.01em;
}
#searchInput::placeholder { color: var(--ink-4); }
.nav__search-hint {
    font-size: 11px;
    letter-spacing: 0.06em;
    color: var(--ink-4);
    padding: 3px 7px;
    border: 1px solid var(--line);
    border-radius: 6px;
    font-family: var(--font-mono);
}

/* 键盘焦点可见性（中性描边，不破坏质感） */
.nav__link:focus-visible,
.nav__icon:focus-visible,
.theme-toggle:focus-visible,
.nav__menu-btn:focus-visible,
.nav__mobile-search:focus-visible {
    outline: 2px solid var(--line-strong);
    outline-offset: 2px;
}
#searchInput:focus-visible { outline: none; }

/* =========================================================
   页面切换 —— 跨文档视图过渡（与深浅模式切换同款圆形扩散，
   动画由 head 内联脚本在 pagereveal 中驱动，见各页 <head>）
   ========================================================= */
/* 视图过渡期间禁用 body 首屏淡入，否则快照会拍到 opacity:0 的空页 */
html[data-nav] body { animation: none; }

/* =========================================================
   卡片通用基类 —— 深黑质感
   ========================================================= */
.card {
    background: var(--card-grad);
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm), var(--edge-light);
    transition: transform var(--dur) var(--ease-out),
                box-shadow var(--dur) var(--ease),
                border-color var(--dur) var(--ease);
}

/* =========================================================
   首页 Hero
   ========================================================= */
.hero {
    padding: 140px 0 80px;
    position: relative;
}
.hero__inner {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 var(--gutter);
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: clamp(32px, 5vw, 72px);
    align-items: center;
}
.hero__eyebrow {
    display: inline-block;
    font-size: 13px;
    font-weight: 500;
    color: var(--accent);
    letter-spacing: 0.02em;
    margin-bottom: 20px;
    font-family: var(--font-mono);
}
.hero__title {
    margin: 0;
    font-size: clamp(38px, 6vw, 64px);
    font-weight: 600;
    line-height: 1.05;
    letter-spacing: -0.035em;
    color: var(--ink);
}
.hero__desc {
    margin: 24px 0 28px;
    font-size: clamp(17px, 1.6vw, 19px);
    line-height: 1.55;
    color: var(--ink-3);
    max-width: 520px;
}
.hero__meta {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--ink-4);
    font-size: 14px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}
.hero__meta-dot { opacity: 0.5; }
.hero__cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    background: var(--accent);
    color: #fff;
    border-radius: var(--radius-pill);
    font-size: 15px;
    font-weight: 500;
    box-shadow: 0 8px 20px rgba(10, 132, 255, 0.28);
    transition: transform var(--dur) var(--ease-out),
                box-shadow var(--dur) var(--ease),
                background var(--dur) var(--ease);
}
.hero__cta:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(10, 132, 255, 0.36);
}
.hero__cta svg { transition: transform var(--dur) var(--ease-out); }
.hero__cta:hover svg { transform: translateX(3px); }

/* Hero 视觉卡 —— 深黑纹理质感 */
.hero__visual {
    position: relative;
    aspect-ratio: 1 / 1;
    max-width: 460px;
    width: 100%;
    justify-self: end;
}
.hero__visual-card {
    position: absolute;
    inset: 0;
    border-radius: var(--radius-xl);
    background: var(--card-grad-hero);
    box-shadow: var(--shadow-xl), var(--edge-light-strong);
    overflow: hidden;
    transform: perspective(1000px) rotateY(-8deg) rotateX(4deg);
    transition: transform 0.6s var(--ease-out), box-shadow 0.6s var(--ease);
}
.hero__visual:hover .hero__visual-card {
    transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
}
.hero__visual-glow {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 30% 20%, color-mix(in srgb, var(--accent) 28%, transparent), transparent 50%),
        radial-gradient(circle at 75% 80%, rgba(88, 86, 214, 0.22), transparent 55%);
    filter: blur(10px);
}
.hero__visual-card::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: var(--visual-edge-border);
    box-shadow: var(--visual-edge-shadow);
    pointer-events: none;
}
/* 视觉卡内代码装饰 */
.hero__code {
    position: absolute;
    inset: 32px;
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.7;
    color: var(--ink-3);
    z-index: 1;
}
.hero__code .c-key { color: var(--accent); }
.hero__code .c-str { color: #34c759; }
.hero__code .c-com { color: var(--ink-4); }

/* =========================================================
   分类网格
   ========================================================= */
.categories { padding: 72px 0; }
.categories__grid {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 var(--gutter);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
.category {
    --accent: var(--accent);
    position: relative;
    padding: 28px 26px;
    border-radius: var(--radius-md);
    background: var(--card-grad);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm), var(--edge-light);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 130px;
    overflow: hidden;
    transition: transform var(--dur) var(--ease-out),
                box-shadow var(--dur) var(--ease),
                border-color var(--dur) var(--ease);
}
.category::before {
    content: "";
    position: absolute;
    left: 0; top: 0;
    width: 4px; height: 100%;
    background: var(--accent-line);
    transform: scaleY(0.4);
    transform-origin: center;
    opacity: 0.6;
    transition: transform var(--dur) var(--ease-out), opacity var(--dur) var(--ease), background var(--dur) var(--ease);
}
.category:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg), var(--edge-light-strong);
    border-color: transparent;
}
.category:hover::before {
    transform: scaleY(1);
    opacity: 1;
}
.category__count {
    font-size: 32px;
    font-weight: 600;
    color: var(--ink);
    letter-spacing: -0.02em;
    line-height: 1;
    font-family: var(--font-mono);
}
.category__name {
    font-size: 16px;
    font-weight: 500;
    color: var(--ink-2);
}

/* =========================================================
   文章卡（网格版，首页/通用）
   ========================================================= */
.articles { padding: 72px 0 88px; }
.articles__grid {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 var(--gutter);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}
.article-card {
    background: var(--card-grad-soft);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm), var(--edge-light);
    transition: transform var(--dur) var(--ease-out),
                box-shadow var(--dur) var(--ease),
                border-color var(--dur) var(--ease);
    display: flex;
    flex-direction: column;
}
.article-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl), var(--edge-light-strong);
    border-color: transparent;
}
.article-card--lg { grid-column: span 2; grid-row: span 2; }
.article-card--lg .article-card__media { aspect-ratio: 16 / 10; }
.article-card--lg .article-card__title { font-size: 26px; }
.article-card--lg .article-card__excerpt { font-size: 16px; }

.article-card__media {
    display: block;
    aspect-ratio: 16 / 11;
    overflow: hidden;
    position: relative;
}
.article-card__cover {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--accent) 18%, var(--bg-card)) 0%, color-mix(in srgb, var(--accent) 6%, var(--bg-soft)) 100%);
    transition: transform 0.6s var(--ease-out);
    display: flex;
    align-items: flex-start;
    padding: 18px;
}
.article-card:hover .article-card__cover { transform: scale(1.04); }
.article-card__cover::after {
    content: "";
    position: absolute;
    right: -20%; bottom: -30%;
    width: 60%; height: 160%;
    background: radial-gradient(circle, color-mix(in srgb, var(--accent) 30%, transparent), transparent 60%);
    filter: blur(20px);
    opacity: 0.6;
}
.article-card__tag {
    position: relative;
    z-index: 1;
    padding: 5px 12px;
    background: var(--tag-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--radius-pill);
    font-size: 12px;
    font-weight: 500;
    color: var(--ink-2);
    font-family: var(--font-mono);
}
.article-card__body {
    padding: 22px 24px 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.article-card__date {
    font-size: 13px;
    color: var(--ink-4);
    margin-bottom: 8px;
    font-family: var(--font-mono);
}
.article-card__title {
    margin: 0 0 10px;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.02em;
    color: var(--ink);
}
.article-card__excerpt {
    margin: 0 0 18px;
    color: var(--ink-3);
    font-size: 14px;
    line-height: 1.55;
}
.article-card__foot {
    margin-top: auto;
    font-size: 13px;
    color: var(--ink-4);
    font-family: var(--font-mono);
}

/* =========================================================
   文章页 —— 列表式行卡 + 分类筛选
   ========================================================= */
.filter-bar {
    max-width: var(--maxw);
    margin: 0 auto 40px;
    padding: 0 var(--gutter);
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.filter-bar__chip {
    padding: 8px 16px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--line);
    background: transparent;
    color: var(--ink-3);
    font-size: 14px;
    font-family: var(--font-mono);
    transition: all var(--dur) var(--ease);
}
.filter-bar__chip:hover {
    background: var(--hover-bg);
    color: var(--ink);
}
.filter-bar__chip.is-active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.article-list {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 var(--gutter) 88px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.article-row {
    display: grid;
    grid-template-columns: 120px 1fr auto;
    gap: 28px;
    align-items: center;
    padding: 24px 28px;
    background: var(--card-grad);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm), var(--edge-light);
    transition: transform var(--dur) var(--ease-out),
                box-shadow var(--dur) var(--ease),
                border-color var(--dur) var(--ease);
}
.article-row:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg), var(--edge-light-strong);
    border-color: transparent;
}
.article-row__date {
    color: var(--ink-4);
    font-size: 13px;
    font-family: var(--font-mono);
}
.article-row__main { min-width: 0; }
.article-row__tag {
    display: inline-block;
    font-size: 12px;
    color: var(--accent);
    font-family: var(--font-mono);
    margin-bottom: 6px;
}
.article-row__title {
    margin: 0 0 6px;
    font-size: 19px;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--ink);
}
.article-row__excerpt {
    margin: 0;
    color: var(--ink-3);
    font-size: 14px;
    line-height: 1.5;
}
.article-row__meta {
    color: var(--ink-4);
    font-size: 13px;
    font-family: var(--font-mono);
    white-space: nowrap;
}

/* 分页 */
.pagination {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 var(--gutter) 88px;
    display: flex;
    justify-content: center;
    gap: 8px;
}
.pagination__btn {
    min-width: 38px; height: 38px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    color: var(--ink-3);
    font-family: var(--font-mono);
    font-size: 14px;
    transition: all var(--dur) var(--ease);
}
.pagination__btn:hover { background: var(--hover-bg); color: var(--ink); }
.pagination__btn.is-active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

/* =========================================================
   项目页 —— 横向大卡
   ========================================================= */
.projects { padding: 0 0 88px; }
.projects__grid {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 var(--gutter);
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}
.project-card {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 32px;
    padding: 0;
    background: var(--card-grad);
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md), var(--edge-light);
    overflow: hidden;
    transition: transform var(--dur) var(--ease-out),
                box-shadow var(--dur) var(--ease),
                border-color var(--dur) var(--ease);
}
.project-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl), var(--edge-light-strong);
    border-color: transparent;
}
.project-card__visual {
    position: relative;
    min-height: 220px;
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--accent, var(--accent)) 20%, var(--bg-card)) 0%, var(--bg-soft) 100%);
    border-right: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: center;
}
.project-card__visual-glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--accent, var(--accent)) 35%, transparent), transparent 60%);
    opacity: 0.7;
}
.project-card__visual-label {
    position: relative;
    z-index: 1;
    font-family: var(--font-mono);
    font-size: 15px;
    color: var(--ink-2);
    letter-spacing: 0.05em;
}
.project-card__body {
    padding: 32px 32px 32px 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.project-card__tag {
    font-size: 12px;
    color: var(--accent);
    font-family: var(--font-mono);
    letter-spacing: 0.05em;
}
.project-card__title {
    margin: 0;
    font-size: clamp(22px, 3vw, 28px);
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--ink);
}
.project-card__desc {
    margin: 0;
    color: var(--ink-3);
    font-size: 15px;
    line-height: 1.6;
}
.project-card__stack {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 4px;
}
.project-card__stack span {
    padding: 4px 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    font-size: 12px;
    color: var(--ink-3);
    font-family: var(--font-mono);
}
.project-card__links {
    display: flex;
    gap: 16px;
    margin-top: 8px;
}
.project-card__link {
    font-size: 14px;
    color: var(--accent);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
    transition: gap var(--dur) var(--ease);
}
.project-card__link:hover { gap: 10px; }

/* =========================================================
   笔记页 —— 时间线紧凑卡流
   ========================================================= */
.notes { padding: 0 0 88px; }
.notes__list {
    max-width: 760px;
    margin: 0 auto;
    padding: 0 var(--gutter);
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.note-card {
    padding: 22px 26px;
    background: var(--card-grad-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xs), var(--edge-light);
    transition: transform var(--dur) var(--ease-out),
                box-shadow var(--dur) var(--ease),
                border-color var(--dur) var(--ease);
}
.note-card:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-md), var(--edge-light-strong);
    border-color: transparent;
}
.note-card__head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}
.note-card__time {
    font-size: 13px;
    color: var(--ink-4);
    font-family: var(--font-mono);
}
.note-card__tag {
    padding: 3px 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    font-size: 11px;
    color: var(--ink-3);
    font-family: var(--font-mono);
}
.note-card__title {
    margin: 0 0 8px;
    font-size: 17px;
    font-weight: 600;
    color: var(--ink);
    letter-spacing: -0.01em;
}
.note-card__body {
    margin: 0;
    color: var(--ink-3);
    font-size: 15px;
    line-height: 1.6;
}
.note-card__code {
    margin: 12px 0 0;
    padding: 14px 16px;
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--ink-2);
    line-height: 1.6;
    overflow-x: auto;
}

/* =========================================================
   关于页 —— 作者卡 + 技能/经历 + 联系
   ========================================================= */
.about { padding: 0 0 64px; }
.about__card {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: clamp(36px, 5vw, 60px);
    background: var(--card-grad);
    border-radius: var(--radius-xl);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-lg), var(--edge-light-strong);
    display: grid;
    grid-template-columns: auto 1fr;
    gap: clamp(28px, 4vw, 48px);
    align-items: center;
    position: relative;
    overflow: hidden;
}
.about__card::before {
    content: "";
    position: absolute;
    top: -50%; right: -10%;
    width: 60%; height: 200%;
    background: radial-gradient(circle, color-mix(in srgb, var(--accent) 14%, transparent), transparent 60%);
    pointer-events: none;
}
.about__avatar {
    width: clamp(96px, 12vw, 120px);
    height: clamp(96px, 12vw, 120px);
    border-radius: 50%;
    background: var(--avatar-grad);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(40px, 5vw, 52px);
    font-weight: 500;
    letter-spacing: -0.03em;
    box-shadow: var(--avatar-shadow);
}
.about__eyebrow {
    display: inline-block;
    font-size: 13px;
    color: var(--accent);
    font-weight: 500;
    margin-bottom: 10px;
    font-family: var(--font-mono);
}
.about__name {
    margin: 0 0 12px;
    font-size: clamp(28px, 4vw, 38px);
    font-weight: 600;
    letter-spacing: -0.025em;
}
.about__bio {
    margin: 0 0 26px;
    color: var(--ink-3);
    font-size: 16px;
    line-height: 1.6;
    max-width: 620px;
}
.about__stats {
    display: flex;
    gap: 40px;
    margin-bottom: 26px;
    flex-wrap: wrap;
}
.about__stat { display: flex; flex-direction: column; gap: 4px; }
.about__stat-num {
    font-size: 28px;
    font-weight: 600;
    color: var(--ink);
    letter-spacing: -0.02em;
    font-family: var(--font-mono);
}
.about__stat-label { font-size: 13px; color: var(--ink-4); }
.about__social { display: flex; gap: 8px; flex-wrap: wrap; }
.about__social-link {
    padding: 8px 16px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-pill);
    font-size: 14px;
    color: var(--ink-2);
    transition: background var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.about__social-link:hover {
    background: var(--btn-invert-bg);
    color: var(--btn-invert-fg);
    border-color: var(--btn-invert-bg);
}

/* 技能 / 经历 */
.about__cols {
    max-width: var(--maxw);
    margin: 40px auto 0;
    padding: 0 var(--gutter);
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 40px;
}
.about__col-title {
    margin: 0 0 20px;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--ink);
}
.skill-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.skill-tag {
    padding: 6px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    font-size: 13px;
    color: var(--ink-2);
    font-family: var(--font-mono);
    background: var(--bg-card);
}
.timeline { display: flex; flex-direction: column; gap: 20px; }
.timeline__item {
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: 20px;
    padding-left: 20px;
    border-left: 1px solid var(--line);
    position: relative;
}
.timeline__item::before {
    content: "";
    position: absolute;
    left: -4px; top: 6px;
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 3px var(--bg);
}
.timeline__time {
    font-size: 13px;
    color: var(--ink-4);
    font-family: var(--font-mono);
}
.timeline__title {
    margin: 0 0 4px;
    font-size: 15px;
    font-weight: 600;
    color: var(--ink);
}
.timeline__desc {
    margin: 0;
    font-size: 14px;
    color: var(--ink-3);
    line-height: 1.55;
}

/* =========================================================
   首页：超大字 Hero + 滚动叙事 + 大字作品列表
   ========================================================= */
.hero-mega {
    min-height: auto;
    padding: 120px var(--gutter) 88px;
    display: flex;
    align-items: flex-end;
    position: relative;
}
.hero-mega__inner {
    max-width: var(--maxw);
    width: 100%;
    text-align: left;
}
.hero-mega__eyebrow {
    display: inline-block;
    font-size: 11px;
    color: var(--ink-4);
    font-family: var(--font-mono);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 28px;
}
.hero-mega__title {
    margin: 0;
    font-size: clamp(26px, 3.8vw, 44px);
    font-weight: 400;
    letter-spacing: -0.015em;
    line-height: 1.2;
    color: var(--ink);
}
.hero-mega__line {
    display: block;
}
.hero-mega__accent {
    font-style: normal;
    font-weight: 400;
    color: var(--ink);
}
.hero-mega__desc {
    max-width: 440px;
    margin: 28px 0 0;
    font-size: 14px;
    line-height: 1.7;
    color: var(--ink-3);
}
.hero-mega__scroll {
    display: none;
}
.hero-mega__cta {
    display: flex;
    gap: 10px;
    justify-content: flex-start;
    margin-top: 28px;
    flex-wrap: wrap;
}
.hero-mega__btn {
    padding: 10px 22px;
    font-size: 13px;
    font-weight: 400;
    color: var(--ink);
    background: transparent;
    border-radius: 100px;
    border: 1px solid var(--line-strong);
    transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.hero-mega__btn:hover {
    border-color: var(--ink);
    opacity: 1;
}
.hero-mega__btn--ghost {
    color: var(--ink-2);
    background: transparent;
    border-color: var(--line);
}
.hero-mega__btn--ghost:hover {
    border-color: var(--line-strong);
    color: var(--ink);
}
.hero-mega__scroll-line {
    width: 1px;
    height: 48px;
    background: linear-gradient(to bottom, var(--ink-4), transparent);
    animation: scroll-pulse 2s var(--ease) infinite;
}
@keyframes scroll-pulse {
    0%, 100% { opacity: 0.3; transform: scaleY(1); }
    50% { opacity: 1; transform: scaleY(1.1); }
}

/* 滚动叙事 */
.narrative {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 80px var(--gutter);
}
.narrative__inner {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 64px;
    align-items: center;
}
.narrative__avatar-wrap {
    position: relative;
}
.narrative__avatar {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl), var(--edge-light);
}
.narrative__text {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.narrative__label {
    font-size: 13px;
    color: var(--accent);
    font-family: var(--font-mono);
}
.narrative__heading {
    margin: 0;
    font-size: clamp(40px, 5vw, 64px);
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.05;
}
.narrative__body {
    margin: 0;
    max-width: 520px;
    font-size: 18px;
    line-height: 1.7;
    color: var(--ink-2);
}
.narrative__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    color: var(--accent);
    font-weight: 500;
    font-size: 15px;
    transition: gap var(--dur) var(--ease);
}
.narrative__link:hover { gap: 12px; }

/* 大字作品列表 */
.works {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 40px var(--gutter) 100px;
}
.works__head {
    margin-bottom: 48px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}
.works__all {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--accent);
    font-weight: 500;
    font-size: 15px;
    transition: gap var(--dur) var(--ease);
}
.works__all:hover { gap: 12px; }
.works__label {
    font-size: 13px;
    color: var(--accent);
    font-family: var(--font-mono);
}
.works__title {
    margin: 0;
    font-size: clamp(36px, 5vw, 64px);
    font-weight: 600;
    letter-spacing: -0.03em;
}
.works__title em {
    font-style: italic;
    font-weight: 400;
    color: var(--accent);
}
.works__list {
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--line);
}
.work-item {
    display: grid;
    grid-template-columns: 48px 1fr auto;
    align-items: center;
    gap: 24px;
    padding: 32px 0;
    border-bottom: 1px solid var(--line);
    transition: opacity var(--dur) var(--ease);
    cursor: pointer;
}
.work-item:hover {
    opacity: 0.7;
}
.work-item__num {
    font-size: 12px;
    color: var(--ink-4);
    font-family: var(--font-mono);
}
.work-item__body {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.work-item__title {
    margin: 0;
    font-size: clamp(20px, 2.2vw, 28px);
    font-weight: 400;
    letter-spacing: -0.015em;
    transition: color var(--dur) var(--ease);
}
.work-item:hover .work-item__title { color: var(--ink-2); }
.work-item__meta {
    font-size: 12px;
    color: var(--ink-4);
    font-family: var(--font-mono);
}
.work-item__arrow {
    color: var(--ink-4);
    transition: transform var(--dur) var(--ease-out), color var(--dur) var(--ease);
}
.work-item:hover .work-item__arrow {
    transform: translateX(6px);
    color: var(--ink-2);
}

/* 分类条带 */
.topics {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 var(--gutter) 64px;
}
.topics__inner {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--line);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}
.topic {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 36px 20px;
    background: var(--bg);
    transition: background var(--dur) var(--ease);
    position: relative;
}
.topic:hover {
    background: var(--hover-bg);
}
.topic__count {
    font-size: 24px;
    font-weight: 400;
    color: var(--ink);
    letter-spacing: -0.015em;
    font-variant-numeric: tabular-nums;
}
.topic__name {
    font-size: 12px;
    color: var(--ink-4);
    font-family: var(--font-mono);
    letter-spacing: 0.04em;
}

/* CTA 收尾 */
.cta-end {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 120px var(--gutter) 140px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}
.cta-end__title {
    margin: 0;
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 400;
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: var(--ink-2);
}
.cta-end__title em {
    font-style: normal;
    font-weight: 400;
    color: inherit;
}
.cta-end__btn {
    padding: 14px 36px;
    font-size: 14px;
    font-weight: 400;
    color: var(--ink);
    background: transparent;
    border-radius: 100px;
    border: 1px solid var(--line-strong);
    transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.cta-end__btn:hover {
    border-color: var(--ink);
}

@media (max-width: 768px) {
    .narrative__inner { grid-template-columns: 1fr; gap: 32px; }
    .narrative__avatar-wrap { max-width: 200px; margin: 0 auto; }
    .narrative__text { text-align: center; align-items: center; }
    .work-item { grid-template-columns: 32px 1fr auto; gap: 16px; }
    .topics__inner { grid-template-columns: repeat(2, 1fr); }
    .footer__inner { grid-template-columns: 1fr; }
    .footer__mega-text { font-size: clamp(60px, 22vw, 120px); }
}
@media (max-width: 480px) {
    .topics__inner { grid-template-columns: 1fr; }
}

/* =========================================================
   页脚
   ========================================================= */
.footer {
    background: var(--bg-soft);
    border-top: 1px solid var(--line);
    padding: 0 0 28px;
    overflow: hidden;
}
.footer__mega {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 80px var(--gutter) 60px;
    overflow: hidden;
}
.footer__mega-text {
    display: block;
    font-size: clamp(80px, 18vw, 240px);
    font-weight: 700;
    letter-spacing: -0.05em;
    line-height: 0.85;
    color: transparent;
    -webkit-text-stroke: 1.5px var(--ink-4);
    text-stroke: 1.5px var(--ink-4);
    opacity: 0.5;
    white-space: nowrap;
}
.footer__inner {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 var(--gutter);
    display: grid;
    grid-template-columns: 1.4fr 2fr;
    gap: 48px;
    margin-bottom: 40px;
}
.footer__brand {
    display: flex;
    align-items: center;
    gap: 16px;
}
.footer__logo-img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
[data-theme="dark"] .footer__logo-img { filter: invert(1); }
.footer__tagline {
    margin: 0;
    color: var(--ink);
    font-size: 16px;
    font-weight: 500;
}
.footer__subtag {
    margin: 4px 0 0;
    color: var(--ink-3);
    font-size: 13px;
}
.footer__cols {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.footer__col { display: flex; flex-direction: column; gap: 10px; }
.footer__col-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--ink-4);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 4px;
    font-family: var(--font-mono);
}
.footer__col a {
    font-size: 14px;
    color: var(--ink-2);
    transition: color var(--dur) var(--ease);
}
.footer__col a:hover { color: var(--accent); }
.footer__bottom {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 24px var(--gutter) 0;
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--ink-4);
    font-family: var(--font-mono);
}
.footer__bottom-meta { font-style: italic; }

/* =========================================================
   滚动揭示动画
   ========================================================= */
[data-reveal] {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}
[data-reveal].is-revealed { opacity: 1; transform: translateY(0); }

/* =========================================================
   响应式
   ========================================================= */
@media (max-width: 980px) {
    .hero__inner { grid-template-columns: 1fr; }
    .hero__visual { order: -1; max-width: 320px; margin: 0 auto; justify-self: center; }
    .articles__grid { grid-template-columns: repeat(2, 1fr); }
    .article-card--lg { grid-column: span 2; grid-row: auto; }
    .project-card { grid-template-columns: 1fr; }
    .project-card__visual { min-height: 160px; border-right: none; border-bottom: 1px solid var(--line); }
    .project-card__body { padding: 28px; }
    .about__cols { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .nav__links {
        position: fixed;
        top: 60px; left: 0; right: 0;
        background: var(--glass-bg-strong);
        backdrop-filter: saturate(180%) blur(24px);
        -webkit-backdrop-filter: saturate(180%) blur(24px);
        flex-direction: column;
        align-items: stretch;
        padding: 10px var(--gutter) 18px;
        gap: 2px;
        border-bottom: 1px solid var(--line);
        box-shadow: var(--shadow-lg);
        transform: translateY(-10px);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
                    opacity 0.32s var(--ease),
                    visibility 0.45s var(--ease);
    }
    .nav__links.is-open {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }
    /* 桌面滑动胶囊在移动端隐藏，当前页改用语义柔光底 */
    .nav__indicator { display: none; }
    .nav__link {
        padding: 13px 15px;
        font-size: 16px;
        border-radius: var(--radius-md);
    }
    .nav__link[aria-current="page"]::before { opacity: 1; transform: scale(1); }

    /* 抽屉条目错落入场 */
    .nav__links > .nav__link,
    .nav__links > .nav__mobile-search {
        opacity: 0;
        transform: translateY(-7px);
        transition: opacity 0.32s var(--ease-out),
                    transform 0.38s cubic-bezier(0.22, 1, 0.36, 1),
                    color var(--dur-fast) var(--ease-out),
                    background var(--dur-fast) var(--ease-out);
    }
    .nav__links.is-open > .nav__link,
    .nav__links.is-open > .nav__mobile-search {
        opacity: 1;
        transform: translateY(0);
    }
    .nav__links.is-open > *:nth-child(1) { transition-delay: 0.05s; }
    .nav__links.is-open > *:nth-child(2) { transition-delay: 0.09s; }
    .nav__links.is-open > *:nth-child(3) { transition-delay: 0.13s; }
    .nav__links.is-open > *:nth-child(4) { transition-delay: 0.17s; }
    .nav__links.is-open > *:nth-child(5) { transition-delay: 0.21s; }
    .nav__links.is-open > *:nth-child(7) { transition-delay: 0.26s; }

    /* 抽屉内搜索入口 */
    .nav__mobile-search {
        display: block;
        width: 100%;
        margin-top: 8px;
        padding: 13px 15px;
        border-top: 1px solid var(--line);
        border-radius: var(--radius-md);
        font-family: inherit;
        font-size: 16px;
        text-align: left;
        color: var(--ink-3);
        transition: color var(--dur-fast) var(--ease-out),
                    background var(--dur-fast) var(--ease-out);
    }
    .nav__mobile-search:hover { color: var(--ink); background: var(--hover-bg); }
    .nav__mobile-search:active { background: var(--hover-bg-strong); }

    .nav__menu-btn { display: inline-flex; }
    .nav__icon { display: none; }
    .categories__grid { grid-template-columns: repeat(2, 1fr); }
    .about__card { grid-template-columns: 1fr; text-align: center; justify-items: center; }
    .about__stats { justify-content: center; }
    .about__social { justify-content: center; }
    .article-row { grid-template-columns: 1fr; gap: 12px; }
    .article-row__meta { text-align: right; }
    .footer__inner { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 520px) {
    body { font-size: 16px; }
    .hero { padding: 110px 0 60px; }
    .hero__visual { display: none; }
    .articles__grid { grid-template-columns: 1fr; }
    .article-card--lg { grid-column: auto; }
    .categories__grid { grid-template-columns: 1fr; }
    .about__stats { gap: 24px; }
    .footer__cols { grid-template-columns: repeat(2, 1fr); }
    .footer__bottom { flex-direction: column; gap: 8px; text-align: center; }
    .timeline__item { grid-template-columns: 1fr; gap: 6px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    html { scroll-behavior: auto; }
    @view-transition { navigation: none; }
}

/* =========================================================
   单列叙事流布局
   ========================================================= */
.hero--narrative {
    padding: 140px 0 80px;
}
.hero__inner--narrative {
    max-width: 860px;
    text-align: center;
    align-items: center;
    gap: 20px;
}
.hero__title--narrative {
    font-size: clamp(40px, 6vw, 68px);
    line-height: 1.05;
    margin: 0;
}
.hero__desc--narrative {
    max-width: 620px;
    font-size: clamp(16px, 1.4vw, 19px);
    line-height: 1.7;
    margin: 0 auto;
}

.story {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 40px var(--gutter) 80px;
}
.story__list {
    display: flex;
    flex-direction: column;
    gap: 48px;
}
.story__item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
    background: var(--card-grad);
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-md), var(--edge-light);
    overflow: hidden;
    transition: transform var(--dur) var(--ease-out),
                box-shadow var(--dur) var(--ease);
}
.story__item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg), var(--edge-light);
}
.story__item--reverse .story__media { order: 2; }
.story__media {
    display: block;
    height: 100%;
    min-height: 280px;
}
.story__cover {
    height: 100%;
    min-height: 280px;
    background:
        radial-gradient(circle at 30% 30%, color-mix(in srgb, var(--accent) 25%, transparent), transparent 60%),
        linear-gradient(135deg, var(--bg-card) 0%, color-mix(in srgb, var(--bg-card) 80%, var(--accent) 12%) 100%);
    display: flex;
    align-items: flex-end;
    padding: 28px;
}
.story__tag {
    font-size: 12px;
    font-weight: 500;
    color: var(--ink);
    background: rgba(0,0,0,0.3);
    backdrop-filter: blur(8px);
    padding: 6px 12px;
    border-radius: 100px;
    border: 1px solid var(--line);
}
.story__body {
    padding: 40px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.story__date {
    font-size: 13px;
    color: var(--ink-3);
    font-family: var(--font-mono);
}
.story__title {
    margin: 0;
    font-size: clamp(22px, 2.4vw, 30px);
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.25;
}
.story__excerpt {
    margin: 0;
    color: var(--ink-3);
    font-size: 15px;
    line-height: 1.7;
}
.story__foot {
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--ink-3);
    font-size: 13px;
}
.story__more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--accent);
    font-weight: 500;
    transition: gap var(--dur) var(--ease);
}
.story__more:hover { gap: 10px; }
.categories--band { padding: 80px 0; }

@media (max-width: 768px) {
    .story__item,
    .story__item--reverse { grid-template-columns: 1fr; }
    .story__item--reverse .story__media { order: 0; }
    .story__cover { min-height: 200px; }
    .story__body { padding: 28px; }
}

/* =========================================================
   双栏布局：左 sticky 名片 + 右内容流
   ========================================================= */
.layout {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 100px var(--gutter) 80px;
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 56px;
    align-items: start;
}

/* 左侧作者名片 */
.profile-card {
    position: sticky;
    top: 96px;
    background: var(--card-grad);
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-md), var(--edge-light);
    padding: 32px 28px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    transition: box-shadow var(--dur) var(--ease);
}
.profile-card:hover {
    box-shadow: var(--shadow-lg), var(--edge-light);
}

/* 油墨头像 */
.profile-card__avatar {
    width: 140px;
    height: 140px;
    margin: 0 auto;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4), inset 0 0 0 1px var(--line);
}
.ink-avatar {
    width: 100%;
    height: 100%;
    display: block;
}

.profile-card__info {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.profile-card__name {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -0.02em;
}
.profile-card__role {
    margin: 0;
    font-size: 13px;
    color: var(--ink-3);
    font-family: var(--font-mono);
}
.profile-card__bio {
    margin: 8px 0 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--ink-2);
}

.profile-card__stats {
    display: flex;
    justify-content: space-around;
    padding: 16px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}
.profile-card__stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}
.profile-card__stat-num {
    font-size: 20px;
    font-weight: 600;
    color: var(--ink);
}
.profile-card__stat-label {
    font-size: 11px;
    color: var(--ink-3);
}

.profile-card__links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.profile-card__link {
    display: block;
    text-align: center;
    padding: 10px;
    font-size: 13px;
    color: var(--ink-2);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    transition: all var(--dur) var(--ease);
}
.profile-card__link:hover {
    color: var(--ink);
    border-color: var(--line-strong);
    background: var(--bg-soft);
}

/* 右侧内容流 */
.feed { min-width: 0; }
.feed__section { margin-bottom: 64px; }
.feed__section:last-child { margin-bottom: 0; }

.feed__list {
    display: flex;
    flex-direction: column;
    gap: 32px;
}
.feed__item {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 28px;
    align-items: stretch;
    background: var(--card-grad);
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm), var(--edge-light);
    overflow: hidden;
    transition: transform var(--dur) var(--ease-out),
                box-shadow var(--dur) var(--ease);
}
.feed__item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg), var(--edge-light);
}
.feed__item--reverse .feed__media { order: 2; }
.feed__media {
    display: block;
    height: 100%;
    min-height: 180px;
}
.feed__cover {
    height: 100%;
    min-height: 180px;
    background:
        radial-gradient(circle at 30% 30%, color-mix(in srgb, var(--accent) 25%, transparent), transparent 60%),
        linear-gradient(135deg, var(--bg-card) 0%, color-mix(in srgb, var(--bg-card) 80%, var(--accent) 12%) 100%);
    display: flex;
    align-items: flex-start;
    padding: 20px;
}
.feed__tag {
    font-size: 11px;
    font-weight: 500;
    color: var(--ink);
    background: rgba(0,0,0,0.3);
    backdrop-filter: blur(8px);
    padding: 5px 10px;
    border-radius: 100px;
    border: 1px solid var(--line);
}
.feed__body {
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.feed__date {
    font-size: 12px;
    color: var(--ink-3);
    font-family: var(--font-mono);
}
.feed__title {
    margin: 0;
    font-size: clamp(18px, 1.8vw, 22px);
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.3;
}
.feed__excerpt {
    margin: 0;
    color: var(--ink-3);
    font-size: 14px;
    line-height: 1.7;
    flex: 1;
}
.feed__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--ink-3);
    font-size: 12px;
}
.feed__more {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--accent);
    font-weight: 500;
    transition: gap var(--dur) var(--ease);
}
.feed__more:hover { gap: 9px; }

.categories__grid--feed {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

@media (max-width: 980px) {
    .layout { grid-template-columns: 1fr; gap: 32px; padding-top: 80px; }
    .profile-card { position: static; }
}
@media (max-width: 640px) {
    .feed__item,
    .feed__item--reverse { grid-template-columns: 1fr; }
    .feed__item--reverse .feed__media { order: 0; }
    .feed__cover { min-height: 140px; }
    .feed__body { padding: 20px; }
    .categories__grid--feed { grid-template-columns: 1fr; }
}

/* =========================================================
   关于页：全宽头像 Hero + 分段卡片
   ========================================================= */
.about-hero {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 100px var(--gutter) 60px;
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 56px;
    align-items: center;
}
.about-hero__avatar {
    width: 240px;
    height: 240px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: var(--shadow-lg), inset 0 0 0 1px var(--line);
    position: relative;
}
.ink-avatar--lg { width: 100%; height: 100%; }
.about-hero__avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.about-hero__info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.about-hero__eyebrow {
    font-size: 13px;
    color: var(--accent);
    font-family: var(--font-mono);
    font-weight: 500;
}
.about-hero__name {
    margin: 0;
    font-size: clamp(40px, 5vw, 56px);
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.05;
}
.about-hero__role {
    margin: 0;
    font-size: 16px;
    color: var(--ink-2);
    font-family: var(--font-mono);
}
.about-hero__bio {
    margin: 8px 0 0;
    max-width: 560px;
    font-size: 16px;
    line-height: 1.7;
    color: var(--ink-2);
}
.about-hero__social {
    display: flex;
    gap: 12px;
    margin-top: 12px;
    flex-wrap: wrap;
}
.about-hero__social-link {
    padding: 8px 18px;
    font-size: 13px;
    color: var(--ink-2);
    border: 1px solid var(--line);
    border-radius: 100px;
    transition: all var(--dur) var(--ease);
}
.about-hero__social-link:hover {
    color: var(--ink);
    border-color: var(--line-strong);
    background: var(--bg-soft);
}

/* 分段卡片 */
.about-sections {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 20px var(--gutter) 80px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.about-section {
    background: var(--card-grad);
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-md), var(--edge-light);
    padding: 40px;
    transition: box-shadow var(--dur) var(--ease);
}
.about-section:hover {
    box-shadow: var(--shadow-lg), var(--edge-light);
}
.about-section__head {
    display: flex;
    align-items: baseline;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--line);
}
.about-section__num {
    font-size: 14px;
    font-family: var(--font-mono);
    color: var(--accent);
    font-weight: 500;
}
.about-section__title {
    margin: 0;
    font-size: clamp(24px, 2.5vw, 30px);
    font-weight: 600;
    letter-spacing: -0.02em;
}
.about-section__body {
    color: var(--ink-2);
    font-size: 16px;
    line-height: 1.8;
}
.about-section__body p { margin: 0 0 16px; }
.about-section__body p:last-child { margin-bottom: 0; }

.about-contact__text {
    font-size: 18px;
    color: var(--ink);
    margin-bottom: 16px;
}
.about-contact__email {
    display: inline-block;
    font-size: 22px;
    font-family: var(--font-mono);
    color: var(--accent);
    margin-bottom: 24px;
    transition: opacity var(--dur) var(--ease);
}
.about-contact__email:hover { opacity: 0.7; }
.about-contact__links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.about-contact__link {
    padding: 8px 18px;
    font-size: 13px;
    color: var(--ink-2);
    border: 1px solid var(--line);
    border-radius: 100px;
    transition: all var(--dur) var(--ease);
}
.about-contact__link:hover {
    color: var(--ink);
    border-color: var(--line-strong);
    background: var(--bg-soft);
}

@media (max-width: 768px) {
    .about-hero {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
        padding-top: 80px;
        gap: 32px;
    }
    .about-hero__avatar { width: 180px; height: 180px; }
    .about-hero__info { align-items: center; }
    .about-hero__bio { text-align: center; }
    .about-section { padding: 28px; }
}

/* =========================================================
   全屏开场动画（YunQing 主题）
   深色：粒子从雾气中浮出 + 光晕扩散
   浅色：墨水从中心洇开显现文字
   ========================================================= */
.intro {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    pointer-events: none;
    /* 默认隐藏，仅 JS 明确加 body.is-intro 时才显现：
       JS 失效/早退/bfcache 恢复都不可能再闪出开场层 */
    opacity: 0;
    visibility: hidden;
}
body.is-intro .intro {
    opacity: 1;
    visibility: visible;
}
.intro.is-hidden {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s var(--ease-out),
                visibility 0s linear 0.6s;
}
.intro__bg {
    position: absolute;
    inset: 0;
    background: var(--bg);
    z-index: 1;
}
.intro__fog {
    position: absolute;
    inset: -20%;
    z-index: 2;
    background:
        radial-gradient(circle at 30% 40%, rgba(120,120,140,0.15), transparent 50%),
        radial-gradient(circle at 70% 60%, rgba(80,80,100,0.12), transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(200,200,220,0.05), transparent 70%);
    filter: blur(40px);
    opacity: 0;
    animation: intro-fog-drift 3s var(--ease-out) forwards;
}
.intro__particles {
    position: absolute;
    inset: 0;
    z-index: 3;
}
.intro__particle {
    position: absolute;
    width: 2px;
    height: 2px;
    border-radius: 50%;
    background: rgba(255,255,255,0.6);
    box-shadow: 0 0 6px rgba(255,255,255,0.4);
    opacity: 0;
    animation: intro-particle-float 2.4s var(--ease-out) forwards;
}
.intro__center {
    position: relative;
    z-index: 4;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}
.intro__brand {
    display: flex;
    font-size: clamp(40px, 7vw, 76px);
    font-weight: 600;
    letter-spacing: -0.03em;
    color: var(--ink);
}
.intro__char {
    display: inline-block;
    opacity: 0;
    transform: translateY(20px) scale(0.9);
    filter: blur(8px);
    animation: intro-char-emerge 0.9s var(--ease-out) forwards;
    animation-delay: calc(0.5s + var(--i) * 0.1s);
}
.intro__tagline {
    font-size: 13px;
    font-family: var(--font-mono);
    color: var(--ink-3);
    letter-spacing: 0.15em;
    opacity: 0;
    animation: intro-fade-in 0.6s var(--ease-out) 1.6s forwards;
}
.intro__veil {
    position: absolute;
    inset: 0;
    z-index: 5;
    background: var(--bg);
    opacity: 1;
    animation: intro-veil-lift 0.9s var(--ease-out) 0.3s forwards;
}

@keyframes intro-fog-drift {
    0% { opacity: 0; transform: scale(0.8); }
    50% { opacity: 1; }
    100% { opacity: 0.3; transform: scale(1.1); }
}
@keyframes intro-particle-float {
    0% { opacity: 0; transform: translate(0, 0) scale(0); }
    30% { opacity: 1; }
    100% { opacity: 0; transform: translate(var(--tx, 0), var(--ty, 0)) scale(1.2); }
}
@keyframes intro-char-emerge {
    0% { opacity: 0; transform: translateY(20px) scale(0.9); filter: blur(8px); }
    100% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}
@keyframes intro-fade-in {
    to { opacity: 0.7; }
}
@keyframes intro-veil-lift {
    0% { opacity: 1; }
    100% { opacity: 0; }
}

/* "Blog" 弹跳入场 —— 黑白配色，从右侧大幅弹入并多次回弹（duangduang 感） */
.intro__char--blog {
    color: var(--ink);
    opacity: 0;
    transform: translateX(180px) scale(0.6);
    filter: blur(4px);
    animation: intro-blog-bounce 1.2s var(--ease-spring, cubic-bezier(0.34, 1.56, 0.64, 1)) forwards;
    animation-delay: calc(1.6s + (var(--i) - 7) * 0.14s);
}
@keyframes intro-blog-bounce {
    0% {
        opacity: 0;
        transform: translateX(180px) scale(0.6);
        filter: blur(4px);
    }
    18% {
        opacity: 1;
        transform: translateX(-26px) scale(1.18);
        filter: blur(0);
    }
    38% {
        transform: translateX(16px) scale(0.92);
    }
    58% {
        transform: translateX(-10px) scale(1.06);
    }
    78% {
        transform: translateX(5px) scale(0.97);
    }
    100% {
        opacity: 1;
        transform: translateX(0) scale(1);
        filter: blur(0);
    }
}

/* 浅色主题：Blog 用黑色，与深色白字对称 */
[data-theme="light"] .intro__char--blog {
    color: #1d1d1f;
    animation: intro-blog-bounce 1.2s var(--ease-spring, cubic-bezier(0.34, 1.56, 0.64, 1)) forwards;
    animation-delay: calc(1.8s + (var(--i) - 7) * 0.12s);
}

/* ---------- 浅色主题开场：墨水从中心洇开 ---------- */
[data-theme="light"] .intro__fog { display: none; }
[data-theme="light"] .intro__particles { display: none; }
[data-theme="light"] .intro__bg {
    background: var(--bg);
    animation: intro-ink-spread 1.2s var(--ease-out) forwards;
}
[data-theme="light"] .intro__char {
    color: transparent;
    background: linear-gradient(135deg, #1d1d1f, #424245);
    -webkit-background-clip: text;
    background-clip: text;
    animation: intro-char-ink 0.8s var(--ease-out) forwards;
    animation-delay: calc(0.8s + var(--i) * 0.08s);
}
[data-theme="light"] .intro__veil {
    background: var(--bg);
    animation: intro-veil-lift-light 0.9s var(--ease-out) 0.4s forwards;
}
@keyframes intro-ink-spread {
    0% {
        clip-path: circle(0% at 50% 50%);
        opacity: 1;
    }
    100% {
        clip-path: circle(150% at 50% 50%);
        opacity: 1;
    }
}
@keyframes intro-char-ink {
    0% { opacity: 0; transform: scale(1.1); filter: blur(6px); }
    100% { opacity: 1; transform: scale(1); filter: blur(0); }
}
@keyframes intro-veil-lift-light {
    0% { opacity: 1; }
    100% { opacity: 0; }
}

/* 开场期间锁定滚动 */
body.is-intro { overflow: hidden; }

/* 减少动画偏好：跳过开场 */
@media (prefers-reduced-motion: reduce) {
    .intro { display: none !important; }
    body.is-intro { overflow: auto; }
}

/* =========================================================
   项目浏览器（project.html）— GitHub 风格
   ========================================================= */
.repo {
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    padding: 120px 24px 90px;
    min-height: 70vh;
}
.repo__loading,
.repo__error {
    padding: 80px 20px;
    text-align: center;
    color: var(--ink-3);
    font-size: 14px;
}
.repo__error a { display: inline-block; }
.repo__inner { display: flex; flex-direction: column; gap: 18px; }

/* 项目头 */
.repo-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 22px 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--bg-card);
}
.repo-head__title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-size: 21px;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -0.01em;
}
.repo-head__icon { color: var(--accent); display: inline-flex; }
.repo-head__desc {
    margin: 8px 0 10px;
    font-size: 13.5px;
    line-height: 1.7;
    color: var(--ink-3);
}
.repo-head__meta {
    font-size: 12.5px;
    color: var(--ink-4);
    font-variant-numeric: tabular-nums;
}
.repo-head__dot { margin: 0 8px; color: var(--line-strong); }
.repo-head__actions { flex: 0 0 auto; padding-top: 2px; }

/* 按钮 */
.repo-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 36px;
    padding: 0 16px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    background: var(--bg-card-2);
    color: var(--ink-2);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}
.repo-btn:hover { border-color: var(--accent); color: var(--accent); }
.repo-btn--primary {
    border-color: var(--accent);
    background: var(--accent);
    color: #fff;
}
.repo-btn--primary:hover { color: #fff; filter: brightness(1.08); }

/* 面包屑 */
.repo-crumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    padding: 2px 2px;
}
.repo-crumbs__item {
    color: var(--ink-3);
    text-decoration: none;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
a.repo-crumbs__item:hover { color: var(--accent); }
.repo-crumbs__item.is-current { color: var(--ink); font-weight: 600; }
.repo-crumbs__sep { color: var(--ink-4); }

/* 文件卡片 / 行 */
.repo-card {
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    overflow: hidden;
}
.repo-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 150px 100px;
    align-items: center;
    gap: 12px;
    padding: 10px 18px;
    border-bottom: 1px solid var(--line);
    color: var(--ink-2);
    text-decoration: none;
    font-size: 13.5px;
    transition: background 0.15s ease;
}
a.repo-row:hover { background: var(--hover-bg); }
.repo-row:last-child { border-bottom: none; }
.repo-row--head {
    font-size: 12px;
    color: var(--ink-4);
    background: var(--bg-card-2);
    font-weight: 500;
}
.repo-row__icon { flex: 0 0 auto; color: var(--ink-4); }
.repo-row__icon--dir { color: var(--accent); opacity: 0.8; }
.repo-row__name {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.repo-row__name > span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
a.repo-row .repo-row__name { color: var(--ink); font-weight: 500; }
a.repo-row:hover .repo-row__name { color: var(--accent); }
.repo-row__mtime {
    grid-column: 2;
    font-size: 12px;
    color: var(--ink-4);
    font-variant-numeric: tabular-nums;
}
.repo-row__size {
    grid-column: 3;
    font-size: 12px;
    color: var(--ink-4);
    font-variant-numeric: tabular-nums;
    text-align: right;
}
.repo-state { padding: 44px 20px; text-align: center; color: var(--ink-4); font-size: 13px; }

/* 文件视图 */
.repo-file { display: flex; flex-direction: column; }
.repo-file__bar {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 18px;
    border-bottom: 1px solid var(--line);
    background: var(--bg-card-2);
    font-size: 12.5px;
}
.repo-file__name {
    font-family: var(--font-mono);
    color: var(--ink);
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.repo-file__meta { color: var(--ink-4); font-variant-numeric: tabular-nums; }
.repo-file__dl {
    margin-left: auto;
    color: var(--ink-3);
    text-decoration: none;
}
.repo-file__dl:hover { color: var(--accent); }
.repo-file__body { background: #0f1115; }
[data-theme="light"] .repo-file__body { background: #fbfbfc; }

/* 代码块（Prism 作用域配色） */
.repo-code {
    margin: 0;
    padding: 18px 20px;
    overflow: auto;
    max-height: 72vh;
    background: #0f1115;
    color: #e6edf3;
    font-family: var(--font-mono);
    font-size: 12.5px;
    line-height: 1.75;
    tab-size: 2;
}
.repo-code code {
    font-family: inherit;
    background: transparent;
    color: inherit;
    white-space: pre;
}
.repo-code .token.comment,
.repo-code .token.prolog,
.repo-code .token.doctype,
.repo-code .token.cdata { color: #8b949e; font-style: italic; }
.repo-code .token.keyword,
.repo-code .token.tag,
.repo-code .token.important,
.repo-code .token.atrule .token.rule { color: #ff7b72; }
.repo-code .token.punctuation { color: #c9d1d9; }
.repo-code .token.property,
.repo-code .token.attr-name,
.repo-code .token.selector,
.repo-code .token.boolean,
.repo-code .token.constant,
.repo-code .token.symbol { color: #79c0ff; }
.repo-code .token.number,
.repo-code .token.string,
.repo-code .token.char,
.repo-code .token.attr-value,
.repo-code .token.builtin { color: #a5d6ff; }
.repo-code .token.string { color: #7ee787; }
.repo-code .token.function,
.repo-code .token.class-name { color: #d2a8ff; }
.repo-code .token.operator,
.repo-code .token.entity,
.repo-code .token.url { color: #ff7b72; }
.repo-code .token.variable { color: #ffa657; }
.repo-code .token.regex { color: #7ee787; }
.repo-code .token.deleted { color: #ffa198; background: rgba(255, 129, 130, 0.12); }
.repo-code .token.inserted { color: #7ee787; background: rgba(46, 160, 67, 0.12); }

[data-theme="light"] .repo-code { background: #fbfbfc; color: #24292f; }
[data-theme="light"] .repo-code .token.comment,
[data-theme="light"] .repo-code .token.prolog,
[data-theme="light"] .repo-code .token.doctype,
[data-theme="light"] .repo-code .token.cdata { color: #6e7781; }
[data-theme="light"] .repo-code .token.keyword,
[data-theme="light"] .repo-code .token.tag,
[data-theme="light"] .repo-code .token.important { color: #cf222e; }
[data-theme="light"] .repo-code .token.punctuation { color: #24292f; }
[data-theme="light"] .repo-code .token.property,
[data-theme="light"] .repo-code .token.attr-name,
[data-theme="light"] .repo-code .token.selector,
[data-theme="light"] .repo-code .token.boolean,
[data-theme="light"] .repo-code .token.constant,
[data-theme="light"] .repo-code .token.symbol { color: #0550ae; }
[data-theme="light"] .repo-code .token.number { color: #0550ae; }
[data-theme="light"] .repo-code .token.string,
[data-theme="light"] .repo-code .token.char,
[data-theme="light"] .repo-code .token.attr-value,
[data-theme="light"] .repo-code .token.builtin { color: #0a3069; }
[data-theme="light"] .repo-code .token.string { color: #0a7d33; }
[data-theme="light"] .repo-code .token.function,
[data-theme="light"] .repo-code .token.class-name { color: #8250df; }
[data-theme="light"] .repo-code .token.operator,
[data-theme="light"] .repo-code .token.entity,
[data-theme="light"] .repo-code .token.url { color: #cf222e; }
[data-theme="light"] .repo-code .token.variable { color: #953800; }

/* 图片预览 */
.repo-image {
    display: flex;
    justify-content: center;
    padding: 28px;
    background:
        linear-gradient(45deg, rgba(128,128,128,0.08) 25%, transparent 25%, transparent 75%, rgba(128,128,128,0.08) 75%) 0 0 / 20px 20px,
        linear-gradient(45deg, rgba(128,128,128,0.08) 25%, transparent 25%, transparent 75%, rgba(128,128,128,0.08) 75%) 10px 10px / 20px 20px,
        #0f1115;
}
[data-theme="light"] .repo-image {
    background:
        linear-gradient(45deg, rgba(0,0,0,0.045) 25%, transparent 25%, transparent 75%, rgba(0,0,0,0.045) 75%) 0 0 / 20px 20px,
        linear-gradient(45deg, rgba(0,0,0,0.045) 25%, transparent 25%, transparent 75%, rgba(0,0,0,0.045) 75%) 10px 10px / 20px 20px,
        #f3f4f6;
}
.repo-image img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

/* 二进制/降级提示 */
.repo-binary {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 64px 24px;
    text-align: center;
}
.repo-binary p { margin: 0; color: var(--ink-3); font-size: 13.5px; }

@media (max-width: 640px) {
    .repo { padding: 100px 14px 60px; }
    .repo-head { flex-direction: column; }
    .repo-row { grid-template-columns: minmax(0, 1fr) 86px; padding: 10px 14px; }
    .repo-row__mtime { display: none; }
    .repo-row__size { grid-column: 2; }
    .repo-code { font-size: 11.5px; padding: 14px; }
}

/* =========================================================
   v7 —— 首页动态化 / 列表动态化 / 文章详情页
   ========================================================= */

/* ---------- 首页 Hero：文字 + 精选卡 ---------- */
.hero-mega--compact {
    padding: 120px var(--gutter) 56px;
    align-items: center;
}
.hero-mega__inner--split {
    display: grid;
    grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
    gap: clamp(36px, 5vw, 80px);
    align-items: center;
}
.hero-mega__lead { max-width: 520px; }
.hero-mega__stats {
    margin: 22px 0 0;
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.03em;
    color: var(--ink-4);
}

.hero-feat {
    display: block;
    text-decoration: none;
    color: inherit;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform var(--dur) var(--ease-out),
                border-color var(--dur) var(--ease),
                box-shadow var(--dur) var(--ease);
}
.hero-feat:hover {
    transform: translateY(-3px);
    border-color: var(--line-strong);
    box-shadow: var(--shadow-lg);
}
.hero-feat__label {
    display: block;
    padding: 16px 20px 0;
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
}
.hero-feat__cover {
    position: relative;
    margin: 12px 20px 0;
    height: 184px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: linear-gradient(135deg,
        color-mix(in srgb, var(--feat-accent, var(--accent)) 16%, var(--bg-card-2)),
        var(--bg-card-2));
    display: flex;
    align-items: center;
    justify-content: center;
}
.hero-feat__cover.has-img { background: var(--bg-card-2); }
.hero-feat__cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.hero-feat__initial {
    font-size: 64px;
    font-weight: 300;
    color: var(--feat-accent, var(--accent));
    opacity: 0.55;
    font-family: var(--font-mono);
}
.hero-feat__cat {
    display: block;
    padding: 18px 22px 0;
    font-family: var(--font-mono);
    font-size: 11.5px;
    color: var(--ink-4);
    letter-spacing: 0.04em;
}
.hero-feat__title {
    margin: 8px 22px 0;
    font-size: 19px;
    font-weight: 600;
    letter-spacing: -0.015em;
    line-height: 1.4;
    color: var(--ink);
}
.hero-feat__excerpt {
    margin: 10px 22px 0;
    font-size: 13px;
    line-height: 1.65;
    color: var(--ink-3);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.hero-feat__read {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 14px 22px 22px;
    font-size: 12.5px;
    font-family: var(--font-mono);
    color: var(--accent);
    transition: gap var(--dur) var(--ease);
}
.hero-feat:hover .hero-feat__read { gap: 11px; }

/* 分类条带数量自适应 */
.topics__inner { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }

/* ---------- 首页主体：最新文章 + 侧栏 ---------- */
.home-grid {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 64px var(--gutter) 40px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: clamp(40px, 5vw, 72px);
    align-items: start;
}
.home-grid__side {
    position: sticky;
    top: 96px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.home-grid .works__head { margin-bottom: 26px; }
.home-grid .works__title { font-size: clamp(24px, 2.6vw, 34px); }

/* 最新文章流 */
.hfeed {
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--line);
}
.hpost {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) 24px;
    gap: 18px;
    align-items: start;
    padding: 24px 8px;
    border-bottom: 1px solid var(--line);
    text-decoration: none;
    color: inherit;
    border-radius: 0;
    transition: background var(--dur) var(--ease);
}
.hpost:hover { background: var(--hover-bg); }
.hpost__num {
    padding-top: 3px;
    font-family: var(--font-mono);
    font-size: 11.5px;
    color: var(--ink-4);
    font-variant-numeric: tabular-nums;
}
.hpost__body { min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.hpost__meta {
    font-family: var(--font-mono);
    font-size: 11.5px;
    color: var(--ink-4);
    letter-spacing: 0.02em;
}
.hpost__title {
    margin: 0;
    font-size: 18px;
    font-weight: 500;
    letter-spacing: -0.015em;
    line-height: 1.45;
    color: var(--ink);
    transition: color var(--dur) var(--ease);
}
.hpost:hover .hpost__title { color: var(--accent); }
.hpost__excerpt {
    margin: 0;
    font-size: 13px;
    line-height: 1.65;
    color: var(--ink-3);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.hpost__arrow {
    padding-top: 2px;
    color: var(--ink-4);
    opacity: 0;
    transform: translateX(-4px);
    transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease), color var(--dur) var(--ease);
}
.hpost:hover .hpost__arrow { opacity: 1; transform: translateX(0); color: var(--accent); }
.hfeed__loading,
.hfeed__empty {
    padding: 48px 8px;
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--ink-4);
    text-align: center;
}

/* 侧栏卡片 */
.side-card {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 20px 22px;
}
.side-title {
    margin: 0 0 14px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-3);
}
.side-author { display: flex; gap: 14px; align-items: flex-start; }
.side-author__avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid var(--line);
}
.side-author__body { min-width: 0; }
.side-author__name {
    margin: 2px 0 4px;
    font-size: 14.5px;
    font-weight: 600;
    color: var(--ink);
}
.side-author__bio {
    margin: 0 0 8px;
    font-size: 12.5px;
    line-height: 1.6;
    color: var(--ink-3);
}
.side-author__link {
    font-family: var(--font-mono);
    font-size: 11.5px;
    color: var(--accent);
    text-decoration: none;
}
.side-author__link:hover { text-decoration: underline; }

.pop-list { display: flex; flex-direction: column; }
.pop-item {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 12px;
    padding: 11px 0;
    text-decoration: none;
    border-bottom: 1px solid var(--line);
}
.pop-item:last-child { border-bottom: none; padding-bottom: 2px; }
.pop-item:first-child { padding-top: 2px; }
.pop-item__num {
    font-family: var(--font-mono);
    font-size: 11.5px;
    color: var(--ink-4);
    font-variant-numeric: tabular-nums;
    padding-top: 2px;
}
.pop-item__body { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.pop-item__title {
    font-size: 13.5px;
    line-height: 1.5;
    font-weight: 500;
    color: var(--ink);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color var(--dur) var(--ease);
}
.pop-item:hover .pop-item__title { color: var(--accent); }
.pop-item__meta {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--ink-4);
}

.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--line);
    font-size: 12.5px;
    color: var(--ink-3);
    text-decoration: none;
    transition: all var(--dur) var(--ease);
}
.tag-chip em {
    font-style: normal;
    font-family: var(--font-mono);
    font-size: 10.5px;
    color: var(--ink-4);
}
.tag-chip:hover {
    color: var(--ink);
    border-color: var(--line-strong);
    background: var(--hover-bg);
}

/* site-config.js 注入的社交链接容器 */
.footer__col-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.footer__col-links:empty { display: none; }

/* ---------- 文章列表页动态化补充 ---------- */
.filter-bar__chip em {
    font-style: normal;
    font-size: 11px;
    opacity: 0.65;
    margin-left: 3px;
    font-family: var(--font-mono);
}
a.article-row {
    text-decoration: none;
    color: inherit;
    align-items: center;
}
a.article-row:hover .article-row__title { color: var(--accent); }
.article-row__excerpt {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.article-list__loading,
.article-list__empty {
    padding: 56px 28px;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--ink-4);
    border: 1px dashed var(--line);
    border-radius: var(--radius-lg);
}
.pagination__btn.is-disabled {
    opacity: 0.35;
    pointer-events: none;
}
a.pagination__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

/* ---------- 文章详情页 ---------- */
.post {
    max-width: 760px;
    margin: 0 auto;
    padding: 120px var(--gutter) 100px;
}
.post-head { margin-bottom: 44px; }
.post-head__crumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 11.5px;
    color: var(--ink-4);
    margin-bottom: 24px;
}
.post-head__crumbs a {
    color: var(--ink-4);
    text-decoration: none;
    transition: color var(--dur) var(--ease);
}
.post-head__crumbs a:hover { color: var(--accent); }
.post-head__crumbs span { color: var(--ink-4); opacity: 0.6; }
.post-head__title {
    margin: 0 0 20px;
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 600;
    letter-spacing: -0.025em;
    line-height: 1.25;
    color: var(--ink);
}
.post-head__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--ink-4);
}
.post-head__cat {
    padding: 3px 12px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--line);
    color: var(--accent);
    font-size: 11.5px;
    text-decoration: none;
    transition: all var(--dur) var(--ease);
}
.post-head__cat:hover { border-color: var(--accent); }
.post-cover {
    margin: 0 0 44px;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--line);
}
.post-cover img { display: block; width: 100%; height: auto; }

/* 正文排版 */
.prose {
    font-size: 15.5px;
    line-height: 1.85;
    color: var(--ink-2);
    word-break: break-word;
}
.prose > *:first-child { margin-top: 0; }
.prose > *:last-child { margin-bottom: 0; }
.prose h1, .prose h2, .prose h3, .prose h4 {
    color: var(--ink);
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.35;
    margin: 2.2em 0 0.8em;
}
.prose h1 { font-size: 1.6em; }
.prose h2 {
    font-size: 1.32em;
    padding-bottom: 0.35em;
    border-bottom: 1px solid var(--line);
}
.prose h3 { font-size: 1.14em; }
.prose h4 { font-size: 1em; }
.prose p { margin: 0 0 1.25em; }
.prose a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
    text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent);
    transition: text-decoration-color var(--dur) var(--ease);
}
.prose a:hover { text-decoration-color: var(--accent); }
.prose strong { color: var(--ink); font-weight: 600; }
.prose em { color: var(--ink-2); }
.prose ul, .prose ol { margin: 0 0 1.25em; padding-left: 1.5em; }
.prose li { margin: 0.45em 0; }
.prose li::marker { color: var(--ink-4); }
.prose blockquote {
    margin: 1.6em 0;
    padding: 4px 0 4px 20px;
    border-left: 2px solid var(--accent);
    color: var(--ink-3);
}
.prose blockquote p { margin: 0.5em 0; }
.prose hr {
    border: none;
    border-top: 1px solid var(--line);
    margin: 2.4em 0;
}
.prose img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    margin: 1.6em auto;
    display: block;
}
.prose code {
    font-family: var(--font-mono);
    font-size: 0.86em;
    padding: 2px 6px;
    border-radius: 5px;
    background: var(--bg-card-2);
    border: 1px solid var(--line);
    color: var(--accent);
}
.prose pre {
    margin: 1.6em 0;
    padding: 18px 20px;
    border-radius: var(--radius-md);
    background: #0f1115 !important;
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow-x: auto;
    line-height: 1.6;
    font-size: 13px;
}
.prose pre code {
    padding: 0;
    background: none;
    border: none;
    color: #e6edf3;
    font-size: inherit;
}
.prose table {
    width: 100%;
    margin: 1.6em 0;
    border-collapse: collapse;
    font-size: 14px;
    display: block;
    overflow-x: auto;
}
.prose th, .prose td {
    padding: 10px 14px;
    border: 1px solid var(--line);
    text-align: left;
}
.prose th {
    background: var(--bg-card-2);
    color: var(--ink);
    font-weight: 600;
}

/* Prism 配色（深色，GitHub Dark 近似） */
.prose .token.comment, .prose .token.prolog,
.prose .token.doctype, .prose .token.cdata { color: #8b949e; font-style: italic; }
.prose .token.keyword, .prose .token.tag,
.prose .token.important { color: #ff7b72; }
.prose .token.punctuation { color: #c9d1d9; }
.prose .token.property, .prose .token.attr-name,
.prose .token.selector, .prose .token.boolean,
.prose .token.constant, .prose .token.symbol { color: #79c0ff; }
.prose .token.number, .prose .token.string,
.prose .token.char, .prose .token.attr-value,
.prose .token.builtin { color: #a5d6ff; }
.prose .token.string { color: #a5d6ff; }
.prose .token.function, .prose .token.class-name { color: #d2a8ff; }
.prose .token.operator, .prose .token.entity, .prose .token.url { color: #ff7b72; }
.prose .token.variable { color: #ffa657; }
.prose .token.regex { color: #7ee787; }

/* 标签 / 上下篇 */
.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 40px;
    padding-top: 28px;
    border-top: 1px solid var(--line);
}
.post-tag {
    padding: 5px 14px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--line);
    font-size: 12.5px;
    color: var(--ink-3);
    text-decoration: none;
    transition: all var(--dur) var(--ease);
}
.post-tag:hover { color: var(--accent); border-color: var(--accent); }
.post-pager {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 48px;
}
.post-pager__item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 18px 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    text-decoration: none;
    min-height: 56px;
    transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease-out);
}
a.post-pager__item:hover {
    border-color: var(--line-strong);
    transform: translateY(-2px);
}
.post-pager__item--next { text-align: right; }
.post-pager__item--empty {
    border: none;
    background: transparent;
    box-shadow: none;
    min-height: 0;
    padding: 0;
}
.post-pager__item:only-child { grid-column: 1 / -1; }
.post-pager__item--next:only-child { text-align: left; }
.post-pager__dir {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.08em;
    color: var(--ink-4);
}
.post-pager__title {
    font-size: 13.5px;
    font-weight: 500;
    color: var(--ink);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.post-all {
    display: block;
    margin-top: 32px;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 12.5px;
    color: var(--accent);
    text-decoration: none;
    transition: opacity var(--dur) var(--ease);
}
.post-all:hover { opacity: 0.75; }

/* 404 */
.post__missing {
    min-height: 50vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    text-align: center;
}
.post__missing h1 {
    margin: 0;
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--ink);
}
.post__missing p { margin: 0; color: var(--ink-3); font-size: 14px; }
.post-back {
    margin-top: 12px;
    padding: 10px 24px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--line-strong);
    font-size: 13px;
    color: var(--ink);
    text-decoration: none;
    transition: all var(--dur) var(--ease);
}
.post-back:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- v9 酒红主题色兜底（tokens.css 可能被缓存） ---------- */
:root {
    --accent: #b64352;
    --accent-hover: #cc6370;
    --accent-soft: rgba(182, 67, 82, 0.18);
}
[data-theme="light"] {
    --accent: #822735;
    --accent-hover: #9e3344;
    --accent-soft: rgba(130, 39, 53, 0.12);
}

/* =========================================================
   v9 —— 全站交互丝滑化（统一快速缓动 + 按压反馈）
   ========================================================= */
html { scroll-behavior: smooth; }

/* 按钮类：悬停抬升、按下回弹 */
.hero-mega__btn,
.cta-end__btn,
.post-back {
    transition: color var(--dur-fast) var(--ease-out),
                border-color var(--dur-fast) var(--ease-out),
                background var(--dur-fast) var(--ease-out),
                transform var(--dur-fast) var(--ease-out),
                box-shadow var(--dur) var(--ease);
    will-change: transform;
}
.hero-mega__btn:hover,
.cta-end__btn:hover { transform: translateY(-2px); }
.hero-mega__btn:active,
.cta-end__btn:active,
.post-back:active { transform: translateY(0) scale(0.97); }

/* 主 CTA：保持描边克制，悬停转酒红 */
.cta-end__btn:hover {
    color: var(--accent);
    border-color: var(--accent);
}

/* 分类条带 */
.topic {
    transition: background var(--dur-fast) var(--ease-out),
                transform var(--dur-fast) var(--ease-out);
}
.topic:hover { transform: translateY(-3px); }
.topic:active { transform: translateY(0) scale(0.98); }
.topic__count { transition: color var(--dur-fast) var(--ease-out); }
.topic:hover .topic__count { color: var(--accent); }

/* 筛选 chips */
.filter-bar__chip {
    transition: color var(--dur-fast) var(--ease-out),
                background var(--dur-fast) var(--ease-out),
                border-color var(--dur-fast) var(--ease-out),
                transform var(--dur-fast) var(--ease-out);
}
.filter-bar__chip:not(.is-active):hover { transform: translateY(-2px); }
.filter-bar__chip:active { transform: scale(0.95); }

/* 文章行：悬停位移更柔、按压收敛 */
.article-row {
    transition: transform var(--dur) var(--ease-out),
                box-shadow var(--dur) var(--ease),
                border-color var(--dur) var(--ease),
                background var(--dur-fast) var(--ease-out);
}
.article-row:active { transform: translateY(-1px) scale(0.995); }

/* 分页 */
.pagination__btn {
    transition: color var(--dur-fast) var(--ease-out),
                background var(--dur-fast) var(--ease-out),
                border-color var(--dur-fast) var(--ease-out),
                transform var(--dur-fast) var(--ease-out);
}
.pagination__btn:not(.is-active):not(.is-disabled):hover { transform: translateY(-2px); }
.pagination__btn:active { transform: scale(0.93); }

/* 标签胶囊 */
.tag-chip,
.post-tag,
.post-head__cat {
    transition: color var(--dur-fast) var(--ease-out),
                background var(--dur-fast) var(--ease-out),
                border-color var(--dur-fast) var(--ease-out),
                transform var(--dur-fast) var(--ease-out);
}
.tag-chip:hover,
.post-tag:hover,
.post-head__cat:hover { transform: translateY(-2px); }
.tag-chip:active,
.post-tag:active { transform: scale(0.95); }

/* 侧栏作者链接 / footer 链接：下划线生长 */
.side-author__link {
    background-image: linear-gradient(var(--accent), var(--accent));
    background-size: 0% 1px;
    background-position: 0 100%;
    background-repeat: no-repeat;
    transition: background-size var(--dur) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.side-author__link:hover {
    text-decoration: none;
    background-size: 100% 1px;
}
.footer__col a {
    transition: color var(--dur-fast) var(--ease-out),
                transform var(--dur-fast) var(--ease-out);
}
.footer__col a:hover { transform: translateX(3px); }

/* 最新文章流 */
.hpost {
    transition: background var(--dur-fast) var(--ease-out);
}
.hpost:active { background: var(--hover-bg-strong); }

/* 热门条目 */
.pop-item__title {
    transition: color var(--dur-fast) var(--ease-out);
}

/* 精选卡按压 */
.hero-feat:active { transform: translateY(0) scale(0.99); }

/* 上下篇 / 返回全部 */
.post-pager__item {
    transition: border-color var(--dur-fast) var(--ease-out),
                background var(--dur-fast) var(--ease-out),
                transform var(--dur-fast) var(--ease-out),
                box-shadow var(--dur) var(--ease);
}
a.post-pager__item:active { transform: translateY(0) scale(0.99); }
.post-all { transition: opacity var(--dur-fast) var(--ease-out), letter-spacing var(--dur) var(--ease-out); }
.post-all:hover { opacity: 1; letter-spacing: 0.04em; }

/* 尊重减少动效偏好 */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ---------- 电脑宽屏布局（≥1440）：Hero 出血式非对称，文字贴左、精选卡放大贴右 ---------- */
@media (min-width: 1440px) {
    .hero-mega--compact {
        padding: 148px clamp(56px, 7vw, 128px) 72px;
    }
    .hero-mega__inner--split {
        max-width: none;
        grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
        gap: clamp(64px, 6vw, 140px);
    }
    .hero-mega__lead { max-width: 540px; }
    .hero-feat__cover { height: 208px; }
    .home-grid {
        gap: 80px;
        grid-template-columns: minmax(0, 1fr) 320px;
    }
    .home-grid__side { top: 104px; }
}
@media (min-width: 1680px) {
    .hero-mega--compact { padding-top: 168px; }
    .hero-mega__lead { max-width: 580px; }
    .hero-feat__cover { height: 232px; }
}
@media (min-width: 1920px) {
    .hero-mega__lead { max-width: 600px; }
    .hero-feat__cover { height: 252px; }
}

/* ---------- 响应式 ---------- */
@media (max-width: 960px) {
    .hero-mega__inner--split { grid-template-columns: 1fr; gap: 40px; }
    .hero-feat { max-width: 520px; }
    .home-grid { grid-template-columns: 1fr; gap: 48px; }
    .home-grid__side {
        position: static;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: 16px;
    }
}
@media (max-width: 640px) {
    .hero-mega--compact { padding: 104px var(--gutter) 40px; }
    .hero-feat__cover { height: 160px; }
    .home-grid { padding: 48px var(--gutter) 32px; }
    .hpost { grid-template-columns: 28px minmax(0, 1fr); gap: 12px; padding: 20px 4px; }
    .hpost__arrow { display: none; }
    .post { padding: 104px var(--gutter) 72px; }
    .post-pager { grid-template-columns: 1fr; }
    .post-pager__item--next { text-align: left; }
    .article-row {
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 20px;
        align-items: start;
    }
    .article-row__meta { justify-self: start; }
}
