/* CyberAware UK — Redesigned with Ibby's exact colors */
:root {
  --primary: #1877f2;
  --secondary: #f0f2f5;
  --accent: #1d9bf0;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', Arial, sans-serif;
  --text: #050505;
  --muted: #65676b;
  --bg: #ffffff;
  --border: #e0e0e0;
  --panel: #f8f9fa;
  --bg: #f0f2f5;
  --bg-card: #ffffff;
  --bg-hover: #e8f0fe;
  --accent: #1877f2;
  --accent-light: #4285f4;
  --accent-dark: #146eb4;
  --text-muted: #65676b;
  --text-faint: #9ca3af;
  --danger: #ef4444;
  --warning: #f59e0b;
  --success: #22c55e;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --border: #e0e0e0;
  --radius: 14px;
}

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

body {
  font-family: var(--font);
  background: var(--secondary);
  color: var(--text);
  line-height: 1.5;
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* ── Top Bar ── */
.top-bar {
  height: 64px;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.top-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
}
.logo { text-decoration: none; display: flex; align-items: center; gap: 8px; }
.logo-icon {
  width: 36px; height: 36px;
  background: rgba(255,255,255,0.2);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; color: white;
}
.logo-text { font-size: 18px; font-weight: 700; color: white; letter-spacing: -0.5px; }
.logo-text span { color: rgba(255,255,255,0.8); }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 10px;
  transition: all 0.15s;
}
.nav a:hover { background: rgba(255,255,255,0.15); color: white; }
.nav a.active { background: rgba(255,255,255,0.2); color: white; font-weight: 600; }

.nav-social { display: flex; align-items: center; gap: 8px; }
.nav-social a { color: rgba(255,255,255,0.7); font-size: 18px; padding: 8px; text-decoration: none; transition: all 0.15s; }
.nav-social a:hover { color: white; }

