/* ==========================================================================
   TECHNICAL WINGS
   ========================================================================== */

.wings-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.8rem;
  width: 100%;
}

@media (max-width: 1200px) {
  .wings-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.2rem;
  }
}

@media (max-width: 960px) {
  .wings-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.2rem;
  }
}

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

.tilt-card {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  padding: 2.2rem 1.8rem;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease, box-shadow 0.25s ease;
  transform-style: preserve-3d;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.65);
  width: 100%;
}

.tilt-card:hover {
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85), 0 0 20px rgba(255, 255, 255, 0.05);
  transform: translateY(-4px);
}

.card-glare {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  z-index: 2;
  transition: background 0.1s ease;
}

/* ==========================================================================
   TECHNICAL RESEARCH WINGS — ENGINEERING DIVISIONS (CLEAN & GENUINE)
   ========================================================================== */

.command-center-dashboard {
  width: 100%;
}

/* 1. Asymmetric Grid Layout */
.command-center-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 1.6rem;
  align-items: stretch;
}

@media (max-width: 1024px) {
  .command-center-grid {
    grid-template-columns: 1fr;
  }
}

/* 2. Clean Panel Base */
.cmd-panel {
  position: relative;
  background: #ffffff !important;
  border: 1px solid rgba(0, 0, 0, 0.1) !important;
  border-radius: 20px;
  padding: 2.2rem 2rem;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04), 0 2px 6px rgba(0, 0, 0, 0.02);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease, border-color 0.3s ease;
  display: flex;
  flex-direction: column;
}

body.dark-theme .cmd-panel,
html[data-theme="dark"] .cmd-panel {
  background: #0d0d14 !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.cmd-panel:hover {
  transform: translateY(-5px);
}

body.light-theme .cmd-panel:hover {
  border-color: rgba(0, 0, 0, 0.28) !important;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.04);
}

body.dark-theme .cmd-panel:hover,
html[data-theme="dark"] .cmd-panel:hover {
  border-color: rgba(255, 255, 255, 0.35) !important;
  box-shadow: 0 22px 55px rgba(0, 0, 0, 0.9);
}

/* 3. Panel Header */
.cmd-panel-header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

body.dark-theme .cmd-panel-header,
html[data-theme="dark"] .cmd-panel-header {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.cmd-div-identity {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.cmd-div-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.12);
  color: var(--text-primary);
}

body.dark-theme .cmd-div-tag,
html[data-theme="dark"] .cmd-div-tag {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

.cmd-coord-label {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-muted);
  font-weight: 600;
}

.cmd-wing-badge {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

body.dark-theme .cmd-wing-badge,
html[data-theme="dark"] .cmd-wing-badge {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
}

/* 4. Technical Vector Schematic Flow Box */
.cmd-schematic-box {
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 14px;
  padding: 1rem 1.1rem;
  margin-bottom: 1.35rem;
  position: relative;
  overflow: hidden;
}

body.dark-theme .cmd-schematic-box,
html[data-theme="dark"] .cmd-schematic-box {
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(255, 255, 255, 0.08);
}

.cmd-schematic-box.compact-schematic {
  padding: 0.85rem 1rem;
  margin-bottom: 0;
}

.schematic-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

body.dark-theme .schematic-header,
html[data-theme="dark"] .schematic-header {
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

.schematic-flow-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
}

@media (max-width: 640px) {
  .schematic-flow-grid {
    flex-direction: column;
    align-items: stretch;
  }
  .schematic-arrow {
    transform: rotate(90deg);
    align-self: center;
    margin: 0.2rem 0;
  }
}

.schematic-node {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.8rem;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  transition: all 0.2s ease;
}

body.dark-theme .schematic-node,
html[data-theme="dark"] .schematic-node {
  background: #14141d;
  border-color: rgba(255, 255, 255, 0.08);
}

.schematic-node:hover {
  border-color: var(--text-primary);
  transform: translateY(-2px);
}

.schematic-node.node-highlight {
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.04);
}

body.dark-theme .schematic-node.node-highlight,
html[data-theme="dark"] .schematic-node.node-highlight {
  border-color: rgba(16, 185, 129, 0.45);
  background: rgba(16, 185, 129, 0.06);
}

.node-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  color: var(--text-primary);
  flex-shrink: 0;
}

body.dark-theme .node-icon,
html[data-theme="dark"] .node-icon {
  background: rgba(255, 255, 255, 0.08);
}

.schematic-node.node-highlight .node-icon {
  background: #10b981;
  color: #ffffff;
}

.node-info {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.node-name {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.node-sub {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.schematic-arrow {
  color: var(--text-muted);
  font-size: 0.75rem;
  flex-shrink: 0;
  opacity: 0.6;
}

/* 4. Title & Descriptions */
.cmd-featured-body, .cmd-sub-body {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.cmd-title-group {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.cmd-icon-badge {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--bg-surface-elevated);
  border: 1.5px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--text-primary);
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
  transition: transform 0.25s ease;
}

.cmd-panel:hover .cmd-icon-badge {
  transform: scale(1.06);
}

.cmd-panel-title {
  font-family: var(--font-heading) !important;
  font-size: 1.45rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.03em;
  color: var(--text-primary) !important;
  margin-bottom: 0.2rem;
  line-height: 1.2;
}

.cmd-focus-line {
  display: block;
  font-family: var(--font-body);
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-silver);
}

.cmd-panel-desc {
  font-size: 0.94rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 1.35rem;
}

/* 5. Core Pillars / Competency List */
.cmd-pillars-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}

.cmd-pillar-item {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.8rem 1rem;
  background: rgba(0, 0, 0, 0.025);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 12px;
  transition: background 0.2s ease, border-color 0.2s ease;
}

body.dark-theme .cmd-pillar-item,
html[data-theme="dark"] .cmd-pillar-item {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.08);
}

.cmd-pillar-item:hover {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.12);
}

