/* ==========================================================================
   BLOG LISTING — Text-first academic journal index
   Merges Noumena's radical simplicity with the site's warm palette.
   Depends on landing.css for theme variables & base styles.
   ========================================================================== */

/* ---- Page-level overrides ---- */
.blog-listing body,
body.blog-listing {
    background-color: var(--paper);
    color: var(--text-primary);
    font-family: "Lora", Georgia, serif;
    font-size: 18px;
    line-height: 1.75;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* ---- Header ---- */
.blog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 2rem;
    min-height: 3rem;
}

.blog-header-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.blog-header-left .logo {
    font-weight: bold;
    font-size: 1.5rem;
    color: var(--text-primary);
    text-decoration: none;
}

.blog-header-left .header-sep {
    color: var(--text-secondary);
    font-weight: 300;
    font-size: 1.25rem;
    opacity: 0.4;
    user-select: none;
}

.blog-header-left .header-section-label {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 0.02em;
}

/* ---- Page title area ---- */
.blog-intro {
    border-top: 1px solid var(--border-color);
    padding: 2.5rem 0 2rem;
}

.blog-intro h1 {
    font-family: "Lora", Georgia, serif;
    font-size: 2.25rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin: 0 0 0.5rem;
    text-wrap: balance;
}

.blog-intro p {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin: 0;
    max-width: 600px;
    line-height: 1.7;
}

/* ---- Series filter pills ---- */
.series-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding-bottom: 2rem;
}

.series-pill {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    padding: 0.35rem 0.9rem;
    border-radius: 100px;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
    white-space: nowrap;
    text-decoration: none;
}

.series-pill:hover {
    color: var(--text-primary);
    border-color: var(--text-primary);
}

.series-pill.active {
    color: var(--paper);
    background-color: var(--text-primary);
    border-color: var(--text-primary);
}

[data-theme="dark"] .series-pill.active {
    color: #0a0a0a;
    background-color: var(--text-primary);
}

/* ---- Post list ---- */
.post-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* ---- Individual post card ---- */
.post-card {
    display: block;
    text-decoration: none;
    color: inherit;
    position: relative;
    padding: 1.75rem 0 1.75rem 0;
    border-bottom: 1px solid var(--border-color);
    transition: border-color 0.3s ease;
}

.post-list > li:first-child .post-card {
    border-top: 1px solid var(--border-color);
}

/* Hover accent bar — bookmark sliding in */
.post-card::before {
    content: '';
    position: absolute;
    left: -1.25rem;
    top: 20%;
    width: 4px;
    height: 55%;
    background: var(--accent-blue);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 2px;
}

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

.post-card:hover .post-title {
    color: var(--accent-blue);
}

/* ---- Meta line: number · badge · date ---- */
.post-meta {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.4rem;
    flex-wrap: wrap;
}

.post-number {
    font-family: "JetBrains Mono", "Fira Code", monospace;
    font-size: 0.8rem;
    font-variant-numeric: tabular-nums;
    color: var(--text-secondary);
    letter-spacing: 0.02em;
    opacity: 0.7;
}

.post-meta .meta-dot {
    color: var(--border-color);
    font-size: 0.5rem;
    line-height: 1;
    user-select: none;
}

.post-date {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 0.8rem;
    color: var(--text-secondary);
    opacity: 0.7;
    margin-left: auto;
}

/* ---- Status badges ---- */
.status-badge {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.2rem 0.55rem;
    border-radius: 100px;
    line-height: 1.2;
    white-space: nowrap;
}

.status-badge--research {
    color: #2563eb;
    background: rgba(37, 99, 235, 0.1);
}

.status-badge--hypothesis {
    color: #d97706;
    background: rgba(217, 119, 6, 0.1);
}

.status-badge--result {
    color: #059669;
    background: rgba(5, 150, 105, 0.1);
}

.status-badge--note {
    color: #6b7280;
    background: rgba(107, 114, 128, 0.1);
}

.status-badge--tutorial {
    color: #7c3aed;
    background: rgba(124, 58, 237, 0.1);
}

/* Dark mode badge adjustments */
[data-theme="dark"] .status-badge--research {
    color: #60a5fa;
    background: rgba(96, 165, 250, 0.12);
}

[data-theme="dark"] .status-badge--hypothesis {
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.12);
}

[data-theme="dark"] .status-badge--result {
    color: #34d399;
    background: rgba(52, 211, 153, 0.12);
}

[data-theme="dark"] .status-badge--note {
    color: #9ca3af;
    background: rgba(156, 163, 175, 0.12);
}

[data-theme="dark"] .status-badge--tutorial {
    color: #a78bfa;
    background: rgba(167, 139, 250, 0.12);
}

/* ---- Post title ---- */
.post-title {
    font-family: "Lora", Georgia, serif;
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-primary);
    margin: 0 0 0.25rem;
    text-wrap: balance;
    letter-spacing: -0.01em;
    transition: color 0.2s ease;
}

/* ---- Subtitle ---- */
.post-subtitle {
    font-family: "Lora", Georgia, serif;
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.55;
    margin: 0 0 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---- Series tag ---- */
.post-series-tag {
    display: inline-block;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    padding: 0.15rem 0.55rem;
    border-radius: 100px;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.post-card:hover .post-series-tag {
    opacity: 1;
}

/* ---- Footer ---- */
.blog-footer {
    padding: 3rem 0 2rem;
    text-align: center;
}

.blog-footer a {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.blog-footer a:hover {
    color: var(--accent-blue);
}

/* ---- Responsive ---- */

/* Tablet & smaller desktops */
@media (max-width: 768px) {
    .blog-intro h1 {
        font-size: 1.75rem;
    }

    .post-card::before {
        left: -1rem;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .blog-intro h1 {
        font-size: 1.5rem;
    }

    .blog-intro p {
        font-size: 0.95rem;
    }

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

    .post-subtitle {
        font-size: 0.9rem;
    }

    .post-date {
        margin-left: 0;
    }

    .post-meta {
        gap: 0.4rem;
    }

    .series-filters {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .series-filters::-webkit-scrollbar {
        display: none;
    }

    .post-card::before {
        left: -0.75rem;
    }
}
