/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Import Inter font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --bg-color: #ffffff;
    --bg-secondary: #f8f9fa;
    --text-color: #1f2937;
    --text-muted: #4b5563;
    --text-light: #6b7280;
    --border-color: #e5e7eb;
    --hover-bg: #f9fafb;
}

.dark {
    --bg-color: #111827;
    --bg-secondary: #1f2937;
    --text-color: #f9fafb;
    --text-muted: #d1d5db;
    --text-light: #9ca3af;
    --border-color: #374151;
    --hover-bg: #1f2937;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.3s ease, color 0.3s ease;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Navigation */
.nav {
    background: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 72px;
    position: relative;
}

.nav-brand {
    position: absolute;
    left: 24px;
}

.theme-switch {
    position: absolute;
    right: 24px;
    display: inline-block;
    width: 48px;
    height: 24px;
}

.nav-brand {
    font-weight: 600;
    font-size: 18px;
    color: var(--text-color);
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-link {
    color: var(--text-light);
    font-weight: 400;
    font-size: 15px;
    transition: color 0.2s ease;
    text-transform: capitalize;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-color);
}

/* Theme Switch Styles */

.theme-switch-checkbox {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.theme-switch-label {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border-color);
    border-radius: 24px;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
}

.theme-switch-label:hover {
    background-color: var(--text-light);
}

.theme-switch-slider {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: transform 0.3s ease, background-color 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.theme-switch-slider::before {
    content: "🌙";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 10px;
    transition: opacity 0.3s ease;
}

.theme-switch-checkbox:checked + .theme-switch-label {
    background-color: #3b82f6;
}

.theme-switch-checkbox:checked + .theme-switch-label:hover {
    background-color: #1d4ed8;
}

.theme-switch-checkbox:checked + .theme-switch-label .theme-switch-slider {
    transform: translateX(24px);
}

.theme-switch-checkbox:checked + .theme-switch-label .theme-switch-slider::before {
    content: "☀️";
}

/* Dark mode adjustments for switch */
.dark .theme-switch-slider {
    background-color: var(--bg-color);
}

.dark .theme-switch-label {
    background-color: var(--border-color);
}

.dark .theme-switch-label:hover {
    background-color: var(--text-light);
}

/* Main Content */
.main-content {
    background-color: var(--bg-color);
}

/* Footer */
.footer {
    background: var(--bg-color);
    border-top: 1px solid var(--border-color);
    padding: 40px 0;
    text-align: center;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    color: var(--text-light);
    font-size: 14px;
}

.footer-container p {
    margin: 0 0 12px 0;
}

.footer-container p:last-child {
    margin-bottom: 0;
    opacity: 0.6;
}

/* Code Blocks */
pre {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
    margin: 16px 0;
    overflow-x: auto;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.5;
}

code {
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-size: 0.9em;
}

/* Inline code */
p code,
li code {
    background: var(--bg-secondary);
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    font-size: 0.85em;
}

/* Code block with language label */
pre code {
    background: none;
    border: none;
    padding: 0;
    border-radius: 0;
    font-size: inherit;
}

/* Highlight.js theme overrides */
.hljs {
    background: var(--bg-secondary) !important;
    color: var(--text-color) !important;
    border-radius: 8px;
}

/* Code Copy Button */
.code-copy-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 14px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    opacity: 0;
    transform: translateY(-2px);
    z-index: 10;
}

pre:hover .code-copy-btn {
    opacity: 1;
    transform: translateY(0);
}

.code-copy-btn:hover {
    background: var(--hover-bg);
    color: var(--text-color);
    border-color: var(--text-muted);
}

.code-copy-btn.copied {
    background: #10b981;
    color: white;
    border-color: #10b981;
}

.code-copy-btn.copy-error {
    background: #ef4444;
    color: white;
    border-color: #ef4444;
}

/* Mobile responsive for copy button */
@media (max-width: 768px) {
    .code-copy-btn {
        opacity: 1;
        top: 8px;
        right: 8px;
        padding: 6px 8px;
        font-size: 12px;
    }
}

/* Responsive Design for Navigation and Footer */
@media (max-width: 768px) {
    .nav-container {
        padding: 0 16px;
        height: 64px;
    }
    
    .nav-brand {
        left: 16px;
    }
    
    .theme-switch {
        right: 16px;
    }
    
    .nav-links {
        gap: 24px;
    }
    
    .footer-container {
        padding: 0 16px;
    }
    
    /* Responsive code blocks */
    pre {
        padding: 12px;
        font-size: 13px;
    }
}

/* ========================================
   INDEX PAGE STYLES (首页样式)
   ======================================== */

/* Hero Section */
.hero-section {
    min-height: calc(100vh - 72px);
    display: flex;
    align-items: center;
    padding: 128px 0;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 80px;
    align-items: center;
}

.hero-content {
    max-width: 640px;
}

.hero-greeting {
    font-size: 48px;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 24px;
    line-height: 1.2;
    letter-spacing: -0.025em;
}

.hero-description {
    font-size: 20px;
    color: var(--text-muted);
    margin-bottom: 32px;
    line-height: 1.6;
}

.hero-bio {
    font-size: 16px;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 32px;
}

.research-interests {
    margin-bottom: 40px;
}

.research-interests h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 16px;
}