body.dark-theme .cmd-pillar-item:hover,
html[data-theme="dark"] .cmd-pillar-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.16);
}

.pillar-bullet {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.88rem;
  color: var(--text-primary);
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.pillar-content {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.pillar-title {
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
}

.pillar-text {
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.45;
  margin: 0;
}

/* 6. Panel Footer & Actions */
.cmd-panel-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.1rem;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  gap: 0.8rem;
  flex-wrap: wrap;
}

body.dark-theme .cmd-panel-footer,
html[data-theme="dark"] .cmd-panel-footer {
  border-top-color: rgba(255, 255, 255, 0.08);
}

.cmd-tags-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.cmd-tech-chip {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.22rem 0.6rem;
  border-radius: 100px;
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: var(--text-primary);
}

body.dark-theme .cmd-tech-chip,
html[data-theme="dark"] .cmd-tech-chip {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
}

.cmd-explore-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-primary);
  text-decoration: none;
  padding: 0.5rem 0.95rem;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.16);
  background: transparent;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  z-index: 30 !important;
  cursor: pointer !important;
  pointer-events: auto !important;
}

body.dark-theme .cmd-explore-btn,
html[data-theme="dark"] .cmd-explore-btn {
  border-color: rgba(255, 255, 255, 0.22);
}

.cmd-explore-btn i {
  transition: transform 0.25s ease;
}

.cmd-explore-btn:hover {
  background: var(--text-primary);
  color: var(--bg-core) !important;
  border-color: var(--text-primary);
  transform: translateX(2px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.cmd-explore-btn:hover i {
  transform: translateX(4px);
}

/* 7. Right Side Stack */
.cmd-side-stack {
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
}



/* ==========================================================================
   3D ROBOT LAB — 3 CONCURRENT 3D SIMULATION CARDS (ALL 3 VISIBLE)
   ========================================================================== */

.robot-lab-multi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.8rem;
  width: 100%;
}

.robot-lab-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.65);
  transition: var(--transition-smooth);
  width: 100%;
}

.robot-lab-card:hover {
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85);
}

.robot-lab-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.9rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
}

.robot-lab-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.robot-lab-id {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  border: 1px solid var(--border-subtle);
}

.robot-lab-viewport {
  position: relative;
  height: 280px;
  width: 100%;
  background: radial-gradient(circle at center, #1e202e 0%, #0d0f17 70%, #07080d 100%);
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  margin-bottom: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.2rem;
}

body.dark-theme .robot-lab-viewport,
html[data-theme="dark"] .robot-lab-viewport {
  background-color: #0d1019;
  background-image: 
    radial-gradient(circle at 50% 45%, rgba(255, 255, 255, 0.06) 0%, rgba(14, 18, 26, 0.9) 60%, #090c14 100%),
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 100% 100%, 20px 20px, 20px 20px;
  border-color: rgba(255, 255, 255, 0.1);
}

/* Dedicated Viewport for Combat Bot (Matching Prototype Cards Background) */
.combat-sketchfab-viewport {
  position: relative;
  height: 280px;
  width: 100%;
  background: radial-gradient(circle at 50% 50%, #f0f3fa 0%, #e2e7f3 100%) !important;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.04);
  margin-bottom: 1.1rem;
  padding: 0 !important;
}

body.dark-theme .combat-sketchfab-viewport,
html[data-theme="dark"] .combat-sketchfab-viewport {
  background-color: #090b10 !important;
  background-image: 
    radial-gradient(circle at 50% 45%, rgba(255, 255, 255, 0.04) 0%, rgba(14, 17, 24, 0.8) 60%, #080a0f 100%),
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px) !important;
  background-size: 100% 100%, 24px 24px, 24px 24px !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.5) !important;
}

.robot-lab-viewport canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 2;
}

.sketchfab-embed-wrapper {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  overflow: hidden;
  z-index: 5;
}

.sketchfab-embed-wrapper iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  border-radius: inherit;
}

.sketchfab-loader {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  background: radial-gradient(circle at center, #141724 0%, #0a0c14 100%);
  z-index: 4;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

body.light-theme .sketchfab-loader {
  background: radial-gradient(circle at 50% 50%, #f1f4f9 0%, #e2e8f0 100%);
}

.sketchfab-loader .loader-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(16, 185, 129, 0.2);
  border-top-color: #10b981;
  border-radius: 50%;
  animation: spin3DLoader 0.8s linear infinite;
}

@keyframes spin3DLoader {
  to { transform: rotate(360deg); }
}

.sketchfab-loader .loader-text {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: #10b981;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  animation: pulse3DText 1.5s ease-in-out infinite;
}

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

.cad-format-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid #10b981;
  color: #10b981;
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.1);
}

.cad-format-download-btn:hover {
  background: #10b981;
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.cad-format-download-btn:active {
  transform: translateY(0);
}

.lab-viewport-img {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 85%;
  height: 85%;
  object-fit: contain;
  z-index: 1;
  opacity: 0.9;
  filter: drop-shadow(0 10px 25px rgba(0, 0, 0, 0.8));
  pointer-events: none;
}

.robot-preview-img {
  width: 100%;
  height: 100%;
  max-height: 240px;
  object-fit: contain;
  filter: drop-shadow(0 12px 30px rgba(0, 0, 0, 0.85));
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  z-index: 2;
}

.robot-lab-card:hover .robot-preview-img {
  transform: scale(1.08);
}

/* Mini Controls Bar */
.lab-mini-controls-bar {
  position: absolute;
  bottom: 8px;
  left: 8px;
  right: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(10, 10, 15, 0.9);
  backdrop-filter: blur(14px);
  padding: 0.4rem 0.8rem;
  border-radius: 100px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  z-index: 5;
}

.mini-btn-group {
  display: flex;
  gap: 0.3rem;
}

.mini-mode-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 0.22rem 0.55rem;
  border-radius: 100px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.mini-mode-btn.active, .mini-mode-btn:hover {
  background: #ffffff;
  color: #000000;
  border-color: #ffffff;
  font-weight: 600;
}

.mini-rotate-toggle {
  background: transparent;
  border: none;
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.robot-lab-telemetry-box {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.robot-lab-metrics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.mini-metric-box {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 0.65rem 0.8rem;
}

.mini-metric-lbl {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.2rem;
}

.mini-metric-val {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
}

.mini-radar-strip {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 0.45rem 0.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-silver);
}

@media (max-width: 1200px) {
  .robot-lab-multi-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.2rem;
  }
}

@media (max-width: 960px) {
  .robot-lab-multi-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.2rem;
  }
}

