/* ==========================================================================
   VHUWON MATHERS — DESIGN SYSTEM & MASTER STYLESHEET
   Domain: gautambhuwan.com.np
   Architecture: Pure Semantic CSS with Centralized Custom Tokens
   ========================================================================== */

:root {
  /* Dark Theme Tokens (Default) */
  --bg-primary: #080b12;
  --bg-secondary: #0f1422;
  --surface: #141b2d;
  --surface-elevated: #1a233a;
  --surface-hover: #222d48;
  
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #8492a6;
  --text-dim: #475569;

  --accent-primary: #8b5cf6;       /* Electric Violet */
  --accent-secondary: #06b6d4;     /* Cool Cyan */
  --accent-tertiary: #38bdf8;      /* Deep Sky */
  --accent-glow: rgba(139, 92, 246, 0.25);
  --cyan-glow: rgba(6, 182, 212, 0.2);

  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --border-accent: rgba(139, 92, 246, 0.4);

  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;

  /* Typography & Sizing */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 25px var(--accent-glow);

  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
  --transition-slow: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Light Theme Tokens — Rich Contrast & Legibility */
[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-secondary: #f1f5f9;
  --surface: #ffffff;
  --surface-elevated: #f8fafc;
  --surface-hover: #e2e8f0;

  --text-primary: #020617;        /* Rich slate-950 for high-contrast headings */
  --text-secondary: #1e293b;      /* Slate-800 for clear, readable body copy */
  --text-muted: #334155;          /* Slate-700 for crisp secondary text (AAA contrast) */
  --text-dim: #475569;            /* Slate-600 for timestamps & labels (never washed out) */

  --accent-primary: #6d28d9;      /* Deep violet */
  --accent-secondary: #0e7490;    /* Deep cyan/teal for crisp contrast on light backgrounds */
  --accent-tertiary: #0369a1;     /* Deep sky blue */
  --accent-glow: rgba(109, 40, 217, 0.12);
  --cyan-glow: rgba(14, 116, 144, 0.12);

  --border: rgba(15, 23, 42, 0.12);
  --border-strong: rgba(15, 23, 42, 0.22);
  --border-accent: rgba(109, 40, 217, 0.35);

  --success: #059669;             /* Crisp emerald */
  --warning: #b45309;             /* Deep amber */
  --error: #b91c1c;               /* Deep ruby red */

  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 8px 20px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 16px 36px rgba(15, 23, 42, 0.12);
  --shadow-glow: 0 0 20px rgba(109, 40, 217, 0.12);
}

/* ==========================================================================
   Base & Reset
   ========================================================================== */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

/* Subtle Technical Ambient Grid Background */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-image: 
    linear-gradient(to right, var(--border) 1px, transparent 1px),
    linear-gradient(to bottom, var(--border) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.35;
  pointer-events: none;
  z-index: 0;
}

/* Typography Hierarchy */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.display-title {
  font-size: clamp(2.5rem, 6vw, 4.25rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.h1 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; }
.h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); }
.h3 { font-size: 1.35rem; font-weight: 600; }
.body-lead { font-size: 1.15rem; color: var(--text-secondary); line-height: 1.7; }
.body-sm { font-size: 0.875rem; color: var(--text-muted); }
.mono-label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

a {
  color: var(--accent-secondary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--accent-primary);
}

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--accent-secondary);
  outline-offset: 3px;
}

img, svg {
  display: block;
  max-width: 100%;
}

/* ==========================================================================
   Layout Containers & Components
   ========================================================================== */

.container {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
  position: relative;
  z-index: 1;
}

.section {
  padding: 96px 0;
  position: relative;
  z-index: 1;
}

.section-tight {
  padding: 56px 0;
}

.section-header {
  margin-bottom: 48px;
}

.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: var(--surface);
  border: 1px solid var(--border-accent);
  color: var(--accent-secondary);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.section-badge::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-secondary);
  box-shadow: 0 0 8px var(--accent-secondary);
}

.section-title {
  font-size: clamp(1.85rem, 3.5vw, 2.75rem);
  margin-bottom: 16px;
}

.section-description {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 640px;
  line-height: 1.65;
}

/* ==========================================================================
   Global Header & Navigation
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  width: 100%;
  background: rgba(8, 11, 18, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  transition: background-color var(--transition-normal), border-color var(--transition-normal);
}

[data-theme="light"] .site-header {
  background: rgba(248, 250, 252, 0.88);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.brand-badge {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--surface), var(--surface-elevated));
  border: 1px solid var(--border-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-secondary);
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 800;
  box-shadow: var(--shadow-sm);
}

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

.brand-name {
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.2;
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.nav-link {
  display: inline-block;
  padding: 6px 11px;
  color: var(--text-secondary);
  font-size: 0.86rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.nav-link:hover {
  color: var(--text-primary);
  background: var(--surface);
}

.nav-link.active {
  color: var(--accent-secondary);
  background: rgba(6, 182, 212, 0.08);
  border: 1px solid rgba(6, 182, 212, 0.2);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: 12px;
}

/* Theme Toggle Button */
.theme-toggle-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.theme-toggle-btn:hover {
  color: var(--text-primary);
  border-color: var(--accent-secondary);
  background: var(--surface-hover);
}

