/* 引入 Google Fonts - 现代极简杂志风 */
/* Import Google Fonts - Modern minimalist magazine style */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&family=Oswald:wght@400;500;600;700&family=Inter:wght@300;400;500;600;700&family=Noto+Sans+SC:wght@300;400;500;700&family=JetBrains+Mono:wght@400;500;600;700&family=Fira+Code:wght@400;500;600;700&display=swap');

/* CSS变量定义 - 主题系统 */
/* CSS variable definitions for the theme system */

:root {
    /* 字体系统 - 现代极简杂志风 */
    /* Font system - Modern minimalist magazine style */
    /* 标题：高几何感无衬线体，干净利落 */
    /* Headings: geometric sans-serif, clean and sharp */
    --font-heading: "Montserrat", "Oswald", "Noto Sans SC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    /* 正文：易读的现代无衬线体 */
    /* Body: readable modern sans-serif */
    --font-body: "Inter", "Noto Sans SC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    /* 代码：JetBrains Mono 为首选，专为代码阅读设计；Fira Code 支持连字特性 */
    /* Code: JetBrains Mono preferred, designed for code reading; Fira Code supports ligatures */
    --font-mono: "JetBrains Mono", "Fira Code", "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    /* 浅色模式颜色 */
    /* Light mode color palette */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #e9ecef;
    --text-primary: #1a1a1a;
    --text-secondary: #586069;
    --text-tertiary: #6b7280;
    --accent-primary: #0366d6;
    /* 兼容旧样式变量命名 */
    /* Backward-compatible alias for legacy styles */
    --accent-color: var(--accent-primary);
    --accent-hover: #0256cc;
    --border-color: #e1e4e8;
    --border-light: #e5e7eb;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.15);
    --card-bg: #ffffff;
    --input-bg: #ffffff;
    --nav-bg: rgba(255, 255, 255, 0.72);
    --nav-bg-solid: #ffffff;
    --tech-grid-color: rgba(99, 102, 241, 0.03);
    --tech-dot-color: rgba(99, 102, 241, 0.08);
    --btn-fill-start: #76c8fa;
    --btn-fill-end: #6ec1f7;
    --site-header-height: 40px;
    --post-scroll-offset: 56px;
    --scrollbar-top-offset: 0px;
}
html.dark-mode {
    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    --bg-tertiary: #21262d;
    --text-primary: #e6edf3;
    --text-secondary: #8b949e;
    --text-tertiary: #7d8590;
    --accent-primary: #58a6ff;
    --accent-hover: #79c0ff;
    --border-color: #30363d;
    --border-light: #21262d;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.6);
    --card-bg: #161b22;
    --input-bg: #0d1117;
    --nav-bg: rgba(13, 17, 23, 0.72);
    --nav-bg-solid: #0d1117;
    --tech-grid-color: rgba(88, 166, 255, 0.05);
    --tech-dot-color: rgba(88, 166, 255, 0.12);
    --btn-fill-start: #2748c7;
    --btn-fill-end: #1e40af;
}
/* 全局页面滚动条 - 深色模式 */
html.dark-mode::-webkit-scrollbar-track {
    background: var(--bg-primary);
    margin-top: var(--scrollbar-top-offset, 0px);
}
html.dark-mode::-webkit-scrollbar-thumb {
    background: #30363d;
    border-radius: 4px;
}
html.dark-mode::-webkit-scrollbar-thumb:hover {
    background: #484f58;
}
html.dark-mode {
    scrollbar-color: #30363d var(--bg-primary);
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-secondary);
    min-height: 100vh;
    transition:
        background-color 0.3s ease,
        color 0.3s ease;
    position: relative;
}
/* 全局页面滚动条 - 浅色模式 */
html::-webkit-scrollbar {
    width: 8px;
}
html::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    margin-top: var(--scrollbar-top-offset, 0px);
}
html::-webkit-scrollbar-thumb {
    background: #c4c9cf;
    border-radius: 4px;
}
html::-webkit-scrollbar-thumb:hover {
    background: #a8aeb6;
}
html {
    scrollbar-width: thin;
    scrollbar-color: #c4c9cf var(--bg-secondary);
}
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(var(--tech-grid-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--tech-grid-color) 1px, transparent 1px),
        radial-gradient(circle, var(--tech-dot-color) 1px, transparent 1px);
    background-size:
        50px 50px,
        50px 50px,
        25px 25px;
    background-position:
        -1px -1px,
        -1px -1px,
        0 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.6;
    animation: techBgMove 30s linear infinite;
}
@keyframes techBgMove {
    0% {
        background-position:
            -1px -1px,
            -1px -1px,
            0 0;
    }
    100% {
        background-position:
            49px 49px,
            -51px 49px,
            25px 25px;
    }
}
body > * {
    position: relative;
    z-index: 1;
}
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}
.site-header {
    background-color: #fff;
    border-bottom: 1px solid #e1e4e8;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}
.navigation {
    display: flex;
    gap: 2rem;
    justify-content: center;
}
.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}
.nav-link:hover,
.nav-link.active {
    color: var(--accent-primary);
    background-color: transparent;
}
.site-content {
    min-height: calc(100vh - 120px);
    padding: 1.5rem 0;
}
.hero-section {
    padding: 1.5rem 0 1.5rem 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
    min-height: 280px;
}
.profile-container {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 2rem;
    align-items: start;
    position: relative;
    z-index: 1;
    max-width: 680px;
}
/* Hero 地球背景 - 桌面端全屏背景效果 */
/* Hero globe background - desktop full-screen background effect */

.hero-globe-bg {
    position: absolute;
    top: 0;
    right: 0;
    width: 40%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
    border-radius: 0;
}
#globe-map {
    width: 100%;
    height: 100%;
    min-height: 320px;
}
/* 渐变遮罩 - 左侧轻微渐变 */
/* Gradient overlay - subtle left-side gradient */

.hero-globe-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        to right,
        var(--bg-secondary) 0%,
        rgba(248, 249, 250, 0.6) 40%,
        transparent 100%
    );
    pointer-events: none;
}
html.dark-mode .hero-globe-overlay {
    background: linear-gradient(
        to right,
        var(--bg-secondary) 0%,
        rgba(22, 27, 34, 0.6) 40%,
        transparent 100%
    );
}
/* 旧的小方块样式移除 */
/* Old small block styles removed */

.globe-container {
    display: none;
}
.profile-image {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.profile-name {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}
.profile-title {
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}
.profile-affiliation {
    font-size: 1.1rem;
    color: var(--accent-primary);
    margin-bottom: 1.5rem;
    font-weight: 500;
}
.profile-bio {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    max-width: 380px;
}
.social-and-blog-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
}
.social-links {
    display: flex;
    gap: 1rem;
}
.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    text-decoration: none;
    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease;
}
.social-link:hover {
    background-color: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-primary);
}
.social-link:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(229, 231, 235, 0.8);
}
.profile-blog-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    background-color: var(--card-bg);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 20px;
    font-weight: 500;
    border: 1px solid var(--border-color);
    transition: all 0.25s ease;
    font-size: 0.85rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}
.profile-blog-button svg {
    flex-shrink: 0;
}
.profile-blog-button:hover {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    text-decoration: none;
    border-color: var(--border-color);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}
.blog-container {
    /* 三栏布局：左侧边栏 + 主内容 + 右侧信息栏 */
    /* Three-column layout: left sidebar + main content + right info bar */
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px 16px;
    display: flex;
    gap: 20px;
    background: var(--bg-primary);
    min-height: 100vh;
}
.blog-sidebar {
    width: 280px;
    flex-shrink: 0;
}
.sidebar-widget {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
    border: none;
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.04),
        0 4px 16px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
}
.sidebar-widget:hover {
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.06),
        0 8px 24px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}
