/* ==================================================================
   个人站点样式
   配色参考 guizang.ai：浅灰底 + 白卡片 + 蓝紫主色，支持暗色模式
   ================================================================== */

:root {
    --bg: #f8f9fb;
    --fg: #1a1a2e;
    --fg-soft: #3b3b52;
    --card: #ffffff;
    --primary: #4f6af0;
    --primary-hover: #3f59e0;
    --primary-fg: #ffffff;
    --primary-soft: #eef0fb;
    --primary-text: #3f59e0;
    --muted: #f0f2f8;
    --muted-fg: #6b7280;
    --border: #e5e7eb;
    --border-soft: #edf0f4;
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 18px;
    --shadow-sm: 0 1px 2px rgba(26, 26, 46, .04);
    --shadow-md: 0 10px 30px -18px rgba(26, 26, 46, .25);
    --header-h: 56px;
    --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
    --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
        "Liberation Mono", "Courier New", monospace;
    --cover-ink: #3b4470;
    --code-bg: #14161f;
    color-scheme: light;
}

[data-theme="dark"] {
    --bg: #0f1117;
    --fg: #e5e7eb;
    --fg-soft: #c7cad4;
    --card: #1a1c2e;
    --primary: #6b82f6;
    --primary-hover: #7d92f8;
    --primary-fg: #ffffff;
    --primary-soft: #252840;
    --primary-text: #9db0ff;
    --muted: #252840;
    --muted-fg: #9ca3af;
    --border: rgba(255, 255, 255, .10);
    --border-soft: rgba(255, 255, 255, .06);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow-md: 0 16px 40px -24px rgba(0, 0, 0, .8);
    --cover-ink: #dde3ff;
    --code-bg: #0b0d14;
    color-scheme: dark;
}

/* ---------------- 主题色（后台可切换） ---------------- */

[data-accent="blue"] {
    --primary: #4f6af0;
    --primary-hover: #3f59e0;
    --primary-fg: #ffffff;
    --primary-soft: #eef0fb;
    --primary-text: #3f59e0;
}

[data-accent="yellow"] {
    --primary: #e8b008;
    --primary-hover: #d29d05;
    --primary-fg: #33260a;
    --primary-soft: #fdf5dc;
    --primary-text: #855c03;
}

[data-accent="orange"] {
    --primary: #f97316;
    --primary-hover: #ea580c;
    --primary-fg: #2b1400;
    --primary-soft: #fff0e6;
    --primary-text: #c2410c;
}

[data-accent="green"] {
    --primary: #10b981;
    --primary-hover: #0d9a6c;
    --primary-fg: #04372a;
    --primary-soft: #e6f8f1;
    --primary-text: #047857;
}

[data-accent="purple"] {
    --primary: #7c3aed;
    --primary-hover: #6d28d9;
    --primary-fg: #ffffff;
    --primary-soft: #f3edff;
    --primary-text: #6b21a8;
}

[data-accent="red"] {
    --primary: #dc2626;
    --primary-hover: #b91c1c;
    --primary-fg: #ffffff;
    --primary-soft: #ffecec;
    --primary-text: #b91c1c;
}

[data-theme="dark"][data-accent="blue"] {
    --primary: #4f6af0;
    --primary-hover: #6180f7;
    --primary-fg: #ffffff;
    --primary-soft: #252840;
    --primary-text: #9db0ff;
}

[data-theme="dark"][data-accent="yellow"] {
    --primary: #f2c231;
    --primary-hover: #ffd34d;
    --primary-fg: #2a2000;
    --primary-soft: #3a3115;
    --primary-text: #f5d76e;
}

[data-theme="dark"][data-accent="orange"] {
    --primary: #fb8c3c;
    --primary-hover: #ffa05a;
    --primary-fg: #2b1400;
    --primary-soft: #3b2415;
    --primary-text: #fdba74;
}

[data-theme="dark"][data-accent="green"] {
    --primary: #34d399;
    --primary-hover: #4ade9f;
    --primary-fg: #04372a;
    --primary-soft: #12352a;
    --primary-text: #6ee7b7;
}

[data-theme="dark"][data-accent="purple"] {
    --primary: #a78bfa;
    --primary-hover: #b9a2ff;
    --primary-fg: #21103f;
    --primary-soft: #2a2343;
    --primary-text: #c4b5fd;
}

[data-theme="dark"][data-accent="red"] {
    --primary: #f87171;
    --primary-hover: #fca5a5;
    --primary-fg: #3b0a0d;
    --primary-soft: #3a1c1f;
    --primary-text: #fca5a5;
}

* { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 20px);
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    color: var(--fg);
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -.015em; line-height: 1.3; }
p { margin: 0; }
::selection { background: var(--primary); color: var(--primary-fg); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; border: 3px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--muted-fg); }

:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }

.container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 24px; }

.icon { flex: none; display: inline-block; vertical-align: -2px; }