.theme-icon-sun { display: none; }
.theme-icon-moon { display: block; }
[data-theme="light"] .theme-icon-sun { display: block; }
[data-theme="light"] .theme-icon-moon { display: none; }

/* Mobile Menu Toggle */
.mobile-nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-primary);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  z-index: 1001;
}

.mobile-nav-toggle:hover {
  background: var(--surface-hover);
  border-color: var(--accent-secondary);
}

/* Mobile Navigation Drawer */
.mobile-nav-drawer {
  position: fixed;
  top: 0;
  right: -100%;
  width: 100%;
  max-width: 360px;
  height: 100vh;
  background: var(--bg-secondary);
  border-left: 1px solid var(--border);
  padding: 88px 28px 36px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  z-index: 999;
  transition: right var(--transition-slow);
  box-shadow: var(--shadow-lg);
  overflow-y: auto;
}

.mobile-nav-drawer.open {
  right: 0;
}

.mobile-nav-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-normal), visibility var(--transition-normal);
}

.mobile-nav-backdrop.open {
  opacity: 1;
  visibility: visible;
}

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

.mobile-nav-link {
  display: block;
  padding: 12px 16px;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.mobile-nav-link:hover, .mobile-nav-link.active {
  color: var(--accent-secondary);
  background: var(--surface);
}

/* ==========================================================================
   Buttons & UI Elements
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 24px;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
  border: 1px solid transparent;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(139, 92, 246, 0.35);
}

.btn-primary:hover {
  color: #ffffff;
  opacity: 0.94;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.45);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
}

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

.btn-outline {
  background: transparent;
  color: var(--accent-secondary);
  border: 1px solid var(--border-accent);
}

.btn-outline:hover {
  background: rgba(6, 182, 212, 0.1);
  border-color: var(--accent-secondary);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.85rem;
}

/* Cards & Containers */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 32px;
  transition: transform var(--transition-normal), border-color var(--transition-normal), box-shadow var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--border-accent);
  box-shadow: var(--shadow-md);
}

.card-interactive::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-secondary), transparent);
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.card-interactive:hover::before {
  opacity: 1;
}

/* Category-Themed Card Borders & Accents (Matching Heading Colors) */
.category-section-block[data-category-section="foundations"] .card {
  border: 1px solid rgba(6, 182, 212, 0.32);
}
.category-section-block[data-category-section="foundations"] .card:hover {
  border-color: rgba(6, 182, 212, 0.75);
  box-shadow: 0 10px 28px -8px rgba(6, 182, 212, 0.18);
}
.category-section-block[data-category-section="foundations"] .card-interactive::before {
  background: linear-gradient(90deg, transparent, var(--accent-secondary), transparent);
}

