/* 极简黑白博客样式 */

/* 基础重置与变量 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-font: 'Noto Serif SC', serif;
    --secondary-font: 'Inter', sans-serif;
    --handwriting-font: 'Great Vibes', cursive;
    --script-font: 'Dancing Script', cursive;
    --text-color: #2c2c2c;
    --light-text: #6b6b6b;
    --border-color: #e5e5e5;
    --bg-color: #ffffff;
    --hover-color: #f8f8f8;
    --max-width: 800px;
    --line-height: 1.8;
}

/* 基础排版 */
html {
    font-size: 16px;
    line-height: var(--line-height);
    overflow-y: scroll; /* 强制显示垂直滚动条 */
}

body {
    font-family: var(--primary-font);
    color: var(--text-color);
    background: var(--bg-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 容器 */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

/* 头部 */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

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

.site-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--secondary-font);
    width: 100%;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-color);
    font-size: 1rem;
    font-weight: 400;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.logo:hover {
    opacity: 0.7;
}

.site-logo {
    font-size: 1.5rem;
    font-weight: 500;
    font-family: var(--serif-font);
    letter-spacing: 0.02em;
}

.logo svg {
    width: 20px;
    height: 20px;
}

.site-nav a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 400;
    transition: opacity 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.site-nav a:hover {
    opacity: 0.7;
}

.site-nav a svg {
    flex-shrink: 0;
}



/* 主内容 */
.main-content {
    flex: 1;
    padding-top: 6rem; /* 为固定header留出空间 */
    padding-bottom: 8rem; /* 为固定footer留出空间 */
}

/* Hero区域 */
.hero-section {
    padding: 4rem 0 6rem 0;
    margin-bottom: 4rem;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
}

.hero-text {
    flex: 1;
    max-width: 500px;
}

.hero-greeting {
    font-size: 3.5rem;
    font-weight: 400;
    margin-bottom: 2rem;
    line-height: 1.2;
    color: var(--text-color);
}

.hero-poem {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--light-text);
    max-width: 450px;
    font-family: var(--serif-font);
    letter-spacing: 0.02em;
}

.hero-poem p {
    margin: 0.8rem 0;
    font-style: italic;
    opacity: 0.9;
}