/* ============================ 顶部导航 ============================ */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    height: var(--header-h);
    border-bottom: 1px solid var(--border);
    background: color-mix(in srgb, var(--card) 88%, transparent);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
}

.header-inner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }

.brand-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    overflow: hidden;
    flex: none;
    background: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary) 45%, #8b5cf6));
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0;
    box-shadow: 0 2px 8px -2px color-mix(in srgb, var(--primary) 55%, transparent);
}

.brand-avatar img { width: 100%; height: 100%; object-fit: contain; }

/* 上传了图标后去掉底色，透明图标保持透明 */
.brand-avatar.has-img,
.hero-avatar.has-img,
.about-avatar.has-img,
.avatar-preview.has-img {
    background: none;
    box-shadow: none;
    border-radius: 0;
}

.brand-avatar.has-img img,
.hero-avatar.has-img img,
.about-avatar.has-img img,
.avatar-preview.has-img img { object-fit: contain; }

.brand-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }

.brand-name {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.brand-sub {
    font-size: 10.5px;
    color: var(--muted-fg);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.main-nav { display: flex; align-items: center; gap: 2px; margin-right: auto; margin-left: 8px; }

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 11px;
    border-radius: var(--radius-sm);
    font-size: 13.5px;
    color: var(--muted-fg);
    transition: background .18s ease, color .18s ease;
}

.nav-link .icon { opacity: .8; }
.nav-link:hover { color: var(--fg); background: var(--muted); }
.nav-link.active { color: var(--primary-text); background: var(--primary-soft); font-weight: 600; }
.nav-link.active .icon { opacity: 1; }

.header-actions { display: flex; align-items: center; gap: 4px; }

.icon-btn {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--muted-fg);
    cursor: pointer;
    transition: background .18s ease, color .18s ease, border-color .18s ease;
}

.icon-btn:hover { background: var(--muted); color: var(--fg); }

.theme-icon { display: grid; place-items: center; }
.theme-moon { display: none; }
[data-theme="dark"] .theme-sun { display: none; }
[data-theme="dark"] .theme-moon { display: block; }

.only-mobile { display: none; }
.menu-close { display: none; }
body.nav-open .menu-open { display: none; }
body.nav-open .menu-close { display: block; }

/* ============================ 整体布局 ============================ */

.site-main {
    flex: 1;
    padding-top: 32px;
    padding-bottom: 72px;
}

.content { width: 100%; max-width: 1040px; margin: 0 auto; min-width: 0; }

/* ============================ 首页 Hero ============================ */

.hero {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--card);
    padding: 40px;
    margin-bottom: 40px;
    box-shadow: var(--shadow-sm);
    animation: rise .6s cubic-bezier(.22, .61, .36, 1) both;
}

.hero-grid-bg {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 88% 12%, color-mix(in srgb, var(--primary) 22%, transparent), transparent 42%),
        radial-gradient(circle at 62% 92%, color-mix(in srgb, #8b5cf6 14%, transparent), transparent 46%),
        linear-gradient(var(--border-soft) 1px, transparent 1px),
        linear-gradient(90deg, var(--border-soft) 1px, transparent 1px);
    background-size: auto, auto, 28px 28px, 28px 28px;
    mask-image: linear-gradient(105deg, #000 12%, rgba(0, 0, 0, .25) 58%, transparent 88%);
    -webkit-mask-image: linear-gradient(105deg, #000 12%, rgba(0, 0, 0, .25) 58%, transparent 88%);
    pointer-events: none;
}

.hero-body {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.hero-copy { max-width: 620px; }

.hero-eyebrow {
    display: inline-block;
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: .14em;
    color: var(--primary-text);
    padding: 4px 9px;
    border-radius: 99px;
    background: var(--primary-soft);
    margin-bottom: 16px;
}

.hero-title {
    font-size: 38px;
    line-height: 1.22;
    letter-spacing: -.03em;
    margin-bottom: 14px;
    text-wrap: balance;
}

.hero-desc { font-size: 15px; color: var(--muted-fg); line-height: 1.75; max-width: 540px; text-wrap: pretty; }

.hero-actions { display: flex; align-items: center; gap: 10px; margin-top: 24px; flex-wrap: wrap; }

.hero-social {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--muted-fg);
    transition: all .18s ease;
}

.hero-social:hover { color: var(--primary-text); border-color: var(--primary); background: var(--primary-soft); }

.hero-panel {
    flex: none;
    width: 216px;
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--card) 72%, transparent);
    backdrop-filter: blur(6px);
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.hero-avatar {
    width: 62px;
    height: 62px;
    margin: 0 auto 10px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary) 45%, #8b5cf6));
    color: #fff;
    font-size: 26px;
    font-weight: 700;
    box-shadow: 0 8px 22px -10px color-mix(in srgb, var(--primary) 75%, transparent);
}

.hero-avatar img { width: 100%; height: 100%; object-fit: cover; }
.hero-author { font-size: 13.5px; font-weight: 600; }

.hero-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    margin-top: 16px;
    background: var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.hero-stat {
    background: var(--card);
    padding: 10px 4px;
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.hero-stat b { font-size: 16px; font-weight: 700; letter-spacing: -.02em; }
.hero-stat span { font-size: 10.5px; color: var(--muted-fg); }

/* ============================ 按钮 / 标签 ============================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 36px;
    padding: 0 15px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all .18s ease;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary);
    color: var(--primary-fg);
    box-shadow: 0 8px 20px -12px var(--primary);
}

.btn-primary:hover { background: var(--primary-hover); transform: translateY(-1px); }

.btn-ghost {
    background: var(--card);
    border-color: var(--border);
    color: var(--fg);
}

.btn-ghost:hover { border-color: var(--primary); color: var(--primary-text); background: var(--primary-soft); }

.btn .icon { transition: transform .18s ease; }
.btn:hover .icon { transform: translateX(2px); }

.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 21px;
    padding: 0 8px;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 600;
    color: color-mix(in srgb, var(--badge-color, var(--primary)) 76%, var(--fg));
    background: color-mix(in srgb, var(--badge-color, var(--primary)) 14%, transparent);
    white-space: nowrap;
}

.tag-pill {
    display: inline-flex;
    align-items: center;
    height: 21px;
    padding: 0 8px;
    border-radius: 6px;
    font-size: 11px;
    color: var(--muted-fg);
    background: var(--muted);
    transition: color .16s ease, background .16s ease;
}

a.tag-pill:hover { color: var(--primary-text); background: var(--primary-soft); }

.tag-row { display: flex; flex-wrap: wrap; gap: 6px; }

/* ============================ 区块标题 ============================ */

.section { margin-bottom: 44px; }

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.section-title-row { display: flex; flex-direction: column; gap: 4px; }

.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-family: var(--mono);
    font-size: 10.5px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--primary-text);
}

