/* ========================================
   变量 & 重置
   ======================================== */
:root {
    /* Light Theme (默认) */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-sidebar: #f1f3f5;
    --text-primary: #1a1a2e;
    --text-secondary: #6c757d;
    --text-muted: #adb5bd;
    --accent: #6366f1;
    --accent-light: #818cf8;
    --accent-glow: rgba(99, 102, 241, 0.3);
    --border: #e9ecef;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.12);
    
    --sidebar-width: 260px;
    --content-max-width: 900px;
    --radius: 16px;
    --radius-sm: 8px;
    
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    --font-display: 'Space Grotesk', sans-serif;
    
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Dark Theme */
[data-theme="dark"] {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-sidebar: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent: #818cf8;
    --accent-light: #a5b4fc;
    --accent-glow: rgba(129, 140, 248, 0.3);
    --border: #334155;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.4);
}

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
}

/* ========================================
   滚动条
   ======================================== */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}
::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* ========================================
   滚动进度条
   ======================================== */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
    width: 0%;
    z-index: 1000;
    transition: width 0.1s linear;
}

/* ========================================
   背景装饰
   ======================================== */
.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(99, 102, 241, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 102, 241, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: -1;
}

[data-theme="dark"] .bg-grid {
    background-image: 
        linear-gradient(rgba(99, 102, 241, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 102, 241, 0.05) 1px, transparent 1px);
}

.bg-glow {
    position: fixed;
    top: -50%;
    right: -30%;
    width: 80%;
    height: 80%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.08) 0%, transparent 60%);
    pointer-events: none;
    z-index: -1;
    animation: glow-pulse 8s ease-in-out infinite;
}

[data-theme="dark"] .bg-glow {
    background: radial-gradient(circle, rgba(129, 140, 248, 0.1) 0%, transparent 60%);
}

@keyframes glow-pulse {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.1); }
}

/* ========================================
   布局
   ======================================== */
.layout {
    display: flex;
    min-height: 100vh;
}

/* ========================================
   侧边栏
   ======================================== */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    overflow-y: auto;
    z-index: 100;
}

/* 汉堡菜单按钮 */
.sidebar-toggle {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 200;
    width: 44px;
    height: 44px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: all 0.3s var(--ease-out);
    box-shadow: var(--shadow-sm);
}

.sidebar-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s var(--ease-out);
}

.sidebar-toggle:hover {
    background: var(--accent);
    border-color: var(--accent);
}

.sidebar-toggle:hover span {
    background: white;
}

.sidebar-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.sidebar-toggle.active span:nth-child(2) {
    opacity: 0;
}

.sidebar-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* 侧边栏关闭按钮 */
.sidebar-close {
    display: none;
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 32px;
    height: 32px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 50%;
    font-size: 1.1rem;
    line-height: 1;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s var(--ease-out);
    justify-content: center;
    align-items: center;
    padding: 0;
}

.sidebar-close:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.sidebar-inner {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.logo {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 3rem;
    letter-spacing: -0.02em;
}

.logo-text {
    color: var(--text-primary);
}

.logo-accent {
    color: var(--accent);
    animation: logo-blink 2s ease-in-out infinite;
}

@keyframes logo-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* 导航 */
.nav {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: auto;
}

.nav-item {
    position: relative;
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: all 0.3s var(--ease-out);
    overflow: hidden;
}

.nav-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 100%;
    background: var(--accent);
    transform: scaleY(0);
    transition: transform 0.3s var(--ease-out);
}

.nav-item:hover {
    color: var(--text-primary);
    background: rgba(99, 102, 241, 0.08);
}

.nav-item.active {
    color: var(--accent);
    background: rgba(99, 102, 241, 0.1);
}

.nav-item.active::before {
    transform: scaleY(1);
}

.nav-text {
    position: relative;
    z-index: 1;
}

.nav-line {
    position: absolute;
    bottom: 0.5rem;
    left: 1rem;
    right: 1rem;
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s var(--ease-out);
}

.nav-item:hover .nav-line {
    transform: scaleX(1);
}

/* 标签 */
.sidebar-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.sidebar-search {
    margin-top: 1rem;
    padding-top: 1rem;
}

.search-form {
    display: flex;
    gap: 0.35rem;
    align-items: center;
}

.sidebar-search-input {
    flex: 1;
    min-width: 0;
    padding: 0.5rem 0.6rem;
    font-size: 0.8rem;
    font-family: inherit;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: all 0.3s var(--ease-out);
}