.research-interests ul {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.research-interests li {
    position: relative;
    padding-left: 20px;
    font-size: 16px;
    color: var(--text-muted);
    line-height: 1.6;
}

.research-interests li:before {
    content: "•";
    color: var(--text-light);
    position: absolute;
    left: 0;
}

.social-icons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    color: var(--text-light);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    font-size: 20px;
    transition: transform opacity 0.3s ease;
}

.social-icon:hover {
    color: var(--text-color);
    border-color: var(--text-light);
    background-color: var(--hover-bg);
    transform: translateY(0);
}

.hero-avatar {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 60px;
}

.hero-avatar img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.1));
    transition: transform 0.3s ease, filter 0.3s ease;
}

.hero-avatar img:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.15));
}

/* Hero Section Responsive Design */
@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        gap: 60px;
        text-align: center;
    }
    
    .hero-avatar {
        order: -1;
    }
    
    .hero-avatar img {
        width: 180px;
        height: 180px;
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding: 80px 0;
        min-height: calc(100vh - 64px);
    }
    
    .hero-container {
        padding: 0 16px;
        gap: 40px;
    }
    
    .hero-greeting {
        font-size: 36px;
    }
    
    .hero-description {
        font-size: 18px;
    }
    
    .hero-avatar img {
        width: 160px;
        height: 160px;
    }
    
    .research-interests {
        text-align: left;
    }
    
    .social-icons {
        justify-content: center;
        gap: 12px;
    }
    
    .social-icon {
        width: 44px;
        height: 44px;
        font-size: 18px;
    }
}

/* ========================================
   ARCHIVE PAGE STYLES (文章列表页样式)
   ======================================== */

/* Article List Styles */
.article-list-section {
    padding: 80px 0 120px;
    min-height: calc(100vh - 72px);
}

.article-list-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 24px;
}

.article-list-header {
    text-align: center;
    margin-bottom: 64px;
}

.article-list-title {
    font-size: 48px;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 16px;
    line-height: 1.2;
    letter-spacing: -0.025em;
}

.article-list-subtitle {
    font-size: 20px;
    color: var(--text-muted);
    line-height: 1.6;
}

.article-list {
    display: flex;
    flex-direction: column;
    gap: 64px;
    margin-bottom: 80px;
}

.article-item {
    position: relative;
    transition: all 0.3s ease;
    padding: 0;
}

.article-item.md\:grid {
    display: grid;
}

.article-item.md\:grid-cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

.article-item.md\:items-baseline {
    align-items: baseline;
}

.md\:col-span-3 {
    grid-column: span 3;
}

.group {
    position: relative;
}

