/* ============================================================
   博客主题 —— Firefly 风格（经典侧栏）
   视觉语言：清新简洁、青绿主题色、毛玻璃顶栏、个人卡侧栏、文章卡片
   深浅色由 script.js 控制 <html data-theme> 切换
   （颜色全部用 hex/rgb，最大兼容所有浏览器）
   ============================================================ */

/* ---------- 设计令牌（亮色为默认） ---------- */
:root {
    --hue: 165;                       /* 主题色相（仅占位，颜色已用 hex 固定为青绿） */

    --radius-large: 1rem;             /* 卡片圆角 */
    --radius-xl: 0.75rem;
    --radius-lg: 0.5rem;
    --radius-md: 0.375rem;

    --sidebar-width: 280px;
    --page-width: 76rem;              /* 内容区总宽 */
    --navbar-height: 64px;

    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
                 "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    --font-mono: ui-monospace, "SF Mono", SFMono-Regular, "JetBrains Mono",
                 Menlo, Consolas, "Liberation Mono", monospace;

    color-scheme: light;

    /* 背景 / 卡片 / 主色 */
    --page-bg: #f4f6f5;
    --card-bg: #ffffff;
    --primary: #0d9488;
    --title-active: #0f766e;
    --deep-text: #1f2937;

    /* 文字透明度层级 */
    --text-90: rgba(0, 0, 0, 0.90);
    --text-75: rgba(0, 0, 0, 0.72);
    --text-50: rgba(0, 0, 0, 0.50);
    --text-30: rgba(0, 0, 0, 0.30);

    /* 按钮 */
    --btn-regular-bg: #eff2f1;
    --btn-regular-bg-hover: #e4e8e7;
    --btn-regular-bg-active: #d6dbd9;
    --btn-content: #0f766e;
    --btn-plain-bg-hover: #eff2f1;
    --btn-plain-bg-active: #fafbfb;

    /* 行内代码 */
    --inline-code-bg: #eff2f1;
    --inline-code-color: #0f766e;

    /* 代码块 */
    --codeblock-bg: #0f172a;
    --codeblock-text: #e2e8f0;

    /* 分隔线 / 链接 */
    --line-divider: rgba(0, 0, 0, 0.08);
    --line-color: rgba(0, 0, 0, 0.10);
    --meta-divider: rgba(0, 0, 0, 0.20);
    --content-meta: rgba(0, 0, 0, 0.70);
    --link-underline: #d5e0de;
    --link-hover: #eff2f1;

    --muted: #ecefef;
    --selection-bg: #c6f0e6;

    /* 标签 chip */
    --tag-bg: rgba(15, 118, 110, 0.08);
    --tag-color: #0f766e;

    /* 导航栏玻璃 */
    --navbar-bg: rgba(255, 255, 255, 0.45);
    --navbar-glass-highlight: rgba(255, 255, 255, 0.18);
    --navbar-glass-hairline: rgba(0, 0, 0, 0.06);
    --shadow-navbar: 0 4px 16px rgba(0, 0, 0, 0.10);

    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.10);
}

/* ---------- 暗色主题 ---------- */
html[data-theme="dark"] {
    color-scheme: dark;

    --page-bg: #17181a;
    --card-bg: #232527;
    --primary: #2dd4bf;
    --title-active: #5eead4;
    --deep-text: #f1f3f2;

    --text-90: rgba(255, 255, 255, 0.90);
    --text-75: rgba(255, 255, 255, 0.72);
    --text-50: rgba(255, 255, 255, 0.50);
    --text-30: rgba(255, 255, 255, 0.30);

    --btn-regular-bg: #2f3335;
    --btn-regular-bg-hover: #3a3f41;
    --btn-regular-bg-active: #454b4d;
    --btn-content: #5eead4;
    --btn-plain-bg-hover: #2b2f31;
    --btn-plain-bg-active: #26292b;

    --inline-code-bg: #2f3335;
    --inline-code-color: #5eead4;

    --codeblock-bg: #121416;
    --codeblock-text: #e2e8f0;

    --line-divider: rgba(255, 255, 255, 0.08);
    --line-color: rgba(255, 255, 255, 0.10);
    --meta-divider: rgba(255, 255, 255, 0.20);
    --content-meta: rgba(255, 255, 255, 0.60);
    --link-underline: #31554e;
    --link-hover: #31554e;

    --muted: #232527;
    --selection-bg: #1e4a40;

    --tag-bg: rgba(94, 234, 212, 0.10);
    --tag-color: #5eead4;

    --navbar-bg: rgba(35, 37, 39, 0.45);
    --navbar-glass-highlight: rgba(255, 255, 255, 0.06);
    --navbar-glass-hairline: rgba(255, 255, 255, 0.10);
    --shadow-navbar: 0 4px 16px rgba(0, 0, 0, 0.35);

    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.40);
}

