/* ===== Blog Index Styles ===== */
.blog-header {
    padding: 8rem 0 3rem;
    text-align: center;
}

.blog-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.blog-subtitle {
    color: oklch(var(--bc) / 0.6);
    font-size: 1.25rem;
}

.blog-list {
    padding: 2rem 0 6rem;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.blog-card {
    background: oklch(var(--b1));
    border: 1px solid oklch(var(--bc) / 0.2);
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.2s;
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
    border-color: oklch(var(--s));
}

.blog-card-content {
    padding: 2rem;
}

.blog-meta {
    font-size: 0.875rem;
    color: oklch(var(--bc) / 0.6);
    margin-bottom: 0.75rem;
}

.blog-card h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.blog-card h2 a {
    color: oklch(var(--bc));
    text-decoration: none;
}

.blog-card h2 a:hover {
    color: oklch(var(--s));
}

.blog-card p {
    color: oklch(var(--bc) / 0.6);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.blog-read-more {
    color: oklch(var(--s));
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
}

.blog-read-more:hover {
    text-decoration: underline;
}

/* ===== Blog Post Styles ===== */
.blog-post {
    padding: 6rem 0 4rem;
}

.blog-post .container {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 5%;
}

.back-to-blog {
    display: inline-block;
    color: oklch(var(--bc) / 0.6);
    text-decoration: none;
    font-size: 0.9rem;
    margin-bottom: 2rem;
    transition: color 0.2s;
}

.back-to-blog:hover {
    color: oklch(var(--s));
}

.post-header {
    margin-bottom: 3rem;
}

.post-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.post-meta {
    color: oklch(var(--bc) / 0.6);
    font-size: 0.9rem;
}

.meta-separator {
    margin: 0 0.5rem;
}

/* Post Content */
.post-content {
    font-size: 1.125rem;
    line-height: 1.8;
}

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

.post-content h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 3rem;
    margin-bottom: 1rem;
}

.post-content a {
    color: oklch(var(--s));
    text-decoration: none;
}

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

.post-content ul,
.post-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.post-content li {
    margin-bottom: 0.5rem;
}

.post-content code {
    background: oklch(var(--b2));
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    font-size: 0.9em;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

/* Post Images - used as <img class="post-image"> or <figure class="post-image"> */
img.post-image,
img.article-image {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 2rem auto;
    border-radius: 0.5rem;
    border: 1px solid oklch(var(--bc) / 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

img.post-image-small {
    max-width: 300px;
}

/* Figure wrapper variant */
figure.post-image {
    margin: 2rem auto;
    max-width: 100%;
}

figure.post-image img {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    border: 1px solid oklch(var(--bc) / 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* User Quote */
.user-quote {
    background: oklch(var(--b2));
    border-left: 4px solid oklch(var(--s));
    padding: 1.5rem 2rem;
    margin: 2rem 0;
    font-style: italic;
    font-size: 1.2rem;
    line-height: 1.7;
    border-radius: 0 0.5rem 0.5rem 0;
}

/* Origin Note */
.origin-note {
    background: oklch(var(--b2));
    border: 1px solid oklch(var(--bc) / 0.2);
    border-left: 4px solid oklch(var(--s));
    border-radius: 0.5rem;
    padding: 1.25rem 1.5rem;
    margin-bottom: 2rem;
    font-size: 1rem;
    line-height: 1.6;
}

.origin-note p {
    margin: 0;
    color: oklch(var(--bc) / 0.6);
}

.origin-note strong {
    color: oklch(var(--bc));
}

.origin-note a {
    color: oklch(var(--s));
    text-decoration: none;
}

.origin-note a:hover {
    text-decoration: underline;
}

/* CTA Box */
.post-cta {
    background: linear-gradient(135deg, rgb(6, 23, 66) 0%, rgb(65, 105, 225) 100%);
    border-radius: 1rem;
    padding: 2.5rem;
    margin: 3rem 0;
    text-align: center;
    color: white;
}

.post-cta h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: white;
}

.post-cta p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1.5rem;
}

.post-cta .btn-primary {
    display: inline-block;
    background: white;
    color: #0f172a !important;
    border: none;
    padding: 1rem 2rem;
    font-weight: 600;
    border-radius: 0.5rem;
    text-decoration: none;
    transition: background 0.2s;
}

.post-cta .btn-primary:hover {
    background: #e0e7ff;
}

/* Author Box */
.post-footer {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid oklch(var(--bc) / 0.2);
}

.author-box {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-info {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-weight: 600;
}

.author-role {
    color: oklch(var(--bc) / 0.6);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .blog-header {
        padding: 6rem 0 2rem;
    }

    .blog-header h1 {
        font-size: 2rem;
    }

    .blog-grid {
        grid-template-columns: 1fr;
    }

    .blog-post {
        padding: 5rem 0 3rem;
    }

    .post-header h1 {
        font-size: 2rem;
    }

    .post-content {
        font-size: 1rem;
    }

    .post-content h2 {
        font-size: 1.25rem;
    }

    .user-quote {
        padding: 1rem 1.5rem;
        font-size: 1.1rem;
    }

    .post-cta {
        padding: 2rem 1.5rem;
    }
}