.relative {
    position: relative;
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-start {
    align-items: flex-start;
}

.article-hover-bg {
    position: absolute;
    inset: -16px;
    z-index: 0;
    transform: scale(0.95);
    background-color: var(--bg-secondary, #f8f9fa);
    opacity: 0;
    transition: all 0.3s ease;
    border-radius: 16px;
}

.group:hover .article-hover-bg {
    transform: scale(1);
    opacity: 1;
}

.article-link-overlay {
    position: absolute;
    inset: -16px;
    z-index: 20;
    border-radius: 16px;
}

.article-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 8px;
    line-height: 1.5;
    letter-spacing: -0.01em;
    position: relative;
    z-index: 10;
}

.article-title-text {
    position: relative;
    z-index: 10;
}

.article-link {
    color: inherit;
    display: block;
    transition: color 0.2s ease;
}

.article-link:hover {
    color: var(--text-muted);
}

.article-date-mobile {
    font-size: 14px;
    color: var(--text-light);
    font-weight: 400;
    position: relative;
    z-index: 10;
    order: -1;
    margin-bottom: 12px;
    padding-left: 4px;
}

.article-date-desktop {
    font-size: 14px;
    color: var(--text-light);
    font-weight: 400;
    position: relative;
    z-index: 10;
    order: -1;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
}

.mt-1 {
    margin-top: 4px;
}

.hidden {
    display: none;
}

.article-excerpt {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 16px;
    position: relative;
    z-index: 10;
    margin-top: 8px;
}

.article-read-more {
    display: flex;
    align-items: center;
    position: relative;
    z-index: 10;
    margin-top: 16px;
}

.read-more-link {
    font-size: 14px;
    font-weight: 500;
    color: #007bff;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: opacity 0.2s ease;
    position: relative;
    z-index: 10;
}

.read-more-link:hover {
    color: var(--text-color);
}

.read-more-arrow {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    transition: transform 0.2s ease;
    margin-left: 4px;
}

.read-more-link:hover .read-more-arrow {
    transform: translateX(2px);
}

/* Responsive utilities */
@media (min-width: 768px) {
    .md\:grid {
        display: grid;
    }
    
    .md\:grid-cols-4 {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .md\:items-baseline {
        align-items: baseline;
    }
    
    .md\:col-span-3 {
        grid-column: span 3;
    }
    
    .md\:hidden {
        display: none;
    }
    
    .md\:block {
        display: block;
    }
}

.pagination-container {
    display: flex;
    justify-content: center;
    padding-top: 40px;
    border-top: 1px solid var(--border-color);
}

.pagination {
    display: flex;
    align-items: center;
    gap: 24px;
}

.pagination-info {
    font-size: 14px;
    color: var(--text-light);
    font-weight: 500;
}

/* Article List Responsive Design */
@media (max-width: 768px) {
    .article-list-section {
        padding: 60px 0 80px;
        min-height: calc(100vh - 64px);
    }
    
    .article-list-container {
        padding: 0 16px;
    }
    
    .article-list-header {
        margin-bottom: 48px;
    }
    
    .article-list-title {
        font-size: 36px;
    }
    
    .article-list-subtitle {
        font-size: 18px;
    }
    
    .article-list {
        gap: 48px;
        margin-bottom: 60px;
    }
    
    .article-item {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }
    
    .article-item.md\:grid {
        display: flex;
        flex-direction: column;
    }
    
    .article-date-mobile {
        margin-bottom: 8px;
        order: -1;
    }
    
    .article-title {
        font-size: 18px;
    }
    
    .article-excerpt {
        font-size: 14px;
    }
    
    .article-hover-bg {
        inset: -12px;
    }
    
    .article-link-overlay {
        inset: -12px;
    }
}

/* ========================================
   POST PAGE STYLES (文章详情页样式)
   ======================================== */

/* Article Detail Styles */
.article-detail {
    min-height: calc(100vh - 72px);
    background-color: var(--bg-color);
}

/* Article Header */
.article-detail-header {
    padding: 128px 0 16px 0;
    background-color: var(--bg-color);
}

.article-detail-header-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 24px;
}

.article-detail-title {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.6;
    color: var(--text-color);
    margin-bottom: 24px;
    letter-spacing: -0.025em;
}

/* Article Meta */
.article-detail-meta {
    margin-top: 0;
    margin-bottom: 20px;
}

.article-detail-meta-info {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    font-size: 14px;
    color: var(--text-light);
}

.article-detail-meta-info span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.article-detail-meta-info i {
    font-size: 13px;
    opacity: 0.8;
}

/* Author Avatar */
.author-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 2px;
}

