/* -------------------------------------------------------------
   Shiheb Amri Portfolio — Design System Tokens & Styles
   Aesthetic: Ultra-refined Minimal Dark / Systems Security
   ------------------------------------------------------------- */

:root {
  /* Color Palette Base */
  --bg-main: #08090d;
  --bg-surface-1: #0d1117;
  --bg-surface-2: #161b22;
  --bg-card: rgba(14, 18, 26, 0.75);
  --bg-card-hover: rgba(20, 27, 38, 0.9);
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-accent: rgba(0, 229, 255, 0.25);
  --border-green: rgba(16, 185, 129, 0.3);

  --text-main: #f0f6fc;
  --text-muted: #8b949e;
  --text-dim: #545d68;

  /* Theme Dynamic Accent (Default Cyan) */
  --accent-cyan: #00e5ff;
  --accent-primary: #00e5ff;
  --accent-glow: rgba(0, 229, 255, 0.25);

  --accent-green: #10b981;
  --accent-purple: #8b5cf6;
  --accent-orange: #f59e0b;
  --accent-red: #ef4444;

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Elevation & Glows */
  --glow-cyan: 0 0 35px rgba(0, 229, 255, 0.15);
  --glow-green: 0 0 35px rgba(16, 185, 129, 0.15);
  --glow-card: 0 8px 32px rgba(0, 0, 0, 0.4);

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Theme Variant Presets */
html[data-accent="emerald"] {
  --accent-primary: #10b981;
  --accent-cyan: #10b981;
  --accent-glow: rgba(16, 185, 129, 0.25);
  --border-accent: rgba(16, 185, 129, 0.3);
}

html[data-accent="violet"] {
  --accent-primary: #a855f7;
  --accent-cyan: #a855f7;
  --accent-glow: rgba(168, 85, 247, 0.25);
  --border-accent: rgba(168, 85, 247, 0.3);
}

html[data-accent="amber"] {
  --accent-primary: #f59e0b;
  --accent-cyan: #f59e0b;
  --accent-glow: rgba(245, 158, 11, 0.25);
  --border-accent: rgba(245, 158, 11, 0.3);
}

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

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.6;
  font-size: 15px;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Ambient Canvas Background */
#ambient-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
  opacity: 0.4;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
  background: #21262d;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #30363d;
}

/* -------------------------------------------------------------
   Header / Telemetry Bar
   ------------------------------------------------------------- */
.telemetry-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8, 9, 13, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 10px 0;
}

.telemetry-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 12px;
}

.telemetry-left {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
}

.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-green);
  font-weight: 600;
  letter-spacing: 0.5px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-green);
  box-shadow: 0 0 10px var(--accent-green);
  animation: pulse-glow 2s infinite;
}

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

.telemetry-divider {
  color: var(--text-dim);
}

.telemetry-btn {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: var(--transition-fast);
}

.telemetry-btn:hover {
  color: var(--text-main);
  border-color: var(--text-muted);
}

.telemetry-btn.active {
  color: var(--accent-primary);
  border-color: var(--accent-primary);
  background: rgba(0, 229, 255, 0.08);
}

.telemetry-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Theme Picker */
.theme-picker {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.03);
  padding: 3px 6px;
  border-radius: 20px;
  border: 1px solid var(--border-subtle);
}

.theme-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
  transition: transform 150ms ease;
}

.theme-dot:hover {
  transform: scale(1.2);
}

.theme-dot.active {
  border-color: #fff;
  transform: scale(1.15);
}

.dot-cyan { background: #00e5ff; }
.dot-emerald { background: #10b981; }
.dot-violet { background: #a855f7; }
.dot-amber { background: #f59e0b; }

.terminal-trigger-btn {
  background: rgba(0, 229, 255, 0.08);
  border: 1px solid rgba(0, 229, 255, 0.25);
  color: var(--accent-primary);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition-fast);
}

.terminal-trigger-btn:hover {
  background: rgba(0, 229, 255, 0.18);
  box-shadow: 0 0 12px var(--accent-glow);
}

.kbd-badge {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-muted);
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 3px;
}

.telemetry-link {
  color: var(--text-muted);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-fast);
}

.telemetry-link:hover {
  color: var(--text-main);
}

/* -------------------------------------------------------------
   Page Layout
   ------------------------------------------------------------- */
.page-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.section-container {
  margin-top: 100px;
}

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

.section-pretitle {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent-primary);
  letter-spacing: 1.5px;
  margin-bottom: 8px;
  text-transform: uppercase;
  font-weight: 600;
}

