/* ============================================================
   Curo — Premium Dark Frontend (Futuristic Editorial)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600;700;800&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg:            #060606;
    --bg2:           #0D0D0F;
    --bg3:           #111114;
    --card-bg:       linear-gradient(180deg, rgba(255,255,255,0.045) 0%, rgba(255,255,255,0.018) 100%);
    --card-border:   rgba(255,255,255,0.07);
    --card-hover-border: rgba(255,255,255,0.13);

    --text:          #ffffff;
    --text-sub:      rgba(255,255,255,0.68);
    --text-muted:    rgba(255,255,255,0.38);

    --cyan:          #00E5FF;
    --teal:          #00FFC6;
    --cyan-glow:     rgba(0,229,255,0.18);
    --teal-glow:     rgba(0,255,198,0.15);

    --radius-card:   28px;
    --radius-badge:  999px;
    --radius-btn:    999px;

    --font:          'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
    --font-serif:    'Plus Jakarta Sans', Georgia, serif;

    --transition:    all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);

    --shadow-card:   0 8px 40px rgba(0,0,0,0.55);
    --shadow-hover:  0 20px 60px rgba(0,0,0,0.75), 0 0 40px rgba(0,229,255,0.06);
}

/* ── Base ───────────────────────────────────────────────── */
html  { scroll-behavior: smooth; background: var(--bg); }
body  {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    position: relative;
}
img   { display: block; max-width: 100%; height: auto; }
a     { color: inherit; text-decoration: none; transition: var(--transition); }

/* ── Noise Texture Overlay ──────────────────────────────── */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
    opacity: 0.45;
}

/* ── Global Background Glows ────────────────────────────── */
.bg-glow-cyan {
    position: fixed; top: -20%; left: 50%; transform: translateX(-50%);
    width: 900px; height: 600px;
    background: radial-gradient(ellipse, rgba(0,229,255,0.055) 0%, transparent 70%);
    pointer-events: none; z-index: 0;
}
.bg-glow-purple {
    position: fixed; bottom: 10%; right: -10%;
    width: 700px; height: 700px;
    background: radial-gradient(ellipse, rgba(139,92,246,0.045) 0%, transparent 65%);
    pointer-events: none; z-index: 0;
}
.bg-glow-pink {
    position: fixed; top: 40%; left: -8%;
    width: 600px; height: 600px;
    background: radial-gradient(ellipse, rgba(236,72,153,0.035) 0%, transparent 65%);
    pointer-events: none; z-index: 0;
}

/* ── Floating Particles Canvas ──────────────────────────── */
#particles-canvas {
    position: fixed; inset: 0;
    pointer-events: none; z-index: 0;
    opacity: 0.5;
}

/* ── Container ──────────────────────────────────────────── */
.container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 80px;
    position: relative; z-index: 1;
}
@media (max-width: 1200px) { .container { padding: 0 40px; } }
@media (max-width: 768px)  { .container { padding: 0 20px; } }

/* ── Breaking News Bar ──────────────────────────────────── */
.breaking-bar {
    background: linear-gradient(90deg, rgba(0,229,255,0.12), rgba(0,255,198,0.08), rgba(0,229,255,0.12));
    border-bottom: 1px solid rgba(0,229,255,0.15);
    color: #fff;
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .55rem 1.5rem;
    font-size: .78rem;
    font-weight: 600;
    overflow: hidden;
    position: relative; z-index: 10;
}
.breaking-label {
    background: linear-gradient(135deg, var(--cyan), var(--teal));
    color: #060606;
    padding: .18rem .65rem;
    border-radius: 4px;
    font-size: .68rem;
    letter-spacing: .1em;
    white-space: nowrap;
    flex-shrink: 0;
    font-weight: 800;
}
.breaking-ticker { overflow: hidden; }
.breaking-ticker span { animation: ticker 30s linear infinite; display: inline-block; white-space: nowrap; color: rgba(255,255,255,0.8); }
@keyframes ticker { 0% { transform: translateX(100%); } 100% { transform: translateX(-100%); } }

/* ── Header ─────────────────────────────────────────────── */
.site-header {
    background: rgba(6,6,6,0.82);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}