html.dark-mode .sidebar-widget {
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.2),
        0 4px 16px rgba(0, 0, 0, 0.15);
}
html.dark-mode .sidebar-widget:hover {
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.25),
        0 8px 32px rgba(0, 0, 0, 0.2);
}
.sidebar-widget h3 {
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 700;
    margin: 0 0 12px 0;
    padding-bottom: 0;
    border-bottom: none;
    position: static;
    font-family: var(--font-heading);
    letter-spacing: -0.01em;
    text-transform: uppercase;
}
.sidebar-widget h3::after {
    /* 移除强调色下划线 */
    /* Remove accent color underline */
    content: none;
}
.widget-title-with-icon {
    display: flex;
    align-items: center;
    gap: 8px;
}
.widget-icon {
    width: 16px;
    height: 16px;
    color: var(--text-primary);
    flex-shrink: 0;
}
.widget-icon-outline {
    color: inherit;
}
.profile-widget {
    text-align: center;
}
.profile-widget .profile-avatar {
    width: 100px;
    height: 100px;
    margin: 0 auto 20px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid rgba(255, 255, 255, 0.6);
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.08),
        0 0 8px 2px rgba(99, 102, 241, 0.18),
        0 0 16px 4px rgba(99, 102, 241, 0.12),
        0 0 28px 6px rgba(99, 102, 241, 0.08),
        0 0 44px 8px rgba(99, 102, 241, 0.04);
    animation: breathingGlow 4s ease-in-out infinite;
}

/* 呼吸光环动画 - 多层渐变模拟光线衰减 */
/* Breathing glow animation - multi-layer gradient simulating light falloff */
@keyframes breathingGlow {
    0%, 100% {
        box-shadow:
            0 4px 12px rgba(0, 0, 0, 0.08),
            0 0 8px 2px rgba(99, 102, 241, 0.16),
            0 0 16px 4px rgba(99, 102, 241, 0.10),
            0 0 28px 6px rgba(99, 102, 241, 0.06),
            0 0 44px 8px rgba(99, 102, 241, 0.03);
    }
    50% {
        box-shadow:
            0 4px 16px rgba(0, 0, 0, 0.1),
            0 0 12px 4px rgba(99, 102, 241, 0.22),
            0 0 24px 8px rgba(99, 102, 241, 0.14),
            0 0 40px 12px rgba(99, 102, 241, 0.08),
            0 0 60px 16px rgba(99, 102, 241, 0.04);
    }
}

html.dark-mode .profile-widget .profile-avatar {
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.3),
        0 0 10px 3px rgba(99, 102, 241, 0.28),
        0 0 20px 6px rgba(99, 102, 241, 0.18),
        0 0 34px 9px rgba(99, 102, 241, 0.10),
        0 0 52px 12px rgba(99, 102, 241, 0.05);
    animation: breathingGlowDark 4s ease-in-out infinite;
}

/* 深色模式呼吸光环 - 光晕更明显 */
/* Dark mode breathing glow - more prominent halo */
@keyframes breathingGlowDark {
    0%, 100% {
        box-shadow:
            0 4px 12px rgba(0, 0, 0, 0.3),
            0 0 10px 3px rgba(99, 102, 241, 0.25),
            0 0 20px 6px rgba(99, 102, 241, 0.15),
            0 0 34px 9px rgba(99, 102, 241, 0.08),
            0 0 52px 12px rgba(99, 102, 241, 0.04);
    }
    50% {
        box-shadow:
            0 4px 16px rgba(0, 0, 0, 0.35),
            0 0 14px 5px rgba(99, 102, 241, 0.32),
            0 0 28px 10px rgba(99, 102, 241, 0.20),
            0 0 48px 15px rgba(99, 102, 241, 0.10),
            0 0 72px 20px rgba(99, 102, 241, 0.05);
    }
}
.profile-widget .profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.profile-widget .profile-name {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 10px 0;
    font-family: var(--font-heading);
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #1e293b 0%, #475569 50%, #1e293b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
html.dark-mode .profile-widget .profile-name {
    background: linear-gradient(135deg, #f1f5f9 0%, #94a3b8 50%, #f1f5f9 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.profile-widget .profile-motto {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0 0 18px 0;
    font-style: normal;
    font-family: var(--font-body);
    font-weight: 400;
}
.profile-widget .profile-stats {
    border-top: 1px solid var(--border-light);
    padding-top: 16px;
    margin-top: 16px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px 0;
    justify-items: center;
}
.profile-widget .stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0;
}
.profile-widget .stat-label {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 8px;
}
.profile-widget .stat-value {
    font-size: 15px;
    color: var(--accent-primary);
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
}
.sidebar-home-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    font-size: 15px;
    line-height: 1.2;
    background: var(--card-bg);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}
.sidebar-home-btn:hover {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}
.back-home-widget {
    margin-top: 16px;
    text-align: center;
    background: none !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
    transform: none !important;
}
.back-home-widget:hover {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    transform: none !important;
}
.back-home-widget .sidebar-home-btn {
    margin-top: 4px;
}
.search-box {
    display: block;
    width: 100%;
}
.search-box input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 9999px;
    font-size: 14px;
    transition:
        box-shadow 0.2s ease,
        border-color 0.2s ease;
    background: var(--input-bg);
    color: var(--text-primary);
}
.search-box input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: none;
    background: var(--input-bg);
}
/* 归档模块 */
/* Archive module styles */

.archive-year {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.4rem;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-decoration: none;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(168, 85, 247, 0.05) 100%);
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
}
.archive-year::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s ease;
}
.archive-year:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12) 0%, rgba(168, 85, 247, 0.12) 100%);
    border-color: rgba(99, 102, 241, 0.2);
}
.archive-year:hover::before {
    left: 100%;
}
html.dark-mode .archive-year {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(168, 85, 247, 0.1) 100%);
}
html.dark-mode .archive-year:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(168, 85, 247, 0.2) 100%);
    border-color: rgba(99, 102, 241, 0.3);
}
html.dark-mode .archive-year::before {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
}
.post-count {
    font-size: 0.8rem;
    color: var(--text-secondary);
}
.archive-item {
    display: flex;
    gap: 0.35rem;
    margin-bottom: 0.35rem;
    font-size: 0.85rem;
    padding: 0.18rem 0.45rem;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}
.archive-item:hover {
    background-color: var(--bg-secondary);
}
.archive-date {
    color: var(--text-secondary);
    min-width: 35px;
}
.archive-item a {
    color: var(--text-primary);
    text-decoration: none;
    flex: 1;
}
.archive-item a:hover {
    color: var(--accent-primary);
}
.tags-cloud-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 16px;
    line-height: 1.8;
}
.tag-cloud-item {
    font-size: 14px;
    font-family: var(--font-body);
    text-decoration: none;
    transition:
        opacity 0.2s ease,
        transform 0.2s ease;
    cursor: pointer;
    display: inline-block;
}
.tag-cloud-item:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}
.tag-cloud-item[data-color="0"] {
    color: #10b981;
}
.tag-cloud-item[data-color="1"] {
    color: #3b82f6;
}
.tag-cloud-item[data-color="2"] {
    color: #ec4899;
}
.tag-cloud-item[data-color="3"] {
    color: #22c55e;
}
.tag-cloud-item[data-color="4"] {
    color: #f59e0b;
}
.tag-cloud-item[data-color="5"] {
    color: #6366f1;
}
.tag-cloud-item[data-color="6"] {
    color: #e11d48;
}
.tag-cloud-item[data-color="7"] {
    color: #06b6d4;
}
.tag-cloud-item[data-color="8"] {
    color: #a855f7;
}
.tag-cloud-item[data-color="9"] {
    color: #f97316;
}
html.dark-mode .tag-cloud-item[data-color="0"] {
    color: #34d399;
}
html.dark-mode .tag-cloud-item[data-color="1"] {
    color: #60a5fa;
}
html.dark-mode .tag-cloud-item[data-color="2"] {
    color: #f472b6;
}
html.dark-mode .tag-cloud-item[data-color="3"] {
    color: #4ade80;
}
html.dark-mode .tag-cloud-item[data-color="4"] {
    color: #fbbf24;
}
html.dark-mode .tag-cloud-item[data-color="5"] {
    color: #818cf8;
}
html.dark-mode .tag-cloud-item[data-color="6"] {
    color: #fb7185;
}
html.dark-mode .tag-cloud-item[data-color="7"] {
    color: #22d3ee;
}
html.dark-mode .tag-cloud-item[data-color="8"] {
    color: #c084fc;
}
html.dark-mode .tag-cloud-item[data-color="9"] {
    color: #fb923c;
}
.category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.4rem;
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-decoration: none;
    color: var(--text-primary);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05) 0%, rgba(59, 130, 246, 0.05) 100%);
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
}
.category-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s ease;
}
.category-item:link,
.category-item:visited,
.category-item:hover,
.category-item:active {
    text-decoration: none;
}
.category-item:hover {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(59, 130, 246, 0.12) 100%);
    border-color: rgba(16, 185, 129, 0.2);
}
.category-item:hover::before {
    left: 100%;
}
html.dark-mode .category-item {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(59, 130, 246, 0.1) 100%);
}
html.dark-mode .category-item:hover {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(59, 130, 246, 0.2) 100%);
    border-color: rgba(16, 185, 129, 0.3);
}
html.dark-mode .category-item::before {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
}
.category-name {
    color: inherit;
}
.category-count {
    font-size: 0.8rem;
    color: var(--text-secondary);
}
.blog-main {
    flex: 1;
    min-width: 0;
}
.blog-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px dashed var(--border-color);
}
.blog-title {
    font-family: var(--font-heading);
    font-size: 20px;
    line-height: 1.2;
    font-weight: 600;
    color: var(--text-primary);
}
.blog-posts-grid {
    margin-bottom: 2rem;
}
/* 博客卡片 - 新样式 */
/* Blog cards - new layout */

