/* Blog-specific styles - extends main styles.css */

/* Blog Header (simplified) */
.blog-header {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.blog-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.blog-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 600;
    font-size: 1.25rem;
}

.blog-logo img {
    width: 40px;
    height: 40px;
    border-radius: 0.375rem;
}

.blog-nav-links {
    display: flex;
    gap: 2rem;
}

.blog-nav-links a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.blog-nav-links a:hover,
.blog-nav-links a.active {
    color: var(--primary);
}

/* Blog Index Page */
.blog-index {
    padding: 4rem 0;
    min-height: calc(100vh - 200px);
}

.blog-index-header {
    text-align: center;
    margin-bottom: 4rem;
}

.blog-index-header h1 {
    font-size: 2.5rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.blog-intro {
    font-size: 1.25rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

.post-list {
    max-width: 800px;
    margin: 0 auto;
}

/* Post Preview (on index page) */
.post-preview {
    padding: 2rem 0;
    border-bottom: 1px solid var(--border);
}

.post-preview:last-child {
    border-bottom: none;
}

.post-preview h2 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.post-preview h2 a {
    color: var(--text-dark);
    text-decoration: none;
    transition: color 0.2s;
}

.post-preview h2 a:hover {
    color: var(--primary);
}

.post-preview .post-meta {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 0.75rem;
}

.post-preview .excerpt {
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.post-preview .post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Blog Post Page */
.blog-post {
    padding: 4rem 0;
}

.blog-post .container {
    max-width: 800px;
}

.post-header {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}

.post-header h1 {
    font-size: 2.5rem;
    line-height: 1.2;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.post-meta {
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.meta-separator {
    margin: 0 0.5rem;
}

.post-author {
    font-weight: 500;
}

/* Tags */
.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--bg-light);
    color: var(--primary);
    border-radius: 9999px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Post Content Typography */
.post-content {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-dark);
}

.post-content h2 {
    font-size: 1.875rem;
    margin-top: 3rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.post-content h3 {
    font-size: 1.5rem;
    margin-top: 2.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-dark);
}

.post-content h4 {
    font-size: 1.25rem;
    margin-top: 2rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.post-content p {
    margin-bottom: 1.5rem;
}

.post-content a {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.post-content a:hover {
    color: var(--primary-dark);
}

.post-content ul,
.post-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.post-content li {
    margin-bottom: 0.5rem;
}

.post-content blockquote {
    border-left: 4px solid var(--primary);
    padding-left: 1.5rem;
    margin: 2rem 0;
    color: var(--text-light);
    font-style: italic;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin: 2rem 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.post-content hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 3rem 0;
}

/* Code Blocks */
.post-content code {
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 0.9em;
}

.post-content p code,
.post-content li code {
    background: var(--bg-light);
    padding: 0.2em 0.4em;
    border-radius: 0.25rem;
    color: var(--primary-dark);
}

.post-content pre {
    margin: 2rem 0;
    border-radius: 0.5rem;
    overflow-x: auto;
}

.post-content pre code {
    background: none;
    padding: 0;
    color: inherit;
}

/* Prism.js overrides to match site theme */
.post-content pre[class*="language-"] {
    background: #1e293b;
    border: 1px solid var(--border);
}

/* Tables */
.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
}

.post-content th,
.post-content td {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    text-align: left;
}

.post-content th {
    background: var(--bg-light);
    font-weight: 600;
}

/* Post Navigation */
.post-navigation {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.back-to-blog {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.2s;
}

.back-to-blog:hover {
    color: var(--primary-dark);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .blog-header {
        padding: 0.75rem 0;
    }

    .blog-logo span {
        display: none;
    }

    .blog-nav-links {
        gap: 1.5rem;
    }

    .blog-index {
        padding: 2rem 0;
    }

    .blog-index-header h1 {
        font-size: 2rem;
    }

    .blog-intro {
        font-size: 1.1rem;
    }

    .blog-post {
        padding: 2rem 0;
    }

    .post-header h1 {
        font-size: 1.875rem;
    }

    .post-content {
        font-size: 1rem;
    }

    .post-content h2 {
        font-size: 1.5rem;
    }

    .post-content h3 {
        font-size: 1.25rem;
    }

    .post-preview h2 {
        font-size: 1.25rem;
    }
}