/* ---------- 重置与基础 ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    font-family: var(--font-sans);
    background: var(--page-bg);
    color: var(--deep-text);
    line-height: 1.75;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

a { color: var(--primary); text-decoration: none; }

::selection { background: var(--selection-bg); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line-color); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: var(--meta-divider); }

[id] { scroll-margin-top: calc(var(--navbar-height) + 16px); }

/* ---------- 卡片基础 ---------- */
.card {
    border-radius: var(--radius-large);
    background: var(--card-bg);
    overflow: hidden;
    transition: background-color 0.15s ease;
}

.btn-regular {
    display: flex; align-items: center; justify-content: center;
    background: var(--btn-regular-bg);
    color: var(--btn-content);
    transition: background-color 0.15s ease, color 0.15s ease;
}
.btn-regular:hover { background: var(--btn-regular-bg-hover); }
.btn-regular:active { background: var(--btn-regular-bg-active); }

/* ---------- 顶部导航栏 ---------- */
.navbar {
    position: sticky; top: 0; z-index: 50;
    height: var(--navbar-height);
    transition: box-shadow 0.3s ease;
}
.navbar::before {
    content: "";
    position: absolute; inset: 0; z-index: -1;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: var(--navbar-bg);
    box-shadow: inset 0 1px 0 var(--navbar-glass-highlight), 0 1px 0 var(--navbar-glass-hairline);
}
.navbar-inner {
    max-width: var(--page-width);
    margin: 0 auto;
    height: 100%;
    padding: 0 1rem;
    display: flex; align-items: center; justify-content: space-between;
}

.brand {
    display: flex; align-items: center; gap: 0.55rem;
    font-weight: 700; font-size: 1.05rem;
    color: var(--deep-text);
}
.brand-logo {
    display: inline-flex; align-items: center; justify-content: center;
    height: 38px; width: auto;
    font-size: 1.35rem; line-height: 1;
}
.brand-logo img { height: 100%; width: auto; object-fit: contain; display: block; }
/* 亮/暗色 logo 切换（加 .brand-logo 前缀提高优先级，压过 .brand-logo img 的 display:block） */
.brand-logo .logo-dark { display: none; }
html[data-theme="dark"] .brand-logo .logo-light { display: none; }
html[data-theme="dark"] .brand-logo .logo-dark { display: block; }

.nav-links { display: flex; align-items: center; gap: 0.25rem; }
.nav-links a {
    font-size: 0.92rem; font-weight: 500; color: var(--text-75);
    padding: 0.4rem 0.75rem; border-radius: var(--radius-lg);
    transition: color 0.15s ease, background-color 0.15s ease;
}
.nav-links a:hover { color: var(--deep-text); background: var(--btn-plain-bg-hover); }

.theme-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: var(--radius-lg);
    border: none; background: transparent; cursor: pointer;
    color: var(--text-75);
    transition: color 0.15s ease, background-color 0.15s ease, transform 0.15s ease;
}
.theme-toggle:hover { color: var(--primary); background: var(--btn-plain-bg-hover); }
.theme-toggle:active { transform: scale(0.9); }
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle .icon-moon { display: none; }
html[data-theme="light"] .theme-toggle .icon-sun { display: none; }
html[data-theme="light"] .theme-toggle .icon-moon { display: block; }

/* ---------- 主网格（侧栏 + 内容） ---------- */
.layout {
    max-width: var(--page-width);
    margin: 1.5rem auto 0;
    padding: 0 1rem;
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr;
    gap: 1rem;
    align-items: start;
}
.content { min-width: 0; }

/* ---------- 侧栏个人卡 ---------- */
.sidebar { position: sticky; top: calc(var(--navbar-height) + 1rem); }

