/* =============================================
   ROOT DESIGN SYSTEM
   ============================================= */
:root {
  --bg: #07080f;
  --bg-elevated: #0d0f1a;
  --surface: rgba(255,255,255,0.03);
  --surface-hover: rgba(255,255,255,0.065);
  --border: rgba(255,255,255,0.07);
  --border-hover: rgba(255,255,255,0.18);
  --text-primary: #f0f4ff;
  --text-secondary: #8896b3;
  --text-muted: #4a5568;
  --accent: #e53e3e;
  --accent-dim: rgba(229, 62, 62, 0.15);
  --accent-blue: #4299e1;
  --accent-glow: rgba(229, 62, 62, 0.4);
  --nav-h: 64px;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-mono: 'JetBrains Mono', monospace;
  --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-sans);
  overflow-x: hidden;
  min-height: 100vh;
}

/* =============================================
   PARTICLE CANVAS
   ============================================= */
#particles-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.35;
}

/* =============================================
   NAVBAR
   ============================================= */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  transition: background 0.4s ease, backdrop-filter 0.4s ease, border-color 0.4s ease;
  border-bottom: 1px solid transparent;
}

.navbar.scrolled {
  background: rgba(7, 8, 15, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-color: var(--border);
}

.nav-inner {
  max-width: 1440px;
  margin: 0 auto;
  height: 100%;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}

.return-link {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-right: 10px;
  font-size: 0.75rem;
  border: 1px solid rgba(255,255,255,0.2);
  padding: 4px 10px;
  border-radius: 20px;
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.return-link:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

.brand-icon {
  color: var(--accent);
  font-size: 1.4rem;
  animation: pulse-dot 2s ease-in-out infinite;
}

.brand-name {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.nav-center {
  flex: 1;
  display: flex;
  justify-content: center;
}

.nav-search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 9999px;
  padding: 0.45rem 1rem;
  width: 100%;
  max-width: 480px;
  transition: border-color 0.3s, box-shadow 0.3s, background 0.3s;
}

.nav-search:focus-within {
  border-color: rgba(229,62,62,0.5);
  background: rgba(255,255,255,0.07);
  box-shadow: 0 0 0 3px rgba(229,62,62,0.1);
}

.nav-search-icon {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.nav-search input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 0.85rem;
  font-family: var(--font-sans);
}

.nav-search input::placeholder { color: var(--text-muted); }

.nav-right {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}

.nav-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.filter-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.45rem;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.filter-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

/* =============================================
   LIVE DOT
   ============================================= */
.live-dot {
  width: 8px; height: 8px;
  background: #48bb78;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 0 rgba(72, 187, 120, 0.6);
  animation: pulse-live 2s ease-out infinite;
}

@keyframes pulse-live {
  0%   { box-shadow: 0 0 0 0 rgba(72,187,120,0.6); }
  70%  { box-shadow: 0 0 0 8px rgba(72,187,120,0); }
  100% { box-shadow: 0 0 0 0 rgba(72,187,120,0); }
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

/* =============================================
   FILTER SIDEBAR
   ============================================= */
.filter-sidebar {
  position: fixed;
  top: 0;
  right: -340px;
  width: 320px;
  height: 100vh;
  background: rgba(13, 15, 26, 0.95);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-left: 1px solid var(--border);
  z-index: 200;
  transition: right 0.4s var(--ease-out-expo);
  overflow-y: auto;
}

.filter-sidebar.open {
  right: 0;
}

.filter-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 199;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.filter-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.filter-sidebar-inner {
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.filter-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.filter-header h3 {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 700;
}

.filter-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.25rem;
  line-height: 1;
  transition: color 0.2s;
}

.filter-close:hover { color: var(--accent); }

.filter-group h4 {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chip {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 9999px;
  padding: 0.4rem 0.9rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: var(--font-sans);
}

.chip:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
  background: var(--surface-hover);
}

.chip.active {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}

/* =============================================
   HERO
   ============================================= */
.hero {
  position: relative;
  min-height: calc(100vh - 160px);
  height: auto;
  padding-bottom: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  padding-top: calc(var(--nav-h) + 4rem);
}

@keyframes smokePan {
  0%   { transform: scale(1.1) translateX(1.5%); }
  50%  { transform: scale(1.1) translateX(-1.5%); }
  100% { transform: scale(1.1) translateX(1.5%); }
}

.hero-bg-image {
  position: absolute;
  inset: 0;
  background-image: url('hero.jpg');
  background-size: cover;
  background-position: center 30%;
  will-change: transform;
  animation: smokePan 40s ease-in-out infinite;
}

.hero-bg-image.cyber {
  background-image: linear-gradient(to bottom, rgba(7, 8, 15, 0.3) 0%, rgba(7, 8, 15, 0.9) 70%, rgba(7, 8, 15, 1) 100%), url('cyber_hero.jpg');
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(7,8,15,0.3) 0%, rgba(7,8,15,0.15) 40%, rgba(7,8,15,0.9) 85%, rgba(7,8,15,1) 100%),
    linear-gradient(to right, rgba(7,8,15,0.6) 0%, transparent 50%, rgba(7,8,15,0.4) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 860px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 0 2rem;
  margin: auto 0;
}

.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  color: #48bb78;
  animation: fadeInUp 0.8s var(--ease-out-expo) 0.1s both;
}

.hero-title {
  display: flex;
  flex-direction: column;
  gap: 0;
  animation: fadeInUp 0.9s var(--ease-out-expo) 0.2s both;
}

.title-line {
  font-family: var(--font-serif);
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.04em;
  color: var(--text-primary);
  display: block;
  text-shadow: 0 2px 40px rgba(0,0,0,0.8);
}

.title-outline {
  -webkit-text-stroke: 1.5px var(--accent-red);
  color: transparent;
  font-style: italic;
  font-weight: 900;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 600px;
  text-shadow: 0 1px 15px rgba(0,0,0,0.8);
  animation: fadeInUp 0.9s var(--ease-out-expo) 0.3s both;
}

/* =============================================
   HERO STATS
   ============================================= */
.hero-stats {
  display: flex;
  align-items: center;
  gap: 2rem;
  animation: fadeInUp 1s var(--ease-out-expo) 0.5s both;
  background: rgba(10,10,15,0.6);
  padding: 1rem 2rem;
  border-radius: 50px;
  border: 1px solid rgba(255,255,255,0.05);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-stats:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 40px rgba(0,0,0,0.6), 0 0 20px rgba(229, 62, 62, 0.2);
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
}

.stat-num {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 900;
  color: #fff;
  line-height: 1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-shadow: 0 0 10px rgba(255,255,255,0.3);
}

.pulse-dot {
  width: 10px;
  height: 10px;
  background-color: #e53e3e;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(229, 62, 62, 0.7);
  animation: pulse-red 2s infinite;
}

@keyframes pulse-red {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(229, 62, 62, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(229, 62, 62, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(229, 62, 62, 0); }
}

.stat-label {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 500;
}

.stat-div {
  width: 1px;
  height: 40px;
  background: var(--border);
}

/* =============================================
   HERO SCROLL CUE
   ============================================= */
.hero-scroll-cue {
  display: flex;
  margin-top: 2rem;
  margin-bottom: 2rem;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-primary);
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
  animation: fadeInUp 1s var(--ease-out-expo) 1.2s both;
  z-index: 2;
  cursor: pointer;
}

.hero-scroll-cue:hover {
  color: var(--accent);
  text-shadow: 0 0 15px rgba(229, 62, 62, 0.6);
}

.scroll-line {
  width: 3px;
  height: 60px;
  background: linear-gradient(to bottom, currentColor, transparent);
  animation: scroll-pulse 2s ease-in-out infinite;
  border-radius: 2px;
}

@keyframes scroll-pulse {
  0%, 100% { transform: scaleY(1); opacity: 1; }
  50%       { transform: scaleY(0.4); opacity: 0.6; }
}

/* =============================================
   TABS SECTION
   ============================================= */
.tabs-section {
  position: sticky;
  top: var(--nav-h);
  z-index: 90;
  margin-top: -85px;
  background: transparent;
  padding: 1rem 0 2rem;
  display: flex;
  justify-content: center;
  transition: all 0.3s ease;
}

.tabs-section.is-stuck {
  background: rgba(7, 8, 15, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}


.mobile-cat-header {
  display: none;
}

.tabs-wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.5rem 1rem;
  width: 100%;
  max-width: 1200px;
}

.tab {
  flex-shrink: 0;
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.25rem;
  min-height: 40px;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: rgba(255, 255, 255, 0.05);
  font-family: var(--font-sans);
  white-space: nowrap;
}

.tab-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--text-secondary);
  transition: color 0.3s;
}

