/* ===================================================
   QUANTNEST NEWS — CYBERSECURITY PUBLICATION
   Dark Editorial Theme — Production CSS
   =================================================== */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;500;600;700;800&family=IBM+Plex+Mono:wght@400;500&family=Newsreader:ital,opsz,wght@0,6..72,300;0,6..72,400;0,6..72,500;1,6..72,300;1,6..72,400&display=swap');

/* ── CSS Variables ─────────────────────────────── */
:root {
  --bg-base:        #0a0c0f;
  --bg-surface:     #0f1318;
  --bg-card:        #131820;
  --bg-card-hover:  #171e28;
  --bg-elevated:    #1c2330;

  --border:         rgba(255,255,255,0.07);
  --border-accent:  rgba(0,212,180,0.25);

  --text-primary:   #e8edf4;
  --text-secondary: #8a9ab0;
  --text-muted:     #526070;
  --text-inverse:   #0a0c0f;

  --accent:         #00d4b4;
  --accent-dim:     rgba(0,212,180,0.15);
  --accent-glow:    rgba(0,212,180,0.08);
  --accent-hot:     #ff4d6d;
  --accent-warn:    #ffb627;
  --accent-blue:    #4d9fff;

  --font-display:   'Syne', sans-serif;
  --font-body:      'Newsreader', Georgia, serif;
  --font-mono:      'IBM Plex Mono', monospace;

  --radius-sm:      4px;
  --radius-md:      8px;
  --radius-lg:      12px;

  --shadow-card:    0 4px 24px rgba(0,0,0,0.4);
  --shadow-glow:    0 0 30px rgba(0,212,180,0.12);

  --transition:     0.2s ease;
  --max-width:      1280px;
}

/* ── Reset & Base ──────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% -10%, rgba(0,212,180,0.04) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 110%, rgba(77,159,255,0.03) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* ── Typography ────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.6rem); }
h4 { font-size: 1.1rem; }

p { margin-bottom: 1.25em; color: var(--text-secondary); }

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: #fff; }

img { max-width: 100%; display: block; }

ul, ol { padding-left: 1.5em; }
li { margin-bottom: 0.4em; }

code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--bg-elevated);
  color: var(--accent);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}

/* ── Layout Utilities ──────────────────────────── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 1;
}

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* ── Scrollbar ─────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: var(--bg-elevated); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ────────────────────────────────────────────────
   HEADER / NAVIGATION
   ──────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10,12,15,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 0;
  gap: 1.5rem;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--accent), #00a896);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-inverse);
  letter-spacing: 0.05em;
  box-shadow: 0 0 20px rgba(0,212,180,0.3);
}

.logo-text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

.logo-text span {
  color: var(--accent);
}

.header-search {
  flex: 1;
  max-width: 360px;
  position: relative;
}

.header-search input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 0.55rem 1.25rem 0.55rem 2.75rem;
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 0.875rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

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

.header-search input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.25rem;
  border-radius: 100px;
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  border: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: var(--text-inverse);
}
.btn-primary:hover {
  background: #00f5d0;
  color: var(--text-inverse);
  box-shadow: 0 0 20px rgba(0,212,180,0.4);
}

.btn-outline {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 0.55rem 0.75rem;
}
.btn-ghost:hover { color: var(--text-primary); }

/* Nav Bar */
.nav-bar {
  border-top: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-bar::-webkit-scrollbar { display: none; }

.nav-list {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 0;
}

.nav-list a {
  display: block;
  padding: 0.7rem 1.1rem;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition);
  white-space: nowrap;
  position: relative;
}

.nav-list a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 1.1rem;
  right: 1.1rem;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform var(--transition);
}

.nav-list a:hover,
.nav-list a.active {
  color: var(--text-primary);
}
.nav-list a:hover::after,
.nav-list a.active::after {
  transform: scaleX(1);
}