/* Featured Image */
.article-detail-featured-image {
    width: 100%;
    margin-bottom: 16px;
    margin-top: 32px;
}

.featured-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    max-height: 400px;
}

/* Article Taxonomy Row */
.article-detail-taxonomy {
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.article-detail-categories,
.article-detail-tags {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    color: var(--text-light);
}

.article-detail-categories i,
.article-detail-tags i {
    font-size: 13px;
    opacity: 0.8;
    margin-right: 2px;
}

.category-link,
.tag-link {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.2s ease;
}

.category-link:hover,
.tag-link:hover {
    color: var(--text-color);
    text-decoration: underline;
}

/* Article Content */
.top-line {
    border-top: 1px solid var(--border-color);
}

.article-detail-content {
    padding: 24px 0 64px 0;
    position: relative;
}

.article-detail-layout {
    display: flex;
    flex-direction: column;
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    gap: 48px;
    align-items: start;
    padding: 32px 0 0 0;
}

.article-detail-content-layout {
    display: flex;
    position: relative;
    width: 100%;
    gap: 48px;
    align-items: start;
}

.article-detail-placeholder {
    width: 200px;
    flex-shrink: 0;
}

.article-detail-main {
    flex: 1;
    min-width: 0;
    max-width: 800px;
}

.article-detail-sidebar {
    position: sticky;
    top: 100px;
    width: 250px;
    height: fit-content;
    flex-shrink: 0;
    padding: 24px 0;
    max-width: 200px;
    transform: none !important;
    transition: none !important;
}

/* Table of Contents Mobile */


/* Article Body */
.article-detail-body {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-color);
    letter-spacing: 0.01em;
}

.article-detail-body h1,
.article-detail-body h2,
.article-detail-body h3,
.article-detail-body h4,
.article-detail-body h5,
.article-detail-body h6 {
    margin: 32px 0 16px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-color);
}

.article-detail-body h1 {
    font-size: 2rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 8px;
}

.article-detail-body h2 {
    font-size: 1.5rem;
}

.article-detail-body h3 {
    font-size: 1.25rem;
}

.article-detail-body h4 {
    font-size: 1.125rem;
}

.article-detail-body p {
    margin: 16px 0;
    letter-spacing: 0.025em;
}

.article-detail-body a {
    color: #3b82f6;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.article-detail-body a:hover {
    color: #1d4ed8;
}

.article-detail-body ul,
.article-detail-body ol {
    margin: 16px 0;
    padding-left: 24px;
}

.article-detail-body li {
    margin: 8px 0;
}

.article-detail-body blockquote {
    margin: 24px 0;
    padding: 16px 20px;
    border-left: 4px solid #3b82f6;
    background-color: var(--bg-secondary);
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: var(--text-muted);
}

.article-detail-body pre {
    margin: 24px 0;
    padding: 20px;
    background-color: var(--bg-secondary);
    border-radius: 8px;
    overflow-x: auto;
    font-size: 14px;
    line-height: 1.5;
}

.article-detail-body code {
    background-color: var(--bg-secondary);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

.article-detail-body pre code {
    background: none;
    padding: 0;
}

.article-detail-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 24px 0;
}

/* Table wrapper for responsive scrolling */
.article-detail-body .table-wrapper {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    margin: 24px 0;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    /* Custom scrollbar styling */
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}

.article-detail-body .table-wrapper::-webkit-scrollbar {
    height: 8px;
}

.article-detail-body .table-wrapper::-webkit-scrollbar-track {
    background: transparent;
}

.article-detail-body .table-wrapper::-webkit-scrollbar-thumb {
    background-color: var(--border-color);
    border-radius: 4px;
}

.article-detail-body .table-wrapper::-webkit-scrollbar-thumb:hover {
    background-color: var(--text-light);
}

.article-detail-body table {
    width: 100%;
    min-width: 600px; /* Minimum width to prevent table from being too compressed */
    border-collapse: collapse;
    margin: 0;
    border-radius: 0;
    overflow: visible;
    border: none;
}

.article-detail-body th,
.article-detail-body td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    font-size: 13px;
}

.article-detail-body th {
    background-color: var(--bg-secondary);
    font-weight: 600;
}