.section-title { font-size: 21px; letter-spacing: -.025em; }
.section-title.small { font-size: 17px; }

.section-note { font-size: 11px; color: var(--muted-fg); letter-spacing: .1em; }

.section-link {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: 12.5px;
    color: var(--muted-fg);
    transition: color .16s ease;
}

.section-link:hover { color: var(--primary-text); }
.section-more { display: flex; justify-content: center; margin-top: 24px; }

/* ============================ 分类筛选 ============================ */

.chip-row {
    display: flex;
    gap: 7px;
    overflow-x: auto;
    padding-bottom: 6px;
    margin-bottom: 18px;
    scrollbar-width: none;
}

.chip-row::-webkit-scrollbar { display: none; }

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 30px;
    padding: 0 11px;
    border: 1px solid var(--border);
    border-radius: 99px;
    background: var(--card);
    font-size: 12.5px;
    color: var(--muted-fg);
    white-space: nowrap;
    transition: all .16s ease;
}

.chip:hover { border-color: var(--primary); color: var(--primary-text); }

.chip.active {
    background: var(--fg);
    border-color: var(--fg);
    color: var(--card);
    font-weight: 600;
}

[data-theme="dark"] .chip.active { background: var(--primary); border-color: var(--primary); color: var(--primary-fg); }

.chip-count { font-family: var(--mono); font-size: 10.5px; opacity: .72; }

/* ============================ 精选卡片 ============================ */

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.feature-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform .22s cubic-bezier(.22, .61, .36, 1), box-shadow .22s ease, border-color .22s ease;
    animation: rise .55s cubic-bezier(.22, .61, .36, 1) both;
}

.feature-card:nth-child(2) { animation-delay: .06s; }
.feature-card:nth-child(3) { animation-delay: .12s; }

.feature-card:hover {
    transform: translateY(-3px);
    border-color: color-mix(in srgb, var(--primary) 40%, var(--border));
    box-shadow: var(--shadow-md);
}

.feature-cover {
    position: relative;
    height: 116px;
    padding: 14px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    overflow: hidden;
}

.feature-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, .55) 1px, transparent 1px);
    background-size: 12px 12px;
    opacity: .4;
    mix-blend-mode: soft-light;
}

.feature-num {
    font-family: var(--mono);
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -.04em;
    color: var(--cover-ink);
    opacity: .6;
}

.feature-cat {
    position: relative;
    z-index: 1;
    font-size: 11px;
    font-weight: 600;
    color: var(--cover-ink);
    background: rgba(255, 255, 255, .78);
    border: 1px solid rgba(255, 255, 255, .85);
    border-radius: 99px;
    padding: 2px 9px;
}

[data-theme="dark"] .feature-cat { background: rgba(0, 0, 0, .32); border-color: rgba(255, 255, 255, .14); }

.feature-body { padding: 16px 17px 15px; display: flex; flex-direction: column; gap: 8px; flex: 1; }

.feature-title { font-size: 15.5px; line-height: 1.45; letter-spacing: -.015em; }
.feature-title a:hover { color: var(--primary-text); }

