/* Reset and base styles - Updated for better blog experience */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #1a1a1a;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: 100vh;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.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: #586069;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #0366d6;
    background-color: #f1f8ff;
}

/* Main content */
.site-content {
    min-height: calc(100vh - 120px);
    padding: 1.5rem 0;
}

/* Hero section */
.hero-section {
    padding: 2rem 0 2.5rem 0;
    border-bottom: 1px solid #e1e4e8;
    margin-bottom: 2rem;
}

.profile-container {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 2rem;
    align-items: start;
    position: relative; /* for absolutely positioned globe */
}

/* Small globe widget on the right of the homepage */
.globe-container {
    width: 180px;
    align-self: start;
    margin-top: 0;
    position: absolute;
    right: 0;
    top: var(--globe-top, 8px);
    z-index: 1;
}

#globe-map {
    width: 100%;
    height: 140px;
    border-radius: 12px;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.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-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #24292e;
}

.profile-title {
    font-size: 1.5rem;
    font-weight: 400;
    color: #586069;
    margin-bottom: 0.5rem;
}

.profile-affiliation {
    font-size: 1.1rem;
    color: #0366d6;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.profile-bio {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #24292e;
    margin-bottom: 2rem;
    max-width: 600px;
}

.social-and-blog-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    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: #ffffff;
    border: 1px solid #e5e7eb;
    color: #6b7280;
    text-decoration: none;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.social-link:hover {
    background-color: #f9fafb;
    border-color: #d1d5db;
    color: #111827;
}

.social-link:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(229, 231, 235, 0.8);
}

.profile-blog-link {
    margin-left: auto;
}

.profile-blog-button {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    background-color: #ffffff;
    color: #24292e;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    border: 1px solid #e1e4e8;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.profile-blog-button:hover {
    background-color: #f6f8fa;
    color: #0366d6;
    text-decoration: none;
    border-color: #0366d6;
}

/* Blog页面样式 - Hugo Stack风格 */
.blog-container {
    /* 简洁化：缩小内边距与间距、去灰底 */
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 16px;
    display: flex;
    gap: 24px;
    background: #ffffff;
    min-height: 100vh;
}

/* 侧边栏样式 */
.blog-sidebar {
    width: 300px;
    flex-shrink: 0;
}

.sidebar-widget {
    background: #ffffff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
}

.sidebar-widget:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
}

.sidebar-widget h3 {
    color: #1f2937;
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 12px 0;
    padding-bottom: 0;
    border-bottom: none;
    position: static;
}

.sidebar-widget h3::after {
    /* 移除强调色下划线 */
    content: none;
}

/* 返回主页按钮（增大尺寸，简洁风格） */
.sidebar-home-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    font-size: 15px;
    line-height: 1.2;
    background: #ffffff;
    color: #374151;
    border: 1px solid #e5e7eb;
    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: #f9fafb;
    border-color: #d1d5db;
    color: #111827;
    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 #e1e4e8;
    border-radius: 9999px;
    font-size: 14px;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
    background: #ffffff;
    color: #24292e;
}

.search-box input:focus {
    outline: none;
    border-color: #9ca3af;
    box-shadow: none;
    background: #ffffff;
}

/* 已移除按钮样式 */


/* 归档模块 */
.archive-year {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: #111827;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.archive-year:hover {
    background-color: #f8f9fa;
}

.post-count {
    font-size: 0.9rem;
    color: #6b7280;
}

.archive-item {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.archive-item:hover {
    background-color: #f8f9fa;
}

.archive-date {
    color: #6b7280;
    min-width: 35px;
}

.archive-item a {
    color: #374151;
    text-decoration: none;
    flex: 1;
}

.archive-item a:hover {
    color: #111827;
}

/* 分类模块 */
.category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.category-item:hover {
    background-color: #f8f9fa;
}

.category-name {
    color: #374151;
}

.category-count {
    background: #f3f4f6;
    color: #6b7280;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
}



/* 主内容区样式 */
.blog-main {
    flex: 1;
    min-width: 0;
}



/* 卡片网格布局 */
.blog-posts-grid {
    margin-bottom: 2rem;
}

/* 博客卡片样式 */
.blog-card {
    background: #ffffff;
    border: 1px solid #e1e4e8;
    border-radius: 8px;
    padding: 1.2rem;
    margin-bottom: 1.2rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.06);
}