.sidebar-search-input::placeholder {
    color: var(--text-muted);
}

.sidebar-search-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.sidebar-search-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    font-size: 0.9rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s var(--ease-out);
    flex-shrink: 0;
}

.sidebar-search-btn:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.tag {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 20px;
    transition: all 0.3s var(--ease-out);
}

.tag:hover {
    background: var(--accent);
    color: white;
    transform: translateY(-2px);
}

/* 页脚 */
.sidebar-footer {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    color: var(--text-secondary);
    background: var(--bg-primary);
    border-radius: 50%;
    transition: all 0.3s var(--ease-out);
    text-decoration: none;
}

.social-link:hover {
    color: var(--accent);
    background: rgba(99, 102, 241, 0.1);
    transform: translateY(-3px);
}

.rss-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    color: var(--text-secondary);
    background: var(--bg-primary);
    border-radius: 50%;
    transition: all 0.3s var(--ease-out);
    text-decoration: none;
    font-size: 1rem;
}

.rss-link:hover {
    color: var(--accent);
    background: rgba(99, 102, 241, 0.1);
    transform: translateY(-3px);
}

/* 主题切换按钮 */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    color: var(--text-secondary);
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s var(--ease-out);
}

.theme-toggle:hover {
    color: var(--accent);
    background: rgba(99, 102, 241, 0.1);
    transform: translateY(-3px);
}

.theme-toggle .icon-moon {
    display: none;
}

[data-theme="dark"] .theme-toggle .icon-sun {
    display: none;
}

[data-theme="dark"] .theme-toggle .icon-moon {
    display: block;
}

/* ========================================
   主内容区
   ======================================== */
.main {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 2rem 4rem;
    min-height: 100vh;
    width: 100%;
}

/* ========================================
   Hero 区域
   ======================================== */

/* ===== 横幅边缘柔和过度 ===== */
.hero-banner {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 0;
}
.hero-banner img {
    width: 100%;
    height: auto;
    display: block;
}
/* 底部向上渐变淡出，和下方的背景融合 */
.hero-banner::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 55%;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(var(--bg-primary-rgb, 15, 15, 25), 0.5) 60%,
        rgba(var(--bg-primary-rgb, 15, 15, 25), 0.92) 100%
    );
    pointer-events: none;
}
.hero-banner-caption {
    position: absolute;
    bottom: 0.75rem; left: 0; right: 0;
    text-align: center;
    font-size: 0.72rem;
    color: rgba(255,255,255,0.55);
    z-index: 1;
    letter-spacing: 0.03em;
}

.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    min-height: calc(100vh - 6rem);
    padding: 2rem 0;
}

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

.hero-visual {
    position: relative;
    height: calc(100vh - 8rem);
    min-height: 500px;
    max-height: 700px;
}

/* 主代码窗口 */
.code-window-main {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: #1e1e2e;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: float-main 6s ease-in-out infinite;
}

@keyframes float-main {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(0.3deg); }
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 20px;
    margin-bottom: 1.5rem;
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    animation: dot-pulse 2s ease-in-out infinite;
}

@keyframes dot-pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
    50% { opacity: 0.8; box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
}

.hero-title {
    font-family: var(--font-display);
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.gradient-text {
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    overflow: hidden;
}

/* 打字机外层固定高度，防止文字清空时布局颤动 */
.typewriter-wrap {
    display: inline-block;
    min-width: 14ch;   /* 最长文字 "LLM 智能体开发" 约14字符 */
    height: 2rem;
    line-height: 2rem;
    vertical-align: bottom;
}

.typewriter {
    display: inline-block;
    overflow: hidden;
    border-right: 2px solid var(--accent);
    white-space: nowrap;
    animation: typing 3s steps(20) infinite, blink 0.8s step-end infinite;
}

@keyframes typing {
    0%, 100% { width: 0; }
    50%, 90% { width: 100%; }
}

@keyframes blink {
    50% { border-color: transparent; }
}

/* 数字统计 */
.hero-stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    padding: 1.5rem 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* 按钮 */
.hero-cta {
    display: flex;
    gap: 1rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: all 0.3s var(--ease-out);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--accent);
    color: white;
    box-shadow: 0 4px 15px var(--accent-glow);
}

.btn-primary:hover {
    background: var(--accent-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--accent-glow);
}