.feature-summary {
    font-size: 12.5px;
    color: var(--muted-fg);
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.feature-foot { display: flex; align-items: center; gap: 8px; margin-top: 2px; }

.feature-more {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 12px;
    color: var(--primary-text);
    font-weight: 600;
}

/* 封面渐变 */

.cover-grad.g0 { background-image: linear-gradient(135deg, #e9edff 0%, #d3dcff 100%); }
.cover-grad.g1 { background-image: linear-gradient(135deg, #f2ebff 0%, #ddd0ff 100%); }
.cover-grad.g2 { background-image: linear-gradient(135deg, #e5f5ff 0%, #cfe8ff 100%); }
.cover-grad.g3 { background-image: linear-gradient(135deg, #e3f8ef 0%, #ccefdf 100%); }
.cover-grad.g4 { background-image: linear-gradient(135deg, #fff3de 0%, #ffe3bd 100%); }
.cover-grad.g5 { background-image: linear-gradient(135deg, #ffeaf4 0%, #ffd5e6 100%); }

[data-theme="dark"] .cover-grad.g0 { background-image: linear-gradient(135deg, #232c58, #1a2040); }
[data-theme="dark"] .cover-grad.g1 { background-image: linear-gradient(135deg, #2b2350, #201a3c); }
[data-theme="dark"] .cover-grad.g2 { background-image: linear-gradient(135deg, #163348, #102433); }
[data-theme="dark"] .cover-grad.g3 { background-image: linear-gradient(135deg, #12392d, #0d2a21); }
[data-theme="dark"] .cover-grad.g4 { background-image: linear-gradient(135deg, #3b2f19, #2c2312); }
[data-theme="dark"] .cover-grad.g5 { background-image: linear-gradient(135deg, #3a1f2c, #2b1620); }

/* ============================ 文章卡片 ============================ */

.month-head { display: flex; align-items: center; gap: 12px; margin: 22px 0 12px; }
.month-head:first-child { margin-top: 0; }

.month-label {
    font-family: var(--mono);
    font-size: 11.5px;
    letter-spacing: .06em;
    color: var(--muted-fg);
    white-space: nowrap;
}

.month-line { flex: 1; height: 1px; background: var(--border-soft); }

.month-group { display: flex; flex-direction: column; gap: 9px; }

.post-card {
    position: relative;
    padding: 17px 18px 15px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card);
    transition: border-color .2s ease, transform .2s cubic-bezier(.22, .61, .36, 1), box-shadow .2s ease;
    animation: rise .5s cubic-bezier(.22, .61, .36, 1) both;
}

.month-group .post-card:nth-child(2) { animation-delay: .04s; }
.month-group .post-card:nth-child(3) { animation-delay: .08s; }
.month-group .post-card:nth-child(4) { animation-delay: .12s; }

.post-card:hover {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--primary) 38%, var(--border));
    box-shadow: var(--shadow-md);
}

.post-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 9px; }

.meta-mono {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: .02em;
    color: var(--muted-fg);
    white-space: nowrap;
}

.post-card-title { font-size: 16.5px; line-height: 1.45; margin-bottom: 6px; letter-spacing: -.02em; }

.post-card-title a { transition: color .16s ease; }
.post-card-title a:hover { color: var(--primary-text); }

.post-card-summary {
    font-size: 13px;
    color: var(--muted-fg);
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 11px;
}

.post-card-foot { display: flex; align-items: center; gap: 8px; }

.meta {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11.5px;
    color: var(--muted-fg);
}

.meta-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--border); flex: none; }

.post-card-arrow {
    margin-left: auto;
    color: var(--muted-fg);
    opacity: .35;
    transform: translateX(0);
    transition: opacity .2s ease, transform .2s ease, color .2s ease;
}

.post-card:hover .post-card-arrow { opacity: 1; transform: translateX(2px); color: var(--primary-text); }

/* ============================ 页面头 / 搜索 ============================ */

.page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    padding-bottom: 22px;
    margin-bottom: 22px;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}

.page-head-text { display: flex; flex-direction: column; gap: 6px; }
.page-title { font-size: 30px; letter-spacing: -.035em; }
.page-desc { font-size: 13.5px; color: var(--muted-fg); }
.page-desc b { color: var(--fg); }

.search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 38px;
    padding: 0 4px 0 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--card);
    color: var(--muted-fg);
    transition: border-color .18s ease, box-shadow .18s ease;
    min-width: 300px;
}

.search-box:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 15%, transparent);
}

.search-box input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--fg);
    font: inherit;
    font-size: 13px;
}

.search-box input::placeholder { color: var(--muted-fg); }

.search-btn {
    height: 30px;
    padding: 0 12px;
    border: 0;
    border-radius: 6px;
    background: var(--primary);
    color: var(--primary-fg);
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
}

.search-btn:hover { background: var(--primary-hover); }

/* ============================ 归档列表 ============================ */

.archive-list { display: flex; flex-direction: column; }

.archive-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 20px 4px;
    border-bottom: 1px solid var(--border-soft);
    transition: background .18s ease;
}

.archive-item:first-child { border-top: 1px solid var(--border-soft); }
.archive-item:hover { background: color-mix(in srgb, var(--card) 60%, transparent); }

.archive-date {
    flex: none;
    width: 62px;
    display: flex;
    flex-direction: column;
    line-height: 1.15;
    padding-top: 2px;
}

.archive-date b { font-family: var(--mono); font-size: 22px; font-weight: 700; letter-spacing: -.04em; }
.archive-date span { font-family: var(--mono); font-size: 10.5px; color: var(--muted-fg); margin-top: 2px; }

.archive-main { flex: 1; min-width: 0; }
.archive-top { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; flex-wrap: wrap; }

.archive-title { font-size: 16.5px; letter-spacing: -.02em; margin-bottom: 5px; }
.archive-title a:hover { color: var(--primary-text); }

.archive-summary {
    font-size: 12.5px;
    color: var(--muted-fg);
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.archive-meta {
    flex: none;
    display: flex;
    flex-direction: column;
    gap: 3px;
    align-items: flex-end;
    padding-top: 3px;
}

/* ============================ 分页 ============================ */

.pagination { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 32px; }

.page-btn,
.page-num {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 32px;
    padding: 0 11px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--card);
    font-size: 12.5px;
    color: var(--muted-fg);
    transition: all .16s ease;
}

.page-num { min-width: 32px; justify-content: center; font-family: var(--mono); }

.page-btn:hover,
.page-num:hover { border-color: var(--primary); color: var(--primary-text); }

.page-num.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--primary-fg);
    font-weight: 600;
}

.page-btn.disabled { opacity: .45; cursor: not-allowed; }

/* ============================ 文章详情 ============================ */

.read-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    z-index: 60;
    background: transparent;
    pointer-events: none;
}

.read-progress span {
    display: block;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--primary), color-mix(in srgb, var(--primary) 55%, #8b5cf6));
    transition: width .1s linear;
}

.article-layout {
    display: flex;
    gap: 48px;
    align-items: flex-start;
    max-width: 1024px;
    margin: 0 auto;
}

.article-main { flex: 1; min-width: 0; max-width: 760px; }

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--muted-fg);
    margin-bottom: 22px;
    flex-wrap: wrap;
}

.breadcrumb a:hover { color: var(--primary-text); }
.breadcrumb .icon { opacity: .5; }

.article-head { margin-bottom: 26px; }

.article-title {
    font-size: 32px;
    line-height: 1.32;
    letter-spacing: -.035em;
    margin: 12px 0 14px;
}

.article-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.article-cover {
    margin: 0 0 28px;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
}

.article-cover img { width: 100%; height: auto; }

/* 正文排版 */

.prose { font-size: 15.5px; line-height: 1.9; color: var(--fg-soft); }

.prose > *:first-child { margin-top: 0; }

.prose p { margin: 1.1em 0; }

.prose h2 {
    font-size: 22px;
    color: var(--fg);
    margin: 2.1em 0 .8em;
    padding-top: .2em;
    letter-spacing: -.025em;
    scroll-margin-top: calc(var(--header-h) + 24px);
}

.prose h3 {
    font-size: 17.5px;
    color: var(--fg);
    margin: 1.8em 0 .6em;
    letter-spacing: -.02em;
    scroll-margin-top: calc(var(--header-h) + 24px);
}

.prose h4 { font-size: 15.5px; color: var(--fg); margin: 1.6em 0 .5em; }

.prose a {
    color: var(--primary-text);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    text-decoration-color: color-mix(in srgb, var(--primary) 35%, transparent);
}

.prose a:hover { text-decoration-color: var(--primary); }

.prose strong { color: var(--fg); font-weight: 600; }

.prose ul,
.prose ol { margin: 1.1em 0; padding-left: 1.35em; }

.prose li { margin: .45em 0; }
.prose li::marker { color: var(--primary-text); }

.prose blockquote {
    margin: 1.5em 0;
    padding: 2px 0 2px 18px;
    border-left: 3px solid var(--primary);
    color: var(--muted-fg);
    font-size: 14.5px;
}

.prose blockquote p { margin: .5em 0; }

.prose hr { border: 0; border-top: 1px solid var(--border); margin: 2.4em 0; }

.prose img { border-radius: var(--radius-sm); margin: 1.4em auto; }

.prose code {
    font-family: var(--mono);
    font-size: .875em;
    padding: 2px 5px;
    border-radius: 5px;
    background: var(--muted);
    color: var(--primary-text);
}

.prose pre.code-block {
    position: relative;
    margin: 1.5em 0;
    padding: 18px;
    border-radius: var(--radius);
    background: var(--code-bg);
    color: #e6e9f5;
    overflow-x: auto;
    font-size: 13px;
    line-height: 1.7;
    border: 1px solid var(--border);
}

.prose pre.code-block code {
    background: none;
    color: inherit;
    padding: 0;
    font-size: inherit;
}

.code-lang {
    position: absolute;
    top: 8px;
    left: 12px;
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .35);
}

.prose mark {
    background: color-mix(in srgb, var(--primary) 22%, transparent);
    color: var(--fg);
    padding: 1px 3px;
    border-radius: 3px;
}

.prose .task-list { list-style: none; padding-left: 0; }

.prose .task-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.prose .task-item input {
    width: 14px;
    height: 14px;
    margin: 6px 0 0;
    accent-color: var(--primary);
    flex: none;
}

.prose .task-item span { flex: 1; min-width: 0; }

.prose .table-wrap { overflow-x: auto; margin: 1.5em 0; }

.prose table { width: 100%; border-collapse: collapse; font-size: 13.5px; }

.prose th,
.prose td { padding: 9px 12px; border: 1px solid var(--border); text-align: left; }

.prose th { background: var(--muted); font-weight: 600; color: var(--fg); }

.article-tags {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
    margin: 36px 0 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    color: var(--muted-fg);
}

.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 40px; }

.post-nav-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card);
    transition: all .18s ease;
    min-height: 68px;
}

.post-nav-item:hover { border-color: var(--primary); background: var(--primary-soft); }
.post-nav-item.next { text-align: right; align-items: flex-end; }
.post-nav-item.is-empty { visibility: hidden; }

.post-nav-label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: var(--muted-fg);
    font-family: var(--mono);
}

.post-nav-title {
    font-size: 13.5px;
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related { margin-top: 8px; }

.related-list {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--card);
}

.related-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-soft);
    transition: background .16s ease;
}

