/* ==========================================================================
   ARCHIXROBOTICS // DARK TACTICAL ROBOTICS HUD DESIGN SYSTEM
   Unified stylesheet for index.html (Command Center) & portfolio.html (Docs)
   ========================================================================== */

:root {
  /* Core Surfaces */
  --bg-void: #06090f;
  --bg-panel: #0b111e;
  --bg-card: rgba(15, 23, 42, 0.72);
  --bg-card-solid: #0f172a;
  --bg-elevated: rgba(22, 33, 56, 0.88);
  --bg-input: rgba(9, 14, 26, 0.85);

  /* Tactical Borders */
  --border-subtle: rgba(148, 163, 184, 0.12);
  --border-medium: rgba(148, 163, 184, 0.22);
  --border-hud: rgba(6, 182, 212, 0.35);

  /* Telemetry & Accent Palette */
  --accent-cyan: #06b6d4;
  --accent-cyan-bright: #22d3ee;
  --accent-emerald: #10b981;
  --accent-emerald-bright: #34d399;
  --accent-indigo: #6366f1;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;

  /* Typography */
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  /* Layout Metrics */
  --sidebar-width: 268px;
  --topbar-height: 60px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  /* Fonts */
  --font-main: "Outfit", "Inter", system-ui, -apple-system, sans-serif;
  --font-body: "Inter", "Outfit", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Shadows */
  --shadow-card: 0 12px 32px -8px rgba(0, 0, 0, 0.55);
  --shadow-glow-cyan: 0 0 24px rgba(6, 182, 212, 0.18);
  --shadow-glow-emerald: 0 0 20px rgba(16, 185, 129, 0.16);
}

/* Clean Industrial Light Theme */
html[data-theme="light"] {
  --bg-void: #f4f7fb;
  --bg-panel: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.9);
  --bg-card-solid: #ffffff;
  --bg-elevated: rgba(241, 245, 249, 0.95);
  --bg-input: #ffffff;
  --border-subtle: rgba(15, 23, 42, 0.08);
  --border-medium: rgba(15, 23, 42, 0.16);
  --border-hud: rgba(2, 132, 199, 0.35);
  --accent-cyan: #0284c7;
  --accent-cyan-bright: #0284c7;
  --accent-emerald: #059669;
  --accent-emerald-bright: #059669;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --shadow-card: 0 10px 28px -8px rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] body::before {
  background-image:
    radial-gradient(circle at 18% 15%, rgba(2, 132, 199, 0.07) 0%, transparent 45%),
    radial-gradient(circle at 82% 80%, rgba(5, 150, 105, 0.05) 0%, transparent 45%),
    linear-gradient(rgba(15, 23, 42, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.04) 1px, transparent 1px);
}

html[data-theme="light"] .command-sidebar {
  background: rgba(255, 255, 255, 0.94);
}

html[data-theme="light"] .top-command-bar {
  background: rgba(244, 247, 251, 0.88);
}