@media (max-width: 640px) {
  .robot-lab-multi-grid {
    grid-template-columns: 1fr;
  }
  .robot-lab-viewport {
    height: 300px;
  }
}

/* ==========================================================================
   ACTIVE ROBOTIC PROTOTYPES (FULL-WIDTH 3-COLUMN BALANCED GRID)
   ========================================================================== */

.filter-bar {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 3rem;
  width: 100%;
}

.filter-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 0.55rem 1.3rem;
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.filter-btn.active, .filter-btn:hover {
  background: #ffffff;
  border-color: #ffffff;
  color: #000000;
  box-shadow: 0 4px 18px rgba(255, 255, 255, 0.25);
}

/* ==========================================================================
   FLEET SEARCH & CONTROL PANEL
   ========================================================================== */
.fleet-control-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.8rem;
  flex-wrap: wrap;
}

.fleet-search-box {
  position: relative;
  flex: 1;
  min-width: 280px;
  max-width: 580px;
}

.fleet-search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.9rem;
  pointer-events: none;
}

.fleet-search-input {
  width: 100%;
  padding: 0.75rem 2.4rem 0.75rem 2.6rem;
  border-radius: 12px;
  background: rgba(22, 26, 40, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #ffffff;
  font-family: var(--font-body);
  font-size: 0.88rem;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.fleet-search-input:focus {
  outline: none;
  border-color: #00f0ff;
  background: rgba(26, 32, 50, 0.95);
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.25);
}

.fleet-search-clear {
  position: absolute;
  right: 0.8rem;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.3rem;
  font-size: 0.85rem;
}

.fleet-search-clear:hover {
  color: #ffffff;
}

.fleet-status-counter {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 1.1rem;
  border-radius: 10px;
  background: rgba(16, 20, 32, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #ffffff;
}

.pulse-beacon {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 10px #10b981;
  animation: pulse-beacon 1.6s infinite ease-in-out;
}

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

/* ==========================================================================
   PROTOTYPE CARDS (ORIGINAL ELEVATED THEME)
   ========================================================================== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.8rem;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
}

.project-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.7);
  transition: all 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
  width: 100%;
  position: relative;
}

.project-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 22px 55px -10px rgba(0, 0, 0, 0.95), 0 0 25px rgba(255, 255, 255, 0.08);
}

.project-card[data-category="combat"]:hover,
.project-card[data-category="soccer"]:hover,
.project-card[data-category="ai"]:hover,
.project-card[data-category="uav"]:hover,
.project-card[data-category="arm"]:hover {
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 22px 55px -10px rgba(0, 0, 0, 0.95), 0 0 25px rgba(255, 255, 255, 0.08);
}

.project-media-wrap {
  position: relative;
  height: 220px;
  background-color: #090b10;
  background-image: 
    radial-gradient(circle at 50% 45%, rgba(255, 255, 255, 0.04) 0%, rgba(14, 17, 24, 0.8) 60%, #080a0f 100%),
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 100% 100%, 24px 24px, 24px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.2rem;
}

.project-media-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.5));
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), filter 0.4s ease;
}

.project-card:hover .project-media-wrap img {
  transform: scale(1.05);
  filter: drop-shadow(0 14px 28px rgba(0, 0, 0, 0.7));
}

.project-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 700;
  padding: 0.28rem 0.75rem;
  border-radius: 100px;
  background: rgba(8, 11, 18, 0.88);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  letter-spacing: 0.08em;
  z-index: 3;
}

.badge-combat,
.badge-soccer,
.badge-ai,
.badge-uav,
.badge-arm {
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.card-live-tag {
  position: absolute;
  top: 12px;
  right: 12px;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  background: rgba(8, 11, 18, 0.88);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  z-index: 3;
}

.mini-live-dot,
.dot-combat,
.dot-soccer,
.dot-ai,
.dot-uav,
.dot-arm {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
  background: #ffffff;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
}

.project-body {
  padding: 1.6rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.project-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.project-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0;
}

.telemetry-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.telemetry-btn:hover,
.telemetry-btn.active {
  background: #ffffff;
  color: #000000;
  border-color: #ffffff;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.5);
}

.project-desc {
  color: #a1a1aa;
  font-size: 0.9rem;
  line-height: 1.58;
  margin-bottom: 1.2rem;
  flex-grow: 1;
  text-transform: none;
}

.project-specs-mini {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #f4f4f5;
  background: rgba(18, 22, 32, 0.55);
  backdrop-filter: blur(8px);
  padding: 0.8rem 0.95rem;
  border-radius: 10px;
  margin-bottom: 1.3rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.project-specs-mini i {
  color: #ffffff !important;
  margin-right: 0.35rem;
}

/* Interactive Telemetry HUD Grid */
.project-telemetry-hud {
  background: rgba(14, 18, 26, 0.88);
  backdrop-filter: blur(10px);
  padding: 0.8rem 0.95rem;
  border-radius: 10px;
  margin-bottom: 1.3rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  animation: fadeIn 0.3s ease;
}

.telemetry-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  font-family: var(--font-mono);
}

.tele-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.tele-item span {
  font-size: 0.62rem;
  color: #a1a1aa;
  letter-spacing: 0.08em;
}

.tele-item strong {
  font-size: 0.82rem;
  font-weight: 700;
  color: #ffffff !important;
}

/* Color Helpers */
.text-orange { color: #fb923c !important; }
.text-emerald { color: #34d399 !important; }
.text-purple { color: #c084fc !important; }
.text-red { color: #f87171 !important; }
.text-cyan { color: #38bdf8 !important; }
.text-gold { color: #fde047 !important; }

/* Light Theme Overrides */
body.light-theme .fleet-search-input {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.15);
  color: #000000;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}
body.light-theme .fleet-status-counter {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.12);
  color: #000000;
}
body.light-theme .project-card {
  background: linear-gradient(165deg, #ffffff 0%, #f4f6fa 100%);
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.07);
}
body.light-theme .project-media-wrap {
  background: radial-gradient(circle at 50% 50%, #f0f3fa 0%, #e2e7f3 100%);
  border-bottom-color: rgba(0, 0, 0, 0.08);
}
body.light-theme .project-title { color: #000000; }
body.light-theme .project-desc { color: #475569; }
body.light-theme .project-specs-mini {
  background: #f1f4f9;
  border-color: rgba(0, 0, 0, 0.08);
  color: #1e293b;
}
body.light-theme .project-telemetry-hud {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.12);
}
body.light-theme .telemetry-btn {
  background: #e2e8f0;
  color: #0f172a;
  border-color: rgba(0, 0, 0, 0.1);
}
body.light-theme .telemetry-btn:hover,
body.light-theme .telemetry-btn.active {
  background: #000000;
  color: #ffffff;
}

@media (max-width: 1200px) {
  .projects-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.2rem;
  }
}

@media (max-width: 960px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.2rem;
  }
}

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

/* ==========================================================================
   3D IMMERSIVE FLEET GALLERY
   ========================================================================= */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.8rem;
  width: 100%;
}

@media (max-width: 1200px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.2rem;
  }
}

@media (max-width: 960px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.2rem;
  }
}

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

.gallery-card {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  overflow: hidden;
  transition: var(--transition-smooth);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.6);
  width: 100%;
}

.gallery-card:hover {
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85);
  transform: translateY(-4px);
}

.gallery-img-wrap {
  position: relative;
  height: 240px;
  background: #09090d;
  overflow: hidden;
  cursor: pointer;
}

.gallery-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-card:hover .gallery-img-wrap img {
  transform: scale(1.06);
}

.gallery-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 0.25rem 0.65rem;
  border-radius: 100px;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  z-index: 3;
}

