/* ============================================================
   BLOG — Stylesheet
   ============================================================ */

/* ── Blog Grid ── */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.blog-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s, transform 0.2s;
}

.blog-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.blog-card-img {
    height: 180px;
    background-size: cover;
    background-position: center;
    background-color: var(--green-pale);
}

.blog-card-body {
    padding: 20px 24px 16px;
    flex: 1;
}

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: var(--ink-3);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.blog-card-title {
    font-family: var(--font-display);
    font-size: 24px;
    letter-spacing: 0.02em;
    color: var(--ink);
    line-height: 1.1;
    margin-bottom: 10px;
}

.blog-card-excerpt {
    font-size: 14px;
    color: var(--ink-3);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card-footer {
    padding: 14px 24px;
    border-top: 1px solid var(--line);
    display: flex;
    gap: 8px;
}

/* ── Single Post ── */
.post-wrap {
    padding-bottom: 80px;
}

.post-header {
    background: var(--ink);
    color: #f0efe9;
    padding: 48px 0 40px;
    margin-bottom: 48px;
}

[data-theme="dark"] .post-header {
    background: #0c0c0a;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.post-title {
    font-family: var(--font-display);
    font-size: clamp(36px, 6vw, 64px);
    letter-spacing: 0.02em;
    line-height: 1;
    color: #f0efe9;
    margin-bottom: 16px;
}

.post-excerpt {
    font-size: 18px;
    color: #a09e96;
    max-width: 600px;
    line-height: 1.6;
}

/* ── Post Body (Quill output) ── */
.post-body {
    max-width: 680px;
    font-size: 17px;
    line-height: 1.8;
    color: var(--ink-2);
    margin-bottom: 48px;
}

.post-body h1,
.post-body h2,
.post-body h3 {
    font-family: var(--font-display);
    letter-spacing: 0.02em;
    color: var(--ink);
    margin: 40px 0 16px;
    line-height: 1.1;
}

.post-body h1 {
    font-size: 40px;
}

.post-body h2 {
    font-size: 32px;
}

.post-body h3 {
    font-size: 26px;
}

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

.post-body a {
    color: var(--green);
}

.post-body a:hover {
    text-decoration: underline;
}

.post-body ul,
.post-body ol {
    margin: 0 0 20px 24px;
    line-height: 1.8;
}

.post-body blockquote {
    border-left: 3px solid var(--green);
    margin: 28px 0;
    padding: 12px 20px;
    background: var(--green-pale);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: var(--ink-2);
    font-style: italic;
}

.post-body pre {
    background: var(--ink);
    color: #f0efe9;
    padding: 20px 24px;
    border-radius: var(--radius);
    overflow-x: auto;
    font-size: 14px;
    margin-bottom: 20px;
}

.post-body img {
    max-width: 100%;
    border-radius: var(--radius);
    margin: 20px 0;
}

.post-body strong {
    color: var(--ink);
}

/* ── Comments ── */
.comments-section {
    max-width: 680px;
    margin-bottom: 60px;
}

.comments-title {
    font-family: var(--font-display);
    font-size: 28px;
    letter-spacing: 0.02em;
    color: var(--ink);
    margin-bottom: 28px;
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.comment {
    padding: 20px 0;
    border-bottom: 1px solid var(--line);
}

.comment:last-of-type {
    border-bottom: none;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.comment-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--ink);
}

.comment-date {
    font-size: 12px;
    color: var(--ink-3);
}

.comment-body {
    font-size: 15px;
    color: var(--ink-2);
    line-height: 1.65;
    white-space: pre-wrap;
}

.comment-form-wrap {
    margin-top: 40px;
    padding: 28px;
    background: var(--bg-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

/* ── Responsive ── */
@media (max-width: 640px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }

    .post-header {
        padding: 32px 0 28px;
    }

    .post-title {
        font-size: 36px;
    }

    .post-body {
        font-size: 16px;
    }
}