.blog-card {
    background: var(--card-bg);
    border-radius: 16px;
    margin-bottom: 0.75rem;
    transition: all 0.3s ease;
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.04),
        0 4px 16px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    display: flex;
    flex-direction: row;
    min-height: 110px;
    border: none;
    position: relative;
}
.blog-card:hover {
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.06),
        0 8px 24px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}
/* 深色模式下博客卡片柔和阴影 */
/* Dark mode blog card soft shadows */

html.dark-mode .blog-card {
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.2),
        0 4px 16px rgba(0, 0, 0, 0.15);
    border: none;
}
html.dark-mode .blog-card:hover {
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.25),
        0 8px 32px rgba(0, 0, 0, 0.2);
}
/* 卡片内容区 */
/* Card content area */

.card-content {
    flex: 1;
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    z-index: 2;
}
/* 有图片时内容区右侧留出空间，避免与图片重叠 */
/* When a thumbnail exists, reserve space on the right to avoid overlap */

.blog-card.has-image .card-content {
    padding-right: calc(35% + 30px);
}
/* 标题行：序号 + 标题 */
/* Title row: index + title */

.card-title {
    margin: 0 0 0.4rem 0;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    line-height: 1.4;
}
.card-number {
    color: var(--text-primary);
    font-size: 0.8rem;
    font-weight: 600;
    flex-shrink: 0;
    line-height: 1;
    font-family: var(--font-heading);
    background-color: var(--bg-tertiary);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    letter-spacing: 0.5px;
    margin-top: 2px;
    transition: all 0.2s ease;
}
.card-title a {
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 600;
    font-family: var(--font-heading);
    display: inline-block;
    line-height: 1.4;
    transition: all 0.2s ease;
    letter-spacing: -0.01em;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
/* 悬停在标题区域时，序号和标题同步变色 */
/* When hovering on title area, index and title change color together */
.card-title:hover .card-number,
.card-title:has(a:hover) .card-number {
    color: var(--btn-fill-start);
}
.card-title:hover a,
.card-title a:hover {
    text-decoration: none;
    background: linear-gradient(135deg, var(--btn-fill-start) 0%, var(--btn-fill-end) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
html.dark-mode .card-title a {
    background: linear-gradient(135deg, #f1f5f9 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
html.dark-mode .card-title:hover a,
html.dark-mode .card-title a:hover {
    background: linear-gradient(135deg, var(--btn-fill-start) 0%, var(--btn-fill-end) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
/* 摘要 */
/* Post excerpt */

.card-excerpt {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0 0 0.6rem 0;
    font-size: 0.9rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
/* 元信息行：日期、分类、标签 */
/* Meta row: date, category, tags */

.card-meta {
    font-size: 0.82rem;
    color: var(--text-tertiary);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 0;
}
.meta-icon {
    width: 14px;
    height: 14px;
    margin-right: 4px;
    vertical-align: -2px;
    opacity: 0.7;
}
.card-date,
.card-category {
    display: inline-flex;
    align-items: center;
    color: var(--text-tertiary);
}
.card-tags-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}
.tag-inline {
    display: inline-block;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    text-decoration: none;
    border: 1px solid var(--border-light);
    transition: all 0.2s ease;
}
.tag-inline:hover {
    background: linear-gradient(135deg, var(--btn-fill-start), var(--btn-fill-end));
    color: #fff;
    border-color: transparent;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(118, 200, 250, 0.3);
}
html.dark-mode .tag-inline:hover {
    box-shadow: 0 2px 8px rgba(39, 72, 199, 0.35);
}
/* 卡片图片区 - 右侧占35%宽度 + 渐变效果 */
/* Card image area - 35% width on right + gradient effect */

.card-image {
    width: 35%;
    flex-shrink: 0;
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    overflow: hidden;
}
.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}
/* 左侧渐变遮罩 - 从卡片背景色渐变到透明，更自然的嵌入效果 */
/* Left gradient overlay - from card background to transparent for natural blend */

.card-image::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100px;
    height: 100%;
    background: linear-gradient(to right, var(--card-bg) 0%, transparent 100%);
    z-index: 1;
    pointer-events: none;
}
html.dark-mode .card-image::before {
    width: 100px;
    background: linear-gradient(to right, var(--card-bg) 0%, transparent 100%);
}
html.dark-mode .card-image img {
    filter: brightness(0.8) saturate(0.9);
}
/* 保留原有tag样式供其他地方使用 */
/* Keep original tag styles for use elsewhere */

.tag {
    display: inline-flex;
    align-items: center;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    padding: 0.2rem 0.45rem;
    border-radius: 9999px;
    font-size: 0.78rem;
    text-decoration: none;
    margin-right: 0.5rem;
    margin-bottom: 0.25rem;
    border: 1px solid var(--border-light);
    font-weight: 500;
}
.tag:hover {
    background: #e5e7eb;
    color: #111827;
}
.pagination-controls {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb;
}
.load-more-button {
    display: block;
    width: 180px;
    margin: 40px auto;
    padding: 12px 24px;
    background: var(--card-bg);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    margin-bottom: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
}
.load-more-button:hover {
    background: linear-gradient(135deg, var(--btn-fill-start), var(--btn-fill-end));
    border-color: transparent;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(118, 200, 250, 0.4);
}
html.dark-mode .load-more-button:hover {
    box-shadow: 0 6px 16px rgba(39, 72, 199, 0.45);
}
.pagination-info {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 500;
}
.no-posts {
    text-align: center;
    padding: 3rem 0;
    color: #7f8c8d;
}
@media (max-width: 768px) {
    .hero-section {
        min-height: auto;
    }
    .profile-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        max-width: 100%;
    }
    .social-and-blog-row {
        flex-wrap: wrap;
    }
    /* 移动端隐藏地球背景 */
    /* Hide globe background on mobile */
    .hero-globe-bg {
        display: none;
    }
    .blog-container {
        flex-direction: column;
        padding: 1rem;
    }
    .blog-sidebar {
        width: 100%;
        order: 2;
    }
    .blog-main {
        order: 1;
    }
    .sidebar-widget {
        margin-bottom: 1rem;
    }
    .blog-posts-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .blog-card {
        flex-direction: column;
        min-height: auto;
    }
    .blog-card.has-image {
        padding-top: 120px;
    }
    .blog-card.has-image .card-content {
        padding-right: 1rem;
    }
    .blog-card .card-image {
        width: 100%;
        height: 120px;
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: auto;
    }
    .blog-card .card-image img {
        width: 100%;
        height: 120px;
    }
    .blog-card .card-image::before {
        width: 100%;
        height: 50px;
        top: auto;
        bottom: 0;
        left: 0;
        background: linear-gradient(
            to top,
            var(--card-bg) 0%,
            transparent 100%
        );
    }
    html.dark-mode .blog-card .card-image::before {
        background: linear-gradient(
            to top,
            var(--card-bg) 0%,
            transparent 100%
        );
    }
    .card-content {
        padding: 1rem;
    }
    .card-title a {
        font-size: 1rem;
    }
    .card-number {
        font-size: 0.7rem;
        padding: 0.15rem 0.4rem;
        font-weight: 600;
    }
    .card-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}
.recent-posts-section {
    margin-bottom: 4rem;
}
.recent-posts-section h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 2rem;
    color: #24292e;
    border-bottom: 2px solid #0366d6;
    padding-bottom: 0.5rem;
    display: inline-block;
}
.recent-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}
.recent-post-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.3s ease;
    border: 1px solid #e1e4e8;
    position: relative;
    overflow: hidden;
}
.recent-post-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
}
.recent-post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}
.post-header {
    margin-bottom: 1rem;
}
.recent-post-card h3 {
    margin-bottom: 0.5rem;
}
.recent-post-card h3 a {
    font-family: var(--font-heading);
    color: #24292e;
    text-decoration: none;
    font-size: 1.4rem;
    font-weight: 600;
}
.recent-post-card h3 a:hover {
    color: #0366d6;
}
.post-date {
    color: #586069;
    font-size: 0.9rem;
    font-weight: 500;
}
.recent-post-card .post-excerpt {
    color: #586069;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}
.no-posts-message {
    text-align: center;
    color: #586069;
    font-style: italic;
    padding: 2rem;
}
.all-posts-section {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 2px solid #e1e4e8;
}
.all-posts-section h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 2rem;
    color: #24292e;
    border-bottom: 2px solid #0366d6;
    padding-bottom: 0.5rem;
    display: inline-block;
}
.search-filter-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    gap: 1rem;
    flex-wrap: wrap;
}
.search-container {
    display: flex;
    gap: 0.5rem;
    flex: 1;
    max-width: 400px;
}
#search-input {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid #e1e4e8;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}
#search-input:focus {
    outline: none;
    border-color: #0366d6;
}
#search-btn {
    padding: 0.75rem 1rem;
    background: #0366d6;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.2s ease;
}
#search-btn:hover {
    background: #0256cc;
}
.filter-buttons {
    display: flex;
    gap: 0.5rem;
}
.filter-btn {
    padding: 0.75rem 1.5rem;
    background: #f6f8fa;
    color: #586069;
    border: 1px solid #e1e4e8;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}
.filter-btn:hover {
    background: #e1e4e8;
}
.filter-btn.active {
    background: #0366d6;
    color: white;
    border-color: #0366d6;
}
.view-all-posts {
    text-align: center;
    margin-top: 2rem;
}
.view-all-posts a {
    color: #0366d6;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
}
.view-all-posts a:hover {
    text-decoration: underline;
}
.blog-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e1e4e8;
}
.blog-header h1 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    color: #24292e;
    margin-bottom: 1rem;
}
.blog-posts {
    max-width: 800px;
    margin: 0 auto;
}
.blog-post {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e1e4e8;
}
.blog-post:last-child {
    border-bottom: none;
}
.blog-post h2 {
    margin-bottom: 0.5rem;
}
.blog-post h2 a {
    font-family: var(--font-heading);
    color: #24292e;
    text-decoration: none;
    font-size: 1.8rem;
}
.blog-post h2 a:hover {
    color: #0366d6;
}
.post-meta-simple {
    color: #586069;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    font-weight: 500;
}
.post-header {
    text-align: center;
    margin-bottom: 0.8rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid var(--border-color);
}
.post-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.2rem;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

