/* natata 博客样式 */

:root {
    --bg-primary: #fafafa;
    --bg-secondary: #ffffff;
    --text-primary: #333;
    --text-secondary: #666;
    --text-muted: #999;
    --accent: #2c3e50;
    --accent-hover: #34495e;
    --border: #e8e8e8;
    --shadow: 0 2px 8px rgba(0,0,0,0.06);
    --radius: 8px;
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --max-width: 960px;
}

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

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

/* Header */
.blog-header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

.blog-title {
    font-size: 1.3rem;
    font-weight: 600;
}

.blog-title a {
    color: var(--accent);
    text-decoration: none;
}

.blog-nav {
    display: flex;
    gap: 28px;
}

.blog-nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s;
}

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

/* Main */
.blog-main {
    flex: 1;
    padding: 40px 20px;
}

.blog-container {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 40px;
}

/* Post Card */
.post-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.post-card {
    background: var(--bg-secondary);
    border-radius: var(--radius);
    padding: 28px 32px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.post-title {
    font-size: 1.35rem;
    margin-bottom: 8px;
}

.post-title a {
    color: var(--text-primary);
    text-decoration: none;
}

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

.post-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.post-excerpt {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.8;
    margin-bottom: 16px;
}

.read-more {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
}

.read-more:hover {
    text-decoration: underline;
}

/* Sidebar */
.blog-sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.sidebar-card {
    background: var(--bg-secondary);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.sidebar-card h3 {
    font-size: 1rem;
    margin-bottom: 16px;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border);
    padding-bottom: 10px;
}

.avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.bio {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    background: #f0f0f0;
    color: var(--text-secondary);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: default;
}

.tag:hover {
    background: var(--accent);
    color: #fff;
}

.recent-list {
    list-style: none;
}

.recent-list li {
    margin-bottom: 10px;
}

.recent-list a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    line-height: 1.6;
}

.recent-list a:hover {
    color: var(--accent);
}

/* Footer */
.blog-footer {
    text-align: center;
    padding: 30px 20px;
    color: var(--text-muted);
    font-size: 0.85rem;
    border-top: 1px solid var(--border);
}

/* Article Page */
.article-page {
    background: var(--bg-secondary);
    border-radius: var(--radius);
    padding: 40px 48px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.article-header {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.article-header h1 {
    font-size: 1.8rem;
    margin-bottom: 12px;
    line-height: 1.4;
}

.article-body {
    font-size: 1rem;
    line-height: 1.9;
    color: var(--text-primary);
}

.article-body h2 {
    font-size: 1.4rem;
    margin: 32px 0 16px;
    color: var(--accent);
}

.article-body h3 {
    font-size: 1.15rem;
    margin: 24px 0 12px;
}

.article-body p {
    margin-bottom: 16px;
}

.article-body pre {
    background: #f5f5f5;
    padding: 16px 20px;
    border-radius: var(--radius);
    overflow-x: auto;
    font-size: 0.9rem;
    margin: 16px 0;
}

.article-body code {
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
}

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

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

/* About Page */
.about-section {
    margin-bottom: 32px;
}

.about-section h2 {
    font-size: 1.3rem;
    color: var(--accent);
    margin-bottom: 16px;
}

.about-section p {
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.skill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.skill-item {
    background: #f5f5f5;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Links Page */
.friend-link {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: #fafafa;
    border-radius: var(--radius);
    margin-bottom: 16px;
    border: 1px solid var(--border);
}

.friend-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    flex-shrink: 0;
}

.friend-info h4 {
    font-size: 1rem;
    margin-bottom: 4px;
}

.friend-info p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Responsive */
@media (max-width: 768px) {
    .blog-container {
        grid-template-columns: 1fr;
    }
    .blog-sidebar {
        order: -1;
    }
    .header-inner {
        flex-direction: column;
        height: auto;
        padding: 12px 0;
        gap: 10px;
    }
    .article-page {
        padding: 24px;
    }
}