.tab-icon svg {
  width: 16px;
  height: 16px;
  display: block;
}

.tab:hover .tab-icon { color: var(--text-primary); }
.tab.active .tab-icon { color: var(--accent); }

.tab-label {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--text-secondary);
  transition: color 0.3s;
}

.tab:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

.tab:hover .tab-label { color: var(--text-primary); }

.tab.active {
  background: var(--accent);
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.tab.active .tab-label { 
  color: #fff; 
  font-weight: 600; 
}
.tab.active .tab-icon {
  color: #fff;
}

/* =============================================
   NEWS SECTION
   ============================================= */
.main-content {
  position: relative;
  z-index: 1;
}

.news-section {
  max-width: 1440px;
  margin: 0 auto;
  padding: 4rem 2rem 6rem;
  scroll-margin-top: 140px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.section-header-left {
  display: flex;
  align-items: baseline;
  gap: 1rem;
}

.section-header h2 {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.article-count {
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
}

.section-header-right {
  display: flex;
  gap: 0.35rem;
}

.view-toggle {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.45rem;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.2s ease;
  display: flex;
}

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

.view-toggle:hover { color: var(--text-secondary); border-color: var(--border-hover); }
.view-toggle.active { color: var(--accent); border-color: var(--accent); background: var(--accent-dim); }

/* =============================================
   LOADER
   ============================================= */
.loader {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 5rem 0;
  color: var(--text-secondary);
}

.loader-ring {
  width: 48px; height: 48px;
  border: 3px solid rgba(255,255,255,0.07);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* =============================================
   NEWS GRID & CARDS
   ============================================= */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
}

.news-grid.list-view {
  grid-template-columns: 1fr;
  gap: 1rem;
}

/* ─── Featured card (first) ─── */
.news-card:first-child {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  min-height: 360px;
}

.news-card:first-child .card-img-wrap {
  grid-row: 1 / -1;
  height: auto;
  min-height: 360px;
}

.news-card:first-child .card-body {
  padding: 2.5rem;
  justify-content: center;
}

.news-card:first-child .card-title {
  font-size: 1.6rem;
  line-height: 1.3;
}

.news-card:first-child .card-desc {
  -webkit-line-clamp: 4;
}

.news-card:first-child .card-badge {
  font-size: 0.7rem;
  padding: 0.35em 0.85em;
}

@media (max-width: 760px) {
  .news-card:first-child {
    grid-template-columns: 1fr;
  }
  .news-card:first-child .card-img-wrap {
    height: 220px;
    min-height: unset;
  }
}

/* ─── List view overrides ─── */
.news-grid.list-view .news-card {
  flex-direction: row;
  min-height: unset;
}

.news-grid.list-view .news-card:first-child {
  grid-column: 1;
  grid-template-columns: 280px 1fr;
  min-height: unset;
}

.news-grid.list-view .news-card:first-child .card-img-wrap {
  min-height: unset;
  height: auto;
}

.news-grid.list-view .card-img-wrap {
  width: 200px;
  min-width: 200px;
  height: auto;
  min-height: 140px;
}

.news-grid.list-view .card-body {
  padding: 1.25rem 1.5rem;
}

.news-grid.list-view .card-title {
  font-size: 1rem;
}

/* ─── Card base ─── */
.news-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.5s var(--ease-out-expo), box-shadow 0.5s ease, border-color 0.3s ease;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  /* scroll-driven reveal */
  opacity: 0;
  transform: translateY(30px);
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }
  .title-line {
    font-size: clamp(2rem, 10vw, 3.5rem);
  }
  .hero-stats {
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    padding: 1.5rem;
    border-radius: 20px;
  }
  .stat-div {
    width: 80%;
    height: 1px;
    background: var(--border);
  }
  .tabs-section {
    padding-top: 1.5rem;
    padding-bottom: 1rem;
    margin-top: -85px;
    display: block;
    width: 100%;
    overflow: visible;
  }
  .hero {
    height: auto;
    min-height: auto;
    padding-top: calc(var(--nav-h) + 2rem);
    padding-bottom: 95px;
  }
  .mobile-cat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem;
    margin-bottom: 0.5rem;
  }
  .mobile-cat-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }
  .mobile-cat-toggle {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-primary);
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.2s;
  }
  .mobile-cat-toggle:hover {
    background: var(--surface-hover);
  }
  .tabs-wrap {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 1rem;
    right: 1rem;
    width: auto;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.5rem;
    gap: 0.25rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
    z-index: 100;
  }
  .tabs-wrap.show-cats {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
  }
  .tab {
    width: 100%;
    justify-content: flex-start;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    background: transparent;
  }
  .tab.active {
    background: var(--surface-hover);
  }
  .nav-center {
    display: none;
  }
  .brand-name {
    font-size: 1.1rem;
  }
  .return-link {
    font-size: 0.65rem;
    padding: 3px 8px;
    margin-right: 6px;
  }
  .hero-scroll-cue {
    font-size: 0.9rem;
    letter-spacing: 0.15em;
  }
}

