:root {
    --glass-surface-heavy: rgba(18, 18, 20, 0.85);
    --glass-surface-light: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --neon-red: #ff3333;
    --neon-blue: #ff6b6b;
    --aurora-gradient: linear-gradient(135deg, rgba(255, 51, 51, 0.15) 0%, rgba(0, 0, 0, 0) 50%, rgba(220, 38, 38, 0.1) 100%);
    --card-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    --font-heading: 'Bebas Neue', 'Inter', system-ui, sans-serif;
    --font-ui: 'Inter', system-ui, sans-serif;
    --transition-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* --- Hero Section --- */
.articles-hero-modern {
    position: relative;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 4.5rem 2rem 1.5rem;
    contain: layout style;
}

/* Rock Dust Canvas Background */
.rock-dust-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none; /* Let mouse events pass through to JS */
}

/* Ensure hero content stays above canvas */
.articles-hero-modern .aurora-bg,
.articles-hero-modern .noise-overlay,
.articles-hero-modern .hero-content,
.articles-hero-modern .scroll-indicator {
    position: relative;
    z-index: 2;
}

/* --- Kinetic Typography Reveal for Hero Titles --- */
.glitch-title {
    perspective: none;
}
.glitch-title .char {
    display: inline-block;
    opacity: 0;
    transform: translateY(8px);
    animation: kinetic-reveal 0.5s ease forwards;
}
@keyframes kinetic-reveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Controls / Filter Bar --- */
.container.sticky-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    margin-bottom: 3rem;
    position: sticky;
    top: 64px;
    z-index: 50;
    transition: transform 0.3s ease;
}

.controls-modern {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: center;
    background: rgba(18, 18, 20, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    padding: 1rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    min-height: 60px;
}

.search-pill {
    position: relative;
    flex-grow: 1;
    min-width: 250px;
}

.search-pill input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    padding: 0.8rem 1.5rem 0.8rem 3rem;
    color: #fff;
    font-family: var(--font-ui);
    transition: all 0.3s;
}

.search-pill input:focus,
.search-pill input:focus-visible {
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.4);
    border-color: rgba(220, 38, 38, 0.5);
    outline: none;
    border-radius: 50px 50px 0 0;
}

/* --- Autocomplete Suggestions Dropdown --- */
.suggest-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(18, 18, 20, 0.96);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top: none;
    border-radius: 0 0 16px 16px;
    max-height: 320px;
    overflow-y: auto;
    z-index: 100;
    display: none;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
}

.suggest-dropdown--open {
    display: block;
}

.suggest-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 1.2rem;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 0.9rem;
    transition: background 0.15s ease;
    cursor: pointer;
}

.suggest-item:hover,
.suggest-item:focus-visible {
    background: rgba(255, 255, 255, 0.06);
}

.suggest-item__icon {
    flex-shrink: 0;
    opacity: 0.5;
    display: flex;
    align-items: center;
}

.suggest-item__text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.suggest-item__type {
    flex-shrink: 0;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.04);
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
}

.search-icon {
    position: absolute;
    left: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.5);
    pointer-events: none;
}

.filter-pills {
    display: flex;
    gap: 0.8rem;
    overflow-x: auto;
    padding-bottom: 5px;
    /* For scrollbar if needed */
    scrollbar-width: none;
    scroll-snap-type: x mandatory;
    mask-image: linear-gradient(to right, transparent, black 10px, black calc(100% - 10px), transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10px, black calc(100% - 10px), transparent);
    padding-inline: 10px;
}

.filter-pills::-webkit-scrollbar {
    display: none;
}

.filter-pill {
    white-space: nowrap;
    padding: 0.6rem 1.2rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s;
    cursor: pointer;
    scroll-snap-align: start;
}

.filter-pill:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
}

.filter-pill.active {
    background: var(--neon-red);
    color: #fff;
    border-color: var(--neon-red);
}

.filter-pill:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.5);
}

.select-controls-row {
    width: 100%;
}

.sort-wrapper select.filter-pill,
.year-wrapper select.filter-pill,
.limit-wrapper select.filter-pill {
    padding-right: 2.5rem;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1rem;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    min-width: 120px;
}

.sort-wrapper select.filter-pill option,
.year-wrapper select.filter-pill option,
.limit-wrapper select.filter-pill option {
    background: #1a1218;
    color: #fff;
}

.aurora-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 10% 20%, rgba(220, 38, 38, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(180, 30, 30, 0.08) 0%, transparent 40%);
    filter: blur(60px);
    z-index: 0;
    animation: aurora-shift 20s infinite alternate ease-in-out;
}

@keyframes aurora-shift {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }

    100% {
        transform: scale(1.1);
        opacity: 1;
    }
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.noise-overlay {
    position: absolute;
    inset: -150%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.08;
    mix-blend-mode: overlay;
    pointer-events: none;
    z-index: 1;
    animation: tv-static-grain 8s steps(10) infinite;
}