.blog-card:hover {
    border-color: #d1d5db;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

/* 移除不再使用的样式 */

/* 卡片样式 */
.card-title {
    margin: 0 0 0.4rem 0;
}

.card-title a {
    color: #24292e;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.4;
}

.card-title a:hover {
    color: #0366d6;
    text-decoration: underline;
}

.card-excerpt {
    color: #586069;
    line-height: 1.5;
    margin: 0 0 0.6rem 0; /* 进一步收紧间距 */
    font-size: 0.95rem; /* 适度收紧字号 */
}

.card-meta {
    font-size: 0.85rem;
    color: #6b7280; /* neutral gray */
    margin-bottom: 0.6rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-number {
    background: #e5e7eb;
    color: #374151;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    font-family: monospace;
}

.card-date,
.card-category {
    color: #6b7280; /* ensure no colored look */
}

/* 移除重复的卡片底部样式 */

.card-tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.3rem; /* 更紧凑 */
    margin-bottom: 0.5rem; /* 进一步收紧 */
}

.tag {
    display: inline-flex;
    align-items: center;
    background: #f5f6f7; /* 更浅的灰 */
    color: #374151;
    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 #e6e7eb;
    font-weight: 500;
}

.tag:hover {
    background: #e5e7eb;
    color: #111827;
}

.card-read-more {
    margin-left: auto;
    padding: 0;
    background: transparent;
    color: #374151;
    border: none;
    text-decoration: none;
    font-size: 0.83rem; /* 略微收紧 */
    font-weight: 500;
    line-height: 1;
}

.card-read-more:hover {
    color: #111827;
    text-decoration: underline;
}

/* 分页控件 */
.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: #ffffff;
    color: #374151;
    border: 2px solid #e5e7eb;
    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: #f9fafb;
    border-color: #d1d5db;
    color: #111827;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.pagination-info {
    font-size: 1.1rem;
    color: #6b7280;
    font-weight: 500;
}

.no-posts {
    text-align: center;
    padding: 3rem 0;
    color: #7f8c8d;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .profile-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .globe-container { 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 {
        padding: 1rem;
    }
    
    .card-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* Recent posts section in blog */
.recent-posts-section {
    margin-bottom: 4rem;
}

.recent-posts-section h2 {
    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 {
    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;
}

.read-more-btn {
    display: inline-block;
    background: #0366d6;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.read-more-btn:hover {
    background: #0256cc;
    transform: translateX(2px);
}

.no-posts-message {
    text-align: center;
    color: #586069;
    font-style: italic;
    padding: 2rem;
}

/* All posts section */
.all-posts-section {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 2px solid #e1e4e8;
}

.all-posts-section h2 {
    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;
}

/* Legacy styles for compatibility */
.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 layout */
.blog-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e1e4e8;
}

.blog-header h1 {
    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 {
    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 layout */
.post-header {
    text-align: center;
    margin-bottom: 0.8rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid #e1e4e8;
}

.post-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #24292e;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.post-meta-detailed {
    background-color: #f6f8fa;
    border: 1px solid #e1e4e8;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.5rem;
}

.post-meta-row {
    display: flex;
    margin-bottom: 0.8rem;
    align-items: center;
}

.post-meta-row:last-child {
    margin-bottom: 0;
}

.meta-label {
    font-weight: 600;
    color: #24292e;
    min-width: 80px;
    margin-right: 1rem;
    font-size: 0.95rem;
}

.meta-value {
    color: #586069;
    font-size: 0.95rem;
}

.tag {
    background-color: #f3f4f6;
    color: #374151;
    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 #e5e7eb;
}

.post-content {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.8;
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    color: #24292e;
}

.post-content h1 { font-size: 2rem; }
.post-content h2 { font-size: 1.8rem; }
.post-content h3 { font-size: 1.5rem; }

.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: #0366d6;
    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 #0366d6;
    padding-left: 1rem;
    margin: 0.8rem 0;
    color: #586069;
    font-style: italic;
}

.post-content code {
    background-color: #f6f8fa;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: 'SF Mono', Monaco, Inconsolata, 'Roboto Mono', Consolas, monospace;
    font-size: 0.9em;
}

.post-content pre {
    position: relative;
    background-color: #f6f8fa;
    border-radius: 6px;
    padding: 1rem;
    overflow-x: auto;
    margin: 0.8rem 0;
    line-height: 1.4;
    /* 确保复制按钮固定在可视区域 */
    overflow-y: visible;
}

.post-content pre code {
    background: none;
    padding: 0;
    display: block;
    white-space: pre;
    font-family: 'SF Mono', Monaco, Inconsolata, 'Roboto Mono', Consolas, monospace;
    font-size: 0.875rem;
    line-height: 1.4;
    color: #24292e;
}