/* 现代学术风格元数据 */
/* Modern academic style metadata */
.post-meta-compact {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 1.2rem;
    margin-bottom: 2.5rem;
    padding: 1rem 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    font-size: 0.85rem;
    font-family: var(--font-body);
    letter-spacing: 0.02em;
}
.post-meta-compact .meta-item {
    color: var(--text-tertiary);
    text-transform: uppercase;
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.05em;
}
.post-meta-compact .meta-item:first-child {
    font-weight: 600;
    color: var(--text-secondary);
}
.post-meta-compact .meta-sep {
    color: var(--text-tertiary);
    opacity: 0.4;
    font-size: 0.5rem;
}
.tag {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    padding: 0.2rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 500;
    display: inline-block;
    margin-right: 0.3rem;
    border: 1px solid var(--border-light);
}
.post-content {
    max-width: 900px;
    margin: 0 auto;
    font-size: 1.05rem;
    line-height: 1.8;
}
.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
    font-family: var(--font-heading);
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    scroll-margin-top: var(--post-scroll-offset, 56px);
}
.post-content h1 {
    font-size: 2rem;
}
.post-content h2 {
    font-size: 1.7rem;
}
.post-content h3 {
    font-size: 1.35rem;
}

/* 暗色模式下标题样式增强 */
/* Enhanced heading styles in dark mode */
html.dark-mode .post-content h1,
html.dark-mode .post-content h2 {
    color: #ffffff;
    text-shadow: 0 0 1px rgba(255, 255, 255, 0.1);
}
html.dark-mode .post-content h3,
html.dark-mode .post-content h4 {
    color: #f0f6fc;
}
html.dark-mode .post-content h5,
html.dark-mode .post-content h6 {
    color: #c9d1d9;
}
html.dark-mode .post-content p,
html.dark-mode .post-content li {
    color: #b0b8c1;
}
html.dark-mode .post-content strong {
    color: #e6edf3;
}
.post-content p {
    margin-bottom: 0.8rem;
    text-indent: 2em;
    text-align: justify;
}
.post-content blockquote p {
    text-indent: 0;
}
.post-content li p {
    text-indent: 0;
}
.post-content ul p,
.post-content ol p {
    text-indent: 0;
}
.post-content blockquote p {
    text-indent: 0;
}
.no-indent {
    text-indent: 0 !important;
}
.post-content a {
    color: var(--accent-primary);
    text-decoration: none;
}
.post-content a:hover {
    text-decoration: underline;
}
.post-content ul,
.post-content ol {
    margin-bottom: 0.8rem;
    padding-left: 2rem;
}
.post-content li {
    margin-bottom: 0.5rem;
}
.post-content blockquote {
    border-left: 4px solid var(--accent-primary);
    padding-left: 1rem;
    margin: 0.8rem 0;
    color: var(--text-secondary);
    font-style: italic;
}
.post-content code {
    background-color: var(--bg-tertiary);
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: var(--font-mono);
    font-size: 0.9em;
    /* 启用连字特性 */
    /* Enable ligatures */
    font-feature-settings: "liga" 1, "calt" 1;
}
.post-content pre {
    position: relative;
    background-color: #f8f9fa;
    border-radius: 6px;
    padding: 0.75rem 1rem 0.75rem 0;
    overflow-x: auto;
    margin: 0.8rem 0;
    line-height: 1.6;
    overflow-y: visible;
    border: 1px solid #e5e7eb;
    /* 纤细滚动条 - Firefox */
    /* Thin scrollbar - Firefox */
    scrollbar-width: thin;
    scrollbar-color: #d1d5db transparent;
}
/* 纤细滚动条 - Webkit (Chrome/Safari/Edge) */
/* Thin scrollbar - Webkit (Chrome/Safari/Edge) */
.post-content pre::-webkit-scrollbar {
    height: 6px;
    width: 6px;
}
.post-content pre::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 3px;
}
.post-content pre::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}
.post-content pre::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}
.post-content pre::-webkit-scrollbar-corner {
    background: transparent;
}
.post-content pre code {
    background: none;
    padding: 0;
    display: block;
    white-space: pre;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--text-primary);
    counter-reset: line;
    /* 启用连字特性 */
    /* Enable ligatures */
    font-feature-settings: "liga" 1, "calt" 1;
}

/* 代码行号样式 */
/* Code line number styles */
.post-content pre code .code-line {
    display: block;
    padding-left: 3.5rem;
    position: relative;
}
.post-content pre code .code-line::before {
    counter-increment: line;
    content: counter(line);
    position: absolute;
    left: 0;
    width: 2.5rem;
    text-align: right;
    padding-right: 0.75rem;
    color: #9ca3af;
    font-size: 0.875rem;
    user-select: none;
    border-right: 1px solid #e0e0e0;
    margin-right: 0.75rem;
    box-sizing: border-box;
}

