/* 自然语言处理博客 - 学术文献风格 */

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

:root {
    --primary-color: #1a365d;
    --primary-light: #2c5282;
    --secondary-color: #0d9488;
    --accent-color: #d4af37;
    --background-color: #0f172a;
    --surface-color: #1e293b;
    --surface-hover: #334155;
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border-color: #334155;
    --accent-gradient: linear-gradient(135deg, #1a365d 0%, #0d9488 50%, #14b8a6 100%);
    --text-gradient: linear-gradient(90deg, #d4af37, #0d9488, #1a365d);
    --card-shadow: 0 2px 8px rgba(26, 54, 93, 0.15);
    --card-shadow-hover: 0 8px 24px rgba(13, 148, 136, 0.25);
    --glow-effect: 0 0 12px rgba(13, 148, 136, 0.3);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Georgia', 'Times New Roman', 'Noto Serif SC', serif;
    background-color: var(--background-color);
    color: var(--text-primary);
    line-height: 1.8;
    min-height: 100vh;
}

/* 文本流背景装饰 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at 20% 80%, rgba(13, 148, 136, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(26, 54, 93, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(212, 175, 55, 0.03) 0%, transparent 40%);
    pointer-events: none;
    z-index: -1;
}

/* 容器 */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

/* 导航栏 - 学术风格 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(16px);
    border-bottom: 2px solid var(--border-color);
    z-index: 1000;
    padding: 18px 0;
}

.navbar::after {
    content: '⟨ NLP ⟩';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.7rem;
    color: var(--accent-color);
    letter-spacing: 4px;
    opacity: 0.6;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--secondary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Georgia', serif;
}

.logo::before {
    content: '⟨';
    color: var(--accent-color);
}

.logo::after {
    content: '⟩';
    color: var(--accent-color);
}

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

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.25s ease;
    position: relative;
    padding: 6px 0;
    font-size: 0.95rem;
}

.nav-links a:hover {
    color: var(--secondary-color);
}

.nav-links a::before {
    content: '→';
    position: absolute;
    left: -16px;
    color: var(--accent-color);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.nav-links a:hover::before {
    opacity: 1;
}

/* 英雄区域 - 学术标题风格 */
.hero {
    padding: 140px 0 72px;
    text-align: center;
    position: relative;
    background: linear-gradient(180deg, var(--background-color) 0%, var(--surface-color) 100%);
}

.hero::before {
    content: '';
    position: absolute;
    top: 50px;
    left: 50%;
    transform: translateX(-50%);
    width: 400px;
    height: 250px;
    background: radial-gradient(ellipse, rgba(13, 148, 136, 0.12) 0%, transparent 60%);
    animation: textFlow 10s ease-in-out infinite;
}

@keyframes textFlow {
    0%, 100% { opacity: 0.4; transform: translateX(-50%) scale(1); }
    50% { opacity: 0.6; transform: translateX(-50%) scale(1.15); }
}

.hero::after {
    content: 'Σ ∈ → ⟨ ⟩ λ ↦ ∪ ∩';
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.85rem;
    color: var(--text-muted);
    letter-spacing: 16px;
    opacity: 0.3;
}

.hero h1 {
    font-size: 2.6rem;
    font-weight: 700;
    margin-bottom: 18px;
    color: var(--text-primary);
    position: relative;
    font-family: 'Georgia', serif;
}

.hero h1::before {
    content: '⟨ ';
    color: var(--accent-color);
}

.hero h1::after {
    content: ' ⟩';
    color: var(--accent-color);
}

.hero .subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 620px;
    margin: 0 auto 28px;
    line-height: 1.7;
    font-style: italic;
}

.hero-tags {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.tag {
    padding: 8px 16px;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 2px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    font-family: 'Courier New', monospace;
}

.tag:hover {
    border-color: var(--secondary-color);
    color: var(--secondary-color);
    box-shadow: var(--glow-effect);
}

.tag::before {
    content: 'λ';
    color: var(--accent-color);
    margin-right: 6px;
}

/* 分类入口区域 */
.categories-section {
    padding: 32px 0;
    border-bottom: 2px solid var(--border-color);
    background: var(--surface-color);
}

.categories-grid {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}

.category-link {
    padding: 10px 20px;
    background: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: 2px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.category-link::before {
    content: '→';
    color: var(--secondary-color);
    font-size: 0.75rem;
}

.category-link:hover {
    border-color: var(--secondary-color);
    color: var(--secondary-color);
    box-shadow: var(--glow-effect);
}

/* 文章区域 */
.articles-section {
    padding: 52px 0;
}

.section-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 36px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Georgia', serif;
}

.section-title::before {
    content: '⟨';
    color: var(--accent-color);
    font-size: 1.2rem;
}

.section-title::after {
    content: '⟩';
    color: var(--accent-color);
    font-size: 1.2rem;
}

/* 文章网格 - 学术文献风格 */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 28px;
}

/* 文章卡片 - 文献风格 */
.article-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 2px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    display: block;
    position: relative;
}