.related-item:last-child { border-bottom: 0; }
.related-item:hover { background: var(--muted); }
.related-item:hover .related-title { color: var(--primary-text); }

.related-title { font-size: 13.5px; font-weight: 500; }

/* 目录 */

.article-toc {
    width: 216px;
    flex: none;
    position: sticky;
    top: calc(var(--header-h) + 28px);
    padding-top: 4px;
}

.toc-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--muted-fg);
    margin-bottom: 10px;
}

.toc-nav {
    display: flex;
    flex-direction: column;
    gap: 1px;
    border-left: 1px solid var(--border);
}

.toc-link {
    display: block;
    padding: 5px 0 5px 12px;
    margin-left: -1px;
    border-left: 2px solid transparent;
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--muted-fg);
    transition: color .16s ease, border-color .16s ease;
}

.toc-link.level-3 { padding-left: 24px; font-size: 12px; }
.toc-link:hover { color: var(--fg); }
.toc-link.active { color: var(--primary-text); border-left-color: var(--primary); font-weight: 600; }

/* ============================ 作品 ============================ */

.work-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }

.work-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card);
    overflow: hidden;
    transition: transform .22s cubic-bezier(.22, .61, .36, 1), box-shadow .22s ease, border-color .22s ease;
    animation: rise .5s cubic-bezier(.22, .61, .36, 1) both;
}