/* 暗色模式下代码块样式 */
/* Code block styles in dark mode */
html.dark-mode .post-content pre {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.98));
    border-color: rgba(99, 102, 241, 0.2);
    scrollbar-color: #475569 transparent;
    box-shadow:
        0 0 0 1px rgba(99, 102, 241, 0.1),
        0 0 20px rgba(99, 102, 241, 0.08),
        0 4px 16px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(8px);
}
html.dark-mode .post-content pre::-webkit-scrollbar-thumb {
    background: #475569;
}
html.dark-mode .post-content pre::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}
html.dark-mode .post-content pre code .code-line::before {
    color: #6b7280;
    border-right-color: #374151;
}
.code-copy-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s ease;
    color: #374151;
    font-weight: 500;
    z-index: 10;
    backdrop-filter: blur(4px);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    line-height: 1;
    transform: translateX(0);
}
.post-content pre:hover .code-copy-btn {
    opacity: 1;
}
.code-copy-btn:hover {
    background: #f8f9fa;
    border-color: #9ca3af;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}
.code-copy-btn.copied {
    background: #10b981;
    color: white;
    border-color: #10b981;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
}
.post-content table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 1rem 0;
    background: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
    font-size: 1rem;
}
.post-content thead {
    background: var(--bg-secondary);
    color: var(--text-primary);
}
.post-content thead th {
    padding: 1rem 1.25rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.025em;
    border-bottom: 2px solid var(--border-color);
}
.post-content thead th:first-child {
    border-top-left-radius: 7px;
}
.post-content thead th:last-child {
    border-top-right-radius: 7px;
}
.post-content tbody tr {
    border-bottom: 1px solid var(--border-light);
    transition: background-color 0.2s ease;
}
.post-content tbody tr:hover {
    background-color: var(--bg-secondary);
}
.post-content tbody tr:last-child {
    border-bottom: none;
}
.post-content tbody tr:nth-child(even) {
    background-color: var(--bg-secondary);
}
.post-content tbody tr:nth-child(even):hover {
    background-color: var(--bg-tertiary);
}
.post-content tbody td {
    padding: 0.875rem 1.25rem;
    font-size: 1rem;
    color: var(--text-primary);
    line-height: 1.5;
    vertical-align: top;
}
.post-content tbody td:first-child {
    font-weight: 600;
    color: var(--text-primary);
}
.post-content tbody td code {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.85em;
    font-weight: 500;
}
.post-content img {
    max-width: 800px;
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    display: block;
    margin: 20px auto;
}
.post-image {
    max-width: 800px;
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    display: block;
    margin: 20px auto;
}
.post-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}
.prev-post {
    text-align: left;
}
.next-post {
    text-align: right;
}
.prev-post,
.next-post {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 500;
    flex: 1;
    max-width: 45%;
}
.prev-post:hover,
.next-post:hover {
    text-decoration: underline;
}
.site-footer {
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
    margin-top: 3rem;
    text-align: center;
    color: var(--text-secondary);
}
.post-layout {
    display: flex;
    max-width: 100%;
    margin: 0 auto;
    gap: 3rem;
    padding: 0 20px;
    justify-content: center;
}
.table-of-contents {
    width: 260px;
    flex-shrink: 0;
    position: sticky;
    top: calc(var(--site-header-height, 40px) + 24px);
    align-self: flex-start;
    max-height: calc(100vh - var(--site-header-height, 40px) - 40px);
    overflow: hidden;
    background: transparent;
    border: none;
    border-right: 1px solid var(--border-light);
    padding-right: 15px;
    margin-right: 0;
    transition: all 0.3s ease;
}
.table-of-contents:hover {
    box-shadow: none;
}
.toc-header {
    padding: 0 0 1rem 0;
    border-bottom: 1px solid var(--border-light);
    background: transparent;
    border-radius: 0;
    margin-bottom: 0.5rem;
}
.toc-header h3 {
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 700;
    margin: 1rem 0 0 0;
    display: block;
    text-align: left;
    padding-left: 0.75rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}
.back-to-blog {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    width: auto;
    justify-content: flex-start;
    margin-bottom: 0;
    background: transparent;
    border: none;
}
.back-to-blog:hover {
    background: transparent;
    border: none;
    color: var(--accent-primary);
    transform: translateX(-3px);
}
.back-to-blog .back-icon {
    font-size: 1rem;
}
.toc-content {
    padding: 0.5rem 0;
    max-height: calc(85vh - 160px);
    overflow-y: auto;
    overflow-x: hidden;
    /* 隐藏滚动条但保留功能 */
    /* Hide scrollbar but keep functionality */
    scrollbar-width: thin;
    scrollbar-color: var(--border-light) transparent;
}
.toc-list {
    list-style: none;
    margin: 0;
    padding: 0;
    position: relative;
}
.toc-sublist {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* 连接线轨道 */
/* Connection line track */
.toc-list::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 2px;
    background: var(--border-light);
    opacity: 0.5;
    z-index: 0;
}
.toc-item {
    margin: 0;
    padding: 0;
}
.toc-link {
    display: block;
    padding: 0.4rem 0.75rem 0.4rem 1.25rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 0 4px 4px 0;
    margin: 0;
    transition: all 0.2s ease;
    font-size: 0.95rem;
    line-height: 1.5;
    border-left: 2px solid transparent;
    position: relative;
}

/* 覆盖原有样式，确保层级统一 */
/* Override original styles to ensure consistent hierarchy */
.toc-level-1 .toc-link,
.toc-level-2 .toc-link,
.toc-level-3 .toc-link {
    background: transparent;
    border-radius: 0 4px 4px 0;
    border: none;
    border-left: 2px solid transparent;
}

/* 悬停状态 */
/* Hover state */
.toc-link:hover {
    color: var(--text-primary);
    /* 极淡的背景 */
    /* Very light background */
    background: var(--bg-tertiary);
    border-left: 2px solid var(--text-tertiary);
}
/* 激活状态 - 左侧高亮线 */
/* Active state - left highlight line */
.toc-link.active {
    color: var(--accent-primary);
    font-weight: 600;
    background: linear-gradient(to right, var(--bg-secondary), transparent);
    border-left: 2px solid var(--accent-primary);
}

.toc-text {
    display: block;
    line-height: 1.4;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
}
.toc-text code {
    background-color: var(--bg-tertiary);
    padding: 0.15rem 0.3rem;
    border-radius: 3px;
    font-family: var(--font-mono);
    font-size: 0.9em;
}
.toc-text kbd {
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-light);
    padding: 0.05rem 0.25rem;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.85em;
}

/* 层级缩进与字体大小微调 */
/* Hierarchy indentation and font size adjustments */
.toc-level-1 .toc-link {
    font-weight: 600;
    padding-left: 1rem;
    color: var(--text-primary);
    margin-top: 0.5rem;
}
.toc-level-2 .toc-link {
    padding-left: 1.5rem;
}

/* H3及以下层级支持折叠 */
/* H3 and below levels support collapsing */
.toc-level-3,
.toc-level-4,
.toc-level-5,
.toc-level-6 {
    display: none;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}
.toc-level-3.show,
.toc-level-4.show,
.toc-level-5.show,
.toc-level-6.show {
    display: block;
    opacity: 1;
    /* 增加高度限制以防截断 */
    /* Increase height limit to prevent truncation */
    max-height: 500px;
}
.toc-level-3 .toc-link {
    padding-left: 2.25rem;
    font-size: 0.9rem;
    color: var(--text-tertiary);
}
.toc-level-2 .toc-link.has-children::after {
    content: "›";
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%) rotate(0deg);
    font-size: 1.4rem;
    font-weight: 700;
    /* 颜色加深 */
    /* Darker color */
    color: var(--text-secondary);
    transition:
        transform 0.2s ease,
        color 0.2s ease;
    line-height: 1;
}
.toc-level-2 .toc-link.has-children.expanded::after {
    transform: translateY(-50%) rotate(90deg);
    color: var(--accent-primary);
}
.no-headings {
    color: var(--text-secondary);
    font-style: italic;
    text-align: center;
    padding: 2rem 1rem;
    font-size: 0.9rem;
}
.post-content-wrapper {
    flex: 1;
    min-width: 0;
    max-width: 1200px;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}
