/* =============================================
   blog.css — blog index + post styles
   Matches existing site: black bg, white text
   Typography: EB Garamond + Geist Mono
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400;0,500;1,400&family=Geist+Mono:wght@300;400&display=swap');

/* ── ANIMATIONS ── */

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

header {
    justify-content: flex-end;
}

/* ── HERO ── */

.blog-hero {
    padding: 100px 0 40px;
    animation: fadeUp 0.9s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

.blog-label {
    font-family: 'Geist Mono', monospace;
    font-size: 11px;
    font-weight: 300;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.35);
    margin-bottom: 16px;
}

.blog-title {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: clamp(48px, 8vw, 90px);
    font-weight: 400;
    color: white;
    line-height: 1;
    letter-spacing: -0.01em;
}

/* ── BLOG SECTION ── */

.blog-section {
    padding-bottom: 120px;
    animation: fadeUp 0.9s 0.15s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

/* ── FILTERS + VIEW TOGGLE ── */

.blog-filters {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 48px;
    padding-bottom: 32px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.filter-row {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

.filter-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-pill {
    font-family: 'Geist Mono', monospace;
    font-size: 10px;
    font-weight: 300;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    background: none;
    border: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.4);
    padding: 6px 12px;
    cursor: pointer;
    border-radius: 2px;
    transition: all 0.25s ease;
}

.filter-pill:hover {
    border-color: var(--pill-color, rgba(255,255,255,0.3));
    color: white;
}

.filter-pill.active {
    background-color: var(--pill-color, rgba(255,255,255,0.15));
    border-color: var(--pill-color, rgba(255,255,255,0.3));
    color: white;
}

.view-toggle {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
    padding-top: 2px;
}

.view-toggle-btn {
    background: none;
    border: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.25);
    padding: 6px 9px;
    cursor: pointer;
    border-radius: 2px;
    transition: all 0.2s ease;
    font-size: 11px;
}

.view-toggle-btn:hover {
    color: white;
    border-color: rgba(255,255,255,0.3);
}

.view-toggle-btn.active {
    color: white;
    border-color: rgba(255,255,255,0.4);
}

/* ── BLOG FEED (default) ── */

.blog-grid {
    display: flex;
    flex-direction: column;
}

/* ── BLOG CARD (feed layout) ── */

.blog-card {
    display: grid;
    grid-template-columns: 280px 1fr;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    transition: border-color 0.3s ease;
    position: relative;
    overflow: hidden;
    min-height: 200px;
}

.blog-card:first-child {
    border-top: 1px solid rgba(255,255,255,0.06);
}

.blog-card:hover {
    border-color: rgba(255,255,255,0.15);
}

.blog-card-cover {
    width: 100%;
    height: 100%;
    min-height: 200px;
    background-size: cover;
    background-position: center;
    background-color: #0d0d0d;
    transition: transform 0.5s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.blog-card:hover .blog-card-cover {
    transform: scale(1.03);
}

.blog-card-cover--empty {
    background: linear-gradient(135deg, #0d0d0d 0%, #1a1a1a 100%);
}

.blog-card-content {
    padding: 32px 40px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    justify-content: center;
}

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 16px;
}

.blog-card-date {
    font-family: 'Geist Mono', monospace;
    font-size: 10px;
    font-weight: 300;
    letter-spacing: 0.1em;
    color: rgba(255,255,255,0.2);
    text-transform: uppercase;
    white-space: nowrap;
}

.blog-category {
    font-family: 'Geist Mono', monospace;
    font-size: 10px;
    font-weight: 300;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--cat-color, rgba(255,255,255,0.4));
}

.blog-card-title {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 28px;
    font-weight: 400;
    color: rgba(255,255,255,0.9);
    line-height: 1.2;
    letter-spacing: -0.01em;
    transition: color 0.2s ease;
}

.blog-card:hover .blog-card-title {
    color: white;
}

.blog-card-excerpt {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 17px;
    color: rgba(255,255,255,0.35);
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding-top: 4px;
}

.blog-tag {
    font-family: 'Geist Mono', monospace;
    font-size: 9px;
    font-weight: 300;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--tag-color, rgba(255,255,255,0.3));
    border: 1px solid var(--tag-color, rgba(255,255,255,0.15));
    padding: 3px 8px;
    border-radius: 2px;
}

/* ── CARD GRID MODE (must come after feed styles) ── */

.blog-grid--cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2px;
}

.blog-grid--cards .blog-card {
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255,255,255,0.06);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    min-height: unset;
}

.blog-grid--cards .blog-card:first-child {
    border-top: 1px solid rgba(255,255,255,0.06);
}

.blog-grid--cards .blog-card-cover {
    height: 180px;
    min-height: unset;
    width: 100%;
    flex-shrink: 0;
}

.blog-grid--cards .blog-card-content {
    padding: 20px 24px;
    justify-content: flex-start;
}

.blog-grid--cards .blog-card-title {
    font-size: 20px;
}

/* ── EMPTY STATE ── */

.blog-empty {
    font-family: 'Geist Mono', monospace;
    font-size: 11px;
    font-weight: 300;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.2);
    padding: 40px 0;
}

/* ── FOOTER ── */

.blog-footer {
    padding: 40px 0;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.blog-footer p {
    font-family: 'Geist Mono', monospace;
    font-size: 11px;
    font-weight: 300;
    letter-spacing: 0.15em;
    color: rgba(255,255,255,0.15);
}

/* ══════════════════════════════════════════════
   POST PAGE
   ══════════════════════════════════════════════ */

.post-inner {
    display: block;
    max-width: 680px;
    margin: 0 auto;
    padding: 60px 0 120px;
}

/* Cover image */

.post-cover {
    width: 100%;
    height: 180px;
    overflow: hidden;
    position: relative;
}

.post-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: blur(18px) brightness(0.5) saturate(1.2);
    transform: scale(1.05);
}