.work-card:nth-child(2n) { animation-delay: .05s; }

.work-card:hover {
    transform: translateY(-3px);
    border-color: color-mix(in srgb, var(--primary) 40%, var(--border));
    box-shadow: var(--shadow-md);
}

.work-cover {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 148px;
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.work-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, .5) 1px, transparent 1px);
    background-size: 13px 13px;
    opacity: .35;
    mix-blend-mode: soft-light;
    pointer-events: none;
}

.work-mark {
    position: relative;
    z-index: 1;
    font-size: 40px;
    font-weight: 700;
    letter-spacing: -.04em;
    color: var(--cover-ink);
    opacity: .8;
}

.work-icon {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 1;
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, .85);
    color: #1a1a2e;
    opacity: 0;
    transform: translateY(-3px);
    transition: opacity .2s ease, transform .2s ease;
}

.work-card:hover .work-icon { opacity: 1; transform: translateY(0); }

.work-body { padding: 15px 17px 17px; }

.work-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 6px; }

.work-title { font-size: 15.5px; letter-spacing: -.02em; }
.work-title a:hover { color: var(--primary-text); }

.work-index { opacity: .5; }

.work-desc {
    font-size: 12.5px;
    color: var(--muted-fg);
    line-height: 1.65;
    margin-bottom: 12px;
    min-height: 2.6em;
}

/* 作品详情 */

.work-detail { max-width: 980px; margin: 0 auto; }

.work-detail .breadcrumb { margin-bottom: 20px; }

.work-detail-head { margin-bottom: 24px; }

.work-detail-title {
    font-size: 32px;
    letter-spacing: -.035em;
    margin: 10px 0 12px;
    text-wrap: balance;
}

.work-detail-desc {
    font-size: 15px;
    color: var(--muted-fg);
    line-height: 1.8;
    max-width: 720px;
    text-wrap: pretty;
}

.work-detail-meta { display: flex; align-items: center; gap: 10px; margin-top: 16px; flex-wrap: wrap; }

.work-cta { display: flex; gap: 10px; margin: 24px 0 30px; flex-wrap: wrap; }