@keyframes tv-static-grain {
    0%, 100% { transform: translate(0, 0); }
    10% { transform: translate(-5%, -10%); }
    20% { transform: translate(-15%, 5%); }
    30% { transform: translate(7%, -25%); }
    40% { transform: translate(-5%, 25%); }
    50% { transform: translate(-15%, 10%); }
    60% { transform: translate(15%, 0%); }
    70% { transform: translate(0%, 15%); }
    80% { transform: translate(3%, 35%); }
    90% { transform: translate(-10%, 10%); }
}

.hero-stats-badge {
    margin-top: 1.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.4rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    backdrop-filter: blur(10px);
}

.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--neon-red);
    box-shadow: 0 0 10px var(--neon-red);
    animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

.total-count-text {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    opacity: 0.6;
    animation: scroll-bounce 2s infinite;
}

.mouse {
    width: 24px;
    height: 36px;
    border: 2px solid rgba(255, 255, 255, 0.6);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    padding-top: 6px;
}

.wheel {
    width: 4px;
    height: 8px;
    background: var(--neon-red);
    border-radius: 2px;
    animation: scroll-wheel 1.5s infinite;
}

@keyframes scroll-wheel {
    0% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(8px); opacity: 0; }
}

@keyframes scroll-bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0) translateX(-50%); }
    40% { transform: translateY(-10px) translateX(-50%); }
    60% { transform: translateY(-5px) translateX(-50%); }
}

/* Active Filters Bar */
.active-filters-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1rem;
    align-items: center;
    min-height: 0;
    transition: min-height 0.3s ease, margin-top 0.3s ease;
}

.active-filters-bar:empty {
    margin-top: 0;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(255, 51, 51, 0.1);
    border: 1px solid rgba(255, 51, 51, 0.3);
    color: #fff;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    animation: chip-in 0.3s var(--transition-bounce) forwards;
}

.filter-chip .chip-label {
    opacity: 0.7;
    margin-right: 0.2rem;
}

.filter-chip .chip-remove {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin-left: 0.2rem;
    transition: color 0.2s;
}

.filter-chip .chip-remove:hover {
    color: #fff;
}

.clear-all-filters {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
    cursor: pointer;
    text-decoration: underline;
    margin-left: 0.5rem;
    transition: color 0.2s;
}

.clear-all-filters:hover {
    color: #fff;
}

@keyframes chip-in {
    from { opacity: 0; transform: scale(0.9) translateY(-5px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.glitch-title {
    font-family: var(--font-heading);
    font-size: 4rem;
    font-weight: 800;
    text-transform: uppercase;
    background: linear-gradient(to right, #fff, #ccc);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.2);
}

/* ... (omitting irrelevant parts) ... */

/* --- Articles Layout (Bento Grid) --- */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    padding: 0 2rem 4rem;
    max-width: 1400px;
    margin: 0 auto;
    min-height: 600px;
    perspective: none;
    transform: skewY(var(--scroll-skew, 0deg));
    transform-origin: center top;
    will-change: transform;
}

/* --- Card Styles --- */
.bento-card {
    background: var(--glass-surface-heavy);
    border: 1px solid var(--glass-border);
    border-radius: 2px;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 15px), calc(100% - 15px) 100%, 0 100%);
    overflow: hidden;
    position: relative;
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Staggered Paragraph Reveal (Scroll-Driven Polyfill Prep) */
.typography-content p, 
.typography-content blockquote, 
.typography-content .article-figure,
.typography-content h2,
.typography-content h3 {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.typography-content p.is-visible, 
.typography-content blockquote.is-visible, 
.typography-content .article-figure.is-visible,
.typography-content h2.is-visible,
.typography-content h3.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.bento-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px -8px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.15);
    z-index: 10;
}

.bento-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(220, 38, 38, 0) 0%, rgba(220, 38, 38, 0.06) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 10;
    pointer-events: none;
    border-radius: 16px;
}

.bento-card::after {
    display: none;
}

/* Card hitbox cursor */
.card-hitbox {
    cursor: pointer;
}

/* Cards visible by default — entrance animation handled by JS intersection observer */
.bento-card.is-visible {
    opacity: 1;
    transform: none;
}

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

.card-image-wrapper {
    position: relative;
    height: 240px;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #111;
}

.card-image-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(18, 18, 20, 0.9) 0%, rgba(18, 18, 20, 0) 50%);
    pointer-events: none;
    z-index: 1;
}

.card-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.media-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(18, 18, 20, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    z-index: 10;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    opacity: 0.9;
    transition: all 0.3s var(--transition-bounce);
}

.bento-card:hover .media-indicator {
    transform: translate(-50%, -50%) scale(1.1);
    background: var(--neon-red);
    border-color: var(--neon-red);
    box-shadow: 0 0 20px rgba(255,51,51,0.6);
    color: #fff;
}

.media-indicator .icon {
    width: 24px;
    height: 24px;
}

.card-overlay-date {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    color: #fff;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    z-index: 2;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    position: relative;
    z-index: 2;
    min-height: 140px;
}

.card-category {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--neon-red);
    margin-bottom: 0.8rem;
    font-weight: 700;
    display: inline-block;
}