.hero-illustration {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.hero-illustration svg {
    max-width: 100%;
    height: auto;
}

.hero-illustration img {
    max-width: 350px;
    max-height: 260px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    opacity: 0.9;
}

.posts-section {
    margin-top: 4rem;
}

.articles-section {
    margin-top: 3rem;
}

.section-title {
    font-size: 1.8rem;
    font-weight: 400;
    margin-bottom: 2rem;
    color: var(--text-color);
    text-align: center;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 400;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.page-description {
    font-size: 1.1rem;
    color: var(--light-text);
    font-style: italic;
}

/* 导航激活状态 */
.nav-active {
    opacity: 0.8;
    font-weight: 500;
}

/* 文章预览 */
.post-preview {
    padding: 2rem 0;
    transition: background-color 0.3s ease;
}

.post-preview:hover {
    background-color: var(--hover-color);
    margin: 0 -2rem;
    padding-left: 2rem;
    padding-right: 2rem;
}



/* 列表页样式 */
.post-preview .post-header {
    display: flex;
    align-items: baseline;
    margin-bottom: 0.5rem;
    gap: 1.5rem;
}

.post-preview h2 {
    font-size: 1.4rem;
    font-weight: 400;
    margin: 0;
    line-height: 1.4;
    flex: 1;
}

.post-preview h2 a {
    color: var(--text-color);
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.post-preview h2 a:hover {
    opacity: 0.7;
}

.post-author {
    color: var(--light-text);
    font-size: 0.9rem;
    font-family: var(--secondary-font);
    font-weight: 300;
    opacity: 0.8;
    flex-shrink: 0;
}

/* 列表页的日期样式 */
.post-preview .post-date {
    color: var(--light-text);
    font-size: 1.1rem;
    font-family: var(--handwriting-font);
    font-weight: 400;
    letter-spacing: 0.02em;
    opacity: 0.85;
    transform: rotate(-1.5deg);
    transition: all 0.3s ease;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
    flex-shrink: 0;
}

.post-preview:hover .post-date {
    opacity: 1;
    transform: rotate(-0.5deg) scale(1.05);
}

.post-preview .excerpt {
    color: var(--light-text);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 1rem 0 0 0;
    padding: 0;
}

/* 文章详情页 */
.post {
    max-width: 100%;
}

/* 详情页样式 */
article.post .post-header {
    text-align: center;
    padding-bottom: 2rem;
    margin-bottom: 1rem;
    margin-top: 6rem;
}

.post-meta-center {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-top: 1rem;
}

.post-title {
    font-size: 2rem;
    font-weight: 400;
    line-height: 1.3;
    margin-bottom: 1rem;
    letter-spacing: 0.02em;
}

/* 详情页的日期样式 */
article.post .post-date {
    color: var(--light-text);
    font-size: 0.9rem;
    font-family: var(--script-font);
    font-weight: 500;
    letter-spacing: 0.02em;
    opacity: 0.9;
    transform: rotate(-1deg);
    display: inline-block;
    text-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.post-content {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 3rem;
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
    font-weight: 500;
    line-height: 1.4;
    margin: 2rem 0 1rem 0;
    color: var(--text-color);
}

.post-content h1 { font-size: 1.8rem; }
.post-content h2 { font-size: 1.5rem; }
.post-content h3 { font-size: 1.3rem; }
.post-content h4 { font-size: 1.1rem; }

.post-content p {
    margin-bottom: 1.5rem;
}

.post-content ul,
.post-content ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.post-content li {
    margin-bottom: 0.5rem;
}

.post-content blockquote {
    border-left: 3px solid var(--border-color);
    padding-left: 1.5rem;
    margin: 2rem 0;
    color: var(--light-text);
    font-style: italic;
}

.post-content code {
    background: #f5f5f5;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 0.9em;
}

.post-content pre {
    background: #f8f8f8;
    padding: 1.5rem;
    border-radius: 5px;
    overflow-x: auto;
    margin: 2rem 0;
    border: 1px solid var(--border-color);
}

.post-content pre code {
    background: none;
    padding: 0;
}

.post-content img {
    max-width: 100%;
    height: auto;
    margin: 2rem 0;
    border-radius: 5px;
}

.post-content a {
    color: var(--text-color);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    transition: opacity 0.3s ease;
}

.post-content a:hover {
    opacity: 0.7;
}

/* 文章底部 */
.post-footer {
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.back-link {
    color: var(--light-text);
    text-decoration: none;
    font-family: var(--secondary-font);
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

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

/* 页脚 */
.site-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-color);
    border-top: 1px solid var(--border-color);
    padding: 1.5rem 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.site-footer p {
    text-align: center;
    color: var(--light-text);
    font-size: 0.85rem;
    font-family: var(--secondary-font);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 0 1.5rem;
    }
    
    .site-header .container {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .site-nav {
        justify-content: space-between;
        width: 100%;
    }
    
    .nav-links {
        gap: 1rem;
    }
    
    .hero-content {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }
    
    .hero-greeting {
        font-size: 2.5rem;
    }
    
    .hero-illustration svg {
        width: 300px;
        height: 225px;
    }
    
    .post-title {
        font-size: 1.6rem;
    }
    
    .post-content {
        font-size: 1rem;
    }
    
    .post-header {
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .post-preview h2 {
        flex-basis: 100%;
        margin-bottom: 0.5rem;
    }
    
    .post-preview:hover {
        margin: 0 -1.5rem;
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 14px;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .site-header .container {
        gap: 1rem;
    }
    
    .site-nav {
        justify-content: space-between;
        width: 100%;
    }
    
    .nav-links {
        gap: 1rem;
    }
    
    .hero-greeting {
        font-size: 2rem;
    }
    
    .hero-illustration svg {
        width: 250px;
        height: 188px;
    }
    

    
    .post-header {
        gap: 0.8rem;
    }
    
    .post-date {
        font-size: 1rem;
    }
    
    .post-preview:hover {
        margin: 0 -1rem;
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* 优雅的选择效果 */
::selection {
    background: rgba(44, 44, 44, 0.1);
}

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
}

/* 焦点样式 */
a:focus,
button:focus {
    outline: 2px solid rgba(44, 44, 44, 0.3);
    outline-offset: 2px;
}