/* Article Footer */
.article-detail-footer {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--border-color);
}

.article-detail-updated {
    margin-bottom: 24px;
    font-size: 12px;
    color: var(--text-light);
    text-align: right;
}



/* Share Buttons */
.article-detail-share {
    text-align: center;
}

.article-detail-share-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 16px;
}

.article-detail-share-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 18px;
}

.share-btn:hover {
    transform: translateY(-2px) scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.share-twitter {
    background-color: #1da1f2;
}

.share-facebook {
    background-color: #4267b2;
}

.share-linkedin {
    background-color: #0077b5;
}

.share-email {
    background-color: #6b7280;
}

/* Table of Contents Sidebar */
.article-detail-sidebar {
    position: sticky;
    top: 100px;
    width: 200px;
    height: fit-content;
    flex-shrink: 0;
    padding: 24px 0;
    max-width: 160px;
    transform: none !important;
    transition: none !important;
}

.article-detail-sidebar * {
    transform: none !important;
}

.article-detail-toc {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
}

.article-detail-toc-title {
    margin: 0 0 16px 0;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.article-detail-toc-content {
    font-size: 13px;
}

.article-detail-toc-content ol {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 13px;
}

.article-detail-toc-content li {
    margin: 6px 0;
}

.article-detail-toc-content a {
    color: var(--text-light);
    text-decoration: none;
    display: block;
    padding: 4px 0;
    border-radius: 4px;
    transition: color 0.2s ease, background-color 0.2s ease, padding-left 0.2s ease;
    line-height: 1.4;
    word-break: break-words;
    transform: none !important;
}

.article-detail-toc-content a:hover {
    color: var(--text-color);
    background-color: var(--hover-bg);
    padding-left: 8px;
}

.article-detail-toc-content ol ol {
    margin-left: 16px;
    margin-top: 4px;
}

.article-detail-toc-content ol ol a {
    font-size: 12px;
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .article-detail-layout {
        display: block;
        max-width: 100%;
        padding: 0 20px;
        gap: 0;
    }
    
    .article-detail-placeholder {
        display: none;
    }
    
    .article-detail-sidebar {
        display: none;
    }
    
    .article-detail-main {
        max-width: 100%;
    }
}

@media (max-width: 1024px) {
    .article-detail-layout {
        padding: 0 16px;
    }
}

@media (max-width: 768px) {
    .article-detail-header {
        padding: 64px 0 0px 12px;
    }
    
    .article-detail-title {
        font-size: 2rem;
        margin-bottom: 16px;
    }
    
    .article-detail-meta-info {
        gap: 16px;
        font-size: 13px;
    }
    
    .article-detail-content {
        padding: 16px 0 32px 0;
    }
    
    .article-detail-body {
        font-size: 15px;
    }
    
    .article-detail-body h1 {
        font-size: 1.75rem;
    }
    
    .article-detail-body h2 {
        font-size: 1.375rem;
    }
    
    .article-detail-body h3 {
        font-size: 1.125rem;
    }
    
    .article-detail-share-buttons {
        gap: 8px;
    }
    
    .share-btn {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .article-detail-title {
        font-size: 1.75rem;
    }
    
    .article-detail-meta-info {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px 16px;
        align-items: start;
    }
    
    .article-detail-meta-info span {
        display: flex;
        align-items: center;
        gap: 6px;
        font-size: 13px;
    }
    
    .article-detail-body {
        font-size: 14px;
    }
    
    .article-detail-taxonomy {
        margin-top: 8px;
        gap: 16px;
    }
    
    .article-detail-categories,
    .article-detail-tags {
        flex-wrap: wrap;
    }
}

/* Dark mode specific adjustments */
.dark .article-detail-toc {
    background-color: transparent;
    border-color: var(--border-color);
}

.dark .article-detail-featured-image {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.dark .share-email {
    background-color: #9ca3af;
}

/* Print styles */
@media print {
    .article-detail-sidebar,
    .article-detail-share {
        display: none;
    }
    
    .article-detail-layout {
        grid-template-columns: 1fr;
    }
    
    .article-detail-header {
        border-bottom: 2px solid #000;
    }
    
    .article-detail-body a {
        color: #000;
        text-decoration: underline;
    }
}

/* Tag and Category Page Specific Styles */
.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 8px 0;
    font-size: 14px;
}

.article-categories {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 8px 0;
    font-size: 14px;
    color: var(--text-muted);
}

.article-categories i {
    color: var(--text-light);
    font-size: 12px;
}

.current-tag,
.current-category {
    font-weight: 600;
    color: #2563eb !important;
}

.dark .current-tag,
.dark .current-category {
    color: #60a5fa !important;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    transition: all 0.2s ease;
}

.back-link:hover {
    background-color: var(--hover-bg);
    color: var(--text-color);
    transform: translateX(-2px);
}

.back-link i {
    font-size: 12px;
}

/* Image Preview Modal Styles */
.image-preview-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.image-preview-modal.active {
    opacity: 1;
    visibility: visible;
}

.image-preview-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    cursor: pointer;
}

.image-preview-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.image-preview-img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
}

.image-preview-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background-color: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: white;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.image-preview-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

.image-preview-prev,
.image-preview-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    background-color: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: white;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.image-preview-prev {
    left: 30px;
}

.image-preview-next {
    right: 30px;
}

.image-preview-prev:hover,
.image-preview-next:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-50%) scale(1.1);
}