.news-card.visible {
  animation: card-reveal 0.8s var(--ease-out-expo) forwards;
}

@keyframes card-reveal {
  to { opacity: 1; transform: translateY(0); }
}

.news-card:hover {
  transform: translateY(-4px) scale(1.005);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.1);
  border-color: var(--border-hover);
}

/* ─── Card image wrapper ─── */
.card-img-wrap {
  position: relative;
  height: 200px;
  overflow: hidden;
  flex-shrink: 0;
  background: #12131f;
}

.card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease-out-expo);
  filter: brightness(0.85) saturate(0.95);
}

.news-card:hover .card-img-wrap img {
  transform: scale(1.06);
  filter: brightness(0.95) saturate(1.1);
}

.card-img-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #12131f 0%, #1a1b2e 50%, #12131f 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.card-img-placeholder .placeholder-icon {
  font-size: 3rem;
  opacity: 0.12;
}

/* Shimmer effect on placeholder */
.card-img-placeholder::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    transparent 20%,
    rgba(255,255,255,0.03) 50%,
    transparent 80%
  );
  animation: shimmer 2.5s ease-in-out infinite;
}

@keyframes shimmer {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Category badge on image */
.card-badge {
  position: absolute;
  top: 0.85rem; left: 0.85rem;
  background: var(--accent);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.25em 0.65em;
  border-radius: 5px;
  z-index: 2;
}

/* Publisher badge */
.card-publisher-badge {
  position: absolute;
  bottom: 0.85rem; left: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  border-radius: 6px;
  padding: 0.3rem 0.6rem;
  z-index: 2;
}

.publisher-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.publisher-name {
  font-size: 0.65rem;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  letter-spacing: 0.03em;
}

/* Gradient overlay on image */
.card-img-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(7,8,15,0.6) 0%, transparent 60%);
  pointer-events: none;
}