.gallery-cam-tag {
  position: absolute;
  top: 12px;
  right: 12px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  z-index: 3;
}

.gallery-body {
  padding: 1.6rem;
}

.gallery-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
}

.gallery-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.1rem;
}

.gallery-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-subtle);
  padding-top: 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-silver);
}

/* ==========================================================================
   EVENTS & HACKATHONS SPLINE 3D INTEGRATION
   ========================================================================== */

.events-spline-section {
  position: relative;
  min-height: 880px;
  overflow: hidden;
  padding: 5.5rem 0 6.5rem 0;
  background: #ffffff !important;
}

body.light-theme .events-spline-section {
  background: #ffffff !important;
}

body.dark-theme .events-spline-section,
html[data-theme="dark"] .events-spline-section {
  background: #070709 !important;
}

.events-spline-bg-container {
  position: absolute;
  inset: -4%;
  width: 108%;
  height: 108%;
  z-index: 1;
  overflow: hidden;
  pointer-events: auto;
  background: #ffffff;
  will-change: transform;
  transform: translateZ(0);
}

body.light-theme .events-spline-bg-container {
  background: #ffffff !important;
}

body.dark-theme .events-spline-bg-container,
html[data-theme="dark"] .events-spline-bg-container {
  background: #070709 !important;
}

.events-spline-bg-container spline-viewer {
  width: 100%;
  height: 100%;
  display: block;
  transform: scale(1.04);
  transform-origin: center center;
}

.events-spline-overlay-gradient {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 45% 65%, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.72) 48%, #ffffff 78%);
  pointer-events: none;
  z-index: 2;
}

body.light-theme .events-spline-overlay-gradient {
  background: radial-gradient(circle at 45% 65%, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.72) 48%, #ffffff 78%) !important;
}

body.dark-theme .events-spline-overlay-gradient,
html[data-theme="dark"] .events-spline-overlay-gradient {
  background: radial-gradient(circle at 45% 65%, rgba(7, 7, 10, 0) 0%, rgba(7, 7, 10, 0.65) 48%, #070709 78%) !important;
}

.events-content-container {
  position: relative;
  z-index: 5;
  pointer-events: none; /* Allows mouse clicks and drags to pass to the 3D Rocket & Start Button */
}

.events-content-container .section-title {
  color: var(--text-primary);
  font-weight: 800;
}

body.light-theme .events-content-container .section-title,
html[data-theme="light"] .events-content-container .section-title {
  color: #000000 !important;
  text-shadow: none !important;
}

body.dark-theme .events-content-container .section-title,
html[data-theme="dark"] .events-content-container .section-title {
  color: #ffffff !important;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.9) !important;
}

.events-content-container .section-subtitle {
  color: var(--text-secondary);
  font-size: 1.18rem !important;
  font-weight: 600 !important;
  max-width: 780px;
  margin: 0.6rem auto 0 auto;
}

body.light-theme .events-content-container .section-subtitle,
html[data-theme="light"] .events-content-container .section-subtitle {
  color: #0f172a !important;
  text-shadow: none !important;
}

body.dark-theme .events-content-container .section-subtitle,
html[data-theme="dark"] .events-content-container .section-subtitle {
  color: #e2e8f0 !important;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9) !important;
}

.events-content-container .section-header,
.events-content-container .events-hero-banner,
.events-content-container .events-phases-stack,
.events-content-container .event-card,
.events-content-container .events-interactive-hint {
  pointer-events: auto;
}

.events-2col-layout {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 2.5rem;
  align-items: start;
  width: 100%;
}

.events-rocket-stage {
  min-height: 600px;
  pointer-events: none;
}

.events-info-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  pointer-events: auto;
}

