/* ==========================================================================
   NEXUS-GUARD Portfolio Style System
   Enterprise Grade Cyber Active Defense & XDR Dashboard Design
   Inspired by CrowdStrike Falcon, SentinelOne Singularity & Vercel
   ========================================================================== */

:root {
  /* Core Dark Theme Palette */
  --bg-base: #06080d;
  --bg-primary: #080b11;
  --bg-secondary: #0c121e;
  --bg-card: #0f172a;
  --bg-card-elevated: #131c2e;
  --bg-card-hover: #16243b;
  --bg-glass: rgba(15, 23, 42, 0.75);
  --bg-input: #0a0f18;

  /* Borders */
  --border-subtle: #1e293b;
  --border-medium: #273549;
  --border-bright: #38bdf8;
  --border-active: rgba(0, 229, 255, 0.4);

  /* Cyber Accent & Status Colors */
  --color-safe: #00e676;         /* Emerald Green - System Normal */
  --color-safe-glow: rgba(0, 230, 118, 0.25);
  --color-cyan: #00e5ff;         /* Cyber Cyan - Active / Highlights */
  --color-cyan-glow: rgba(0, 229, 255, 0.25);
  --color-threat: #ff3864;       /* Crimson Neon - Threat / Blocked */
  --color-threat-glow: rgba(255, 56, 100, 0.35);
  --color-warning: #ffb300;      /* Amber Gold - Warning / Triage */
  --color-warning-glow: rgba(255, 179, 0, 0.25);
  --color-purple: #c084fc;       /* Indigo/Violet - AI / Intelligence */
  --color-purple-glow: rgba(192, 132, 252, 0.25);

  /* Typography Colors */
  --text-main: #f8fafc;
  --text-primary: #e2e8f0;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --text-dark: #0f172a;

  /* Font Families */
  --font-mono: "JetBrains Mono", "Fira Code", "Cascadia Code", SFMono-Regular, Consolas, monospace;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Pretendard, sans-serif;

  /* Transitions & Shadows */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-subtle: 0 4px 20px rgba(0, 0, 0, 0.5);
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.7);
  --shadow-neon-cyan: 0 0 25px rgba(0, 229, 255, 0.3);
  --shadow-neon-safe: 0 0 25px rgba(0, 230, 118, 0.3);
  --shadow-neon-threat: 0 0 25px rgba(255, 56, 100, 0.4);

  /* Layout */
  --container-max: 1440px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-full: 9999px;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: var(--bg-base);
}

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

/* Background Cyber Grid Pattern */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

/* Glowing Ambient Orbs */
.ambient-glow {
  position: fixed;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.12;
  pointer-events: none;
  z-index: 0;
}
.ambient-glow.top-left {
  top: -200px;
  left: -200px;
  background: radial-gradient(circle, var(--color-cyan), transparent);
}
.ambient-glow.top-right {
  top: 20%;
  right: -250px;
  background: radial-gradient(circle, var(--color-safe), transparent);
}

/* Typography Defaults */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-mono);
  color: var(--text-main);
  font-weight: 700;
  letter-spacing: -0.02em;
}

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

code, pre {
  font-family: var(--font-mono);
}

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

