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

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

header {
    background-color: #2c3e50;
    color: white;
    padding: 20px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

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

header h1 a {
    color: white;
    text-decoration: none;
    font-size: 1.8rem;
}

header p {
    color: #bdc3c7;
    margin-top: 4px;
    font-size: 0.9rem;
}

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

main {
    padding: 40px 0;
}

/* Index page */
.post-list {
    list-style: none;
}

.post-card {
    background: white;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    transition: box-shadow 0.2s;
    display: flex;
    flex-direction: row;
}

.post-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.post-card-thumbnail {
    width: 220px;
    min-width: 220px;
    overflow: hidden;
    flex-shrink: 0;
}

.post-card-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}

.post-card:hover .post-card-thumbnail img {
    transform: scale(1.04);
}

.post-card-body {
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.post-card h2 {
    font-size: 1.15rem;
    margin-bottom: 8px;
}

.post-card h2 a {
    color: #2c3e50;
    text-decoration: none;
}

.post-card h2 a:hover {
    color: #3498db;
}

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

.post-meta .category {
    background-color: #3498db;
    color: white;
    padding: 2px 8px;
    border-radius: 3px;
    margin-right: 8px;
}

.post-excerpt {
    color: #555;
    font-size: 0.95rem;
}

.read-more {
    display: inline-block;
    margin-top: 12px;
    color: #3498db;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: bold;
}

/* Article page */
article {
    background: white;
    border-radius: 6px;
    padding: 40px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

article h1 {
    font-size: 2rem;
    margin-bottom: 12px;
    color: #2c3e50;
}

article .post-meta {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #eee;
}

article .content h2 {
    font-size: 1.4rem;
    margin: 28px 0 12px;
    color: #2c3e50;
}

article .content p {
    margin-bottom: 16px;
    color: #444;
}

article .content ul,
article .content ol {
    margin: 12px 0 16px 24px;
    color: #444;
}

article .content li {
    margin-bottom: 6px;
}

article .content code {
    background: #f4f4f4;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: monospace;
    font-size: 0.9em;
}

article .content pre {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 16px;
    border-radius: 4px;
    overflow-x: auto;
    margin: 16px 0;
}

article .content pre code {
    background: none;
    padding: 0;
    color: inherit;
}

.back-link {
    display: inline-block;
    margin-top: 32px;
    color: #3498db;
    text-decoration: none;
}

.back-link:hover {
    text-decoration: underline;
}

/* Pagination */
.pagination {
    display: flex;
    gap: 8px;
    margin-top: 32px;
    justify-content: center;
}

.pagination a, .pagination span {
    padding: 8px 14px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.9rem;
}

.pagination a {
    background: white;
    color: #3498db;
    border: 1px solid #ddd;
}

.pagination a:hover {
    background: #3498db;
    color: white;
}

.pagination .current {
    background: #3498db;
    color: white;
}

footer {
    background-color: #2c3e50;
    color: #bdc3c7;
    text-align: center;
    padding: 20px;
    font-size: 0.85rem;
    margin-top: 40px;
}

@media (max-width: 600px) {
    .post-card {
        flex-direction: column;
    }

    .post-card-thumbnail {
        width: 100%;
        min-width: unset;
        height: 180px;
    }
}
