  :root {
    --bg: #04060f;
    --surface: #23133a;
    --surface2: #1f1232;
    --accent: #883CF0;
    --accent2: #7b5cff;
    --accent3: #a78bfa;
    --text: #e2f0ff;
    --muted: #d6d6d6;
    --border: #3a1c63;
    --glow: 0 0 20px #be52e50f;
  }

  * { margin: 0; padding: 0; box-sizing: border-box; }

  body {
    background: #191127;
    color: var(--text);
    font-family: 'Syne', sans-serif;
    overflow-x: hidden;
    min-height: 100vh;
  }

  /* Animated grid background */
  body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
      linear-gradient(#a600ff08 1px, transparent 1px),
      linear-gradient(90deg, #a600ff08 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    z-index: 0;
  }

  /* Scanline effect */
  body::after {
    content: '';
    position: fixed;
    inset: 0;
    background: repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(0,0,0,0.05) 2px,
      rgba(0,0,0,0.05) 4px
    );
    pointer-events: none;
    z-index: 0;
  }

  /* ─── NAV ─── */
  nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2.5rem;
    background: #180f26;
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
  }

  .nav-logo {
    font-family: 'Space Mono', monospace;
    font-size: 0.85rem;
    color: var(--accent);
    letter-spacing: 0.1em;
    text-transform: uppercase;
  }

  .nav-logo span { color: var(--accent2); }

  .nav-tabs {
    display: flex;
    gap: 0.25rem;
    background: #1f1232;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 4px;
  }

  .nav-tab {
    padding: 0.4rem 1rem;
    font-size: 0.75rem;
    font-family: 'Space Mono', monospace;
    letter-spacing: 0.05em;
    cursor: pointer;
    border-radius: 4px;
    border: none;
    background: transparent;
    color: var(--muted);
    transition: all 0.2s;
    text-transform: uppercase;
  }

  .nav-tab.active, .nav-tab:hover {
    background: var(--accent);
    color: var(--bg);
  }

  /* ─── HERO ─── */
  .hero {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 6rem 2rem 3rem;
    overflow: hidden;
  }

  .hero-orb {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, #9d00ff14 0%, transparent 70%);
    animation: pulse 4s ease-in-out infinite;
  }

  .hero-orb2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #dc8bfa0f 0%, transparent 70%);
    animation: pulse 6s ease-in-out infinite reverse;
  }

  @keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.1); opacity: 1; }
  }

  .hero-badge {
    font-family: 'Space Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    color: var(--accent);
    text-transform: uppercase;
    border: 1px solid var(--accent);
    padding: 0.35rem 1rem;
    border-radius: 2px;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
    animation: fadeUp 0.8s ease both;
  }

  h1 {
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 800;
    line-height: 1;
    position: relative;
    z-index: 1;
    animation: fadeUp 0.8s 0.1s ease both;
  }

  h1 .line1 { display: block; color: var(--text); }
  h1 .line2 { display: block; color: var(--accent); }
  h1 .line3 { display: block; color: var(--accent3); }

  .hero-sub {
    max-width: 560px;
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.7;
    margin: 1.5rem auto 2.5rem;
    position: relative;
    z-index: 1;
    animation: fadeUp 0.8s 0.2s ease both;
  }

  .hero-stats {
    display: flex;
    gap: 3rem;
    position: relative;
    z-index: 1;
    animation: fadeUp 0.8s 0.3s ease both;
  }

  .stat {
    text-align: center;
  }

  .stat-num {
    font-family: 'Space Mono', monospace;
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
    display: block;
  }

  .stat-label {
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    color: var(--muted);
    text-transform: uppercase;
  }

  .scroll-hint {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    z-index: 1;
    animation: bounce 2s ease-in-out infinite;
  }

  .scroll-hint span {
    font-family: 'Space Mono', monospace;
    font-size: 0.6rem;
    color: var(--muted);
    letter-spacing: 0.2em;
  }

  .scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--accent), transparent);
  }

  @keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(8px); }
  }

  @keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
  }

  /* ─── SECTIONS ─── */
  section {
    position: relative;
    z-index: 1;
    padding: 5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    display: none;
  }

  section.active { display: block; }

  .section-label {
    font-family: 'Space Mono', monospace;
    font-size: 0.65rem;
    letter-spacing: 0.25em;
    color: var(--accent);
    text-transform: uppercase;
    margin-bottom: 0.75rem;
  }

  .section-title {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1rem;
  }

  .section-desc {
    color: var(--muted);
    max-width: 600px;
    line-height: 1.7;
    margin-bottom: 3rem;
  }

  /* ─── TECHNIQUE CARDS ─── */
  .cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 4rem;
  }

  .card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.75rem;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
  }

  .card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 3px;
    height: 100%;
    background: var(--accent);
    transform: scaleY(0);
    transition: transform 0.3s;
    transform-origin: top;
  }

  .card:hover { border-color: var(--accent); transform: translateY(-4px); box-shadow: var(--glow); }
  .card:hover::before { transform: scaleY(1); }
  .card.accent2:hover { border-color: var(--accent2); box-shadow: 0 0 20px #d23dff4d; }
  .card.accent2::before { background: var(--accent2); }
  .card.accent3:hover { border-color: var(--accent3); box-shadow: 0 0 20px #a78bfa4d; }
  .card.accent3::before { background: var(--accent3); }

  .card-icon {
    font-size: 1.8rem;
    margin-bottom: 1rem;
  }

  .card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
  }

  .card p {
    font-size: 0.875rem;
    color: var(--muted);
    line-height: 1.6;
  }

  .card-tag {
    display: inline-block;
    margin-top: 1rem;
    font-family: 'Space Mono', monospace;
    font-size: 0.6rem;
    letter-spacing: 0.15em;
    padding: 0.25rem 0.6rem;
    border-radius: 2px;
    background: #a600ff1a;
    color: var(--accent);
    text-transform: uppercase;
  }

  .card.accent2 .card-tag { background: #ff3dec1a; color: var(--accent2); }
  .card.accent3 .card-tag { background: #ce8bfa1a; color: var(--accent3); }

  /* ─── ANOMALY DEMO ─── */
  .anomaly-demo {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
  }

  .demo-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
  }

  .demo-title {
    font-family: 'Space Mono', monospace;
    font-size: 0.75rem;
    color: var(--accent);
    letter-spacing: 0.1em;
    text-transform: uppercase;
  }

  .demo-controls {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
  }

  .btn {
    padding: 0.4rem 1rem;
    font-family: 'Space Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.05em;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
    text-transform: uppercase;
  }

  .btn-primary {
    background: var(--accent);
    color: var(--bg);
    border: none;
  }

  .btn-primary:hover { background: #883cf0e0; }

  .btn-outline {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
  }

  .btn-outline:hover { background: #1f1232; }

  .btn-danger {
    background: transparent;
    color: var(--accent2);
    border: 1px solid var(--accent2);
  }

  .btn-danger:hover { background: #ff3d711a; }

  /* ─── CHART CANVAS ─── */
  #networkChart {
    width: 100%;
    height: 200px;
    border: 1px solid #3a1c63;
    border-radius: 6px;
    background: var(--bg);
    display: block;
  }

  .chart-legend {
    display: flex;
    gap: 1.5rem;
    margin-top: 0.75rem;
    font-family: 'Space Mono', monospace;
    font-size: 0.65rem;
    color: var(--muted);
  }

  .legend-item { display: flex; align-items: center; gap: 0.4rem; }
  .legend-dot { width: 8px; height: 8px; border-radius: 50%; }

  /* ─── THREAT MONITOR ─── */
  .threat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 2rem;
  }

  .threat-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
  }

  .threat-panel h4 {
    font-family: 'Space Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    color: var(--muted);
    text-transform: uppercase;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
  }

  .threat-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 0;
    border-bottom: 1px solid #3a1c63;
    font-size: 0.82rem;
    gap: 0.5rem;
  }

  .threat-item:last-child { border-bottom: none; }

  .threat-label { color: var(--muted); flex: 1; }

  .severity {
    font-family: 'Space Mono', monospace;
    font-size: 0.65rem;
    padding: 0.2rem 0.5rem;
    border-radius: 2px;
    text-transform: uppercase;
  }

  .sev-high { background: rgba(255,61,113,0.15); color: var(--accent2); }
  .sev-med { background: rgba(255,170,0,0.15); color: #ffa500; }
  .sev-low { background: rgba(0,229,255,0.1); color: var(--accent); }

  .threat-bar-wrap {
    width: 80px;
    height: 4px;
    background: rgba(255,255,255,0.05);
    border-radius: 2px;
    overflow: hidden;
  }

  .threat-bar {
    height: 100%;
    border-radius: 2px;
    transition: width 1s ease;
  }

  /* ─── PAM CHECKLIST ─── */
  .checklist {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1rem;
  }

  .check-item {
    display: flex;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: all 0.3s;
    cursor: pointer;
    align-items: flex-start;
  }

  .check-item:hover { border-color: var(--accent3); }

  .check-item.done { border-color: #5e309d; background: #ae00ff0a; }

  .check-box {
    width: 20px;
    height: 20px;
    border: 2px solid var(--muted);
    border-radius: 4px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
    transition: all 0.2s;
  }

  .check-item.done .check-box {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--bg);
  }

  .check-num {
    font-family: 'Space Mono', monospace;
    font-size: 0.65rem;
    color: var(--accent3);
    flex-shrink: 0;
    margin-top: 3px;
  }

  .check-content h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
  }

  .check-content p {
    font-size: 0.78rem;
    color: var(--muted);
    line-height: 1.5;
  }

  /* ─── ML SECTION ─── */
  .ml-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
  }

  .ml-tab {
    padding: 0.5rem 1.25rem;
    font-family: 'Space Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.05em;
    cursor: pointer;
    border-radius: 4px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--muted);
    transition: all 0.2s;
    text-transform: uppercase;
  }

  .ml-tab.active {
    background: #a78bfa26;
    border-color: var(--accent3);
    color: var(--accent3);
  }

  .ml-content {
    display: none;
    animation: fadeUp 0.4s ease;
  }

  .ml-content.active { display: block; }

  .ml-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
  }

  .ml-card h3 {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--accent3);
    margin-bottom: 0.75rem;
  }

  .ml-card p {
    color: var(--muted);
    line-height: 1.7;
    font-size: 0.9rem;
    margin-bottom: 1rem;
  }

  .ml-use-cases {
    list-style: none;
  }

  .ml-use-cases li {
    padding: 0.5rem 0;
    font-size: 0.82rem;
    color: var(--text);
    display: flex;
    gap: 0.5rem;
    border-bottom: 1px solid var(--border);
  }

  .ml-use-cases li:last-child { border-bottom: none; }
  .ml-use-cases li::before { content: '→'; color: var(--accent3); flex-shrink: 0; }

  .ml-visual {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Data viz bars */
  .viz-bars {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    height: 150px;
    width: 100%;
  }

  .viz-bar {
    flex: 1;
    border-radius: 3px 3px 0 0;
    transition: height 0.6s ease;
    position: relative;
    min-height: 4px;
  }

  /* Terminal log */
  .terminal {
    background: #000;
    border-radius: 8px;
    padding: 1.25rem;
    font-family: 'Space Mono', monospace;
    font-size: 0.72rem;
    line-height: 1.8;
    color: #60c090;
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #5e309d;
  }

  .terminal .t-line { display: flex; gap: 0.75rem; }
  .terminal .t-time { color: #555; flex-shrink: 0; }
  .terminal .t-ok { color: #0f0; }
  .terminal .t-warn { color: #ffa500; }
  .terminal .t-err { color: #ff3d71; }
  .terminal .t-info { color: #00e5ff; }

  /* ─── THREAT INTEL ─── */
  .intel-flow {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
  }

  .intel-row {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 1.5rem;
    align-items: center;
  }

  .intel-source {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.75rem 1rem;
    text-align: center;
    font-family: 'Space Mono', monospace;
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    color: var(--accent);
    text-transform: uppercase;
  }

  .intel-bar {
    height: 36px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    padding: 0 1rem;
    font-size: 0.78rem;
    color: var(--text);
    position: relative;
    overflow: hidden;
  }

  .intel-bar::after {
    content: '';
    position: absolute;
    right: 0; top: 0; bottom: 0;
    width: 40%;
    background: linear-gradient(to left, rgba(0,0,0,0.3), transparent);
  }

  /* ─── FOOTER ─── */
  footer {
    position: relative;
    z-index: 1;
    border-top: 1px solid var(--border);
    padding: 2rem;
    text-align: center;
    font-family: 'Space Mono', monospace;
    font-size: 0.65rem;
    color: var(--muted);
    letter-spacing: 0.1em;
  }

  footer a { color: var(--accent); text-decoration: none; }

  /* ─── RESPONSIVE ─── */
  @media (max-width: 700px) {
    .threat-grid { grid-template-columns: 1fr; }
    .ml-card { grid-template-columns: 1fr; }
    .intel-row { grid-template-columns: 1fr; }
    .hero-stats { gap: 1.5rem; flex-wrap: wrap; justify-content: center; }
    nav { padding: 0.75rem 1rem; }
    .nav-tabs { gap: 0; }
    .nav-tab { padding: 0.35rem 0.6rem; font-size: 0.65rem; }
  }

  /* ─── LIVE INDICATOR ─── */
  .live-dot {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-family: 'Space Mono', monospace;
    font-size: 0.65rem;
    color: #0f0;
    letter-spacing: 0.1em;
  }

  .live-dot::before {
    content: '';
    width: 6px;
    height: 6px;
    background: #0f0;
    border-radius: 50%;
    animation: blink 1.2s ease-in-out infinite;
  }

  @keyframes blink {
    0%, 100% { opacity: 1; box-shadow: 0 0 6px #0f0; }
    50% { opacity: 0.4; box-shadow: none; }
  }

  /* ─── SECTION SWITCHER ─── */
  #home-section { display: block; }