/* ==========================================================================
   Header & Navbar
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(8, 11, 17, 0.85);
  border-bottom: 1px solid var(--border-subtle);
  height: 70px;
  display: flex;
  align-items: center;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-logo-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #00e5ff 0%, #00e676 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #06080d;
  font-weight: 900;
  font-size: 1.15rem;
  box-shadow: 0 0 15px rgba(0, 229, 255, 0.4);
}

.brand-text-group {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brand-tag {
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  background: rgba(0, 229, 255, 0.12);
  color: var(--color-cyan);
  border: 1px solid rgba(0, 229, 255, 0.3);
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
}

.brand-subtitle {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  list-style: none;
}

.nav-link {
  font-size: 0.85rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.nav-link:hover, .nav-link.active {
  color: var(--color-cyan);
  text-decoration: none;
  background: rgba(0, 229, 255, 0.08);
}

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

/* ==========================================================================
   Buttons & Badges
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-normal);
  border: 1px solid transparent;
  white-space: nowrap;
  outline: none;
}

.btn-primary {
  background: linear-gradient(135deg, #00e5ff 0%, #0088ff 100%);
  color: #06080d;
  font-weight: 700;
  box-shadow: 0 0 15px rgba(0, 229, 255, 0.35);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #33ecff 0%, #339fff 100%);
  box-shadow: 0 0 25px rgba(0, 229, 255, 0.6);
  transform: translateY(-1px);
  text-decoration: none;
  color: #06080d;
}

.btn-outline {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
}
.btn-outline:hover {
  background: var(--bg-card-hover);
  border-color: var(--color-cyan);
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-danger {
  background: linear-gradient(135deg, #ff3864 0%, #d90429 100%);
  color: #fff;
  box-shadow: 0 0 15px rgba(255, 56, 100, 0.35);
}
.btn-danger:hover {
  background: linear-gradient(135deg, #ff527b 0%, #ef233c 100%);
  box-shadow: 0 0 25px rgba(255, 56, 100, 0.6);
  transform: translateY(-1px);
}

.btn-success {
  background: linear-gradient(135deg, #00e676 0%, #00b0ff 100%);
  color: #06080d;
  font-weight: 700;
  box-shadow: 0 0 15px rgba(0, 230, 118, 0.35);
}
.btn-success:hover {
  box-shadow: 0 0 25px rgba(0, 230, 118, 0.6);
  transform: translateY(-1px);
}

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.75rem;
}

.btn-icon-only {
  padding: 0.5rem;
  width: 36px;
  height: 36px;
}

/* Status Badge with Glowing Dot */
.status-beacon-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.35rem 0.85rem;
  background: rgba(0, 230, 118, 0.1);
  border: 1px solid rgba(0, 230, 118, 0.35);
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--color-safe);
  font-weight: 600;
  letter-spacing: 0.05em;
  transition: all var(--transition-normal);
}

.status-beacon-badge.threat-state {
  background: rgba(255, 56, 100, 0.12);
  border-color: rgba(255, 56, 100, 0.45);
  color: var(--color-threat);
}

.beacon-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-safe);
  box-shadow: 0 0 10px var(--color-safe);
  position: relative;
}

.beacon-dot::after {
  content: "";
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  border-radius: 50%;
  border: 1px solid var(--color-safe);
  animation: beacon-pulse 2s cubic-bezier(0.25, 0, 0.45, 1) infinite;
}

.status-beacon-badge.threat-state .beacon-dot {
  background: var(--color-threat);
  box-shadow: 0 0 10px var(--color-threat);
}
.status-beacon-badge.threat-state .beacon-dot::after {
  border-color: var(--color-threat);
}

@keyframes beacon-pulse {
  0% { transform: scale(0.8); opacity: 1; }
  100% { transform: scale(2.4); opacity: 0; }
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
  padding: 3.5rem 0 2.5rem;
  position: relative;
  border-bottom: 1px solid var(--border-subtle);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2.5rem;
  align-items: center;
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

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

.hero-title {
  font-size: 2.75rem;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.hero-title .gradient-text {
  background: linear-gradient(135deg, #00e5ff 0%, #00e676 50%, #ffffff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-role {
  font-size: 1.15rem;
  font-family: var(--font-mono);
  color: var(--color-cyan);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 640px;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.hero-links-strip {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-top: 0.5rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.hero-link-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-muted);
}
.hero-link-item:hover {
  color: var(--color-cyan);
  text-decoration: none;
}

/* Hero Right: Live Telemetry HUD Widget */
.hero-telemetry-hud {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.hero-telemetry-hud::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-cyan), var(--color-safe));
}

.hud-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-dim);
}

.hud-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1rem;
}

.hud-stat-box {
  background: var(--bg-card-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
}

.hud-stat-label {
  font-size: 0.7rem;
  font-family: var(--font-mono);
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hud-stat-value {
  font-size: 1.35rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--text-main);
  margin-top: 0.2rem;
}

.hud-stat-value.safe { color: var(--color-safe); }
.hud-stat-value.cyan { color: var(--color-cyan); }
.hud-stat-value.threat { color: var(--color-threat); }

.hud-footer-ticker {
  margin-top: 1rem;
  padding: 0.6rem 0.85rem;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ==========================================================================
   Quantitative Metrics Bar (Animated Counter Strip)
   ========================================================================== */
.metrics-strip-section {
  padding: 2rem 0;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(12, 18, 30, 0.4);
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1.25rem;
}

.metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem 1rem;
  position: relative;
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.metric-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: transparent;
  transition: background var(--transition-normal);
}

.metric-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-bright);
  box-shadow: 0 8px 25px -5px rgba(0, 229, 255, 0.15);
}