.post-content-wrapper .post-header {
    padding: 1.5rem 2.5rem 1rem 2.5rem;
    background: linear-gradient(
        135deg,
        var(--bg-secondary) 0%,
        var(--card-bg) 100%
    );
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 0;
}
.post-content-wrapper .post-content {
    padding: 1rem 2.5rem 2.5rem 2.5rem;
    max-width: 1400px;
    margin: 0 auto;
}
.post-content-wrapper .post-footer {
    padding: 2rem 2.5rem;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    margin-top: 0;
}
.toc-content::-webkit-scrollbar {
    width: 6px;
}
.toc-content::-webkit-scrollbar-track {
    background: #f1f3f4;
    border-radius: 2px;
}
.toc-content::-webkit-scrollbar-thumb {
    background: #dadce0;
    border-radius: 2px;
}
.toc-content::-webkit-scrollbar-thumb:hover {
    background: #bdc1c6;
}
@media (max-width: 1024px) {
    .post-layout {
        flex-direction: column;
        max-width: 800px;
    }
    .table-of-contents {
        width: 100%;
        position: static;
        max-height: 300px;
        order: 2;
        margin-top: 2rem;
    }
    .post-content-wrapper {
        order: 1;
    }
    .toc-header h3 {
        font-size: 0.95rem;
    }
}
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    .post-layout {
        padding: 0 15px;
        gap: 1.5rem;
    }
    .post-content-wrapper .post-header,
    .post-content-wrapper .post-content,
    .post-content-wrapper .post-footer {
        padding: 1.5rem;
    }
    .toc-content {
        max-height: 200px;
    }
    .table-of-contents {
        margin-top: 1.5rem;
    }
}
.prev-post {
    text-align: left;
    color: #0366d6;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}
.next-post {
    text-align: right;
    color: #0366d6;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}
.prev-post:hover,
.next-post:hover {
    background-color: #f1f8ff;
    text-decoration: none;
}
.site-footer {
    background-color: #f6f8fa;
    border-top: 1px solid #e1e4e8;
    padding: 2rem 0;
    text-align: center;
    color: #586069;
}
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    .profile-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    .profile-image {
        width: 150px;
        height: 150px;
        margin: 0 auto;
    }
    .profile-name {
        font-size: 2rem;
    }
    .profile-title {
        font-size: 1.3rem;
    }
    .navigation {
        flex-wrap: wrap;
        gap: 1rem;
    }
    .posts-grid {
        grid-template-columns: 1fr;
    }
    .recent-posts h2 {
        font-size: 1.8rem;
    }
    .post-title {
        font-size: 2rem;
    }
}
@media (max-width: 480px) {
    .hero-section {
        padding: 2rem 0;
    }
    .profile-name {
        font-size: 1.8rem;
    }
    .profile-title {
        font-size: 1.2rem;
    }
    .social-links {
        justify-content: center;
    }
    .social-link {
        width: 35px;
        height: 35px;
    }
}
html.turnstile-gate-active,
body.turnstile-gate-active {
    overflow: hidden;
}
.page-turnstile-gate {
    position: fixed;
    inset: 0;
    z-index: 5000;
    background: rgba(248, 250, 252, 0.92);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem;
    color: var(--text-primary);
}
html.dark-mode .page-turnstile-gate {
    background: rgba(13, 17, 23, 0.94);
}
.page-turnstile-gate[hidden] {
    display: none !important;
}
.page-turnstile-widget {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.25rem 1.25rem 1rem;
    border-radius: 18px;
    background: var(--card-bg);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: var(--shadow-lg);
}
html.dark-mode .page-turnstile-widget {
    border-color: rgba(255, 255, 255, 0.1);
}
.page-turnstile-loading {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    text-align: center;
    min-width: 260px;
}
.page-turnstile-loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(15, 23, 42, 0.16);
    border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: turnstile-spin 1s linear infinite;
}
html.dark-mode .page-turnstile-loading-spinner {
    border-color: rgba(230, 237, 243, 0.16);
    border-top-color: var(--accent-color);
}
.page-turnstile-loading-text {
    color: var(--text-primary);
    font-size: 0.95rem;
}
.page-turnstile-gate[data-state="loading"] .page-turnstile-loading,
.page-turnstile-gate[data-state="slow"] .page-turnstile-loading {
    display: flex;
}
.page-turnstile-gate[data-state="loading"] #pageTurnstileWidget,
.page-turnstile-gate[data-state="slow"] #pageTurnstileWidget {
    display: none;
}
@keyframes turnstile-spin { to { transform: rotate(360deg); } }
.page-turnstile-status {
    max-width: 520px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.95rem;
}
@media (max-width: 360px) {
    .page-turnstile-widget {
        padding: 0.75rem;
        border-radius: 16px;
    }
}
@media (max-width: 340px) {
    .page-turnstile-widget {
        padding: 0.5rem;
    }
}
.publications-content {
    margin-top: 2rem;
}
.publications-section {
    margin-top: 1.5rem;
}
.publications-section h2 {
    font-family: var(--font-heading);
    color: var(--text-primary);
    font-size: 1.8rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}
.publication-section {
    margin-bottom: 3rem;
}
.publication-section h2 {
    font-family: var(--font-heading);
    color: var(--text-primary);
    font-size: 1.8rem;
    margin-bottom: 10rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
}
.publication-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}
.publication-item {
    margin-bottom: 0;
    padding: 1rem 1.25rem 1rem 1.5rem;
    background: var(--card-bg);
    color: var(--text-primary);
    border-radius: 14px;
    border: none;
    border-left: 3px solid var(--accent-primary);
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.04),
        0 4px 16px rgba(0, 0, 0, 0.04);
    transition:
        box-shadow 0.3s ease,
        transform 0.2s ease;
    line-height: 1.7;
    text-align: justify;
    text-indent: 2em;
}
.publication-item:hover {
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.06),
        0 8px 24px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}
html.dark-mode .publication-item {
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.2),
        0 4px 16px rgba(0, 0, 0, 0.15);
}
html.dark-mode .publication-item:hover {
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.25),
        0 8px 32px rgba(0, 0, 0, 0.2);
}
.publication-citation strong {
    color: var(--accent-primary);
    font-weight: 700;
}
.publication-citation em {
    color: var(--text-secondary);
    font-style: italic;
}
.publication-item a,
.publication-citation a {
    color: var(--accent-primary);
    text-decoration: none;
}
.publication-item a:hover,
.publication-citation a:hover {
    text-decoration: underline;
}
@media (max-width: 768px) {
    .post-content table {
        font-size: 0.95rem;
        margin: 1.5rem 0;
    }
    .post-content thead th,
    .post-content tbody td {
        padding: 0.75rem 1rem;
    }
    .post-content thead th {
        font-size: 0.95rem;
    }
    .post-content tbody td {
        font-size: 0.95rem;
    }
}
@media (max-width: 480px) {
    .post-content table {
        font-size: 0.9rem;
        margin: 1rem 0;
        border-radius: 6px;
    }
    .post-content thead th,
    .post-content tbody td {
        padding: 0.6rem 0.8rem;
    }
    .post-content thead th {
        font-size: 0.9rem;
    }
    .post-content tbody td {
        font-size: 0.9rem;
    }
    .post-content tbody td code {
        font-size: 0.85em;
        padding: 2px 4px;
    }
}

/* 顶部导航栏 - 极简风格 + 毛玻璃效果 */
/* Top navigation bar - minimal style + glassmorphism */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--nav-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