/* ── Hero ── */
.hero {
  padding: 60px 0 40px;
  text-align: center;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.hero h1 {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.15;
  margin-bottom: 12px;
  color: var(--text);
}
.hero h1 span { color: var(--primary); }
.hero p {
  font-size: 16px;
  color: var(--muted);
  max-width: 600px;
  margin: 0 auto 20px;
  line-height: 1.6;
}

.hero-stats { display: flex; justify-content: center; gap: 40px; margin-top: 30px; }
.hero-stat { text-align: center; }
.hero-stat strong { display: block; font-size: 24px; font-weight: 800; color: var(--primary); }
.hero-stat span { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 24px; border-radius: 999px;
  font-size: 14px; font-weight: 600; text-decoration: none;
  transition: all 0.15s; border: none; cursor: pointer;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { opacity: 0.9; }
.btn-secondary { background: var(--panel); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--secondary); }
.btn-group { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ── Section ── */
.section { padding: 30px 0; }
.section-title { font-size: 18px; font-weight: 700; margin-bottom: 16px; display: flex; align-items: center; gap: 10px; }

/* ── Blog Grid ── */
.blog-grid { display: grid; gap: 12px; }
.post-card {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
  transition: all 0.15s;
}
.post-card:hover { border-color: var(--primary); box-shadow: 0 2px 8px rgba(24,119,242,0.1); }
.post-date { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.post-card h2 { font-size: 16px; font-weight: 700; margin-bottom: 6px; line-height: 1.3; }
.post-card h2 a { color: var(--text); text-decoration: none; }
.post-card h2 a:hover { color: var(--primary); }
.post-excerpt { font-size: 13px; color: var(--muted); line-height: 1.5; margin-bottom: 8px; }
.post-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: #e8f0fe; color: var(--primary); }

/* ── Subscribe ── */
.subscribe-card {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; text-align: center; margin: 24px 0;
}
.subscribe-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.subscribe-card p { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.subscribe-form { display: flex; gap: 8px; max-width: 400px; margin: 0 auto; }
.subscribe-form input { flex: 1; padding: 10px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg); font-size: 14px; }
.subscribe-form button { padding: 10px 20px; border-radius: 999px; background: var(--primary); color: white; border: none; font-weight: 600; cursor: pointer; }

/* ── Single Post ── */
.post-single { padding: 30px 0; }
.post-single h1 { font-size: 28px; font-weight: 800; margin-bottom: 8px; }
.post-meta { font-size: 13px; color: var(--muted); margin-bottom: 20px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.post-body { font-size: 15px; line-height: 1.7; }
.post-body h2 { font-size: 20px; font-weight: 700; margin: 24px 0 8px; }
.post-body h3 { font-size: 16px; font-weight: 600; margin: 20px 0 6px; }
.post-body p { margin-bottom: 12px; }
.post-body ul, .post-body ol { margin-bottom: 12px; padding-left: 24px; }
.post-body li { margin-bottom: 4px; }
.post-body blockquote { border-left: 3px solid var(--primary); padding-left: 14px; margin: 12px 0; color: var(--muted); }
.post-body hr { margin: 24px 0; border: none; border-top: 1px solid var(--border); }

/* ── About ── */
.about-page { padding: 30px 0; }
.about-page h1 { font-size: 24px; margin-bottom: 16px; }
.about-page p { font-size: 15px; color: var(--muted); margin-bottom: 12px; line-height: 1.6; }
.about-features { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 20px 0; }
.about-feature { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.about-feature h3 { font-size: 14px; margin-bottom: 4px; }
.about-feature p { font-size: 12px; margin-bottom: 0; }

/* ── Footer ── */
.footer {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 14px 20px; color: var(--muted);
  border-top: 1px solid var(--border); background: var(--bg);
  margin-top: 30px;
}
.footer a { color: var(--muted); text-decoration: none; font-size: 13px; }
.footer a:hover { color: var(--primary); }

/* ── Responsive ── */
/* ════════════════════════════════════════
   DASHBOARD
   ════════════════════════════════════════ */
.dashboard { padding: 24px 0; }
.dash-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 24px; flex-wrap: wrap; gap: 12px;
}
.dash-header h1 { font-size: 22px; font-weight: 800; letter-spacing: -0.5px; }
.dash-header .dash-meta {
  display: flex; align-items: center; gap: 12px;
  font-size: 12px; color: var(--muted);
}
.dash-meta .update-badge {
  display: inline-flex; align-items: center; gap: 4px;
  background: #e8f0fe; color: var(--primary);
  padding: 4px 10px; border-radius: 999px; font-weight: 600; font-size: 11px;
}
.dash-meta .update-badge.live {
  background: #dcfce7; color: #16a34a;
}

/* KPI Row */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px; margin-bottom: 20px;
}
.kpi-card {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px;
  position: relative; overflow: hidden;
  transition: all 0.2s;
}
.kpi-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.kpi-card .kpi-accent {
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
}
.kpi-card .kpi-icon {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; margin-bottom: 10px;
}
.kpi-card .kpi-label {
  font-size: 11px; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.04em; font-weight: 600;
}
.kpi-card .kpi-value {
  font-size: 26px; font-weight: 800; letter-spacing: -0.5px;
  margin: 2px 0;
}
.kpi-card .kpi-change {
  font-size: 11px; font-weight: 600;
}

/* Panel */
.panel {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
  margin-bottom: 12px;
}
.panel-title {
  font-size: 14px; font-weight: 700; color: var(--text);
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 14px;
}
.panel-title .badge {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--secondary); color: var(--muted);
  padding: 2px 8px; border-radius: 999px;
  margin-left: auto;
}

/* Intel Feed */
.intel-item {
  display: flex; gap: 10px;
  padding: 8px 0; border-bottom: 1px solid #f0f0f0;
  font-size: 13px; color: #4a4a4a; line-height: 1.4;
}
.intel-item:last-child { border-bottom: none; }
.intel-item .severity-dot {
  width: 8px; height: 8px; border-radius: 50%;
  margin-top: 5px; flex-shrink: 0;
}

/* Stat Quad */
.stat-quad {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
}
.stat-quad-item {
  border-radius: 10px; padding: 14px 12px; text-align: center;
}
.stat-quad-item .sq-label {
  font-size: 10px; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.04em; font-weight: 600;
}
.stat-quad-item .sq-value {
  font-size: 20px; font-weight: 800; letter-spacing: -0.5px;
  margin-top: 2px;
}
.stat-quad-item .sq-source {
  font-size: 10px; color: var(--muted); margin-top: 4px;
}

/* CTA Grid */
.cta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
}
.cta-btn {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 16px 12px; border-radius: 12px;
  text-decoration: none; font-weight: 600; font-size: 12px;
  transition: all 0.2s;
  text-align: center;
}
.cta-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.15); }
.cta-btn .cta-icon { font-size: 24px; }

