/* ==========================================================
   WOPR TERMINAL — burtlao.com
   WarGames (1983) inspired CRT terminal design system
   ========================================================== */

/* ── CSS Variables ── */
:root {
  /* Phosphor Green (default) */
  --phosphor: #33ff33;
  --phosphor-dim: #1a9e1a;
  --phosphor-dark: #0a3d0a;
  --phosphor-glow: rgba(51, 255, 51, 0.35);
  --phosphor-glow-strong: rgba(51, 255, 51, 0.6);

  /* Amber (alternate) */
  --amber: #ffb000;
  --amber-dim: #9e6d00;
  --amber-dark: #3d2a00;
  --amber-glow: rgba(255, 176, 0, 0.35);
  --amber-glow-strong: rgba(255, 176, 0, 0.6);

  /* DEFCON Red (easter egg) */
  --defcon-red: #ff1a1a;
  --defcon-glow: rgba(255, 26, 26, 0.4);

  /* Active theme colors (overridden by .amber class) */
  --text: var(--phosphor);
  --text-dim: var(--phosphor-dim);
  --text-dark: var(--phosphor-dark);
  --glow: var(--phosphor-glow);
  --glow-strong: var(--phosphor-glow-strong);

  /* Backgrounds */
  --bg-page: #000000;
  --bg-screen: #020a02;
  --bg-bezel: #1a1a1a;
  --bg-bezel-edge: #111111;

  /* Typography */
  --font: 'VT323', 'Courier New', monospace;
  --font-size: 19px;
  --font-size-mobile: 15px;
  --line-height: 1.45;

  /* Timing */
  --flicker-speed: 0.08s;
  --scanline-opacity: 0.12;

  /* ==========================================================
     Modern Professional GUI Variables (Light Theme by Default)
     ========================================================== */
  --font-gui-sans: 'Outfit', sans-serif;
  --font-gui-mono: 'JetBrains Mono', monospace;
  
  --gui-bg: #faf6ee;
  --gui-bg-panel: rgba(255, 255, 255, 0.85);
  --gui-border: rgba(139, 115, 85, 0.12);
  --gui-border-glow: rgba(2, 132, 199, 0.08);
  --gui-border-hover: rgba(2, 132, 199, 0.3);
  
  --cyan: #0284c7;
  --cyan-glow: rgba(2, 132, 199, 0.15);
  --purple: #7c3aed;
  --purple-glow: rgba(124, 58, 237, 0.15);
  --emerald: #059669;
  --emerald-glow: rgba(5, 150, 105, 0.15);
  --rose: #e11d48;
  
  --gui-text: #2c2a27;
  --gui-text-sec: #595349;
  --gui-text-muted: #8a8273;
  --transition-speed: 0.3s;

  /* Theme-specific layouts and gradients */
  --gui-title-gradient: linear-gradient(135deg, #2c2a27 40%, var(--cyan) 100%);
  --gui-title-gradient-horizontal: linear-gradient(to right, #2c2a27, var(--cyan));
  --gui-header-bg: rgba(250, 246, 238, 0.85);
  --gui-control-bg: rgba(242, 235, 222, 0.8);
  --gui-sec-btn-bg: rgba(255, 255, 255, 0.85);
  --btn-primary-text: #ffffff;
  --gui-transcript-bg: rgba(242, 235, 222, 0.4);
  --gui-input-bg: rgba(255, 255, 255, 0.9);
  --gui-input-focus-bg: #ffffff;
  
  --gui-orb-1: radial-gradient(circle, rgba(217, 119, 6, 0.05) 0%, rgba(217,119,6,0) 70%);
  --gui-orb-2: radial-gradient(circle, rgba(124, 58, 237, 0.04) 0%, rgba(124,58,237,0) 70%);
  --gui-active-btn-bg: linear-gradient(135deg, rgba(2, 132, 199, 0.08) 0%, rgba(124, 58, 237, 0.08) 100%);
  --gui-active-btn-border: 1px solid rgba(2, 132, 199, 0.2);
  --gui-hover-bg: rgba(139, 115, 85, 0.05);
  --gui-panel-shadow-hover: 0 12px 30px rgba(139, 115, 85, 0.1);
}

/* ── Dark Theme Overrides ── */
body.dark-theme {
  --gui-bg: #070a13;
  --gui-bg-panel: rgba(13, 20, 38, 0.55);
  --gui-border: rgba(255, 255, 255, 0.06);
  --gui-border-glow: rgba(0, 240, 255, 0.12);
  --gui-border-hover: rgba(0, 240, 255, 0.25);
  
  --cyan: #00f0ff;
  --cyan-glow: rgba(0, 240, 255, 0.35);
  --purple: #bd00ff;
  --purple-glow: rgba(189, 0, 255, 0.35);
  --emerald: #10b981;
  --emerald-glow: rgba(16, 185, 129, 0.3);
  --rose: #f43f5e;
  
  --gui-text: #f8fafc;
  --gui-text-sec: #94a3b8;
  --gui-text-muted: #475569;

  --gui-title-gradient: linear-gradient(135deg, #ffffff 40%, var(--cyan) 100%);
  --gui-title-gradient-horizontal: linear-gradient(to right, #ffffff, var(--cyan));
  --gui-header-bg: rgba(4, 6, 11, 0.65);
  --gui-control-bg: rgba(4, 6, 11, 0.8);
  --gui-sec-btn-bg: rgba(13, 20, 38, 0.8);
  --btn-primary-text: #04060b;
  --gui-transcript-bg: rgba(4, 6, 11, 0.4);
  --gui-input-bg: rgba(4, 6, 11, 0.5);
  --gui-input-focus-bg: rgba(4, 6, 11, 0.8);
  
  --gui-orb-1: radial-gradient(circle, rgba(0, 240, 255, 0.07) 0%, rgba(0,240,255,0) 70%);
  --gui-orb-2: radial-gradient(circle, rgba(189, 0, 255, 0.06) 0%, rgba(189,0,255,0) 70%);
  --gui-active-btn-bg: linear-gradient(135deg, rgba(0, 240, 255, 0.15) 0%, rgba(189, 0, 255, 0.15) 100%);
  --gui-active-btn-border: 1px solid rgba(0, 240, 255, 0.25);
  --gui-hover-bg: rgba(255, 255, 255, 0.02);
  --gui-panel-shadow-hover: 0 12px 30px rgba(0, 240, 255, 0.05);
}

/* ── Amber Theme ── */
body.amber {
  --text: var(--amber);
  --text-dim: var(--amber-dim);
  --text-dark: var(--amber-dark);
  --glow: var(--amber-glow);
  --glow-strong: var(--amber-glow-strong);
  --bg-screen: #0a0802;
}

/* ── DEFCON Mode (Konami Code) ── */
body.defcon {
  --text: var(--defcon-red);
  --text-dim: #991010;
  --text-dark: #3d0a0a;
  --glow: var(--defcon-glow);
  --glow-strong: rgba(255, 26, 26, 0.6);
  --bg-screen: #0a0202;
}

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

/* ── Base ── */
html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg-page);
  font-family: var(--font);
  font-size: var(--font-size);
  line-height: var(--line-height);
  color: var(--text);
  -webkit-font-smoothing: none;
  -moz-osx-font-smoothing: unset;
}

/* ── Modern Developer Console Drawer ── */
#console-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 6, 11, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1999;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  opacity: 1;
}

#console-overlay.hidden {
  opacity: 0;
  pointer-events: none;
  display: block !important;
}