.btn-primary svg {
    transition: transform 0.3s var(--ease-out);
}

.btn-primary:hover svg {
    transform: translateX(4px);
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--border);
    transform: translateY(-2px);
}

.code-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: #181825;
}

.code-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.code-dot.red { background: #f38ba8; }
.code-dot.yellow { background: #f9e2af; }
.code-dot.green { background: #a6e3a1; }

.code-title {
    color: #6c7086;
    font-size: 0.75rem;
    font-family: var(--font-mono);
}

.code-tabs {
    display: flex;
    gap: 0.25rem;
    margin-left: auto;
}

.code-tab {
    padding: 0.25rem 0.75rem;
    background: transparent;
    color: #6c7086;
    font-size: 0.7rem;
    font-family: var(--font-mono);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.code-tab.active {
    background: rgba(99, 102, 241, 0.3);
    color: #cdd6f4;
}

.code-body {
    padding: 1.25rem 1.5rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    line-height: 1.7;
    color: #cdd6f4;
    overflow-x: auto;
    overflow-y: auto;
}

.code-line {
    display: flex;
    width: 100%;
    white-space: pre;
    line-height: 1.7;
}

.line-num {
    width: 50px;
    flex-shrink: 0;
    color: #585b70;
    user-select: none;
    text-align: right;
    padding-right: 12px;
    border-right: 1px solid #313244;
}

/* 缩进：加在 code-content 上，行号固定在左侧，行号右侧有一条竖线分隔 */
.code-line[data-indent="1"] .code-content { margin-left: 40px; }
.code-line[data-indent="2"] .code-content { margin-left: 80px; }
.code-line[data-indent="3"] .code-content { margin-left: 120px; }
.code-line[data-indent="4"] .code-content { margin-left: 160px; }

.code-content {
    white-space: pre;
    overflow-x: auto;
}

.is-empty {
    height: 1.7em;
}

.code-keyword { color: #cba6f7; }
.code-var { color: #f5c2e7; }
.code-prop { color: #89dceb; }
.code-string { color: #a6e3a1; }
.code-fn { color: #f9e2af; }
.code-tag { color: #89b4fa; }
.code-comment { color: #6c7086; font-style: italic; }
.code-deco { color: #f38ba8; }
.code-num { color: #fab387; }

.code-footer {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 1rem;
    background: #181825;
    border-top: 1px solid #313244;
}

.code-lang {
    color: #6c7086;
    font-size: 0.7rem;
    font-family: var(--font-mono);
}

.code-lines {
    color: #6c7086;
    font-size: 0.7rem;
}

/* ========================================
   通用区块
   ======================================== */
.section {
    padding: 5rem 0;
    border-top: 1px solid var(--border);
}

.section:first-of-type {
    border-top: none;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2.5rem;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
}

.section-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent);
    border-radius: var(--radius-sm);
}

.section-more {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s var(--ease-out);
}

.section-more:hover {
    gap: 0.75rem;
}

.section-more svg {
    transition: transform 0.3s var(--ease-out);
}

.section-more:hover svg {
    transform: translateX(4px);
}

/* ========================================
   博客卡片
   ======================================== */
.blog-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.blog-card {
    position: relative;
    display: block;
    padding: 1.5rem;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    color: inherit;
    transition: all 0.3s var(--ease-out);
    -webkit-tap-highlight-color: transparent;
}

.blog-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.blog-card:active {
    transform: translateY(0);
}

.blog-card:hover .blog-title a {
    color: var(--accent);
}

/* 卡片点击反馈动效 */
.blog-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at var(--click-x, 50%) var(--click-y, 50%), 
                rgba(99, 102, 241, 0.1) 0%, 
                transparent 60%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.blog-card.clicked::after {
    opacity: 1;
}

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

.blog-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), transparent);
    opacity: 0;
    transition: opacity 0.3s var(--ease-out);
    pointer-events: none;
    z-index: 0;
}

.blog-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.75rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.blog-date::before {
    content: '📅 ';
}

.blog-read::before {
    content: '⏱️ ';
}

.blog-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.blog-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s;
}

.blog-card:hover .blog-title a {
    color: var(--accent);
}

.blog-excerpt {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.blog-tags {
    display: flex;
    gap: 0.5rem;
}

.blog-tag {
    padding: 0.25rem 0.75rem;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 0.75rem;
    border-radius: 20px;
    transition: all 0.3s var(--ease-out);
}

.blog-card:hover .blog-tag {
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent);
}

.blog-arrow {
    position: absolute;
    right: 1.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--accent);
    opacity: 0;
    transition: all 0.4s var(--ease-out);
}

.blog-card:hover .blog-arrow {
    opacity: 1;
    transform: translateY(-50%) translateX(5px);
}

/* ========================================
   深度好文
   ======================================== */
.deep-dives {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.deep-dive-card {
    display: block;
    text-decoration: none;
    color: inherit;
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    transition: all 0.4s var(--ease-out);
}

.deep-dive-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: var(--accent);
}

.deep-dive-image {
    position: relative;
    height: 160px;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
}

.deep-dive-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 50%, rgba(0,0,0,0.5));
    pointer-events: none;
}

.deep-dive-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease-out);
}

.deep-dive-card:hover .deep-dive-image img {
    transform: scale(1.1);
}

.deep-dive-content {
    padding: 1.25rem;
}

.deep-dive-category {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background: var(--accent);
    color: white;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 4px;
    margin-bottom: 0.75rem;
}

.deep-dive-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.deep-dive-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ========================================
   项目卡片
   ======================================== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

/* 精选项目卡片 */
.featured-projects {
    margin-bottom: 4rem;
}

.featured-card {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 0;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all 0.4s var(--ease-out);
    margin-bottom: 1.5rem;
}

.featured-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-hover);
}