html[data-theme="light"] .gradient-text,
html[data-theme="light"] .brand-name,
html[data-theme="light"] .topbar-breadcrumb .crumb-root {
  background: linear-gradient(135deg, #0f172a 0%, #0284c7 60%, #059669 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

html[data-theme="light"] .sidebar-link:hover {
  background: rgba(2, 132, 199, 0.08);
}

html[data-theme="light"] .btn-secondary,
html[data-theme="light"] .glass-btn,
html[data-theme="light"] .hud-clock-pill,
html[data-theme="light"] .quick-pill,
html[data-theme="light"] .hud-metric-pill,
html[data-theme="light"] .channel-btn,
html[data-theme="light"] .role-skills span,
html[data-theme="light"] .tech-badge,
html[data-theme="light"] .social-icon,
html[data-theme="light"] .footer-social-icon,
html[data-theme="light"] .cookie-btn-secondary,
html[data-theme="light"] .back-to-top-btn,
html[data-theme="light"] .telemetry-chip {
  background: #ffffff;
}

html[data-theme="light"] .btn-secondary:hover,
html[data-theme="light"] .glass-btn:hover,
html[data-theme="light"] .channel-btn:hover,
html[data-theme="light"] .cookie-btn-secondary:hover,
html[data-theme="light"] .back-to-top-btn:hover,
html[data-theme="light"] .mobile-menu-btn:hover {
  background: #f1f5f9;
}

html[data-theme="light"] .channel-btn.active {
  background: rgba(2, 132, 199, 0.12);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

html[data-theme="light"] .policy-close {
  background: #f1f5f9;
  color: var(--text-primary);
  border-color: var(--border-medium);
}

html[data-theme="light"] .policy-close:hover {
  background: #e2e8f0;
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

html[data-theme="light"] .hud-slider {
  background: #cbd5e1;
}

html[data-theme="light"] .footer {
  background: rgba(255, 255, 255, 0.92);
}

html[data-theme="light"] .policy-panel,
html[data-theme="light"] .cookie-banner,
html[data-theme="light"] .coming-soon-popup {
  background: rgba(255, 255, 255, 0.98);
}

html[data-theme="light"] .cookie-pref-item,
html[data-theme="light"] .showcase-spec-box,
html[data-theme="light"] .status-alert-card,
html[data-theme="light"] .select-options-menu,
html[data-theme="light"] .sidebar-telemetry-strip,
html[data-theme="light"] .widget-header,
html[data-theme="light"] .research-banner,
html[data-theme="light"] .table-card-header,
html[data-theme="light"] .hud-table th,
html[data-theme="light"] .spec-card-header,
html[data-theme="light"] .spec-table th,
html[data-theme="light"] .showcase-logo,
html[data-theme="light"] .stat-pill {
  background: #f8fafc;
}

html[data-theme="light"] .research-icon-wrapper.rd {
  color: #4f46e5;
}

html[data-theme="light"] .hud-terminal-log,
html[data-theme="light"] .code-block,
html[data-theme="light"] .chart-container,
html[data-theme="light"] .video-placeholder {
  background: #0f172a;
  color: #f1f5f9;
}

html[data-theme="light"] .hud-terminal-log .terminal-log-header,
html[data-theme="light"] .video-placeholder .stat-pill {
  background: rgba(15, 23, 42, 0.85);
  color: #e2e8f0;
}

html[data-theme="light"] .medal-icon.silver {
  background: rgba(100, 116, 139, 0.14);
  color: #475569;
  border-color: rgba(71, 85, 105, 0.35);
}

html[data-theme="light"] .medal-icon.gold {
  color: #d97706;
}

html[data-theme="light"] .medal-icon.bronze {
  color: #c2410c;
}

html[data-theme="light"] .carousel-btn,
html[data-theme="light"] .showcase-banner-zoom,
html[data-theme="light"] .lightbox-close {
  background: rgba(255, 255, 255, 0.92);
  color: #0f172a;
  border-color: rgba(15, 23, 42, 0.18);
}

html[data-theme="light"] .carousel-btn:hover,
html[data-theme="light"] .showcase-banner-zoom:hover,
html[data-theme="light"] .lightbox-close:hover {
  background: var(--accent-cyan);
  color: #ffffff;
  border-color: var(--accent-cyan);
}

html[data-theme="light"] .carousel-counter {
  background: rgba(255, 255, 255, 0.92);
  color: #0284c7;
  border-color: rgba(15, 23, 42, 0.14);
}

html[data-theme="light"] .btn-primary,
html[data-theme="light"] .cookie-btn-primary {
  background: linear-gradient(135deg, #0284c7, #0ea5e9);
  color: #ffffff;
}

html[data-theme="light"] .btn-primary:hover {
  background: linear-gradient(135deg, #0369a1, #0284c7);
  color: #ffffff;
}

html[data-theme="light"] .team-role-pill.member,
html[data-theme="light"] .bio-spec-pill.purple {
  color: #4f46e5;
}

html.lightbox-open,
body.lightbox-open,
html.policy-open,
body.policy-open {
  overflow: hidden !important;
}

/* ==========================================================================
   BASE & RESET
   ========================================================================== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--topbar-height) + 24px);
  background-color: var(--bg-void);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  overflow-x: hidden;
}

body {
  background-color: var(--bg-void);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: clip;
  position: relative;
  user-select: none;
  -webkit-user-select: none;
}

input,
textarea,
select,
pre,
code {
  user-select: text;
  -webkit-user-select: text;
}

/* Tactical 40px Coordinate Grid + Ambient Glow */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(circle at 18% 15%, rgba(6, 182, 212, 0.09) 0%, transparent 45%),
    radial-gradient(circle at 82% 80%, rgba(16, 185, 129, 0.06) 0%, transparent 45%),
    linear-gradient(rgba(148, 163, 184, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.04) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 40px 40px, 40px 40px;
  pointer-events: none;
  z-index: 0;
}

#bg-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  opacity: 0.65;
}

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

::-webkit-scrollbar-track {
  background: var(--bg-void);
  margin-block: 10px;
}

::-webkit-scrollbar-thumb {
  background: rgba(6, 182, 212, 0.35);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(34, 211, 238, 0.65);
  border: 2px solid transparent;
  background-clip: content-box;
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-main);
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

a {
  color: inherit;
  text-decoration: none;
}

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

/* ==========================================================================
   APP SHELL: COMMAND SIDEBAR + TOP BAR + MAIN WORKSPACE
   ========================================================================== */
.app-shell {
  display: flex;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* Persistent Left Command Sidebar */
.command-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sidebar-width);
  background: rgba(9, 13, 23, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.sidebar-header {
  padding: 18px 18px 14px;
  border-bottom: 1px solid var(--border-subtle);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 11px;
}

.sidebar-logo {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid var(--border-hud);
  padding: 2px;
  background: rgba(6, 182, 212, 0.08);
  object-fit: contain;
}

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

.brand-name {
  font-family: var(--font-main);
  font-weight: 800;
  font-size: 1.08rem;
  letter-spacing: 0.08em;
  background: linear-gradient(135deg, #f8fafc 0%, #22d3ee 55%, #34d399 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--accent-cyan-bright);
  letter-spacing: 0.08em;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Sidebar Mini Telemetry Strip */
.sidebar-telemetry-strip {
  margin: 12px 14px 6px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-subtle);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.strip-metric {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.strip-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.strip-value {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent-emerald-bright);
}

.strip-value.cyan {
  color: var(--accent-cyan-bright);
}

/* Sidebar Navigation */
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-section-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  padding: 10px 10px 4px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 500;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.sidebar-link .link-code {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  min-width: 22px;
}

.sidebar-link i {
  font-size: 0.85rem;
  width: 16px;
  text-align: center;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.sidebar-link:hover {
  background: rgba(30, 41, 59, 0.55);
  color: var(--text-primary);
  border-color: var(--border-subtle);
}

.sidebar-link:hover i {
  color: var(--accent-cyan-bright);
}

.sidebar-link.active {
  background: rgba(6, 182, 212, 0.12);
  color: var(--accent-cyan-bright);
  border-color: var(--border-hud);
  box-shadow: inset 3px 0 0 var(--accent-cyan-bright);
}

.sidebar-link.active .link-code,
.sidebar-link.active i {
  color: var(--accent-cyan-bright);
}

.sidebar-footer {
  padding: 14px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sidebar-cta-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 13px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.16), rgba(99, 102, 241, 0.14));
  border: 1px solid var(--border-hud);
  color: var(--text-primary);
  font-size: 0.84rem;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.sidebar-cta-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-glow-cyan);
}

.sidebar-cta-card span {
  display: flex;
  flex-direction: column;
}

.sidebar-cta-card small {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--accent-cyan-bright);
  font-weight: 500;
}

/* Mobile Sidebar Overlay */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 15, 0.72);
  backdrop-filter: blur(4px);
  z-index: 990;
}

.sidebar-backdrop.active {
  display: block;
}

/* Main Workspace Wrapper & Page Transition Animations */
@keyframes pageEnter {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.workspace-main {
  flex: 1;
  margin-left: var(--sidebar-width);
  padding-top: var(--topbar-height);
  min-width: 0;
  display: flex;
  flex-direction: column;
  transition: margin-left 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.workspace-content,
.workspace-main > .footer {
  animation: pageEnter 0.36s cubic-bezier(0.22, 1, 0.36, 1);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

body.page-leaving .workspace-content,
body.page-leaving .workspace-main > .footer {
  opacity: 0;
  transform: translateY(-8px);
}

/* Desktop Collapsible Sidebar State */
@media (min-width: 1025px) {
  html.sidebar-collapsed .command-sidebar,
  body.sidebar-collapsed .command-sidebar {
    transform: translateX(-100%);
  }
  html.sidebar-collapsed .workspace-main,
  body.sidebar-collapsed .workspace-main {
    margin-left: 0;
  }
  html.sidebar-collapsed .top-command-bar,
  body.sidebar-collapsed .top-command-bar {
    left: 0;
  }
  html.sidebar-collapsed .cookie-banner,
  body.sidebar-collapsed .cookie-banner {
    left: 50%;
    width: min(860px, calc(100vw - 32px));
  }
}

/* Top Command Bar (Fixed on Screen) */
.top-command-bar {
  position: fixed;
  top: 0;
  right: 0;
  left: var(--sidebar-width);
  height: var(--topbar-height);
  background: rgba(6, 9, 15, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  z-index: 950;
  transition: left 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex: 1 1 auto;
}

.mobile-menu-btn {
  display: inline-flex;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-medium);
  background: var(--bg-card);
  color: var(--text-primary);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.mobile-menu-btn:hover {
  border-color: var(--accent-cyan-bright);
  color: var(--accent-cyan-bright);
}

.topbar-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-breadcrumb .crumb-root {
  display: inline-block;
  font-family: var(--font-main);
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-decoration: none;
  cursor: pointer;
  background: linear-gradient(135deg, #f8fafc 0%, #22d3ee 55%, #34d399 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.topbar-breadcrumb .crumb-root:hover {
  opacity: 0.82;
}

.topbar-breadcrumb .crumb-root:active {
  transform: scale(0.97);
}

.topbar-breadcrumb .crumb-root:focus-visible {
  outline: 2px solid var(--accent-cyan);
  outline-offset: 4px;
  border-radius: 4px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.hud-clock-pill {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-secondary);
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 7px;
}

.hud-ping {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-emerald-bright);
  box-shadow: 0 0 8px var(--accent-emerald-bright);
  display: inline-block;
  animation: pulse-ring 2s infinite;
}

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

/* Workspace Content Container */
.workspace-content {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px 32px 64px;
  display: flex;
  flex-direction: column;
  gap: 44px;
}

/* Unique Tactical Section Separator Lines */
.workspace-content > * + * {
  position: relative;
  padding-top: 38px;
}

.workspace-content > * + *::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  pointer-events: none;
}

.workspace-content > *:nth-child(2)::before {
  background: linear-gradient(90deg, var(--accent-cyan-bright), rgba(34, 211, 238, 0.2) 55%, transparent);
}

.workspace-content > *:nth-child(3)::before {
  background: linear-gradient(90deg, transparent, var(--accent-emerald-bright), transparent);
}

.workspace-content > *:nth-child(4)::before {
  background: repeating-linear-gradient(90deg, rgba(34, 211, 238, 0.45) 0 14px, transparent 14px 22px);
}

.workspace-content > *:nth-child(5)::before {
  background: linear-gradient(90deg, transparent, #6366f1 35%, #22d3ee 65%, transparent);
}

.workspace-content > *:nth-child(6)::before {
  height: 4px;
  background: transparent;
  border-top: 1px dashed rgba(245, 158, 11, 0.5);
  border-bottom: 1px solid rgba(34, 211, 238, 0.22);
}

.workspace-content > *:nth-child(7)::before {
  background: repeating-linear-gradient(90deg, rgba(52, 211, 153, 0.55) 0 3px, transparent 3px 10px);
}

.workspace-content > *:nth-child(8)::before {
  background: linear-gradient(90deg, rgba(244, 63, 94, 0.6), rgba(99, 102, 241, 0.45) 55%, transparent);
}

.workspace-content > *:nth-child(9)::before {
  height: 2px;
  background: linear-gradient(90deg, transparent 5%, rgba(34, 211, 238, 0.2) 30%, var(--accent-cyan-bright) 50%, rgba(34, 211, 238, 0.2) 70%, transparent 95%);
}

.workspace-content > *:nth-child(10)::before {
  background: linear-gradient(90deg, transparent, var(--accent-emerald) 40%, var(--accent-amber) 60%, transparent);
}

.workspace-content > *:nth-child(11)::before {
  height: 5px;
  background: transparent;
  border-top: 1px solid rgba(34, 211, 238, 0.4);
  border-bottom: 1px dotted rgba(148, 163, 184, 0.35);
}

/* ==========================================================================
   COMMON HUD COMPONENTS, CARDS, BUTTONS, TYPOGRAPHY
   ========================================================================== */
.gradient-text {
  background: linear-gradient(135deg, #f8fafc 0%, #22d3ee 55%, #34d399 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.glass-card,
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.glass-card:hover {
  border-color: rgba(6, 182, 212, 0.28);
}

/* Tactical Corner Brackets */
.hud-bracket {
  position: relative;
}

.hud-bracket::before,
.hud-bracket::after {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  pointer-events: none;
  z-index: 2;
}

.hud-bracket::before {
  top: -1px;
  left: -1px;
  border-top: 2px solid var(--accent-cyan-bright);
  border-left: 2px solid var(--accent-cyan-bright);
  border-top-left-radius: var(--radius-lg);
}

.hud-bracket::after {
  bottom: -1px;
  right: -1px;
  border-bottom: 2px solid var(--accent-cyan-bright);
  border-right: 2px solid var(--accent-cyan-bright);
  border-bottom-right-radius: var(--radius-lg);
}

/* Section Headers */
.section-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
}

.section-kicker {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-cyan-bright);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.section-header h2 {
  font-size: clamp(1.65rem, 2.6vw, 2.2rem);
  font-weight: 700;
  line-height: 1.15;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 0.96rem;
  max-width: 780px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-family: var(--font-main);
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-sm {
  padding: 7px 13px;
  font-size: 0.8rem;
}

.btn-primary {
  background: linear-gradient(135deg, #0891b2, #06b6d4);
  color: #030712;
  font-weight: 700;
  border-color: rgba(34, 211, 238, 0.5);
  box-shadow: 0 4px 18px rgba(6, 182, 212, 0.28);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #06b6d4, #22d3ee);
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(34, 211, 238, 0.42);
}

.btn-secondary,
.glass-btn {
  background: rgba(15, 23, 42, 0.85);
  color: var(--text-primary);
  border: 1px solid var(--border-medium);
}

.btn-secondary:hover,
.glass-btn:hover {
  background: rgba(30, 41, 59, 0.9);
  border-color: var(--accent-cyan-bright);
  color: var(--accent-cyan-bright);
}

/* ==========================================================================
   HERO BENTO COMMAND DECK (#home)
   ========================================================================== */
.hero-bento {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 18px;
  align-items: stretch;
}

.hero-main-card {
  padding: 34px 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  background:
    radial-gradient(circle at top right, rgba(6, 182, 212, 0.14), transparent 52%),
    var(--bg-card);
}

.hero-hud-tag {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(6, 182, 212, 0.08);
  border: 1px solid var(--border-hud);
  width: fit-content;
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

.hud-tag-title {
  color: var(--accent-cyan-bright);
  font-weight: 600;
}

.hud-tag-code {
  color: var(--accent-emerald-bright);
  padding-left: 8px;
  border-left: 1px solid var(--border-medium);
}

.hero-title {
  font-size: clamp(2rem, 3.6vw, 3.15rem);
  font-weight: 800;
  line-height: 1.1;
  margin-top: 6px;
}

.hero-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 600px;
  line-height: 1.65;
}

.cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Hero Right Telemetry Bento Stack */
.hero-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.hero-stat-card {
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
}

.hero-stat-card.span-2 {
  grid-column: span 2;
}

.stat-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stat-card-top i {
  color: var(--accent-cyan-bright);
  font-size: 0.95rem;
}

.stat-card-value {
  font-family: var(--font-main);
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  color: var(--text-primary);
}

.stat-card-value.emerald {
  color: var(--accent-emerald-bright);
}

.stat-card-value.cyan {
  color: var(--accent-cyan-bright);
}

.stat-card-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.quick-jump-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quick-pill {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.quick-pill:hover {
  border-color: var(--accent-cyan-bright);
  color: var(--accent-cyan-bright);
}

/* ==========================================================================
   ABOUT & TEAM BENTO (#about)
   ========================================================================== */
.mission-toggle-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.about-project-collapsible {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.4s ease, opacity 0.3s ease, margin-bottom 0.3s ease;
}

.about-project-collapsible.open {
  max-height: 1400px;
  opacity: 1;
  margin-bottom: 24px;
}

.mission-card {
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mission-card h3 {
  color: var(--accent-cyan-bright);
  font-size: 1.25rem;
}

.mission-card p {
  color: var(--text-secondary);
  font-size: 0.94rem;
}

.tech-stack-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tech-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  background: rgba(6, 182, 212, 0.08);
  border: 1px solid var(--border-hud);
  color: var(--accent-cyan-bright);
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

/* Team Bento Grid */
.team-bento-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: stretch;
  gap: 16px;
}

.team-member-card {
  margin: 0;
  padding: 22px;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.leader-card {
  background:
    radial-gradient(circle at top right, rgba(6, 182, 212, 0.15), transparent 55%),
    var(--bg-card);
  border-color: var(--border-hud);
}

.team-card-head {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 76px;
}

.leader-avatar-wrapper {
  position: relative;
  flex-shrink: 0;
}

.team-avatar {
  width: 60px;
  height: 60px;
  border-radius: 14px;
  object-fit: cover;
  border: 1px solid var(--border-medium);
}

.leader-avatar {
  width: 68px;
  height: 68px;
  border-color: var(--accent-cyan-bright);
  box-shadow: 0 0 18px rgba(6, 182, 212, 0.25);
}

.leader-crown-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent-amber);
  color: #030712;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  border: 2px solid var(--bg-void);
}

.team-role-pill {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 9px;
  border-radius: 999px;
  display: inline-block;
}

.team-role-pill.leader {
  background: rgba(6, 182, 212, 0.14);
  color: var(--accent-cyan-bright);
  border: 1px solid var(--border-hud);
}

.team-role-pill.member {
  background: rgba(99, 102, 241, 0.14);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.team-role-pill.advisor {
  background: rgba(16, 185, 129, 0.14);
  color: var(--accent-emerald-bright);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.team-member-card h4 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-top: 2px;
}

.team-track,
.team-track-lead {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--accent-cyan-bright);
}

.team-member-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.team-recruits-banner {
  margin-top: 16px;
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.recruits-banner-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.recruits-banner-title {
  font-size: 1rem;
  margin-bottom: 2px;
}

.recruits-banner-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   ACHIEVEMENTS & PHOTO CAROUSELS (#achievements)
   ========================================================================== */
.medals-bento-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(225px, 1fr));
  gap: 14px;
}

.medal-card {
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.medal-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.medal-icon.gold {
  background: rgba(245, 158, 11, 0.14);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.32);
}

.medal-icon.silver {
  background: rgba(148, 163, 184, 0.14);
  color: #e2e8f0;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.medal-icon.bronze {
  background: rgba(217, 119, 6, 0.14);
  color: #fb923c;
  border: 1px solid rgba(217, 119, 6, 0.32);
}

.medal-info h4 {
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.25;
}

.medal-info p {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-secondary);
  margin-top: 3px;
}

/* Photo Gallery Carousels */
.gallery-bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 18px;
}

.gallery-card {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mini-carousel {
  position: relative;
  width: 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: #020617;
  border: 1px solid var(--border-subtle);
}

.carousel-slide {
  display: flex;
  height: 100%;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  flex-shrink: 0;
  object-fit: cover;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(6, 9, 15, 0.78);
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
  transition: all 0.2s ease;
}

.carousel-btn:hover {
  background: var(--accent-cyan);
  color: #030712;
  border-color: var(--accent-cyan-bright);
}

.carousel-btn.prev { left: 8px; }
.carousel-btn.next { right: 8px; }

.carousel-counter {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(6, 9, 15, 0.84);
  border: 1px solid var(--border-subtle);
  color: var(--accent-cyan-bright);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 2px 9px;
  border-radius: 999px;
}

.gallery-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px 2px;
}

.gallery-caption h4 {
  font-size: 0.96rem;
}

.gallery-caption span {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
}

/* ==========================================================================
   FINISHED PROJECTS & TELEMETRY CONSOLE (#finished-projects)
   ========================================================================== */
.telemetry-bento-grid {
  display: grid;
  grid-template-columns: 0.92fr 1.38fr;
  gap: 18px;
  align-items: stretch;
}

.features-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.biometric-card {
  padding: 20px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  flex: 1;
}

.feature-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.bio-icon-pulse {
  background: rgba(244, 63, 94, 0.14);
  color: #fb7185;
  border: 1px solid rgba(244, 63, 94, 0.3);
}

.bio-icon-brain {
  background: rgba(99, 102, 241, 0.14);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.bio-icon-shield {
  background: rgba(16, 185, 129, 0.14);
  color: var(--accent-emerald-bright);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.bio-spec-pill {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(6, 182, 212, 0.12);
  color: var(--accent-cyan-bright);
  border: 1px solid var(--border-hud);
  margin-bottom: 6px;
}

.bio-spec-pill.purple {
  background: rgba(99, 102, 241, 0.14);
  color: #a5b4fc;
  border-color: rgba(99, 102, 241, 0.3);
}

.bio-spec-pill.green {
  background: rgba(16, 185, 129, 0.14);
  color: var(--accent-emerald-bright);
  border-color: rgba(16, 185, 129, 0.3);
}

.feature-text h4 {
  font-size: 1.05rem;
  margin-bottom: 4px;
}

.feature-text p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* Telemetry Console Widget */
.demo-widget {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.widget-header {
  padding: 13px 18px;
  background: rgba(6, 9, 15, 0.72);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.widget-header-left,
.widget-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.status-dot.pulsing {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent-emerald-bright);
  box-shadow: 0 0 10px var(--accent-emerald-bright);
}

.hud-header-title {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-primary);
}

.hud-badge.live {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(244, 63, 94, 0.16);
  color: #fb7185;
  border: 1px solid rgba(244, 63, 94, 0.35);
}

.hud-metric-pill {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.hud-status-ok {
  color: var(--accent-emerald-bright);
  border-color: rgba(16, 185, 129, 0.35);
}

.widget-content {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Vision Viewport */
.video-placeholder {
  position: relative;
  min-height: 215px;
  padding: 28px 12px 64px;
  border-radius: var(--radius-md);
  background:
    radial-gradient(circle at center, rgba(6, 182, 212, 0.14), rgba(3, 7, 18, 0.95));
  border: 1px solid var(--border-hud);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scan-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-cyan-bright), transparent);
  box-shadow: 0 0 12px var(--accent-cyan-bright);
  animation: scan-sweep 3.2s linear infinite;
}

@keyframes scan-sweep {
  0% { top: 0%; }
  100% { top: 100%; }
}

.hud-target-box {
  position: relative;
  width: 112px;
  height: 112px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hud-target-corner {
  position: absolute;
  width: 14px;
  height: 14px;
  border-color: var(--accent-cyan-bright);
  border-style: solid;
}

.hud-target-corner.tl { top: 0; left: 0; border-width: 2px 0 0 2px; }
.hud-target-corner.tr { top: 0; right: 0; border-width: 2px 2px 0 0; }
.hud-target-corner.bl { bottom: 0; left: 0; border-width: 0 0 2px 2px; }
.hud-target-corner.br { bottom: 0; right: 0; border-width: 0 2px 2px 0; }

.avatar-icon {
  font-size: 2.6rem;
  color: rgba(34, 211, 238, 0.72);
}

.hud-target-label {
  position: absolute;
  top: -22px;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  color: var(--accent-cyan-bright);
}

.overlay-stats {
  position: absolute;
  bottom: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}

.stat-pill {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 4px 9px;
  border-radius: 6px;
  background: rgba(6, 9, 15, 0.85);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.stat-pill.status-calm {
  color: var(--accent-emerald-bright);
  border-color: rgba(16, 185, 129, 0.35);
}

/* Channel Toolbar */
.telemetry-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.toolbar-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
}

.channel-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.channel-btn {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 6px 11px;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.channel-btn:hover {
  border-color: var(--accent-cyan-bright);
  color: var(--text-primary);
}

.channel-btn.active {
  background: rgba(6, 182, 212, 0.16);
  border-color: var(--accent-cyan-bright);
  color: var(--accent-cyan-bright);
}

.chart-container {
  height: 170px;
  padding: 10px;
  border-radius: var(--radius-md);
  background: rgba(6, 9, 15, 0.65);
  border: 1px solid var(--border-subtle);
}

/* Terminal Inference Log */
.hud-terminal-log {
  border-radius: var(--radius-md);
  background: #04070d;
  border: 1px solid var(--border-subtle);
  overflow: hidden;
}

.terminal-log-header {
  padding: 7px 12px;
  background: rgba(15, 23, 42, 0.7);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-secondary);
}

.log-indicator {
  color: var(--accent-emerald-bright);
}

.terminal-log-body {
  padding: 10px 12px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  display: flex;
  flex-direction: column;
  gap: 5px;
  overflow: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.terminal-log-body::-webkit-scrollbar {
  display: none;
}

.log-line {
  color: var(--text-secondary);
  line-height: 1.45;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hud-face-mesh {
  display: flex;
  align-items: center;
  justify-content: center;
}

.face-mesh-svg {
  width: 82px;
  height: 82px;
  filter: drop-shadow(0 0 10px rgba(34, 211, 238, 0.28));
}

.face-mesh-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #cbd5e1;
  white-space: nowrap;
  z-index: 2;
}

.face-mesh-meta .meta-sep {
  color: var(--text-muted);
}

.face-mesh-meta strong {
  color: var(--accent-emerald-bright);
}

.senseai-analyzers-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.analyzer-mini-card {
  padding: 11px 14px;
  border-radius: var(--radius-md);
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.analyzer-mini-card.deception {
  border-color: rgba(245, 158, 11, 0.28);
}

.analyzer-mini-card.stress {
  border-color: rgba(168, 85, 247, 0.28);
}

html[data-theme="light"] .analyzer-mini-card {
  background: #f8fafc;
}

.analyzer-mini-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.analyzer-mini-title {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.analyzer-mini-card.deception .analyzer-mini-title i {
  color: #f59e0b;
}

.analyzer-mini-card.stress .analyzer-mini-title i {
  color: #a855f7;
}

.analyzer-mini-badge {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
}

.analyzer-mini-badge.clear,
.analyzer-mini-badge.low {
  background: rgba(16, 185, 129, 0.16);
  color: var(--accent-emerald-bright);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.analyzer-mini-badge.warn {
  background: rgba(245, 158, 11, 0.16);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.analyzer-mini-bar {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.18);
  overflow: hidden;
}

.analyzer-mini-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.4s ease;
}

.analyzer-mini-fill.deception {
  background: linear-gradient(90deg, #10b981, #f59e0b);
}

.analyzer-mini-fill.stress {
  background: linear-gradient(90deg, #38bdf8, #a855f7);
}

.analyzer-mini-meta {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
}

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

.log-time {
  color: var(--text-muted);
  margin-right: 4px;
}

.log-tag {
  font-size: 0.64rem;
  padding: 1px 5px;
  border-radius: 4px;
  margin-right: 6px;
  font-weight: 700;
}

.tag-sys { background: rgba(6, 182, 212, 0.16); color: var(--accent-cyan-bright); }
.tag-ai { background: rgba(99, 102, 241, 0.2); color: #a5b4fc; }
.tag-ok { background: rgba(16, 185, 129, 0.18); color: var(--accent-emerald-bright); }
.tag-info { background: rgba(245, 158, 11, 0.18); color: #fbbf24; }

/* ==========================================================================
   UPCOMING PROJECTS (#upcoming-projects) & R&D (#innovation)
   ========================================================================== */
.upcoming-bento-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.project-showcase-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.showcase-banner {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--border-subtle);
  background: #020617;
  max-height: 220px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
}

.showcase-banner img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease, filter 0.3s ease;
}

.showcase-banner:hover img,
.showcase-banner:focus-visible img {
  transform: scale(1.03);
  filter: brightness(1.08);
}

.showcase-banner-hint {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(2, 6, 23, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  opacity: 0;
  transition: opacity 0.2s ease, border-color 0.2s ease;
  pointer-events: none;
}

.showcase-banner:hover .showcase-banner-hint,
.showcase-banner:focus-visible .showcase-banner-hint {
  opacity: 1;
  border-color: var(--accent-cyan-bright);
}

.showcase-body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
}

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

.showcase-logo {
  width: 40px;
  height: 40px;
  border-radius: 9px;
  object-fit: contain;
  border: 1px solid var(--border-subtle);
  background: rgba(15, 23, 42, 0.8);
}

.showcase-title-row h3 {
  font-size: 1.3rem;
}

.showcase-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.65;
}

.showcase-spec-box {
  background: rgba(6, 9, 15, 0.65);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}

.showcase-spec-box ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.showcase-spec-box li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.showcase-spec-box strong {
  color: var(--text-primary);
}

/* R&D Cards */
.research-bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.research-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.research-banner {
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(6, 9, 15, 0.55);
}

.research-icon-wrapper {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
}

.research-icon-wrapper.ai { background: rgba(6, 182, 212, 0.15); color: var(--accent-cyan-bright); }
.research-icon-wrapper.hw { background: rgba(16, 185, 129, 0.15); color: var(--accent-emerald-bright); }
.research-icon-wrapper.rd { background: rgba(99, 102, 241, 0.15); color: #a5b4fc; }

.research-tag {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--text-muted);
}

.research-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.category {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-cyan-bright);
}

.research-body h3 {
  font-size: 1.15rem;
}

.research-body p {
  font-size: 0.87rem;
  color: var(--text-secondary);
  flex: 1;
}

.read-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent-cyan-bright);
  margin-top: 6px;
}

.read-more:hover {
  text-decoration: underline;
}

/* ==========================================================================
   COMPETITION LOG TABLE (#next-journey)
   ========================================================================== */
.table-card {
  padding: 0;
  overflow: hidden;
}

.table-card-header {
  padding: 16px 22px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(6, 9, 15, 0.6);
}

.table-card-header h3 {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  letter-spacing: 0.08em;
  color: var(--accent-cyan-bright);
}

.table-responsive {
  overflow-x: auto;
}

.hud-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.hud-table th {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 13px 20px;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(15, 23, 42, 0.5);
}

.hud-table td {
  padding: 13px 20px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.hud-table td:first-child {
  color: var(--text-primary);
  font-weight: 600;
}

.hud-table tbody tr:hover {
  background: rgba(6, 182, 212, 0.05);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}

.status-pill.finished {
  background: rgba(16, 185, 129, 0.14);
  color: var(--accent-emerald-bright);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-pill.progress {
  background: rgba(245, 158, 11, 0.16);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.status-pill.muted {
  background: rgba(148, 163, 184, 0.12);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

.status-pill.pending {
  background: rgba(244, 63, 94, 0.14);
  color: #fb7185;
  border: 1px solid rgba(244, 63, 94, 0.3);
}

/* ==========================================================================
   JOIN US & CONTACT FORMS (#join-us, #contact)
   ========================================================================== */
.roles-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.role-card {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.role-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent-cyan-bright);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.role-card h3 {
  font-size: 1.12rem;
}

.role-card p {
  font-size: 0.86rem;
  color: var(--text-secondary);
  flex: 1;
}

.role-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.role-skills span {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.join-console-wrapper {
  margin-top: 20px;
  padding: 24px;
}

.console-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding-bottom: 14px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--border-subtle);
}

.console-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-primary);
}

.console-subtag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--accent-emerald-bright);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 16px;
}

.form-group label {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent-cyan-bright);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.14);
}

/* Custom Track Select */
.custom-select-wrapper {
  position: relative;
}

.select-trigger {
  width: 100%;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.select-trigger-text.placeholder {
  color: var(--text-muted);
}

.select-options-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #0c1322;
  border: 1px solid var(--border-hud);
  border-radius: var(--radius-md);
  padding: 6px;
  z-index: 50;
  box-shadow: var(--shadow-card);
}

.custom-select-wrapper.open .select-options-menu {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.select-option {
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.select-option:hover,
.select-option.selected {
  background: rgba(6, 182, 212, 0.14);
  color: var(--text-primary);
}

.opt-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(6, 182, 212, 0.18);
  color: var(--accent-cyan-bright);
}

/* Contact Grid */
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 18px;
}

.contact-info,
.contact-form-wrapper {
  padding: 24px;
}

.contact-info h3 {
  font-size: 1.35rem;
  margin-bottom: 10px;
}

.contact-info p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 18px;
}

.contact-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.contact-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.contact-list i {
  color: var(--accent-cyan-bright);
  width: 18px;
}

.social-links {
  display: flex;
  gap: 10px;
}

.social-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--border-medium);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.social-icon:hover {
  border-color: var(--accent-cyan-bright);
  color: var(--accent-cyan-bright);
}

/* ==========================================================================
   FOOTER & OVERLAYS (POPUP, COOKIE BANNER, POLICY DRAWER)
   ========================================================================== */
.footer {
  border-top: 1px solid var(--border-subtle);
  background: rgba(6, 9, 15, 0.9);
  padding: 40px 28px 28px;
  margin-top: 24px;
}

.footer-inner {
  max-width: 1320px;
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 28px;
  margin-bottom: 28px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-main);
  font-weight: 800;
  font-size: 1rem;
  margin-bottom: 10px;
}

.footer-bio {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 14px;
}

.footer-socials {
  display: flex;
  gap: 8px;
}

.footer-social-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
}

.footer-social-icon:hover {
  border-color: var(--accent-cyan-bright);
  color: var(--accent-cyan-bright);
}

.footer-col-title {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-primary);
  margin-bottom: 12px;
}

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

.footer-nav-list a {
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

.footer-nav-list a:hover {
  color: var(--accent-cyan-bright);
}

.footer-status-pill {
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.28);
  color: var(--accent-emerald-bright);
}

.footer-bottom-bar {
  padding-top: 18px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.back-to-top-btn {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border-medium);
  color: var(--text-secondary);
}

.back-to-top-btn:hover {
  border-color: var(--accent-cyan-bright);
  color: var(--accent-cyan-bright);
}

/* Coming Soon Popup */
.coming-soon-popup {
  position: fixed;
  top: 76px;
  right: 24px;
  width: min(320px, calc(100vw - 32px));
  padding: 18px;
  border-radius: var(--radius-lg);
  background: rgba(12, 17, 29, 0.96);
  border: 1px solid var(--border-hud);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.65);
  z-index: 2150;
  opacity: 0;
  transform: translateY(-12px);
  pointer-events: none;
  transition: all 0.28s ease;
}

.coming-soon-popup.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.coming-soon-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--accent-cyan-bright);
  margin-bottom: 8px;
}

.coming-soon-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.coming-soon-desc {
  font-size: 0.84rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.coming-soon-meta {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
}

/* Cookie Banner */
.cookie-banner {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: min(860px, calc(100vw - 32px));
  background: rgba(11, 17, 30, 0.96);
  backdrop-filter: blur(18px);
  border: 1px solid var(--border-hud);
  border-radius: var(--radius-lg);
  padding: 18px 22px;
  z-index: 2100;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
}

@media (min-width: 1025px) {
  .cookie-banner {
    left: calc(50% + var(--sidebar-width) / 2);
    width: min(860px, calc(100vw - var(--sidebar-width) - 48px));
  }
}

.cookie-banner[hidden] {
  display: none;
}

.cookie-banner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.cookie-banner-content {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  flex: 1;
  min-width: 260px;
}

.cookie-banner-icon {
  font-size: 1.4rem;
  color: var(--accent-cyan-bright);
  margin-top: 2px;
}

.cookie-banner-text h4 {
  font-size: 0.98rem;
  margin-bottom: 4px;
}

.cookie-banner-text p {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.cookie-banner-text a {
  color: var(--accent-cyan-bright);
  text-decoration: underline;
}

.cookie-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cookie-btn-primary {
  background: var(--accent-cyan);
  color: #030712;
  font-weight: 700;
}

.cookie-btn-secondary {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
}

/* Policy Side Panel */
.policy-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 15, 0.72);
  backdrop-filter: blur(4px);
  z-index: 2200;
}

.policy-overlay[hidden] {
  display: none;
}

.policy-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(460px, 100vw);
  background: #0b111e;
  border-left: 1px solid var(--border-hud);
  padding: 28px 24px;
  z-index: 2250;
  overflow-y: auto;
  overscroll-behavior: contain;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.policy-panel::-webkit-scrollbar-track {
  background: transparent;
  margin-block: 16px;
}

.policy-panel.open {
  transform: translateX(0);
}

.policy-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
  font-size: 1.2rem;
  cursor: pointer;
}