#wopr-mode-container {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: 650px;
  max-width: 100%;
  background: rgba(3, 7, 18, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-left: 1px solid rgba(0, 240, 255, 0.15);
  box-shadow: -15px 0 35px rgba(0, 0, 0, 0.6);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
  opacity: 1;
  transform: translateX(0);
}

#wopr-mode-container.hidden {
  transform: translateX(100%);
  opacity: 0;
  pointer-events: none;
  display: flex !important;
}

/* ── CRT Monitor Frame ── */
#crt-frame {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

/* ── CRT Screen Container ── */
#crt-screen {
  position: relative;
  width: 100%;
  height: calc(100% - 60px);
  background: var(--bg-screen);
  border: 3px solid #222;
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  display: flex;
  flex-direction: column;

  /* CRT glow */
  box-shadow:
    inset 0 0 80px rgba(0, 0, 0, 0.6),
    0 0 20px var(--glow),
    0 0 60px var(--glow),
    0 0 120px rgba(51, 255, 51, 0.08);

  animation: flicker 8s infinite;
}

body.amber #crt-screen {
  box-shadow:
    inset 0 0 80px rgba(0, 0, 0, 0.6),
    0 0 20px var(--glow),
    0 0 60px var(--glow),
    0 0 120px rgba(255, 176, 0, 0.08);
}

body.defcon #crt-screen {
  box-shadow:
    inset 0 0 80px rgba(0, 0, 0, 0.6),
    0 0 20px var(--defcon-glow),
    0 0 60px var(--defcon-glow),
    0 0 120px rgba(255, 26, 26, 0.15);
  animation: flicker 8s infinite, defcon-pulse 1.5s ease-in-out infinite;
}

/* ── Scanlines Overlay ── */
#crt-screen::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 1px,
    rgba(0, 0, 0, var(--scanline-opacity)) 1px,
    rgba(0, 0, 0, var(--scanline-opacity)) 2px
  );
  pointer-events: none;
  z-index: 10;
}

/* ── Vignette Overlay ── */
#crt-screen::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at center,
    transparent 50%,
    rgba(0, 0, 0, 0.45) 85%,
    rgba(0, 0, 0, 0.8) 100%
  );
  pointer-events: none;
  z-index: 11;
}

/* ── Terminal Output Area ── */
#terminal-output {
  flex: 1;
  overflow-y: auto;
  padding: 28px 32px 8px;
  white-space: pre-wrap;
  word-wrap: break-word;
  font-size: var(--font-size);
  line-height: var(--line-height);
  color: var(--text);
  text-shadow:
    0 0 5px var(--glow),
    0 0 15px var(--glow);
  z-index: 5;
  scrollbar-width: thin;
  scrollbar-color: var(--text-dark) transparent;
}

#terminal-output::-webkit-scrollbar {
  width: 6px;
}

#terminal-output::-webkit-scrollbar-track {
  background: transparent;
}

#terminal-output::-webkit-scrollbar-thumb {
  background: var(--text-dark);
  border-radius: 3px;
}

/* ── Terminal Links ── */
#terminal-output a,
.terminal-link {
  color: var(--text);
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
  cursor: pointer;
  transition: text-shadow 0.2s;
}

#terminal-output a:hover,
.terminal-link:hover {
  text-shadow:
    0 0 8px var(--glow-strong),
    0 0 20px var(--glow-strong);
}

/* ── Input Line ── */
#input-line {
  display: flex;
  align-items: center;
  padding: 8px 32px 20px;
  z-index: 5;
  flex-shrink: 0;
}

#prompt {
  color: var(--text);
  text-shadow: 0 0 5px var(--glow);
  margin-right: 4px;
  user-select: none;
}

#terminal-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--font);
  font-size: var(--font-size);
  line-height: var(--line-height);
  caret-color: transparent;
  text-shadow: 0 0 5px var(--glow);
  -webkit-font-smoothing: none;
}

#terminal-input::selection {
  background: var(--text-dark);
  color: var(--text);
}

