/* =====================================================================
   PROTESLA LABS // HIGH-PERFORMANCE DESIGN SYSTEM & THEMES
   Vanilla CSS with zero runtime dependencies. 60 FPS hardware accelerated.
   ===================================================================== */

:root {
  --bg-deep: #06080d;
  --bg-surface: #0b0f17;
  --bg-surface-elevated: #111827;
  --bg-card: rgba(15, 23, 42, 0.7);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(255, 255, 255, 0.2);
  --text-main: #f3f4f6;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  /* Default Theme: Cyber Emerald */
  --accent: #10b981;
  --accent-light: #34d399;
  --accent-glow: rgba(16, 185, 129, 0.35);
  --accent-soft: rgba(16, 185, 129, 0.12);
  --font-mono: "SF Mono", "Fira Code", "Cascadia Code", Consolas, monospace;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --transition-fast: 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Theme Switcher Variants */
[data-theme="amber"] {
  --accent: #f59e0b;
  --accent-light: #fbbf24;
  --accent-glow: rgba(245, 158, 11, 0.35);
  --accent-soft: rgba(245, 158, 11, 0.12);
}

[data-theme="cyan"] {
  --accent: #06b6d4;
  --accent-light: #38bdf8;
  --accent-glow: rgba(6, 182, 212, 0.35);
  --accent-soft: rgba(6, 182, 212, 0.12);
}

[data-theme="violet"] {
  --accent: #8b5cf6;
  --accent-light: #a78bfa;
  --accent-glow: rgba(139, 92, 246, 0.35);
  --accent-soft: rgba(139, 92, 246, 0.12);
}

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

html {
  scroll-behavior: smooth;
  font-family: var(--font-sans);
  background-color: var(--bg-deep);
  color: var(--text-main);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body {
  position: relative;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Background Particle Canvas */
#particle-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}

/* Mouse Glow Track */
.mouse-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  z-index: 1;
  opacity: 0.18;
  transition: opacity 0.3s ease, background 0.3s ease;
}

/* =====================================================================
   HUD HEADER & NAVIGATION
   ===================================================================== */
.hud-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(6, 8, 13, 0.8);
  border-bottom: 1px solid var(--border-subtle);
  transition: var(--transition-fast);
}

.hud-container {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-zone {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text-main);
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: 0.06em;
}

.logo-symbol {
  color: var(--accent);
  text-shadow: 0 0 12px var(--accent);
}

.logo-dim {
  color: var(--accent);
  font-family: var(--font-mono);
  font-weight: 600;
}

.live-pill {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.2rem 0.55rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  color: var(--text-muted);
}

.pulsing-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: pulse-glow 2s infinite ease-in-out;
}

@keyframes pulse-glow {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.hud-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav-item {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: var(--transition-fast);
  padding: 0.3rem 0.4rem;
  position: relative;
}

.nav-item:hover {
  color: var(--text-main);
}

.nav-item::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.25s ease;
}

.nav-item:hover::after {
  width: 100%;
}

.hud-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.hud-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  transition: var(--transition-fast);
}

.hud-btn:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-light);
}

/* SFX Button with Equalizer */
.sfx-icon {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 12px;
}

.eq-bar {
  width: 2.5px;
  background: var(--accent);
  border-radius: 1px;
}

.bar-1 { height: 60%; animation: eq-anim 0.8s infinite ease-in-out; }
.bar-2 { height: 100%; animation: eq-anim 0.8s infinite ease-in-out 0.2s; }
.bar-3 { height: 40%; animation: eq-anim 0.8s infinite ease-in-out 0.4s; }

@keyframes eq-anim {
  0%, 100% { height: 30%; }
  50% { height: 100%; }
}

.sfx-muted .eq-bar {
  animation: none;
  height: 2px;
  background: var(--text-dim);
}

.sfx-muted .sfx-text {
  color: var(--text-dim);
}

/* Theme Switcher Dots */
.theme-switcher {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.4rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
}

.theme-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: var(--transition-fast);
}