.events-interactive-hint {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: #10b981;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(16, 185, 129, 0.4);
  padding: 0.45rem 1.1rem;
  border-radius: 100px;
  letter-spacing: 0.06em;
  pointer-events: auto;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

body.light-theme .events-interactive-hint {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(0, 0, 0, 0.12);
  color: #050508;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.events-hero-banner {
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 18px;
  padding: 1.6rem 1.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  box-shadow: 0 14px 45px rgba(0, 0, 0, 0.6);
  transition: var(--transition-smooth);
}

body.light-theme .events-hero-banner {
  background: rgba(255, 255, 255, 0.9) !important;
  border: 1px solid rgba(0, 0, 0, 0.1) !important;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.08) !important;
}

body.dark-theme .events-hero-banner,
html[data-theme="dark"] .events-hero-banner {
  background: rgba(13, 13, 20, 0.88) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 14px 45px rgba(0, 0, 0, 0.75) !important;
}

.events-phases-stack {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

body.light-theme .events-phases-stack .event-card {
  background: rgba(255, 255, 255, 0.9) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  border-radius: 16px !important;
}

body.dark-theme .events-phases-stack .event-card,
html[data-theme="dark"] .events-phases-stack .event-card {
  background: rgba(13, 13, 20, 0.88) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 16px !important;
}

@media (max-width: 1100px) {
  .events-2col-layout {
    grid-template-columns: 1fr 380px;
    gap: 1.8rem;
  }
}

@media (max-width: 900px) {
  .events-2col-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .events-rocket-stage {
    min-height: 420px;
    order: -1;
  }
}

.flagship-countdown-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 2.8rem;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2.5rem;
  align-items: center;
  margin-bottom: 3rem;
  box-shadow: 0 14px 45px rgba(0, 0, 0, 0.6);
  width: 100%;
}

.countdown-timer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.8rem;
}

.timer-slot {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 1.2rem 0.6rem;
  text-align: center;
}

.timer-val {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text-primary);
  display: block;
  line-height: 1;
}

.timer-unit {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 0.35rem;
}

.events-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.8rem;
  width: 100%;
}

@media (max-width: 1200px) {
  .events-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.2rem;
  }
}

@media (max-width: 960px) {
  .events-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.2rem;
  }
}

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

.event-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.event-date-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #ffffff;
  display: inline-block;
  margin-bottom: 0.8rem;
}

/* ==========================================================================
   CORE LEADERSHIP TEAM (ALL 7 MEMBERS)
   ========================================================================== */

.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.8rem;
  width: 100%;
}

@media (max-width: 1200px) {
  .team-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.2rem;
  }
}

@media (max-width: 960px) {
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.2rem;
  }
}

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

/* ==========================================================================
   ADVANCED CYBER TEAM DOSSIER CARDS
   ========================================================================== */

.team-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: left;
  padding: 1.6rem 1.6rem 1.4rem 1.6rem;
  width: 100%;
  background: #ffffff !important;
  border: 1px solid rgba(0, 0, 0, 0.12) !important;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  position: relative;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}

body.light-theme .team-card {
  background: #ffffff !important;
  border: 1px solid rgba(0, 0, 0, 0.12) !important;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.06), 0 2px 6px rgba(0, 0, 0, 0.03) !important;
}

body.dark-theme .team-card,
html[data-theme="dark"] .team-card {
  background: #0d0d14 !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
}

.team-card:hover {
  transform: translateY(-6px);
}

body.light-theme .team-card:hover {
  border-color: rgba(0, 0, 0, 0.35) !important;
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.08) !important;
}

body.dark-theme .team-card:hover,
html[data-theme="dark"] .team-card:hover {
  border-color: rgba(255, 255, 255, 0.35) !important;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.95), 0 0 25px rgba(255, 255, 255, 0.08) !important;
}

/* 1. Cyber ID Top Header */
.team-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.9rem;
  margin-bottom: 1.2rem;
  border-bottom: 1px dashed rgba(0, 0, 0, 0.1);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 600;
}

body.dark-theme .team-card-header,
html[data-theme="dark"] .team-card-header {
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

.team-id-badge {
  color: var(--text-primary);
  letter-spacing: 0.05em;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.team-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: #10b981;
  background: rgba(16, 185, 129, 0.1);
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pulse-glow 1.8s infinite;
}

@keyframes pulse-glow {
  0% { opacity: 0.6; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.2); }
  100% { opacity: 0.6; transform: scale(0.9); }
}

/* 2. Avatar with High-Tech Double Glow Ring */
.team-avatar-wrapper {
  position: relative;
  width: 100px;
  height: 100px;
  margin: 0 auto 1.1rem auto;
}

.avatar-glow-ring {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 40%, rgba(0, 0, 0, 0.3) 100%);
  opacity: 0.7;
  animation: rotate-ring 8s linear infinite;
}

body.dark-theme .avatar-glow-ring,
html[data-theme="dark"] .avatar-glow-ring {
  background: conic-gradient(from 0deg, transparent 40%, rgba(255, 255, 255, 0.6) 100%);
}

@keyframes rotate-ring {
  to { transform: rotate(360deg); }
}

.team-avatar-box {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--bg-surface-elevated);
  border: 2.5px solid var(--text-primary);
  overflow: hidden;
  position: relative;
  z-index: 2;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  transition: transform 0.25s ease;
}

.team-card:hover .team-avatar-box {
  transform: scale(1.04);
}

.team-avatar-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 15%;
  display: block;
}

.team-identity-block {
  text-align: center;
  margin-bottom: 0.9rem;
}

.team-dept-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.25rem 0.75rem;
  border-radius: 100px;
  background: rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.14);
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

