/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

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

/* Header */
.header {
    border-bottom: 1px solid #eee;
    margin-bottom: 2rem;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
    color: #333;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: #666;
    transition: color 0.2s;
}

.nav-link:hover {
    color: #333;
}

/* Home page */
.hero {
    text-align: center;
    margin: 3rem 0;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    color: #666;
}

/* Posts */
.recent-posts {
    margin: 3rem 0;
}

.recent-posts h2 {
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

.post-item {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
}

.post-header h2,
.post-header h3 {
    margin-bottom: 0.5rem;
}

.post-header h2 a,
.post-header h3 a {
    text-decoration: none;
    color: #333;
}

.post-header h2 a:hover,
.post-header h3 a:hover {
    color: #0066cc;
}

.post-meta {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.tags {
    display: inline-flex;
    gap: 0.5rem;
    margin-left: 1rem;
}

.tag {
    background: #f0f0f0;
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    text-decoration: none;
    color: #666;
    font-size: 0.8rem;
}

.tag:hover {
    background: #e0e0e0;
}

.post-summary {
    color: #666;
    line-height: 1.5;
}

.view-all {
    text-align: center;
    margin-top: 2rem;
}

.view-all a {
    color: #0066cc;
    text-decoration: none;
    font-weight: 500;
}

/* Single post */
.post {
    margin: 2rem 0;
}

.post-banner {
    margin: -2rem -20px 2rem -20px;
    overflow: hidden;
}

.banner-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    object-position: center;
    display: block;
}

.post-content {
    margin: 2rem 0;
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4 {
    margin: 2rem 0 1rem 0;
    line-height: 1.3;
}

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

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

.post-content pre {
    background: #f5f5f5;
    padding: 1rem;
    border-radius: 5px;
    overflow-x: auto;
    margin: 1rem 0;
}

.post-content code {
    background: #f5f5f5;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
}

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

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

.post-content blockquote {
    border-left: 4px solid #ddd;
    padding-left: 1rem;
    margin: 1rem 0;
    color: #666;
    font-style: italic;
}

.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.post-content th,
.post-content td {
    border: 1px solid #ddd;
    padding: 0.5rem;
    text-align: left;
}

.post-content th {
    background: #f5f5f5;
    font-weight: bold;
}

/* Navigation */
.post-navigation {
    display: flex;
    justify-content: space-between;
    margin: 3rem 0;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

.nav-prev,
.nav-next {
    flex: 1;
}

.nav-next {
    text-align: right;
}

.post-navigation a {
    color: #0066cc;
    text-decoration: none;
}

.pagination {
    display: flex;
    justify-content: space-between;
    margin: 2rem 0;
}

.pagination-link {
    color: #0066cc;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    border-radius: 3px;
}

.pagination-link:hover {
    background: #f5f5f5;
}

/* Footer */
.footer {
    border-top: 1px solid #eee;
    margin-top: 3rem;
    padding: 2rem 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    color: #666;
    text-decoration: none;
}

.social-links a:hover {
    color: #333;
}

/* Responsive */
@media (max-width: 768px) {
    .nav {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-menu {
        gap: 1rem;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .post-navigation {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-next {
        text-align: left;
    }
    
    .post-banner {
        margin: -2rem -20px 2rem -20px;
        height: 200px;
    }
    
    .banner-image {
        height: 200px;
    }
}