.featured-image {
    height: 100%;
    min-height: 220px;
    overflow: hidden;
}

.featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease-out);
}

.featured-card:hover .featured-image img {
    transform: scale(1.05);
}

.featured-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.featured-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
    gap: 1rem;
}

.featured-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
}

.featured-stats {
    display: flex;
    gap: 1rem;
    flex-shrink: 0;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: #f59e0b;
    font-size: 0.85rem;
    font-weight: 600;
}

.featured-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.featured-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1rem;
}

.featured-links {
    display: flex;
    gap: 0.75rem;
}

.featured-links .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.85rem;
    transition: all 0.3s var(--ease-out);
}

.project-card {
    display: block;
    padding: 1.5rem;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all 0.4s var(--ease-out);
    text-decoration: none;
    color: inherit;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.15);
    border-color: var(--accent);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.project-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent);
    border-radius: var(--radius-sm);
    transition: all 0.3s var(--ease-out);
}

.project-card:hover .project-icon {
    background: var(--accent);
    color: white;
    transform: rotate(5deg) scale(1.05);
}

.project-stars {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    color: #f59e0b;
    font-size: 0.85rem;
    font-weight: 600;
}

.project-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.project-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 1rem;
}

.project-footer {
    display: flex;
    gap: 0.5rem;
}

.project-lang {
    padding: 0.25rem 0.5rem;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 0.7rem;
    font-weight: 500;
    border-radius: 4px;
}


/* GitHub 项目卡片 */
.gh-card {
    display: block;
    padding: 1.25rem 1.5rem;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    color: inherit;
    transition: all 0.35s var(--ease-out);
    cursor: pointer;
}
.gh-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.15);
}
.gh-card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}
.gh-repo-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    font-family: var(--font-mono);
}
.gh-desc {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}
.gh-meta {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}
.gh-stars {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.75rem;
    color: #f59e0b;
    font-weight: 600;
}
.gh-lang {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
}
.gh-lang.python { background: rgba(55, 118, 171, 0.15); color: #3572A5; }
.gh-lang.go { background: rgba(0, 168, 225, 0.15); color: #00ADD8; }
.gh-lang.javascript { background: rgba(247, 223, 30, 0.15); color: #f6df1e; }
.gh-lang.typescript { background: rgba(49, 120, 198, 0.15); color: #3178c6; }
.gh-lang.rust { background: rgba(226, 97, 37, 0.15); color: #dea584; }
.gh-tag {
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
    background: rgba(99, 102, 241, 0.12);
    color: var(--accent);
    border-radius: 10px;
    font-weight: 500;
}


/* ========================================
   订阅按钮 & 弹窗
   ======================================== */
.subscribe-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s var(--ease-out);
}
.subscribe-btn:hover {
    color: var(--accent);
    background: rgba(99, 102, 241, 0.1);
    transform: translateY(-3px);
}

.subscribe-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.subscribe-modal.active {
    display: flex;
}
.subscribe-modal-content {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px 32px;
    max-width: 380px;
    width: 100%;
    text-align: center;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: modal-in 0.25s var(--ease-out);
}
@keyframes modal-in {
    from { opacity: 0; transform: scale(0.92) translateY(10px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}
.subscribe-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--bg-secondary);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s;
}
.subscribe-modal-close:hover {
    background: var(--border);
    color: var(--text);
}
.subscribe-modal-icon {
    font-size: 48px;
    margin-bottom: 12px;
}
.subscribe-modal-title {
    font-size: 1.3rem;
    font-weight: 700;
    font-family: var(--font-display);
    margin-bottom: 8px;
    color: var(--text);
}
.subscribe-modal-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.5;
}
#sidebarSubscribeForm {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
#sidebarSubscribeForm input {
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    color: var(--text);
    font-size: 14px;
    transition: border-color 0.2s;
}
#sidebarSubscribeForm input:focus {
    outline: none;
    border-color: var(--accent);
}
.btn-subscribe-modal {
    padding: 12px 20px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-subscribe-modal:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}
#sidebarSubscribeMsg {
    font-size: 13px;
    margin-top: 12px;
    min-height: 18px;
}