.article-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--accent-gradient);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.article-card:hover::before {
    opacity: 1;
}

.article-card:hover {
    border-color: var(--secondary-color);
    box-shadow: var(--card-shadow-hover);
    transform: translateY(-3px);
}

.card-image {
    width: 100%;
    height: 130px;
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    position: relative;
    color: var(--text-primary);
}

.card-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(transparent, rgba(15, 23, 42, 0.4));
}

.card-content {
    padding: 20px;
}

.card-category {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(13, 148, 136, 0.12);
    color: var(--secondary-color);
    border-radius: 2px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 12px;
    font-family: 'Courier New', monospace;
}

.card-category::before {
    content: '∈ ';
    color: var(--accent-color);
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    line-height: 1.45;
    font-family: 'Georgia', serif;
}

.card-excerpt {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 16px;
    line-height: 1.65;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 14px;
    border-top: 1px solid var(--border-color);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.card-meta .read-time::before {
    content: 'Σ';
    color: var(--accent-color);
    margin-right: 5px;
}

/* 外链区域 */
.links-section {
    padding: 48px 0;
    background: var(--surface-color);
    border-top: 2px solid var(--border-color);
}

.links-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 28px;
    color: var(--text-primary);
    text-align: center;
    font-family: 'Georgia', serif;
}

.links-title::before {
    content: '⟨ ';
    color: var(--accent-color);
}

.links-title::after {
    content: ' ⟩';
    color: var(--accent-color);
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.link-category {
    background: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: 2px;
    padding: 16px;
    transition: all 0.2s ease;
}

.link-category:hover {
    border-color: var(--secondary-color);
}

.link-category-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.link-category-title::before {
    content: '→ ';
    color: var(--accent-color);
}

.link-category-items {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.link-item {
    padding: 5px 10px;
    background: rgba(13, 148, 136, 0.08);
    border: 1px solid rgba(13, 148, 136, 0.2);
    border-radius: 2px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.75rem;
    transition: all 0.15s ease;
}

.link-item:hover {
    background: rgba(13, 148, 136, 0.15);
    border-color: var(--secondary-color);
    color: var(--secondary-color);
}

/* 页脚 */
.footer {
    padding: 48px 0 28px;
    border-top: 2px solid var(--border-color);
    margin-top: 48px;
    position: relative;
}

.footer::before {
    content: '⟨ ∪ ∩ Σ ∈ ⟩';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--accent-color);
    letter-spacing: 8px;
    opacity: 0.4;
    font-size: 0.8rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 32px;
    margin-bottom: 32px;
}

.footer-section h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 14px;
    color: var(--text-primary);
    font-family: 'Georgia', serif;
}

.footer-section h3::before {
    content: '→ ';
    color: var(--secondary-color);
}

.footer-section p,
.footer-section a {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.75;
    text-decoration: none;
    display: block;
    transition: color 0.2s ease;
}