body.dark-theme .team-dept-badge,
html[data-theme="dark"] .team-dept-badge {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.team-name {
  font-family: var(--font-heading) !important;
  font-size: 1.45rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.03em;
  color: var(--text-primary) !important;
  margin-bottom: 0.25rem;
  line-height: 1.2;
}

.team-role {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-body);
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-silver);
  letter-spacing: 0.02em;
}

/* 4. Bio */
.team-bio {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.3rem;
  text-align: center;
  min-height: 52px;
}

body.dark-theme .skill-tag,
html[data-theme="dark"] .skill-tag {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
}

.skill-tag:hover {
  background: var(--text-primary);
  color: var(--bg-core);
  transform: translateY(-1px);
}

/* 6. Telemetry Row */
.team-telemetry-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  padding: 0.6rem 0.8rem;
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(0, 0, 0, 0.07);
  border-radius: 10px;
  margin-bottom: 1.2rem;
  font-family: var(--font-mono);
}

body.dark-theme .team-telemetry-row,
html[data-theme="dark"] .team-telemetry-row {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.08);
}

.telemetry-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.telemetry-label {
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
}

.telemetry-val {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.03em;
}

/* 7. Luxury Action Buttons Hub */
.team-actions-hub {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  margin-top: auto;
  position: relative;
  z-index: 10;
}

.team-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.6rem 0.8rem;
  border-radius: 10px;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

.btn-linkedin {
  background: #000000;
  color: #ffffff !important;
  border: 1px solid #000000;
}

body.dark-theme .btn-linkedin,
html[data-theme="dark"] .btn-linkedin {
  background: #ffffff;
  color: #000000 !important;
  border-color: #ffffff;
}

.btn-linkedin:hover {
  background: #0077b5 !important;
  border-color: #0077b5 !important;
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 119, 181, 0.35);
}

.btn-email {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text-primary) !important;
  border: 1px solid rgba(0, 0, 0, 0.15);
}

body.dark-theme .btn-email,
html[data-theme="dark"] .btn-email {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff !important;
}

.btn-email:hover {
  background: var(--text-primary) !important;
  color: var(--bg-core) !important;
  border-color: var(--text-primary) !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

/* ==========================================================================
   CONTACT US SECTION
   ========================================================================== */

/* CONTACT US SECTION WITH FULL-SECTION 3D SPLINE BACKGROUND */
.contact-spline-section {
  position: relative;
  min-height: 850px;
  overflow: hidden;
  padding: 6rem 0;
}

.contact-spline-bg-container {
  position: absolute;
  inset: -6%; /* Slightly oversized to allow zoom */
  width: 112%;
  height: 112%;
  z-index: 1;
  overflow: hidden;
  pointer-events: auto;
  will-change: transform;
  transform: translateZ(0);
}

.contact-spline-bg-container spline-viewer {
  width: 100%;
  height: 100%;
  display: block;
  transform: scale(1.15); /* Zoomed in slightly to push any watermark out of viewport */
  transform-origin: center center;
}

.contact-spline-overlay-gradient {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, transparent 40%, rgba(0, 0, 0, 0.35) 100%);
  pointer-events: none;
  z-index: 2;
}

body.light-theme .contact-spline-overlay-gradient {
  background: radial-gradient(circle at 50% 50%, transparent 45%, rgba(0, 0, 0, 0.15) 100%);
}

.contact-content-container {
  position: relative;
  z-index: 5;
  pointer-events: none; /* Let empty space pass through to rotate 3D scene */
}

.contact-content-container .section-header,
.contact-content-container .contact-info-panel,
.contact-content-container .contact-form-card {
  pointer-events: auto; /* Enable clicks and typing on panels */
}

.contact-layout-grid {
  display: grid;
  grid-template-columns: 290px 1fr 340px; /* Left compact, Center wide open for 3D robot, Right compact */
  gap: 1.5rem;
  align-items: start;
  width: 100%;
}

.contact-info-panel.compact-panel {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  max-width: 290px;
}

.contact-center-space {
  min-height: 480px;
  pointer-events: none;
}

/* Glassmorphism Floating Panels */
.contact-layout-grid .glass-panel {
  background: rgba(10, 10, 15, 0.78) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(16, 185, 129, 0.08) !important;
  border-radius: 14px;
  transition: var(--transition-smooth);
}

body.light-theme .contact-layout-grid .glass-panel {
  background: rgba(255, 255, 255, 0.84) !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1), 0 0 15px rgba(16, 185, 129, 0.08) !important;
}

.contact-channel-card {
  padding: 0.85rem 1rem;
  display: flex;
  gap: 0.85rem;
  align-items: center;
}

.contact-channel-card.glass-panel:hover {
  border-color: rgba(16, 185, 129, 0.5) !important;
  transform: translateY(-2px);
  box-shadow: 0 16px 35px rgba(0, 0, 0, 0.6), 0 0 25px rgba(16, 185, 129, 0.2) !important;
}

.channel-icon-box {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #10b981;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  flex-shrink: 0;
}

.channel-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.15rem;
}

.channel-text {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.contact-form-card.compact-form {
  padding: 1.3rem 1.4rem;
  max-width: 340px;
}

@media (max-width: 1024px) {
  .contact-layout-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .contact-info-panel.compact-panel,
  .contact-form-card.compact-form {
    max-width: 100%;
  }
  .contact-center-space {
    display: none;
  }
}

.form-group {
  margin-bottom: 1.1rem;
}

.form-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-silver);
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.cyber-input, .cyber-select, .cyber-textarea {
  width: 100%;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  color: #ffffff;
  font-family: var(--font-body);
  font-size: 0.92rem;
  transition: var(--transition-smooth);
}

.cyber-input:focus, .cyber-select:focus, .cyber-textarea:focus {
  outline: none;
  border-color: #ffffff;
  background: var(--bg-surface-hover);
}

