:root {
  --bg-espresso: #0d0b0a;
  --bg-espresso-elevated: #161311;
  --glass-surface: rgba(28, 25, 23, 0.7);
  --glass-surface-strong: rgba(24, 21, 19, 0.88);
  --glass-border: rgba(245, 245, 240, 0.09);
  --glass-border-amber: rgba(217, 119, 6, 0.38);
  --text-cream: #f5f5f0;
  --text-muted: #a8a29e;
  --accent-amber: #d97706;
  --accent-amber-bright: #f59e0b;
  --accent-emerald: #10b981;
  --accent-danger: #ef4444;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg-espresso);
  color: var(--text-cream);
  font-family: 'Space Grotesk', system-ui, -apple-system, sans-serif;
}

body {
  background-color: var(--bg-espresso);
  color: var(--text-cream);
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
}

/* Subtle tactical grid & warm ambient glow */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(circle at 15% 15%, rgba(217, 119, 6, 0.09), transparent 40%),
    radial-gradient(circle at 85% 75%, rgba(16, 185, 129, 0.06), transparent 40%),
    linear-gradient(to right, rgba(245, 245, 240, 0.025) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(245, 245, 240, 0.025) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 48px 48px, 48px 48px;
}

/* Typography utilities */
.font-mono-tech {
  font-family: 'JetBrains Mono', monospace;
}

.font-display {
  font-family: 'Space Grotesk', sans-serif;
}

/* Frosted Glassmorphism Cards */
.glass-card {
  background: var(--glass-surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.25s ease,
              box-shadow 0.25s ease;
}

.glass-card:hover {
  border-color: rgba(217, 119, 6, 0.3);
}

.glass-card-interactive:hover {
  transform: translateY(-3px);
  border-color: var(--glass-border-amber);
  box-shadow: 0 16px 36px -12px rgba(0, 0, 0, 0.65),
              0 0 24px -6px rgba(217, 119, 6, 0.16);
}

.glass-nav {
  background: rgba(13, 11, 10, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(245, 245, 240, 0.08);
}

/* Custom Range Sliders */
input[type="range"].cyber-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  background: rgba(245, 245, 240, 0.09);
  border-radius: 999px;
  outline: none;
  border: 1px solid rgba(245, 245, 240, 0.1);
  cursor: pointer;
}

input[type="range"].cyber-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent-amber);
  border: 2px solid var(--text-cream);
  box-shadow: 0 0 14px rgba(217, 119, 6, 0.8);
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

input[type="range"].cyber-slider::-webkit-slider-thumb:hover {
  transform: scale(1.12);
  background: var(--accent-amber-bright);
}

input[type="range"].cyber-slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent-amber);
  border: 2px solid var(--text-cream);
  box-shadow: 0 0 14px rgba(217, 119, 6, 0.8);
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

input[type="range"].cyber-slider.emerald-slider::-webkit-slider-thumb {
  background: var(--accent-emerald);
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.8);
}

input[type="range"].cyber-slider.emerald-slider::-moz-range-thumb {
  background: var(--accent-emerald);
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.8);
}

/* Terminal scanline & cursor animations */
.terminal-window {
  position: relative;
  overflow: hidden;
}

.terminal-window::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 2px,
    rgba(255, 255, 255, 0.015) 3px
  );
}

.cursor-blink {
  display: inline-block;
  width: 8px;
  height: 15px;
  background-color: var(--accent-emerald);
  vertical-align: middle;
  margin-left: 4px;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
  }
}

.status-dot-live {
  animation: pulse-glow 2s infinite;
}

/* Raw Specs Mode transformation */
body.raw-specs-mode {
  font-family: 'JetBrains Mono', monospace;
}

body.raw-specs-mode::before {
  background-image:
    linear-gradient(to right, rgba(16, 185, 129, 0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(16, 185, 129, 0.06) 1px, transparent 1px);
  background-size: 24px 24px;
}

body.raw-specs-mode .glass-card {
  background: rgba(13, 11, 10, 0.94);
  border-color: rgba(16, 185, 129, 0.32);
  border-radius: 4px;
}

body.raw-specs-mode .raw-only {
  display: block !important;
}

body.raw-specs-mode .visual-only {
  display: none !important;
}

.raw-only {
  display: none;
}

/* Gauge transitions */
.gauge-bar-segment {
  transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.3s ease;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #0d0b0a;
}

::-webkit-scrollbar-thumb {
  background: #292524;
  border-radius: 4px;
  border: 1px solid rgba(245, 245, 240, 0.08);
}

::-webkit-scrollbar-thumb:hover {
  background: #d97706;
}

/* Modal animation */
.modal-backdrop {
  background: rgba(8, 7, 6, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