.card-title {
    font-family: var(--font-primary, var(--font-ui));
    font-size: 1.25rem;
    line-height: 1.35;
    color: #fff;
    margin-bottom: 0.75rem;
    font-weight: 700;
    display: block;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    /* autoprefixer: ignore next */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-decoration: none;
    text-transform: none;
    letter-spacing: normal;
    transition: color 0.3s;
}

.bento-card:hover .card-title {
    color: rgba(255, 255, 255, 0.95);
}

.card-excerpt {
    font-size: 0.95rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1.5rem;
    display: block;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    /* autoprefixer: ignore next */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-content::after {
    content: '→';
    position: absolute;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--neon-red);
    transform: translateX(-10px);
    opacity: 0;
    transition: all 0.3s var(--transition-bounce);
    font-size: 1.2rem;
    line-height: 1;
}

.bento-card:hover .card-content::after {
    transform: translateX(0);
    opacity: 1;
    background: rgba(255, 255, 255, 0.08);
    color: var(--neon-red);
    border-color: rgba(255, 255, 255, 0.15);
}

/* Featured / Wide Card Variant */
.bento-card.wide {
    grid-column: span 2;
    flex-direction: row;
}

.bento-card.wide .card-image-wrapper {
    width: 50%;
    height: 100%;
}

.bento-card.wide .card-content {
    width: 50%;
    justify-content: center;
}

@media (max-width: 900px) {
    .bento-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1.5rem;
        padding: 0 1rem 3rem;
    }

    .bento-card.wide {
        grid-column: span 1;
        flex-direction: column;
    }

    .bento-card.wide .card-image-wrapper,
    .bento-card.wide .card-content {
        width: 100%;
    }

    .bento-card.wide .card-image-wrapper {
        height: 240px;
    }
}

@media (max-width: 480px) {
    .bento-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
        padding: 0 1rem 2rem;
    }

    .card-image-wrapper {
        height: 200px;
    }

    .card-content {
        padding: 1.25rem;
    }

    .card-title {
        font-size: 1.2rem;
    }

    .glitch-title {
        font-size: 2.5rem;
    }

    .articles-hero-modern {
        padding: 3.5rem 1rem 1rem;
        min-height: 0;
    }

    .controls-modern {
        padding: 0.75rem;
        gap: 1rem;
    }

    .container.sticky-wrapper {
        padding: 0 1rem;
        margin-bottom: 2rem;
    }
}

/* Smart Tags - Minimalist */
.smart-tags {
    margin-top: auto;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.smart-tag {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.04);
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.smart-tag .icon {
    width: 0.85em;
    height: 0.85em;
}

/* Pagination */
.pagination-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-top: 4rem;
}

.pagination-info {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 0.5px;
}

.pagination-modern {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    min-height: 48px;
}

.page-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--glass-surface-light);
    border: 1px solid var(--glass-border);
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
}

.page-btn.active,
.page-btn:hover {
    background: var(--neon-red);
    border-color: var(--neon-red);
    box-shadow: 0 0 15px rgba(255, 51, 51, 0.4);
    transform: scale(1.1);
}

/* Empty State */
.empty-matrix {
    text-align: center;
    padding: 6rem 1rem;
    color: rgba(255, 255, 255, 0.4);
    grid-column: 1 / -1;
}

.empty-matrix i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }

    100% {
        transform: scale(1);
        opacity: 0.5;
    }
}

/* Loading State — visual feedback during AJAX filter/search/sort */
.bento-grid--loading {
    pointer-events: none;
    position: relative;
    transition: opacity 0.2s ease;
}

.bento-grid--loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent 0%, var(--neon-red) 50%, transparent 100%);
    background-size: 200% 100%;
    animation: shimmer-bar 1.2s infinite linear;
    z-index: 10;
    border-radius: 2px;
}

/* Skeleton card placeholders */
.skeleton-card {
    pointer-events: none;
    animation: none !important;
    opacity: 1 !important;
}

.skeleton-card .card-hitbox { display: none; }