/* ─── Card body ─── */
.card-body {
  padding: 1.4rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  flex: 1;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.card-meta .meta-publisher {
  color: var(--text-secondary);
  font-weight: 600;
}

.card-meta .meta-sep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--text-muted);
}

.card-meta .meta-time {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.68rem;
}

.card-title {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  transition: color 0.2s;
}

.news-card:hover .card-title {
  color: #fff;
}

.card-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.6rem;
  border-top: 1px solid var(--border);
}

.card-read-more {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.02em;
  transition: gap 0.2s ease;
}

.news-card:hover .card-read-more {
  gap: 0.7rem;
}

.card-read-more .arrow {
  transition: transform 0.2s ease;
}

.news-card:hover .card-read-more .arrow {
  transform: translateX(3px);
}

.card-source-tag {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* =============================================
   FOOTER
   ============================================= */
.site-footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 2rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

/* =============================================
   ANIMATIONS
   ============================================= */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* =============================================
   REDUCED MOTION
   ============================================= */
@media (prefers-reduced-motion: reduce) {
  .news-card, .hero-content > * { animation: none !important; opacity: 1; transform: none; }
  .brand-icon { animation: none; }
  .live-dot { animation: none; }
  .scroll-line { animation: none; }
  .hero-bg-image { animation: none; }
}



/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 900px) {
  .nav-search { display: none; }
  .news-grid {
    grid-template-columns: 1fr;
  }
  .news-card:first-child {
    grid-template-columns: 1fr;
  }
  .news-card:first-child .card-img-wrap {
    height: 220px;
    min-height: unset;
  }
  .news-grid.list-view .card-img-wrap {
    width: 130px;
    min-width: 130px;
    min-height: 110px;
  }
  .nav-status span:not(.live-dot) {
    display: none;
  }
}

