/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --color-bg: #fafafa;
    --color-text: #1a1a1a;
    --color-text-light: #666;
    --color-border: #e0e0e0;
    --color-accent: #000;
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: "SF Mono", Monaco, "Cascadia Code", "Roboto Mono", Consolas, "Courier New", monospace;
    --max-width: 680px;
}

html {
    font-size: 16px;
    line-height: 1.6;
}

body {
    font-family: var(--font-sans);
    color: var(--color-text);
    background-color: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Container */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 40px 20px;
}

/* Header */
.site-header {
    margin-bottom: 60px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--color-border);
}

.site-nav {
    display: flex;
    gap: 20px;
    font-size: 0.95rem;
}

.site-nav a {
    color: var(--color-text-light);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

/* Main Content */
.content {
    min-height: 60vh;
}

/* Post List */
.post-list {
    list-style: none;
}

.post-list-item {
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--color-border);
}

.post-list-item:last-child {
    border-bottom: none;
}

.post-list-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.post-list-title a {
    color: var(--color-text);
    text-decoration: none;
    transition: color 0.2s ease;
}

.post-list-title a:hover {
    color: var(--color-text-light);
}

.post-list-date {
    display: block;
    font-size: 0.875rem;
    color: var(--color-text-light);
    margin-bottom: 12px;
}

.post-list-excerpt {
    color: var(--color-text-light);
    line-height: 1.7;
}

/* Post */
.post {
    margin-bottom: 60px;
}

.post-header {
    margin-bottom: 40px;
}

.post-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.3;
}

.post-date {
    display: block;
    font-size: 0.875rem;
    color: var(--color-text-light);
}

.post-content {
    line-height: 1.8;
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
    margin-top: 40px;
    margin-bottom: 20px;
    font-weight: 600;
    line-height: 1.3;
}

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

.post-content p {
    margin-bottom: 20px;
}

.post-content a {
    color: var(--color-accent);
    text-decoration: none;
    border-bottom: 1px solid var(--color-border);
    transition: border-color 0.2s ease;
}

.post-content a:hover {
    border-bottom-color: var(--color-accent);
}

.post-content ul,
.post-content ol {
    margin-bottom: 20px;
    padding-left: 30px;
}

.post-content li {
    margin-bottom: 8px;
}

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

.post-content pre {
    margin: 30px 0;
    padding: 20px;
    background-color: #f5f5f5;
    border-radius: 4px;
    overflow-x: auto;
}

.post-content code {
    font-family: var(--font-mono);
    font-size: 0.875rem;
}

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

.post-content :not(pre) > code {
    background-color: #f5f5f5;
    padding: 2px 6px;
    border-radius: 3px;
}

.post-content img {
    max-width: 100%;
    height: auto;
    margin: 30px 0;
}

.post-content hr {
    margin: 40px 0;
    border: none;
    border-top: 1px solid var(--color-border);
}

/* Post Tags */
.post-tags {
    margin-top: 30px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tag {
    display: inline-block;
    padding: 4px 12px;
    background-color: #f5f5f5;
    color: var(--color-text-light);
    font-size: 0.875rem;
    border-radius: 3px;
}

/* Post Navigation */
.post-navigation {
    margin-top: 60px;
    padding-top: 30px;
    border-top: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.post-navigation a {
    color: var(--color-text-light);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

.post-navigation .prev {
    text-align: left;
}

.post-navigation .next {
    text-align: right;
}

/* Pagination */
.pagination {
    margin-top: 60px;
    padding-top: 30px;
    border-top: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.pagination a {
    color: var(--color-text);
    text-decoration: none;
    transition: color 0.2s ease;
}

.pagination a:hover {
    color: var(--color-text-light);
}

.pagination .disabled {
    color: var(--color-border);
    cursor: not-allowed;
}

.pagination-info {
    color: var(--color-text-light);
    font-size: 0.875rem;
}

/* Footer */
.site-footer {
    margin-top: 80px;
    padding-top: 30px;
    border-top: 1px solid var(--color-border);
    text-align: center;
    font-size: 0.875rem;
    color: var(--color-text-light);
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 30px 16px;
    }

    .site-header {
        margin-bottom: 40px;
    }

    .post-title {
        font-size: 1.75rem;
    }

    .post-navigation {
        flex-direction: column;
    }

    .post-navigation .next {
        text-align: left;
    }
}