.profile-card { padding: 0.75rem; }
.profile-avatar {
    display: block; border-radius: var(--radius-xl); overflow: hidden;
    margin-bottom: 0.75rem;
}
.profile-avatar img { width: 100%; height: auto; display: block; aspect-ratio: 1 / 1; object-fit: cover; }
.profile-avatar-letter {
    display: flex; align-items: center; justify-content: center;
    width: 100%; aspect-ratio: 1 / 1;
    background: var(--primary); color: #fff; font-size: 3rem; font-weight: 800;
}
.profile-name {
    text-align: center; font-weight: 700; font-size: 1.25rem;
    color: var(--deep-text); margin-bottom: 0.25rem;
}
.profile-bar {
    height: 0.25rem; width: 1.25rem; margin: 0.25rem auto 0.5rem;
    background: var(--primary); border-radius: 999px;
}
.profile-bio {
    text-align: center; color: var(--text-50); font-size: 0.88rem;
    line-height: 1.6; margin-bottom: 0.625rem; padding: 0 0.25rem;
}
.profile-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; }
.icon-btn { width: 40px; height: 40px; border-radius: var(--radius-lg); }
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn:active { transform: scale(0.9); }

/* ---------- 文章卡片列表 ---------- */
.post-list { display: flex; flex-direction: column; gap: 1rem; }

.post-card { display: flex; position: relative; }
.post-card-content { flex: 1; min-width: 0; padding: 1.25rem 1.5rem; }
.post-card-title {
    font-size: 1.5rem; font-weight: 700; color: var(--deep-text);
    margin-bottom: 0.5rem; padding-left: 1rem; position: relative;
    transition: color 0.15s ease;
}
.post-card-title::before {
    content: ""; position: absolute; left: 0; top: 0.5rem;
    width: 0.25rem; height: 1.25rem; border-radius: 0.375rem;
    background: var(--primary);
}
.post-card:hover .post-card-title { color: var(--primary); }

.post-meta {
    display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem;
    color: var(--text-50); font-size: 0.875rem; margin-bottom: 0.5rem;
}
.post-meta .meta-sep { color: var(--meta-divider); }
.post-meta a { color: var(--text-50); transition: color 0.15s ease; }
.post-meta a:hover { color: var(--primary); }