/* Post header */

.post-header {
    display: block;
    margin-bottom: 60px;
    animation: fadeUp 0.9s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

.post-header-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
}

.post-back {
    font-family: 'Geist Mono', monospace;
    font-size: 11px;
    font-weight: 300;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.25);
    text-decoration: none;
    transition: color 0.2s ease;
}

.post-back:hover {
    color: white;
}

.post-header-date {
    font-family: 'Geist Mono', monospace;
    font-size: 10px;
    font-weight: 300;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.2);
}

.post-title {
    display: block;
    font-family: 'EB Garamond', Georgia, serif;
    font-size: clamp(36px, 6vw, 64px);
    font-weight: 400;
    color: white;
    line-height: 1.05;
    letter-spacing: -0.02em;
    margin-bottom: 20px;
}

.post-excerpt {
    display: block;
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 20px;
    font-style: italic;
    color: rgba(255,255,255,0.4);
    line-height: 1.55;
    margin-bottom: 28px;
    max-width: 580px;
}

.post-header-info {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    padding-top: 20px;
    margin-bottom: 48px;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.post-reading-time {
    font-family: 'Geist Mono', monospace;
    font-size: 10px;
    font-weight: 300;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.2);
}

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

/* Post content */

.post-content {
    display: block;
    animation: fadeUp 0.9s 0.15s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

.post-content p {
    display: block;
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 20px;
    color: rgba(255,255,255,0.7);
    line-height: 1.7;
    margin-bottom: 24px;
}

.post-content h1,
.post-content h2,
.post-content h3 {
    display: block;
    font-family: 'EB Garamond', Georgia, serif;
    font-weight: 400;
    color: white;
    letter-spacing: -0.01em;
    margin: 48px 0 16px;
    line-height: 1.2;
}

.post-content h1 { font-size: 36px; }
.post-content h2 { font-size: 28px; }
.post-content h3 { font-size: 22px; }

.post-content ul,
.post-content ol {
    display: block;
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 20px;
    color: rgba(255,255,255,0.7);
    line-height: 1.7;
    margin-bottom: 24px;
    padding-left: 24px;
}

.post-content ul { list-style: disc; }
.post-content ol { list-style: decimal; }

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

.post-content blockquote {
    display: block;
    border-left: 2px solid rgba(255,255,255,0.15);
    padding-left: 24px;
    margin: 32px 0;
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 22px;
    font-style: italic;
    color: rgba(255,255,255,0.45);
    line-height: 1.6;
}

.post-content pre {
    display: block;
    background: #0d0d0d;
    border: 1px solid rgba(255,255,255,0.08);
    padding: 24px;
    overflow-x: auto;
    margin-bottom: 24px;
    border-radius: 2px;
}

.post-content code {
    font-family: 'Geist Mono', monospace;
    font-size: 14px;
    color: rgba(255,255,255,0.7);
}

.post-content p code {
    background: rgba(255,255,255,0.06);
    padding: 2px 6px;
    border-radius: 2px;
    font-size: 14px;
}

.post-content hr {
    display: block;
    border: none;
    border-top: 1px solid rgba(255,255,255,0.08);
    margin: 48px 0;
}

.post-content figure {
    display: block;
    margin: 32px 0;
}

.post-content figure img {
    width: 100%;
    display: block;
    border-radius: 2px;
}

.post-content figcaption {
    display: block;
    font-family: 'Geist Mono', monospace;
    font-size: 10px;
    font-weight: 300;
    letter-spacing: 0.1em;
    color: rgba(255,255,255,0.2);
    text-transform: uppercase;
    margin-top: 10px;
}

.post-content a {
    color: white;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: rgba(255,255,255,0.3);
    transition: text-decoration-color 0.2s ease;
}

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

.post-content strong {
    color: white;
    font-weight: 500;
}

.post-content em {
    font-style: italic;
}

/* Embeds */

.post-embed {
    display: block;
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    margin-bottom: 32px;
    border-radius: 2px;
}

.post-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Callout */

.post-callout {
    display: flex;
    gap: 16px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    padding: 20px 24px;
    margin-bottom: 24px;
    border-radius: 2px;
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 18px;
    color: rgba(255,255,255,0.65);
    line-height: 1.6;
}

.post-callout-icon {
    font-size: 20px;
    flex-shrink: 0;
}

/* ── RESPONSIVE ── */

@media screen and (max-width: 768px) {
    .blog-hero {
        padding: 60px 24px 30px;
    }

    .blog-section {
        display: block;
    }

    .blog-section .container {
        display: block;
        padding: 0 24px;
    }

    .blog-filters {
        padding: 0 0 32px 0;
    }

    .blog-card {
        grid-template-columns: 1fr;
        min-height: unset;
    }

    .blog-card-cover {
        width: 100%;
        height: 200px;
        min-height: unset;
    }

    .blog-card-content {
        padding: 24px 24px;
    }

    .blog-card-title {
        font-size: 22px;
    }

    .view-toggle {
        display: none;
    }

    .post-inner {
        padding: 40px 24px 80px;
        max-width: 100%;
    }

    .blog-footer {
        padding: 40px 24px;
    }

    .blog-hero .container,
    .blog-title {
        text-align: center;
    }

    .post-header,
    .post-content,
    .post-excerpt {
        max-width: 100%;
    }

    header {
        justify-content: center;
    }


}