/* Middle two-column */
.dash-cols {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 12px; margin-bottom: 12px;
}
@media (max-width: 700px) { .dash-cols { grid-template-columns: 1fr; } }

/* Audio player */
.dash-audio {
  width: 100%; height: 40px;
  border-radius: 8px;
}

@media (max-width: 768px) {
  .nav { display: none; }
  .hero { padding: 30px 0 20px; }
  .hero-stats { gap: 16px; flex-wrap: wrap; }
  .hero-stat strong { font-size: 20px; }
  .about-features { grid-template-columns: 1fr; }
  .subscribe-form { flex-direction: column; }
  .footer { flex-direction: column; align-items: center; text-align: center; }
}

/* ── Mobile Nav Scrolling ── */
/* ── Mobile Nav: Hamburger Menu ── */
@media (max-width: 720px) {
  .desk-nav { display: none !important; }
  nav.desk-nav { display: none !important; }
}
@media (min-width: 721px) {
  nav.desk-nav { display: flex !important; overflow-x: auto !important; scrollbar-width: thin; flex: 1; }
  nav.desk-nav::-webkit-scrollbar { height: 3px; }
  nav.desk-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.3); border-radius: 3px; }
  nav.desk-nav::-webkit-scrollbar-track { background: transparent; }
}

nav::-webkit-scrollbar { display: none; }
nav { -ms-overflow-style: none; }
@media (max-width: 680px) {
  header { gap: 4px !important; padding: 0 8px !important; }
  header nav a { font-size: 12px !important; padding: 6px 8px !important; }
  header > div:first-child { font-size: 13px !important; }
  header > div:last-child { gap: 4px !important; }
  header > div:last-child a { font-size: 12px !important; }
}


/* Desktop hamburger - always visible */
@media (min-width: 721px) {
  .ham-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    margin-left: 4px;
    flex-shrink: 0;
    transition: background 0.2s;
  }
  .ham-btn:hover {
    background: rgba(255,255,255,0.2);
  }
}


/* Responsive main content width */
@media (max-width: 600px) {
  main { padding: 16px 12px !important; }
  footer { padding: 16px 12px !important; }
  .dashboard { padding: 16px 12px !important; }
}

@media (min-width: 601px) and (max-width: 1024px) {
  main { padding: 20px 24px !important; }
  footer { padding: 20px 24px !important; }
  .dashboard { padding: 20px 24px !important; }
}


/* Blog post grid - responsive */
.blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width: 768px) {
  .blog-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1200px) {
  .blog-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

/* Card hover effect */
.blog-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.blog-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.1) !important;
}

/* Consistent card pattern */
.card {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  margin-bottom: 14px;
}
.card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

/* Sidebar widget */
.side-widget {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 14px;
}
.side-widget h3 {
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 8px;
  color: #1a1a2e;
}
.side-widget ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.side-widget ul li {
  padding: 4px 0;
  font-size: 13px;
}
.side-widget ul li a {
  color: #1877F2;
  text-decoration: none;
}
.side-widget ul li a:hover {
  text-decoration: underline;
}

/* Two-column layout for wider screens */
@media (min-width: 900px) {
  .content-with-sidebar {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 20px;
  }
  .content-main { min-width: 0; }
  .content-side { min-width: 0; }
}

@media (max-width: 899px) {
  .content-side { display: none; }
}


/* Mobile */
@media (max-width: 480px) {
  header a[href*="x.com"], header a[href*="spotify"] { display: none !important; }
}