/* Mobile responsive styles for image preview */
@media (max-width: 768px) {
    .image-preview-container {
        padding: 10px;
    }
    
    .image-preview-img {
        max-width: 95%;
        max-height: 85%;
    }
    
    .image-preview-close {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .image-preview-prev,
    .image-preview-next {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .image-preview-prev {
        left: 15px;
    }
    
    .image-preview-next {
        right: 15px;
    }
}

/* Add hover effect to article images */
.article-detail-body img {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-radius: 4px;
}

.article-detail-body img:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Pagination Styles */
.pagination-container {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--border-color);
}

.pagination {
    display: flex;
    flex-direction: column;
    gap: 24px;
    align-items: center;
}

.pagination-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    color: var(--text-muted);
}

.pagination-count {
    font-size: 13px;
    color: var(--text-light);
}

.pagination-links {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.pagination-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.2s ease;
    text-decoration: none;
}

.pagination-link:hover:not(.pagination-disabled) {
    color: var(--text-color);
    background-color: var(--hover-bg);
    border-color: var(--text-light);
    transform: translateY(-1px);
}

.pagination-link.pagination-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.pagination-arrow {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    stroke-width: 1.5;
}

.pagination-numbers {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0 8px;
}

.pagination-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    transition: all 0.2s ease;
    text-decoration: none;
}

.pagination-number:hover {
    color: var(--text-color);
    background-color: var(--hover-bg);
    border-color: var(--text-light);
}

.pagination-number.pagination-current {
    color: white;
    background-color: #2563eb;
    border-color: #2563eb;
    font-weight: 600;
}

.dark .pagination-number.pagination-current {
    color: var(--bg-color);
    background-color: #60a5fa;
    border-color: #60a5fa;
}

.pagination-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    font-size: 14px;
    color: var(--text-light);
    font-weight: 500;
}

/* Responsive Pagination */
@media (max-width: 768px) {
    .pagination-container {
        margin-top: 32px;
        padding-top: 24px;
    }
    
    .pagination {
        gap: 16px;
    }
    
    .pagination-info {
        text-align: center;
    }
    
    .pagination-links {
        gap: 6px;
    }
    
    .pagination-link {
        padding: 6px 10px;
        font-size: 13px;
    }
    
    .pagination-number {
        width: 32px;
        height: 32px;
        font-size: 13px;
    }
    
    .pagination-ellipsis {
        width: 32px;
        height: 32px;
        font-size: 13px;
    }
    
    .pagination-arrow {
        width: 12px;
        height: 12px;
    }
}

@media (max-width: 480px) {
    .pagination-links {
        flex-direction: column;
        gap: 12px;
        width: 100%;
    }
    
    .pagination-numbers {
        order: 2;
        margin: 0;
    }
    
    .pagination-prev {
        order: 1;
        width: 100%;
        justify-content: center;
    }
    
    .pagination-next {
        order: 3;
        width: 100%;
        justify-content: center;
    }
}