.work-gallery-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 12px;
    flex-wrap: wrap;
}

.work-gallery {
    display: flex;
    gap: 12px;
    margin: 0 0 36px;
    padding: 2px 2px 10px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

.work-gallery::-webkit-scrollbar { height: 8px; }
.work-gallery::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }
.work-gallery::-webkit-scrollbar-track { background: transparent; }

.gallery-item {
    flex: 0 0 auto;
    height: 340px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--muted);
    overflow: hidden;
    cursor: zoom-in;
    scroll-snap-align: start;
    transition: border-color .18s ease, transform .18s ease;
}

.gallery-item:hover { border-color: color-mix(in srgb, var(--primary) 45%, var(--border)); }
.gallery-item:active { transform: scale(.995); }

.gallery-item img {
    height: 100%;
    width: auto;
    object-fit: contain;
    display: block;
    background: var(--muted);
}

/* 图片灯箱 */

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 320;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(9, 11, 17, .88);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: lb-fade .18s ease;
}

.lightbox[hidden] { display: none; }

.lightbox-stage {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 44px 76px;
    overflow: hidden;
    touch-action: pan-y;
}

.lightbox-stage img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .55);
    user-select: none;
    -webkit-user-drag: none;
    animation: lb-zoom .22s cubic-bezier(.22, .61, .36, 1);
}

.lightbox-btn {
    position: absolute;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 50%;
    background: rgba(255, 255, 255, .08);
    color: rgba(255, 255, 255, .85);
    cursor: pointer;
    transition: background .16s ease, color .16s ease;
}

.lightbox-btn:hover { background: rgba(255, 255, 255, .18); color: #fff; }

.lightbox-close { top: 20px; right: 20px; }
.lightbox-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 20px; top: 50%; transform: translateY(-50%); }

.lightbox-count {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: .08em;
    color: rgba(255, 255, 255, .7);
}

body.lb-open { overflow: hidden; }

@keyframes lb-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes lb-zoom {
    from { opacity: 0; transform: scale(.96); }
    to { opacity: 1; transform: scale(1); }
}

.work-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 52px 24px;
    margin-bottom: 30px;
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    background: var(--card);
    color: var(--muted-fg);
    font-size: 13px;
}

/* ============================ 关于 ============================ */

.about-layout { display: flex; gap: 32px; align-items: flex-start; max-width: 1000px; margin: 0 auto; }

.about-card {
    width: 264px;
    flex: none;
    position: sticky;
    top: calc(var(--header-h) + 24px);
    padding: 26px 22px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--card);
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.about-avatar {
    width: 76px;
    height: 76px;
    margin: 0 auto 14px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary) 45%, #8b5cf6));
    color: #fff;
    font-size: 30px;
    font-weight: 700;
    box-shadow: 0 10px 26px -12px color-mix(in srgb, var(--primary) 75%, transparent);
}

.about-avatar img { width: 100%; height: 100%; object-fit: cover; }

.about-name { font-size: 19px; letter-spacing: -.02em; margin-bottom: 6px; }

.about-bio { font-size: 12.5px; color: var(--muted-fg); line-height: 1.7; }

.about-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 16px;
}

.about-links a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 28px;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: 99px;
    font-size: 11.5px;
    color: var(--muted-fg);
    transition: all .16s ease;
}

.about-links a:hover { border-color: var(--primary); color: var(--primary-text); background: var(--primary-soft); }

.about-stats {
    display: flex;
    justify-content: space-around;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px dashed var(--border);
}

.about-stats div { display: flex; flex-direction: column; gap: 1px; }
.about-stats b { font-size: 17px; font-weight: 700; letter-spacing: -.02em; }
.about-stats span { font-size: 10.5px; color: var(--muted-fg); }

.about-main { flex: 1; min-width: 0; }

.about-section {
    padding: 24px 26px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card);
    margin-bottom: 16px;
}

.about-section .section-head { margin-bottom: 14px; }
.about-section .prose { font-size: 14.5px; }

.skill-wrap { display: flex; flex-wrap: wrap; gap: 8px; }

.skill-pill {
    display: inline-flex;
    align-items: center;
    height: 30px;
    padding: 0 12px;
    border-radius: 99px;
    border: 1px solid var(--border);
    background: var(--bg);
    font-size: 12.5px;
    color: var(--fg-soft);
    transition: all .16s ease;
}

.skill-pill:hover { border-color: var(--primary); color: var(--primary-text); background: var(--primary-soft); }

.timeline { position: relative; padding-left: 18px; }

.timeline::before {
    content: "";
    position: absolute;
    left: 5px;
    top: 6px;
    bottom: 6px;
    width: 1px;
    background: var(--border);
}

.timeline-item { position: relative; padding-bottom: 20px; }
.timeline-item:last-child { padding-bottom: 0; }

.timeline-item::before {
    content: "";
    position: absolute;
    left: -18px;
    top: 6px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--card);
    border: 2px solid var(--primary);
}