/* Breaking news ticker */
.breaking-bar {
  background: var(--accent-hot);
  padding: 0.45rem 0;
  overflow: hidden;
}

.breaking-content {
  display: flex;
  align-items: center;
  gap: 1rem;
  animation: ticker 30s linear infinite;
  white-space: nowrap;
}

.breaking-label {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: rgba(0,0,0,0.2);
  padding: 2px 8px;
  border-radius: 2px;
  flex-shrink: 0;
}

.breaking-content span {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 500;
}

.breaking-sep { color: rgba(255,255,255,0.4); margin: 0 0.5rem; }

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

/* ────────────────────────────────────────────────
   HERO / FEATURED SECTION
   ──────────────────────────────────────────────── */
.hero-section {
  padding: 3rem 0 2.5rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 1.5rem;
  align-items: start;
}

/* Featured Article */
.featured-article {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: border-color var(--transition), box-shadow var(--transition);
  group: true;
}

.featured-article:hover {
  border-color: var(--border-accent);
  box-shadow: var(--shadow-glow);
}

.featured-image {
  width: 100%;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, #0f1f30 0%, #0d1a20 50%, #0f1318 100%);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.featured-image .img-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured-image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10,12,15,0.95) 0%, rgba(10,12,15,0.2) 60%, transparent 100%);
}

.featured-category-badge {
  position: absolute;
  top: 1.25rem;
  left: 1.25rem;
  z-index: 2;
}

.featured-content {
  padding: 1.75rem;
}

.featured-content h2 {
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  margin-bottom: 0.75rem;
  line-height: 1.25;
}

.featured-content h2 a { color: var(--text-primary); }
.featured-content h2 a:hover { color: var(--accent); }

.featured-excerpt {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.meta-author {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
}

.author-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  color: var(--accent);
  font-weight: 700;
  flex-shrink: 0;
}

.meta-date, .meta-read-time {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.meta-sep {
  color: var(--border);
  font-size: 0.75rem;
}

/* Category Badge */
.category-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 100px;
}

.badge-red    { background: rgba(255,77,109,0.15); color: var(--accent-hot); border: 1px solid rgba(255,77,109,0.3); }
.badge-teal   { background: var(--accent-dim); color: var(--accent); border: 1px solid var(--border-accent); }
.badge-yellow { background: rgba(255,182,39,0.12); color: var(--accent-warn); border: 1px solid rgba(255,182,39,0.25); }
.badge-blue   { background: rgba(77,159,255,0.12); color: var(--accent-blue); border: 1px solid rgba(77,159,255,0.25); }
.badge-purple { background: rgba(139,92,246,0.12); color: #a78bfa; border: 1px solid rgba(139,92,246,0.25); }

/* Threat Level indicator */
.threat-indicator {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
}

.threat-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}

.threat-critical .threat-dot { background: var(--accent-hot); box-shadow: 0 0 6px var(--accent-hot); }
.threat-high .threat-dot     { background: var(--accent-warn); box-shadow: 0 0 6px var(--accent-warn); }
.threat-medium .threat-dot   { background: var(--accent-blue); }
.threat-low .threat-dot      { background: var(--accent); }

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