/* Hamburger menu - always visible on all devices */
.ham-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  visibility: visible !important;
  opacity: 1 !important;
  width: auto !important;
  min-width: 30px;
  height: 36px;
  cursor: pointer;
  flex-shrink: 0;
  padding: 4px 8px;
  border-radius: 8px;
  gap: 4px;
}
.ham-btn:hover {
  background: rgba(255,255,255,0.15);
}

/* On phones, hide desktop nav and show hamburger */
@media (max-width: 720px) {
  .desk-nav { display: none !important; }
  .ham-btn { display: inline-flex !important; }
}


/* Live indicator - pulsing dot */
.live-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: #22c55e;
  border-radius: 50%;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
  100% { opacity: 1; transform: scale(1); }
}

/* Live badge on stat cards */
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #22c55e;
  background: #e8f8e8;
  padding: 2px 8px;
  border-radius: 10px;
  margin-bottom: 4px;
}
.live-badge .dot {
  width: 5px;
  height: 5px;
  background: #22c55e;
  border-radius: 50%;
  animation: pulse 2s infinite;
}


/* Pulsing map marker animation */
@keyframes pulse-marker {
  0% { opacity: 0.6; r: 8; }
  50% { opacity: 1; r: 12; }
  100% { opacity: 0.6; r: 8; }
}

.pulse-marker {
  animation: pulse-marker 2.5s ease-in-out infinite;
  transform-origin: center;
  transform-box: fill-box;
}

/* Pulse ring around markers */
.pulse-ring {
  animation: pulse-ring 2.5s ease-in-out infinite;
}

@keyframes pulse-ring {
  0% { opacity: 0.4; r: 8; }
  50% { opacity: 0.1; r: 18; }
  100% { opacity: 0.4; r: 8; }
}


/* Subtle pulse on stat cards */
.stat-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Live dot pulse */
@keyframes live-pulse {
  0% { opacity: 1; box-shadow: 0 0 0 0 rgba(34,197,94,0.4); }
  50% { opacity: 0.6; box-shadow: 0 0 0 6px rgba(34,197,94,0); }
  100% { opacity: 1; box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}
.live-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: #22c55e;
  border-radius: 50%;
  animation: live-pulse 2s infinite;
}

/* Pulse the entire stat card background subtly */
@keyframes card-breathe {
  0% { border-color: #e0e0e0; }
  50% { border-color: #c8e6c9; }
  100% { border-color: #e0e0e0; }
}
.stat-card.pulse-bg {
  animation: card-breathe 4s ease-in-out infinite;
}


/* Blog post / article styling */
.post-content h1 { font-size: 24px; margin: 24px 0 12px; color: #1a1a2e; line-height: 1.3; }
.post-content h2 { font-size: 20px; margin: 20px 0 10px; color: #1a1a2e; line-height: 1.3; }
.post-content h3 { font-size: 17px; margin: 16px 0 8px; color: #1a1a2e; }
.post-content p { font-size: 15px; line-height: 1.8; color: #444; margin: 0 0 14px; }
.post-content ul, .post-content ol { margin: 0 0 14px; padding-left: 24px; }
.post-content li { font-size: 15px; line-height: 1.7; color: #444; margin-bottom: 6px; }
.post-content strong { color: #1a1a2e; }
.post-content a { color: #1877F2; text-decoration: none; }
.post-content a:hover { text-decoration: underline; }
.post-content blockquote {
  border-left: 4px solid #1877F2;
  background: #f8faff;
  padding: 12px 18px;
  margin: 14px 0;
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: #555;
}
.post-content code {
  background: #f0f2f5;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 14px;
  color: #e17055;
}
.post-content pre {
  background: #1a1a2e;
  color: #f0f0f0;
  padding: 16px;
  border-radius: 10px;
  overflow-x: auto;
  margin: 14px 0;
  font-size: 14px;
  line-height: 1.6;
}
.post-content img {
  max-width: 100%;
  border-radius: 10px;
  margin: 14px 0;
}
.post-content hr {
  border: none;
  border-top: 2px solid #eee;
  margin: 24px 0;
}

/* BULLY patrol animation */

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