.theme-dot[data-theme="emerald"] { background: #10b981; }
.theme-dot[data-theme="amber"] { background: #f59e0b; }
.theme-dot[data-theme="cyan"] { background: #06b6d4; }
.theme-dot[data-theme="violet"] { background: #8b5cf6; }

.theme-dot:hover, .theme-dot.active {
  transform: scale(1.3);
  border-color: #fff;
  box-shadow: 0 0 8px currentColor;
}

.cmd-btn kbd {
  background: rgba(255, 255, 255, 0.1);
  padding: 0.1rem 0.3rem;
  border-radius: 3px;
  font-size: 0.7rem;
}

/* =====================================================================
   MAIN PAGE CONTENT
   ===================================================================== */
.page-content {
  position: relative;
  z-index: 10;
  padding-top: 5rem;
}

.section-container {
  max-width: 1360px;
  margin: 0 auto;
  padding: 4.5rem 1.5rem;
}

.section-header {
  text-align: center;
  max-width: 860px;
  margin: 0 auto 3rem auto;
}

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

.section-title {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.section-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* 3D Tilt Card Base */
.card-tilt {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, border-color 0.2s ease;
  transform-style: preserve-3d;
  will-change: transform;
}

.card-tilt:hover {
  border-color: var(--border-focus);
  box-shadow: 0 16px 36px -12px rgba(0, 0, 0, 0.6), 0 0 20px var(--accent-glow);
}

/* =====================================================================
   HERO SECTION
   ===================================================================== */
.hero-section {
  padding-top: 4rem;
  padding-bottom: 3rem;
}

.hero-status-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.tech-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.35rem 0.85rem;
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: 30px;
  color: var(--accent-light);
  letter-spacing: 0.04em;
}

.clock-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 0.35rem 0.85rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: 30px;
  color: var(--text-muted);
}

.hero-title {
  font-size: clamp(2.4rem, 5.5vw, 4.4rem);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
}

.title-scramble {
  display: inline-block;
  font-family: var(--font-sans);
}

.gradient-text {
  background: linear-gradient(135deg, #ffffff 20%, var(--accent-light) 70%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  color: var(--text-muted);
  max-width: 820px;
  margin-bottom: 2.5rem;
  line-height: 1.65;
}

.hero-subtitle .highlight {
  color: var(--text-main);
  font-weight: 600;
  border-bottom: 1px solid var(--accent);
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 3.5rem;
}

/* Button System */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--accent);
  color: #06080d;
  font-weight: 700;
  box-shadow: 0 0 20px var(--accent-glow);
}

.btn-primary:hover {
  background: var(--accent-light);
  transform: translateY(-2px);
  box-shadow: 0 0 30px var(--accent-glow);
}

.btn-secondary {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
}

.btn-secondary:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-light);
  transform: translateY(-2px);
}

.btn-outline {
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  background: transparent;
}

.btn-outline:hover {
  border-color: var(--text-main);
  color: var(--text-main);
  transform: translateY(-2px);
}

/* Hero Metrics Grid */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.25rem;
  margin-bottom: 3rem;
}

.metric-card {
  padding: 1.6rem;
}

.metric-num {
  font-size: 2.4rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--text-main);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.metric-unit {
  color: var(--accent);
  font-size: 1.6rem;
  margin-left: 2px;
}

.metric-label {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-main);
  margin-bottom: 0.2rem;
}

.metric-sub {
  font-size: 0.78rem;
  color: var(--text-dim);
}

/* Tech Ticker */
.tech-ticker-wrap {
  width: 100%;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.02);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.75rem 0;
  white-space: nowrap;
}

.tech-ticker {
  display: inline-flex;
  gap: 2.5rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-dim);
  animation: ticker-slide 32s linear infinite;
}

.tech-ticker span {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

@keyframes ticker-slide {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* =====================================================================
   UEBA SIMULATOR SECTION (KILLER FEATURE)
   ===================================================================== */
.simulator-card {
  padding: 2.2rem;
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.85) 0%, rgba(6, 8, 13, 0.95) 100%);
  border: 1px solid var(--border-focus);
}

.sim-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2.5rem;
  align-items: center;
}

@media (max-width: 960px) {
  .sim-grid {
    grid-template-columns: 1fr;
  }
}

.sim-group {
  margin-bottom: 1.5rem;
}

.sim-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
}

.sim-label-row label {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-main);
}

.sim-val {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent);
}

.sim-range {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.1);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  transition: var(--transition-fast);
}

.sim-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.sim-range::-webkit-slider-thumb:hover {
  transform: scale(1.3);
}

.sim-hint {
  display: block;
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 0.3rem;
}