.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding-top: 1rem;
    padding-bottom: 1rem;
}
.logo { display: flex; align-items: center; flex-shrink: 0; }
.logo-text {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -.04em;
}
.logo-text span {
    background: linear-gradient(135deg, var(--cyan) 0%, var(--teal) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.logo-img { height: 36px; width: auto; }

.main-nav { display: flex; align-items: center; gap: .25rem; }
.nav-link {
    padding: .42rem .95rem;
    border-radius: var(--radius-badge);
    font-size: .85rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: var(--transition-fast);
    white-space: nowrap;
}
.nav-link:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.nav-link.active {
    background: linear-gradient(135deg, rgba(0,229,255,0.12), rgba(0,255,198,0.08));
    color: var(--cyan);
    font-weight: 600;
    border: 1px solid rgba(0,229,255,0.18);
}
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: .4rem;
}
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: var(--transition-fast); }

/* ── Hero Section ───────────────────────────────────────── */
.hero-section {
    padding: 120px 0 0;
    text-align: center;
    position: relative; z-index: 1;
}
.hero-title {
    font-family: var(--font);
    font-size: clamp(42px, 6vw, 72px);
    font-weight: 800;
    color: var(--text);
    letter-spacing: -.04em;
    line-height: 1.08;
    margin-bottom: 1.25rem;
}
.hero-title span {
    background: linear-gradient(135deg, var(--cyan) 0%, var(--teal) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 24px rgba(0,229,255,0.35));
}
.hero-sub {
    color: var(--text-sub);
    font-size: 18px;
    margin: 0 auto 36px;
    max-width: 700px;
    line-height: 1.7;
    font-weight: 400;
}

/* ── Category Filter Buttons ────────────────────────────── */
.category-tabs {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 60px;
    padding-bottom: 60px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.tab {
    height: 44px;
    padding: 0 22px;
    border-radius: var(--radius-badge);
    font-size: .85rem;
    font-weight: 600;
    color: rgba(255,255,255,0.7);
    background: var(--bg3);
    border: 1px solid rgba(255,255,255,0.04);
    cursor: pointer;
    transition: var(--transition-fast);
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}
.tab:hover {
    color: var(--text);
    background: rgba(255,255,255,0.07);
    border-color: rgba(255,255,255,0.09);
    transform: scale(1.04);
}
.tab.active {
    background: linear-gradient(135deg, var(--teal) 0%, var(--cyan) 100%);
    color: #060606;
    border-color: transparent;
    font-weight: 700;
    box-shadow: 0 0 20px rgba(0,229,255,0.3), 0 4px 16px rgba(0,255,198,0.2);
    transform: scale(1.04);
}

/* ── Articles Grid ──────────────────────────────────────── */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 28px;
    padding-bottom: 120px;
    position: relative; z-index: 1;
}
@media (max-width: 1400px) { .articles-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 1100px) { .articles-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px)  { .articles-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; padding-bottom: 60px; } }
@media (max-width: 520px)  { .articles-grid { grid-template-columns: 1fr; } }

