:root {
    --ink: #1c2024;
    --paper: #faf9f6;
    --line: #e3e1db;
    --accent: #2f5d50;
    --muted: #6b6f76;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: var(--paper);
    color: var(--ink);
    line-height: 1.6;
}

.wrap {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header / footer */
.site-header {
    border-bottom: 1px solid var(--line);
    padding: 18px 0;
    background: #fff;
}
.site-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--ink);
    text-decoration: none;
}
.site-footer {
    border-top: 1px solid var(--line);
    padding: 24px 0;
    margin-top: 48px;
    color: var(--muted);
    font-size: 13px;
}

/* Blog list */
main.wrap { padding-top: 36px; padding-bottom: 36px; }

.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
}

.post-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.post-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.07);
    transform: translateY(-2px);
}

.post-card-img {
    width: 100%;
    height: 170px;
    object-fit: cover;
    display: block;
    background: #eee;
}
.post-card-img-empty { background: #eee; }

.post-card-body { padding: 16px 18px 20px; }
.post-card-body h2 {
    font-size: 17px;
    margin: 0 0 8px;
    line-height: 1.35;
}
.post-card-body p {
    font-size: 13.5px;
    color: var(--muted);
    margin: 0 0 10px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.post-card-body time {
    font-size: 12px;
    color: var(--muted);
}

.empty-state {
    text-align: center;
    color: var(--muted);
    padding: 60px 0;
    font-size: 15px;
}

/* Single article */
.article-wrap { max-width: 720px; }

article h1 {
    font-size: 30px;
    line-height: 1.25;
    margin: 0 0 8px;
}
article > time {
    display: block;
    color: var(--muted);
    font-size: 13.5px;
    margin-bottom: 20px;
}

.article-img {
    width: 100%;
    border-radius: 10px;
    margin-bottom: 24px;
    display: block;
}

.article-content {
    font-size: 17px;
    line-height: 1.75;
}
.article-content p { margin: 0 0 1.2em; }
.article-content img { max-width: 100%; height: auto; border-radius: 8px; }
.article-content h2 { font-size: 22px; margin: 1.6em 0 0.6em; }
.article-content h3 { font-size: 19px; margin: 1.4em 0 0.6em; }
.article-content a { color: var(--accent); }
.article-content blockquote {
    border-left: 3px solid var(--accent);
    margin: 1.4em 0;
    padding: 0.2em 0 0.2em 1.2em;
    color: var(--muted);
}
.article-content pre {
    background: #1c2024;
    color: #f5f5f0;
    padding: 14px 16px;
    border-radius: 8px;
    overflow-x: auto;
    font-size: 13.5px;
}

.back-link {
    display: inline-block;
    margin-top: 32px;
    color: var(--accent);
    text-decoration: none;
    font-size: 14px;
}
.back-link:hover { text-decoration: underline; }

/* Responsive */
@media (max-width: 600px) {
    .wrap { padding: 0 16px; }
    article h1 { font-size: 24px; }
    .article-content { font-size: 16px; }
    .post-grid { grid-template-columns: 1fr; }
}