/* 深色模式下导航栏精致边框 */
/* Refined navigation border in dark mode */
html.dark-mode .site-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
    .site-header {
        background: var(--nav-bg-solid);
    }
}
.site-nav {
    padding: 0;
}
.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    height: 40px;
}
.nav-menu {
    display: flex;
    list-style: none;
    gap: 0;
    margin: 0;
    padding: 0;
    align-items: center;
}
.nav-item {
    margin: 0;
}
.nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 14px;
    height: 40px;
    color: var(--text-secondary);
    text-decoration: none;
    border: none;
    background: none;
    font-weight: 400;
    font-size: 14px;
    font-family: var(--font-body);
    transition: color 0.2s ease;
    position: relative;
    cursor: pointer;
}
.nav-link:hover {
    color: var(--text-primary);
    background: transparent;
}
.nav-link:hover::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--btn-fill-start), var(--btn-fill-end));
    border-radius: 2px;
    animation: navSlideIn 0.25s ease forwards;
}
@keyframes navSlideIn {
    from {
        width: 0;
        opacity: 0;
    }
    to {
        width: calc(100% - 28px);
        opacity: 1;
    }
}
.nav-link.active {
    color: var(--text-primary);
    background: transparent;
    font-weight: 500;
}
.nav-link.active::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 28px);
    height: 2.5px;
    background: linear-gradient(90deg, var(--btn-fill-start), var(--btn-fill-end));
    border-radius: 2px;
    box-shadow: 0 0 8px rgba(118, 200, 250, 0.4);
}
html.dark-mode .nav-link.active::after {
    box-shadow: 0 0 8px rgba(39, 72, 199, 0.5);
}
.nav-icon {
    width: 18px;
    height: 18px;
    color: inherit;
    flex-shrink: 0;
}
/* Language toggle button */
.lang-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
    padding: 0;
    margin: 0;
    color: inherit;
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}
.lang-toggle:hover {
    color: var(--text-primary);
}
.nav-text {
    line-height: 1;
    white-space: nowrap;
}
.search-trigger {
    cursor: pointer;
}
.search-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
}
.search-modal.active {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 8vh;
}
.search-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.2s ease;
}
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}
.search-modal-content {
    position: relative;
    width: 75%;
    max-width: 600px;
    max-height: 80vh;
    background: #ffffff;
    border: 1px solid #e6e7eb;
    border-radius: 14px;
    box-shadow: var(--shadow-lg);
    animation: slideDown 0.2s ease;
    display: flex;
    flex-direction: column;
    z-index: 1;
}
html.dark-mode .search-modal-content {
    background: #1a1a2e;
    border-color: #2d2d44;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
.search-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-bottom: 1px solid #e0e0e0;
}
html.dark-mode .search-header {
    border-bottom-color: #2d2d44;
}
html.dark-mode .search-title {
    color: #5cb8e8;
}
.search-title {
    font-size: 0.95rem;
    font-weight: 400;
    color: #00a8e8;
    margin: 0;
    font-family: var(--font-heading);
}
.search-close-btn {
    width: 32px;
    height: 32px;
    padding: 0;
    background: none;
    border: none;
    color: #666666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}
.search-close-btn:hover {
    color: #333333;
}
html.dark-mode .search-close-btn {
    color: #999999;
}
html.dark-mode .search-close-btn:hover {
    color: #cccccc;
}
.search-box-wrapper {
    padding: 10px 12px;
    border-bottom: 1px solid #e0e0e0;
}
html.dark-mode .search-box-wrapper {
    border-bottom-color: #2d2d44;
}
.search-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #00a8e8;
    border-radius: 12px;
    outline: none;
    background: var(--card-bg);
    font-size: 0.95rem;
    color: #333333;
    font-family: var(--font-body);
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}
.search-input:focus {
    border-color: #0088cc;
}
.search-input::placeholder {
    color: #999999;
}
html.dark-mode .search-input {
    background: #252538;
    color: #e8e8f0;
    border-color: #5cb8e8;
}
html.dark-mode .search-input:focus {
    border-color: #7dd3fc;
    box-shadow: 0 0 0 3px rgba(92, 184, 232, 0.15);
}
html.dark-mode .search-input::placeholder {
    color: #6b6b80;
}
.search-results-wrapper {
    flex: 1;
    overflow-y: hidden;
    display: flex;
    flex-direction: column;
}
.search-results {
    flex: 1;
    padding: 10px 12px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #9bd7f2 transparent;
}
.search-results::-webkit-scrollbar {
    width: 8px;
}
.search-results::-webkit-scrollbar-track {
    background: #f5f7fa;
    border-radius: 8px;
}
.search-results::-webkit-scrollbar-thumb {
    background-color: #9bd7f2;
    border-radius: 8px;
    border: 2px solid #ffffff;
}
.search-results::-webkit-scrollbar-thumb:hover {
    background-color: #00a8e8;
}
html.dark-mode .search-results {
    scrollbar-color: #3d3d5c transparent;
}
html.dark-mode .search-results::-webkit-scrollbar-track {
    background: #1a1a2e;
}
html.dark-mode .search-results::-webkit-scrollbar-thumb {
    background-color: #3d3d5c;
    border-color: #1a1a2e;
}
html.dark-mode .search-results::-webkit-scrollbar-thumb:hover {
    background-color: #5cb8e8;
}
.search-result-item {
    padding: 10px;
    margin-bottom: 8px;
    cursor: pointer;
    transition:
        background 0.2s ease,
        transform 0.12s ease,
        box-shadow 0.2s ease;
    border-left: 3px solid transparent;
    display: flex;
    gap: 8px;
    align-items: flex-start;
    border-radius: 10px;
}
.search-result-item:hover {
    background: #f5f7fa;
    border-left-color: #00a8e8;
    transform: translateY(-1px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}
html.dark-mode .search-result-item:hover {
    background: #252538;
    border-left-color: #5cb8e8;
}
html.dark-mode .search-result-marker {
    border-color: #5cb8e8;
}
.search-result-marker {
    width: 12px;
    height: 12px;
    padding: 3px;
    border: 3px solid #00a8e8;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 4px;
}
.search-result-content {
    flex: 1;
}
.search-result-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #333333;
    margin-bottom: 4px;
    line-height: 1.4;
    font-family: var(--font-heading);
}
html.dark-mode .search-result-title {
    color: #e0e0e0;
}
.search-result-excerpt {
    font-size: 0.95rem;
    color: #666666;
    line-height: 1.5;
}
html.dark-mode .search-result-excerpt {
    color: #999999;
}
.search-highlight {
    color: #ff0000;
    background: none;
    font-weight: 700;
}
.search-footer {
    padding: 10px 12px;
    border-top: 1px solid #e0e0e0;
    text-align: center;
}
html.dark-mode .search-footer {
    border-top-color: #2d2d44;
}
.search-count {
    font-size: 0.95rem;
    color: #666666;
    font-weight: 500;
    font-family: var(--font-body);
}
.search-results .search-result-title {
    font-weight: 700 !important;
}
html.dark-mode .search-count {
    color: #9090a8;
}
html.dark-mode .search-highlight {
    color: #ff6b6b;
}
.search-count span {
    font-weight: 600;
    color: #00a8e8;
}
.search-no-results {
    text-align: center;
    padding: 40px 20px;
    color: #666666;
    font-size: 0.95rem;
}
html.dark-mode .search-no-results {
    color: #999999;
}
@media (max-width: 768px) {
    .nav-container {
        padding: 0 1rem;
        height: 40px;
    }
    .nav-menu {
        gap: 0;
    }
    .nav-link {
        padding: 0 10px;
        font-size: 13px;
        height: 40px;
    }
    .nav-icon {
        width: 16px;
        height: 16px;
    }
    .nav-text {
        display: none;
    }
    .search-item .nav-text {
        display: inline;
    }
    .search-modal-content {
        width: 95%;
        max-height: 90vh;
    }
    .search-modal.active {
        padding-top: 4vh;
    }
}
.floating-buttons {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    z-index: 1300;
}
.float-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: var(--card-bg);
    color: var(--text-primary);
    box-shadow: var(--shadow-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
.float-btn::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: var(--accent-primary);
    opacity: 0.2;
    transform: translate(-50%, -50%);
    transition:
        width 0.3s ease,
        height 0.3s ease;
}
.float-btn:hover::before {
    width: 100%;
    height: 100%;
}
.float-btn:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: var(--shadow-lg);
    color: var(--accent-primary);
}
.float-btn:active {
    transform: translateY(-2px) scale(1.02);
}
.theme-toggle {
    border: 2px solid var(--border-color);
}
.theme-icon {
    transition: all 0.3s ease;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}
.theme-icon svg {
    width: 26px;
    height: 26px;
    display: block;
}

.float-btn.ai-assistant-toggle .ai-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

.float-btn.ai-assistant-toggle .ai-icon svg {
    width: 30px;
    height: 30px;
    display: block;
}
.light-icon {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(0deg);
}
.dark-icon {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(180deg);
}
html.dark-mode .light-icon {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(-180deg);
}
html.dark-mode .dark-icon {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(0deg);
}
.back-to-top {
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
}
.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.back-to-top-icon {
    font-size: 1.6rem;
    font-weight: bold;
    line-height: 1;
}
.theme-toggle,
.back-to-top,
.float-btn.ai-assistant-toggle,
.float-btn.lang-toggle-float,
.floating-buttons .back-to-blog {
    width: 40px;
    height: 40px;
    border-radius: 10px;
}
.theme-toggle {
    background: transparent;
    border: 0;
}