/* ── Article Card ───────────────────────────────────────── */
.article-card {
    background: var(--card-bg);
    border-radius: var(--radius-card);
    border: 1px solid var(--card-border);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    height: 520px;
    opacity: 0;
    transform: translateY(32px);
    animation: cardFadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
.article-card:hover {
    transform: translateY(-8px) !important;
    box-shadow: var(--shadow-hover);
    border-color: var(--card-hover-border);
}

/* Stagger animation delays */
.article-card:nth-child(1)  { animation-delay: 0.05s; }
.article-card:nth-child(2)  { animation-delay: 0.10s; }
.article-card:nth-child(3)  { animation-delay: 0.15s; }
.article-card:nth-child(4)  { animation-delay: 0.20s; }
.article-card:nth-child(5)  { animation-delay: 0.25s; }
.article-card:nth-child(6)  { animation-delay: 0.30s; }
.article-card:nth-child(7)  { animation-delay: 0.35s; }
.article-card:nth-child(8)  { animation-delay: 0.40s; }
.article-card:nth-child(9)  { animation-delay: 0.45s; }
.article-card:nth-child(10) { animation-delay: 0.50s; }

@keyframes cardFadeIn {
    to { opacity: 1; transform: translateY(0); }
}

/* ── Card Image Zone (top 62%) ──────────────────────────── */
.card-image-wrap {
    display: block;
    position: relative;
    overflow: hidden;
    height: 62%;
    flex-shrink: 0;
}

/* Category gradient fallbacks when no image */
.category-research     .card-image-wrap { background: linear-gradient(145deg, #1a0533 0%, #4c1d95 50%, #7c3aed 100%); }
.category-technology   .card-image-wrap { background: linear-gradient(145deg, #001a33 0%, #0369a1 50%, #06b6d4 100%); }
.category-nutrition    .card-image-wrap { background: linear-gradient(145deg, #1c0a00 0%, #c2410c 50%, #f59e0b 100%); }
.category-news         .card-image-wrap { background: linear-gradient(145deg, #1a0010 0%, #9d174d 50%, #ec4899 100%); }
.category-tips         .card-image-wrap { background: linear-gradient(145deg, #001a0f 0%, #065f46 50%, #10b981 100%); }
.category-mental-health .card-image-wrap { background: linear-gradient(145deg, #130024 0%, #6d28d9 40%, #db2777 100%); }
.category-default      .card-image-wrap { background: linear-gradient(145deg, #0d0d0f 0%, #1e3a5f 100%); }

/* Gradient overlay on image */
.card-image-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.72) 0%, rgba(0,0,0,0.15) 55%, transparent 100%);
    z-index: 2;
    pointer-events: none;
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    inset: 0;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.article-card:hover .card-image { transform: scale(1.07); }

/* ── Category Badge ─────────────────────────────────────── */
.category-badge {
    position: absolute;
    top: 16px; left: 16px;
    padding: 7px 13px;
    font-size: 11px;
    font-weight: 700;
    border-radius: var(--radius-badge);
    letter-spacing: .06em;
    text-transform: uppercase;
    z-index: 10;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.12);
    color: #fff;
}
/* Badge colors by category */
.category-research     .category-badge { background: rgba(124,58,237,0.55); box-shadow: 0 0 12px rgba(124,58,237,0.4); }
.category-technology   .category-badge { background: rgba(6,182,212,0.5);   box-shadow: 0 0 12px rgba(6,182,212,0.35); }
.category-nutrition    .category-badge { background: rgba(234,88,12,0.52);  box-shadow: 0 0 12px rgba(234,88,12,0.35); }
.category-news         .category-badge { background: rgba(219,39,119,0.5);  box-shadow: 0 0 12px rgba(219,39,119,0.35); }
.category-tips         .category-badge { background: rgba(16,185,129,0.5);  box-shadow: 0 0 12px rgba(16,185,129,0.35); }
.category-mental-health .category-badge { background: rgba(139,92,246,0.5); box-shadow: 0 0 12px rgba(139,92,246,0.38); }

/* ── Card Content Area ──────────────────────────────────── */
.card-body {
    padding: 20px 22px 18px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 10px;
    background: transparent;
    min-height: 0;
}
.card-title {
    display: none; /* title shown in overlay only */
}

/* Overlay content for title */
.card-overlay-content {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    z-index: 5;
    padding: 18px 18px 16px;
}
.card-overlay-title {
    color: #ffffff;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.35;
    text-shadow: 0 2px 12px rgba(0,0,0,0.5);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Card Footer ────────────────────────────────────────── */
.card-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: var(--text-muted);
    flex-wrap: wrap;
}
.card-date { font-weight: 400; }
.card-source {
    font-weight: 600;
    color: rgba(255,255,255,0.45);
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.card-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: auto;
}
.tag {
    font-size: 12px;
    font-weight: 600;
    color: var(--cyan);
    letter-spacing: 0.01em;
    text-shadow: 0 0 8px rgba(0,229,255,0.4);
}

/* ── Empty State ────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 120px 1.5rem;
    color: var(--text-muted);
    position: relative; z-index: 1;
}
.empty-icon { font-size: 4rem; margin-bottom: 1.5rem; filter: grayscale(0.5); }
.empty-state h3 { font-size: 1.6rem; font-weight: 700; margin-bottom: .6rem; color: var(--text); }
.empty-state p { color: var(--text-sub); }

/* ── Pagination ─────────────────────────────────────────── */
.pagination-wrap { display: flex; justify-content: center; padding: 0 0 80px; position: relative; z-index: 1; }
.pagination-nav  { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; justify-content: center; }
.page-btn {
    height: 40px;
    min-width: 40px;
    padding: 0 14px;
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 10px;
    font-size: .85rem;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg3);
    transition: var(--transition-fast);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.page-btn:hover:not(.disabled):not(.active) {
    border-color: rgba(255,255,255,0.14);
    color: var(--text);
    background: rgba(255,255,255,0.05);
}
.page-btn.active {
    background: linear-gradient(135deg, var(--teal), var(--cyan));
    color: #060606;
    border-color: transparent;
    font-weight: 700;
    box-shadow: 0 0 16px rgba(0,229,255,0.3);
}
.page-btn.disabled { opacity: .3; cursor: not-allowed; pointer-events: none; }
.page-dots { padding: 0 .25rem; color: var(--text-muted); }

/* ── Article Page ───────────────────────────────────────── */
.article-page { padding-bottom: 80px; position: relative; z-index: 1; }
.article-container { max-width: 800px; padding-top: 48px; }
.back-link {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-size: .85rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: var(--radius-badge);
    border: 1px solid rgba(255,255,255,0.06);
    background: var(--bg3);
    transition: var(--transition-fast);
}
.back-link:hover { color: var(--cyan); border-color: rgba(0,229,255,0.2); background: rgba(0,229,255,0.05); }

.article-header { margin-bottom: 2rem; }
.category-badge-lg {
    display: inline-flex;
    align-items: center;
    height: 30px;
    padding: 0 14px;
    border-radius: var(--radius-badge);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-bottom: 1.25rem;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(8px);
}
.article-title {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -.03em;
    margin-bottom: 1.25rem;
    color: var(--text);
}
.article-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: .85rem; color: var(--text-muted); }
.author-info { display: flex; align-items: center; gap: .55rem; }
.author-avatar { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; border: 1px solid rgba(255,255,255,0.1); }
.meta-divider { color: rgba(255,255,255,0.15); }
.article-views { font-weight: 500; }

.article-hero-image {
    margin: 2rem 0;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.07);
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.article-img { width: 100%; max-height: 520px; object-fit: cover; }

.article-body {
    font-size: 1.1rem;
    line-height: 1.85;
    color: rgba(255,255,255,0.82);
}
.article-body h2, .article-body h3 {
    color: var(--text);
    font-weight: 700;
    margin: 2.5rem 0 1rem;
    letter-spacing: -.02em;
}
.article-body h2 {
    font-size: 1.7rem;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    padding-bottom: .6rem;
}
.article-body h3 { font-size: 1.35rem; }
.article-body p  { margin-bottom: 1.5rem; }
.article-body ul, .article-body ol { padding-left: 1.75rem; margin-bottom: 1.5rem; }
.article-body li { margin-bottom: .5rem; }
.article-body blockquote {
    border-left: 3px solid var(--cyan);
    padding: 1.25rem 1.5rem;
    margin: 2rem 0;
    background: rgba(0,229,255,0.04);
    border-radius: 0 12px 12px 0;
    font-style: italic;
    color: rgba(255,255,255,0.8);
    border-top: 1px solid rgba(0,229,255,0.06);
    border-right: 1px solid rgba(0,229,255,0.06);
    border-bottom: 1px solid rgba(0,229,255,0.06);
    box-shadow: inset 0 0 40px rgba(0,229,255,0.02);
}
.article-body img { border-radius: 16px; margin: 1.5rem 0; border: 1px solid rgba(255,255,255,0.07); }
.article-body a { color: var(--cyan); text-decoration: underline; font-weight: 500; }
.article-body a:hover { color: var(--teal); }

.article-tags { display: flex; gap: 8px; flex-wrap: wrap; margin: 2.5rem 0; }
.tag-lg {
    font-size: .82rem;
    color: var(--cyan);
    font-weight: 700;
    padding: 6px 14px;
    background: rgba(0,229,255,0.07);
    border-radius: var(--radius-badge);
    border: 1px solid rgba(0,229,255,0.15);
    text-shadow: 0 0 8px rgba(0,229,255,0.3);
    transition: var(--transition-fast);
}
.tag-lg:hover { background: rgba(0,229,255,0.13); box-shadow: 0 0 16px rgba(0,229,255,0.15); }

/* ── Share Section ──────────────────────────────────────── */
.share-section { border-top: 1px solid rgba(255,255,255,0.06); padding-top: 2rem; margin-top: 3rem; }
.share-section h4 { font-size: 1rem; font-weight: 700; margin-bottom: 1rem; color: var(--text); }
.share-buttons { display: flex; gap: .65rem; flex-wrap: wrap; }
.share-btn {
    display: inline-flex; align-items: center; gap: .45rem;
    padding: .55rem 1.15rem;
    border-radius: 10px;
    font-size: .85rem; font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition-fast);
}
.share-btn:hover { opacity: .9; transform: translateY(-2px); }
.share-fb   { background: #1877f2; color: #fff; }
.share-tw   { background: #111; color: #fff; border: 1px solid rgba(255,255,255,0.1); }
.share-wa   { background: #25d366; color: #fff; }
.share-copy { background: var(--bg3); color: var(--text); border: 1px solid rgba(255,255,255,0.08); }
.share-copy:hover { border-color: var(--cyan); color: var(--cyan); }

/* ── Related Articles ───────────────────────────────────── */
.related-section {
    background: var(--bg2);
    border-top: 1px solid rgba(255,255,255,0.05);
    padding: 60px 0 80px;
    margin-top: 60px;
    position: relative; z-index: 1;
}
.related-title {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 1.75rem;
    color: var(--text);
    letter-spacing: -.03em;
}
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
.related-card {
    background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.06);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}
.related-card:hover { transform: translateY(-5px); border-color: rgba(255,255,255,0.11); box-shadow: 0 12px 40px rgba(0,0,0,0.4); }
.related-img-wrap {
    display: block;
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
    background: var(--bg3);
}
.related-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: var(--transition); opacity: 0.85; }
.related-card:hover img { transform: scale(1.05); }
.category-badge-sm {
    position: absolute; top: .55rem; left: .55rem;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.1);
    color: #fff;
    font-size: .62rem; font-weight: 700;
    padding: .18rem .55rem;
    border-radius: var(--radius-badge);
    text-transform: uppercase;
    letter-spacing: .05em;
}
.related-body { padding: 14px 16px; display: flex; flex-direction: column; flex: 1; justify-content: space-between; }
.related-body h4 {
    font-size: .9rem; font-weight: 700; line-height: 1.4; margin-bottom: .5rem; color: var(--text);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.related-body h4 a:hover { color: var(--cyan); }
.related-body .card-date { font-size: .75rem; color: var(--text-muted); }

/* ── Footer ─────────────────────────────────────────────── */
.site-footer {
    background: var(--bg2);
    border-top: 1px solid rgba(255,255,255,0.05);
    padding: 40px 0;
    margin-top: 0;
    position: relative; z-index: 1;
}
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 1rem; text-align: center; }
.footer-logo  { font-size: 1.5rem; font-weight: 800; color: var(--text); letter-spacing: -.03em; }
.footer-logo span {
    background: linear-gradient(135deg, var(--cyan), var(--teal));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.footer-copy   { font-size: .82rem; color: var(--text-muted); max-width: 480px; }
.footer-links  { display: flex; gap: 1.5rem; flex-wrap: wrap; justify-content: center; }
.footer-links a { font-size: .82rem; color: var(--text-muted); }
.footer-links a:hover { color: var(--cyan); }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 768px) {
    .main-nav {
        display: none; flex-direction: column;
        position: absolute; top: 100%; left: 0; right: 0;
        background: rgba(6,6,6,0.97);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-bottom: 1px solid rgba(255,255,255,0.06);
        padding: 1.25rem 1rem;
        gap: .35rem;
    }
    .main-nav.open    { display: flex; }
    .nav-toggle       { display: flex; }
    .hero-section     { padding: 60px 0 0; }
    .hero-title       { font-size: 38px; }
    .hero-sub         { font-size: 16px; }
    .category-tabs    { gap: 10px; margin-bottom: 32px; padding-bottom: 32px; }
    .related-grid     { grid-template-columns: 1fr 1fr; }
    .article-container { padding-top: 28px; }
}
@media (max-width: 480px) {
    .related-grid     { grid-template-columns: 1fr; }
    .share-buttons    { flex-direction: column; }
    .share-btn        { justify-content: center; }
}
@media (min-width: 769px) {
    .footer-inner { flex-direction: row; justify-content: space-between; text-align: left; }
}

/* ============================================================
   AJAX Navigation — Progress Bar, Transitions, Skeleton
   ============================================================ */

/* ── Progress bar ─────────────────────────────────────────── */
#ajax-progress {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 3px;
    z-index: 99999;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.18s ease;
}
#ajax-progress.active {
    opacity: 1;
}
#ajax-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #00E5FF, #00FFC6, #00E5FF);
    background-size: 200% 100%;
    animation: progressShine 1.4s linear infinite;
    border-radius: 0 999px 999px 0;
    box-shadow: 0 0 12px rgba(0,229,255,0.7), 0 0 4px rgba(0,229,255,0.9);
    transition: width 0.18s ease;
    /* Glow pulse at the tip */
}
#ajax-progress-bar::after {
    content: '';
    position: absolute;
    right: 0; top: -2px;
    width: 70px; height: 7px;
    background: radial-gradient(ellipse at right, rgba(0,229,255,0.8) 0%, transparent 70%);
    border-radius: 999px;
}
@keyframes progressShine {
    0%   { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

/* ── Page veil (subtle overlay during transition) ────────── */
#page-veil {
    position: fixed;
    inset: 0;
    background: rgba(6,6,6,0);
    pointer-events: none;
    z-index: 999;
    transition: background 0.22s ease;
}
#page-veil.active {
    background: rgba(6,6,6,0.25);
}

/* ── Main content transition wrapper ─────────────────────── */
.main-content {
    will-change: opacity, transform;
}

/* ── Skeleton card base ───────────────────────────────────── */
.skeleton-card {
    pointer-events: none;
    animation: cardFadeIn 0.4s forwards !important;
}
.skeleton-card .skeleton-img {
    height: 62%;
    border-radius: var(--radius-card) var(--radius-card) 0 0;
    background: rgba(255,255,255,0.05);
    overflow: hidden;
    position: relative;
}
.skeleton-card .card-body {
    padding: 1.1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: .5rem;
}
.skeleton-line {
    height: 16px;
    border-radius: 6px;
    background: rgba(255,255,255,0.05);
    position: relative;
    overflow: hidden;
}

/* ── Shimmer animation ────────────────────────────────────── */
@keyframes shimmer {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}
.shimmer::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(0,229,255,0.06) 40%,
        rgba(0,255,198,0.09) 50%,
        rgba(0,229,255,0.06) 60%,
        transparent 100%
    );
    animation: shimmer 1.6s ease-in-out infinite;
}

/* ── Cursor: pointer on any loading state ─────────────────── */
body.ajax-loading { cursor: progress; }

/* ── Stagger entrance for freshly AJAX-loaded cards ───────────
   These only fire when .ajax-loaded is added to <main> after
   a navigation swap — never on the initial full page load.
   ─────────────────────────────────────────────────────────── */
@keyframes cardSlideUp {
    from { opacity: 0; transform: translateY(22px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes articleSlideIn {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Article cards grid — only after AJAX nav */
.ajax-loaded .articles-grid .article-card {
    animation: cardSlideUp 0.4s cubic-bezier(0.22,1,0.36,1) both;
}
.ajax-loaded .articles-grid .article-card:nth-child(1)  { animation-delay: 0.00s; }
.ajax-loaded .articles-grid .article-card:nth-child(2)  { animation-delay: 0.05s; }
.ajax-loaded .articles-grid .article-card:nth-child(3)  { animation-delay: 0.10s; }
.ajax-loaded .articles-grid .article-card:nth-child(4)  { animation-delay: 0.15s; }
.ajax-loaded .articles-grid .article-card:nth-child(5)  { animation-delay: 0.20s; }
.ajax-loaded .articles-grid .article-card:nth-child(6)  { animation-delay: 0.04s; }
.ajax-loaded .articles-grid .article-card:nth-child(7)  { animation-delay: 0.09s; }
.ajax-loaded .articles-grid .article-card:nth-child(8)  { animation-delay: 0.14s; }
.ajax-loaded .articles-grid .article-card:nth-child(9)  { animation-delay: 0.19s; }
.ajax-loaded .articles-grid .article-card:nth-child(10) { animation-delay: 0.24s; }
.ajax-loaded .articles-grid .article-card:nth-child(n+11){ animation-delay: 0.22s; }

/* Article page — only after AJAX nav */
.ajax-loaded .article-page {
    animation: articleSlideIn 0.4s cubic-bezier(0.22,1,0.36,1) both;
}

/* Related cards — only after AJAX nav */
.ajax-loaded .related-card {
    animation: cardSlideUp 0.4s cubic-bezier(0.22,1,0.36,1) both;
}
.ajax-loaded .related-grid .related-card:nth-child(1) { animation-delay: 0.10s; }
.ajax-loaded .related-grid .related-card:nth-child(2) { animation-delay: 0.18s; }
.ajax-loaded .related-grid .related-card:nth-child(3) { animation-delay: 0.26s; }
.ajax-loaded .related-grid .related-card:nth-child(4) { animation-delay: 0.32s; }

/* Respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
    .ajax-loaded .articles-grid .article-card,
    .ajax-loaded .article-page,
    .ajax-loaded .related-card { animation: none; }
}
