/* ========================================
   chimme.de — Blog Styles
   ======================================== */

/* --- Blog Header --- */
.blog-header {
    position: relative;
    z-index: 1;
    padding-top: calc(var(--nav-height) + 60px);
    padding-bottom: 40px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 24px;
    transition: color 0.3s;
    font-family: var(--font-mono);
}

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

.back-link svg {
    transition: transform 0.3s;
}

.back-link:hover svg {
    transform: translateX(-4px);
}

/* --- Blog Main --- */
.blog-main {
    padding-top: 0;
}

/* --- Blog Filters --- */
.blog-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 40px;
}

.filter-btn {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    padding: 6px 16px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s;
}

.filter-btn:hover {
    background: rgba(0, 229, 255, 0.08);
    border-color: rgba(0, 229, 255, 0.15);
    color: var(--text-secondary);
}

.filter-btn.active {
    background: rgba(0, 229, 255, 0.1);
    border-color: rgba(0, 229, 255, 0.3);
    color: var(--accent-cyan);
}

/* --- Blog Grid (overview page) --- */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

/* --- Blog Card --- */
.blog-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius);
    padding: 28px;
    display: flex;
    flex-direction: column;
    transition: transform 0.4s, border-color 0.4s, box-shadow 0.4s;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
}

.blog-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent-gradient);
    opacity: 0;
    transition: opacity 0.4s;
}

.blog-card:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 229, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 20px rgba(0, 229, 255, 0.3);
}

.blog-card:hover::before {
    opacity: 1;
}

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.blog-card-format {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    padding: 4px 10px;
    border-radius: 6px;
    background: rgba(180, 77, 255, 0.08);
    border: 1px solid rgba(180, 77, 255, 0.15);
    color: var(--accent-purple);
    white-space: nowrap;
    flex-shrink: 0;
}

.blog-card-date {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.blog-card-read-time {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    white-space: nowrap;
    margin-left: auto;
}

.blog-card-title {
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.45;
    margin-bottom: 10px;
}

.blog-card-excerpt {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    flex: 1;
    margin-bottom: 20px;
}

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

.blog-card-tags span {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    padding: 3px 10px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.blog-card:hover .blog-card-tags span {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
}

/* --- Blog Empty State --- */
.blog-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.9rem;
}

/* --- Blog Post Page --- */
.post-header {
    position: relative;
    z-index: 1;
    padding-top: calc(var(--nav-height) + 60px);
    padding-bottom: 40px;
    max-width: 800px;
    margin: 0 auto;
    padding-left: clamp(20px, 4vw, 40px);
    padding-right: clamp(20px, 4vw, 40px);
}

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

.post-title {
    font-family: var(--font-mono);
    font-size: clamp(1.5rem, 4vw, 2.25rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.3;
    margin-bottom: 16px;
}

.post-excerpt {
    font-size: 1.15rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* --- Post Content --- */
.post-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 clamp(20px, 4vw, 40px) var(--section-padding);
}

.post-content h2 {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 48px;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.post-content h3 {
    font-family: var(--font-mono);
    font-size: 1.15rem;
    font-weight: 600;
    margin-top: 36px;
    margin-bottom: 12px;
    color: var(--accent-cyan);
}

.post-content p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 20px;
}

.post-content strong {
    color: var(--text-primary);
    font-weight: 600;
}

.post-content em {
    color: var(--text-secondary);
    font-style: italic;
}

.post-content a {
    color: var(--accent-cyan);
    text-decoration: underline;
    text-decoration-color: rgba(0, 229, 255, 0.3);
    text-underline-offset: 3px;
    transition: text-decoration-color 0.3s;
}

.post-content a:hover {
    text-decoration-color: var(--accent-cyan);
}

.post-content ul,
.post-content ol {
    color: var(--text-secondary);
    margin-bottom: 20px;
    padding-left: 24px;
}

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

.post-content blockquote {
    border-left: 3px solid var(--accent-purple);
    padding: 16px 24px;
    margin: 24px 0;
    background: rgba(180, 77, 255, 0.05);
    border-radius: 0 var(--radius) var(--radius) 0;
    color: var(--text-secondary);
    font-style: italic;
}

.post-content code {
    font-family: var(--font-mono);
    font-size: 0.85em;
    background: rgba(0, 229, 255, 0.08);
    border: 1px solid rgba(0, 229, 255, 0.12);
    padding: 2px 8px;
    border-radius: 4px;
    color: var(--accent-cyan);
}

.post-content pre {
    background: #0d0d1a;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius);
    padding: 24px;
    overflow-x: auto;
    margin: 24px 0;
    position: relative;
}

.post-content pre code {
    background: none;
    border: none;
    padding: 0;
    font-size: 0.85rem;
    color: var(--text-primary);
    line-height: 1.7;
}

/* Syntax highlighting */
.post-content pre .comment { color: var(--text-muted); font-style: italic; }
.post-content pre .keyword { color: var(--accent-purple); }
.post-content pre .string { color: #22d3ee; }
.post-content pre .function { color: var(--accent-cyan); }
.post-content pre .number { color: #f59e0b; }

.post-content hr {
    border: none;
    height: 1px;
    background: rgba(255, 255, 255, 0.06);
    margin: 48px 0;
}

.post-content img {
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, 0.06);
    margin: 24px 0;
}

/* --- Post Navigation --- */
.post-nav {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 clamp(20px, 4vw, 40px) 60px;
    display: flex;
    justify-content: space-between;
    gap: 24px;
}

.post-nav a {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-muted);
    transition: color 0.3s;
}

.post-nav a:hover {
    color: var(--accent-cyan);
}

/* --- Homepage Blog Preview Section --- */
.blog-preview-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 16px;
}

.blog-view-all {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--accent-cyan);
    padding: 10px 24px;
    border-radius: 8px;
    background: rgba(0, 229, 255, 0.08);
    border: 1px solid rgba(0, 229, 255, 0.2);
    transition: all 0.3s;
}

.blog-view-all:hover {
    background: rgba(0, 229, 255, 0.15);
    border-color: rgba(0, 229, 255, 0.4);
    transform: translateX(4px);
}

.blog-view-all svg {
    transition: transform 0.3s;
}

.blog-view-all:hover svg {
    transform: translateX(4px);
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .blog-preview-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .blog-preview-grid {
        grid-template-columns: 1fr;
    }

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

    .blog-filters {
        gap: 6px;
    }

    .filter-btn {
        font-size: 0.7rem;
        padding: 5px 12px;
    }

    .post-title {
        font-size: 1.5rem;
    }
}