.category-section-block[data-category-section="fiber-optics"] .card {
  border: 1px solid rgba(16, 185, 129, 0.32);
}
.category-section-block[data-category-section="fiber-optics"] .card:hover {
  border-color: rgba(16, 185, 129, 0.75);
  box-shadow: 0 10px 28px -8px rgba(16, 185, 129, 0.18);
}
.category-section-block[data-category-section="fiber-optics"] .card-interactive::before {
  background: linear-gradient(90deg, transparent, #10b981, transparent);
}

.category-section-block[data-category-section="enterprise-systems"] .card {
  border: 1px solid rgba(168, 85, 247, 0.32);
}
.category-section-block[data-category-section="enterprise-systems"] .card:hover {
  border-color: rgba(168, 85, 247, 0.75);
  box-shadow: 0 10px 28px -8px rgba(168, 85, 247, 0.18);
}
.category-section-block[data-category-section="enterprise-systems"] .card-interactive::before {
  background: linear-gradient(90deg, transparent, #a855f7, transparent);
}

.category-section-block[data-category-section="carrier-core"] .card {
  border: 1px solid rgba(244, 63, 94, 0.32);
}
.category-section-block[data-category-section="carrier-core"] .card:hover {
  border-color: rgba(244, 63, 94, 0.75);
  box-shadow: 0 10px 28px -8px rgba(244, 63, 94, 0.18);
}
.category-section-block[data-category-section="carrier-core"] .card-interactive::before {
  background: linear-gradient(90deg, transparent, #f43f5e, transparent);
}


/* Grids */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

/* Tech Identity Strip */
.tech-strip {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 22px 0;
  overflow: hidden;
}

.tech-strip-inner {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 32px;
  flex-wrap: wrap;
}

.tech-tag-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.06em;
}

.tech-tag-item::before {
  content: '>';
  color: var(--accent-secondary);
}

/* Status Indicator */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: var(--radius-full);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}

/* Tag Pills */
.tag {
  display: inline-block;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-family: var(--font-mono);
  font-weight: 500;
}

/* Forms */
.form-group {
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

.form-input, .form-textarea, .form-select {
  width: 100%;
  padding: 13px 16px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  transition: all var(--transition-fast);
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
  border-color: var(--accent-secondary);
  background: var(--surface-elevated);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.15);
}

.form-textarea {
  min-height: 140px;
  resize: vertical;
}

.form-error {
  color: var(--error);
  font-size: 0.8rem;
  display: none;
}

.form-error.active {
  display: block;
}

/* Code Snippet Box */
.terminal-card {
  background: #05070c;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  overflow: hidden;
  font-family: var(--font-mono);
}

.terminal-header {
  background: #0f131d;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}

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

.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.dot-red { background: #ef4444; }
.dot-yellow { background: #f59e0b; }
.dot-green { background: #10b981; }

.terminal-title {
  color: var(--text-muted);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
}

.terminal-body {
  padding: 20px;
  color: #38bdf8;
  font-size: 0.88rem;
  line-height: 1.6;
  overflow-x: auto;
}

/* ==========================================================================
   Global Footer
   ========================================================================== */

.site-footer {
  margin-top: auto;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 64px 0 32px;
  position: relative;
  z-index: 1;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 40px;
  margin-bottom: 48px;
}

.footer-brand h3 {
  font-size: 1.25rem;
  margin-bottom: 12px;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.92rem;
  max-width: 320px;
  line-height: 1.6;
}

.footer-col h4 {
  font-size: 0.88rem;
  font-family: var(--font-mono);
  color: var(--accent-secondary);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-link {
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: color var(--transition-fast);
}

.footer-link:hover {
  color: var(--text-primary);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--text-dim);
  font-size: 0.85rem;
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--surface-elevated);
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 990;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-md);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
}

/* ==========================================================================
   Interactive Modal Component
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(8, 11, 18, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-normal), visibility var(--transition-normal);
}

.modal-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

.modal-card {
  background: var(--surface);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  width: 100%;
  max-width: 920px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  position: relative;
  transform: translateY(20px) scale(0.97);
  transition: transform var(--transition-normal);
  overflow: hidden;
}

.modal-backdrop.is-open .modal-card {
  transform: translateY(0) scale(1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-elevated);
}

.modal-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.modal-close-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.modal-close-btn:hover {
  color: var(--text-primary);
  background: var(--surface-hover);
  border-color: var(--border-strong);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  background: var(--surface-elevated);
  flex-wrap: wrap;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  text-align: left;
}

.data-table th {
  padding: 12px 14px;
  background: var(--surface-elevated);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent-secondary);
  text-transform: uppercase;
  border-bottom: 1px solid var(--border-strong);
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}

.data-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.data-table .mono {
  font-family: var(--font-mono);
  font-size: 0.84rem;
  color: var(--text-primary);
}

/* ==========================================================================
   Interactive Terminal & Sandbox Styles
   ========================================================================== */
.terminal-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.terminal-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.74rem;
  font-family: var(--font-mono);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.terminal-btn:hover {
  color: var(--text-primary);
  background: var(--surface-hover);
  border-color: var(--border-strong);
}

.terminal-btn.btn-run {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border-color: rgba(16, 185, 129, 0.4);
  font-weight: 600;
}

.terminal-btn.btn-run:hover {
  background: rgba(16, 185, 129, 0.28);
  border-color: #10b981;
}

.terminal-btn.btn-reset {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.35);
}

.terminal-btn.btn-reset:hover {
  background: rgba(239, 68, 68, 0.22);
}

.terminal-output-view {
  display: none;
  background: #020408;
  border-top: 1px solid var(--border);
  padding: 20px;
  font-family: var(--font-mono);
  font-size: 0.84rem;
  line-height: 1.6;
  color: #cbd5e1;
  overflow-x: auto;
}

.terminal-output-view.is-visible {
  display: block;
}

.terminal-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  color: #10b981;
  background: rgba(16, 185, 129, 0.12);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  margin-bottom: 12px;
  font-family: var(--font-mono);
}

/* Sandbox Terminal Component */
.sandbox-card {
  background: #04060b;
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  margin-bottom: 48px;
  overflow: hidden;
  font-family: var(--font-mono);
}

.sandbox-screen {
  height: 320px;
  max-height: 50vh;
  overflow-y: auto;
  padding: 18px 20px;
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-secondary);
  scroll-behavior: smooth;
  background: #020408;
}

.sandbox-screen pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: inherit;
}

.sandbox-input-row {
  display: flex;
  align-items: center;
  background: #0b0f19;
  padding: 12px 18px;
  border-top: 1px solid var(--border);
  gap: 10px;
}

.sandbox-prompt {
  color: var(--accent-secondary);
  font-weight: 700;
  font-size: 0.88rem;
  white-space: nowrap;
}

.sandbox-input {
  flex: 1;
  background: transparent;
  border: none;
  color: #f8fafc;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  outline: none;
}

.sandbox-chips {
  padding: 10px 18px;
  background: #070a12;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.sandbox-chip-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-right: 4px;
}

.sandbox-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.74rem;
  cursor: pointer;
  font-family: var(--font-mono);
  transition: all var(--transition-fast);
}

.sandbox-chip:hover {
  color: var(--accent-secondary);
  border-color: var(--accent-secondary);
  background: rgba(6, 182, 212, 0.12);
}

/* Per-Lab Interactive Console Elements */
.terminal-interactive-bar {
  display: flex;
  align-items: center;
  background: #080c16;
  border-top: 1px solid var(--border);
  padding: 10px 16px;
  gap: 10px;
  font-family: var(--font-mono);
}

.terminal-interactive-prompt {
  color: var(--accent-secondary);
  font-weight: 700;
  font-size: 0.82rem;
  white-space: nowrap;
}