/* ========================================
   关于我
   ======================================== */
.about-content {
    max-width: 680px;
}

.about-content p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    line-height: 1.8;
}

.highlight {
    color: var(--accent);
    font-weight: 500;
    padding: 0 0.25rem;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 4px;
}

/* 技能条 */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem 3rem;
    margin-top: 2.5rem;
    max-width: 680px;
}

.skill-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.skill-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
}

.skill-bar {
    height: 6px;
    background: var(--bg-secondary);
    border-radius: 3px;
    overflow: hidden;
}

.skill-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
    border-radius: 3px;
    width: 0;
    transition: width 1.5s var(--ease-out);
}

/* ========================================
   页脚
   ======================================== */


/* ===== About 页面 ===== */
.about-intro {
    display: flex;
    gap: 2.5rem;
    align-items: flex-start;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    margin-bottom: 2.5rem;
    position: relative;
    overflow: hidden;
}
.about-intro::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), #8b5cf6, var(--accent));
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.about-avatar {
    flex-shrink: 0;
    width: 96px;
    height: 96px;
    background: linear-gradient(135deg, var(--accent), #8b5cf6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.35);
}
.about-avatar svg { width: 48px; height: 48px; }
.about-text { flex: 1; min-width: 0; }
.about-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
    color: var(--text);
}
.about-tagline {
    font-size: 0.9rem;
    color: var(--accent);
    font-weight: 500;
    margin-bottom: 1rem;
}
.about-bio p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.75;
    margin-bottom: 0.6rem;
}
.about-bio .highlight {
    color: var(--accent);
    font-weight: 600;
    background: rgba(99, 102, 241, 0.1);
    padding: 0.1em 0.4em;
    border-radius: 4px;
}
.about-links { display: flex; gap: 0.75rem; margin-top: 1.25rem; flex-wrap: wrap; }

/* 技能 */
.skills-section { margin-bottom: 2.5rem; }
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}
.skill-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.skill-item:hover {
    border-color: var(--accent);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.12);
}
.skill-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.6rem;
}
.skill-name { font-size: 0.85rem; font-weight: 600; color: var(--text); }
.skill-percent { font-size: 0.8rem; color: var(--accent); font-weight: 600; }
.skill-bar {
    height: 6px;
    background: var(--bg-primary);
    border-radius: 3px;
    overflow: hidden;
}
.skill-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), #8b5cf6);
    border-radius: 3px;
    width: 0;
    transition: width 1s ease;
}

/* 时间线 */
.timeline-section { margin-bottom: 2.5rem; }
.timeline {
    position: relative;
    padding-left: 2rem;
}
.timeline::before {
    content: '';
    position: absolute;
    left: 0.45rem;
    top: 0.5rem;
    bottom: 0.5rem;
    width: 2px;
    background: linear-gradient(180deg, var(--accent), #8b5cf6, transparent);
    border-radius: 1px;
}
.timeline-item {
    position: relative;
    margin-bottom: 1.75rem;
}
.timeline-item:last-child { margin-bottom: 0; }
.timeline-marker {
    position: absolute;
    left: -2rem;
    top: 0.45rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent);
    border: 2px solid var(--bg-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
}
.timeline-content { padding-left: 0.5rem; }
.timeline-date {
    font-size: 0.75rem;
    color: var(--accent);
    font-weight: 600;
    letter-spacing: 0.03em;
}
.timeline-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0.2rem 0 0.4rem;
    color: var(--text);
}
.timeline-desc {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.65;
}