/* 代码复制按钮 */
.code-copy-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #d1d5db;
    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: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    font-size: 0.9rem;
}

.post-content thead {
    background: #f8f9fa;
    color: #374151;
}

.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 #e5e7eb;
}

.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 #f3f4f6;
    transition: background-color 0.2s ease;
}

.post-content tbody tr:hover {
    background-color: #f9fafb;
}

.post-content tbody tr:last-child {
    border-bottom: none;
}

.post-content tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

.post-content tbody tr:nth-child(even):hover {
    background-color: #f3f4f6;
}

.post-content tbody td {
    padding: 0.875rem 1.25rem;
    font-size: 0.9rem;
    color: #374151;
    line-height: 1.5;
    vertical-align: top;
}

.post-content tbody td:first-child {
    font-weight: 600;
    color: #1f2937;
}

.post-content tbody td code {
    background: #f3f4f6;
    color: #1f2937;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.85em;
    font-weight: 500;
}

/* Image styles */
.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 */
.post-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e1e4e8;
}

.prev-post {
    text-align: left;
}

.next-post {
    text-align: right;
}

.prev-post,
.next-post {
    color: #0366d6;
    text-decoration: none;
    font-weight: 500;
    flex: 1;
    max-width: 45%;
}

.prev-post:hover,
.next-post:hover {
    text-decoration: underline;
}

/* Footer */
.site-footer {
    background-color: #fff;
    border-top: 1px solid #e1e4e8;
    padding: 2rem 0;
    margin-top: 3rem;
    text-align: center;
    color: #586069;
}

/* 文章布局 - 双栏设计（左侧目录 + 右侧内容） */
.post-layout {
    display: flex;
    max-width: 1700px;
    margin: 0 auto;
    gap: 1.5rem;
    padding: 0 10px 0 0;
    justify-content: flex-start;
}

/* 目录导航样式 */
.table-of-contents {
    width: 300px;
    flex-shrink: 0;
    position: sticky;
    top: 20px;
    align-self: flex-start;
    max-height: calc(90vh - 40px);
    overflow-y: auto;
    background: #ffffff;
    border: 1px solid #e1e4e8;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
    margin-left: -200px;
}

.table-of-contents:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.06);
}

.toc-header {
    padding: 1rem 1.5rem 0.6rem 1.5rem;
    border-bottom: 1px solid #e1e4e8;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 12px 12px 0 0;
}

.toc-header h3 {
    color: #24292e;
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.2rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-align: center;
}

/* 返回按钮样式 */
.back-to-blog {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    background: #ffffff;
    color: #374151;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    width: 100%;
    justify-content: center;
    margin-bottom: 0.5rem;
}

.back-to-blog:hover {
    background: #f8f9fa;
    border-color: #d1d5db;
    color: #0366d6;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.back-to-blog .back-icon {
    font-size: 0.9rem;
}