.terminal-interactive-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  color: #f8fafc;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  padding: 6px 10px;
  outline: none;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.terminal-interactive-input:focus {
  border-color: var(--accent-secondary);
  background: rgba(6, 182, 212, 0.05);
}

.terminal-interactive-input::placeholder {
  color: var(--text-dim);
  font-size: 0.78rem;
}

.terminal-interactive-btn {
  background: rgba(6, 182, 212, 0.15);
  border: 1px solid rgba(6, 182, 212, 0.35);
  color: var(--accent-secondary);
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.74rem;
  font-family: var(--font-mono);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.terminal-interactive-btn:hover {
  background: rgba(6, 182, 212, 0.28);
  border-color: var(--accent-secondary);
  color: #ffffff;
}

.terminal-session-log {
  padding: 14px 20px;
  background: #020408;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.6;
  max-height: 280px;
  overflow-y: auto;
  display: none;
  scroll-behavior: smooth;
}

.terminal-session-log.has-entries {
  display: block;
}

/* ==========================================================================
   Custom Project Architect Studio & Universal Simulator
   ========================================================================== */
.architect-studio-container {
  background: linear-gradient(160deg, rgba(20, 27, 45, 0.95) 0%, rgba(10, 14, 26, 0.98) 100%);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4), 0 0 30px rgba(139, 92, 246, 0.15);
  margin-bottom: 48px;
  position: relative;
  overflow: hidden;
}

.architect-studio-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary), var(--success));
}

.architect-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}

.architect-presets-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 24px;
}

.architect-preset-chip {
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.76rem;
  font-family: var(--font-mono);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.architect-preset-chip:hover {
  border-color: var(--accent-secondary);
  color: #ffffff;
  background: rgba(6, 182, 212, 0.15);
}

.architect-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

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

/* Steps in Wizard */
.architect-step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  margin-bottom: 16px;
}

.architect-step-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.architect-step-num {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  background: rgba(139, 92, 246, 0.2);
  color: var(--accent-primary);
  border: 1px solid var(--border-accent);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-weight: 700;
}

.architect-step-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

/* Platform Selector Pills */
.platform-selector-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
}

.platform-btn {
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 10px;
  cursor: pointer;
  text-align: center;
  transition: all var(--transition-fast);
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.platform-btn:hover {
  border-color: var(--accent-secondary);
  background: rgba(6, 182, 212, 0.08);
  color: var(--text-primary);
}

.platform-btn.active {
  border-color: var(--accent-secondary);
  background: rgba(6, 182, 212, 0.16);
  color: #ffffff;
  box-shadow: 0 0 16px rgba(6, 182, 212, 0.25);
}

.platform-btn-icon {
  font-size: 1.25rem;
  line-height: 1;
}

.platform-btn-name {
  font-weight: 700;
  font-size: 0.82rem;
}

.platform-btn-sub {
  font-size: 0.68rem;
  color: var(--text-muted);
}

/* Scenario Cards */
.scenario-selector-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.scenario-card {
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: left;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.scenario-card:hover {
  border-color: var(--accent-primary);
  background: rgba(139, 92, 246, 0.08);
}

.scenario-card.active {
  border-color: var(--accent-primary);
  background: rgba(139, 92, 246, 0.16);
  box-shadow: 0 0 16px rgba(139, 92, 246, 0.2);
}

.scenario-indicator {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--text-dim);
  margin-top: 3px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scenario-card.active .scenario-indicator {
  border-color: var(--accent-primary);
  background: var(--accent-primary);
}

.scenario-info {
  flex: 1;
}

.scenario-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}

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

/* Modifiers & Parameters */
.modifiers-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

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

.modifier-checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  cursor: pointer;
  font-size: 0.8rem;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  user-select: none;
}

.modifier-checkbox-label:hover {
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.modifier-checkbox-label input[type="checkbox"] {
  accent-color: var(--accent-secondary);
  width: 15px;
  height: 15px;
}

.param-input-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 8px;
}

.param-input-group label {
  font-size: 0.74rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.param-input {
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  outline: none;
  transition: border-color var(--transition-fast);
}

.param-input:focus {
  border-color: var(--accent-secondary);
}

/* Right Column: Code & Specs Preview */
.architect-preview-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 100%;
}

.architect-preview-header {
  padding: 16px 20px;
  background: var(--surface-elevated);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.architect-specs-summary {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  padding: 12px 18px;
  background: rgba(0, 0, 0, 0.25);
  border-bottom: 1px solid var(--border);
  font-size: 0.76rem;
  font-family: var(--font-mono);
}

.architect-spec-item {
  color: var(--text-muted);
}

.architect-spec-item strong {
  color: var(--text-primary);
}

.architect-code-box {
  flex: 1;
  background: #04060c;
  padding: 16px 18px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.55;
  color: #d1d5db;
  overflow-y: auto;
  max-height: 480px;
  white-space: pre;
  tab-size: 2;
}

/* Bottom Simulation Container */
.architect-sim-container {
  background: #04060a;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

.architect-sim-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 18px;
  background: #090e18;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 10px;
}

.architect-sim-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.76rem;
  font-family: var(--font-mono);
  color: var(--accent-secondary);
}

.architect-sim-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.architect-sim-chips {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: #070b14;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  white-space: nowrap;
}