/* 联系方式 */
.contact-section { margin-bottom: 2rem; }
.contact-form {
    max-width: 520px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-group label { font-size: 0.8rem; font-weight: 600; color: var(--text-secondary); }
.form-input {
    width: 100%;
    padding: 0.65rem 0.9rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 0.875rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}
.form-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}
.form-input::placeholder { color: var(--text-muted); }

/* ===== Section headings（复用） ===== */
.section-heading {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    color: var(--text);
}
.section-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px; height: 36px;
    background: linear-gradient(135deg, var(--accent), #8b5cf6);
    border-radius: var(--radius-sm);
    color: #fff;
    flex-shrink: 0;
}

.footer {
    padding: 3rem 0;
    border-top: 1px solid var(--border);
    margin-top: 3rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--accent);
}

/* ========================================
   动画 - 入场
   ======================================== */
[data-animate] {
    opacity: 0;
}

[data-animate="fade-in"] {
    animation: fadeIn 0.6s var(--ease-out) forwards;
}

[data-animate="fade-in-up"] {
    animation: fadeInUp 0.8s var(--ease-out) forwards;
}

[data-animate="fade-in-down"] {
    animation: fadeInDown 0.8s var(--ease-out) forwards;
}

[data-animate="slide-up"] {
    animation: slideUp 0.6s var(--ease-out) forwards;
}

[data-animate="slide-right"] {
    animation: slideRight 0.6s var(--ease-out) forwards;
}