.toggle-group {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-sm);
  margin-top: 1.75rem;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 24px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.2);
  transition: .3s;
  border-radius: 24px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
  background-color: #ef4444;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.6);
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(22px);
}

.toggle-title {
  display: block;
  font-weight: 700;
  font-size: 0.9rem;
  color: #fca5a5;
}

.toggle-sub {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.sim-presets {
  margin-top: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.preset-label {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-dim);
}

.preset-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.preset-btn:hover {
  border-color: var(--accent);
  color: var(--text-main);
  background: var(--accent-soft);
}

/* Gauge Dashboard */
.sim-dashboard {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  text-align: center;
}

.gauge-wrapper {
  position: relative;
  width: 220px;
  margin: 0 auto 1.5rem auto;
}

.gauge-svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

.gauge-needle-center {
  position: absolute;
  bottom: 5px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
}

.gauge-score-value {
  font-size: 2.4rem;
  font-weight: 900;
  font-family: var(--font-mono);
  line-height: 1;
  color: var(--accent);
  transition: color 0.3s ease;
}

.gauge-score-label {
  font-size: 0.65rem;
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin-top: 0.2rem;
}

.sim-verdict-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 1rem;
  margin-bottom: 1.25rem;
  text-align: left;
  transition: all 0.3s ease;
}

.verdict-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.verdict-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

.verdict-status {
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: var(--accent);
}

.verdict-detail {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.sim-telemetry-hud {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-align: left;
  border-top: 1px solid var(--border-subtle);
  padding-top: 0.85rem;
}

.tel-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.3rem;
}

.tel-k { color: var(--text-dim); }
.tel-v { color: var(--text-main); font-weight: 600; }
.highlight-green { color: var(--accent); }

/* =====================================================================
   FLAGSHIPS SECTION
   ===================================================================== */
.flagships-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(440px, 1fr));
  gap: 2rem;
}

@media (max-width: 600px) {
  .flagships-grid {
    grid-template-columns: 1fr;
  }
}

.flagship-card {
  padding: 2.2rem;
  display: flex;
  flex-direction: column;
}

.flagship-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.flagship-title {
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  color: var(--text-main);
  line-height: 1.3;
}

.flagship-text {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.interactive-preview {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  margin-bottom: 1.5rem;
  cursor: pointer;
  background: #000;
}

.preview-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.interactive-preview:hover .preview-img {
  transform: scale(1.03);
}

.zoom-badge {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  color: #fff;
  font-size: 0.72rem;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-family: var(--font-mono);
}

.math-formula-box {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.85rem;
  margin-bottom: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-light);
  overflow-x: auto;
}

.tech-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1.75rem;
}

.tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
}

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

.patent-ref {
  font-size: 0.75rem;
  color: var(--accent);
  font-family: var(--font-mono);
}

/* =====================================================================
   TERMINAL HUD 2.0
   ===================================================================== */
.terminal-window {
  border: 1px solid var(--border-focus);
  background: #06090e;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7);
  overflow: hidden;
  position: relative;
}

.terminal-header {
  background: #0d121c;
  padding: 0.65rem 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
}

.terminal-dots {
  display: flex;
  gap: 6px;
}

.dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.dot-red { background: #ef4444; }
.dot-yellow { background: #f59e0b; }
.dot-green { background: #10b981; }

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

.terminal-actions {
  display: flex;
  gap: 0.5rem;
}

.term-tool-btn {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.72rem;
  font-family: var(--font-mono);
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  cursor: pointer;
  transition: var(--transition-fast);
}

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

.terminal-body {
  position: relative;
  min-height: 340px;
  max-height: 480px;
  overflow-y: auto;
  padding: 1.25rem 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.5;
}

.matrix-canvas-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 5;
  background: rgba(0, 0, 0, 0.85);
  pointer-events: none;
}

.matrix-canvas-layer.hidden {
  display: none;
}

.term-line {
  margin-bottom: 0.35rem;
  white-space: pre-wrap;
  word-break: break-word;
}

.banner-line {
  color: var(--accent);
  font-size: 0.65rem;
  line-height: 1.15;
  margin-bottom: 0.85rem;
}

.success-text { color: var(--accent-light); font-weight: 700; }
.dim-text { color: var(--text-dim); }

.terminal-input-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.75rem;
}

.prompt-symbol {
  color: var(--accent);
  font-weight: 700;
  flex-shrink: 0;
}

#terminal-input {
  flex-grow: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.terminal-quick-cmds {
  background: #090d14;
  padding: 0.65rem 1.2rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.quick-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
}

.quick-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.2rem 0.55rem;
  border-radius: 3px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.quick-btn:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-light);
}