.metric-card:hover::after {
  background: linear-gradient(90deg, var(--color-cyan), var(--color-safe));
}

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

.metric-tag {
  font-size: 0.65rem;
  font-family: var(--font-mono);
  color: var(--color-cyan);
  text-transform: uppercase;
}

.metric-icon {
  font-size: 1.1rem;
  opacity: 0.8;
}

.metric-value-wrap {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
  margin-bottom: 0.35rem;
}

.metric-counter {
  font-size: 2.1rem;
  font-family: var(--font-mono);
  font-weight: 800;
  color: var(--text-main);
  line-height: 1;
}

.metric-unit {
  font-size: 0.85rem;
  font-family: var(--font-mono);
  color: var(--color-cyan);
  font-weight: 600;
}

.metric-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.metric-desc {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ==========================================================================
   Dual Live Canvas & Interactive Attack Simulator Section
   ========================================================================== */
.live-telemetry-section {
  padding: 3rem 0;
  border-bottom: 1px solid var(--border-subtle);
}

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

.section-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.section-badge {
  font-size: 0.7rem;
  font-family: var(--font-mono);
  color: var(--color-cyan);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.section-title {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.section-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 680px;
}

/* Telemetry Grid: Radar & Oscilloscope & Terminal */
.telemetry-grid {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 1.5rem;
}

/* Radar Card */
.radar-card {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card);
  position: relative;
}

.card-title-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  font-family: var(--font-mono);
}

.card-title-text {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-live-indicator {
  font-size: 0.7rem;
  color: var(--color-safe);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.radar-canvas-container {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #04060a;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

#radarCanvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* Radar Infrastructure Node Legends */
.radar-legends {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-top: 1rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

.legend-node {
  background: var(--bg-card-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.6rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.node-name {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-primary);
}

.node-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}
.node-dot.portal { background: var(--color-cyan); box-shadow: 0 0 6px var(--color-cyan); }
.node-dot.kali { background: var(--color-threat); box-shadow: 0 0 6px var(--color-threat); }
.node-dot.pfsense { background: var(--color-safe); box-shadow: 0 0 6px var(--color-safe); }
.node-dot.siem { background: var(--color-purple); box-shadow: 0 0 6px var(--color-purple); }

.node-status {
  font-size: 0.65rem;
  color: var(--text-dim);
}

/* Oscilloscope & Terminal Side */
.oscilloscope-terminal-wrap {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Oscilloscope Card */
.oscilloscope-card {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card);
}

.oscilloscope-canvas-container {
  width: 100%;
  height: 160px;
  background: #04060a;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  position: relative;
  overflow: hidden;
}

#oscilloscopeCanvas {
  width: 100%;
  height: 100%;
  display: block;
}

.waveform-meta-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.waveform-stat {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.waveform-stat strong {
  color: var(--color-cyan);
}

/* Attack Simulator Controls Card */
.simulator-card {
  background: var(--bg-card-elevated);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: 0 0 25px rgba(0, 229, 255, 0.1);
  position: relative;
}

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

.sim-btn-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr) 1.2fr;
  gap: 0.75rem;
  align-items: center;
}

.sim-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 0.75rem 0.85rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: left;
}

.sim-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--color-threat);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(255, 56, 100, 0.2);
}

.sim-btn.active {
  border-color: var(--color-threat);
  background: rgba(255, 56, 100, 0.15);
  box-shadow: 0 0 15px rgba(255, 56, 100, 0.3);
}

.sim-btn-code {
  font-size: 0.65rem;
  font-family: var(--font-mono);
  color: var(--color-threat);
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.sim-btn-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
}

.sim-btn-desc {
  font-size: 0.68rem;
  color: var(--text-dim);
  margin-top: 0.25rem;
}

/* 1-Sec Reset Button */
.sim-reset-btn {
  background: linear-gradient(135deg, rgba(0, 230, 118, 0.15) 0%, rgba(0, 229, 255, 0.15) 100%);
  border: 1px solid var(--color-safe);
  color: var(--color-safe);
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-family: var(--font-mono);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all var(--transition-normal);
  box-shadow: 0 0 15px rgba(0, 230, 118, 0.2);
}