/* ── Blinking Block Cursor ── */
#cursor {
  color: var(--text);
  text-shadow: 0 0 5px var(--glow);
  animation: blink-cursor 1s step-end infinite;
  user-select: none;
}

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

/* ── CRT Monitor Base ── */
#crt-base {
  width: 100%;
  max-width: 960px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 24px;
  background: linear-gradient(180deg, #222 0%, #1a1a1a 50%, #111 100%);
  border-radius: 0 0 12px 12px;
  border: 2px solid #222;
  border-top: none;
}

.power-led {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text);
  box-shadow: 0 0 6px var(--glow-strong), 0 0 12px var(--glow);
  animation: led-pulse 3s ease-in-out infinite;
}

@keyframes led-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.crt-label {
  font-family: var(--font);
  font-size: 12px;
  color: #555;
  letter-spacing: 3px;
  text-transform: uppercase;
  user-select: none;
}

/* ── Screen Flicker Animation ── */
@keyframes flicker {
  0% { opacity: 1; }
  3% { opacity: 0.97; }
  6% { opacity: 1; }
  7% { opacity: 0.95; }
  8% { opacity: 1; }
  48% { opacity: 1; }
  50% { opacity: 0.98; }
  52% { opacity: 1; }
  97% { opacity: 1; }
  98% { opacity: 0.96; }
  100% { opacity: 1; }
}

/* ── DEFCON Pulse Animation ── */
@keyframes defcon-pulse {
  0%, 100% {
    box-shadow:
      inset 0 0 80px rgba(0, 0, 0, 0.6),
      0 0 20px var(--defcon-glow),
      0 0 60px var(--defcon-glow);
  }
  50% {
    box-shadow:
      inset 0 0 80px rgba(0, 0, 0, 0.6),
      0 0 30px var(--defcon-glow),
      0 0 90px var(--defcon-glow),
      0 0 140px rgba(255, 26, 26, 0.2);
  }
}

/* ── CRT Warm-Up Animation ── */
@keyframes warmup {
  0% {
    filter: brightness(0);
    transform: scaleY(0.005) scaleX(0.005);
  }
  30% {
    filter: brightness(0.4);
    transform: scaleY(0.005) scaleX(1);
  }
  60% {
    filter: brightness(0.6);
    transform: scaleY(1) scaleX(1);
  }
  100% {
    filter: brightness(1);
    transform: scaleY(1) scaleX(1);
  }
}

#crt-screen.warming-up {
  animation: warmup 2s ease-out forwards;
}

/* ── Glitch Effect (for Konami code) ── */
@keyframes glitch {
  0% { transform: translate(0); }
  10% { transform: translate(-3px, 2px); }
  20% { transform: translate(3px, -1px); }
  30% { transform: translate(-1px, 3px); }
  40% { transform: translate(2px, -2px); }
  50% { transform: translate(-2px, 1px); }
  60% { transform: translate(3px, 3px); }
  70% { transform: translate(-3px, -2px); }
  80% { transform: translate(1px, 2px); }
  90% { transform: translate(-1px, -1px); }
  100% { transform: translate(0); }
}

#crt-screen.glitch {
  animation: glitch 0.3s linear infinite;
}

/* ── Screen Flash ── */
@keyframes screen-flash {
  0% { background: var(--bg-screen); }
  50% { background: rgba(255, 255, 255, 0.15); }
  100% { background: var(--bg-screen); }
}

#crt-screen.flash {
  animation: screen-flash 0.15s ease-out;
}

/* ── Skip Boot Button ── */
#skip-boot {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: transparent;
  border: 1px solid var(--text-dim);
  color: var(--text-dim);
  font-family: var(--font);
  font-size: 14px;
  padding: 6px 16px;
  cursor: pointer;
  z-index: 100;
  letter-spacing: 2px;
  transition: all 0.3s;
  opacity: 0.5;
}

#skip-boot:hover {
  opacity: 1;
  border-color: var(--text);
  color: var(--text);
  text-shadow: 0 0 8px var(--glow);
  box-shadow: 0 0 10px var(--glow);
}

#skip-boot.hidden {
  display: none;
}

/* ── Mobile Command Bar ── */
#mobile-commands {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(10, 10, 10, 0.95);
  border-top: 1px solid var(--text-dark);
  padding: 8px;
  z-index: 50;
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  backdrop-filter: blur(8px);
}

#mobile-commands button {
  display: inline-block;
  background: transparent;
  border: 1px solid var(--text-dark);
  color: var(--text-dim);
  font-family: var(--font);
  font-size: 13px;
  padding: 6px 12px;
  margin: 2px 4px;
  cursor: pointer;
  border-radius: 3px;
  transition: all 0.2s;
  letter-spacing: 1px;
}

#mobile-commands button:hover,
#mobile-commands button:active {
  border-color: var(--text);
  color: var(--text);
  text-shadow: 0 0 5px var(--glow);
}

/* ── Highlighted / Emphasized Text ── */
.text-bright {
  color: var(--text);
  text-shadow:
    0 0 8px var(--glow-strong),
    0 0 20px var(--glow);
}

.text-dim {
  color: var(--text-dim);
  text-shadow: none;
}

.text-header {
  color: var(--text);
  text-shadow:
    0 0 10px var(--glow-strong),
    0 0 25px var(--glow),
    0 0 50px var(--glow);
}

/* ── Typing cursor for boot sequence ── */
.typing-cursor::after {
  content: '█';
  animation: blink-cursor 1s step-end infinite;
}

/* ── Screen Reader Only ── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Noise texture (subtle) ── */
#crt-screen {
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  background-color: var(--bg-screen);
}


/* ==========================================================================
   MODERN PROFESSIONAL GUI PROFILE CODES
   Beautiful layout, glassmorphic grids, custom audio decks, transitions
   ========================================================================== */