.policy-body h2 {
  font-size: 1.35rem;
  margin-bottom: 14px;
  color: var(--accent-cyan-bright);
}

.policy-content {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

.policy-content h3,
.policy-content h4 {
  color: var(--text-primary);
  margin: 16px 0 6px;
}

.policy-content p {
  margin-bottom: 10px;
}

.policy-content ul {
  margin: 6px 0 12px 18px;
  padding-left: 4px;
  list-style: disc;
}

.policy-content li {
  margin-bottom: 6px;
}

.cookie-pref-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 18px 0 22px;
}

.cookie-pref-item {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.cookie-pref-info h4 {
  margin: 0 0 3px;
  font-size: 0.92rem;
  color: var(--text-primary);
}

.cookie-pref-info p {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.pref-locked-badge {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.14);
  color: var(--accent-emerald-bright);
  border: 1px solid rgba(16, 185, 129, 0.3);
  white-space: nowrap;
}

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

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

.hud-slider {
  position: absolute;
  inset: 0;
  cursor: pointer;
  background: rgba(30, 41, 59, 0.95);
  border: 1px solid var(--border-medium);
  border-radius: 999px;
  transition: all 0.22s ease;
}

.hud-slider::before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  left: 2px;
  top: 2px;
  border-radius: 50%;
  background: var(--text-secondary);
  transition: transform 0.22s ease, background 0.22s ease;
}