.sim-reset-btn:hover {
  background: linear-gradient(135deg, #00e676 0%, #00e5ff 100%);
  color: #06080d;
  box-shadow: 0 0 25px rgba(0, 230, 118, 0.5);
  transform: translateY(-2px);
}

/* Live Terminal Log Viewer */
.terminal-viewer {
  background: #04060a;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  overflow: hidden;
  font-family: var(--font-mono);
}

.terminal-header {
  background: #090e17;
  padding: 0.5rem 0.85rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-dim);
}

.terminal-dots {
  display: flex;
  gap: 0.4rem;
}
.t-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}
.t-dot.red { background: #ff5f56; }
.t-dot.yellow { background: #ffbd2e; }
.t-dot.green { background: #27c93f; }

.terminal-body {
  padding: 0.75rem 1rem;
  height: 140px;
  overflow-y: auto;
  font-size: 0.75rem;
  line-height: 1.5;
  color: #a7f3d0;
}

.terminal-body::-webkit-scrollbar {
  width: 5px;
}
.terminal-body::-webkit-scrollbar-thumb {
  background: var(--border-subtle);
  border-radius: 3px;
}

.log-line {
  margin-bottom: 0.25rem;
  word-break: break-all;
}
.log-ts { color: var(--text-dim); }
.log-prefix { color: var(--color-cyan); font-weight: 700; }
.log-warn { color: var(--color-warning); }
.log-threat { color: var(--color-threat); font-weight: 700; }
.log-safe { color: var(--color-safe); }

/* ==========================================================================
   MITRE ATT&CK Matrix Strip & EDR/SIEM Architecture
   ========================================================================== */
.mitre-architecture-section {
  padding: 3rem 0;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(10, 15, 25, 0.4);
}

/* MITRE Strip */
.mitre-matrix-container {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 2rem;
}

.mitre-strip-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-muted);
}

.mitre-tactics-scroll {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.75rem;
}
.mitre-tactics-scroll::-webkit-scrollbar {
  height: 6px;
}
.mitre-tactics-scroll::-webkit-scrollbar-thumb {
  background: var(--border-medium);
  border-radius: 3px;
}

.tactic-column {
  min-width: 140px;
  background: var(--bg-card-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.tactic-title {
  font-size: 0.68rem;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.3rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.technique-chip {
  font-size: 0.65rem;
  font-family: var(--font-mono);
  padding: 0.3rem 0.4rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.technique-chip:hover {
  background: rgba(0, 229, 255, 0.1);
  border-color: rgba(0, 229, 255, 0.3);
  color: var(--color-cyan);
}

.technique-chip.mapped {
  background: rgba(0, 230, 118, 0.08);
  border-color: rgba(0, 230, 118, 0.3);
  color: var(--color-safe);
  font-weight: 600;
}

.technique-chip.triggered {
  background: rgba(255, 56, 100, 0.25);
  border-color: var(--color-threat);
  color: #fff;
  font-weight: 700;
  animation: pulse-red 1s infinite alternate;
}

@keyframes pulse-red {
  from { box-shadow: 0 0 5px rgba(255, 56, 100, 0.4); }
  to { box-shadow: 0 0 15px rgba(255, 56, 100, 0.8); }
}

/* Architecture Interactive Diagram Card */
.architecture-card {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
}

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

.arch-layers-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  position: relative;
}

.arch-layer-box {
  background: var(--bg-card-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: all var(--transition-normal);
}

.arch-layer-box:hover {
  transform: translateY(-3px);
  border-color: var(--color-cyan);
  box-shadow: 0 8px 25px -5px rgba(0, 229, 255, 0.15);
}

.arch-layer-step {
  font-size: 0.65rem;
  font-family: var(--font-mono);
  color: var(--color-cyan);
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.arch-layer-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.75rem;
}

.arch-component-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.arch-component-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.4rem 0.5rem;
  background: rgba(0, 0, 0, 0.25);
  border-radius: var(--radius-sm);
  border-left: 2px solid var(--border-medium);
}
.arch-component-item.highlight {
  border-left-color: var(--color-cyan);
  color: var(--text-primary);
}

/* ==========================================================================
   Tabbed Section: 5 Master Tabs
   ========================================================================== */
.tabs-master-section {
  padding: 3.5rem 0;
  position: relative;
}

.tabs-nav-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border-medium);
  margin-bottom: 2rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
}
.tabs-nav-bar::-webkit-scrollbar {
  height: 4px;
}
.tabs-nav-bar::-webkit-scrollbar-thumb {
  background: var(--border-subtle);
}

.tab-btn {
  background: transparent;
  border: none;
  outline: none;
  padding: 0.75rem 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  position: relative;
  transition: all var(--transition-fast);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.tab-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.03);
}

.tab-btn.active {
  color: var(--color-cyan);
  background: rgba(0, 229, 255, 0.08);
}

.tab-btn.active::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--color-cyan);
  box-shadow: 0 0 10px var(--color-cyan);
}