.architect-sim-chips-label {
  font-size: 0.7rem;
  font-family: var(--font-mono);
  color: var(--text-dim);
  margin-right: 4px;
}

.architect-sim-screen {
  padding: 16px 20px;
  background: #020306;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.6;
  color: #cbd5e1;
  min-height: 180px;
  max-height: 320px;
  overflow-y: auto;
  scroll-behavior: smooth;
}

.architect-sim-input-row {
  display: flex;
  align-items: center;
  padding: 8px 16px;
  background: #080c16;
  border-top: 1px solid var(--border);
  gap: 10px;
}

.architect-sim-prompt {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-secondary);
  white-space: nowrap;
}

.architect-sim-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 6px 12px;
  outline: none;
  transition: border-color var(--transition-fast);
}

.architect-sim-input:focus {
  border-color: var(--accent-secondary);
  background: rgba(6, 182, 212, 0.05);
}

.architect-sim-btn {
  background: rgba(6, 182, 212, 0.18);
  border: 1px solid var(--accent-secondary);
  color: var(--accent-secondary);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.architect-sim-btn:hover {
  background: var(--accent-secondary);
  color: #000000;
}



/* ==========================================================================
   Interactive Article Reader Modal & Technical Publication
   ========================================================================== */
.article-modal-card {
  max-width: 980px;
  max-height: 92vh;
}

.article-header-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 24px;
}

.article-author-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.article-meta-badge {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--accent-secondary);
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.25);
  padding: 3px 10px;
  border-radius: var(--radius-sm);
}

.article-callout {
  background: var(--surface-elevated);
  border-left: 4px solid var(--accent-secondary);
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  margin: 20px 0 24px 0;
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

.article-callout strong {
  color: var(--text-primary);
}

.article-prose h3 {
  font-size: 1.25rem;
  margin-top: 28px;
  margin-bottom: 12px;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border);
  padding-bottom: 6px;
}

.article-prose p {
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 16px;
  font-size: 0.95rem;
}

.article-prose code:not(pre code) {
  background: rgba(255, 255, 255, 0.06);
  color: var(--accent-secondary);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.88em;
}

.read-article-action {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}


/* ==========================================================================
   ENTERPRISE NETWORK TRANSFORMATION (BEFORE & AFTER) COMPONENT
   ========================================================================== */

.transformation-wrapper {
  margin-top: 48px;
  margin-bottom: 56px;
}

.transformation-card {
  background: var(--surface-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 3.5vw, 36px);
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.transformation-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #f59e0b, #10b981, #06b6d4, #8b5cf6);
}

.transformation-toggle-nav {
  display: flex;
  gap: 12px;
  margin: 24px 0 32px 0;
  background: var(--surface);
  padding: 6px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  width: fit-content;
  flex-wrap: wrap;
}

.transformation-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all var(--transition-fast);
}

.transformation-tab-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}

.transformation-tab-btn.active[data-tab="before"] {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.15);
}

.transformation-tab-btn.active[data-tab="after"] {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.15);
}

.transformation-panel {
  display: none;
  animation: fadeIn 0.3s ease;
}

.transformation-panel.is-active {
  display: block;
}

/* Visual Diagram Containers */
.diagram-canvas {
  background: #090d16;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: clamp(16px, 2.5vw, 28px);
  margin-bottom: 28px;
  position: relative;
  overflow-x: auto;
}

.diagram-canvas::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 20px 20px;
  pointer-events: none;
}

/* Diagram Architecture Node Blocks */
.diagram-flow-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

.diagram-node {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.diagram-node:hover {
  transform: translateY(-2px);
  border-color: var(--accent-secondary);
}

.diagram-node-title {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.diagram-node-sub {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.diagram-node-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  margin-top: 6px;
  font-family: var(--font-mono);
}

.node-danger {
  border-color: rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.04);
}

.node-warning {
  border-color: rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.04);
}

.node-success {
  border-color: rgba(16, 185, 129, 0.35);
  background: rgba(16, 185, 129, 0.04);
}

.node-primary {
  border-color: rgba(139, 92, 246, 0.35);
  background: rgba(139, 92, 246, 0.04);
}

.node-cyan {
  border-color: rgba(6, 182, 212, 0.35);
  background: rgba(6, 182, 212, 0.04);
}

.diagram-connector-down {
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  margin: 10px 0;
  position: relative;
  z-index: 1;
}

.diagram-connector-down span {
  background: var(--surface-elevated);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid var(--border);
  font-size: 0.72rem;
}

/* Feature/Deficiency Grid */
.audit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.audit-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
}

.audit-card-danger {
  border-left: 3px solid #ef4444;
}

.audit-card-success {
  border-left: 3px solid #10b981;
}

.audit-card h4 {
  font-size: 0.95rem;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.audit-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}



/* Connected Network Topology Styles */
.connected-topology-svg {
  width: 100%;
  max-width: 980px;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: var(--radius-sm);
  filter: drop-shadow(0 4px 16px rgba(0, 0, 0, 0.4));
}

/* ==========================================================================
   Timeline / Career Progression Component
   ========================================================================== */

.timeline {
  display: flex;
  flex-direction: column;
  gap: 32px;
  position: relative;
}

.timeline-item {
  padding-left: 20px;
  margin-bottom: 32px;
  position: relative;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  margin-top: 2px;
  margin-bottom: 8px;
}