.section-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.5px;
  line-height: 1.25;
}

.section-desc {
  color: var(--text-muted);
  font-size: 15px;
  margin-top: 6px;
  max-width: 680px;
}

/* -------------------------------------------------------------
   Hero Section & Live Daemon Console
   ------------------------------------------------------------- */
.hero-section {
  padding-top: 24px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: var(--accent-green);
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 32px;
  font-weight: 500;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 8px var(--accent-green);
}

.hero-content {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 40px;
  align-items: start;
}

.hero-header-row {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}

.hero-avatar-wrapper {
  position: relative;
  width: 80px;
  height: 80px;
  flex-shrink: 0;
}

.hero-avatar {
  width: 100%;
  height: 100%;
  border-radius: 16px;
  object-fit: cover;
  border: 2px solid var(--border-subtle);
  background: var(--bg-surface-2);
}

.avatar-verified-badge {
  position: absolute;
  bottom: -4px;
  right: -4px;
  background: var(--accent-primary);
  color: var(--bg-main);
  font-size: 11px;
  font-weight: 800;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-main);
}

.hero-name {
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -1px;
  color: var(--text-main);
  line-height: 1.1;
}

.hero-role-tag {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--accent-primary);
  font-weight: 600;
  margin-top: 4px;
}

.hero-bio {
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 32px;
}

.hero-bio strong {
  color: var(--text-main);
  font-weight: 600;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Daemon Stream Console */
.hero-daemon-console {
  background: #090d14;
  border: 1px solid var(--border-accent);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), var(--accent-glow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  font-family: var(--font-mono);
  font-size: 12px;
}

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

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

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

.daemon-title {
  color: var(--text-dim);
  font-size: 11px;
}

.daemon-live-tag {
  font-size: 9px;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.2);
  color: var(--accent-green);
  border: 1px solid rgba(16, 185, 129, 0.4);
  padding: 1px 6px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.daemon-body {
  padding: 16px;
  height: 230px;
  overflow-y: auto;
  line-height: 1.7;
  background: #06090e;
}

.d-row {
  margin-bottom: 4px;
  word-break: break-all;
}

.d-time { color: var(--text-dim); margin-right: 6px; }
.d-tag-sys { color: var(--accent-primary); font-weight: 600; margin-right: 6px; }
.d-tag-sec { color: var(--accent-green); font-weight: 600; margin-right: 6px; }
.d-tag-app { color: var(--accent-purple); font-weight: 600; margin-right: 6px; }
.d-tag-dns { color: var(--accent-orange); font-weight: 600; margin-right: 6px; }
.d-tag-honeypot { color: #f43f5e; font-weight: 600; margin-right: 6px; }
.d-msg { color: var(--text-main); }

.daemon-footer {
  background: #0d121b;
  border-top: 1px solid var(--border-subtle);
  padding: 8px 16px;
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition-fast);
  border: none;
}

.btn-primary {
  background: var(--accent-primary);
  color: #06090e;
  box-shadow: 0 0 20px var(--accent-glow);
}

.btn-primary:hover {
  filter: brightness(1.15);
  box-shadow: 0 0 25px var(--accent-glow);
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

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

.btn-ghost:hover {
  color: var(--text-main);
  border-color: var(--text-muted);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

.kbd-inline {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-muted);
  font-size: 10px;
  padding: 1px 4px;
  border-radius: 3px;
  margin-left: 4px;
}

/* -------------------------------------------------------------
   Interactive Security Lab Playground
   ------------------------------------------------------------- */
.lab-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--glow-card);
}

.lab-tabs {
  display: flex;
  background: #0e1420;
  border-bottom: 1px solid var(--border-subtle);
}

.lab-tab {
  flex: 1;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  padding: 14px 20px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: var(--transition-fast);
}

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

.lab-tab.active {
  color: var(--accent-primary);
  border-bottom-color: var(--accent-primary);
  background: rgba(0, 229, 255, 0.05);
}

.lab-content {
  display: none;
  padding: 28px;
}

.lab-content.active {
  display: block;
}

.lab-controls {
  margin-bottom: 20px;
}

.lab-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.lab-input-row {
  display: flex;
  gap: 12px;
}

.lab-input, .lab-select {
  flex: 1;
  background: #070a10;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 14px;
  padding: 10px 14px;
  outline: none;
  transition: var(--transition-fast);
}

.lab-input:focus, .lab-select:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 10px var(--accent-glow);
}

