/* Blog-specific styles extending the main theme */

.blog-nav {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.blog-nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    padding: 8px 16px;
    border-radius: 4px;
    transition: all 0.2s ease;
    margin: 0 10px;
}

.blog-nav a:hover {
    color: var(--text-color);
    background-color: var(--hover-bg);
}

/* Blog post styles */
.blog-post {
    max-width: 750px;
    margin: 0 auto;
}

.post-header {
    margin-bottom: 40px;
}

.post-title {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 15px;
    letter-spacing: -0.5px;
    color: var(--text-color);
    line-height: 1.3;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    font-size: 12px;
    color: var(--text-secondary);
}

.post-meta time {
    opacity: 0.8;
}

.post-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tag {
    background-color: var(--hover-bg);
    color: var(--text-secondary);
    padding: 4px 10px;
    border-radius: 3px;
    font-size: 11px;
}

/* Post content */
.post-content {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.8;
}

.post-content h2 {
    font-size: 18px;
    font-weight: 600;
    margin-top: 40px;
    margin-bottom: 15px;
    color: var(--text-color);
    letter-spacing: -0.3px;
}

.post-content h3 {
    font-size: 15px;
    font-weight: 600;
    margin-top: 30px;
    margin-bottom: 12px;
    color: var(--text-color);
}

.post-content h4 {
    font-size: 13px;
    font-weight: 600;
    margin-top: 25px;
    margin-bottom: 10px;
    color: var(--text-color);
}

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

.post-content a {
    color: var(--link-color);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.2s ease;
}

.post-content a:hover {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
}

/* Equation references - no underline */
.post-content a[href^="#eq:"] {
    border-bottom: none;
    color: var(--link-color);
    font-weight: 500;
}

.post-content a[href^="#eq:"]:hover {
    color: var(--accent-color);
}

.post-content ul,
.post-content ol {
    margin-bottom: 20px;
    padding-left: 25px;
}

.post-content li {
    margin-bottom: 8px;
}

.post-content code {
    background-color: var(--hover-bg);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 12px;
    font-family: 'JetBrains Mono', monospace;
}

.post-content pre {
    background-color: var(--hover-bg);
    padding: 15px;
    border-radius: 4px;
    overflow-x: auto;
    margin-bottom: 20px;
}

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

/* LaTeX/Math styles */
.post-content .katex {
    font-size: 1.05em;
}

.post-content .katex-display { /* Display equations */
    font-size: 1.3em;
    margin: 25px 0;
    overflow-x: auto;
    overflow-y: hidden;
}

/* Equation numbering */
.post-content .katex-display .tag {
    position: absolute;
    right: 0;
    background-color: transparent;
    padding: 0;
    color: var(--text-secondary);
}

.post-content .katex-display {
    position: relative;
}

/* Post footer */
.post-footer {
    margin-top: 60px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}

.back-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 12px;
    transition: color 0.2s ease;
}

.back-link:hover {
    color: var(--link-color);
}

/* Blog index styles */
.blog-list {
    list-style: none;
    padding: 0;
}

.blog-list-item {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
}

.blog-list-item:last-child {
    border-bottom: none;
}

.blog-list-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.blog-list-title a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.blog-list-title a:hover {
    color: var(--link-color);
}

.blog-list-meta {
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 10px;
    opacity: 0.8;
}

.blog-list-excerpt {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Figure and image styles */
.post-figure {
    margin: 30px 0;
    text-align: center;
}

.post-figure img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

.post-figure figcaption {
    margin-top: 12px;
    font-size: 11px;
    color: var(--text-secondary);
    opacity: 0.8;
    font-style: italic;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .post-title {
        font-size: 24px;
    }

    .post-content h2 {
        font-size: 16px;
    }

    .post-content h3 {
        font-size: 14px;
    }

    .post-meta {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .blog-nav a {
        padding: 6px 12px;
        font-size: 12px;
    }

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

    .post-content {
        font-size: 12px;
    }
}