@media (max-width: 640px) {
  /* Hero */
  .hero {
    padding-bottom: 4rem;
  }
  .hero-stats {
    gap: 1rem;
    padding: 0.75rem 1.25rem;
  }
  .nav-inner {
    padding: 0 0.75rem;
    gap: 0.5rem;
  }
  .title-line {
    font-size: 2.8rem;
  }
  .hero-stats {
    flex-direction: column;
    gap: 1rem;
    border-radius: 20px;
    padding: 1.5rem;
  }
  .stat-div {
    width: 100%;
    height: 1px;
  }
  .tabs-section {
    padding-top: 1rem;
    padding-bottom: 1rem;
  }
  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  .stat-num { font-size: 1.4rem; }
  .hero-subtitle { font-size: 0.95rem; }
  .hero-scroll-cue {
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    margin-top: 1rem;
  }

  /* Navbar */
  .return-link {
    font-size: 0.6rem;
    padding: 3px 6px;
    margin-right: 4px;
  }
  .brand-name {
    font-size: 1rem;
  }
  .brand-icon {
    font-size: 1rem;
  }
  .nav-right {
    gap: 0.4rem;
  }
  .filter-toggle {
    padding: 0.35rem;
  }
  .filter-toggle svg {
    width: 16px;
    height: 16px;
  }

  /* Cards */
  .news-section { padding: 1rem 0.85rem 5rem; }
  .section-header h2 { font-size: 1.4rem; }
  .news-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .news-grid.list-view .news-card { flex-direction: row; align-items: stretch; }
  .news-grid.list-view .card-img-wrap { width: 110px; min-width: 110px; min-height: 100%; height: auto; }
  .news-grid.list-view .news-card:first-child { flex-direction: column; grid-template-columns: 1fr; }
  .news-grid.list-view .news-card:first-child .card-img-wrap { width: 100%; min-width: 100%; height: 200px; }
  
  .news-grid.list-view .card-body { padding: 0.75rem; justify-content: center; }
  .news-grid.list-view .card-title { font-size: 0.95rem; }
  .news-grid.list-view .card-desc { display: none; }
  
  .news-grid.list-view .card-badge { top: 0.4rem; left: 0.4rem; font-size: 0.5rem; padding: 0.2rem 0.4rem; }
  .news-grid.list-view .card-publisher-badge { bottom: 0.4rem; left: 0.4rem; padding: 0.2rem 0.4rem; }
  .news-grid.list-view .card-publisher-badge .publisher-name { display: none; }
}

@media (max-width: 380px) {
  .return-link {
    display: none;
  }
  .brand-name {
    font-size: 0.95rem;
  }
  .nav-inner {
    padding: 0 0.5rem;
    gap: 0.4rem;
  }
}

/* Override hero background for Cyber app */
body[data-app="cyber"] .hero-bg-image {
  background-image: linear-gradient(to bottom, rgba(7, 8, 15, 0.3) 0%, rgba(7, 8, 15, 0.9) 70%, rgba(7, 8, 15, 1) 100%), url('cyber_hero.jpg');
}