.lab-presets {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

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

.preset-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 5px;
  cursor: pointer;
  transition: var(--transition-fast);
}

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

.lab-output-box {
  background: #06090e;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  overflow: hidden;
  font-family: var(--font-mono);
}

.output-header {
  background: #0f141f;
  border-bottom: 1px solid var(--border-subtle);
  padding: 10px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--text-muted);
}

.output-body {
  padding: 16px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-main);
  white-space: pre-wrap;
  max-height: 220px;
  overflow-y: auto;
}

/* -------------------------------------------------------------
   Spotlight Card Hover Physics
   ------------------------------------------------------------- */
.spotlight-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  overflow: hidden;
  transition: transform var(--transition-smooth), border-color var(--transition-smooth);
}

.spotlight-card::before {
  content: '';
  position: absolute;
  top: var(--spotlight-y, -1000px);
  left: var(--spotlight-x, -1000px);
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 60%);
  transform: translate(-50%, -50%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 300ms ease;
}

.spotlight-card:hover::before {
  opacity: 0.6;
}

.spotlight-card:hover {
  border-color: var(--border-accent);
  box-shadow: var(--glow-card);
  transform: translateY(-3px);
}

/* -------------------------------------------------------------
   Technical Capabilities Grid
   ------------------------------------------------------------- */
.capabilities-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.cap-card {
  padding: 24px;
}

.cap-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.cap-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
}

.cap-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.5;
}

.cap-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 13px;
  color: var(--text-muted);
}

.cap-list li strong {
  color: var(--text-main);
}

/* -------------------------------------------------------------
   Filter Controls
   ------------------------------------------------------------- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.filter-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 7px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.filter-btn:hover {
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.2);
}

.filter-btn.active {
  background: rgba(0, 229, 255, 0.1);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  font-weight: 600;
}

/* -------------------------------------------------------------
   Systems & Projects Grid
   ------------------------------------------------------------- */
.systems-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.system-card {
  padding: 26px;
  display: flex;
  flex-direction: column;
}

.featured-system {
  border-color: var(--border-accent);
  background: linear-gradient(180deg, rgba(14, 24, 38, 0.8) 0%, rgba(14, 18, 26, 0.75) 100%);
}

.system-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.system-meta {
  display: flex;
  gap: 6px;
}

.system-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}

.star-badge {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.3);
  color: var(--accent-orange);
}

.sec-badge {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.3);
  color: var(--accent-green);
}

.card-icon-link {
  color: var(--text-muted);
  transition: var(--transition-fast);
}

.card-icon-link:hover {
  color: var(--text-main);
}

.system-title {
  font-size: 20px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-main);
  margin-bottom: 6px;
}

.system-tagline {
  font-size: 13px;
  font-weight: 500;
  color: var(--accent-primary);
  margin-bottom: 12px;
}

.system-summary {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 18px;
  flex-grow: 1;
}

.system-specs {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 16px;
  font-size: 12px;
  font-family: var(--font-mono);
}

.spec-item {
  display: flex;
  gap: 8px;
  margin-bottom: 4px;
}

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

.spec-k {
  color: var(--text-dim);
  font-weight: 600;
}

.spec-v {
  color: var(--text-main);
}

.system-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}

.tech-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

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

.spec-trigger-btn {
  background: transparent;
  border: none;
  color: var(--accent-primary);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.spec-trigger-btn:hover {
  filter: brightness(1.2);
  text-decoration: underline;
}

.system-ext-link {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition-fast);
}

.system-ext-link:hover {
  color: var(--text-main);
}

/* -------------------------------------------------------------
   Engineering Principles
   ------------------------------------------------------------- */
.principles-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.principle-item {
  padding: 24px;
}

.principle-num {
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 800;
  color: var(--accent-green);
  line-height: 1;
  margin-bottom: 12px;
}

.principle-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
}

.principle-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* -------------------------------------------------------------
   Contact Section
   ------------------------------------------------------------- */
.contact-card {
  background: linear-gradient(180deg, rgba(16, 22, 32, 0.9) 0%, rgba(10, 13, 20, 0.95) 100%);
  border: 1px solid var(--border-accent);
  border-radius: 16px;
  padding: 40px;
  box-shadow: var(--accent-glow);
}

.contact-header {
  margin-bottom: 32px;
}

.contact-title {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-main);
  margin-top: 10px;
  margin-bottom: 8px;
}

.contact-desc {
  color: var(--text-muted);
  font-size: 15px;
  max-width: 600px;
}

.contact-channels {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
}