/* ==========================================================================
   TERMINAL & INTAKE
   ========================================================================== */

.join-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2.2rem;
  width: 100%;
}

.terminal-window {
  background: #06070a;
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 480px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.85), 0 0 35px rgba(16, 185, 129, 0.08);
}

.terminal-top-bar {
  background: #0d1016;
  padding: 0.75rem 1.2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

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

.term-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #333;
}

.term-dot:nth-child(1) { background: #ff5f56; }
.term-dot:nth-child(2) { background: #ffbd2e; }
.term-dot:nth-child(3) { background: #27c93f; }

.term-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #86efac;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.terminal-body {
  padding: 1.2rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: #e2e8f0;
  background: #06070a;
  flex-grow: 1;
  overflow-y: auto;
  line-height: 1.65;
}

.term-quick-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0.6rem 1rem;
  background: #0a0d13;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.term-quick-cmd {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: #86efac;
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.term-quick-cmd:hover {
  background: #10b981;
  color: #000000;
  border-color: #10b981;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
}

.terminal-form {
  display: flex;
  align-items: center;
  padding: 0.7rem 1.1rem;
  background: #090c12;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.term-prompt {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: #10b981;
  font-weight: 700;
  margin-right: 0.5rem;
  text-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}

.term-input {
  flex-grow: 1;
  background: transparent;
  border: none;
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  outline: none;
  caret-color: #10b981;
}

.term-input:focus {
  outline: none;
}

.intake-form-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 2.2rem;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.6);
}

.intake-success-box {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 1.4rem;
}

/* ==========================================================================
   MODALS & TOAST
   ========================================================================== */

.cyber-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.cyber-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.85);
  position: relative;
  padding: 2.5rem 2rem;
}

.modal-close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  cursor: pointer;
}

.modal-close-btn:hover {
  color: #ffffff;
}

.spec-row {
  display: flex;
  justify-content: space-between;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.88rem;
}

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

.spec-val {
  color: #ffffff;
  font-family: var(--font-mono);
  font-weight: 600;
}

.bom-item {
  list-style: none;
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.cyber-toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: var(--bg-surface-elevated);
  color: #ffffff;
  border: 1px solid #ffffff;
  padding: 0.9rem 1.6rem;
  border-radius: 100px;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 600;
  z-index: 3000;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
}

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

/* ==========================================================================
   FOOTER
   ========================================================================== */

.cyber-footer {
  background: #040406;
  border-top: 1px solid var(--border-subtle);
  padding: 4.5rem 0 2.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3.5rem;
  width: 100%;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 2.2rem;
  border-top: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

@media (max-width: 1024px) {
  .flagship-countdown-box { grid-template-columns: 1fr; }
  .join-grid { grid-template-columns: 1fr; }
  .contact-layout-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .footer-grid { grid-template-columns: 1fr; }
  .countdown-timer-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-bottom { flex-direction: column; gap: 1rem; text-align: center; }
}


/* ==========================================================================
   FULL-PAGE ROBOT LAB (ONE BOT PER PAGE WITH LIVE TELEMETRY)
   ========================================================================== */

/* BOT SELECTOR TABS */
.rlab-tab-bar {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 0;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0 1.5rem;
  overflow-x: auto;
}

.rlab-tab {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  padding: 1.2rem 2.2rem;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  transition: all 0.25s ease;
  color: var(--text-muted);
  font-family: var(--font-heading);
  min-width: 200px;
  position: relative;
}

.rlab-tab i {
  font-size: 1.1rem;
  margin-bottom: 0.2rem;
  color: var(--text-muted);
  transition: color 0.25s ease;
}

.rlab-tab-title {
  font-size: 1rem;
  font-weight: 700;
  color: inherit;
  transition: color 0.25s ease;
}

.rlab-tab-sub {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.rlab-tab:hover {
  color: var(--text-primary);
  background: var(--bg-surface-elevated);
}

.rlab-tab:hover i,
.rlab-tab:hover .rlab-tab-title {
  color: var(--text-primary);
}

.rlab-tab.active {
  color: #ffffff;
  border-bottom-color: #ffffff;
  background: rgba(255,255,255,0.04);
}

.rlab-tab.active i,
.rlab-tab.active .rlab-tab-title {
  color: #ffffff;
}

/* FULL PAGE PANELS */
.rlab-full-panel {
  display: none;
  width: 100%;
  min-height: calc(100vh - 75px);
  flex-direction: row;
  background: var(--bg-core);
}

.rlab-full-panel.active {
  display: flex;
}

/* LEFT: 3D CANVAS AREA */
.rlab-canvas-area {
  flex: 1;
  min-height: 600px;
  position: relative;
  background: #0a0a10 !important; /* Always dark — Three.js scene.background overrides this anyway */
  display: flex;
  align-items: stretch;
  overflow: hidden;
}

.rlab-canvas-area canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
  position: absolute;
  inset: 0;
}

/* BOTTOM CONTROLS BAR */
.rlab-bottom-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.9rem 1.8rem;
  background: rgba(8, 8, 12, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-subtle);
  flex-wrap: wrap;
  gap: 0.8rem;
}

.rlab-mode-group {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.rlab-mode-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 0.5rem 1.1rem;
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 600;
}

.rlab-mode-btn:hover,
.rlab-mode-btn.active {
  background: #ffffff;
  color: #000000;
  border-color: #ffffff;
  box-shadow: 0 0 16px rgba(255,255,255,0.2);
}

.rlab-spin-group {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  flex-wrap: wrap;
}

.rlab-spin-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 0.5rem 1.1rem;
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 600;
}

.rlab-spin-btn.active {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.4);
}

.rlab-spin-btn:not(.active) {
  opacity: 0.5;
}

.rlab-speed-wrap {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.rlab-speed-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100px;
  height: 4px;
  border-radius: 4px;
  background: rgba(255,255,255,0.15);
  outline: none;
  cursor: pointer;
  transition: background 0.2s;
}