[data-animate="scale-in"] {
    animation: scaleIn 0.6s var(--ease-spring) forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideRight {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

/* 延迟 */
[data-delay="0"] { animation-delay: 0s; }
[data-delay="1"] { animation-delay: 0.1s; }
[data-delay="2"] { animation-delay: 0.2s; }
[data-delay="3"] { animation-delay: 0.3s; }
[data-delay="4"] { animation-delay: 0.4s; }
[data-delay="5"] { animation-delay: 0.5s; }
[data-delay="6"] { animation-delay: 0.6s; }

/* ========================================
   响应式
   ======================================== */
@media (max-width: 1200px) {
    .hero {
        grid-template-columns: 1fr;
        min-height: auto;
        gap: 3rem;
    }
    
    .hero-visual {
        order: 0;
        height: 400px;
    }
    
    .code-window {
        max-width: 500px;
    }
    
    .deep-dives,
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    .sidebar-toggle {
        display: flex;
    }

    .sidebar-close {
        display: flex;
    }

    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s var(--ease-out);
        z-index: 1000;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    /* 移动端遮罩层 */
    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 99;
        backdrop-filter: blur(4px);
    }
    .sidebar-overlay.active {
        display: block;
    }

    .main {
        margin-left: 0;
        padding: 1.5rem;
    }

    .hero-title {
        font-size: 2rem;
    }

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

    /* 文章详情页 */
    .article-title {
        font-size: 1.75rem;
    }
    
    .article-meta {
        flex-direction: column;
        gap: 0.75rem;
    }

    /* 目录侧边栏 */
    .toc-sidebar {
        display: none !important;
    }

    /* 博客列表 */
    .blog-card {
        padding: 1.25rem;
    }
    .blog-card .blog-arrow {
        display: none;
    }
}

@media (max-width: 600px) {
    :root {
        --radius: 12px;
        --radius-sm: 6px;
    }

    /* 布局 */
    .main {
        padding: 1rem;
    }

    /* Hero */
    .hero {
        padding: 1.5rem 0;
    }
    .hero-title {
        font-size: 1.75rem;
    }
    .hero-subtitle {
        font-size: 1rem;
    }
    .hero-badge {
        font-size: 0.75rem;
        padding: 0.4rem 0.8rem;
    }
    .hero-stats {
        flex-wrap: wrap;
        gap: 0.75rem;
    }
    .stat {
        flex: 1 1 calc(50% - 0.5rem);
        padding: 0.75rem;
    }
    .stat-number {
        font-size: 1.5rem;
    }
    
    .hero-cta {
        flex-direction: column;
        gap: 0.75rem;
    }
    .hero-cta .btn {
        width: 100%;
        justify-content: center;
    }
    
    .hero-visual {
        height: 240px;
        min-height: 240px;
        max-height: 240px;
        border-radius: var(--radius);
    }
    
    .code-window-main {
        position: relative;
        height: 100%;
        min-height: 240px;
        border-radius: var(--radius);
    }

    /* 网格布局 */
    .deep-dives,
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    /* Section */
    .section {
        margin-bottom: 2rem;
    }
    .section-title {
        font-size: 1.25rem;
    }
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    /* 博客卡片 */
    .blog-card {
        padding: 1rem;
        border-radius: var(--radius-sm);
    }
    .blog-title {
        font-size: 1rem;
    }
    .blog-excerpt {
        font-size: 0.85rem;
        -webkit-line-clamp: 2;
    }
    .blog-tags {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 0.5rem;
    }
    .blog-tag {
        flex-shrink: 0;
        font-size: 0.7rem;
    }

    /* 筛选栏 */
    .filter-bar {
        padding: 1rem;
    }
    .filter-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 0.5rem;
    }
    .filter-tab {
        flex-shrink: 0;
        font-size: 0.8rem;
        padding: 0.4rem 0.75rem;
    }

    /* 分页 */
    .pagination {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    /* 文章详情 */
    .back-link {
        font-size: 0.85rem;
        margin-bottom: 1.5rem;
    }
    .article-title {
        font-size: 1.5rem;
    }
    .article-body {
        font-size: 0.95rem;
    }
    .article-body h1 { font-size: 1.5rem; }
    .article-body h2 { font-size: 1.25rem; }
    .article-body h3 { font-size: 1.1rem; }

    /* 代码块 */
    pre[class*="language-"] {
        font-size: 0.8rem;
        border-radius: var(--radius-sm);
        margin: 1rem 0;
    }
    code[class*="language-"] {
        font-size: 0.8rem;
    }

    /* 分享区域 */
    .share-section {
        padding: 1rem;
    }

    /* 作者卡片 */
    .author-card {
        padding: 1.25rem;
        flex-direction: column;
        text-align: center;
    }

    /* 相关推荐 */
    .related-grid {
        grid-template-columns: 1fr;
    }

    /* 页脚 */
    .footer {
        padding: 2rem 0;
    }
    .footer-content {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    /* 订阅区域 */
    .subscribe-form {
        flex-direction: column;
    }
    .subscribe-form .subscribe-input,
    .subscribe-form .btn-subscribe {
        width: 100%;
    }

    /* 精选项目 */
    .featured-card {
        grid-template-columns: 1fr !important;
    }
    .featured-image {
        min-height: 160px !important;
    }
    .featured-content {
        padding: 1.25rem !important;
    }
    .featured-title {
        font-size: 1.25rem !important;
    }
    .featured-links {
        flex-direction: column;
    }
    .featured-links .btn {
        width: 100%;
        justify-content: center;
    }
}

/* 超小屏幕优化 */
@media (max-width: 380px) {
    .hero-title {
        font-size: 1.5rem;
    }
    .stat {
        flex: 1 1 100%;
    }
    .page-title {
        font-size: 1.75rem;
    }
}

/* ========================================
   订阅区域
   ======================================== */
.subscribe-section {
    padding: 64px 24px;
    text-align: center;
}
.subscribe-section .subscribe-title {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-primary);
}
.subscribe-section .subscribe-desc {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 28px;
    line-height: 1.6;
}
.subscribe-form {
    display: flex;
    gap: 10px;
    max-width: 440px;
    margin: 0 auto;
}
.subscribe-form .subscribe-input {
    flex: 1;
    padding: 12px 16px;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    font-size: 15px;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    font-family: var(--font-sans);
}
.subscribe-form .subscribe-input::placeholder {
    color: var(--text-muted);
}
.subscribe-form .subscribe-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}
.subscribe-form .btn-subscribe {
    padding: 12px 24px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s var(--ease-out);
    white-space: nowrap;
    font-family: var(--font-sans);
}
.subscribe-form .btn-subscribe:hover {
    background: var(--accent-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px var(--accent-glow);
}
.subscribe-form .btn-subscribe:active {
    transform: translateY(0);
}
.subscribe-msg {
    font-size: 13px;
    margin-top: 12px;
    min-height: 20px;
    transition: color 0.2s;
}
.subscribe-msg.success { color: #10b981; }
.subscribe-msg.error { color: #ef4444; }