.timeline-item h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-top: 4px;
  margin-bottom: 6px;
  line-height: 1.35;
  color: var(--text-primary);
}

.timeline-item .mono-label {
  margin-bottom: 10px;
}

/* ==========================================================================
   Plain-English Tech & Network Lexicon Component
   ========================================================================== */

.lexicon-search-wrapper {
  max-width: 820px;
  margin: 0 auto 26px auto;
  position: relative;
}

.lexicon-search-bar {
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-full);
  padding: 10px 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  transition: all var(--transition-normal);
}

.lexicon-search-bar:focus-within {
  border-color: var(--accent-secondary);
  box-shadow: 0 0 20px var(--cyan-glow);
}

.lexicon-search-icon {
  color: var(--text-muted);
  margin-right: 12px;
  flex-shrink: 0;
}

.lexicon-search-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.98rem;
  outline: none;
  width: 100%;
}

.lexicon-search-input::placeholder {
  color: var(--text-dim);
}

.lexicon-clear-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  transition: color var(--transition-fast);
}

.lexicon-clear-btn:hover {
  color: var(--text-primary);
}

.lexicon-filters-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 20px;
}

.lexicon-cat-btn {
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-family: var(--font-mono);
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.lexicon-cat-btn:hover {
  border-color: var(--border-accent);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.lexicon-cat-btn.active {
  background: rgba(6, 182, 212, 0.12);
  border-color: var(--accent-secondary);
  color: var(--accent-secondary);
  box-shadow: 0 0 14px rgba(6, 182, 212, 0.15);
}

.lexicon-alphabet-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin: 0 auto 30px auto;
  max-width: 900px;
}

.alphabet-jump-btn {
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.alphabet-jump-btn:hover:not(.disabled) {
  border-color: var(--accent-secondary);
  color: var(--accent-secondary);
  transform: translateY(-1px);
}

.alphabet-jump-btn.active {
  background: var(--accent-secondary);
  color: #080b12;
  border-color: var(--accent-secondary);
  font-weight: 700;
}

.alphabet-jump-btn.disabled {
  opacity: 0.25;
  cursor: not-allowed;
  pointer-events: none;
}

.lexicon-stats-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding: 0 4px;
  flex-wrap: wrap;
  gap: 12px;
}

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

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

.lexicon-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
  position: relative;
}

.lexicon-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
  border-color: var(--border-accent);
}

.lexicon-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.lexicon-term-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.lexicon-term-badge {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.lexicon-term-full {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.35;
}

.lexicon-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lexicon-anchor-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 5px 8px;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.lexicon-anchor-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--accent-secondary);
  border-color: var(--accent-secondary);
}

/* Callout Boxes */
.lexicon-layman-box {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.08) 0%, rgba(245, 158, 11, 0.02) 100%);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-left: 4px solid #f59e0b;
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 14px;
}

.lexicon-technical-box {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.06) 0%, rgba(6, 182, 212, 0.01) 100%);
  border: 1px solid rgba(6, 182, 212, 0.2);
  border-left: 4px solid var(--accent-secondary);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 14px;
}

.lexicon-field-impact {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.06) 0%, rgba(16, 185, 129, 0.01) 100%);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-left: 4px solid #10b981;
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 14px;
}

.lexicon-box-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-family: var(--font-mono);
  color: var(--text-primary);
  margin-bottom: 6px;
}

.lexicon-layman-text,
.lexicon-tech-text,
.lexicon-impact-text {
  font-size: 0.88rem;
  line-height: 1.6;
  margin: 0;
  color: var(--text-secondary);
}

.lexicon-layman-text {
  color: #fef08a; /* Soft amber/yellow readable text in dark mode */
}

[data-theme="light"] .lexicon-layman-text {
  color: #854d0e;
}

.lexicon-tags-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.lexicon-mini-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.03);
  padding: 2px 6px;
  border-radius: 4px;
}

.lexicon-card-highlight {
  outline: 2px solid var(--accent-secondary);
  box-shadow: 0 0 35px var(--cyan-glow);
  transform: translateY(-6px);
  transition: all 0.3s ease;
}

/* ==========================================================================
   Comprehensive Light Theme Contrast & Legibility Overrides
   Ensures rich, dark, readable typography while retaining technical aesthetics
   ========================================================================== */

[data-theme="light"] body {
  color: var(--text-primary);
  background-color: var(--bg-primary);
}

[data-theme="light"] h1,
[data-theme="light"] h2,
[data-theme="light"] h3,
[data-theme="light"] h4,
[data-theme="light"] h5,
[data-theme="light"] h6 {
  color: #020617;
}

[data-theme="light"] p {
  color: #1e293b;
}

[data-theme="light"] .body-sm {
  color: #334155;
}

[data-theme="light"] .mono-label {
  color: #334155;
  font-weight: 600;
}

/* Header & Navigation in Light Mode */
[data-theme="light"] .site-header {
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(15, 23, 42, 0.1);
}

[data-theme="light"] .brand-link {
  color: #020617;
}

[data-theme="light"] .brand-badge {
  background: #ffffff;
  border-color: #0e7490;
  color: #0e7490;
  box-shadow: 0 2px 6px rgba(14, 116, 144, 0.15);
}