/* ── Global Styles in GUI Mode ── */
body.gui-active {
  background: var(--gui-bg);
  color: var(--gui-text);
  font-family: var(--font-gui-sans);
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.console-open {
  overflow: hidden !important;
}

/* ── Subtle Background Orbs (Decorative) ── */
body.gui-active::before {
  content: '';
  position: fixed;
  top: -15vw;
  left: -15vw;
  width: 50vw;
  height: 50vw;
  border-radius: 50%;
  background: var(--gui-orb-1);
  z-index: -1;
  pointer-events: none;
  animation: floating-orb 20s infinite alternate ease-in-out;
}

body.gui-active::after {
  content: '';
  position: fixed;
  bottom: -20vw;
  right: -10vw;
  width: 60vw;
  height: 60vw;
  border-radius: 50%;
  background: var(--gui-orb-2);
  z-index: -1;
  pointer-events: none;
  animation: floating-orb 25s infinite alternate-reverse ease-in-out;
}

@keyframes floating-orb {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(4%, 5%) scale(1.05); }
  100% { transform: translate(-2%, -3%) scale(0.97); }
}

/* ── Custom Scrollbars ── */
body.gui-active::-webkit-scrollbar {
  width: 8px;
}
body.gui-active::-webkit-scrollbar-track {
  background: var(--gui-control-bg);
}
body.gui-active::-webkit-scrollbar-thumb {
  background: var(--cyan-glow);
  border-radius: 4px;
}
body.gui-active::-webkit-scrollbar-thumb:hover {
  background: var(--cyan);
}

/* ── Sticky Global Header ── */
#global-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 70px;
  padding: 0 40px;
  background: var(--gui-header-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--gui-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 1000;
  transition: transform var(--transition-speed);
}

/* Header links */
.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  user-select: none;
}

.logo-wopr {
  font-family: var(--font-gui-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--cyan);
  text-shadow: 0 0 8px var(--cyan-glow);
  letter-spacing: 1px;
}

.logo-name {
  font-family: var(--font-gui-sans);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.5px;
  background: var(--gui-title-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav-link {
  color: var(--gui-text-sec);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.5px;
  transition: all var(--transition-speed);
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--cyan);
  box-shadow: 0 0 6px var(--cyan);
  transition: width var(--transition-speed);
}

.nav-link:hover {
  color: var(--gui-text);
}

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

.header-controls {
  display: flex;
  align-items: center;
  gap: 20px;
}

/* Mode segmented selector */
.mode-control {
  display: flex;
  background: var(--gui-control-bg);
  border: 1px solid var(--gui-border);
  padding: 3px;
  border-radius: 30px;
}

.mode-control button.mode-btn {
  background: transparent;
  border: none;
  outline: none;
  color: var(--gui-text-sec);
  padding: 6px 16px;
  border-radius: 20px;
  cursor: pointer;
  font-family: var(--font-gui-sans);
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.25s ease;
}

.mode-control button.mode-btn:hover {
  color: var(--gui-text);
}

.mode-control button.mode-btn.active {
  background: var(--gui-active-btn-bg);
  color: var(--cyan);
  border: var(--gui-active-btn-border);
  box-shadow: inset 0 0 8px rgba(0, 240, 255, 0.05);
  text-shadow: 0 0 6px var(--cyan-glow);
}

/* Global voice toggle & theme toggle style override */
#voice-btn,
#theme-btn {
  position: static !important; /* Override absolute pos on retro mode */
  opacity: 1 !important;
  background: var(--gui-control-bg) !important;
  border: 1px solid var(--gui-border) !important;
  color: var(--gui-text-sec) !important;
  width: 38px !important;
  height: 38px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  font-size: 16px !important;
  transition: all var(--transition-speed) !important;
  cursor: pointer;
}

#voice-btn:hover,
#theme-btn:hover {
  border-color: var(--cyan) !important;
  color: var(--cyan) !important;
  box-shadow: 0 0 10px var(--cyan-glow) !important;
  transform: scale(1.05);
}

#voice-btn.active,
#theme-btn.active {
  color: var(--cyan) !important;
  border-color: var(--cyan) !important;
  background: var(--cyan-glow) !important;
  box-shadow: 0 0 12px var(--cyan-glow) !important;
  text-shadow: 0 0 6px var(--cyan-glow) !important;
}

/* ── Viewport / Mode Handling ── */
.mode-container {
  opacity: 1;
  transition: opacity 0.5s ease;
}

.mode-container.hidden {
  display: none !important;
  opacity: 0;
}

/* When terminal is active, hide main page scrollbar */
body:not(.gui-active) {
  overflow: hidden;
}

body:not(.gui-active) #global-header {
  transform: translateY(-80px); /* Hide header in pure terminal boot for absolute immersion! */
}

/* But show header in terminal if user hover top or switches to terminal post boot */
body.terminal-active-header #global-header {
  transform: translateY(0);
}

/* ── Professional GUI Layouts ── */
#gui-mode-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 100px 30px 40px;
  display: flex;
  flex-direction: column;
  gap: 100px;
  min-height: 100vh;
}