.skeleton-card__img {
    width: 100%;
    height: 0;
    padding-bottom: 56.25%;
    background: linear-gradient(110deg, rgba(255,255,255,0.04) 8%, rgba(255,255,255,0.08) 18%, rgba(255,255,255,0.04) 33%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite linear;
    border-radius: 8px;
}

.skeleton-card__line {
    height: 12px;
    border-radius: 6px;
    background: linear-gradient(110deg, rgba(255,255,255,0.04) 8%, rgba(255,255,255,0.08) 18%, rgba(255,255,255,0.04) 33%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite linear;
    margin-bottom: 10px;
}

.skeleton-card__line--cat { width: 60px; height: 10px; }
.skeleton-card__line--title { width: 85%; height: 16px; }
.skeleton-card__line--text { width: 100%; }
.skeleton-card__line--short { width: 65%; }
.skeleton-card__line--tags { width: 120px; height: 10px; margin-top: 14px; }

@keyframes skeleton-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@keyframes shimmer-bar {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Card entrance animation — only for JS-rendered cards with explicit delay */
.bento-card[style*="animation-delay"] {
    opacity: 0;
    animation: card-fade-in 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes card-fade-in {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Server-rendered cards are visible immediately */
.bento-card.is-visible:not([style*="animation-delay"]) {
    opacity: 1;
}

/* Card image zoom on hover */
.bento-card:hover .card-image-wrapper img {
    transform: scale(1.06);
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Card action buttons */
.card-actions {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    display: flex;
    gap: 0.3rem;
    z-index: 10;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.bento-card:hover .card-actions {
    opacity: 1;
    transform: translateY(0);
}

.card-action-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.card-action-btn:hover {
    background: var(--neon-red, #ff3333);
    border-color: var(--neon-red, #ff3333);
    color: #fff;
    transform: scale(1.1);
}

.card-action-btn.saved {
    background: rgba(255, 51, 51, 0.3);
    border-color: rgba(255, 51, 51, 0.5);
    color: #ff3333;
}

/* --- Article Body / Typography Content (legacy Joomla HTML) --- */

.article-body-modern {
    max-width: 720px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.typography-content {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.8;
    font-size: 1.08rem;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* Override Joomla inline text-align: justify which hurts readability */
.typography-content p[style*="text-align: justify"],
.typography-content div[style*="text-align: justify"],
.typography-content span[style*="text-align: justify"] {
    text-align: left !important;
}

.typography-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 1.5rem 0;
}

/* Handle legacy Joomla images with fixed width/height attributes */
.typography-content img[width],
.typography-content img[style*="width"] {
    max-width: 100%;
    width: auto;
    height: auto;
}

/* Images inside paragraphs or strong tags (common Joomla pattern) */
.typography-content p > img,
.typography-content strong > img {
    display: block;
    margin: 1.5rem auto;
}

/* Float images from legacy content */
.typography-content img[style*="float: left"],
.typography-content img[style*="float:left"],
.typography-content img[align="left"] {
    margin: 0.5rem 1.5rem 1rem 0;
    max-width: 45%;
}

.typography-content img[style*="float: right"],
.typography-content img[style*="float:right"],
.typography-content img[align="right"] {
    margin: 0.5rem 0 1rem 1.5rem;
    max-width: 45%;
}

/* Clear floats after float images */
.typography-content::after {
    content: '';
    display: table;
    clear: both;
}

/* Override base.css dark text colors for article content */
.typography-content h1,
.typography-content h2,
.typography-content h3,
.typography-content h4,
.typography-content h5,
.typography-content h6,
.typography-content p,
.typography-content li,
.typography-content span,
.typography-content small,
.typography-content blockquote,
.typography-content td,
.typography-content th,
.typography-content div {
    color: inherit;
}

.typography-content p {
    margin-bottom: 1em;
}

/* Premium Blockquote Styling (Rock Aesthetic) */
.typography-content blockquote {
    position: relative;
    padding: 1.5rem 2rem;
    margin: 2.5rem 0;
    font-size: 1.2rem;
    font-style: italic;
    color: rgba(255, 255, 255, 0.85);
    background: linear-gradient(90deg, rgba(255, 51, 51, 0.08) 0%, transparent 100%);
    border-left: 4px solid var(--neon-red, #ff3333);
    border-radius: 0 12px 12px 0;
}
.typography-content blockquote::before {
    content: '"';
    position: absolute;
    top: -10px;
    left: 10px;
    font-family: Georgia, serif;
    font-size: 4rem;
    color: rgba(255, 51, 51, 0.2);
    line-height: 1;
    pointer-events: none;
}

/* Custom Selection Highlight */
.typography-content ::selection {
    background: rgba(255, 51, 51, 0.4);
    color: #fff;
    text-shadow: none;
}
.typography-content ::-moz-selection {
    background: rgba(255, 51, 51, 0.4);
    color: #fff;
    text-shadow: none;
}

/* Custom Article Scrollbar for Desktop */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #0a0a0f; 
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15); 
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--neon-red, #ff3333); 
}

/* --- Zen Reading Mode --- */
body.zen-mode-active .site-header,
body.zen-mode-active .site-footer,
body.zen-mode-active .article-hero-single,
body.zen-mode-active .article-prev-next-nav,
body.zen-mode-active .related-section-modern,
body.zen-mode-active .sticky-share-bar,
body.zen-mode-active .article-breadcrumbs-modern,
body.zen-mode-active .article-floating-toc {
    display: none !important;
}
body.zen-mode-active {
    background: #000 !important;
}
body.zen-mode-active .article-grid-layout {
    grid-template-columns: 1fr;
    max-width: 900px;
    margin: 4rem auto;
}
body.zen-mode-active .typography-content {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.25rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.9);
}

/* --- Rock Reactions --- */
.article-reactions {
    margin: 4rem 0;
    display: flex;
    justify-content: center;
}
.btn-rock-reaction {
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    padding: 0.75rem 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: visible;
}
.btn-rock-reaction:hover {
    background: rgba(255, 51, 51, 0.1);
    border-color: var(--neon-red);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(255, 51, 51, 0.2);
}
.btn-rock-reaction .rock-icon {
    font-size: 2rem;
    filter: drop-shadow(0 0 5px rgba(255,255,255,0.5));
}
.btn-rock-reaction .rock-count {
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    font-family: var(--font-heading);
}
.rock-animating {
    animation: rock-bump 0.3s ease;
}
@keyframes rock-bump {
    0% { transform: scale(1); }
    50% { transform: scale(1.15) rotate(-5deg); }
    100% { transform: scale(1) rotate(0deg); }
}
.rock-particle {
    position: absolute;
    top: -20px;
    left: 20%;
    font-size: 1.5rem;
    pointer-events: none;
    animation: float-up-fade 1s forwards cubic-bezier(0.2, 1, 0.3, 1);
}
@keyframes float-up-fade {
    0% { transform: translateY(0) scale(0.5); opacity: 1; }
    100% { transform: translateY(-80px) scale(1.5) rotate(15deg); opacity: 0; }
}

.typography-content a {
    color: var(--neon-red, #ff3333);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

.typography-content a:hover {
    color: #fff;
}

/* Converted Joomla {spoiler} -> <details> */
.typography-content details {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    margin: 1.5rem 0;
    padding: 0;
    overflow: hidden;
}

.typography-content details summary {
    padding: 0.8rem 1.2rem;
    cursor: pointer;
    font-weight: 600;
    color: var(--neon-red, #ff3333);
    background: rgba(255, 255, 255, 0.02);
    transition: background 0.2s;
    list-style: none;
}

.typography-content details summary::-webkit-details-marker {
    display: none;
}

.typography-content details summary::before {
    content: '\25B6';
    display: inline-block;
    margin-right: 0.5rem;
    transition: transform 0.2s;
    font-size: 0.8em;
}

.typography-content details[open] summary::before {
    transform: rotate(90deg);
}

.typography-content details summary:hover {
    background: rgba(255, 255, 255, 0.06);
}

.typography-content details > :not(summary) {
    padding: 0 1.2rem;
}

/* Responsive YouTube iframe wrapper */
.typography-content .video-responsive {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    margin: 1.5rem 0;
    border-radius: 8px;
}

.typography-content .video-responsive iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Legacy inline iframe (no wrapper) */
.typography-content iframe[src*="youtube"] {
    max-width: 100%;
    border-radius: 8px;
    margin: 1rem 0;
}

/* Tables from legacy content */
.typography-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    overflow-x: auto;
    display: block;
}

.typography-content td,
.typography-content th {
    padding: 0.6rem 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    vertical-align: top;
}

.typography-content th {
    background: rgba(255, 255, 255, 0.05);
    font-weight: 600;
}

/* Joomla legacy: empty paragraphs used as spacers */
.typography-content p:empty,
.typography-content p > br:only-child {
    display: none;
}

/* List styling */
.typography-content ul,
.typography-content ol {
    padding-left: 1.5rem;
    margin-bottom: 1em;
}

.typography-content li {
    margin-bottom: 0.4em;
    line-height: 1.7;
}

/* First paragraph emphasis */
.typography-content > p:first-child {
    font-size: 1.15rem;
    line-height: 1.75;
}

/* Article lead/excerpt */
.article-lead {
    font-size: 1.15rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.75);
    border-left: 3px solid var(--neon-red, #ff3333);
    padding-left: 1.2rem;
    margin-bottom: 2rem;
}

/* Override base.css dark colors inside article-lead */
.article-lead p,
.article-lead h1,
.article-lead h2,
.article-lead h3,
.article-lead h4,
.article-lead span,
.article-lead div,
.article-lead li,
.article-lead small,
.article-lead blockquote {
    color: inherit;
}

/* Reading Progress Bar */
.reading-progress-track {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.05);
    z-index: 2000;
}
.reading-progress-fill {
    height: 100%;
    background: var(--neon-red, #ff3333);
    width: 0%;
    box-shadow: 0 0 10px var(--neon-red);
    transition: width 0.1s ease-out;
}

/* Modern Tools */
.article-modern-tools {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
}
.article-modern-tools .tts-btn {
    align-self: center;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.article-modern-tools .tts-btn.is-speaking::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 51, 51, 0.2), transparent);
    background-size: 200% 100%;
    animation: tts-wave 1.5s infinite linear;
    z-index: 0;
}

.article-modern-tools .tts-btn.is-speaking {
    border-color: var(--neon-red);
    box-shadow: 0 0 15px rgba(255, 51, 51, 0.3);
}

.article-modern-tools .tts-btn > * {
    position: relative;
    z-index: 1;
}

@keyframes tts-wave {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
.article-modern-tools .tts-btn:hover {
    background: rgba(255,255,255,0.15);
}
.article-ai-summary {
    background: transparent;
    border: none;
    padding: 0;
}
.article-ai-summary summary {
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #90caf9;
}
.article-ai-summary summary::-webkit-details-marker {
    display: none;
}
.ai-summary-content {
    margin-top: 1rem;
    font-size: 0.95rem;
    line-height: 1.6;
    color: rgba(255,255,255,0.85);
}

/* Enhanced Table of Contents */
.article-floating-toc {
    background: rgba(20, 20, 24, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2.5rem;
}
.article-floating-toc ul {
    list-style: none;
    padding: 0;
    margin: 0;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    padding-left: 0.5rem;
}
.article-floating-toc li {
    margin-bottom: 0.2rem;
}
.article-floating-toc li a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 0.4rem 0.75rem;
    border-radius: 4px;
    display: block;
    transition: all 0.2s ease;
}
.article-floating-toc li a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}
.article-floating-toc li.is-active a {
    color: #fff;
    background: rgba(255, 51, 51, 0.15);
    font-weight: 600;
}
.toc-item-h3 {
    padding-left: 1rem !important;
}

@media (max-width: 1100px) {
    .article-modern-tools {
        grid-template-columns: 1fr;
    }
    
    .article-floating-toc {
        position: relative;
        top: 0;
        max-height: 300px;
        margin-bottom: 2rem;
    }
}

@media (max-width: 768px) {
    .article-floating-toc {
        max-height: 200px;
        padding: 1rem;
    }
    .article-floating-toc .toc-title {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }
    .article-floating-toc li a {
        padding: 0.3rem 0.5rem;
        font-size: 0.85rem;
    }
}

/* Image Figures & Captions */
.article-figure {
    margin: 2rem auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.article-figure img {
    border-radius: 6px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    max-width: 100%;
    height: auto;
}
.article-figcaption {
    margin-top: 0.75rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
    max-width: 80%;
    line-height: 1.4;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.5rem;
}

/* Mobile Filter Drawer (2026-2027 Standard) */
.mobile-filter-fab {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--neon-red, #ff3333);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    box-shadow: 0 4px 20px rgba(255, 51, 51, 0.4);
    z-index: 100;
    cursor: pointer;
    transition: transform 0.3s var(--transition-bounce), box-shadow 0.3s;
}

.mobile-filter-fab:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(255, 51, 51, 0.6);
}

.drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 80;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.drawer-overlay.drawer-open {
    opacity: 1;
    pointer-events: auto;
}

@media (max-width: 900px) {
    .mobile-filter-fab {
        display: flex;
    }
    
    .controls-modern {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: rgba(18, 18, 20, 0.95);
        backdrop-filter: blur(20px);
        padding: 2rem;
        border-radius: 20px 20px 0 0;
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-bottom: none;
        z-index: 90;
        transform: translateY(100%);
        transition: transform 0.4s var(--transition-bounce);
        max-height: 85vh;
        overflow-y: auto;
        display: block;
    }

    .controls-modern.drawer-open {
        transform: translateY(0);
    }
    
    .filter-group {
        margin-bottom: 1.5rem;
    }
    
    .filter-pills {
        flex-wrap: wrap;
        overflow: visible;
        mask-image: none;
        -webkit-mask-image: none;
        padding-inline: 0;
    }
    
    .filter-pill {
        scroll-snap-align: none;
        flex: 1 1 auto;
        text-align: center;
        justify-content: center;
    }
}

/* --- Load More (Encore) Button --- */
.pagination-modern {
    text-align: center;
    width: 100%;
}

.btn-rock-encore {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 2.5rem;
    background: rgba(20, 20, 22, 0.8);
    color: var(--neon-red);
    border: 1px solid var(--neon-red);
    border-radius: 30px;
    font-family: var(--font-primary, var(--font-ui));
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    margin: 2rem auto;
    backdrop-filter: blur(8px);
}

.btn-rock-encore:hover, .btn-rock-encore:focus-visible {
    background: var(--neon-red);
    color: #fff;
    box-shadow: 0 0 20px rgba(255, 51, 51, 0.4), inset 0 0 10px rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    outline: none;
}

.btn-rock-encore:active {
    transform: translateY(1px);
    box-shadow: 0 0 10px rgba(255, 51, 51, 0.4);
}

.btn-rock-encore.loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn-rock-encore.loading svg {
    animation: encore-spin 1s linear infinite;
}

@keyframes encore-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ==========================================================
   FEATURE 1: VIEW MODE TOGGLE (Grid / List / Compact)
   ========================================================== */
.view-toggle-group {
    display: flex;
    gap: 0.25rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 0.2rem;
    flex-shrink: 0;
}

.view-toggle-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.view-toggle-btn:hover {
    color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.05);
}

.view-toggle-btn.active {
    color: #fff;
    background: var(--neon-red, #ff3333);
    box-shadow: 0 0 8px rgba(255, 51, 51, 0.3);
}

.view-toggle-btn svg {
    width: 18px;
    height: 18px;
}

/* List Mode */
.bento-grid.view-list {
    grid-template-columns: 1fr;
    gap: 1rem;
}

.bento-grid.view-list .bento-card {
    flex-direction: row;
    clip-path: none;
    border-radius: 12px;
}

.bento-grid.view-list .bento-card.wide {
    grid-column: span 1;
    flex-direction: row;
}

.bento-grid.view-list .card-image-wrapper {
    width: 280px;
    min-width: 280px;
    height: auto;
    aspect-ratio: 16 / 9;
}

.bento-grid.view-list .card-content {
    width: auto;
    flex: 1;
}

/* Compact Mode */
.bento-grid.view-compact {
    grid-template-columns: 1fr;
    gap: 0.5rem;
}

.bento-grid.view-compact .bento-card {
    flex-direction: row;
    clip-path: none;
    border-radius: 8px;
    min-height: auto;
}

.bento-grid.view-compact .bento-card.wide {
    grid-column: span 1;
    flex-direction: row;
}

.bento-grid.view-compact .card-image-wrapper {
    display: none;
}

.bento-grid.view-compact .card-content {
    padding: 0.8rem 1rem;
    min-height: auto;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.bento-grid.view-compact .card-category {
    margin-bottom: 0;
    font-size: 0.65rem;
}

.bento-grid.view-compact .card-title {
    font-size: 0.95rem;
    margin-bottom: 0;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    flex: 1;
    min-width: 200px;
}

.bento-grid.view-compact .card-excerpt {
    display: none;
}

.bento-grid.view-compact .card-author {
    margin-bottom: 0;
}

.bento-grid.view-compact .card-content::after {
    display: none;
}

.bento-grid.view-compact .smart-tags {
    margin-top: 0;
}

@media (max-width: 900px) {
    .bento-grid.view-list .card-image-wrapper {
        width: 180px;
        min-width: 180px;
    }
}

@media (max-width: 480px) {
    .bento-grid.view-list .bento-card {
        flex-direction: column;
    }
    .bento-grid.view-list .card-image-wrapper {
        width: 100%;
        min-width: auto;
        height: 200px;
    }
}

/* ==========================================================
   FEATURE 2: KEYBOARD NAV HIGHLIGHT
   ========================================================== */
.bento-card.card-highlighted {
    outline: 2px solid var(--neon-red, #ff3333);
    outline-offset: 2px;
    box-shadow: 0 0 20px rgba(255, 51, 51, 0.3);
    z-index: 20;
}

/* Focus-visible for keyboard accessibility */
.bento-card:focus-within {
    outline: 2px solid rgba(255, 255, 255, 0.3);
    outline-offset: 2px;
}
.card-hitbox:focus-visible {
    outline: 2px solid var(--neon-red, #ff3333);
    outline-offset: -2px;
    border-radius: 12px;
}
.view-toggle-btn:focus-visible,
.card-action-btn:focus-visible,
.page-btn:focus-visible,
.filter-pill:focus-visible {
    outline: 2px solid var(--neon-red, #ff3333);
    outline-offset: 2px;
}

/* Clickable tags on cards */
.smart-tag--clickable {
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.smart-tag--clickable:hover {
    background: rgba(255, 51, 51, 0.15) !important;
    border-color: rgba(255, 51, 51, 0.3) !important;
}
.smart-tag--clickable:focus-visible {
    outline: 2px solid var(--neon-red, #ff3333);
    outline-offset: 1px;
}

/* ==========================================================
   FEATURE 3: SEARCH HIGHLIGHTING (<mark> in cards)
   ========================================================== */
.bento-card mark,
.card-content mark {
    background: rgba(255, 51, 51, 0.25);
    color: inherit;
    padding: 0 2px;
    border-radius: 2px;
    font-weight: 600;
}

/* ==========================================================
   FEATURE 4: FEATURED HERO CARD
   ========================================================== */
.featured-hero {
    display: block;
    position: relative;
    min-height: 280px;
    border-radius: 16px;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    text-decoration: none;
    color: #fff;
    margin: 0 2rem 2rem;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: hero-entrance 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes hero-entrance {
    from { opacity: 0; transform: translateY(16px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.featured-hero:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.featured-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10, 10, 15, 0.95) 0%, rgba(10, 10, 15, 0.4) 50%, rgba(10, 10, 15, 0.1) 100%);
    z-index: 1;
}

.featured-hero__content {
    position: relative;
    z-index: 2;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 280px;
}

.featured-hero__category {
    display: inline-block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--neon-red, #ff3333);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.featured-hero__title {
    font-size: 1.8rem;
    line-height: 1.25;
    font-weight: 800;
    margin-bottom: 0.5rem;
    max-width: 700px;
}

.featured-hero__excerpt {
    font-size: 0.95rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.7);
    max-width: 600px;
    margin-bottom: 1rem;
}

.featured-hero__cta {
    display: inline-block;
    color: var(--neon-red, #ff3333);
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

@media (max-width: 900px) {
    .featured-hero {
        margin: 0 1rem 1.5rem;
        min-height: 220px;
    }
    .featured-hero__content {
        min-height: 220px;
        padding: 1.5rem;
    }
    .featured-hero__title {
        font-size: 1.4rem;
    }
}

@media (max-width: 480px) {
    .featured-hero {
        margin: 0 1rem 1rem;
        min-height: 200px;
        border-radius: 12px;
    }
    .featured-hero__title {
        font-size: 1.2rem;
    }
}

/* ==========================================================
   FEATURE 5: AUTHOR AVATAR ON CARDS
   ========================================================== */
.card-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.author-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
    text-transform: uppercase;
}

.author-name {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ==========================================================
   FEATURE 6: READING PROGRESS BAR
   ========================================================== */
.reading-progress {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem 0.5rem;
}

.reading-progress__bar {
    flex: 1;
    height: 3px;
    background: var(--neon-red, #ff3333);
    border-radius: 2px;
    transition: width 0.5s ease;
    opacity: 0.6;
}

.reading-progress__text {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.35);
    white-space: nowrap;
    letter-spacing: 0.3px;
}

@media (max-width: 480px) {
    .reading-progress {
        padding: 0 1rem 0.5rem;
    }
}

/* ==========================================================
   MASONRY VIEW MODE (4th mode — CSS columns)
   ========================================================== */
.bento-grid.view-masonry {
    columns: 3;
    column-gap: 1.5rem;
    display: block;
    grid-template-columns: none;
}

.bento-grid.view-masonry .bento-card {
    break-inside: avoid;
    margin-bottom: 1.5rem;
    display: inline-block;
    width: 100%;
}

.bento-grid.view-masonry .bento-card.wide {
    grid-column: span 1;
    flex-direction: column;
}

.bento-grid.view-masonry .card-image-wrapper {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
}

@media (max-width: 1100px) {
    .bento-grid.view-masonry {
        columns: 2;
    }
}

@media (max-width: 600px) {
    .bento-grid.view-masonry {
        columns: 1;
    }
}

/* ==========================================================
   FRESHNESS INDICATOR (subtle glow on recent articles)
   ========================================================== */
.bento-card[style*="--freshness-opacity"]::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(ellipse at 50% 0%, rgba(255, 51, 51, 0.12) 0%, transparent 70%);
    opacity: var(--freshness-opacity, 0);
    pointer-events: none;
    z-index: 5;
    transition: opacity 0.3s ease;
}

.bento-card .card-badge--new {
    background: rgba(255, 51, 51, 0.2);
    color: #ff3333;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    position: absolute;
    top: 0.75rem;
    right: auto;
    bottom: auto;
    left: 0.75rem;
    z-index: 3;
}

.bento-card .card-badge--popular {
    background: rgba(255, 165, 0, 0.15);
    color: #ffa500;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    position: absolute;
    top: auto;
    right: auto;
    bottom: 0.75rem;
    left: 0.75rem;
    z-index: 3;
}

.bento-card .card-badge--read {
    background: rgba(0, 200, 83, 0.15);
    color: #4caf50;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 3;
}

/* Trending badge — for articles with high view counts */
.card-badge--trending {
    background: rgba(255, 165, 0, 0.15);
    color: #ffa500;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 3;
}

/* ==========================================================
   BACK-TO-TOP FAB
   ========================================================== */
.back-to-top-fab {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(18, 18, 20, 0.85);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 90;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.back-to-top-fab.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.back-to-top-fab:hover {
    background: var(--neon-red, #ff3333);
    color: #fff;
    border-color: var(--neon-red, #ff3333);
    box-shadow: 0 4px 15px rgba(255, 51, 51, 0.4);
}

.back-to-top-fab svg {
    width: 20px;
    height: 20px;
}

@media (max-width: 900px) {
    .back-to-top-fab {
        bottom: 5rem;
        left: 1rem;
    }
}

/* ==========================================================
   PRINT STYLES
   ========================================================== */
@media print {
    .articles-hero-modern,
    .controls-modern,
    .mobile-filter-fab,
    #active-filters-bar,
    #reading-progress,
    .view-toggle-group,
    .pagination-wrapper,
    .pagination-modern,
    .back-to-top-fab,
    .card-hitbox,
    .card-actions,
    .featured-hero,
    nav,
    .site-footer,
    .nav-container,
    #infinite-scroll-sentinel {
        display: none !important;
    }

    body {
        background: #fff !important;
        color: #000 !important;
    }

    .bento-grid {
        display: block !important;
        columns: unset !important;
    }

    .bento-card {
        break-inside: avoid;
        page-break-inside: avoid;
        border: 1px solid #ddd;
        border-radius: 4px;
        margin-bottom: 12px;
        padding: 12px;
        background: #fff !important;
        box-shadow: none !important;
        position: static !important;
        display: block !important;
        width: 100% !important;
        opacity: 1 !important;
        transform: none !important;
    }

    .bento-card.wide {
        grid-column: auto !important;
    }

    .card-image-wrapper {
        display: none !important;
    }

    .card-content {
        color: #000 !important;
    }

    .card-title {
        color: #000 !important;
        font-size: 14pt !important;
        margin: 0 0 4px !important;
    }

    .card-excerpt {
        color: #333 !important;
        font-size: 10pt !important;
    }

    .card-category,
    .card-author,
    .smart-tags {
        color: #666 !important;
        font-size: 9pt !important;
    }

    .card-category::before {
        content: '';
    }

    a {
        color: #000 !important;
        text-decoration: none !important;
    }

    a[href]::after {
        content: ' (' attr(href) ')';
        font-size: 8pt;
        color: #666;
    }

    .card-hitbox + .card-image-wrapper ~ .card-content a::after,
    .smart-tag--clickable::after,
    .card-action-btn::after {
        display: none;
    }
}