[data-theme="light"] .brand-name {
  color: #020617;
}

[data-theme="light"] .brand-sub {
  color: #475569;
}

[data-theme="light"] .nav-link {
  color: #334155;
}

[data-theme="light"] .nav-link:hover {
  color: #020617;
  background: #f1f5f9;
}

[data-theme="light"] .nav-link.active {
  color: #0e7490;
  background: rgba(14, 116, 144, 0.08);
  font-weight: 600;
}

[data-theme="light"] .mobile-nav-drawer {
  background: #ffffff;
  border-left: 1px solid rgba(15, 23, 42, 0.12);
}

[data-theme="light"] .mobile-nav-link {
  color: #1e293b;
}

[data-theme="light"] .mobile-nav-link:hover {
  color: #020617;
  background: #f1f5f9;
}

[data-theme="light"] .mobile-nav-link.active {
  color: #0e7490;
  background: rgba(14, 116, 144, 0.08);
}

/* Badges, Tags & Status Pills */
[data-theme="light"] .section-badge {
  background: #ffffff;
  border-color: rgba(14, 116, 144, 0.35);
  color: #0e7490;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(14, 116, 144, 0.08);
}

[data-theme="light"] .tag {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #1e293b;
  font-weight: 600;
}

[data-theme="light"] .status-pill {
  background: rgba(5, 150, 105, 0.08);
  border-color: rgba(5, 150, 105, 0.3);
  color: #047857 !important;
  font-weight: 700;
}

[data-theme="light"] .status-dot {
  background: #059669;
}

/* Cards & Containers in Light Mode */
[data-theme="light"] .card {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
}

[data-theme="light"] .card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.1);
}

[data-theme="light"] .card h2,
[data-theme="light"] .card h3 {
  color: #020617;
}

[data-theme="light"] .card p {
  color: #334155;
}

/* Category Banners in blog.html */
[data-theme="light"] .category-header-banner {
  background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%) !important;
  border-color: #cbd5e1 !important;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.06) !important;
}

[data-theme="light"] .category-header-banner h2 {
  color: #020617 !important;
}

[data-theme="light"] .category-header-banner p {
  color: #334155 !important;
}

[data-theme="light"] .category-filter-btn {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #1e293b;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .category-filter-btn.active {
  background: #020617 !important;
  color: #ffffff !important;
  border-color: #020617 !important;
}

/* Promotional Callout Banner */
[data-theme="light"] .reveal[style*="linear-gradient(135deg, rgba(6, 182, 212"] {
  background: linear-gradient(135deg, #f0fdf4 0%, #e0f2fe 100%) !important;
  border-color: #bae6fd !important;
  box-shadow: 0 4px 16px rgba(14, 116, 144, 0.08) !important;
}

[data-theme="light"] .reveal[style*="linear-gradient(135deg, rgba(6, 182, 212"] p {
  color: #1e293b !important;
}

/* Buttons in Light Mode */
[data-theme="light"] .btn-primary {
  background: #0e7490;
  color: #ffffff;
  border-color: #0e7490;
}

[data-theme="light"] .btn-primary:hover {
  background: #155e75;
  border-color: #155e75;
  color: #ffffff;
}

[data-theme="light"] .btn-secondary {
  background: #020617;
  color: #ffffff;
  border-color: #020617;
}

[data-theme="light"] .btn-secondary:hover {
  background: #1e293b;
  border-color: #1e293b;
  color: #ffffff;
}

[data-theme="light"] .btn-outline {
  background: #ffffff;
  color: #0e7490;
  border-color: #0e7490;
  font-weight: 600;
}

[data-theme="light"] .btn-outline:hover {
  background: #0e7490;
  color: #ffffff;
}

/* Lexicon Cards & Components in Light Mode */
[data-theme="light"] .lexicon-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
}

[data-theme="light"] .lexicon-term-badge {
  color: #020617;
}

[data-theme="light"] .lexicon-term-full {
  color: #1e293b;
  font-weight: 600;
}

[data-theme="light"] .lexicon-box-title {
  color: #0f172a;
}

[data-theme="light"] .lexicon-layman-box {
  background: #fffbeb !important;
  border: 1px solid rgba(217, 119, 6, 0.28) !important;
  border-left: 4px solid #b45309 !important;
}

[data-theme="light"] .lexicon-layman-text {
  color: #78350f !important;
  font-weight: 500;
  line-height: 1.65;
}

[data-theme="light"] .lexicon-technical-box {
  background: #f8fafc !important;
  border: 1px solid rgba(14, 116, 144, 0.25) !important;
  border-left: 4px solid #0e7490 !important;
}

[data-theme="light"] .lexicon-tech-text {
  color: #0f172a !important;
  line-height: 1.65;
}

[data-theme="light"] .lexicon-field-impact {
  background: #f0fdf4 !important;
  border: 1px solid rgba(5, 150, 105, 0.25) !important;
  border-left: 4px solid #059669 !important;
}

[data-theme="light"] .lexicon-impact-text {
  color: #064e3b !important;
  line-height: 1.65;
}

[data-theme="light"] .lexicon-mini-tag {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #e2e8f0;
  font-weight: 600;
}

[data-theme="light"] .lexicon-card-actions .tag {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
  font-weight: 600;
}