/* Sections */
.gui-section {
  position: relative;
  scroll-margin-top: 100px;
  opacity: 0;
  transform: translateY(20px);
  animation: page-slide-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes page-slide-up {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.section-decor {
  font-family: var(--font-gui-mono);
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.section-title {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 40px;
  background: var(--gui-title-gradient-horizontal);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

/* ── Hero Section ── */
#hero {
  min-height: calc(85vh - 70px);
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 50px;
  align-items: center;
  padding: 40px 0;
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.badge-row {
  display: flex;
  gap: 12px;
  align-items: center;
}

.pill-badge {
  font-family: var(--font-gui-mono);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid var(--gui-border);
  letter-spacing: 0.5px;
}

.pill-badge.green {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.2);
  color: var(--emerald);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.05);
}

.pill-badge.cyan {
  background: rgba(0, 240, 255, 0.08);
  border-color: rgba(0, 240, 255, 0.2);
  color: var(--cyan);
  box-shadow: 0 0 8px rgba(0, 240, 255, 0.05);
}

.hero-title {
  font-size: 64px;
  font-weight: 800;
  letter-spacing: -2px;
  line-height: 1.05;
  background: var(--gui-title-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  user-select: none;
}

.hero-subtitle {
  font-size: 20px;
  font-weight: 600;
  color: var(--gui-text-sec);
  letter-spacing: -0.5px;
}

.hero-lead {
  font-size: 16px;
  line-height: 1.6;
  color: var(--gui-text-sec);
  max-width: 520px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 15px;
}

/* Modern buttons */
.btn {
  font-family: var(--font-gui-sans);
  font-size: 14px;
  font-weight: 600;
  padding: 12px 28px;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-speed);
  border: none;
  outline: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--cyan) 0%, var(--purple) 100%);
  color: var(--btn-primary-text);
  box-shadow: 0 4px 15px var(--cyan-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 240, 255, 0.5);
}

.btn-secondary {
  background: var(--gui-sec-btn-bg);
  border: 1px solid var(--gui-border);
  color: var(--cyan);
  position: relative;
  overflow: hidden;
}

.btn-secondary:hover {
  border-color: var(--cyan);
  box-shadow: 0 0 15px var(--cyan-glow);
  transform: translateY(-2px);
}

.btn-glow-pulse {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(0,240,255,0.15) 0%, transparent 70%);
  pointer-events: none;
  animation: pulse-overlay 2s infinite;
}

@keyframes pulse-overlay {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.8; }
}

.btn-small {
  padding: 8px 16px;
  font-size: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--gui-border);
  color: var(--gui-text);
  border-radius: 6px;
}

.btn-small:hover {
  background: var(--cyan);
  border-color: var(--cyan);
  color: #04060b;
  box-shadow: 0 0 10px var(--cyan-glow);
}

/* ── Interactive Mini-Terminal Preview ── */
.hero-visual {
  cursor: pointer;
  perspective: 1000px;
}

.mini-terminal {
  background: #04060b;
  border: 1px solid rgba(0, 240, 255, 0.25);
  border-radius: 12px;
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.6),
    0 0 30px rgba(0, 240, 255, 0.08);
  padding: 16px;
  font-family: var(--font-gui-mono);
  font-size: 12px;
  line-height: 1.5;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  transform: rotateY(-8deg) rotateX(4deg);
  position: relative;
  overflow: hidden;
}

/* Cathode screen glow overlay inside mini-terminal */
.mini-terminal::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, transparent 40%, rgba(0, 240, 255, 0.03) 100%);
  pointer-events: none;
  z-index: 2;
}

.hero-visual:hover .mini-terminal {
  transform: rotateY(0deg) rotateX(0deg) scale(1.02);
  border-color: var(--cyan);
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.7),
    0 0 40px rgba(0, 240, 255, 0.15);
}

.mini-term-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 8px;
  margin-bottom: 12px;
}

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

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

.term-dot.dot-red { background: var(--rose); }
.term-dot.dot-yellow { background: var(--amber); }
.term-dot.dot-green { background: var(--emerald); }

.term-title {
  font-size: 10px;
  color: var(--gui-text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.mini-term-body {
  height: 170px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--phosphor-dim);
}

.term-row {
  display: flex;
  gap: 8px;
}

.term-prompt {
  color: var(--cyan);
  font-weight: 700;
}

.term-input-cmd {
  color: var(--gui-text);
}

.term-output {
  color: var(--phosphor-dim);
}

.term-output.term-bright {
  color: var(--phosphor);
  text-shadow: 0 0 5px var(--phosphor-glow);
}

.term-output.term-header {
  color: var(--phosphor);
  text-shadow: 0 0 8px var(--phosphor-glow-strong);
  font-weight: 700;
}

.term-cursor {
  color: var(--cyan);
  animation: blink-cursor 1s step-end infinite;
}

.mini-term-footer {
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--cyan);
  margin-top: 15px;
  letter-spacing: 2px;
  animation: text-pulse 2s infinite ease-in-out;
}

@keyframes text-pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

/* ── Generic Premium Card Designs ── */
.grid-layout {
  display: grid;
  gap: 30px;
}

.card {
  background: var(--gui-bg-panel);
  border: 1px solid var(--gui-border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 16px;
  padding: 30px;
  transition: all var(--transition-speed) cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--gui-border-hover);
  box-shadow: var(--gui-panel-shadow-hover, 0 12px 30px rgba(0, 240, 255, 0.05));
}

.card-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 20px;
  color: var(--gui-text);
}

/* ── Biography Details ── */
.bio-grid {
  grid-template-columns: 0.95fr 1.05fr;
}

.bio-card p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--gui-text-sec);
  margin-bottom: 15px;
}

.bio-stats {
  display: flex;
  gap: 30px;
  margin-top: 30px;
  border-top: 1px solid var(--gui-border);
  padding-top: 25px;
}

.bio-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-number {
  font-size: 32px;
  font-weight: 800;
  font-family: var(--font-gui-mono);
  color: var(--cyan);
  text-shadow: 0 0 10px var(--cyan-glow);
  line-height: 1;
}