.channel-box {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 22px;
}

.channel-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-primary);
  margin-bottom: 8px;
  letter-spacing: 1px;
}

.channel-val {
  font-family: var(--font-mono);
  font-size: 16px;
  color: var(--text-main);
  font-weight: 600;
  margin-bottom: 16px;
  word-break: break-all;
}

.channel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

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

.link-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-main);
  text-decoration: none;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  transition: var(--transition-fast);
}

.link-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

/* -------------------------------------------------------------
   Interactive Terminal Drawer / Modal
   ------------------------------------------------------------- */
.terminal-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
}

.terminal-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.terminal-container {
  width: 100%;
  max-width: 840px;
  height: 540px;
  background: #0b0f16;
  border: 1px solid var(--border-accent);
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.85), var(--accent-glow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: var(--font-mono);
}

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

.terminal-controls {
  display: flex;
  gap: 8px;
}

.ctrl-btn {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
  cursor: pointer;
}

.close-btn { background: #ff5f56; }
.minimize-btn { background: #ffbd2e; }
.maximize-btn { background: #27c93f; }

.terminal-title {
  font-size: 12px;
  color: var(--text-muted);
}

.terminal-actions {
  display: flex;
  gap: 10px;
}

.terminal-btn-clear, .terminal-btn-close {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  cursor: pointer;
}

.terminal-btn-clear:hover, .terminal-btn-close:hover {
  color: var(--text-main);
  border-color: var(--text-muted);
}

.terminal-body {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-main);
}

.term-line {
  margin-bottom: 6px;
  word-break: break-word;
}

.term-cyan { color: var(--accent-primary); }
.term-green { color: var(--accent-green); }
.term-yellow { color: var(--accent-orange); }
.term-red { color: var(--accent-red); }
.term-muted { color: var(--text-muted); }
.term-dim { color: var(--text-dim); }

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

.term-prompt {
  color: var(--accent-green);
  font-weight: 600;
  font-size: 13px;
  flex-shrink: 0;
}

.terminal-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 13px;
}

/* -------------------------------------------------------------
   Architecture Spec & PGP Modals
   ------------------------------------------------------------- */
.spec-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
}

.spec-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.spec-modal-dialog {
  width: 100%;
  max-width: 680px;
  background: var(--bg-surface-1);
  border: 1px solid var(--border-accent);
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), var(--accent-glow);
  overflow: hidden;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}

.spec-modal-header {
  padding: 20px 24px;
  background: #111722;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.spec-modal-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent-primary);
  font-weight: 700;
}

.spec-modal-title {
  font-size: 20px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-main);
  margin-top: 4px;
}

.spec-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
}

.spec-close-btn:hover {
  color: var(--text-main);
}

.spec-modal-body {
  padding: 24px;
  overflow-y: auto;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-muted);
}

.spec-section {
  margin-bottom: 20px;
}

.spec-section:last-child {
  margin-bottom: 0;
}

.spec-section-title {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-green);
  margin-bottom: 6px;
  text-transform: uppercase;
}

.spec-modal-footer {
  padding: 16px 24px;
  background: #0d121b;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pgp-block {
  background: #06090e;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.5;
  color: var(--accent-green);
  user-select: all;
  white-space: pre-wrap;
}

/* -------------------------------------------------------------
   Toast Feedback
   ------------------------------------------------------------- */
.toast-notification {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 2000;
  background: #0e1724;
  border: 1px solid var(--accent-primary);
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 10px 18px;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 15px var(--accent-glow);
  display: flex;
  align-items: center;
  gap: 10px;
  transform: translateY(100px);
  opacity: 0;
  pointer-events: none;
  transition: all 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.toast-notification.show {
  transform: translateY(0);
  opacity: 1;
}

.toast-icon {
  color: var(--accent-primary);
  font-weight: bold;
}

/* -------------------------------------------------------------
   Footer
   ------------------------------------------------------------- */
.page-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 32px 0;
  background: var(--bg-main);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--text-dim);
}

.footer-brand {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-muted);
  margin-right: 12px;
}

.footer-right {
  display: flex;
  align-items: center;
  gap: 18px;
}

.pgp-tag {
  font-family: var(--font-mono);
  font-size: 11px;
}

.back-to-top {
  color: var(--text-muted);
  text-decoration: none;
  font-family: var(--font-mono);
}

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

/* -------------------------------------------------------------
   Responsive Breakpoints & Mobile Optimization
   ------------------------------------------------------------- */
