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

body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    transition: color 0.3s;
}

/* 夜间模式样式 */
body.dark-mode {
    color: #dfe6e9;
}

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

/* 英雄区 */
.hero {
    padding: 80px 0 60px;
    text-align: center;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: #000000;
    transition: color 0.3s;
}

.typing-container { display: flex; justify-content: center; }
.typing-text {
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.1rem;
    color: #000000;
    white-space: nowrap;
    overflow: hidden;
    width: 0;
    animation: typing 3s steps(40, end) forwards;
    transition: color 0.3s;
}

@keyframes typing { from { width: 0; } to { width: 40ch; } }

/* 呼吸跳动动画 */
@keyframes breathe {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0.33px 0 rgba(0, 0, 0, 0.09),
                    0 0 0 0.25px rgba(0, 0, 0, 0.16),
                    0 2px 8px rgba(0, 0, 0, 0.03),
                    0 8px 50px rgba(0, 0, 0, 0.08),
                    0 1px 3px rgba(0, 0, 0, 0.04),
                    inset 0 0.5px 0 rgba(255, 255, 255, 0.9);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 0.33px 0 rgba(0, 0, 0, 0.09),
                    0 0 0 0.25px rgba(0, 0, 0, 0.16),
                    0 4px 12px rgba(0, 0, 0, 0.05),
                    0 12px 60px rgba(0, 0, 0, 0.12),
                    0 2px 6px rgba(0, 0, 0, 0.06),
                    inset 0 0.5px 0 rgba(255, 255, 255, 0.95);
    }
}

/* 夜间模式呼吸跳动 */
@keyframes breatheDark {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0.33px 0 rgba(255, 255, 255, 0.06),
                    0 0 0 0.25px rgba(255, 255, 255, 0.12),
                    0 2px 8px rgba(0, 0, 0, 0.08),
                    0 8px 50px rgba(0, 0, 0, 0.35),
                    0 1px 3px rgba(0, 0, 0, 0.15),
                    inset 0 0.5px 0 rgba(255, 255, 255, 0.08);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 0.33px 0 rgba(255, 255, 255, 0.06),
                    0 0 0 0.25px rgba(255, 255, 255, 0.12),
                    0 4px 12px rgba(0, 0, 0, 0.12),
                    0 12px 60px rgba(0, 0, 0, 0.45),
                    0 2px 6px rgba(0, 0, 0, 0.2),
                    inset 0 0.5px 0 rgba(255, 255, 255, 0.12);
    }
}

/* 通用呼吸跳动类 - 适用于所有内容卡片 */
.breathe-animation {
    animation: breathe 4s ease-in-out infinite;
}

/* 夜间模式呼吸跳动 */
body.dark-mode .breathe-animation, html.dark-mode .breathe-animation {
    animation: breatheDark 4s ease-in-out infinite;
}

/* 文章列表 */
.post-list {
    margin-bottom: 50px;
}

.post-card {
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.75) 0%,
        rgba(255, 255, 255, 0.62) 100%
    );
    backdrop-filter: blur(50px) saturate(190%) contrast(1.05);
    -webkit-backdrop-filter: blur(50px) saturate(190%) contrast(1.05);
    box-shadow: 0 0.33px 0 rgba(0, 0, 0, 0.09),
                0 0 0 0.25px rgba(0, 0, 0, 0.16),
                0 2px 8px rgba(0, 0, 0, 0.03),
                0 8px 50px rgba(0, 0, 0, 0.08),
                0 1px 3px rgba(0, 0, 0, 0.04),
                inset 0 0.5px 0 rgba(255, 255, 255, 0.9);
    border: 0.5px solid rgba(0, 0, 0, 0.06);
    padding: 30px;
    border-radius: 24px;
    margin-bottom: 30px;
    transition: transform 0.6s cubic-bezier(0.25, 0.1, 0.25, 1),
                background 0.6s cubic-bezier(0.25, 0.1, 0.25, 1),
                box-shadow 0.6s cubic-bezier(0.25, 0.1, 0.25, 1),
                border-color 0.6s cubic-bezier(0.25, 0.1, 0.25, 1);
    will-change: transform, box-shadow;
    transform-style: preserve-3d;
    backface-visibility: hidden;
}

.post-card:hover {
    transform: translateY(-6px) translateZ(0);
    box-shadow: 0 0.33px 0 rgba(0, 0, 0, 0.09),
                0 0 0 0.25px rgba(0, 0, 0, 0.16),
                0 2px 8px rgba(0, 0, 0, 0.03),
                0 12px 60px rgba(0, 0, 0, 0.12),
                0 3px 6px rgba(0, 0, 0, 0.05),
                inset 0 0.5px 0 rgba(255, 255, 255, 0.95);
}

/* 夜间模式文章卡片 */
body.dark-mode .post-card, html.dark-mode .post-card {
    background: linear-gradient(
        180deg,
        rgba(28, 28, 28, 0.75) 0%,
        rgba(18, 18, 18, 0.62) 100%
    );
    box-shadow: 0 0.33px 0 rgba(255, 255, 255, 0.07),
                0 0 0 0.25px rgba(255, 255, 255, 0.12),
                0 2px 8px rgba(0, 0, 0, 0.08),
                0 8px 50px rgba(0, 0, 0, 0.35),
                0 1px 3px rgba(0, 0, 0, 0.15),
                inset 0 0.5px 0 rgba(255, 255, 255, 0.08);
    border: 0.5px solid rgba(255, 255, 255, 0.08);
}

.post-meta {
    font-size: 0.9rem;
    color: #b2bec3;
    margin-bottom: 10px;
}

.post-title {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #2d3436;
    display: block;
    text-decoration: none;
    transition: color 0.3s;
}

.post-title:hover {
    color: #0984e3;
}

.post-excerpt {
    color: #636e72;
    margin-bottom: 20px;
    transition: color 0.3s;
}

.read-more {
    color: #0984e3;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

/* 页脚 */
footer {
    text-align: center;
    padding: 40px 0;
    color: #b2bec3;
    border-top: 1px solid #eee;
    transition: border-top 0.3s, color 0.3s;
}

footer a {
    color: #b2bec3;
    text-decoration: none;
}

/* 夜间模式文本样式 */
body.dark-mode .hero h1 {
    color: #ffffff;
}

body.dark-mode .typing-text {
    color: #ffffff;
}

body.dark-mode .post-title {
    color: #dfe6e9;
}

body.dark-mode .post-title:hover {
    color: #74b9ff;
}

body.dark-mode .post-excerpt {
    color: #b2bec3;
}

body.dark-mode .read-more {
    color: #74b9ff;
}

body.dark-mode footer {
    color: #636e72;
    border-top: 1px solid #2d3436;
}

body.dark-mode footer a {
    color: #636e72;
}

/* 响应式适配 */
@media (max-width: 600px) {
    .hero h1 { font-size: 2rem; }
    .post-card { padding: 20px; }
}