.stat-lbl {
  font-size: 11px;
  color: var(--gui-text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Timeline deployment */
.timeline {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.timeline-item {
  position: relative;
  padding-left: 24px;
}

.timeline-item::before {
  content: '';
  position: absolute;
  top: 5px;
  left: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--purple);
  box-shadow: 0 0 8px var(--purple-glow);
}

.timeline-item::after {
  content: '';
  position: absolute;
  top: 18px;
  left: 3px;
  bottom: -22px;
  width: 2px;
  background: var(--gui-border);
}

.timeline-item:last-child::after {
  display: none;
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}

.role-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--gui-text);
}

.role-date {
  font-family: var(--font-gui-mono);
  font-size: 11px;
  color: var(--purple);
}

.role-org {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--gui-text-sec);
  margin-bottom: 8px;
}

.role-desc {
  font-size: 13px;
  line-height: 1.6;
  color: var(--gui-text-muted);
}

/* ── Project Voice & Audio Deck ── */
.story-grid {
  grid-template-columns: 1fr 1fr;
  align-items: start;
}

.story-text-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.story-text-container p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--gui-text-sec);
}

.story-text-container p.lead-text {
  font-size: 18px;
  font-weight: 500;
  line-height: 1.6;
  color: var(--gui-text);
}

.story-quote {
  border-left: 3px solid var(--cyan);
  padding-left: 20px;
  margin: 15px 0;
  font-size: 18px;
  font-style: italic;
  color: var(--gui-text);
}

.story-quote cite {
  display: block;
  font-size: 12px;
  font-style: normal;
  font-weight: 600;
  margin-top: 6px;
  color: var(--gui-text-sec);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Premium Audio Deck Container */
.audio-player-card {
  padding: 24px;
  border-color: rgba(0, 240, 255, 0.15);
  box-shadow: 0 10px 40px rgba(0, 240, 255, 0.04);
}

.audio-deck-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--gui-border);
  padding-bottom: 12px;
  margin-bottom: 20px;
}

.deck-indicator {
  font-family: var(--font-gui-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--rose);
  letter-spacing: 1.5px;
}

.red-blink {
  animation: led-pulse 1.5s ease-in-out infinite;
}

.deck-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--gui-text-sec);
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

/* Glowing Waveform */
.waveform-container {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  height: 50px;
  padding: 0 10px;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.wave-bar {
  width: 3px;
  height: 10%;
  background: var(--cyan);
  border-radius: 2px;
  transition: height 0.15s ease, background 0.3s ease;
  transform-origin: bottom;
  box-shadow: 0 0 5px var(--cyan-glow);
}

/* Stagger heights statically for equalizer aesthetic when stopped */
.wave-bar:nth-child(even) { height: 18%; }
.wave-bar:nth-child(3n) { height: 25%; }
.wave-bar:nth-child(5n) { height: 35%; }

/* Bouncing animation when class playing is toggled! */
.waveform-container.playing .wave-bar {
  background: linear-gradient(to top, var(--cyan), var(--purple));
  box-shadow: 0 0 5px var(--purple-glow);
}

@keyframes bounce-bar {
  0% { transform: scaleY(0.1); }
  100% { transform: scaleY(1); }
}

/* Stagger dynamic delays in CSS for bouncing waves */
.waveform-container.playing .wave-bar:nth-child(1)  { animation: bounce-bar 0.7s infinite alternate ease-in-out; animation-delay: 0.1s; }
.waveform-container.playing .wave-bar:nth-child(2)  { animation: bounce-bar 0.9s infinite alternate ease-in-out; animation-delay: 0.4s; }
.waveform-container.playing .wave-bar:nth-child(3)  { animation: bounce-bar 0.8s infinite alternate ease-in-out; animation-delay: 0.2s; }
.waveform-container.playing .wave-bar:nth-child(4)  { animation: bounce-bar 0.6s infinite alternate ease-in-out; animation-delay: 0.5s; }
.waveform-container.playing .wave-bar:nth-child(5)  { animation: bounce-bar 0.9s infinite alternate ease-in-out; animation-delay: 0.3s; }
.waveform-container.playing .wave-bar:nth-child(6)  { animation: bounce-bar 0.7s infinite alternate ease-in-out; animation-delay: 0.6s; }
.waveform-container.playing .wave-bar:nth-child(7)  { animation: bounce-bar 0.8s infinite alternate ease-in-out; animation-delay: 0.1s; }
.waveform-container.playing .wave-bar:nth-child(8)  { animation: bounce-bar 0.5s infinite alternate ease-in-out; animation-delay: 0.4s; }
.waveform-container.playing .wave-bar:nth-child(9)  { animation: bounce-bar 0.7s infinite alternate ease-in-out; animation-delay: 0.2s; }
.waveform-container.playing .wave-bar:nth-child(10) { animation: bounce-bar 0.9s infinite alternate ease-in-out; animation-delay: 0.5s; }
.waveform-container.playing .wave-bar:nth-child(11) { animation: bounce-bar 0.8s infinite alternate ease-in-out; animation-delay: 0.3s; }
.waveform-container.playing .wave-bar:nth-child(12) { animation: bounce-bar 0.6s infinite alternate ease-in-out; animation-delay: 0.7s; }
.waveform-container.playing .wave-bar:nth-child(13) { animation: bounce-bar 0.9s infinite alternate ease-in-out; animation-delay: 0.2s; }
.waveform-container.playing .wave-bar:nth-child(14) { animation: bounce-bar 0.7s infinite alternate ease-in-out; animation-delay: 0.4s; }
.waveform-container.playing .wave-bar:nth-child(15) { animation: bounce-bar 0.8s infinite alternate ease-in-out; animation-delay: 0.1s; }
.waveform-container.playing .wave-bar:nth-child(16) { animation: bounce-bar 0.5s infinite alternate ease-in-out; animation-delay: 0.5s; }
.waveform-container.playing .wave-bar:nth-child(17) { animation: bounce-bar 0.7s infinite alternate ease-in-out; animation-delay: 0.3s; }
.waveform-container.playing .wave-bar:nth-child(18) { animation: bounce-bar 0.9s infinite alternate ease-in-out; animation-delay: 0.6s; }
.waveform-container.playing .wave-bar:nth-child(19) { animation: bounce-bar 0.8s infinite alternate ease-in-out; animation-delay: 0.2s; }
.waveform-container.playing .wave-bar:nth-child(20) { animation: bounce-bar 0.6s infinite alternate ease-in-out; animation-delay: 0.4s; }

/* Scrubber and duration */
.track-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 12px;
}