/* Tab Panels */
.tab-panel {
  display: none;
  animation: fadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.tab-panel.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Tab Content Layouts */
.content-grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.content-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-card);
}

.content-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.75rem;
}

/* PARR Troubleshooting Accordion / Cards */
.parr-case-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  margin-bottom: 1.25rem;
  overflow: hidden;
  transition: all var(--transition-fast);
}

.parr-case-card:hover {
  border-color: var(--border-bright);
}

.parr-header {
  padding: 1.15rem 1.5rem;
  background: var(--bg-card-elevated);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
}

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

.parr-badge {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  background: rgba(0, 229, 255, 0.12);
  color: var(--color-cyan);
  border: 1px solid rgba(0, 229, 255, 0.3);
  font-weight: 700;
}

.parr-title-text {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
}

.parr-chevron {
  transition: transform var(--transition-normal);
  font-size: 0.85rem;
  color: var(--text-dim);
}

.parr-case-card.open .parr-chevron {
  transform: rotate(180deg);
  color: var(--color-cyan);
}

.parr-body {
  padding: 1.5rem;
  display: none;
  border-top: 1px solid var(--border-subtle);
}

.parr-case-card.open .parr-body {
  display: block;
}

.parr-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.parr-step {
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, 0.3);
  border-left: 3px solid var(--border-medium);
}

.parr-step.p { border-left-color: var(--color-threat); }
.parr-step.a { border-left-color: var(--color-warning); }
.parr-step.r-sol { border-left-color: var(--color-cyan); }
.parr-step.r-res { border-left-color: var(--color-safe); }

.step-label {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 0.3rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.step-label.p { color: var(--color-threat); }
.step-label.a { color: var(--color-warning); }
.step-label.r-sol { color: var(--color-cyan); }
.step-label.r-res { color: var(--color-safe); }

.step-content {
  font-size: 0.88rem;
  color: var(--text-primary);
  line-height: 1.6;
}

/* Resume & Cover Letter Viewer Styles */
.resume-paper {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-card);
}

.resume-header {
  border-bottom: 2px solid var(--border-medium);
  padding-bottom: 1.5rem;
  margin-bottom: 2rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.resume-name-role h2 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-main);
}
.resume-name-role p {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--color-cyan);
  margin-top: 0.3rem;
}

.resume-contact-list {
  list-style: none;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  text-align: right;
}

.resume-section-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-cyan);
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.5rem;
  margin: 1.75rem 0 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.skill-tag-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.skill-tag {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-sm);
  background: var(--bg-card-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
}

/* Architecture Image Modal Trigger */
.arch-preview-wrap {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  margin-top: 1rem;
}

.arch-preview-wrap img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform var(--transition-normal);
}

.arch-preview-wrap:hover img {
  transform: scale(1.02);
}

.arch-zoom-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(8, 11, 17, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition-fast);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  gap: 0.5rem;
}

.arch-preview-wrap:hover .arch-zoom-overlay {
  opacity: 1;
}

/* Modal Popup */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.modal-backdrop.active {
  display: flex;
}

.modal-content-box {
  background: var(--bg-card);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-lg);
  max-width: 1100px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
}

.modal-header-bar {
  padding: 1rem 1.5rem;
  background: var(--bg-card-elevated);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-body {
  padding: 1.5rem;
  overflow: auto;
  text-align: center;
}

.modal-body img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  transition: color var(--transition-fast);
}
.modal-close-btn:hover {
  color: var(--color-threat);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  background: #04060a;
  padding: 3rem 0;
  margin-top: 4rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-dim);
}

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

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1200px) {
  .metrics-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .telemetry-grid {
    grid-template-columns: 1fr;
  }
  .sim-btn-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .arch-layers-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .hero-title {
    font-size: 2rem;
  }
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .content-grid-2col {
    grid-template-columns: 1fr;
  }
  .sim-btn-grid {
    grid-template-columns: 1fr;
  }
  .resume-header {
    flex-direction: column;
    gap: 1rem;
  }
  .resume-contact-list {
    text-align: left;
  }
  .arch-layers-grid {
    grid-template-columns: 1fr;
  }
  .nav-links {
    display: none; /* Mobile menu can be toggled */
  }
}