/* 浮动语言切换按钮样式 */
/* Floating language toggle button styles */

.lang-toggle-float {
    background: transparent;
    border: 0;
}
.lang-icon {
    transition: all 0.3s ease;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}
.lang-icon svg {
    width: 40px;
    height: 40px;
    display: block;
}
/* 语言切换按钮 - 浅色/暗色主题图标切换 */
/* Language toggle button - switch icons for light/dark themes */
/* 浅色模式：隐藏暗色图标 */
/* In light mode: hide dark icon */
.dark-lang-icon {
    display: none;
}
/* 暗色模式：隐藏浅色图标，显示暗色图标 */
/* In dark mode: hide light icon and show dark icon */
html.dark-mode .light-lang-icon {
    display: none;
}
html.dark-mode .dark-lang-icon {
    display: block;
}
.lang-toggle-float:hover {
    transform: translateY(-4px) scale(1.05);
}
.lang-toggle-float:hover::before {
    width: 0;
    height: 0;
}
.float-btn.ai-assistant-toggle,
.back-to-top,
.floating-buttons .back-to-blog {
    background: linear-gradient(
        135deg,
        var(--btn-fill-start),
        var(--btn-fill-end)
    );
    border: 0;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}
.floating-buttons .back-to-blog {
    font-size: 1.2rem;
}
.float-btn.ai-assistant-toggle:hover,
.back-to-top:hover,
.floating-buttons .back-to-blog:hover {
    color: #ffffff;
}
.float-btn.ai-assistant-toggle:hover::before,
.back-to-top:hover::before,
.floating-buttons .back-to-blog:hover::before {
    width: 0;
    height: 0;
}
.theme-toggle:hover::before {
    width: 0;
    height: 0;
}
.back-to-top-icon {
    font-size: 1.2rem;
}
.theme-icon svg {
    width: 40px;
    height: 40px;
}

/* 主题切换水波纹扩散效果 */
/* Theme toggle ripple expansion effect */

.theme-ripple-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 99999;
    overflow: hidden;
}
.theme-ripple {
    position: absolute;
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    will-change: transform;
}
.theme-ripple.expanding {
    animation: ripple-expand 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
@keyframes ripple-expand {
    0% {
        transform: translate(-50%, -50%) scale(0);
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
    }
}
@media (max-width: 768px) {
    .floating-buttons {
        bottom: 1.5rem;
        right: 1.5rem;
        gap: 0.75rem;
    }
    .float-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}
.container {
    position: relative;
    z-index: 1;
}
.site-footer {
    background-color: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
}
.site-content {
    padding-top: 1.5rem;
    min-height: calc(100vh - 40px - 120px);
}

/* 语言切换淡入淡出动画 */
/* Language toggle fade in/out animation */

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}
.page-fade-out {
    animation: fadeOut 0.3s ease-out forwards;
}
.page-fade-in {
    animation: fadeIn 0.3s ease-in forwards;
}

/* 页面过渡效果 */
/* Page transition effects */

body {
    transition: opacity 0.3s ease;
}
/* ==================== 页面加载动画 ==================== */
/* ==================== Page Load Animation ==================== */
/* 初始状态：隐藏内容，避免闪烁 */
/* Initial state: hide content to avoid flicker */
.site-header {
    opacity: 0;
    transform: translateY(-20px);
}
.site-content {
    opacity: 0;
    transform: translateY(20px);
}

/* 动画触发状态 */
/* Animation trigger state */
.site-header.page-animate-in {
    animation: headerSlideIn 0.5s ease forwards;
}
.site-content.page-animate-in {
    animation: contentSlideIn 0.6s ease 0.1s forwards;
}
@keyframes headerSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@keyframes contentSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ... existing code ... */
/* View Transitions API Support */

::view-transition-old(root),
::view-transition-new(root) {
    animation: none;
    mix-blend-mode: normal;
}
::view-transition-new(root) {
    z-index: 9999;
}
/* Dark mode specific overrides if needed */
html.dark-mode::view-transition-old(root) {
    z-index: 1;
}
html.dark-mode::view-transition-new(root) {
    z-index: 9999;
}

/* 排除浮动按钮区域参与 view transition，避免主题切换时闪烁 */
/* Exclude floating button area from view transitions to avoid flicker during theme changes */

.floating-buttons {
    view-transition-name: none;
}

/* ... existing code ... */
/* ==================== Blog 页面右侧信息小组件 ==================== */
/* Blog page right sidebar info widgets */

.blog-sidebar-right {
    width: 270px;
    flex-shrink: 0;
}
.blog-sidebar-right .info-widget {
    margin-bottom: 12px;
}
.blog-sidebar-right .info-widget:last-child {
    margin-bottom: 0;
}
.info-widget {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}
.info-widget:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

/* 深色模式下小组件精致边框 */
/* Refined widget border in dark mode */
html.dark-mode .info-widget {
    border: 1px solid rgba(255, 255, 255, 0.08);
}
html.dark-mode .info-widget:hover {
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

/* 简化的头部样式 */
/* Simplified header styles */
.widget-header-simple {
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-light);
}
.widget-header-simple .widget-date,
.widget-header-simple .widget-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    font-family: var(--font-heading);
    letter-spacing: -0.01em;
}
.widget-content {
    max-height: 210px;
    overflow-y: auto;
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--text-secondary);
    font-family: var(--font-body);
}
.widget-content::-webkit-scrollbar {
    width: 3px;
}
.widget-content::-webkit-scrollbar-track {
    background: transparent;
}
.widget-content::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}
.widget-content::-webkit-scrollbar-thumb:hover {
    background: var(--text-tertiary);
}
.widget-loading {
    text-align: center;
    color: var(--text-tertiary);
    padding: 1rem 0;
    font-size: 0.875rem;
}
.widget-error {
    text-align: center;
    color: var(--text-tertiary);
    padding: 1rem 0;
    font-size: 0.875rem;
}

/* 60秒看世界 - 新闻列表 */
/* 60-Second World News - news list */
.news-widget .widget-content {
    max-height: 260px;
}
.news-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.news-item {
    padding: 0.4rem 0;
    border-bottom: 1px dashed var(--border-light);
    display: flex;
    gap: 0.4rem;
    font-size: 0.85rem;
}
.news-item:last-child {
    border-bottom: none;
}
.news-index {
    color: var(--accent-primary);
    font-weight: 700;
    font-size: 0.7rem;
    min-width: 1.2rem;
    flex-shrink: 0;
    font-family: var(--font-heading);
}
.news-text {
    flex: 1;
    color: var(--text-primary);
    line-height: 1.4;
    font-family: var(--font-body);
}

/* 历史上的今天 */
/* Today in History */
.history-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.history-item {
    padding: 0.4rem 0;
    border-bottom: 1px dashed var(--border-light);
    font-size: 0.85rem;
    line-height: 1.5;
}
.history-item:last-child {
    border-bottom: none;
}
.history-year {
    display: inline-block;
    background: var(--bg-tertiary);
    color: var(--accent-primary);
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-right: 0.4rem;
    font-family: var(--font-heading);
}
.history-title {
    color: var(--text-primary);
    font-family: var(--font-body);
}
.history-title a {
    color: inherit;
    text-decoration: none;
}
.history-title a:hover {
    color: var(--accent-primary);
}
/* 左侧栏 motto 样式优化 */
/* Left sidebar motto style optimization */

.profile-motto {
    font-size: 0.9rem !important;
    color: var(--text-tertiary) !important;
    font-style: normal;
    line-height: 1.6;
    font-family: var(--font-body);
    font-weight: 400;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* 信息小组件响应式 */
/* Info widgets responsive */
@media (max-width: 1280px) {
    .blog-sidebar {
        width: 240px;
    }
    .blog-sidebar-right {
        width: 220px;
    }
    .widget-content {
        max-height: 180px;
    }
}
@media (max-width: 1024px) {
    .blog-sidebar-right {
        display: none;
    }
    .blog-container {
        max-width: 1200px;
    }
    .blog-sidebar {
        width: 280px;
    }
}
@media (max-width: 768px) {
    .info-widget {
        padding: 0.625rem;
    }
    .blog-sidebar {
        width: 100%;
    }
}