.track-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--gui-text);
}

.track-file {
  font-family: var(--font-gui-mono);
  font-size: 11px;
  color: var(--gui-text-muted);
}

.player-progress-container {
  height: 4px;
  background: var(--gui-border);
  border-radius: 2px;
  cursor: pointer;
  position: relative;
  margin-bottom: 8px;
}

.player-progress {
  height: 100%;
  width: 0%;
  background: var(--cyan);
  box-shadow: 0 0 6px var(--cyan);
  border-radius: 2px;
  transition: width 0.1s linear;
}

.player-time {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-gui-mono);
  font-size: 10px;
  color: var(--gui-text-muted);
  margin-bottom: 20px;
}

.audio-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-bottom: 25px;
}

.audio-btn {
  background: transparent;
  border: 1px solid var(--gui-border);
  color: var(--gui-text-sec);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  transition: all var(--transition-speed);
}

.audio-btn:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  box-shadow: 0 0 8px var(--cyan-glow);
}

.audio-btn.play-btn {
  width: 48px;
  height: 48px;
  font-size: 16px;
  background: var(--cyan);
  border-color: var(--cyan);
  color: var(--btn-primary-text);
  box-shadow: 0 4px 10px var(--cyan-glow);
}

.audio-btn.play-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 15px var(--cyan-glow);
  color: var(--btn-primary-text);
}

/* Interactive Voice Transcript Display */
.transcript-display-container {
  background: var(--gui-transcript-bg);
  border: 1px solid var(--gui-border);
  border-radius: 8px;
  padding: 14px;
  text-align: left;
  margin-bottom: 25px;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.05);
}

.transcript-header {
  font-family: var(--font-gui-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
  text-shadow: 0 0 6px var(--cyan-glow);
}

.transcript-text {
  font-family: var(--font-gui-sans);
  font-size: 13px;
  line-height: 1.5;
  color: var(--gui-text-sec);
  max-height: 85px;
  overflow-y: auto;
  padding-right: 4px;
}

/* Custom Scrollbar for Transcript Text */
.transcript-text::-webkit-scrollbar {
  width: 4px;
}
.transcript-text::-webkit-scrollbar-track {
  background: transparent;
}
.transcript-text::-webkit-scrollbar-thumb {
  background: rgba(0, 240, 255, 0.15);
  border-radius: 2px;
}
.transcript-text::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 240, 255, 0.35);
}

/* Playlist panel */
.playlist-container {
  border-top: 1px solid var(--gui-border);
  padding-top: 20px;
}

.playlist-header {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--gui-text-muted);
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.playlist {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.playlist-item {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.playlist-item:hover {
  background: var(--gui-hover-bg);
  border-color: var(--gui-border);
}

.play-indicator {
  font-size: 8px;
  color: transparent;
  margin-right: 10px;
}

.track-name {
  color: var(--gui-text-sec);
  flex-grow: 1;
}

.track-duration {
  font-family: var(--font-gui-mono);
  font-size: 11px;
  color: var(--gui-text-muted);
}

.playlist-item.active {
  background: var(--cyan-glow);
  border-color: var(--gui-border-hover);
}

.playlist-item.active .play-indicator {
  color: var(--cyan);
}

.playlist-item.active .track-name {
  color: var(--cyan);
  font-weight: 600;
}

/* ── Technical Stack & Skill Progress Bars ── */
.skills-grid {
  grid-template-columns: repeat(3, 1fr);
}

.skill-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 30px;
}

.skill-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  height: 3px;
  width: 100%;
}

.skill-card.border-cyan::after { background: var(--cyan); }
.skill-card.border-purple::after { background: var(--purple); }
.skill-card.border-green::after { background: var(--emerald); }

.skill-category-icon {
  font-size: 32px;
  margin-bottom: -5px;
}

.skill-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.skill-bar-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 600;
}

.skill-name {
  color: var(--gui-text);
}

.skill-percentage {
  font-family: var(--font-gui-mono);
  font-size: 12px;
  color: var(--gui-text-sec);
}

.progress-bar {
  height: 6px;
  background: var(--gui-border);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 3px;
  box-shadow: 0 0 8px rgba(0, 240, 255, 0.2);
}

.progress-fill.cyan {
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan-glow);
}

.progress-fill.purple {
  background: var(--purple);
  box-shadow: 0 0 8px var(--purple-glow);
}

.progress-fill.green {
  background: var(--emerald);
  box-shadow: 0 0 8px var(--emerald-glow);
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.skill-tag {
  font-family: var(--font-gui-mono);
  font-size: 11px;
  background: var(--gui-hover-bg);
  border: 1px solid var(--gui-border);
  color: var(--gui-text-sec);
  padding: 4px 10px;
  border-radius: 6px;
}

/* ── Operations (Projects) ── */
.projects-grid {
  grid-template-columns: repeat(2, 1fr);
}

.project-card {
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding: 30px;
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.project-type {
  font-family: var(--font-gui-mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--purple);
  letter-spacing: 1px;
}

.status-indicator {
  font-family: var(--font-gui-mono);
  font-size: 9px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-indicator::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.status-indicator.online {
  color: var(--emerald);
}

.status-indicator.online::before {
  background: var(--emerald);
  box-shadow: 0 0 8px var(--emerald-glow);
  animation: led-pulse 2s infinite;
}

.status-indicator.running {
  color: var(--cyan);
}

.status-indicator.running::before {
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan-glow);
  animation: led-pulse 2s infinite;
}

.project-title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--gui-text);
}