.rlab-speed-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ffffff;
  cursor: pointer;
  box-shadow: 0 0 8px rgba(255,255,255,0.4);
}

/* RIGHT: TELEMETRY PANEL */
.rlab-telemetry-panel {
  width: 340px;
  min-width: 300px;
  max-width: 360px;
  flex-shrink: 0;
  background: var(--bg-surface);
  border-left: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow-y: auto;
  padding: 1.6rem 1.4rem 5rem;
}

.rlab-tele-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.4rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

.rlab-tele-title {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.08em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.rlab-tele-id {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.rlab-live-dot {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  color: #22dd44;
  letter-spacing: 0.08em;
}

.rlab-dot-pulse {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22dd44;
  animation: pulse-live 1.4s infinite;
}

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

.rlab-metric-card {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  margin-bottom: 0.8rem;
  transition: border-color 0.2s ease;
}

.rlab-metric-card:hover {
  border-color: rgba(255,255,255,0.25);
}

.rlab-metric-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.3rem;
}

.rlab-metric-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
}

.rlab-metric-top i {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.rlab-metric-value {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.15;
  margin-bottom: 0.15rem;
}

.rlab-metric-sub {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
}

.rlab-spec-list {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  overflow: hidden;
  margin-top: 0.4rem;
}

.rlab-spec-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.82rem;
}

.rlab-spec-row:last-child {
  border-bottom: none;
}

.rlab-spec-row span:first-child {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

.rlab-spec-row span:last-child {
  color: #ffffff;
  font-weight: 600;
  text-align: right;
}

/* LIGHT THEME OVERRIDES for full robot lab */
body.light-theme .rlab-tab-bar { background: #f4f4f8; border-bottom-color: rgba(0,0,0,0.1); }
body.light-theme .rlab-tab { color: #888; }
body.light-theme .rlab-tab i,
body.light-theme .rlab-tab .rlab-tab-title { color: #888; }
body.light-theme .rlab-tab:hover { background: #ebebf0; color: #000; }
body.light-theme .rlab-tab:hover i,
body.light-theme .rlab-tab:hover .rlab-tab-title { color: #000; }
body.light-theme .rlab-tab.active { color: #000; border-bottom-color: #000; background: #fff; }
body.light-theme .rlab-tab.active i,
body.light-theme .rlab-tab.active .rlab-tab-title { color: #000; }
body.light-theme .rlab-full-panel { background: #fafafa; }
/* rlab-canvas-area always stays dark for 3D contrast - no light-theme override */
body.light-theme .rlab-bottom-controls {
  background: rgba(255,255,255,0.93);
  border-top-color: rgba(0,0,0,0.1);
}
body.light-theme .rlab-mode-btn {
  background: #f0f0f5; border-color: rgba(0,0,0,0.12); color: #555;
}
body.light-theme .rlab-mode-btn:hover,
body.light-theme .rlab-mode-btn.active {
  background: #000000; color: #ffffff; border-color: #000000; box-shadow: none;
}
body.light-theme .rlab-spin-btn { background: #f0f0f5; border-color: rgba(0,0,0,0.12); color: #000; }
body.light-theme .rlab-spin-btn.active { background: #e0e0e8; border-color: rgba(0,0,0,0.3); }
body.light-theme .rlab-speed-slider { background: rgba(0,0,0,0.15); }
body.light-theme .rlab-speed-slider::-webkit-slider-thumb { background: #000; box-shadow: none; }
body.light-theme .rlab-speed-wrap { color: #666; }
body.light-theme .rlab-telemetry-panel { background: #f7f7fc; border-left-color: rgba(0,0,0,0.1); }
body.light-theme .rlab-tele-title { color: #000; }
body.light-theme .rlab-tele-id { color: #888; }
body.light-theme .rlab-metric-card { background: #ffffff; border-color: rgba(0,0,0,0.1); }
body.light-theme .rlab-metric-card:hover { border-color: rgba(0,0,0,0.25); }
body.light-theme .rlab-metric-label { color: #888; }
body.light-theme .rlab-metric-top i { color: #888; }
body.light-theme .rlab-metric-value { color: #000000; }
body.light-theme .rlab-metric-sub { color: #888; }
body.light-theme .rlab-spec-list { background: #fff; border-color: rgba(0,0,0,0.1); }
body.light-theme .rlab-spec-row { border-bottom-color: rgba(0,0,0,0.07); }
body.light-theme .rlab-spec-row span:first-child { color: #888; }
body.light-theme .rlab-spec-row span:last-child { color: #000; }
body.light-theme .rlab-tele-header { border-bottom-color: rgba(0,0,0,0.1); }

@media (max-width: 900px) {
  .rlab-full-panel { flex-direction: column; }
  .rlab-telemetry-panel { width: 100%; max-width: 100%; border-left: none; border-top: 1px solid var(--border-subtle); padding-bottom: 2rem; }
  .rlab-canvas-area { min-height: 420px; }
  .rlab-tab { min-width: 140px; padding: 1rem 1.2rem; }
}


/* ==========================================================================
   ROBOT LAB CANVAS — ALWAYS DARK REGARDLESS OF THEME
   3D viewport always renders on dark background (Three.js scene.background)
   ========================================================================== */

/* Force canvas area to always be dark - this is a 3D viewport */
.rlab-canvas-area,
body.light-theme .rlab-canvas-area {
  background: #0a0a10 !important;
}

/* Ensure canvas fills container fully */
.rlab-canvas-area canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
}

/* In light mode, wireframe mode-btn label stays readable */
body.light-theme .rlab-mode-btn.active {
  background: #111111 !important;
  color: #ffffff !important;
  border-color: #111111 !important;
}

/* Ensure panel fills viewport height */
.rlab-full-panel {
  min-height: calc(100vh - 130px);
}

.rlab-canvas-area {
  min-height: calc(100vh - 190px);
}