/* Sidebar latest */
.sidebar-latest {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.sidebar-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-header h3 {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.sidebar-article {
  display: flex;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
  cursor: pointer;
}

.sidebar-article:last-child { border-bottom: none; }
.sidebar-article:hover { background: var(--bg-card-hover); }

.sidebar-article-num {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--bg-elevated);
  line-height: 1;
  flex-shrink: 0;
  min-width: 2rem;
}

.sidebar-article-content { flex: 1; min-width: 0; }

.sidebar-article-title {
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sidebar-article-title a { color: inherit; }
.sidebar-article-title a:hover { color: var(--accent); }

.sidebar-article-meta {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* ────────────────────────────────────────────────
   ARTICLE CARDS
   ──────────────────────────────────────────────── */
.section {
  padding: 2.5rem 0;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
  gap: 1rem;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-title h2 {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.section-title-bar {
  width: 28px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

.view-all {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

/* Article Card */
.article-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
  display: flex;
  flex-direction: column;
}

.article-card:hover {
  border-color: var(--border-accent);
  box-shadow: var(--shadow-card);
  transform: translateY(-2px);
}

.card-image {
  aspect-ratio: 16/10;
  background: var(--bg-elevated);
  position: relative;
  overflow: hidden;
}

.card-image img { width: 100%; height: 100%; object-fit: cover; }

.card-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--bg-elevated) 0%, var(--bg-card) 100%);
}

.card-image-placeholder .placeholder-icon {
  font-size: 2rem;
  opacity: 0.15;
}

.card-category {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
}

.card-body {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 0.6rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-title a { color: var(--text-primary); }
.card-title a:hover { color: var(--accent); }

.card-excerpt {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Horizontal Article Card */
.article-card-h {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  gap: 0;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.article-card-h:hover {
  border-color: var(--border-accent);
  box-shadow: var(--shadow-card);
}

.article-card-h .card-image {
  width: 160px;
  flex-shrink: 0;
  aspect-ratio: 4/3;
}

.article-card-h .card-body {
  padding: 1rem 1.25rem;
}

.article-card-h .card-title {
  font-size: 0.95rem;
}

/* ────────────────────────────────────────────────
   THREAT DASHBOARD / STATS BAR
   ──────────────────────────────────────────────── */
.stats-bar {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}

.stat-item {
  padding: 0.25rem 1.5rem;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.25rem;
}

.stat-item:first-child { padding-left: 0; }
.stat-item:last-child { border-right: none; padding-right: 0; }

.stat-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.stat-value {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}

.stat-change {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.stat-up   { color: var(--accent-hot); }
.stat-down { color: var(--accent); }

/* ────────────────────────────────────────────────
   CATEGORIES SECTION
   ──────────────────────────────────────────────── */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1rem;
}

.category-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1rem;
  text-align: center;
  text-decoration: none;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
}

.category-card:hover {
  border-color: var(--border-accent);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}

.category-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.category-name {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.category-count {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* ────────────────────────────────────────────────
   NEWSLETTER SECTION
   ──────────────────────────────────────────────── */
.newsletter-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 3rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  margin: 2.5rem 0;
}

.newsletter-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 60% at 50% 50%, rgba(0,212,180,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.newsletter-section .section-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.newsletter-section h2 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  margin-bottom: 0.75rem;
}

.newsletter-section p {
  max-width: 500px;
  margin: 0 auto 2rem;
}

.newsletter-form {
  display: flex;
  gap: 0.75rem;
  max-width: 460px;
  margin: 0 auto;
}

.newsletter-form input {
  flex: 1;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 0.75rem 1.25rem;
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 0.9rem;
  outline: none;
  transition: border-color var(--transition);
}

.newsletter-form input:focus {
  border-color: var(--accent);
}

.newsletter-trust {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1.25rem;
  flex-wrap: wrap;
}

.trust-item {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

/* ────────────────────────────────────────────────
   FOOTER
   ──────────────────────────────────────────────── */
.site-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  padding: 3.5rem 0 1.5rem;
  position: relative;
  z-index: 1;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 1rem;
  line-height: 1.7;
  max-width: 280px;
}

.footer-brand .logo-text {
  font-size: 1.1rem;
}

.footer-col h4 {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.footer-links {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-links a {
  font-family: var(--font-display);
  font-size: 0.875rem;
  color: var(--text-secondary);
  transition: color var(--transition);
}

.footer-links a:hover { color: var(--accent); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-bottom p {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 0;
}

.footer-badges {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.footer-badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.05em;
}

/* Social Links */
.social-links {
  display: flex;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.social-link {
  width: 34px;
  height: 34px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: all var(--transition);
}

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

/* ────────────────────────────────────────────────
   ARTICLE PAGE
   ──────────────────────────────────────────────── */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 3rem;
  padding: 2.5rem 0 4rem;
  align-items: start;
}

.article-main {}

.article-header {
  margin-bottom: 2rem;
}

.article-header .article-meta {
  margin-bottom: 1.25rem;
}

.article-title {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.15;
  margin-bottom: 1.25rem;
  letter-spacing: -0.03em;
}

.article-deck {
  font-size: 1.2rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  font-style: italic;
}

.article-hero-image {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: var(--radius-lg);
  margin-bottom: 0.75rem;
}

.article-image-caption {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 2rem;
}

.article-share-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.share-label {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.share-buttons {
  display: flex;
  gap: 0.5rem;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.9rem;
  border-radius: 100px;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.share-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Article Body Typography */
.article-body {
  font-size: 1.1rem;
  line-height: 1.85;
  color: var(--text-secondary);
}

.article-body h2 {
  font-size: 1.6rem;
  margin: 2.5rem 0 1rem;
  color: var(--text-primary);
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.article-body h3 {
  font-size: 1.25rem;
  margin: 2rem 0 0.75rem;
  color: var(--text-primary);
}

.article-body p { margin-bottom: 1.5em; }

.article-body a { color: var(--accent); text-decoration: underline; }

.article-body blockquote {
  border-left: 3px solid var(--accent);
  margin: 2rem 0;
  padding: 1rem 1.5rem;
  background: var(--accent-glow);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-style: italic;
  font-size: 1.05rem;
}

.article-body blockquote p { margin-bottom: 0; }

.article-body ul, .article-body ol {
  margin-bottom: 1.5em;
}

.article-body li { color: var(--text-secondary); }

.article-body pre {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  overflow-x: auto;
  margin-bottom: 1.5em;
}

.article-body code {
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.article-body pre code {
  background: none;
  padding: 0;
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--accent);
}

.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5em;
  font-size: 0.9rem;
}

.article-body th {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.article-body td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}

.article-body tr:hover td { background: var(--bg-card); }

/* Callout boxes */
.callout {
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
  border-left: 3px solid;
  display: flex;
  gap: 1rem;
}

.callout-critical { background: rgba(255,77,109,0.08); border-color: var(--accent-hot); }
.callout-warning  { background: rgba(255,182,39,0.08); border-color: var(--accent-warn); }
.callout-info     { background: rgba(77,159,255,0.08); border-color: var(--accent-blue); }

.callout-icon { flex-shrink: 0; font-size: 1.1rem; }
.callout-text p { margin: 0; }

/* Article Sidebar */
.article-sidebar {}

.sidebar-widget {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.widget-header {
  padding: 0.9rem 1.25rem;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.widget-body {
  padding: 1.25rem;
}

/* Table of contents */
.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.toc-list a {
  display: block;
  padding: 0.4rem 0.75rem;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  border-left: 2px solid transparent;
}

.toc-list a:hover, .toc-list a.active {
  color: var(--accent);
  background: var(--accent-glow);
  border-left-color: var(--accent);
}

.toc-list .toc-h3 { padding-left: 1.5rem; }

/* Author widget */
.author-widget {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.75rem;
}

.author-avatar-lg {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 2px solid var(--border-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent);
}

.author-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
}

.author-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.author-bio {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Related articles */
.related-article {
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}
.related-article:first-child { padding-top: 0; }
.related-article:last-child { border-bottom: none; padding-bottom: 0; }

.related-thumb {
  width: 60px;
  height: 50px;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  flex-shrink: 0;
  overflow: hidden;
}

.related-thumb img { width: 100%; height: 100%; object-fit: cover; }

.related-title {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.related-title a { color: inherit; }
.related-title a:hover { color: var(--accent); }

.related-date {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
}

/* Threat score widget */
.threat-score-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.threat-gauge {
  position: relative;
  width: 100px;
  height: 100px;
}

.threat-gauge svg { transform: rotate(-90deg); }

.gauge-bg { fill: none; stroke: var(--bg-elevated); stroke-width: 8; }
.gauge-fill { fill: none; stroke-width: 8; stroke-linecap: round; transition: stroke-dashoffset 1s ease; }

.gauge-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.gauge-number {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1;
}

.gauge-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ────────────────────────────────────────────────
   CATEGORY PAGE
   ──────────────────────────────────────────────── */
.category-hero {
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2.5rem;
}

.category-hero-content {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.category-hero-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  flex-shrink: 0;
}

.category-hero h1 {
  font-size: 2.25rem;
  margin-bottom: 0.35rem;
}

.category-hero p {
  color: var(--text-secondary);
  font-size: 1rem;
  margin: 0;
}

/* ────────────────────────────────────────────────
   SEARCH RESULTS
   ──────────────────────────────────────────────── */
#search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10,12,15,0.96);
  z-index: 200;
  display: none;
  align-items: flex-start;
  padding-top: 10vh;
}

#search-overlay.active { display: flex; }

.search-modal {
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.search-modal-input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-lg);
  padding: 1rem 1.5rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--text-primary);
  outline: none;
  box-shadow: var(--shadow-glow);
}

.search-results {
  margin-top: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  max-height: 60vh;
  overflow-y: auto;
}

.search-result-item {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--transition);
}

.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: var(--bg-card-hover); }

.search-result-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
}

.search-result-excerpt {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.search-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  cursor: pointer;
}

/* ────────────────────────────────────────────────
   TAGS
   ──────────────────────────────────────────────── */
.tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 3px 10px;
  border-radius: 100px;
  text-decoration: none;
  transition: all var(--transition);
  letter-spacing: 0.03em;
}

.tag:hover {
  color: var(--accent);
  border-color: var(--border-accent);
}

/* ────────────────────────────────────────────────
   PAGINATION
   ──────────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 2rem 0;
}

.page-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.page-btn:hover, .page-btn.active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

/* ────────────────────────────────────────────────
   MOBILE MENU
   ──────────────────────────────────────────────── */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
  color: var(--text-secondary);
  flex-direction: column;
  gap: 5px;
}

.mobile-menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  transition: all var(--transition);
  border-radius: 2px;
}

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

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.animate-fade-up { animation: fadeInUp 0.5s ease forwards; }
.animate-fade    { animation: fadeIn 0.4s ease forwards; }

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

/* ────────────────────────────────────────────────
   RESPONSIVE
   ──────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .hero-grid { grid-template-columns: 1fr; }
  .sidebar-latest { display: grid; grid-template-columns: repeat(2, 1fr); }
  .sidebar-latest .sidebar-header { grid-column: 1/-1; }
  .categories-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .article-layout { grid-template-columns: 1fr; }
  .article-sidebar { display: none; }
}

@media (max-width: 768px) {
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid .stat-item:nth-child(2) { border-right: none; }
  .stats-grid .stat-item:nth-child(3) { border-top: 1px solid var(--border); }
  .stats-grid .stat-item:nth-child(4) { border-top: 1px solid var(--border); border-right: none; }
  .categories-grid { grid-template-columns: repeat(2, 1fr); }
  .header-search { display: none; }
  .mobile-menu-toggle { display: flex; }
  .nav-bar { display: none; }
  .nav-bar.open { display: block; }
  .newsletter-form { flex-direction: column; }
  .newsletter-section { padding: 2rem 1.5rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .hero-section { padding: 1.5rem 0; }
  .article-card-h .card-image { width: 110px; }
}

@media (max-width: 480px) {
  .grid-4 { grid-template-columns: 1fr; }
  .categories-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ── Print ─────────────────────────────────────── */
@media print {
  .site-header, .site-footer, .article-sidebar,
  .article-share-bar, .newsletter-section { display: none; }
  body { background: white; color: black; }
  .article-body { color: #333; }
}
