/* archive page styles — extracted from templates/archive.html */
/* FOUT guard — revealed after CSS loads */
.archive-page { visibility: visible; }

/* ============================================================
       PAGE — News Archive
       ============================================================ */
    #news {
        background: var(--black);
        justify-content: flex-start;
        padding-top: clamp(6rem, 10vh, 10rem);
        padding-bottom: clamp(4rem, 8vh, 8rem);
        gap: clamp(2rem, 5vh, 4rem);
        min-height: auto;
    }

    #news::before {
        content: '';
        position: absolute;
        top: 20%;
        right: 0;
        width: 50vw;
        height: 70vh;
        max-width: 700px;
        background: radial-gradient(circle at 70% 30%, rgba(56, 87, 173, 0.05) 0%, transparent 60%);
        pointer-events: none;
    }

    .news-headline {
        font-family: var(--font-body);
        font-weight: 500;
        font-size: var(--h1-size);
        line-height: 1.05;
        letter-spacing: -0.02em;
        color: var(--white);
    }

    .news-header-row {
        display: flex;
        justify-content: space-between;
        align-items: baseline;
        width: 100%;
        margin-bottom: 1rem;
    }

    .news-view-all {
        font-family: var(--font-mono);
        font-size: 0.8rem;
        letter-spacing: 0.1em;
        text-transform: uppercase;
        color: rgba(255, 255, 255, 0.7);
        position: relative;
        padding-bottom: 4px;
        transition: color 0.3s ease;
        cursor: pointer;
    }

    .news-view-all::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 1.5px;
        background: linear-gradient(90deg, var(--pink), var(--bright-blue));
        transform: scaleX(0);
        transform-origin: left;
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .news-view-all:hover {
        background: linear-gradient(90deg, var(--pink), var(--bright-blue));
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
        color: transparent;
    }

    .news-view-all:hover::after {
        transform: scaleX(1);
    }

    /* --- 2-Column Archive Layout --- */
    .archive-layout {
        display: flex;
        gap: 3rem;
        width: 100%;
        align-items: flex-start;
    }

    .archive-main {
        flex: 0 0 70%;
        min-width: 0;
    }

    /* --- Category Filter Pills (right column, masonry fit-content) --- */
    .archive-filters {
        flex: 0 0 auto;
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.5rem;
        margin-bottom: 0;
        position: sticky;
        top: 7rem;
    }

    .archive-filter-pill {
        font-family: var(--font-mono);
        font-size: 0.68rem;
        letter-spacing: 0.05em;
        text-transform: uppercase;
        color: rgba(255, 255, 255, 0.5);
        background: transparent;
        border: 1px solid rgba(255, 255, 255, 0.15);
        padding: 0.4rem 0.85rem;
        border-radius: 3px;
        cursor: pointer;
        transition: all 0.3s ease;
        width: fit-content;
        white-space: nowrap;
    }

    .archive-filter-pill:hover,
    .archive-filter-pill.active {
        color: var(--white);
        border-color: var(--pink);
        background: rgba(224, 35, 135, 0.1);
        box-shadow: 0 0 12px rgba(224, 35, 135, 0.2);
    }

    /* --- Article List --- */
    .archive-list {
        display: flex;
        flex-direction: column;
        width: 100%;
    }

    .archive-empty {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        padding: 3rem 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .archive-empty-title {
        font-family: var(--font-body);
        font-weight: 500;
        font-size: 1.25rem;
        color: var(--white);
        margin: 0;
        letter-spacing: -0.01em;
    }

    .archive-empty-desc {
        font-family: var(--font-body);
        font-weight: 300;
        font-size: 0.95rem;
        color: rgba(255, 255, 255, 0.6);
        margin: 0;
        max-width: 34rem;
    }

    .archive-empty-tag {
        font-family: var(--font-mono);
        color: var(--pink);
        letter-spacing: 0.05em;
    }

    .archive-empty-link {
        font-family: var(--font-mono);
        font-size: 0.8rem;
        letter-spacing: 0.1em;
        text-transform: uppercase;
        color: rgba(255, 255, 255, 0.7);
        position: relative;
        padding-bottom: 4px;
        transition: color 0.3s ease;
    }

    .archive-empty-link::after {
        content: '';
        position: absolute;
        left: 0;
        bottom: 0;
        width: 100%;
        height: 1px;
        background: linear-gradient(90deg, var(--pink), var(--bright-blue));
        transform: scaleX(0);
        transform-origin: left;
        transition: transform 0.3s ease;
    }

    .archive-empty-link:hover {
        color: var(--white);
    }

    .archive-empty-link:hover::after {
        transform: scaleX(1);
    }

    .archive-list-row {
        display: flex;
        align-items: flex-start;
        gap: 2rem;
        padding: 1.5rem 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        transition: all 0.35s ease;
        text-decoration: none;
        color: inherit;
    }

    .archive-list-row:hover {
        border-bottom-color: rgba(224, 35, 135, 0.12);
    }

    /* Ghost link — makes entire row clickable via display:contents */
    .archive-list-row-link {
        display: contents;
        text-decoration: none;
        color: inherit;
    }

    .archive-list-thumb {
        flex-shrink: 0;
        width: 160px;
        height: 120px;
        object-fit: cover;
        border-radius: 2px;
        overflow: hidden;
        opacity: 0.85;
        transition: opacity 0.35s ease;
        display: flex;
        justify-content: center;
    }

    .archive-list-thumb:hover {
        opacity: 1;
    }

    .archive-list-content {
        flex: 1;
        min-width: 0;
    }

    .archive-list-title {
        font-family: var(--font-body);
        font-weight: 500;
        font-size: 1.15rem;
        line-height: 1.3;
        color: var(--white);
        margin-bottom: 0.3rem;
        transition: color 0.3s ease;
        letter-spacing: -0.01em;
    }

    .archive-list-title:hover {
        color: var(--pink);
    }

    .archive-list-excerpt {
        font-family: var(--font-body);
        font-weight: 300;
        font-size: 0.82rem;
        color: rgba(255, 255, 255, 0.45);
        line-height: 1.55;
        margin-bottom: 0.3rem;
    }

    .archive-list-meta {
        flex-shrink: 0;
        display: flex;
        align-items: center;
        gap: 0.75rem;
        flex-wrap: wrap;
        font-family: var(--font-mono);
        font-size: 0.65rem;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        color: rgba(255, 255, 255, 0.35);
    }

    .archive-list-meta a {
        color: var(--pink);
        transition: color 0.3s ease;
    }

    .archive-list-meta a:hover {
        color: var(--bright-blue);
    }

    .archive-list-meta-sep {
        color: rgba(255, 255, 255, 0.2);
    }

    .archive-list-date {
        font-family: var(--font-mono);
        font-size: 0.65rem;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        color: var(--pink);
    }

    .archive-list-badge {
        display: inline;
        font-family: var(--font-mono);
        font-size: 0.65rem;
        letter-spacing: 0.08em;
        text-transform: uppercase;
    }

    .archive-list-badge.insight { color: var(--pink); }
    .archive-list-badge.news { color: var(--pink); }
    .archive-list-badge.education { color: var(--pink); }

    .archive-list-author {
        font-family: var(--font-mono);
        font-size: 0.68rem;
        letter-spacing: 0.05em;
        color: rgba(255, 255, 255, 0.35);
        display: inline-flex;
        align-items: center;
        gap: 0.35rem;
        position: relative;
        text-decoration: none;
    }

    .archive-list-author:hover .archive-author-tooltip {
        opacity: 1 !important;
    }

    .archive-author-avatar {
        width: 24px;
        height: 24px;
        border-radius: 50%;
        flex-shrink: 0;
        object-fit: cover;
        cursor: pointer;
    }

    .archive-author-tooltip {
        position: absolute;
        bottom: calc(100% + 6px);
        left: 50%;
        transform: translateX(-50%);
        font-family: var(--font-mono);
        font-size: 0.6rem;
        letter-spacing: 0.05em;
        color: var(--white);
        background: rgba(0,0,0,0.9);
        padding: 0.3rem 0.6rem;
        white-space: nowrap;
        border: 1px solid rgba(255,255,255,0.12);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s ease;
    }

    .archive-list-arrow {
        flex-shrink: 0;
        font-family: var(--font-mono);
        font-size: 1.2rem;
        color: rgba(255, 255, 255, 0.2);
        padding-top: 0.2rem;
        transition: all 0.35s ease;
    }

    .archive-list-arrow:hover {
        color: var(--pink);
        transform: translateX(4px);
    }

    /* --- Pagination --- */
    .archive-pagination {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 1rem;
        width: 100%;
        padding-top: 2rem;
    }

    .archive-page-btn {
        font-family: var(--font-mono);
        font-size: 0.75rem;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        color: rgba(255, 255, 255, 0.5);
        background: transparent;
        border: 1px solid rgba(255, 255, 255, 0.1);
        padding: 0.5rem 1.25rem;
        border-radius: 3px;
        cursor: pointer;
        transition: all 0.3s ease;
    }

    .archive-page-btn:hover {
        color: var(--white);
        border-color: var(--pink);
        box-shadow: 0 0 12px rgba(224, 35, 135, 0.2);
    }

    .archive-page-btn:disabled {
        opacity: 0.3;
        cursor: default;
    }

    .archive-page-btn:disabled:hover {
        color: rgba(255, 255, 255, 0.5);
        border-color: rgba(255, 255, 255, 0.1);
        box-shadow: none;
    }

    .archive-page-info {
        font-family: var(--font-mono);
        font-size: 0.7rem;
        letter-spacing: 0.06em;
        color: rgba(255, 255, 255, 0.3);
    }

    /* --- Generic meta-link styling --- */
    .meta-divider {
        opacity: 0.4;
    }

    .meta-category {
        color: inherit;
        text-decoration: none;
        transition: color 0.3s ease, text-shadow 0.3s ease;
    }

    .meta-category:hover {
        color: var(--bright-blue);
        text-shadow: 0 0 8px rgba(101, 162, 210, 0.4);
    }

    .meta-link {
        color: inherit;
        text-decoration: none;
        transition: color 0.3s ease, text-shadow 0.3s ease;
    }

    .meta-link:hover {
        color: var(--bright-blue);
        text-shadow: 0 0 8px rgba(101, 162, 210, 0.4);
    }

    /* --- Responsive: Archive List --- */
    @media (max-width: 600px) {
        .archive-layout {
            flex-direction: column;
            gap: 1.5rem;
        }
        .archive-main {
            flex: 1 1 auto;
        }
        .archive-filters {
            flex: 1 1 auto;
            flex-direction: row;
            flex-wrap: wrap;
            gap: 0.5rem;
            position: static;
            top: auto;
            order: -1;
        }
        .archive-filter-pill {
            width: auto;
            font-size: 0.65rem;
            padding: 0.3rem 0.75rem;
        }
        .archive-list-row {
            flex-direction: column;
            gap: 0.5rem;
        }
        .archive-list-meta {
            width: 100%;
        }
        .archive-list-arrow {
            display: none;
        }
        .archive-list-thumb {
            width: 100px;
            height: 67px;
            align-self: flex-start;
        }
    }