.post-card-desc {
    color: var(--text-75); font-size: 0.95rem; line-height: 1.7;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card-enter {
    width: 3.25rem; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: var(--btn-regular-bg); color: var(--primary);
    transition: background-color 0.15s ease;
}
.post-card-enter svg { width: 1.5rem; height: 1.5rem; }
.post-card:hover .post-card-enter { background: var(--btn-regular-bg-hover); }

/* ---------- 分类分组（/cpp 列表页） ---------- */
.cat-group { margin-bottom: 1.5rem; }
.cat-group:last-child { margin-bottom: 0; }
.cat-title {
    display: flex; align-items: center; gap: 0.5rem;
    font-size: 1.2rem; font-weight: 700; color: var(--deep-text);
    margin-bottom: 0.75rem; padding-left: 1rem; position: relative;
}
.cat-title::before {
    content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
    width: 0.25rem; height: 1rem; border-radius: 0.375rem;
    background: var(--primary);
}
.cat-count {
    font-size: 0.78rem; font-weight: 500; color: var(--text-50);
    padding: 0.15rem 0.6rem; border-radius: 999px;
    background: var(--btn-regular-bg);
}

.empty-hint {
    color: var(--text-50); padding: 3rem 1rem; text-align: center; font-size: 0.95rem;
}

/* ---------- 文章页 ---------- */
.post { padding: 2rem 2.25rem; }
.post > :first-child { margin-top: 0; }

.crumbs {
    display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem;
    color: var(--text-50); font-size: 0.9rem; margin-bottom: 1.25rem;
}
.crumbs a { color: var(--text-50); transition: color 0.15s ease; }
.crumbs a:hover { color: var(--primary); }

.post-title {
    font-size: 2rem; font-weight: 800; line-height: 1.3;
    color: var(--deep-text); margin-bottom: 0.6rem;
}

.post-meta-post { margin-bottom: 1.5rem; }
.tag {
    color: var(--tag-color); border-radius: 999px;
    padding: 0.2rem 0.8rem; font-size: 0.85rem; font-weight: 500;
    background: var(--tag-bg);
}

/* ---------- Markdown 排版 ---------- */
.markdown-body { color: var(--deep-text); }
.markdown-body h1, .markdown-body h2, .markdown-body h3,
.markdown-body h4, .markdown-body h5, .markdown-body h6 {
    color: var(--deep-text); font-weight: 700; line-height: 1.3;
    margin: 1.7em 0 0.7em;
}
.markdown-body h1 { font-size: 1.9rem; }
.markdown-body h2 { font-size: 1.5rem; padding-bottom: 0.35em; border-bottom: 1px solid var(--line-divider); }
.markdown-body h3 { font-size: 1.25rem; }
.markdown-body h4 { font-size: 1.1rem; }

.markdown-body p { margin: 0.9em 0; color: var(--text-75); }

.markdown-body a {
    color: var(--primary); font-weight: 500;
    text-decoration: underline 1px dashed var(--link-underline);
    text-underline-offset: 4px;
    transition: background-color 0.15s ease;
}
.markdown-body a:hover { background: var(--btn-plain-bg-hover); }

.markdown-body code {
    font-family: var(--font-mono); font-size: 0.88em;
    background: var(--inline-code-bg); color: var(--inline-code-color);
    padding: 0.18em 0.42em; border-radius: var(--radius-md);
}
.markdown-body pre {
    background: var(--codeblock-bg); color: var(--codeblock-text);
    padding: 1rem 1.25rem; border-radius: var(--radius-xl);
    overflow-x: auto; margin: 1.2em 0; line-height: 1.6;
}
.markdown-body pre code { background: none; color: inherit; padding: 0; font-size: 0.9em; }

.markdown-body blockquote {
    margin: 1.2em 0; padding: 0.3em 0 0.3em 1em;
    border-left: 0.25rem solid var(--btn-regular-bg);
    color: var(--text-50);
}
.markdown-body blockquote p { margin: 0.4em 0; color: var(--text-50); }

.markdown-body ul, .markdown-body ol { margin: 0.9em 0; padding-left: 1.5em; color: var(--text-75); }
.markdown-body li { margin: 0.35em 0; }
.markdown-body li::marker { color: var(--primary); }

.markdown-body img { max-width: 100%; border-radius: var(--radius-xl); }
.markdown-body hr { border: none; border-top: 1px dashed var(--line-divider); margin: 2em 0; }

.markdown-body table {
    width: 100%; margin: 1.2em 0; font-size: 0.95em;
    border-collapse: separate; border-spacing: 0;
    border-radius: 0.5rem; overflow: hidden;
}
.markdown-body th, .markdown-body td {
    padding: 0.5rem 0.75rem; text-align: left;
    border-bottom: 1px solid var(--line-color);
}
.markdown-body th { background: var(--btn-regular-bg); color: var(--btn-content); font-weight: 600; }
.markdown-body td { background: var(--card-bg); color: var(--text-75); }
.markdown-body tr:nth-child(even) td { background: var(--btn-plain-bg-active); }

.markdown-body pre.plain {
    background: none; border: none; color: var(--text-75); padding: 0;
    white-space: pre-wrap; word-break: break-word;
    font-family: var(--font-sans); line-height: 1.8;
}

/* ---------- 阅读进度条（顶部横条） ---------- */
.reading-progress {
    position: fixed; top: 0; left: 0; right: 0; height: 3px;
    z-index: 100; pointer-events: none; background: transparent;
}
.reading-progress-bar {
    height: 100%; width: 0%;
    background: var(--primary);
    transition: width 0.08s linear;
}

/* ---------- 文章目录 ---------- */
.toc {
    position: fixed; right: 20px; top: calc(var(--navbar-height) + 24px);
    width: 250px; max-height: calc(100vh - var(--navbar-height) - 48px);
    overflow-y: auto; z-index: 60;
    padding: 16px 12px;
    background: var(--card-bg);
    border-radius: var(--radius-large);
    box-shadow: var(--shadow-md);
    display: none;
}
.toc.open { display: block; }
.toc-title {
    font-size: 0.72rem; font-weight: 600; letter-spacing: 0.14em;
    text-transform: uppercase; color: var(--text-30);
    margin: 0 0 10px 8px;
}
.toc a {
    display: block; padding: 5px 10px; margin: 1px 0;
    color: var(--text-50); font-size: 0.86rem; line-height: 1.45;
    border-left: 2px solid transparent; border-radius: 0.5rem;
    transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}
.toc a:hover { color: var(--primary); background: var(--btn-plain-bg-hover); }
.toc a.active { color: var(--primary); border-left-color: var(--primary); background: var(--btn-plain-bg-hover); }
.toc a.toc-level-3 { padding-left: 24px; }

/* 移动端浮动目录按钮 */
.toc-toggle {
    position: fixed; right: 16px; bottom: 24px; z-index: 70;
    display: inline-flex; align-items: center; gap: 6px;
    padding: 11px 18px; border-radius: 999px;
    border: 1px solid var(--line-color);
    background: var(--card-bg); color: var(--deep-text);
    font-size: 0.9rem; font-weight: 600;
    box-shadow: var(--shadow-md); cursor: pointer;
    transition: transform 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.toc-toggle:hover { color: var(--primary); border-color: var(--primary); transform: translateY(-2px); }

@media (max-width: 1239px) {
    .toc.open { top: auto; bottom: 84px; max-height: 60vh; }
}

/* ---------- QQ 页 ---------- */
.qr-desc { color: var(--text-75); font-size: 0.95rem; margin-bottom: 1rem; }
.qr-desc .qq-num { color: var(--primary); font-weight: 700; }
.qq-actions { margin-top: 0.25rem; }
.copy-btn {
    display: inline-flex; align-items: center; gap: 0.4rem;
    padding: 0.55rem 1.25rem; border: none; border-radius: var(--radius-lg);
    cursor: pointer; font-size: 0.95rem; font-weight: 600;
}

/* ---------- 轻提示 toast ---------- */
.toast {
    position: fixed; left: 50%; bottom: 2rem; z-index: 200;
    transform: translateX(-50%) translateY(16px);
    background: var(--card-bg); color: var(--deep-text);
    padding: 0.6rem 1.25rem; border-radius: 999px;
    box-shadow: var(--shadow-md); font-size: 0.9rem;
    opacity: 0; pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- 页脚 ---------- */
.site-footer {
    text-align: center; color: var(--text-30); font-size: 0.85rem;
    padding: 2rem 1rem; margin-top: 2rem;
}

/* ---------- 焦点可见性 ---------- */
a:focus-visible, button:focus-visible {
    outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px;
}

/* ---------- 置顶 / 标签 ---------- */
.pinned-badge {
    display: inline-block; margin-bottom: 0.4rem;
    padding: 0.1rem 0.55rem; border-radius: 999px;
    font-size: 0.75rem; font-weight: 600;
    color: #fff; background: var(--primary);
}
.post-card-tags, .post-tags {
    display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.5rem;
}
.post-tags { margin-bottom: 1.2rem; }
.tag-chip {
    display: inline-flex; align-items: center;
    padding: 0.1rem 0.6rem; border-radius: 999px;
    font-size: 0.8rem; font-weight: 500;
    color: var(--btn-content); background: var(--tag-bg);
    transition: background-color 0.15s ease, color 0.15s ease;
}
.tag-chip:hover { background: var(--btn-regular-bg); color: var(--primary); }

/* ---------- 评论区 ---------- */
.comments { padding: 1.5rem 2rem; margin-top: 1rem; }
.comments-title {
    font-size: 1.2rem; font-weight: 700; color: var(--deep-text);
    margin-bottom: 1.2rem; position: relative; padding-left: 1rem;
}
.comments-title::before {
    content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
    width: 0.25rem; height: 1rem; border-radius: 0.375rem; background: var(--primary);
}
.comment-form { margin-bottom: 1.5rem; }
.comment-form-row { display: flex; gap: 0.75rem; margin-bottom: 0.75rem; }
.comment-form input, .comment-form textarea {
    width: 100%; padding: 0.6rem 0.85rem;
    border: 1px solid var(--line-color); border-radius: var(--radius-lg);
    background: var(--page-bg); color: var(--deep-text);
    font-family: inherit; font-size: 0.92rem;
    transition: border-color 0.15s ease;
}
.comment-form input:focus, .comment-form textarea:focus {
    outline: none; border-color: var(--primary);
}
.comment-form textarea { resize: vertical; min-height: 90px; margin-bottom: 0.75rem; }
.comment-submit {
    border: none; cursor: pointer; padding: 0.55rem 1.4rem;
    border-radius: var(--radius-lg); font-size: 0.92rem; font-weight: 600;
}
.comment { display: flex; gap: 0.85rem; padding: 0.9rem 0; border-top: 1px solid var(--line-divider); }
.comment-avatar {
    width: 40px; height: 40px; border-radius: 999px; flex-shrink: 0;
    background: var(--btn-regular-bg);
}
.comment-body { flex: 1; min-width: 0; }
.comment-head { display: flex; align-items: baseline; gap: 0.6rem; margin-bottom: 0.2rem; }
.comment-nick { font-weight: 600; font-size: 0.92rem; color: var(--deep-text); }
.comment-time { font-size: 0.78rem; color: var(--text-30); }
.comment-content { font-size: 0.92rem; color: var(--text-75); line-height: 1.7; word-break: break-word; }
.comments-empty { color: var(--text-30); font-size: 0.9rem; text-align: center; padding: 1rem 0; }
/* 评论回复 */
.comment-children {
    margin-left: 1.5rem;
    padding-left: 0.75rem;
    border-left: 1px solid var(--line-divider);
}
.comment-reply-to {
    font-size: 0.8rem; color: var(--btn-content);
    background: var(--tag-bg); padding: 0.05rem 0.5rem; border-radius: 999px;
}
.comment-reply-btn {
    display: inline-block; margin-top: 0.4rem;
    font-size: 0.8rem; color: var(--text-50); cursor: pointer;
    transition: color 0.15s ease;
}
.comment-reply-btn:hover { color: var(--primary); }
.reply-indicator {
    margin-bottom: 0.6rem; padding: 0.4rem 0.75rem;
    border-radius: var(--radius-lg);
    background: var(--tag-bg); color: var(--btn-content);
    font-size: 0.85rem; cursor: pointer;
}
@media (max-width: 767px) {
    .comment-form-row { flex-direction: column; }
    .comments { padding: 1.25rem 1rem; }
}

/* ---------- 文章列表页：视图切换 tab ---------- */
.view-tabs { display: flex; gap: 0.5rem; margin-bottom: 1rem; }
.view-tab {
    display: inline-flex; align-items: center;
    padding: 0.4rem 1rem; border-radius: 999px;
    font-size: 0.9rem; font-weight: 600;
    color: var(--text-75); background: var(--card-bg);
    transition: color 0.15s ease, background-color 0.15s ease;
}
.view-tab:hover { color: var(--primary); }
.view-tab.active { color: #fff; background: var(--primary); }

/* ---------- 归档视图 ---------- */
.archive-year { margin-bottom: 1.5rem; }
.archive-list { display: flex; flex-direction: column; }
.archive-item {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.6rem 0.75rem; border-radius: var(--radius-lg);
    color: var(--deep-text); transition: background-color 0.15s ease;
}
.archive-item:hover { background: var(--btn-plain-bg-hover); }
.archive-date {
    font-family: var(--font-mono); font-size: 0.82rem;
    color: var(--text-50); flex-shrink: 0; min-width: 5.5rem;
}
.archive-title { flex: 1; font-weight: 500; color: var(--deep-text); }
.archive-item:hover .archive-title { color: var(--primary); }
.archive-cat {
    font-size: 0.78rem; color: var(--btn-content);
    background: var(--tag-bg); padding: 0.1rem 0.55rem; border-radius: 999px;
}

/* ---------- 关于页 ---------- */
.about-head { display: flex; gap: 1.25rem; align-items: center; }
.about-avatar {
    width: 84px; height: 84px; border-radius: var(--radius-xl);
    object-fit: cover; flex-shrink: 0;
}
.about-info { flex: 1; min-width: 0; }
.about-bio { color: var(--text-75); font-size: 0.95rem; line-height: 1.7; }

/* ---------- 动态 ---------- */
.dynamic { padding: 1.5rem 2rem; margin-top: 1rem; }
.dynamic-item { padding: 1rem 0; border-top: 1px solid var(--line-divider); }
.dynamic-item:first-child { border-top: none; }
.dynamic-content { color: var(--text-75); font-size: 0.95rem; line-height: 1.7; }
.dynamic-meta { display: flex; align-items: center; gap: 0.75rem; margin-top: 0.5rem; }
.dynamic-loc { font-size: 0.8rem; color: var(--text-50); }
@media (max-width: 767px) {
    .about-head { flex-direction: column; align-items: flex-start; }
    .archive-date { min-width: auto; }
}

/* ---------- 响应式 ---------- */
@media (max-width: 767px) {
    .layout { grid-template-columns: 1fr; }
    .sidebar { position: static; }
    .profile-avatar { max-width: 260px; }
    .nav-links { display: none; }
    .post { padding: 1.25rem 1rem; }
    .post-title { font-size: 1.6rem; }
    .post-card-content { padding: 1rem 1rem 1rem 0.75rem; }
    .post-card-title { font-size: 1.2rem; }
    .post-card-enter { width: 2.75rem; }
    .brand-name { font-size: 0.95rem; }
}

/* ---------- 减少动效 ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001s !important;
        transition-duration: 0.001s !important;
    }
    html { scroll-behavior: auto; }
}