.toc-content {
    padding: 1rem 0.5rem;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

/* 目录列表样式 - 简洁优化 */
.toc-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.toc-item {
    margin: 0;
    padding: 0;
}

.toc-link {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.5rem 1rem;
    color: #6b7280;
    text-decoration: none;
    border-radius: 6px;
    margin: 0.1rem 0;
    transition: all 0.2s ease;
    font-size: 0.85rem;
    line-height: 1.4;
    border-left: 3px solid transparent;
    position: relative;
    min-height: 2rem;
}

.toc-link:hover {
    background: #f6f8fa;
    color: #374151;
    border-left-color: #e1e4e8;
}

.toc-link.active {
    background: #e3f2fd;
    color: #0366d6;
    border-left-color: #0366d6;
    font-weight: 600;
}

.toc-icon {
    font-size: 0.9rem;
    opacity: 0.8;
    flex-shrink: 0;
    width: 16px;
    text-align: center;
    margin-top: 0.1rem;
}

.toc-text {
    flex: 1;
    line-height: 1.4;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* 不同级别的标题样式 - 简化设计 */
.toc-level-1 .toc-link {
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.7rem 1rem;
    margin: 0.4rem 0;
    background: #f8f9fa;
    border: 1px solid #e1e4e8;
    border-radius: 8px;
}

.toc-level-1 .toc-link:hover {
    background: #e3f2fd;
    border-color: #0366d6;
}

.toc-level-1 .toc-link.active {
    background: #0366d6;
    color: #ffffff;
    border-color: #0366d6;
}

.toc-level-1 .toc-icon {
    font-size: 1rem;
    color: #0366d6;
}

.toc-level-1 .toc-link.active .toc-icon {
    color: #ffffff;
}

.toc-level-2 .toc-link {
    padding-left: 2.5rem;
    font-size: 0.85rem;
    margin: 0.15rem 0;
    cursor: pointer;
    position: relative;
}

.toc-level-2 .toc-link::before {
    content: '';
    position: absolute;
    left: 1.5rem;
    top: 50%;
    width: 10px;
    height: 1px;
    background: #d1d5db;
    transform: translateY(-50%);
}

.toc-level-2 .toc-icon {
    font-size: 0.85rem;
    color: #6b7280;
}

/* 三级及以下标题 - 默认隐藏 */
.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;
    max-height: 100px;
}

.toc-level-3 .toc-link {
    padding-left: 3.5rem;
    font-size: 0.8rem;
    opacity: 0.8;
    margin: 0.1rem 0;
}

.toc-level-3 .toc-link::before {
    content: '';
    position: absolute;
    left: 2.5rem;
    top: 50%;
    width: 6px;
    height: 6px;
    border: 1px solid #d1d5db;
    border-radius: 50%;
    transform: translateY(-50%);
    background: #ffffff;
}

.toc-level-3 .toc-icon {
    font-size: 0.75rem;
    color: #9ca3af;
}

.toc-level-4 .toc-link,
.toc-level-5 .toc-link,
.toc-level-6 .toc-link {
    padding-left: 4rem;
    font-size: 0.75rem;
    opacity: 0.7;
    font-style: italic;
    margin: 0.05rem 0;
}

.toc-level-4 .toc-icon,
.toc-level-5 .toc-icon,
.toc-level-6 .toc-icon {
    font-size: 0.7rem;
    color: #9ca3af;
}

/* 二级标题展开/收起按钮 */
.toc-level-2 .toc-link.has-children::after {
    content: '\25B6';
    position: absolute;
    right: 1rem;
    font-size: 0.7rem;
    color: #9ca3af;
    transition: transform 0.2s ease;
}

.toc-level-2 .toc-link.has-children.expanded::after {
    transform: rotate(90deg);
}

/* 无标题提示 */
.no-headings {
    color: #9ca3af;
    font-style: italic;
    text-align: center;
    padding: 2rem 1rem;
    font-size: 0.85rem;
}

/* 文章内容区域 */
.post-content-wrapper {
    flex: 1;
    min-width: 0;
    max-width: 1500px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

.post-content-wrapper .post-header {
    padding: 1.5rem 2.5rem 1rem 2.5rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-bottom: 1px solid #e1e4e8;
    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: #f8f9fa;
    border-top: 1px solid #e1e4e8;
    margin-top: 0;
}

/* 目录滚动条样式 */
.toc-content::-webkit-scrollbar {
    width: 4px;
}

.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;
}

/* Footer */
.site-footer {
    background-color: #f6f8fa;
    border-top: 1px solid #e1e4e8;
    padding: 2rem 0;
    text-align: center;
    color: #586069;
}

/* Responsive design */
@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;
    }
}

/* Publications page styles */
.publications-content {
    margin-top: 2rem;
}

.publications-section h2 {
    color: #24292e;
    font-size: 1.8rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
}

.publication-section {
    margin-bottom: 3rem;
}

.publication-section h2 {
    color: #24292e;
    font-size: 1.8rem;
    margin-bottom: 10rem;
    border-bottom: 2px solid #e1e4e8;
    padding-bottom: 0.5rem;
}

.publication-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.publication-item {
    margin-bottom: 0;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #0366d6;
    transition: box-shadow 0.3s ease;
    line-height: 1.6;
    text-align: justify;
    text-indent: 2em;
}

.publication-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.publication-citation strong {
    color: #0366d6;
    font-weight: bold;
}

.publication-citation em {
    color: #d73a49;
    font-style: italic;
}

.publication-citation a {
    color: #0366d6;
    text-decoration: none;
}

.publication-citation a:hover {
    text-decoration: underline;
}

/* 响应式表格设计 */
@media (max-width: 768px) {
    .post-content table {
        font-size: 0.85rem;
        margin: 1.5rem 0;
    }
    
    .post-content thead th,
    .post-content tbody td {
        padding: 0.75rem 1rem;
    }
    
    .post-content thead th {
        font-size: 0.85rem;
    }
    
    .post-content tbody td {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .post-content table {
        font-size: 0.8rem;
        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.8rem;
    }
    
    .post-content tbody td {
        font-size: 0.75rem;
    }
    
    .post-content tbody td code {
        font-size: 0.75em;
        padding: 2px 4px;
    }
}
