:root {
    --bg: #0f1219;
    --surface: #151c29;
    --surface-2: #1a2333;
    --text: #ffffff;
    --muted: #9aa8c3;
    --cyan: #20e3d2;
    --blue: #3b82f6;
    --line: rgba(255, 255, 255, 0.08);
    --glow: 0 0 28px rgba(32, 227, 210, 0.22);
    --radius: 16px;
    --header-h: 70px;
    --font: "Segoe UI", "Inter", "Avenir Next", sans-serif;
    --max: 1240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font);
    color: var(--text);
    background:
        radial-gradient(1000px 520px at 10% -15%, rgba(32, 227, 210, 0.1), transparent 55%),
        radial-gradient(900px 480px at 95% 0%, rgba(59, 130, 246, 0.12), transparent 50%),
        var(--bg);
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input { font: inherit; }

.preview-banner {
    position: sticky; top: 0; z-index: 90;
    display: flex; flex-wrap: wrap; align-items: center; gap: .55rem 1rem;
    padding: .7rem 1.25rem;
    background: linear-gradient(90deg, #20e3d2, #3b82f6);
    color: #0a1218; font-weight: 700; font-size: .92rem;
}
.preview-banner a { margin-left: auto; color: #0a1218; text-decoration: underline; }

/* Breaking */
.breaking {
    position: sticky; top: 0; z-index: 70;
    display: flex; align-items: center; gap: .75rem;
    padding: .55rem clamp(1rem, 3vw, 2rem);
    background: rgba(21, 28, 41, 0.92);
    border-bottom: 1px solid rgba(32, 227, 210, 0.25);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    font-size: .9rem;
}
.breaking-label {
    flex-shrink: 0; color: var(--cyan); font-weight: 800; letter-spacing: .04em;
}
.breaking a { color: #e8eefc; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.breaking a:hover { color: var(--cyan); }

/* Header */
.wp-header {
    position: sticky; top: 0; z-index: 60;
    height: var(--header-h);
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    padding: 0 clamp(1rem, 3vw, 2rem);
    background: rgba(15, 18, 25, 0.78);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}
body.has-breaking .wp-header { top: 42px; }

.wp-brand { display: flex; align-items: center; gap: .65rem; flex-shrink: 0; }
.wp-brand-mark {
    width: 36px; height: 36px; border-radius: 10px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: var(--glow);
}
.wp-brand-name {
    font-weight: 900; letter-spacing: .14em; text-transform: uppercase;
    font-size: 1.05rem;
    background: linear-gradient(90deg, #fff, #9ef7ef);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}

.wp-nav {
    display: flex; align-items: center; gap: .15rem;
    list-style: none; margin: 0; padding: 0;
}
.wp-nav a {
    padding: .5rem .85rem; border-radius: 999px;
    color: var(--muted); font-weight: 650; font-size: .92rem;
    transition: color .2s ease, background .2s ease;
}
.wp-nav a:hover, .wp-nav a.is-active {
    color: var(--text); background: rgba(32, 227, 210, 0.1);
}

.wp-actions { display: flex; align-items: center; gap: .65rem; margin-left: auto; }
.wp-search {
    display: flex; align-items: center; gap: .45rem;
    min-width: 200px; padding: .5rem .85rem; border-radius: 999px;
    background: rgba(255,255,255,.04); border: 1px solid var(--line); color: var(--muted);
}
.wp-search input {
    width: 100%; border: 0; outline: none; background: transparent; color: var(--text);
}

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
    border: 0; border-radius: 999px; padding: .65rem 1.15rem;
    font-weight: 750; cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
    color: #061018; background: linear-gradient(135deg, var(--cyan), #6ef0e4);
    box-shadow: var(--glow);
}
.btn-ghost {
    color: var(--text); background: rgba(255,255,255,.04); border: 1px solid var(--line);
}
.btn-source {
    color: #061018; background: linear-gradient(135deg, var(--cyan), var(--blue));
}

.mobile-toggle {
    display: none; border: 0; width: 42px; height: 42px; border-radius: 12px;
    background: rgba(255,255,255,.06); color: var(--text); cursor: pointer;
}

.wp-main {
    width: min(var(--max), calc(100% - 2rem));
    margin: 0 auto;
    padding: 1.5rem 0 3.5rem;
}

/* Hero asymmetric */
.hero-grid {
    display: grid;
    grid-template-columns: 1.55fr .95fr;
    gap: 1.15rem;
    margin-bottom: 2rem;
}
.hero-main {
    position: relative; min-height: clamp(360px, 52vh, 540px);
    border-radius: calc(var(--radius) + 4px); overflow: hidden;
    border: 1px solid rgba(32, 227, 210, 0.18);
    background: var(--surface); isolation: isolate;
    box-shadow: 0 20px 50px rgba(0,0,0,.35);
}
.hero-media {
    position: absolute; inset: 0;
    background-size: cover; background-position: center;
    transform: scale(1.02); transition: transform 1.1s ease;
}
.hero-main:hover .hero-media { transform: scale(1.07); }
.hero-main::after {
    content: ""; position: absolute; inset: 0; z-index: 1;
    background:
        linear-gradient(90deg, rgba(8,11,18,.92) 0%, rgba(8,11,18,.45) 55%, rgba(8,11,18,.15) 100%),
        linear-gradient(0deg, rgba(8,11,18,.9) 0%, transparent 55%);
}
.hero-body {
    position: relative; z-index: 2; min-height: inherit;
    display: flex; flex-direction: column; justify-content: flex-end;
    gap: .85rem; padding: clamp(1.4rem, 3.5vw, 2.4rem); max-width: 640px;
}
.hero-title {
    margin: 0; font-size: clamp(1.85rem, 4vw, 3rem);
    line-height: 1.08; letter-spacing: -.02em; font-weight: 850;
}
.hero-excerpt { margin: 0; color: #d7e0f4; font-size: 1.02rem; max-width: 48ch; line-height: 1.55; }
.hero-meta {
    display: flex; flex-wrap: wrap; gap: .6rem; align-items: center;
    color: var(--muted); font-size: .9rem;
}

.moment {
    border-radius: calc(var(--radius) + 2px);
    background: rgba(21, 28, 41, 0.72);
    border: 1px solid var(--line);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 1.1rem;
    display: flex; flex-direction: column; gap: .85rem;
    box-shadow: 0 16px 40px rgba(0,0,0,.25);
}
.moment h2 {
    margin: 0; font-size: 1rem; letter-spacing: .08em;
    text-transform: uppercase; color: var(--cyan);
}
.moment-item {
    display: grid; grid-template-columns: 72px 1fr; gap: .75rem;
    padding: .65rem; border-radius: 12px;
    transition: background .2s ease, transform .2s ease;
}
.moment-item:hover { background: rgba(32, 227, 210, 0.06); transform: translateX(2px); }
.moment-thumb {
    width: 72px; height: 72px; border-radius: 10px; overflow: hidden; background: #0c111a;
}
.moment-thumb img, .moment-thumb .cover-fallback {
    width: 100%; height: 100%; object-fit: cover;
}
.moment-item h3 { margin: .2rem 0 0; font-size: .95rem; line-height: 1.3; font-weight: 700; }
.moment-time { color: var(--muted); font-size: .78rem; margin-top: .25rem; }

/* Layout with sidebar */
.content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 1.5rem;
    align-items: start;
}

.section-head {
    display: flex; justify-content: space-between; align-items: end;
    gap: 1rem; margin: 0 0 1rem;
}
.section-head h2 { margin: 0; font-size: 1.35rem; letter-spacing: -.01em; }
.section-head p { margin: .25rem 0 0; color: var(--muted); font-size: .92rem; }
.section-head a { color: var(--cyan); font-weight: 700; font-size: .9rem; }

.editorial-block { margin-bottom: 2rem; }

.articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.1rem;
}

/* Glass cards */
.card {
    position: relative; display: flex; flex-direction: column;
    border-radius: var(--radius); overflow: hidden;
    background: rgba(21, 28, 41, 0.72);
    border: 1px solid var(--line);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 12px 30px rgba(0,0,0,.22);
    transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.card:hover {
    transform: translateY(-4px);
    border-color: rgba(32, 227, 210, 0.4);
    box-shadow: 0 18px 40px rgba(0,0,0,.35), var(--glow);
}
.card-media {
    position: relative; aspect-ratio: 16/10; overflow: hidden; background: #0a0e15;
}
.card-media img, .card-media .cover-fallback {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform .45s cubic-bezier(.22,1,.36,1);
}
.card:hover .card-media img, .card:hover .card-media .cover-fallback { transform: scale(1.08); }
.cover-fallback {
    display: grid; place-items: center;
    background: linear-gradient(135deg, rgba(32,227,210,.25), rgba(59,130,246,.2));
    color: rgba(255,255,255,.5); font-weight: 900; letter-spacing: .12em;
}
.card-body { padding: .95rem 1rem 1.1rem; display: grid; gap: .45rem; }
.card-title { margin: 0; font-size: 1rem; font-weight: 750; line-height: 1.3; }
.card-meta { display: flex; flex-wrap: wrap; gap: .5rem; color: var(--muted); font-size: .8rem; }

.badge {
    display: inline-flex; align-items: center;
    padding: .28rem .65rem; border-radius: 999px;
    font-size: .72rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
    color: var(--cyan);
    background: rgba(32, 227, 210, 0.1);
    border: 1px solid rgba(32, 227, 210, 0.35);
    box-shadow: 0 0 16px rgba(32, 227, 210, 0.12);
}

/* Trends sidebar */
.trends {
    position: sticky; top: calc(var(--header-h) + 1rem);
    border-radius: var(--radius);
    background: rgba(21, 28, 41, 0.75);
    border: 1px solid var(--line);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 1.1rem;
}
body.has-breaking .trends { top: calc(var(--header-h) + 3.2rem); }
.trends h2 {
    margin: 0 0 1rem; font-size: .95rem; letter-spacing: .08em;
    text-transform: uppercase; color: var(--cyan);
}
.trend-item {
    display: grid; grid-template-columns: 28px 56px 1fr; gap: .65rem;
    align-items: center; padding: .55rem 0;
    border-bottom: 1px solid var(--line);
}
.trend-item:last-child { border-bottom: 0; }
.trend-rank {
    font-size: 1.15rem; font-weight: 900; color: rgba(32, 227, 210, 0.85);
}
.trend-thumb {
    width: 56px; height: 56px; border-radius: 10px; overflow: hidden; background: #0c111a;
}
.trend-thumb img, .trend-thumb .cover-fallback { width: 100%; height: 100%; object-fit: cover; }
.trend-item h3 { margin: 0; font-size: .88rem; line-height: 1.3; font-weight: 700; }
.trend-views { color: var(--muted); font-size: .75rem; margin-top: .2rem; }

/* Article */
.article-hero-cover {
    width: 100vw; margin-left: calc(50% - 50vw);
    max-height: 480px; overflow: hidden; border-bottom: 1px solid rgba(32,227,210,.15);
}
.article-hero-cover img { width: 100%; height: min(480px, 55vh); object-fit: cover; }
.article-wrap { max-width: 760px; margin: 0 auto; padding: 1.75rem 0 2rem; }
.breadcrumb {
    display: flex; flex-wrap: wrap; gap: .4rem; color: var(--muted); font-size: .85rem; margin-bottom: .85rem;
}
.breadcrumb a:hover { color: var(--cyan); }
.article-wrap h1 {
    margin: .5rem 0 .85rem; font-size: clamp(1.9rem, 4vw, 2.9rem);
    line-height: 1.1; letter-spacing: -.02em;
}
.article-content {
    margin-top: 1.5rem; line-height: 1.8; color: #dce5f8; font-size: 1.05rem;
}
.article-content h2, .article-content h3 { color: #fff; margin-top: 1.8rem; }
.article-content a { color: var(--cyan); }
.article-content img { border-radius: 12px; margin: 1.25rem 0; }
.article-content blockquote {
    margin: 1.5rem 0; padding: 1rem 1.25rem;
    border-left: 3px solid var(--cyan);
    background: rgba(32, 227, 210, 0.07);
    border-radius: 0 12px 12px 0;
    color: #eef7ff; font-size: 1.1rem;
}
.tags { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: 1.75rem; }
.related { margin-top: 2.5rem; }

.empty {
    padding: 2rem; border: 1px dashed var(--line); border-radius: var(--radius);
    color: var(--muted); text-align: center;
    background: rgba(21,28,41,.5);
}

/* Footer */
.wp-footer {
    margin-top: 2rem; border-top: 1px solid var(--line);
    background: #0c1017; color: var(--muted);
}
.wp-footer-inner {
    width: min(var(--max), calc(100% - 2rem));
    margin: 0 auto; padding: 2.5rem 0 1.5rem;
    display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 1.5rem;
}
.wp-footer h3 { margin: 0 0 .75rem; color: #fff; font-size: .95rem; }
.wp-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.wp-footer a:hover { color: var(--cyan); }
.wp-social { display: flex; gap: .55rem; margin-top: .75rem; }
.wp-social a {
    width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
    border: 1px solid var(--line); background: rgba(255,255,255,.03);
}
.wp-copy {
    width: min(var(--max), calc(100% - 2rem));
    margin: 0 auto; padding: 1rem 0 1.75rem;
    border-top: 1px solid var(--line); font-size: .82rem;
    display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}
.hero-grid, .card, .moment, .trends { animation: fadeUp .55s ease both; }

@media (max-width: 1100px) {
    .content-grid { grid-template-columns: 1fr; }
    .trends { position: static; }
    .articles-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
    .hero-grid { grid-template-columns: 1fr; }
    .wp-nav {
        display: none; position: absolute; left: 0; right: 0;
        top: calc(var(--header-h) + var(--breaking-offset, 0px));
        flex-direction: column; align-items: stretch; gap: .25rem;
        padding: 1rem; background: rgba(12,16,23,.98); border-bottom: 1px solid var(--line);
    }
    body.has-breaking .wp-nav { top: calc(var(--header-h) + 42px); }
    .wp-nav.is-open { display: flex; }
    .mobile-toggle { display: inline-grid; place-items: center; }
    .wp-footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
    .articles-grid { grid-template-columns: 1fr; }
    .wp-search { min-width: 0; width: 120px; }
    .wp-footer-inner { grid-template-columns: 1fr; }
}