@media (max-width: 1024px) {
  .hero-content {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .capabilities-grid {
    grid-template-columns: 1fr;
  }
  .principles-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  html, body {
    overflow-x: hidden;
  }

  .page-container {
    padding: 24px 16px 60px;
  }

  .section-container {
    margin-top: 64px;
  }

  /* Telemetry Bar */
  .telemetry-bar {
    padding: 8px 0;
  }

  .telemetry-inner {
    padding: 0 14px;
    font-size: 11px;
  }

  .telemetry-stat,
  .telemetry-divider {
    display: none;
  }

  .telemetry-link span,
  .terminal-trigger-btn .kbd-badge,
  .terminal-trigger-btn .terminal-label {
    display: none;
  }

  .terminal-trigger-btn {
    padding: 6px 10px;
  }

  .terminal-trigger-btn .terminal-icon {
    font-size: 13px;
  }

  /* Hero Section */
  .hero-name {
    font-size: 32px;
  }

  .hero-badge {
    font-size: 11px;
    padding: 5px 12px;
    line-height: 1.4;
  }

  .daemon-body {
    height: 190px;
    font-size: 11px;
  }

  .daemon-title {
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* Lab Simulator */
  .lab-input-row {
    flex-direction: column;
    gap: 10px;
  }

  .lab-input,
  .lab-select {
    width: 100%;
    font-size: 16px; /* Prevents auto-zoom in iOS Safari */
  }

  #dns-sim-btn,
  #honeypot-sim-btn {
    width: 100%;
    justify-content: center;
    min-height: 44px;
  }

  .lab-tabs {
    flex-direction: column;
  }

  .lab-tab {
    border-bottom: none;
    border-left: 2px solid transparent;
    padding: 12px 16px;
    text-align: left;
    justify-content: flex-start;
  }

  .lab-tab.active {
    border-left-color: var(--accent-primary);
    background: rgba(0, 229, 255, 0.05);
  }

  /* Grids */
  .systems-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .system-card {
    padding: 20px;
  }

  .principles-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .contact-channels {
    grid-template-columns: 1fr;
  }

  /* Modals on Mobile */
  .terminal-modal {
    padding: 0;
    align-items: flex-end;
  }

  .terminal-container {
    width: 100%;
    max-width: 100%;
    height: 85vh;
    height: 85dvh;
    border-radius: 16px 16px 0 0;
  }

  .terminal-input {
    font-size: 16px; /* Prevents auto-zoom in iOS Safari */
  }

  .spec-modal {
    padding: 10px;
    align-items: flex-end;
  }

  .spec-modal-dialog {
    width: 100%;
    max-height: 90vh;
    max-height: 90dvh;
    border-radius: 14px 14px 0 0;
  }

  .spec-modal-header {
    padding: 16px;
  }

  .spec-modal-body {
    padding: 16px;
    font-size: 13px;
  }

  .spec-modal-footer {
    padding: 12px 16px;
    flex-direction: column-reverse;
    gap: 10px;
  }

  .spec-modal-footer .btn {
    width: 100%;
    justify-content: center;
    min-height: 44px;
  }

  /* Footer */
  .footer-inner {
    flex-direction: column;
    gap: 14px;
    text-align: center;
  }

  .footer-nav {
    gap: 10px;
  }

  .toast-notification {
    bottom: 16px;
    right: 16px;
    left: 16px;
    text-align: center;
    justify-content: center;
  }
}

/* Small Smartphone Devices (<= 480px) */
@media (max-width: 480px) {
  .hero-header-row {
    gap: 14px;
  }

  .hero-avatar-wrapper {
    width: 64px;
    height: 64px;
  }

  .hero-name {
    font-size: 26px;
  }

  .hero-role-tag {
    font-size: 12px;
  }

  .hero-aliases {
    font-size: 11px;
    line-height: 1.4;
  }

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

  .hero-actions .btn {
    width: 100%;
    justify-content: center;
    min-height: 44px;
  }

  .filter-bar {
    gap: 6px;
  }

  .filter-btn {
    font-size: 11px;
    padding: 6px 12px;
    flex: 1 1 auto;
    text-align: center;
  }

  .system-footer {
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
    text-align: center;
  }

  .system-footer .spec-trigger-btn,
  .system-footer .system-ext-link {
    text-align: center;
    padding: 6px 0;
  }

  .channel-actions {
    flex-direction: column;
  }

  .channel-actions .btn {
    width: 100%;
    justify-content: center;
    min-height: 44px;
  }

  .section-title {
    font-size: 22px;
  }
}
