/* Blog Page Styles */
.blog-page,
.blog-post-page {
    background-color: var(--color-bg);
    color: var(--color-text);
    padding: 40px 0;
    line-height: 1.6;
    min-height: 100vh;
    display: block;
    width: 100%;
    opacity: 0; /* Start with 0 opacity for fade-in effect */
    transition: opacity 0.4s ease-in-out;
}

.back-link {
    margin-bottom: 2rem;
    font-size: 0.9rem;
    width: 100%;
    text-align: left;
}

.back-link a {
    color: var(--color-text);
    text-decoration: none;
}

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

main {
    max-width: 700px;
    width: 100%;
    padding: 0 20px;
    display: block;
    margin: 0 auto;
}

/* Blog Index Page */
.page-header {
    margin-bottom: 3rem;
    width: 100%;
}

.page-header h1 {
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.subtitle {
    font-size: 0.9rem;
    color: var(--color-text);
    opacity: 0.8;
}

.blog-posts {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.blog-post-card {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.post-date {
    font-size: 0.85rem;
    color: var(--color-text);
    opacity: 0.7;
}

.blog-post-card h2 {
    font-size: 1.2rem;
    font-weight: 500;
    margin: 0;
}

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

.blog-post-card h2 a:hover {
    text-decoration: underline;
}

.post-excerpt {
    font-size: 0.9rem;
    color: var(--color-text);
    opacity: 0.8;
    margin: 0;
}

.read-more-link {
    font-size: 0.9rem;
    color: var(--color-text);
    text-decoration: none;
}

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

/* Individual Blog Post Page */
.blog-post {
    width: 100%;
}

.post-header {
    margin-bottom: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.featured-image {
    width: 150px;
    height: auto;
    display: block;
    margin-bottom: 0.5rem;
    user-select: none;
    -webkit-user-drag: none;
}

.featured-image.theme-light {
    display: block;
}

.featured-image.theme-dark {
    display: none;
}

body.dark-theme .featured-image.theme-light {
    display: none;
}

body.dark-theme .featured-image.theme-dark {
    display: block;
}

.post-header h1 {
    font-size: 1.5rem;
    font-weight: 500;
    margin: 0;
}

.post-meta {
    font-size: 0.85rem;
    color: var(--color-text);
    opacity: 0.7;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.separator {
    opacity: 0.5;
}

.post-content {
    font-size: 0.95rem;
    line-height: 1.7;
}

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

.post-content h2 {
    font-size: 1.2rem;
    font-weight: 500;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.post-content h3 {
    font-size: 1.1rem;
    font-weight: 500;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.post-content a {
    color: var(--color-text);
    text-decoration: underline;
}

.post-content a:hover {
    opacity: 0.7;
}

.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-color: rgba(0, 0, 0, 0.05);
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: monospace;
    font-size: 0.9em;
}

body.dark-theme .post-content code {
    background-color: rgba(255, 255, 255, 0.1);
}

.post-content pre {
    background-color: rgba(0, 0, 0, 0.05);
    padding: 1rem;
    border-radius: 6px;
    overflow-x: auto;
    margin-bottom: 1.5rem;
}

body.dark-theme .post-content pre {
    background-color: rgba(255, 255, 255, 0.05);
}

.post-content pre code {
    background-color: transparent;
    padding: 0;
}

.post-content blockquote {
    border-left: 3px solid var(--color-text);
    padding-left: 1rem;
    margin-left: 0;
    margin-bottom: 1.5rem;
    opacity: 0.8;
}

/* Responsive */
@media (max-width: 768px) {
    body.blog-page,
    body.blog-post-page {
        padding: 30px 0;
    }
    
    main {
        padding: 0 15px;
    }
}

@media (max-width: 480px) {
    body.blog-page,
    body.blog-post-page {
        padding: 20px 0;
    }
    
    .page-header h1,
    .post-header h1 {
        font-size: 1.3rem;
    }
    
    .featured-image {
        width: 120px;
    }
}