/* =====================================================================
   BENTO GRID (PROJECTS)
   ===================================================================== */
.category-filters {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.filter-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.85rem;
  padding: 0.5rem 1.1rem;
  border-radius: 30px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.filter-btn:hover, .filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #06080d;
  font-weight: 700;
  box-shadow: 0 0 15px var(--accent-glow);
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1.5rem;
}

@media (max-width: 480px) {
  .bento-grid {
    grid-template-columns: 1fr;
  }
}

.bento-card {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.85rem;
}

.card-domain {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.06em;
}

.card-stars {
  font-size: 0.72rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.card-name {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.card-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 1.25rem;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}

.card-action {
  margin-top: auto;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  transition: var(--transition-fast);
}

.card-action:hover {
  color: var(--accent-light);
  transform: translateX(4px);
  display: inline-block;
}

/* =====================================================================
   PATENTS SECTION
   ===================================================================== */
.patents-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(460px, 1fr));
  gap: 1.75rem;
}

@media (max-width: 600px) {
  .patents-grid {
    grid-template-columns: 1fr;
  }
}

.patent-card {
  padding: 1.75rem;
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  border-left: 3px solid var(--accent);
}

.patent-icon {
  font-size: 2.2rem;
  flex-shrink: 0;
}

.patent-reg {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.35rem;
  letter-spacing: 0.05em;
}

.patent-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.5rem;
  line-height: 1.35;
}

.patent-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 0.75rem;
}

.patent-meta {
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* =====================================================================
   CONTACT SECTION
   ===================================================================== */
.contact-box {
  padding: 3rem 2rem;
  text-align: center;
  max-width: 860px;
  margin: 0 auto;
  border: 1px solid var(--border-focus);
}

.contact-title {
  font-size: 2rem;
  font-weight: 800;
  margin: 0.75rem 0 1rem 0;
}

.contact-desc {
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 2.2rem auto;
}

.contact-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.contact-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  padding: 0.75rem 1.4rem;
  border-radius: 40px;
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.contact-pill:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px var(--accent-glow);
}

.pill-label { color: var(--text-dim); }
.pill-val { font-weight: 700; font-family: var(--font-mono); }
.copy-hint { font-size: 0.75rem; color: var(--accent); }

/* =====================================================================
   FOOTER
   ===================================================================== */
.hud-footer {
  border-top: 1px solid var(--border-subtle);
  background: rgba(6, 8, 13, 0.95);
  padding: 1.5rem 0;
  position: relative;
  z-index: 10;
}

.footer-container {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--text-dim);
}

.footer-logo {
  font-family: var(--font-mono);
  font-weight: 800;
  color: var(--text-main);
  margin-right: 1rem;
}

/* =====================================================================
   MODAL & COMMAND PALETTE
   ===================================================================== */
.modal-overlay, .cmd-palette-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-overlay.hidden, .cmd-palette-overlay.hidden {
  display: none;
}

.modal-box {
  position: relative;
  max-width: 90vw;
  max-height: 85vh;
  background: #090d14;
  border: 1px solid var(--border-focus);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}

.modal-box img {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
  display: block;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 15px;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
}

.cmd-palette-window {
  width: 100%;
  max-width: 620px;
  background: #0d121c;
  border: 1px solid var(--border-focus);
  border-radius: var(--radius-md);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
  overflow: hidden;
}

.cmd-palette-input-row {
  display: flex;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  gap: 0.75rem;
}

#cmd-palette-input {
  flex-grow: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-size: 1.05rem;
}

.cmd-esc-badge {
  background: rgba(255, 255, 255, 0.1);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
}

.cmd-palette-list {
  max-height: 360px;
  overflow-y: auto;
  padding: 0.5rem;
}

.cmd-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-fast);
}

.cmd-item:hover, .cmd-item.selected {
  background: var(--accent-soft);
  color: var(--text-main);
}

.cmd-item-title { font-weight: 600; font-size: 0.9rem; }
.cmd-item-type { font-family: var(--font-mono); font-size: 0.72rem; color: var(--accent); }