.footer-section a:hover {
    color: var(--secondary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.85rem;
}

.footer-bottom::before {
    content: '⟨ NLP Research ⟩';
    display: block;
    margin-bottom: 10px;
    color: var(--accent-color);
    font-size: 0.75rem;
    letter-spacing: 4px;
}

/* 文章详情页样式 */
.article-header {
    padding: 120px 0 48px;
    text-align: center;
    background: linear-gradient(180deg, var(--background-color) 0%, var(--surface-color) 100%);
}

.article-header .category {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(13, 148, 136, 0.12);
    color: var(--secondary-color);
    border-radius: 2px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 20px;
    font-family: 'Courier New', monospace;
}

.article-header .category::before {
    content: '∈ ';
    color: var(--accent-color);
}

.article-header h1 {
    font-size: 2rem;
    font-weight: 700;
    max-width: 720px;
    margin: 0 auto 20px;
    line-height: 1.45;
    color: var(--text-primary);
    font-family: 'Georgia', serif;
}

.article-header h1::before {
    content: '⟨ ';
    color: var(--accent-color);
}

.article-header h1::after {
    content: ' ⟩';
    color: var(--accent-color);
}

.article-header .meta {
    display: flex;
    justify-content: center;
    gap: 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.article-header .meta span::before {
    content: 'Σ ';
    color: var(--accent-color);
}

.article-content {
    max-width: 760px;
    margin: 0 auto;
    padding: 0 24px 64px;
}

.article-content h2 {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 38px 0 16px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Georgia', serif;
}

.article-content h2::before {
    content: '→';
    color: var(--secondary-color);
    font-size: 0.85rem;
}

.article-content h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 28px 0 12px;
    color: var(--text-primary);
    font-family: 'Georgia', serif;
}

.article-content h3::before {
    content: 'λ ';
    color: var(--accent-color);
    font-size: 0.9rem;
}

.article-content p {
    margin-bottom: 16px;
    color: var(--text-secondary);
    line-height: 1.8;
}

.article-content ul,
.article-content ol {
    margin-bottom: 20px;
    padding-left: 20px;
    color: var(--text-secondary);
}

.article-content li {
    margin-bottom: 8px;
    line-height: 1.7;
}

.article-content li::marker {
    color: var(--secondary-color);
}

.article-content blockquote {
    border-left: 3px solid var(--secondary-color);
    padding: 12px 18px;
    margin: 20px 0;
    background: rgba(13, 148, 136, 0.08);
    border-radius: 0 2px 2px 0;
    color: var(--text-secondary);
    font-style: italic;
}

.article-content blockquote::before {
    content: '⟨';
    color: var(--accent-color);
    margin-right: 8px;
}

.article-content blockquote::after {
    content: '⟩';
    color: var(--accent-color);
    margin-left: 8px;
}

.article-content .tip-box {
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: 2px;
    padding: 16px;
    margin: 20px 0;
}

.article-content .tip-box h4 {
    color: var(--accent-color);
    font-size: 0.95rem;
    margin-bottom: 10px;
    font-family: 'Georgia', serif;
}

.article-content .tip-box h4::before {
    content: 'Σ ';
}

.article-content pre {
    background: #0a0f1a;
    border: 1px solid var(--border-color);
    border-radius: 2px;
    padding: 16px;
    margin: 20px 0;
    overflow-x: auto;
}

.article-content pre code {
    font-family: 'Courier New', 'Consolas', monospace;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.article-content code {
    background: rgba(13, 148, 136, 0.12);
    padding: 3px 8px;
    border-radius: 2px;
    font-family: 'Courier New', monospace;
    color: var(--secondary-color);
    font-size: 0.85rem;
}

/* 分类页面样式 */
.category-header {
    padding: 120px 0 48px;
    text-align: center;
    background: linear-gradient(180deg, var(--background-color) 0%, var(--surface-color) 100%);
}

.category-header h1 {
    font-size: 2.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
    font-family: 'Georgia', serif;
}

.category-header h1::before {
    content: '⟨ ';
    color: var(--accent-color);
}

.category-header h1::after {
    content: ' ⟩';
    color: var(--accent-color);
}

.category-header .description {
    color: var(--text-secondary);
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.75;
    font-style: italic;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 1.9rem;
    }

    .hero .subtitle {
        font-size: 1rem;
    }

    .nav-links {
        display: none;
    }

    .articles-grid {
        grid-template-columns: 1fr;
    }

    .article-header h1 {
        font-size: 1.5rem;
    }

    .article-header .meta {
        flex-direction: column;
        gap: 12px;
    }

    .links-grid {
        grid-template-columns: 1fr;
    }

    .categories-grid {
        flex-direction: column;
        align-items: center;
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--background-color);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* 选择文本样式 */
::selection {
    background: var(--secondary-color);
    color: var(--background-color);
}

/* 淡入动画 */
.fade-in {
    opacity: 0;
    transform: translateY(16px);
    animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}