[data-theme="light"] .lexicon-anchor-btn {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  color: #475569;
}

[data-theme="light"] .lexicon-anchor-btn:hover {
  background: #e2e8f0;
  color: #020617;
  border-color: #94a3b8;
}

[data-theme="light"] .lexicon-search-bar {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.05);
}

[data-theme="light"] .lexicon-search-input {
  color: #020617;
}

[data-theme="light"] .lexicon-search-input::placeholder {
  color: #64748b;
}

[data-theme="light"] .lexicon-cat-btn {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #1e293b;
}

[data-theme="light"] .lexicon-cat-btn:hover {
  border-color: #94a3b8;
  color: #020617;
}

[data-theme="light"] .lexicon-cat-btn.active {
  background: rgba(14, 116, 144, 0.1) !important;
  border-color: #0e7490 !important;
  color: #0e7490 !important;
}

[data-theme="light"] .alphabet-jump-btn {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #1e293b;
}

[data-theme="light"] .alphabet-jump-btn:hover:not(.disabled) {
  border-color: #0e7490;
  color: #0e7490;
  background: #f8fafc;
}

[data-theme="light"] .alphabet-jump-btn.active {
  background: #0e7490;
  color: #ffffff;
  border-color: #0e7490;
}

/* Article Reader Modal in Light Mode */
[data-theme="light"] .modal-card {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.15);
}

[data-theme="light"] .modal-header {
  border-bottom: 1px solid #e2e8f0;
}

[data-theme="light"] .modal-footer {
  border-top: 1px solid #e2e8f0;
}

[data-theme="light"] .article-header-meta {
  background: #f8fafc;
  border-color: #e2e8f0;
}

[data-theme="light"] .article-author-pill {
  color: #1e293b;
}

[data-theme="light"] .article-callout {
  background: #f8fafc;
  border-left-color: #0e7490;
  color: #1e293b;
}

[data-theme="light"] .article-callout strong {
  color: #020617;
}

[data-theme="light"] .article-prose h2,
[data-theme="light"] .article-prose h3,
[data-theme="light"] .article-prose h4 {
  color: #020617;
  border-bottom-color: #e2e8f0;
}

[data-theme="light"] .article-prose p,
[data-theme="light"] .article-prose li {
  color: #1e293b;
}

[data-theme="light"] .article-prose code:not(pre code) {
  background: #f1f5f9;
  color: #0e7490;
  border: 1px solid #e2e8f0;
  font-weight: 600;
}

/* Modal text overrides for inline pastel colors (without breaking dark terminals) */
[data-theme="light"] .modal-body span[style*="color: #cbd5e1"],
[data-theme="light"] .modal-body span[style*="color: #94a3b8"],
[data-theme="light"] .modal-body span[style*="color: #f8fafc"],
[data-theme="light"] .modal-body p[style*="color: #cbd5e1"],
[data-theme="light"] .modal-body p[style*="color: #94a3b8"] {
  color: #1e293b !important;
}

[data-theme="light"] .modal-body span[style*="color: #38bdf8"],
[data-theme="light"] .modal-body strong[style*="color: #38bdf8"] {
  color: #0369a1 !important;
}

[data-theme="light"] .modal-body span[style*="color: #34d399"],
[data-theme="light"] .modal-body strong[style*="color: #34d399"],
[data-theme="light"] .modal-body span[style*="color: #a7f3d0"] {
  color: #047857 !important;
}

[data-theme="light"] .modal-body span[style*="color: #c084fc"] {
  color: #6d28d9 !important;
}

[data-theme="light"] .modal-body span[style*="color: #fbbf24"] {
  color: #b45309 !important;
}

[data-theme="light"] .modal-body span[style*="color: #f87171"] {
  color: #b91c1c !important;
}

/* Tables in Light Mode */
[data-theme="light"] table {
  border-color: #cbd5e1;
}

[data-theme="light"] th {
  background: #f1f5f9 !important;
  color: #020617 !important;
  border-color: #cbd5e1 !important;
  font-weight: 700;
}

[data-theme="light"] td {
  color: #1e293b !important;
  border-color: #e2e8f0 !important;
}

[data-theme="light"] tr:nth-child(even) td {
  background: #f8fafc;
}

/* Technical Strip & Skills Strip in Light Mode */
[data-theme="light"] .tech-strip {
  background: #f8fafc;
  border-color: #e2e8f0;
}

[data-theme="light"] .tech-tag-item {
  color: #334155;
  font-weight: 600;
}

/* Footer in Light Mode */
[data-theme="light"] .site-footer {
  background: #f1f5f9;
  border-top-color: #e2e8f0;
}

[data-theme="light"] .footer-brand h3 {
  color: #020617;
}

[data-theme="light"] .footer-brand p {
  color: #334155;
}

[data-theme="light"] .footer-col h4 {
  color: #0e7490;
  font-weight: 700;
}

[data-theme="light"] .footer-link {
  color: #475569;
}

[data-theme="light"] .footer-link:hover {
  color: #020617;
}

[data-theme="light"] .footer-bottom {
  border-top-color: #e2e8f0;
  color: #475569;
}

[data-theme="light"] .back-to-top {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #0e7490;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.1);
}

[data-theme="light"] .back-to-top:hover {
  background: #0e7490;
  color: #ffffff;
}