.timeline-time {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--primary-text);
    letter-spacing: .04em;
}

.timeline-body h3 { font-size: 14.5px; margin: 3px 0 3px; }
.timeline-body p { font-size: 12.5px; color: var(--muted-fg); line-height: 1.7; }

/* ============================ 空状态 / 页脚 ============================ */

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 64px 24px;
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    background: var(--card);
    color: var(--muted-fg);
    text-align: center;
}

.empty-state p { font-size: 13.5px; }

.site-footer {
    border-top: 1px solid var(--border);
    background: var(--card);
    margin-top: auto;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-top: 22px;
    padding-bottom: 22px;
    flex-wrap: wrap;
}

.footer-left { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.footer-brand { font-size: 13px; font-weight: 700; letter-spacing: -.01em; }

.footer-copy { font-size: 11.5px; color: var(--muted-fg); }

.footer-icp {
    font-size: 11.5px;
    color: var(--muted-fg);
    transition: color .16s ease;
}

.footer-icp:hover { color: var(--primary-text); }

.footer-right { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }

.footer-links { display: flex; align-items: center; gap: 12px; }

.footer-links a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11.5px;
    color: var(--muted-fg);
    transition: color .16s ease;
}

.footer-links a:hover { color: var(--primary-text); }

.to-top {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 40;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--card);
    color: var(--muted-fg);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: all .22s ease;
    box-shadow: var(--shadow-md);
}

.to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top:hover { color: var(--primary-text); border-color: var(--primary); }

/* ============================ 动画 ============================ */

@keyframes rise {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
    html { scroll-behavior: auto; }
}

/* ============================ 响应式 ============================ */

@media (max-width: 1200px) {
    .hero-title { font-size: 33px; }
    .hero { padding: 32px; }
}

@media (max-width: 1080px) {
    .article-toc { display: none; }
    .article-layout { max-width: 760px; }
}

@media (max-width: 860px) {
    .feature-grid { grid-template-columns: 1fr; }
    .feature-cover { height: 100px; }
    .work-grid { grid-template-columns: 1fr; }
    .about-layout { flex-direction: column; }
    .about-card { position: static; width: 100%; }
    .hero-body { flex-direction: column; align-items: stretch; gap: 26px; }
    .hero-panel { width: 100%; display: flex; align-items: center; gap: 16px; text-align: left; }
    .hero-avatar { margin: 0; width: 52px; height: 52px; font-size: 22px; }
    .hero-stats { margin-top: 0; margin-left: auto; grid-template-columns: repeat(4, auto); }
    .hero-stat { padding: 6px 12px; }
}

@media (max-width: 768px) {
    .container { padding: 0 16px; }
    .brand-sub { display: none; }

    .main-nav {
        position: fixed;
        top: var(--header-h);
        left: 0;
        right: 0;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        padding: 10px 16px 14px;
        background: var(--card);
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-md);
        margin: 0;
    }

    body.nav-open .main-nav { display: flex; }

    body.nav-open::before {
        content: "";
        position: fixed;
        inset: var(--header-h) 0 0;
        background: rgba(15, 17, 23, .28);
        backdrop-filter: blur(2px);
        z-index: 45;
    }

    .nav-link { padding: 10px 12px; font-size: 14px; }

    .only-mobile { display: grid; }

    .site-main { padding-top: 22px; padding-bottom: 48px; }

    .hero { padding: 24px 20px; border-radius: var(--radius); }
    .hero-title { font-size: 26px; }
    .hero-desc { font-size: 13.5px; }
    .hero-panel { flex-wrap: wrap; }
    .hero-stats { width: 100%; margin-left: 0; }

    .page-title { font-size: 24px; }
    .page-head { gap: 16px; }
    .search-box { min-width: 0; width: 100%; }

    .archive-item { gap: 14px; padding: 16px 2px; }
    .archive-date { width: 48px; }
    .archive-date b { font-size: 18px; }
    .archive-meta { display: none; }

    .article-title { font-size: 24px; }
    .prose { font-size: 15px; line-height: 1.85; }
    .post-nav { grid-template-columns: 1fr; }
    .post-nav-item.is-empty { display: none; }

    .about-section { padding: 20px 18px; }

    .work-detail-title { font-size: 24px; }
    .work-gallery { gap: 8px; }
    .gallery-item { height: 220px; }
    .lightbox-stage { padding: 60px 12px 72px; }
    .lightbox-prev, .lightbox-next { display: none; }
    .lightbox-close { top: 12px; right: 12px; }
    .lightbox-count { bottom: 16px; }

    .footer-inner { flex-direction: column; align-items: flex-start; gap: 10px; }
    .footer-right { gap: 10px; }
    .to-top { right: 14px; bottom: 14px; }
}

@media (max-width: 480px) {
    .hero-actions .btn { flex: 1; }
    .hero-title { font-size: 23px; }
    .work-cover { height: 120px; }
    .feature-cover { height: 88px; }
}