.hud-switch input:checked + .hud-slider {
  background: rgba(6, 182, 212, 0.24);
  border-color: var(--accent-cyan-bright);
}

.hud-switch input:checked + .hud-slider::before {
  transform: translateX(20px);
  background: var(--accent-cyan-bright);
}

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

/* ==========================================================================
   PORTFOLIO ENGINEERING DOCS STYLES (portfolio.html)
   ========================================================================== */
.docs-bento-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.docs-bento-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.doc-card {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.doc-card h3 {
  font-size: 1.12rem;
  display: flex;
  align-items: center;
  gap: 9px;
}

.doc-card p,
.doc-card li {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.doc-card ul,
.doc-card ol {
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.diagram-container {
  position: relative;
  padding: 48px 22px 22px;
  overflow: hidden;
}

.mermaid-wrap {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  padding-top: 38px;
}

.mermaid {
  display: flex;
  justify-content: center;
  width: 100%;
  overflow: hidden;
}

.mermaid svg {
  max-width: 100% !important;
  height: auto !important;
  display: block;
}

.diagram-toolbar {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 6px;
}

.diagram-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: 8px;
  border: 1px solid var(--border-medium);
  background: rgba(15, 23, 42, 0.88);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.diagram-action-btn:hover {
  border-color: var(--accent-cyan-bright);
  color: var(--accent-cyan-bright);
  background: rgba(30, 41, 59, 0.95);
}

html[data-theme="light"] .diagram-action-btn {
  background: #ffffff;
  color: var(--text-primary);
  border-color: var(--border-medium);
}

html[data-theme="light"] .diagram-action-btn:hover {
  background: #f1f5f9;
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

/* Fullscreen Flowchart Modal */
.diagram-fullscreen-modal {
  position: fixed;
  inset: 0;
  z-index: 2500;
  background: rgba(2, 6, 23, 0.94);
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
}

.diagram-fullscreen-modal[hidden] {
  display: none;
}

html[data-theme="light"] .diagram-fullscreen-modal {
  background: rgba(244, 247, 251, 0.96);
}

.diagram-fs-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(15, 23, 42, 0.85);
}

html[data-theme="light"] .diagram-fs-topbar {
  background: rgba(255, 255, 255, 0.95);
}

.diagram-fs-title {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--accent-cyan-bright);
  letter-spacing: 0.05em;
}

.diagram-fs-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.diagram-zoom-label {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  min-width: 48px;
  text-align: center;
  color: var(--text-secondary);
}

.diagram-fs-stage {
  flex: 1;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  user-select: none;
  padding: 24px;
}

.diagram-fs-stage.dragging {
  cursor: grabbing;
}

.diagram-fs-canvas {
  transform-origin: center center;
  transition: transform 0.08s ease-out;
  max-width: 92vw;
  max-height: 82vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.diagram-fs-canvas svg {
  display: block;
  max-width: 90vw;
  max-height: 80vh;
}

.diagram-fs-hint {
  text-align: center;
  padding: 8px 16px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-subtle);
}

.code-block {
  background: #04070d;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.55;
  color: #e2e8f0;
}

.tech-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-primary);
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   IMAGE LIGHTBOX MODAL
   ========================================================================== */
.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(2, 6, 23, 0.88);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.image-lightbox[hidden] {
  display: none;
}

.lightbox-content {
  max-width: min(1000px, 92vw);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.lightbox-content img {
  max-width: 100%;
  max-height: calc(88vh - 48px);
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.65);
  object-fit: contain;
}

.lightbox-caption {
  color: #cbd5e1;
  font-size: 0.9rem;
  text-align: center;
  margin: 0;
}

.lightbox-close {
  position: fixed;
  top: 20px;
  right: 24px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(15, 23, 42, 0.9);
  color: #f8fafc;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.lightbox-close:hover,
.lightbox-close:focus-visible {
  border-color: var(--accent-cyan-bright);
  color: var(--accent-cyan-bright);
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS (TABLET & PHONE)
   ========================================================================== */

/* Prevent grid/flex children from forcing horizontal page overflow */
.workspace-content > *,
.hero-bento > *,
.telemetry-bento-grid > *,
.upcoming-bento-grid > *,
.gallery-bento-grid > *,
.research-bento-grid > *,
.team-bento-grid > *,
.roles-grid > *,
.contact-grid > *,
.footer-grid > *,
.docs-bento-grid-3 > *,
.docs-bento-grid-2 > *,
.medals-bento-grid > *,
.senseai-analyzers-row > * {
  min-width: 0;
  max-width: 100%;
}

.topbar-right .btn {
  white-space: nowrap;
  flex-shrink: 0;
}

.table-card-header {
  flex-wrap: wrap;
  gap: 8px;
}

.contact-list li,
.showcase-desc,
.doc-card p,
.doc-card li,
.challenge-block p {
  overflow-wrap: anywhere;
}

.select-options-menu {
  max-height: 240px;
  overflow-y: auto;
}

/* Always show expand hint on touch devices where :hover is unavailable */
@media (hover: none) {
  .showcase-banner-hint {
    opacity: 0.92;
  }
}

@media (max-width: 1180px) {
  .team-bento-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .research-bento-grid,
  .docs-bento-grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Tablet Breakpoint (<= 1024px) */
@media (max-width: 1024px) {
  .command-sidebar {
    transform: translateX(-100%);
  }
  .command-sidebar.open {
    transform: translateX(0);
  }
  .workspace-main {
    margin-left: 0;
  }
  .top-command-bar {
    left: 0;
    padding: 0 20px;
  }
  .mobile-menu-btn {
    display: inline-flex;
    min-width: 40px;
    min-height: 40px;
  }
  .hero-bento,
  .telemetry-bento-grid,
  .contact-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .gallery-bento-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
  }
  .showcase-banner-hint {
    opacity: 0.92;
  }
  .carousel-btn {
    width: 38px;
    height: 38px;
  }
}

/* Small Tablet / Large Phone Breakpoint (<= 768px) */
@media (max-width: 768px) {
  .workspace-content {
    padding: 18px 14px 48px;
    gap: 36px;
  }
  .workspace-content > * + * {
    padding-top: 30px;
  }
  .top-command-bar {
    padding: 0 14px;
    gap: 10px;
  }
  .hud-clock-pill {
    display: none;
  }
  .hero-main-card {
    padding: 24px 20px;
    gap: 18px;
  }
  .gallery-bento-grid,
  .upcoming-bento-grid,
  .roles-grid,
  .research-bento-grid,
  .team-bento-grid,
  .docs-bento-grid-3,
  .docs-bento-grid-2,
  .form-row,
  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero-stats-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero-stat-card.span-2 {
    grid-column: span 1;
  }
  .footer {
    padding: 32px 16px 24px;
  }
  .diagram-container {
    padding: 52px 14px 16px;
  }
  .diagram-fs-topbar {
    flex-wrap: wrap;
    padding: 10px 14px;
  }
  .diagram-fs-controls {
    width: 100%;
    justify-content: flex-end;
    flex-wrap: wrap;
  }
  .diagram-action-btn {
    min-height: 36px;
  }
}

/* Phone Breakpoint (<= 640px) */
@media (max-width: 640px) {
  .top-command-bar {
    padding: 0 12px;
    gap: 8px;
  }
  .topbar-left {
    gap: 8px;
  }
  .mobile-menu-btn {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
  }
  .topbar-breadcrumb span:not(.crumb-root) {
    display: none;
  }
  .topbar-breadcrumb .crumb-root {
    font-size: 0.82rem;
    letter-spacing: 0.04em;
  }
  .topbar-right {
    gap: 6px;
  }
  .btn {
    min-height: 42px;
  }
  .topbar-right .btn-sm {
    height: 36px;
    min-height: 36px;
    padding: 0 10px;
    font-size: 0.76rem;
    gap: 6px;
  }
  .topbar-right .theme-toggle-btn {
    width: 36px;
    padding: 0;
    justify-content: center;
  }
  .topbar-right .theme-toggle-btn span {
    display: none;
  }
  .hero-hud-tag {
    border-radius: var(--radius-sm);
    max-width: 100%;
    font-size: 0.66rem;
    gap: 6px 8px;
    padding: 6px 10px;
  }
  .mission-card,
  .team-member-card,
  .role-card,
  .join-console-wrapper,
  .contact-info,
  .contact-form-wrapper,
  .doc-card,
  .biometric-card {
    padding: 18px;
  }
  .widget-content {
    padding: 14px;
  }
  .face-mesh-meta {
    white-space: normal;
    flex-wrap: wrap;
    row-gap: 4px;
    font-size: 0.7rem;
  }
  .showcase-banner {
    aspect-ratio: 16 / 9;
    max-height: 200px;
  }
  .showcase-body {
    padding: 18px;
  }
  .cookie-banner {
    bottom: 12px;
    width: calc(100vw - 24px);
    padding: 14px 16px;
  }
  .cookie-banner-content {
    min-width: 0;
  }
  .cookie-banner-actions {
    width: 100%;
  }
  .cookie-banner-actions .btn {
    flex: 1 1 auto;
    min-height: 40px;
  }
  .coming-soon-popup {
    top: 72px;
    left: 12px;
    right: 12px;
    width: auto;
  }
  .image-lightbox {
    padding: 14px;
  }
  .lightbox-close {
    top: 12px;
    right: 12px;
    width: 44px;
    height: 44px;
  }
  .diagram-action-btn span {
    display: none;
  }
}

/* Compact Phone Breakpoint (<= 440px) */
@media (max-width: 440px) {
  .workspace-content {
    padding: 14px 12px 40px;
    gap: 30px;
  }
  .top-command-bar {
    padding: 0 10px;
    gap: 6px;
  }
  .topbar-left {
    gap: 6px;
  }
  .mobile-menu-btn {
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    min-width: 34px;
    min-height: 34px;
  }
  .topbar-breadcrumb .crumb-root {
    font-size: 0.74rem;
    letter-spacing: 0.02em;
  }
  .topbar-right {
    gap: 5px;
  }
  .topbar-right .btn-sm {
    height: 34px;
    min-height: 34px;
    padding: 0 8px;
    font-size: 0.72rem;
    gap: 5px;
  }
  .topbar-right .theme-toggle-btn {
    width: 34px;
    padding: 0;
  }
  .hero-main-card {
    padding: 18px 16px;
  }
  .hero-title {
    font-size: clamp(1.65rem, 7.5vw, 2.2rem);
  }
  .cta-group .btn {
    width: 100%;
    flex: 1 1 100%;
  }
  .hud-table th,
  .hud-table td {
    padding: 10px 12px;
    font-size: 0.8rem;
  }
  .carousel-btn {
    width: 40px;
    height: 40px;
  }
}