.project-desc {
  font-size: 14px;
  line-height: 1.6;
  color: var(--gui-text-sec);
  flex-grow: 1;
}

.project-meta {
  border-top: 1px solid var(--gui-border);
  padding-top: 15px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: var(--gui-text-muted);
}

/* ── Hobbies Grid ── */
.hobbies-grid {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.hobby-card {
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.hobby-icon {
  font-size: 32px;
  margin-bottom: -5px;
}

.hobby-card p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--gui-text-sec);
}

/* ── Contact Details ── */
.contact-grid {
  grid-template-columns: 0.9fr 1.1fr;
}

.contact-methods {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-methods p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--gui-text-sec);
}

.contact-methods p.lead-text {
  font-size: 18px;
  font-weight: 500;
  color: var(--gui-text);
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 10px;
}

.contact-anchor {
  display: flex;
  align-items: center;
  gap: 15px;
  background: var(--gui-bg-panel);
  border: 1px solid var(--gui-border);
  padding: 16px 20px;
  border-radius: 12px;
  color: var(--gui-text-sec);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: all var(--transition-speed);
}

.contact-anchor:hover {
  transform: translateX(6px);
  border-color: var(--cyan);
  color: var(--gui-text);
  box-shadow: 0 4px 15px rgba(0, 240, 255, 0.05);
}

.anchor-icon {
  font-size: 18px;
  color: var(--cyan);
  text-shadow: 0 0 6px var(--cyan-glow);
}

/* Form Styles */
.contact-form-card {
  padding: 30px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 12px;
  font-weight: 600;
  color: var(--gui-text-sec);
  letter-spacing: 0.5px;
}

.form-group input,
.form-group textarea {
  background: var(--gui-input-bg);
  border: 1px solid var(--gui-border);
  border-radius: 8px;
  padding: 12px 16px;
  color: var(--gui-text);
  font-family: var(--font-gui-sans);
  font-size: 14px;
  outline: none;
  transition: all var(--transition-speed);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 10px var(--cyan-glow);
  background: var(--gui-input-focus-bg);
}

.btn-block {
  width: 100%;
}

/* ── GUI Footer ── */
}

/* ── Form Submission Feedback ── */
.form-status {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  margin-top: 15px;
  text-align: center;
  font-family: var(--font-gui-sans);
  animation: page-slide-up 0.3s ease forwards;
  font-weight: 600;
}
.form-status.success {
  background: rgba(5, 150, 105, 0.08);
  border: 1px solid var(--emerald);
  color: var(--emerald);
}
.form-status.error {
  background: rgba(225, 29, 72, 0.08);
  border: 1px solid var(--rose);
  color: var(--rose);
}

/* ── Animations ── */
@keyframes led-pulse {
  0%, 100% { opacity: 1; filter: brightness(1); }
  50% { opacity: 0.4; filter: brightness(0.7); }
}


/* ==========================================================================
   TRANSITION KEYFRAMES AND TRIGGERS
   Collapsing the CRT screen and expanding it back realistically
   ========================================================================== */

/* horizontal CRT screen squeeze */
@keyframes crt-squeeze {
  0% {
    transform: scaleY(1) scaleX(1);
    filter: brightness(1) contrast(1);
    opacity: 1;
  }
  40% {
    transform: scaleY(0.01) scaleX(1);
    filter: brightness(3) contrast(1.5);
    opacity: 0.8;
  }
  80% {
    transform: scaleY(0.01) scaleX(0.01);
    filter: brightness(8) contrast(2);
    opacity: 0.5;
  }
  100% {
    transform: scaleY(0.01) scaleX(0.01);
    filter: brightness(10);
    opacity: 0;
  }
}

.wopr-collapsing #crt-screen {
  animation: crt-squeeze 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards !important;
}

/* ── CRT Bezel and Base Scaling during squeeze ── */
@keyframes frame-fade-out {
  0% { transform: scale(1); opacity: 1; filter: blur(0); }
  60% { transform: scale(0.98); opacity: 0.8; }
  100% { transform: scale(0.95); opacity: 0; filter: blur(4px); }
}

.wopr-collapsing {
  animation: frame-fade-out 0.6s ease-in forwards !important;
}


/* ==========================================================================
   RESPONSIVE DESIGN ADAPTATIONS FOR ALL PORTFOLIO DEVICES
   ========================================================================== */

@media (max-width: 992px) {
  #hero {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

  .hero-content {
    align-items: center;
  }

  .hero-lead {
    max-width: 100%;
  }

  .hero-visual {
    max-width: 500px;
    margin: 0 auto;
    width: 100%;
  }

  .bio-grid {
    grid-template-columns: 1fr;
  }

  .story-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .skills-grid,
  .projects-grid,
  .hobbies-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

@media (max-width: 768px) {
  #global-header {
    padding: 0 20px;
  }

  .header-nav {
    display: none; /* Hide standard navigation links on mobile */
  }

  .hero-title {
    font-size: 48px;
  }

  .skills-grid,
  .projects-grid,
  .hobbies-grid {
    grid-template-columns: 1fr;
  }

  #gui-mode-container {
    gap: 70px;
    padding-top: 90px;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 38px;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
    gap: 12px;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .mini-terminal {
    transform: none !important;
  }

  .card {
    padding: 20px;
  }
  
  .bio-stats {
    flex-direction: column;
    gap: 20px;
  }
}