/* ==========================================================================
   Print / PDF Mode Styles (@media print)
   Optimized for Clean A4 Output & PDF Export
   ========================================================================== */
@media print {
  /* Reset background and text colors to high-contrast monochrome */
  body, html {
    background: #ffffff !important;
    color: #111827 !important;
    font-size: 11pt !important;
  }
  
  body::before, .ambient-glow {
    display: none !important;
  }

  .site-header, .site-footer, .hero-actions, .sim-btn-grid, .simulator-card,
  .terminal-viewer, .modal-backdrop, .radar-card, .oscilloscope-card,
  .tabs-nav-bar, .arch-zoom-overlay, .btn-print, #btnSimReset {
    display: none !important;
  }

  .container {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  /* Reveal all tab panels in print view */
  .tab-panel {
    display: block !important;
    opacity: 1 !important;
    page-break-before: always;
  }

  .tab-panel:first-of-type {
    page-break-before: auto;
  }

  .hero-section {
    padding: 1rem 0 !important;
    border-bottom: 2px solid #000 !important;
  }

  .hero-title {
    font-size: 22pt !important;
    color: #000 !important;
  }

  .hero-title .gradient-text {
    -webkit-text-fill-color: #000 !important;
    color: #000 !important;
  }

  .hero-role {
    color: #2563eb !important;
    font-size: 12pt !important;
  }

  .metric-card, .content-card, .parr-case-card, .resume-paper, .arch-layer-box {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: none !important;
    color: #111827 !important;
    page-break-inside: avoid;
  }

  .metrics-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 0.5rem !important;
  }

  .metric-counter {
    color: #0f172a !important;
    font-size: 16pt !important;
  }

  .parr-body {
    display: block !important;
  }

  .parr-chevron {
    display: none !important;
  }

  .parr-step {
    background: #f8fafc !important;
    border-left: 3px solid #94a3b8 !important;
  }

  h1, h2, h3, h4, h5 {
    color: #000000 !important;
  }

  a {
    color: #2563eb !important;
    text-decoration: underline !important;
  }

  @page {
    size: A4;
    margin: 15mm;
  }
}


/* ==========================================================================
   CISO Special Additions: Zero-Trust Indicators, Kernel Hook, MITRE JSON Modal
   ========================================================================== */

/* Zero-Trust 3-Part Status Badge Strip */
.zero-trust-strip {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.zt-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid var(--border-medium);
  transition: all var(--transition-fast);
}

.zt-badge.protected {
  border-color: rgba(0, 230, 118, 0.45);
  color: var(--color-safe);
  box-shadow: 0 0 12px rgba(0, 230, 118, 0.15);
}

.zt-badge.integrity {
  border-color: rgba(0, 229, 255, 0.45);
  color: var(--color-cyan);
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.15);
}

.zt-badge.standby {
  border-color: rgba(192, 132, 252, 0.45);
  color: var(--color-purple);
  box-shadow: 0 0 12px rgba(192, 132, 252, 0.15);
}

.zt-badge.threat {
  border-color: rgba(255, 56, 100, 0.6);
  color: var(--color-threat);
  background: rgba(255, 56, 100, 0.12);
  box-shadow: 0 0 15px rgba(255, 56, 100, 0.35);
}

/* Kernel Hook Neon Sensor Badge */
.kernel-hook-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.12) 0%, rgba(0, 230, 118, 0.12) 100%);
  border: 1px solid var(--border-bright);
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  box-shadow: 0 0 15px rgba(0, 229, 255, 0.2);
}

.kernel-hook-badge .dot-ping {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-cyan);
  box-shadow: 0 0 8px var(--color-cyan);
  animation: beacon-pulse 1.8s infinite;
}

/* Standalone Fallback Badge */
.standalone-fallback-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 179, 0, 0.1);
  border: 1px solid rgba(255, 179, 0, 0.4);
  color: var(--color-warning);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.standalone-fallback-badge:hover {
  background: rgba(255, 179, 0, 0.2);
  box-shadow: 0 0 12px rgba(255, 179, 0, 0.3);
}

/* JSON Code Viewer */
.json-viewer-box {
  background: #020408;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 1rem;
  max-height: 480px;
  overflow: auto;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.55;
  color: #38bdf8;
  text-align: left;
}

.json-viewer-box pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-all;
}

.json-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.75rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
}
