/* ==========================================================================
   SAMBHAV JAIN — PORTFOLIO & DIGITAL CARD COMPANION
   Design System: Glassmorphism 3.0, Soft Pastel Mesh & GPU Micro-Interactions
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. CSS Custom Properties / Design Tokens
   -------------------------------------------------------------------------- */
:root {
  /* Brand Pastel & Vivid Palette */
  --color-brand-blue: #2563EB;
  --color-brand-indigo: #4F46E5;
  --color-brand-violet: #7C3AED;
  --color-brand-cyan: #0284C7;
  --color-brand-sky: #38BDF8;
  --color-brand-emerald: #10B981;
  --color-brand-amber: #F59E0B;
  --color-brand-rose: #F43F5E;

  /* Typography Palette */
  --text-primary: #0F172A;
  --text-secondary: #334155;
  --text-muted: #64748B;
  --text-subtle: #94A3B8;
  --text-white: #FFFFFF;

  /* Glass Surface System */
  --glass-bg-primary: rgba(255, 255, 255, 0.82);
  --glass-bg-secondary: rgba(255, 255, 255, 0.65);
  --glass-bg-card: rgba(255, 255, 255, 0.88);
  --glass-bg-hover: rgba(255, 255, 255, 0.98);
  --glass-border-light: rgba(255, 255, 255, 0.95);
  --glass-border-subtle: rgba(147, 197, 253, 0.35);
  --glass-border-active: rgba(99, 102, 241, 0.45);

  /* Shadows & Elevation */
  --shadow-ambient: 0 30px 80px -15px rgba(59, 130, 246, 0.18), 0 10px 30px -5px rgba(99, 102, 241, 0.12);
  --shadow-card: 0 20px 50px -10px rgba(30, 58, 138, 0.12), 0 8px 20px -6px rgba(59, 130, 246, 0.08);
  --shadow-button: 0 8px 20px -4px rgba(37, 99, 235, 0.12), inset 0 1px 1px rgba(255, 255, 255, 0.9);
  --shadow-button-hover: 0 12px 28px -4px rgba(37, 99, 235, 0.22), 0 4px 12px -2px rgba(99, 102, 241, 0.15);
  --shadow-modal: 0 40px 100px -20px rgba(15, 23, 42, 0.25), 0 20px 40px -10px rgba(59, 130, 246, 0.15);

  /* Radii */
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --radius-pill: 9999px;

  /* Transitions */
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-smooth: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: 150ms var(--ease-smooth);
  --transition-normal: 250ms var(--ease-smooth);
  --transition-bounce: 350ms var(--ease-spring);

  /* Typography */
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* --------------------------------------------------------------------------
   2. Reset & Global Layout (Zero Layout-Shift Scrollbar Gutter)
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scrollbar-width: thin;
  scrollbar-color: rgba(147, 197, 253, 0.65) transparent;
}

/* Global Custom Light-Blue Glass Scrollbar (Matches Modals) */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(147, 197, 253, 0.55);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-brand-blue);
}

body {
  font-family: var(--font-body);
  color: var(--text-primary);
  background-color: #EBF3FE;
  min-height: 100vh;
  min-height: 100dvh;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow-x: hidden;
  line-height: 1.5;
}


/* Scroll Lock when Modal is Active (No Jumps & Frees GPU Cycles) */
html.modal-open, body.modal-open {
  overflow: hidden !important;
  overscroll-behavior: none;
}

body.modal-open .ambient-background {
  opacity: 0.15;
}

body.modal-open .ambient-orb,
body.modal-open .corner-characters-layer,
body.modal-open .satellites-layer {
  display: none !important;
}


/* --------------------------------------------------------------------------
   3. Custom Magnetic Snappy Cursor (Desktop with Hardware Acceleration)
   -------------------------------------------------------------------------- */
@media (pointer: fine) {
  body.has-custom-cursor {
    cursor: none;
  }

  body.has-custom-cursor a,
  body.has-custom-cursor button,
  body.has-custom-cursor input,
  body.has-custom-cursor textarea,
  body.has-custom-cursor [data-cursor],
  body.has-custom-cursor [data-close-modal],
  body.has-custom-cursor .filter-tab {
    cursor: none !important;
  }

  .cursor-dot {
    position: fixed;
    top: 0;
    left: 0;
    width: 6px;
    height: 6px;
    background: var(--color-brand-blue);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    transform: translate3d(-100px, -100px, 0) translate(-50%, -50%);
    will-change: transform, opacity;
    backface-visibility: hidden;
    perspective: 1000px;
    box-shadow: 0 0 10px rgba(37, 99, 235, 0.9);
    transition: opacity 0.15s ease;
    opacity: 0;
  }

  body.has-custom-cursor .cursor-dot {
    opacity: 1;
  }

  .cursor-ring {
    position: fixed;
    top: 0;
    left: 0;
    width: 32px;
    height: 32px;
    padding: 0 4px;
    border: 1.5px solid rgba(37, 99, 235, 0.55);
    background: rgba(255, 255, 255, 0.35);
    border-radius: 16px;
    pointer-events: none;
    z-index: 9999;
    transform: translate3d(-100px, -100px, 0) translate(-50%, -50%);
    will-change: transform, opacity;
    backface-visibility: hidden;
    perspective: 1000px;
    transition: width 0.22s cubic-bezier(0.16, 1, 0.3, 1),
                height 0.22s cubic-bezier(0.16, 1, 0.3, 1),
                padding 0.22s cubic-bezier(0.16, 1, 0.3, 1),
                border-radius 0.22s cubic-bezier(0.16, 1, 0.3, 1),
                background 0.18s ease,
                border-color 0.18s ease,
                box-shadow 0.18s ease,
                opacity 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    opacity: 0;
  }

  body.has-custom-cursor .cursor-ring {
    opacity: 1;
  }

  .cursor-label {
    font-family: var(--font-heading);
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: #FFFFFF;
    opacity: 0;
    transform: scale(0.85);
    transition: opacity 0.18s ease, transform 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
    text-transform: uppercase;
    line-height: 1;
    pointer-events: none;
  }

  /* Cursor Active Hover State (Adaptive Capsule Pill & Total Dot Hide) */
  body.cursor-hovering .cursor-ring {
    width: auto;
    min-width: 58px;
    height: 32px;
    padding: 0 14px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.95) 0%, rgba(79, 70, 229, 0.95) 100%);
    border-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 10px 26px rgba(37, 99, 235, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.6);
  }

  body.cursor-hovering .cursor-dot {
    opacity: 0 !important;
  }

  body.cursor-hovering .cursor-label {
    opacity: 1;
    transform: scale(1);
  }
}


@media (pointer: coarse) {
  .cursor-dot, .cursor-ring {
    display: none !important;
  }
}

/* --------------------------------------------------------------------------
   4. Ambient Canvas & Floating 3D Elements (Clean Lateral Positions)
   -------------------------------------------------------------------------- */
.ambient-background {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  background: radial-gradient(circle at 50% 30%, #F0F6FF 0%, #E2EDFE 50%, #DCE8FC 100%);
  transform: translateZ(0);
}

.ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.6;
  animation: floatOrb 20s ease-in-out infinite alternate;
  will-change: transform;
  transform: translateZ(0);
}

.orb-1 {
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, #93C5FD 0%, rgba(147, 197, 253, 0) 70%);
  top: -10%;
  left: 15%;
  animation-duration: 20s;
}

.orb-2 {
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, #C7D2FE 0%, rgba(199, 210, 254, 0) 70%);
  bottom: -15%;
  right: 10%;
  animation-duration: 24s;
  animation-delay: -5s;
}

.orb-3 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, #A7F3D0 0%, rgba(167, 243, 208, 0) 70%);
  top: 40%;
  left: -10%;
  animation-duration: 22s;
  animation-delay: -8s;
  opacity: 0.45;
}

.orb-4 {
  width: 380px;
  height: 380px;
  background: radial-gradient(circle, #FDE68A 0%, rgba(253, 230, 138, 0) 70%);
  bottom: 20%;
  left: 30%;
  animation-duration: 26s;
  animation-delay: -12s;
  opacity: 0.35;
}

.orb-5 {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, #DDD6FE 0%, rgba(221, 214, 254, 0) 70%);
  top: 15%;
  right: -5%;
  animation-duration: 19s;
  animation-delay: -3s;
}

@keyframes floatOrb {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(30px, -24px, 0) scale(1.05); }
  100% { transform: translate3d(-24px, 30px, 0) scale(0.96); }
}

/* --------------------------------------------------------------------------
   4b. Floating 3D Satellites Layer (Small, Delicate & Positioned in Open Sky)
   -------------------------------------------------------------------------- */
.satellites-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  overflow: hidden;
  transform: translateZ(0);
}

.satellite-item {
  position: absolute;
  pointer-events: auto;
  animation: satelliteFloat 7s ease-in-out infinite alternate;
  will-change: transform;
  transform: translateZ(0);
}

.sat-1 { animation-duration: 7s; }
.sat-2 { animation-duration: 8.5s; animation-delay: -2s; }
.sat-3 { animation-duration: 6.5s; animation-delay: -4s; }
.sat-4 { animation-duration: 7.8s; animation-delay: -1.5s; }
.sat-5 { animation-duration: 9s; animation-delay: -3.5s; }
.sat-6 { animation-duration: 7.2s; animation-delay: -5s; }

.satellite-bubble {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1.2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 22px rgba(37, 99, 235, 0.09), inset 0 1px 1.5px rgba(255, 255, 255, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  transition: transform var(--transition-bounce), box-shadow 0.2s, background-color 0.2s;
  cursor: none;
}

.satellite-bubble:hover {
  transform: scale(1.22) rotate(6deg);
  background: #FFFFFF;
  border-color: rgba(147, 197, 253, 0.9);
  box-shadow: 0 14px 32px rgba(37, 99, 235, 0.2);
}

.satellite-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(37, 99, 235, 0.15));
  user-select: none;
  -webkit-user-drag: none;
}

@keyframes satelliteFloat {
  0% { transform: translate3d(0, 0, 0) rotate(0deg); }
  100% { transform: translate3d(0, -12px, 0) rotate(2deg); }
}

@media (max-width: 1240px) {
  .satellites-layer {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   5. Corner Illustrated Characters (Desktop Visual Depth)
   -------------------------------------------------------------------------- */
.corner-characters-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
  transform: translateZ(0);
}

.corner-char {
  position: absolute;
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
  filter: drop-shadow(0 20px 30px rgba(30, 58, 138, 0.12));
  will-change: transform;
}

.char-img {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
}

.char-top-left {
  top: 2%;
  left: 2%;
  width: min(280px, 22vw);
  animation: floatCharTL 12s ease-in-out infinite alternate;
}

.char-top-right {
  top: 2%;
  right: 2%;
  width: min(270px, 21vw);
  animation: floatCharTR 14s ease-in-out infinite alternate;
}

.char-bottom-left {
  bottom: 2%;
  left: 2%;
  width: min(280px, 22vw);
  animation: floatCharBL 13s ease-in-out infinite alternate;
}

.char-bottom-right {
  bottom: 2%;
  right: 2%;
  width: min(290px, 23vw);
  animation: floatCharBR 15s ease-in-out infinite alternate;
}

@keyframes floatCharTL {
  0% { transform: translate3d(0, 0, 0) rotate(0deg); }
  100% { transform: translate3d(10px, 12px, 0) rotate(1.5deg); }
}

@keyframes floatCharTR {
  0% { transform: translate3d(0, 0, 0) rotate(0deg); }
  100% { transform: translate3d(-12px, 10px, 0) rotate(-1.5deg); }
}

@keyframes floatCharBL {
  0% { transform: translate3d(0, 0, 0) rotate(0deg); }
  100% { transform: translate3d(12px, -10px, 0) rotate(-1deg); }
}

@keyframes floatCharBR {
  0% { transform: translate3d(0, 0, 0) rotate(0deg); }
  100% { transform: translate3d(-10px, -12px, 0) rotate(1deg); }
}

@media (max-width: 1200px) {
  .corner-char {
    opacity: 0.45;
    filter: blur(1px) drop-shadow(0 15px 25px rgba(30, 58, 138, 0.08));
  }
}

@media (max-width: 860px) {
  .corner-characters-layer {
    opacity: 0.25;
  }
  .char-top-left, .char-top-right {
    display: none;
  }
  .char-bottom-left {
    bottom: -20px;
    left: -40px;
    width: 200px;
  }
  .char-bottom-right {
    bottom: -20px;
    right: -40px;
    width: 200px;
  }
}

/* --------------------------------------------------------------------------
   6. Top Floating Utility HUD (Luminous Frosted Glass)
   -------------------------------------------------------------------------- */
.floating-hud {
  position: fixed;
  top: 18px;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  max-width: 860px;
  margin: 0 auto;
  z-index: 100;
  pointer-events: none;
}

/* Available for Projects — Frosted Glass Chip */
.hud-pill {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: var(--radius-pill);
  box-shadow: 0 10px 30px rgba(37, 99, 235, 0.08), inset 0 1px 2px rgba(255, 255, 255, 0.95);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.hud-status {
  white-space: nowrap;
}


.hud-pill:hover {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(147, 197, 253, 0.8);
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(37, 99, 235, 0.16), inset 0 1px 2px #FFFFFF;
}

.pulse-indicator {
  position: relative;
  width: 10px;
  height: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background: var(--color-brand-emerald);
  border-radius: 50%;
}

.pulse-ring {
  position: absolute;
  width: 16px;
  height: 16px;
  background: rgba(16, 185, 129, 0.4);
  border-radius: 50%;
  animation: pulseGreen 2s cubic-bezier(0.24, 0, 0.38, 1) infinite;
}

@keyframes pulseGreen {
  0% { transform: scale(0.6); opacity: 0.9; }
  100% { transform: scale(2.2); opacity: 0; }
}

.hud-controls {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Sound & Share Frosted Glass Buttons */
.hud-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 26px rgba(37, 99, 235, 0.08), inset 0 1px 2px rgba(255, 255, 255, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  outline: none;
}

.hud-btn:hover {
  background: rgba(255, 255, 255, 0.9);
  color: var(--color-brand-blue);
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 14px 32px rgba(37, 99, 235, 0.2), inset 0 1px 2px #FFFFFF;
}

.hud-btn:active {
  transform: scale(0.96);
}

.hud-icon {
  width: 18px;
  height: 18px;
}

/* --------------------------------------------------------------------------
   7. Main Stage & 3D Tilt Card (GPU Accelerated)
   -------------------------------------------------------------------------- */
.page-stage {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 540px;
  padding: 80px 16px 36px;
  display: flex;
  justify-content: center;
  perspective: 1600px;
  -webkit-perspective: 1600px;
}

.card-tilt-wrapper {
  width: 100%;
  transform-style: preserve-3d;
  will-change: transform;
  transform: translateZ(0);
}

.glass-hero-card {
  position: relative;
  width: 100%;
  transform-style: preserve-3d;
  transition: transform 900ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.glass-hero-card.is-engineering-flipped {
  transform: rotateY(180deg) !important;
}

.card-face {
  width: 100%;
  border-radius: var(--radius-xl);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform-style: preserve-3d;
}

.card-face-front {
  position: relative;
  background: var(--glass-bg-primary);
  backdrop-filter: blur(32px) saturate(190%);
  -webkit-backdrop-filter: blur(32px) saturate(190%);
  border: 1.5px solid var(--glass-border-light);
  box-shadow: var(--shadow-ambient);
  padding: 36px 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  overflow: hidden;
  transform: rotateY(0deg);
}

.card-face-back {
  position: absolute;
  inset: 0;
  background: rgba(9, 13, 22, 0.97);
  backdrop-filter: blur(32px) saturate(200%);
  -webkit-backdrop-filter: blur(32px) saturate(200%);
  border: 1.5px solid rgba(56, 189, 248, 0.35);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.55), 0 0 35px rgba(37, 99, 235, 0.2), inset 0 1px 1px rgba(255, 255, 255, 0.15);
  padding: 24px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
  color: #E2E8F0;
  transform: rotateY(180deg);
  z-index: 10;
}


/* Geometric Isometric 3D Pattern Layer (Visible Light/Glass Uiverse Pattern) */
.card-geometric-pattern {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  border-radius: inherit;
  --s: 76px; /* balanced size for crisp isometric grid */
  --c1: #FFFFFF;
  --c2: #E3EEFC;
  --c3: #C8DDF8;

  background: repeating-conic-gradient(
        from 30deg,
        #0000 0 120deg,
        var(--c3) 0 180deg
      )
      calc(0.5 * var(--s)) calc(0.5 * var(--s) * 0.577),
    repeating-conic-gradient(
      from 30deg,
      var(--c1) 0 60deg,
      var(--c2) 0 120deg,
      var(--c3) 0 180deg
    );
  background-size: var(--s) calc(var(--s) * 0.577);
  opacity: 0.48;
  mix-blend-mode: multiply;
}

/* Cursor Glare Sheen (Smooth Subsurface Luminous Glow) */
.card-glare {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle 420px at var(--mouse-x, 50%) var(--mouse-y, 30%), rgba(255, 255, 255, 0.45) 0%, rgba(224, 242, 254, 0.18) 40%, transparent 75%);
  opacity: 0.9;
  z-index: 2;
  transition: opacity 0.2s ease;
}


/* --------------------------------------------------------------------------
   8. Hero Identity & User Profile Avatar
   -------------------------------------------------------------------------- */
.hero-identity {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
  position: relative;
  z-index: 3;
}

.avatar-container {
  position: relative;
  width: 104px;
  height: 104px;
  margin-top: -6px;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  transition: transform var(--transition-bounce);
}

.avatar-container * {
  user-select: none;
  -webkit-user-select: none;
}


.avatar-container:hover {
  transform: scale(1.06);
}

.avatar-glow {
  position: absolute;
  inset: -6px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.45) 0%, rgba(99, 102, 241, 0) 70%);
  border-radius: 50%;
  animation: pulseGlow 3s ease-in-out infinite alternate;
}

@keyframes pulseGlow {
  0% { transform: scale(0.9); opacity: 0.6; }
  100% { transform: scale(1.15); opacity: 1; }
}

.avatar-ring {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg, #FFFFFF 0%, #E0F2FE 100%);
  border: 3.5px solid #FFFFFF;
  box-shadow: 0 14px 32px rgba(37, 99, 235, 0.2);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar-portrait {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
  border-radius: 50%;
  display: block;
}

.hero-text-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hero-name {
  font-family: var(--font-heading);
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  line-height: 1.1;
  background: linear-gradient(135deg, #0F172A 0%, #1E3A8A 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-tagline {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  max-width: 380px;
  line-height: 1.4;
}

/* Interactive Engineering Proof Chips */
.engineering-proof-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 2px;
  margin-bottom: 2px;
}

.proof-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-family: var(--font-heading);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(203, 213, 225, 0.85);
  color: var(--text-primary);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  cursor: pointer;
  outline: none;
  transition: all var(--transition-fast);
}

.proof-chip:hover {
  transform: translateY(-2px);
  background: #FFFFFF;
  border-color: rgba(147, 197, 253, 0.95);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.15);
}

.proof-chip:active {
  transform: scale(0.97);
}

.proof-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot-cyan {
  background: #0284C7;
  box-shadow: 0 0 8px rgba(2, 132, 199, 0.6);
}

.dot-purple {
  background: #7C3AED;
  box-shadow: 0 0 8px rgba(124, 58, 237, 0.6);
}

.dot-emerald {
  background: #059669;
  box-shadow: 0 0 8px rgba(5, 150, 105, 0.6);
}

.proof-label {
  line-height: 1.2;
}

/* Quote Pill from Card Back */

.quote-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  background: linear-gradient(135deg, rgba(238, 242, 255, 0.92) 0%, rgba(224, 242, 254, 0.92) 100%);
  border: 1px solid rgba(199, 210, 254, 0.6);
  border-radius: var(--radius-pill);
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.8), 0 6px 16px rgba(99, 102, 241, 0.08);
  margin-top: 4px;
}

.quote-sparkle-icon {
  width: 18px;
  height: 18px;
  color: var(--color-brand-indigo);
  flex-shrink: 0;
}

.quote-text {
  font-size: 0.8rem;
  font-weight: 600;
  color: #3730A3;
  line-height: 1.35;
}

/* --------------------------------------------------------------------------
   9. Primary Action Matrix (The Coherent Buttons)
   -------------------------------------------------------------------------- */
.actions-matrix {
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  z-index: 3;
}

.action-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  background: var(--glass-bg-card);
  border: 1.5px solid var(--glass-border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-button);
  text-decoration: none;
  color: var(--text-primary);
  transition: all var(--transition-bounce);
  overflow: hidden;
  text-align: left;
  outline: none;
  transform: translateZ(0);
}

.action-card-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle 200px at var(--item-x, 50%) var(--item-y, 50%), rgba(255, 255, 255, 0.8), transparent 70%);
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}

.action-card:hover .action-card-glow {
  opacity: 1;
}

.action-card:hover {
  transform: translateY(-3px) scale(1.015);
  background: var(--glass-bg-hover);
  border-color: rgba(147, 197, 253, 0.8);
  box-shadow: var(--shadow-button-hover);
}

.action-card:active {
  transform: scale(0.985);
}

/* Icon Wrappers */
.action-icon-wrap {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform var(--transition-bounce);
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.8);
}

.action-card:hover .action-icon-wrap {
  transform: scale(1.1) rotate(4deg);
}

.action-icon-wrap svg {
  width: 22px;
  height: 22px;
}

.icon-cyan {
  background: linear-gradient(135deg, #E0F2FE 0%, #BAE6FD 100%);
  color: #0284C7;
  border: 1px solid #7DD3FC;
}

.icon-violet {
  background: linear-gradient(135deg, #EDE9FE 0%, #DDD6FE 100%);
  color: #7C3AED;
  border: 1px solid #C4B5FD;
}

.icon-rose {
  background: linear-gradient(135deg, #FFE4E6 0%, #FECDD3 100%);
  color: #E11D48;
  border: 1px solid #FDA4AF;
}

.icon-slate {
  background: linear-gradient(135deg, #F1F5F9 0%, #E2E8F0 100%);
  color: #1E293B;
  border: 1px solid #CBD5E1;
}

/* --------------------------------------------------------------------------
   Action Card Theme Variants (Subtle Accent Tinted Containers)
   -------------------------------------------------------------------------- */
.btn-capabilities {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.94) 0%, rgba(224, 242, 254, 0.52) 100%);
  border-color: rgba(186, 230, 253, 0.75);
}

.btn-capabilities:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(224, 242, 254, 0.82) 100%);
  border-color: rgba(56, 189, 248, 0.85);
  box-shadow: 0 14px 30px -4px rgba(2, 132, 199, 0.18), 0 4px 12px -2px rgba(56, 189, 248, 0.12);
}

.btn-capabilities:hover .action-arrow {
  background: #0284C7;
  color: #FFFFFF;
}

.btn-apps {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.94) 0%, rgba(237, 233, 254, 0.52) 100%);
  border-color: rgba(221, 214, 254, 0.75);
}

.btn-apps:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(237, 233, 254, 0.82) 100%);
  border-color: rgba(167, 139, 250, 0.85);
  box-shadow: 0 14px 30px -4px rgba(124, 58, 237, 0.18), 0 4px 12px -2px rgba(167, 139, 250, 0.12);
}

.btn-apps:hover .action-arrow {
  background: #7C3AED;
  color: #FFFFFF;
}

.btn-github {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.94) 0%, rgba(241, 245, 249, 0.65) 100%);
  border-color: rgba(203, 213, 225, 0.75);
}

.btn-github:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(241, 245, 249, 0.9) 100%);
  border-color: rgba(100, 116, 139, 0.75);
  box-shadow: 0 14px 30px -4px rgba(30, 41, 59, 0.14), 0 4px 12px -2px rgba(30, 41, 59, 0.08);
}

.btn-github:hover .action-arrow {
  background: #1E293B;
  color: #FFFFFF;
}


.action-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex-grow: 1;
  min-width: 0;
}

.action-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.action-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.action-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: #EFF6FF;
  color: var(--color-brand-blue);
  border: 1px solid #DBEAFE;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-featured {
  background: #FAF5FF;
  color: #7E22CE;
  border-color: #F3E8FF;
}

.badge-red {
  background: #FFF1F2;
  color: #BE123C;
  border-color: #FFE4E6;
}

.badge-slate {
  background: #F1F5F9;
  color: #334155;
  border-color: #E2E8F0;
}


.action-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.action-arrow {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(241, 245, 249, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

.action-card:hover .action-arrow {
  background: var(--color-brand-blue);
  color: #FFFFFF;
  transform: translateX(4px);
}

.action-arrow svg {
  width: 14px;
  height: 14px;
}

/* --------------------------------------------------------------------------
   10. Connect Dock & Quick Actions
   -------------------------------------------------------------------------- */
.connect-dock {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid rgba(226, 232, 240, 0.8);
  position: relative;
  z-index: 3;
}

/* Save Contact (vCard) Super Chip */
.connect-chip {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-radius: var(--radius-lg);
  border: 1.5px solid rgba(199, 210, 254, 0.7);
  background: linear-gradient(135deg, rgba(238, 242, 255, 0.95) 0%, rgba(224, 242, 254, 0.95) 100%);
  box-shadow: 0 10px 25px rgba(79, 70, 229, 0.12), inset 0 1px 1px #FFFFFF;
  color: var(--text-primary);
  transition: all var(--transition-bounce);
  outline: none;
}

.connect-chip:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, #FFFFFF 0%, #EEF2FF 100%);
  border-color: var(--color-brand-indigo);
  box-shadow: 0 14px 30px rgba(79, 70, 229, 0.2);
}

.connect-chip:active {
  transform: scale(0.98);
}

.chip-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--color-brand-indigo);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 6px 14px rgba(79, 70, 229, 0.35);
}

.chip-icon svg {
  width: 20px;
  height: 20px;
}

.chip-content {
  display: flex;
  flex-direction: column;
  text-align: left;
  flex-grow: 1;
}

.chip-label {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: #1E1B4B;
}

.chip-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.chip-badge-highlight {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--color-brand-indigo);
  color: #FFFFFF;
  box-shadow: 0 4px 10px rgba(79, 70, 229, 0.3);
}

/* Quick Contact Grid */
.quick-contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.contact-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--glass-bg-card);
  border: 1px solid var(--glass-border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-button);
  text-decoration: none;
  color: var(--text-primary);
  transition: all var(--transition-fast);
  outline: none;
}

.contact-pill:hover {
  background: #FFFFFF;
  transform: translateY(-2px);
  border-color: rgba(147, 197, 253, 0.8);
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.12);
}

.contact-pill:active {
  transform: scale(0.97);
}

.pill-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pill-icon svg {
  width: 16px;
  height: 16px;
}

.icon-wa {
  background: #DCFCE7;
  color: #16A34A;
}

.icon-phone {
  background: #E0F2FE;
  color: #0284C7;
}

.icon-mail {
  background: #FEF3C7;
  color: #D97706;
}

.icon-copy {
  background: #EDE9FE;
  color: #7C3AED;
}

.pill-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  text-align: left;
}

.pill-name {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.pill-val {
  font-size: 0.68rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Footer */
.card-footer {
  text-align: center;
  padding-top: 6px;
  position: relative;
  z-index: 3;
}

.footer-copy {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-subtle);
}

.footer-privacy-link {
  color: var(--color-brand-blue);
  text-decoration: none;
  font-weight: 600;
  transition: opacity var(--transition-fast);
}

.footer-privacy-link:hover {
  text-decoration: underline;
  opacity: 0.85;
}


/* --------------------------------------------------------------------------
   11. Modal System (High-Performance GPU-Optimized Frosted Glass)
   -------------------------------------------------------------------------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  pointer-events: none;
  visibility: hidden;
}

.modal-overlay.is-active {
  visibility: visible;
  pointer-events: auto;
}

/* Single Fast Backdrop Blur Layer (Zero CPU/GPU Bottleneck) */
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  opacity: 0;
  transition: opacity 0.22s ease-out;
  will-change: opacity;
}

.modal-overlay.is-active .modal-backdrop {
  opacity: 1;
}

.modal-container {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 640px;
  max-height: 88vh;
  background: rgba(255, 255, 255, 0.95);
  border: 1.5px solid rgba(255, 255, 255, 0.98);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-modal);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: scale(0.95) translateY(14px);
  transition: transform 0.28s var(--ease-spring), opacity 0.2s ease-out;
  will-change: transform, opacity;
}

.modal-container-video {
  max-width: 720px;
}

.modal-container-sm {
  max-width: 440px;
}

.modal-overlay.is-active .modal-container {
  opacity: 1;
  transform: scale(1) translateY(0);
}

/* Modal Scroll Container */
.modal-scroll-area {
  overflow-y: auto;
  height: 100%;
  max-height: 88vh;
  position: relative;
  display: flex;
  flex-direction: column;
  -webkit-overflow-scrolling: touch;
}

/* Unified Sticky Frosted Top Bar */
.modal-sticky-top {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: 0 4px 18px rgba(37, 99, 235, 0.04);
  display: flex;
  flex-direction: column;
}


/* Modal Header Inside Sticky Top */
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 28px 12px;
  background: transparent;
}

.modal-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.modal-icon-badge {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.modal-icon-badge svg {
  width: 22px;
  height: 22px;
}

.modal-title {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
}

.modal-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.modal-close-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(203, 213, 225, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  outline: none;
}

.modal-close-btn:hover {
  background: #F43F5E;
  color: #FFFFFF;
  border-color: #F43F5E;
  transform: rotate(90deg);
}

.modal-close-btn svg {
  width: 18px;
  height: 18px;
}

/* Filter Tabs Bar (Integrated with Frosted Top) */
.filter-tabs-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 28px 16px;
  background: transparent;
  overflow-x: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.filter-tabs-bar::-webkit-scrollbar {
  display: none;
}

.filter-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(203, 213, 225, 0.7);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  transition: all var(--transition-fast);
  outline: none;
}

.tab-svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.filter-tab:hover {
  background: #FFFFFF;
  color: var(--color-brand-blue);
  border-color: rgba(147, 197, 253, 0.8);
  transform: translateY(-1px);
}

.filter-tab.is-active {
  background: var(--color-brand-blue);
  color: #FFFFFF;
  border-color: var(--color-brand-blue);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}

.filter-tab.is-active .tab-svg {
  color: #FFFFFF;
}

/* Modal Content Area (Scrolls Underneath Sticky Top) */
.modal-content-area {
  padding: 20px 28px 28px;
  flex-grow: 1;
}

.custom-scrollbar::-webkit-scrollbar {
  width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: rgba(147, 197, 253, 0.5);
  border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: var(--color-brand-blue);
}

/* Capabilities Grid & Cards */
.capabilities-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.capability-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.04);
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}


.capability-card:hover {
  background: #FFFFFF;
  border-color: rgba(99, 102, 241, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.1);
}

.cap-icon-box {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, #F0F6FF 0%, #E0F2FE 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 6px;
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.8), 0 4px 12px rgba(37, 99, 235, 0.06);
}

.cap-3d-thumb {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 8px;
  filter: drop-shadow(0 4px 8px rgba(37, 99, 235, 0.14));
}

.cap-details {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cap-name {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.25;
}

.cap-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.cap-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.tag {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
  background: #F1F5F9;
  color: var(--text-muted);
}

.cap-inquire-btn {
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%);
  border: 1px solid #BFDBFE;
  color: var(--color-brand-blue);
  font-size: 0.75rem;
  font-weight: 700;
  text-decoration: none;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.cap-inquire-btn:hover {
  background: var(--color-brand-blue);
  color: #FFFFFF;
  border-color: var(--color-brand-blue);
  transform: translateX(2px);
}

.cap-inquire-btn svg {
  width: 14px;
  height: 14px;
}

/* Modal Footer (Sticky Frosted Glass) */
.modal-footer {
  position: sticky;
  bottom: 0;
  z-index: 25;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 28px;
  border-top: 1px solid rgba(226, 232, 240, 0.75);
  background: rgba(255, 255, 255, 0.96);
  gap: 12px;
  margin-top: auto;
}


.modal-footer-note {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.footer-note-icon {
  width: 16px;
  height: 16px;
  color: var(--color-brand-amber);
  flex-shrink: 0;
}

.modal-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: linear-gradient(135deg, var(--color-brand-blue) 0%, var(--color-brand-indigo) 100%);
  color: #FFFFFF;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.25);
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.modal-action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(37, 99, 235, 0.35);
}

.modal-action-btn svg {
  width: 16px;
  height: 16px;
}

/* --------------------------------------------------------------------------
   12. Intelligent Dual-State Expandable Project Portfolio System
   -------------------------------------------------------------------------- */
.modal-container-lg {
  max-width: 820px;
}

/* Portfolio Meta Quick Bar (Showing count + Expand All Toggle) */
.portfolio-meta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px 18px;
  gap: 12px;
}

.meta-status-text {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-brand-emerald);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.6);
}

.btn-toggle-all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(203, 213, 225, 0.8);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  outline: none;
}

.btn-toggle-all:hover {
  background: #FFFFFF;
  color: var(--color-brand-blue);
  border-color: rgba(147, 197, 253, 0.9);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
}

.toggle-icon {
  width: 14px;
  height: 14px;
  transition: transform 0.25s var(--ease-smooth);
}

.btn-toggle-all.is-expanded .toggle-icon {
  transform: rotate(180deg);
}

/* Project Groups */
.projects-section-group {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 24px;
}

.section-badge-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-left: 2px;
}

.group-title {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-brand-indigo);
  white-space: nowrap;
}

.group-line {
  flex-grow: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(199, 210, 254, 0.8) 0%, rgba(226, 232, 240, 0.1) 100%);
}

.projects-list-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ==========================================================================
   Project Showcase Card (Sophisticated Dual-State Accordion)
   ========================================================================== */
.project-showcase-card {
  position: relative;
  background: rgba(255, 255, 255, 0.86);
  border: 1.5px solid rgba(226, 232, 240, 0.95);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 18px rgba(37, 99, 235, 0.04);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
}


.project-showcase-card:hover {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(147, 197, 253, 0.85);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.1);
}

.project-showcase-card.is-expanded {
  background: #FFFFFF;
  border-color: rgba(99, 102, 241, 0.5);
  box-shadow: 0 16px 36px rgba(37, 99, 235, 0.12);
}

.project-showcase-card.is-hidden {
  display: none !important;
}

/* Card Header Summary Row */
.project-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  outline: none;
  user-select: none;
}

.project-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-grow: 1;
  min-width: 0;
}

.project-num-badge {
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--color-brand-indigo);
  background: rgba(238, 242, 255, 0.9);
  border: 1px solid rgba(199, 210, 254, 0.8);
  padding: 4px 8px;
  border-radius: 8px;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

.project-thumb-box {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  background: linear-gradient(135deg, #F0F6FF 0%, #E0F2FE 100%);
  flex-shrink: 0;
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.8), 0 4px 12px rgba(37, 99, 235, 0.06);
  overflow: hidden;
}

.project-3d-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  filter: drop-shadow(0 2px 6px rgba(37, 99, 235, 0.12));
}

.icon-mobile { background: linear-gradient(135deg, #F0FDF4 0%, #DCFCE7 100%); }
.icon-ai { background: linear-gradient(135deg, #F5F3FF 0%, #EDE9FE 100%); }
.icon-iot { background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%); }
.icon-ui { background: linear-gradient(135deg, #FFF7ED 0%, #FFEDD5 100%); }

.project-title-group {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.project-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.project-title {
  font-family: var(--font-heading);
  font-size: 1.12rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
}

.project-subtitle {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  line-height: 1.35;
}

/* Category & Status Pills */
.project-tag-pill {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 6px;
  text-transform: uppercase;
}

.pill-ai { background: #EEF2FF; color: #4F46E5; border: 1px solid #C7D2FE; }
.pill-prod { background: #ECFDF5; color: #059669; border: 1px solid #A7F3D0; }
.pill-rust { background: #FFF7ED; color: #EA580C; border: 1px solid #FFEDD5; }
.pill-flutter { background: #EFF6FF; color: #0284C7; border: 1px solid #BAE6FD; }
.pill-tools { background: #FAF5FF; color: #9333EA; border: 1px solid #E9D5FF; }
.pill-featured { background: #FEF3C7; color: #D97706; border: 1px solid #FDE68A; }
.pill-fsrs { background: #F0FDF4; color: #16A34A; border: 1px solid #BBF7D0; }
.pill-mesh { background: #F0F9FF; color: #0891B2; border: 1px solid #BAE6FD; }
.pill-ollama { background: #FFF1F2; color: #E11D48; border: 1px solid #FECDD3; }

/* Right Expand Trigger */
.project-header-right {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.project-expand-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(241, 245, 249, 0.9);
  border: 1px solid rgba(203, 213, 225, 0.8);
  border-radius: 8px;
  font-family: var(--font-heading);
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.project-card-header:hover .project-expand-btn {
  background: var(--color-brand-indigo);
  color: #FFFFFF;
  border-color: var(--color-brand-indigo);
}

.chevron-icon {
  width: 14px;
  height: 14px;
  transition: transform var(--transition-bounce);
}

.project-showcase-card.is-expanded .chevron-icon {
  transform: rotate(180deg);
}

/* Tagline Bar */
.project-tagline-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 7px 12px;
  background: linear-gradient(135deg, rgba(238, 242, 255, 0.7) 0%, rgba(240, 249, 255, 0.7) 100%);
  border-radius: 8px;
  border: 1px solid rgba(199, 210, 254, 0.5);
  font-size: 0.8rem;
  font-weight: 600;
  color: #3730A3;
  line-height: 1.35;
}

.quote-mini-icon {
  width: 14px;
  height: 14px;
  color: var(--color-brand-indigo);
  flex-shrink: 0;
}

/* ==========================================================================
   Smooth Hardware-Accelerated Drawer (CSS Grid 0fr -> 1fr)
   ========================================================================== */
.project-drawer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.38s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: grid-template-rows;
}

.project-showcase-card.is-expanded .project-drawer {
  grid-template-rows: 1fr;
}

.project-drawer-inner {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(226, 232, 240, 0.8);
  margin-top: 12px;
}

/* Project Visual Showcase Banner */
.project-visual-preview {
  position: relative;
  width: 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: linear-gradient(135deg, #F8FAFC 0%, #EFF6FF 100%);
  border: 1.5px solid rgba(219, 234, 254, 0.9);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  max-height: 260px;
}

.project-visual-img {
  width: 100%;
  height: auto;
  max-height: 260px;
  object-fit: cover;
  object-position: top center;
  display: block;
  transition: transform var(--transition-normal);
}

.project-showcase-card:hover .project-visual-img {
  transform: scale(1.02);
}

/* Architectural Pipeline Box */
.arch-pipeline-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px;
  background: rgba(248, 250, 252, 0.95);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius-md);
}

.pipeline-label {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.pipeline-steps {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.step-pill {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
}

.step-blue { background: #EFF6FF; color: #1D4ED8; border: 1px solid #DBEAFE; }
.step-purple { background: #FAF5FF; color: #7E22CE; border: 1px solid #F3E8FF; }
.step-emerald { background: #ECFDF5; color: #047857; border: 1px solid #A7F3D0; }

.arrow-sep {
  width: 14px;
  height: 14px;
  color: var(--text-subtle);
  flex-shrink: 0;
}

/* Section Blocks */
.project-section-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
}

.section-icon {
  width: 15px;
  height: 15px;
  color: var(--color-brand-blue);
  flex-shrink: 0;
}

.section-text {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.48;
}

/* What I Built Features List */
.built-features-grid {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 14px;
}

.built-features-grid li {
  position: relative;
  padding-left: 18px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.38;
}

.built-features-grid li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  width: 13px;
  height: 13px;
  background-color: var(--color-brand-emerald);
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E") no-repeat center / contain;
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E") no-repeat center / contain;
}


/* Tech Highlight Callout */
.tech-highlight-callout {
  padding: 12px 14px;
  background: linear-gradient(135deg, rgba(238, 242, 255, 0.85) 0%, rgba(245, 243, 255, 0.85) 100%);
  border: 1px solid rgba(199, 210, 254, 0.7);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.callout-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 800;
  color: #3730A3;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.callout-title svg {
  width: 15px;
  height: 15px;
  color: var(--color-brand-indigo);
}

.callout-desc {
  font-size: 0.8rem;
  color: #312E81;
  line-height: 1.45;
}

.callout-desc code {
  font-family: monospace;
  font-size: 0.75rem;
  background: rgba(255, 255, 255, 0.8);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(199, 210, 254, 0.8);
  color: #1E1B4B;
}

/* Tech Stack Wrap */
.project-tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 4px;
}

.tech-tag {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 6px;
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
  color: #334155;
}

/* Project Card Footer Actions */
.project-card-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(241, 245, 249, 0.9);
}

.proj-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.proj-action-btn.btn-gh {
  background: #F1F5F9;
  color: var(--text-secondary);
  border: 1px solid #CBD5E1;
}

.proj-action-btn.btn-gh:hover {
  background: #0F172A;
  color: #FFFFFF;
  border-color: #0F172A;
}

.proj-action-btn.btn-private {
  background: rgba(241, 245, 249, 0.9);
  color: var(--text-muted);
  border: 1px solid rgba(203, 213, 225, 0.85);
  cursor: default;
}

.proj-action-btn.btn-private:hover {
  background: #E2E8F0;
  border-color: #94A3B8;
  color: var(--text-secondary);
}


.proj-action-btn.btn-inquire {
  background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%);
  color: var(--color-brand-blue);
  border: 1px solid #BFDBFE;
}

.proj-action-btn.btn-inquire:hover {
  background: var(--color-brand-blue);
  color: #FFFFFF;
  border-color: var(--color-brand-blue);
}

.proj-action-btn svg {
  width: 14px;
  height: 14px;
}

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

  .pipeline-steps {
    flex-direction: column;
    align-items: flex-start;
  }

  .arrow-sep {
    transform: rotate(90deg);
  }

  .project-card-footer {
    justify-content: stretch;
    flex-direction: column;
  }

  .proj-action-btn {
    justify-content: center;
    width: 100%;
  }
}

/* --------------------------------------------------------------------------
   13. Video Player Screen
   -------------------------------------------------------------------------- */
.video-player-wrapper {
  position: relative;
  width: 100%;
}

.video-mockup-screen {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: radial-gradient(circle at center, #1E293B 0%, #0F172A 100%);
  border-radius: var(--radius-lg);
  border: 2px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.video-ambient-glow {
  position: absolute;
  width: 60%;
  height: 60%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.4) 0%, rgba(99, 102, 241, 0) 70%);
  filter: blur(40px);
}

.video-placeholder-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.video-play-orb {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #F43F5E 0%, #E11D48 100%);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px rgba(244, 63, 94, 0.4);
  transition: transform var(--transition-bounce);
}

.video-play-orb:hover {
  transform: scale(1.15);
}

.video-play-orb svg {
  width: 26px;
  height: 26px;
  margin-left: 3px;
}

.video-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: #FFFFFF;
}

.video-tagline {
  font-size: 0.8rem;
  color: #94A3B8;
  max-width: 360px;
}

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

.video-meta-pills .tag {
  background: rgba(255, 255, 255, 0.1);
  color: #E2E8F0;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

/* --------------------------------------------------------------------------
   14. Share / QR Modal
   -------------------------------------------------------------------------- */
.text-center {
  text-align: center;
}

.qr-display-box {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 24px;
  background: #FFFFFF;
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 40px rgba(37, 99, 235, 0.12);
  border: 1.5px solid rgba(199, 210, 254, 0.5);
  margin-bottom: 20px;
}

.qr-glow-effect {
  position: absolute;
  inset: -10px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.25) 0%, transparent 70%);
  border-radius: var(--radius-xl);
  z-index: -1;
}

.qr-vector-code {
  display: block;
}

.qr-caption {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.share-actions-row {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.share-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  background: #F1F5F9;
  border: 1px solid #CBD5E1;
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.share-pill-btn:hover {
  background: #FFFFFF;
  border-color: var(--color-brand-blue);
  color: var(--color-brand-blue);
  transform: translateY(-2px);
}

.share-pill-btn.btn-wa-share {
  background: #25D366;
  color: #FFFFFF;
  border-color: #16A34A;
}

.share-pill-btn.btn-wa-share:hover {
  background: #16A34A;
  color: #FFFFFF;
}

.share-pill-btn svg {
  width: 16px;
  height: 16px;
}

/* --------------------------------------------------------------------------
   15. Toast Notifications Hub
   -------------------------------------------------------------------------- */
.toast-hub {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast-item {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-pill);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.25);
  color: #FFFFFF;
  font-size: 0.85rem;
  font-weight: 600;
  animation: toastEntrance 0.35s var(--ease-spring) forwards;
}

.toast-item.is-exiting {
  animation: toastExit 0.25s ease-out forwards;
}

.toast-icon {
  width: 18px;
  height: 18px;
  color: var(--color-brand-emerald);
  flex-shrink: 0;
}

@keyframes toastEntrance {
  from { opacity: 0; transform: translateY(20px) scale(0.9); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toastExit {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to { opacity: 0; transform: translateY(-10px) scale(0.9); }
}

/* --------------------------------------------------------------------------
   16. Responsive Media Queries
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  .floating-hud {
    top: max(14px, env(safe-area-inset-top));
    padding: 0 16px;
    max-width: 100%;
    gap: 10px;
  }

  .hud-pill {
    padding: 7px 12px;
    font-size: 0.76rem;
    gap: 6px;
  }

  .hud-cmd-kbd {
    display: none;
  }

  .hud-cmd-btn {
    width: 38px;
    height: 38px;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
  }
}

@media (max-width: 640px) {
  .page-stage {
    padding: 68px 12px 24px;
  }

  .glass-hero-card {
    background: transparent !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
  }

  .card-face-front {
    padding: 24px 16px 20px;
    border-radius: var(--radius-lg);
    gap: 18px;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
  }

  .card-face-back {
    padding: 20px 14px 16px;
    border-radius: var(--radius-lg);
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
  }

  .hero-name {
    font-size: 1.85rem;
  }

  .hero-tagline {
    font-size: 0.88rem;
  }

  .floating-hud {
    top: max(10px, env(safe-area-inset-top));
    padding: 0 12px;
    gap: 8px;
  }

  /* Intelligently prioritize the Perspective Switch on phones over redundant status pill */
  .hud-pill {
    display: none;
  }

  .hud-left-group {
    gap: 6px;
  }

  .hud-mode-pill {
    padding: 2px;
    border-radius: var(--radius-pill);
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.08);
  }

  .mode-btn {
    padding: 6px 12px;
    font-size: 0.74rem;
    gap: 5px;
  }

  .hud-controls {
    gap: 6px;
  }

  .hud-btn {
    width: 38px;
    height: 38px;
    min-width: 38px;
  }

  .quote-pill {
    padding: 8px 12px;
  }

  .quote-text {
    font-size: 0.74rem;
  }


  .action-card {
    padding: 13px 14px;
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
  }

  .action-icon-wrap {
    width: 38px;
    height: 38px;
  }

  .action-title {
    font-size: 0.95rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .action-desc {
    font-size: 0.75rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .connect-dock {
    width: 100%;
    box-sizing: border-box;
  }

  .connect-chip {
    padding: 12px 14px;
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
  }

  .chip-content {
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
  }

  .chip-label {
    font-size: 0.88rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .chip-sub {
    font-size: 0.7rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .chip-badge-highlight {
    flex-shrink: 0;
    font-size: 0.65rem;
    padding: 3px 8px;
  }

  .quick-contact-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
  }

  .contact-pill {
    padding: 8px 10px;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
    overflow: hidden;
  }

  .pill-icon {
    width: 28px;
    height: 28px;
  }

  .pill-info {
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
  }

  .pill-name {
    font-size: 0.72rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .pill-val {
    font-size: 0.62rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

@media (max-width: 380px) {
  .card-face-front {
    padding: 20px 12px 16px;
  }

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

  .contact-pill {
    padding: 8px 12px;
  }

  .eng-action-dock {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }

  .eng-dock-btn {
    padding: 8px 4px;
    font-size: 0.62rem;
  }
}


  /* ------------------------------------------------------------------------
     HIGH-PERFORMANCE MOBILE BOTTOM SHEET MODAL
     ------------------------------------------------------------------------ */
  .modal-overlay {
    padding: 0;
    align-items: flex-end;
    justify-content: center;
  }

  .modal-backdrop {
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  .modal-container {
    width: 100%;
    max-width: 100%;
    height: 90vh;
    max-height: 90vh;
    border-radius: 24px 24px 0 0;
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.22);
    transform: translateY(100%);
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease-out;
    background: #FFFFFF;
  }

  .modal-overlay.is-active .modal-container {
    transform: translateY(0);
  }

  .modal-scroll-area {
    height: 100%;
    max-height: 90vh;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    touch-action: pan-y;
    contain: paint;
  }

  /* Top Drag Pill & Solid High-Performance Header */
  .modal-sticky-top {
    background: #FFFFFF;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom: 1px solid #E2E8F0;
  }

  .modal-sticky-top::before {
    content: '';
    display: block;
    width: 40px;
    height: 4px;
    background: #CBD5E1;
    border-radius: 4px;
    margin: 8px auto 0;
    flex-shrink: 0;
  }

  .modal-header {
    padding: 12px 16px 10px;
  }

  .modal-header-left {
    gap: 10px;
    min-width: 0;
  }

  .modal-icon-badge {
    width: 38px;
    height: 38px;
    border-radius: 10px;
  }

  .modal-title {
    font-size: 1.15rem;
    line-height: 1.2;
  }

  .modal-subtitle {
    font-size: 0.76rem;
  }

  .modal-close-btn {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
  }

  .filter-tabs-bar {
    padding: 4px 16px 12px;
    gap: 6px;
  }

  .filter-tab {
    padding: 5px 12px;
    font-size: 0.74rem;
  }

  .modal-content-area {
    padding: 14px 14px 20px;
  }

  /* ------------------------------------------------------------------------
     CAPABILITIES MOBILE GRID (Icon + Content + Full Width Inquire Action)
     ------------------------------------------------------------------------ */
  .capabilities-grid {
    gap: 12px;
  }

  .capability-card {
    display: grid;
    grid-template-columns: 44px 1fr;
    grid-template-rows: auto auto;
    grid-template-areas:
      "icon details"
      "action action";
    gap: 10px 12px;
    padding: 14px;
    border-radius: 14px;
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.04);
  }

  .capability-card:hover {
    transform: none;
  }

  .cap-icon-box {
    grid-area: icon;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    padding: 4px;
  }

  .cap-details {
    grid-area: details;
    min-width: 0;
    gap: 3px;
  }

  .cap-name {
    font-size: 0.95rem;
    line-height: 1.25;
  }

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

  .cap-tags {
    margin-top: 4px;
    gap: 4px;
  }

  .tag {
    font-size: 0.68rem;
    padding: 2px 6px;
  }

  .cap-inquire-btn {
    grid-area: action;
    width: 100%;
    justify-content: center;
    padding: 10px 14px;
    font-size: 0.8rem;
    margin-top: 4px;
    border-radius: 10px;
  }

  /* ------------------------------------------------------------------------
     PROJECT SHOWCASE CARDS MOBILE
     ------------------------------------------------------------------------ */
  .portfolio-meta-bar {
    padding: 0 2px 14px;
  }

  .meta-status-text {
    font-size: 0.75rem;
  }

  .project-showcase-card {
    padding: 14px;
    border-radius: 14px;
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
  }

  .project-showcase-card:hover {
    transform: none;
  }

  .project-card-header {
    gap: 10px;
  }

  .project-header-left {
    gap: 10px;
  }

  .project-num-badge {
    font-size: 0.72rem;
    padding: 2px 6px;
    border-radius: 6px;
  }

  .project-thumb-box {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    padding: 2px;
  }

  .project-title {
    font-size: 0.98rem;
  }

  .project-subtitle {
    font-size: 0.78rem;
  }

  .project-tag-pill {
    font-size: 0.62rem;
    padding: 2px 6px;
  }

  .project-expand-btn {
    padding: 6px 10px;
    font-size: 0.72rem;
    border-radius: 8px;
  }

  .expand-label {
    display: none;
  }

  .project-tagline-bar {
    margin-top: 8px;
    padding: 6px 10px;
    font-size: 0.76rem;
  }

  .built-features-grid {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .project-card-footer {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
  }

  .proj-action-btn {
    width: 100%;
    justify-content: center;
    padding: 9px 10px;
    font-size: 0.76rem;
    border-radius: 8px;
  }

  /* ------------------------------------------------------------------------
     MODAL STICKY FOOTER ON MOBILE
     ------------------------------------------------------------------------ */
  .modal-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px 16px calc(14px + env(safe-area-inset-bottom, 0px));
    background: #FFFFFF;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-top: 1px solid #E2E8F0;
  }

  .modal-footer-note {
    justify-content: center;
    text-align: center;
    font-size: 0.76rem;
    line-height: 1.3;
  }

  .modal-action-btn {
    width: 100%;
    justify-content: center;
    padding: 12px 16px;
    font-size: 0.85rem;
    border-radius: 12px;
  }

  /* ------------------------------------------------------------------------
     SHARE MODAL MOBILE
     ------------------------------------------------------------------------ */
  .share-actions-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
  }

  .share-pill-btn {
    width: 100%;
    justify-content: center;
    padding: 10px 8px;
    font-size: 0.76rem;
  }

  /* ========================================================================
     MOBILE GPU PERFORMANCE: KILL INVISIBLE EXPENSIVE LAYERS
     ======================================================================== */

  /* 1. Kill 5× ambient blur orbs — each runs filter:blur(70px) costing a
        full-screen GPU rasterisation pass per orb per frame */
  .ambient-orb {
    display: none !important;
  }

  /* Keep the ambient-background div for the gradient bg color */
  .ambient-background {
    background: linear-gradient(180deg, #F0F6FF 0%, #E2EDFE 50%, #DCE8FC 100%);
  }

  /* 2. Kill corner character layer — invisible at 0.25 opacity + still
        running 4 animations + drop-shadow filters */
  .corner-characters-layer {
    display: none !important;
  }

  /* 3. Kill satellites layer (already hidden via media query at 1240px
        but ensure it for all mobile) */
  .satellites-layer {
    display: none !important;
  }

  /* 4. Remove expensive backdrop-filter from card faces — replace with
        solid opaque background (visually identical on mobile since orbs
        are now hidden) */
  .glass-hero-card {
    background: transparent !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
  }

  .card-face-front {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(255, 255, 255, 0.96);
  }

  .card-face-back {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(9, 13, 22, 0.98);
  }


  /* 5. Remove backdrop-filter from HUD pill & buttons */
  .hud-pill {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(255, 255, 255, 0.92);
  }

  .hud-btn {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(255, 255, 255, 0.92);
  }

  /* 6. Kill mix-blend-mode on card pattern overlay —
        forces extra compositing pass */
  .card-geometric-pattern {
    mix-blend-mode: normal;
  }

  .card-glare {
    mix-blend-mode: normal;
    display: none;
  }

  /* 7. Replace 'transition: all' with specific GPU-friendly properties
        to prevent compositor thread from scanning every property */
  .capability-card {
    transition: background 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
  }

  .project-showcase-card {
    transition: background 250ms ease, border-color 250ms ease, box-shadow 250ms ease;
  }

  .action-card {
    transition: background 150ms ease, box-shadow 150ms ease;
  }

  .filter-tab {
    transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
  }

  .cap-inquire-btn {
    transition: background 150ms ease, color 150ms ease;
  }

  .proj-action-btn {
    transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
  }

  .modal-close-btn {
    transition: background 150ms ease, color 150ms ease;
  }

  .project-expand-btn {
    transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
  }

  .btn-toggle-all {
    transition: background 150ms ease, color 150ms ease;
  }

  .hud-pill,
  .hud-btn {
    transition: background 150ms ease;
  }
}

/* ==========================================================================
   PRIVACY POLICY PAGE DESIGN SYSTEM
   ========================================================================== */
.privacy-page-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-bottom: 60px;
  user-select: text;
  -webkit-user-select: text;
}

/* Navigation Top Bar */
.privacy-nav {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 100;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.04);
}

.privacy-nav-container {
  max-width: 840px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.privacy-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: #FFFFFF;
  border: 1px solid rgba(199, 210, 254, 0.7);
  border-radius: var(--radius-pill);
  color: var(--color-brand-blue);
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.08);
  transition: all var(--transition-fast);
}

.privacy-back-btn:hover {
  background: var(--color-brand-blue);
  color: #FFFFFF;
  border-color: var(--color-brand-blue);
  transform: translateX(-3px);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.2);
}

.privacy-back-btn svg {
  width: 16px;
  height: 16px;
}

.privacy-nav-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.brand-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-brand-emerald);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
}

/* Privacy Container & Glass Card */
.privacy-container {
  width: 100%;
  max-width: 840px;
  padding: 36px 20px;
  position: relative;
  z-index: 10;
}

.privacy-glass-card {
  background: var(--glass-bg-primary);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1.5px solid var(--glass-border-light);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-ambient);
  padding: 44px 40px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.privacy-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.privacy-badge {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: #EFF6FF;
  border: 1px solid #DBEAFE;
  border-radius: var(--radius-pill);
  color: var(--color-brand-blue);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.privacy-badge svg {
  width: 14px;
  height: 14px;
}

.privacy-title {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.15;
}

.privacy-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.privacy-lead {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-top: 6px;
}

.privacy-divider {
  height: 1px;
  background: linear-gradient(90deg, rgba(226, 232, 240, 0.2) 0%, rgba(226, 232, 240, 1) 50%, rgba(226, 232, 240, 0.2) 100%);
}

/* Policy Content Body & Sections */
.privacy-content-body {
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.policy-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

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

.section-num {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--color-brand-blue);
  background: #EFF6FF;
  border: 1px solid #DBEAFE;
  padding: 3px 8px;
  border-radius: 6px;
}

.policy-section h2 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.policy-section p {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

.policy-section strong {
  color: var(--text-primary);
}

.policy-section a {
  color: var(--color-brand-blue);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px dashed rgba(37, 99, 235, 0.4);
  transition: all var(--transition-fast);
}

.policy-section a:hover {
  border-bottom-style: solid;
  border-color: var(--color-brand-blue);
}

/* Feature Grid Cards */
.policy-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 8px;
}

.policy-mini-card {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.04);
}

.mini-card-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}

.mini-card-icon svg {
  width: 18px;
  height: 18px;
}

.icon-blue {
  background: #EFF6FF;
  color: var(--color-brand-blue);
  border: 1px solid #DBEAFE;
}

.icon-purple {
  background: #FAF5FF;
  color: var(--color-brand-violet);
  border: 1px solid #F3E8FF;
}

.icon-green {
  background: #ECFDF5;
  color: var(--color-brand-emerald);
  border: 1px solid #D1FAE5;
}

.policy-mini-card h3 {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}

.policy-mini-card p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Lists */
.policy-list {
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.policy-list li {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Contact Card Section */
.policy-contact-card {
  background: linear-gradient(135deg, rgba(240, 249, 255, 0.8) 0%, rgba(238, 242, 255, 0.8) 100%);
  border: 1.5px solid rgba(199, 210, 254, 0.6);
  border-radius: var(--radius-lg);
  padding: 24px 26px;
}

.contact-details-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 10px;
}

.contact-item {
  background: #FFFFFF;
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.contact-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.contact-val {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
}

.contact-val.link {
  color: var(--color-brand-blue);
  text-decoration: none;
}

.contact-val.link:hover {
  text-decoration: underline;
}

/* Card Footer */
.privacy-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 20px;
  border-top: 1px solid rgba(226, 232, 240, 0.8);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-home-link {
  color: var(--color-brand-blue);
  text-decoration: none;
  font-weight: 700;
  transition: all var(--transition-fast);
}

.footer-home-link:hover {
  transform: translateX(3px);
}

/* Responsive */
@media (max-width: 640px) {
  .privacy-glass-card {
    padding: 28px 20px;
    border-radius: var(--radius-lg);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(255, 255, 255, 0.96);
  }

  .privacy-title {
    font-size: 1.7rem;
  }

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

  .privacy-card-footer {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
}

/* ==========================================================================
   20. Client / Engineer Mode HUD Switcher & Perspective Styling
   ========================================================================== */
.hud-left-group {
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
}

.hud-mode-pill {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: var(--radius-pill);
  padding: 3px;
  box-shadow: 0 10px 30px rgba(37, 99, 235, 0.08), inset 0 1px 2px rgba(255, 255, 255, 0.95);
  gap: 2px;
}

.mode-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
  outline: none;
}

.mode-svg {
  width: 14px;
  height: 14px;
  stroke-width: 2;
  flex-shrink: 0;
  transition: transform var(--transition-fast);
}

.mode-btn.is-active {
  background: #FFFFFF;
  color: var(--color-brand-blue);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.14), 0 1px 2px rgba(0, 0, 0, 0.04);
}

.mode-btn.is-active .mode-svg {
  color: var(--color-brand-blue);
}

.mode-btn:not(.is-active):hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.5);
}


/* HUD Command Palette Button */
.hud-cmd-btn {
  width: auto;
  padding: 0 12px;
  border-radius: var(--radius-pill);
  gap: 6px;
}

.hud-cmd-kbd {
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 6px;
  background: rgba(224, 231, 255, 0.6);
  border: 1px solid rgba(199, 210, 254, 0.8);
  border-radius: 4px;
  color: var(--color-brand-blue);
  line-height: 1;
}

/* Engineer Mode Ambient Styling Overrides */
body.mode-engineer .hero-name::after {
  content: " // SYS";
  font-size: 0.55em;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--color-brand-indigo);
  opacity: 0.85;
}

body.mode-engineer .proof-chip {
  box-shadow: 0 4px 18px rgba(37, 99, 235, 0.16), 0 0 0 1px rgba(99, 102, 241, 0.35);
}

/* ==========================================================================
   21. In-Browser Interactive Mini-Engines (FSRS & Mesh Simulators)
   ========================================================================== */
.interactive-simulator-card {
  margin: 18px 0;
  padding: 18px 20px;
  background: linear-gradient(135deg, rgba(248, 250, 252, 0.95) 0%, rgba(238, 242, 255, 0.8) 100%);
  border: 1px solid rgba(199, 210, 254, 0.8);
  border-radius: var(--radius-md);
  box-shadow: inset 0 1px 2px #FFFFFF, 0 6px 20px rgba(37, 99, 235, 0.05);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sim-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

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

.sim-badge {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 8px;
  background: rgba(37, 99, 235, 0.12);
  color: var(--color-brand-blue);
  border-radius: var(--radius-pill);
}

.sim-badge.badge-purple {
  background: rgba(124, 58, 237, 0.12);
  color: var(--color-brand-purple);
}

.sim-title {
  font-family: var(--font-heading);
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0;
}

.sim-live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--color-brand-emerald);
  background: #FFFFFF;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(167, 243, 208, 0.8);
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.08);
}

.sim-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-brand-emerald);
  animation: pulseGreen 1.6s infinite;
}

.sim-pulse.pulse-purple {
  background: var(--color-brand-purple);
  animation: pulsePurple 1.6s infinite;
}

@keyframes pulsePurple {
  0% { transform: scale(0.6); opacity: 0.9; }
  100% { transform: scale(2.2); opacity: 0; }
}

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

/* FSRS Simulator Controls */
.fsrs-controls-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.fsrs-param-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: #FFFFFF;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.param-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.param-label-row .param-val {
  color: var(--color-brand-blue);
  font-family: var(--font-heading);
}

.fsrs-slider {
  width: 100%;
  accent-color: var(--color-brand-blue);
  cursor: pointer;
}

/* FSRS Rating Grade Buttons */
.fsrs-rating-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.fsrs-grade-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 4px;
  background: #FFFFFF;
  border: 1.5px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  outline: none;
}

.fsrs-grade-btn .grade-label {
  font-size: 0.74rem;
  font-weight: 800;
  color: var(--text-primary);
}

.fsrs-grade-btn .grade-sub {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
}

.fsrs-grade-btn.grade-again.is-selected {
  border-color: #EF4444;
  background: #FEF2F2;
  color: #DC2626;
}

.fsrs-grade-btn.grade-hard.is-selected {
  border-color: #F59E0B;
  background: #FFFBEB;
  color: #D97706;
}

.fsrs-grade-btn.grade-good.is-selected {
  border-color: #3B82F6;
  background: #EFF6FF;
  color: #2563EB;
}

.fsrs-grade-btn.grade-easy.is-selected {
  border-color: #10B981;
  background: #ECFDF5;
  color: #059669;
}

.fsrs-grade-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

/* FSRS Output Box */
.fsrs-result-card {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  background: #FFFFFF;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(199, 210, 254, 0.7);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.05);
}

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

.metric-name {
  font-size: 0.66rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.metric-val {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--color-brand-blue);
}

/* Hypha Mesh Delay-Tolerant Simulator */
.mesh-stage-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #FFFFFF;
  padding: 16px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(226, 232, 240, 0.9);
  position: relative;
  overflow: hidden;
}

.mesh-node-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  z-index: 2;
  min-width: 80px;
}

.node-avatar-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #EEF2FF 0%, #E0E7FF 100%);
  border: 2px solid rgba(199, 210, 254, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 0 4px 10px rgba(99, 102, 241, 0.1);
  transition: all var(--transition-fast);
}

.node-svg {
  width: 22px;
  height: 22px;
  stroke-width: 1.8;
  color: var(--color-brand-indigo);
  transition: all var(--transition-fast);
}

.node-avatar-circle.is-active-pulse {
  border-color: var(--color-brand-purple);
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.2);
  transform: scale(1.1);
}

.node-avatar-circle.is-active-pulse .node-svg {
  color: var(--color-brand-purple);
}


.node-status-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid #FFFFFF;
}

.node-status-dot.online { background: #10B981; }
.node-status-dot.moving { background: #F59E0B; }
.node-status-dot.offline { background: #94A3B8; }
.node-status-dot.delivered { background: #10B981; }

.node-name {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--text-primary);
}

.node-radio-badge {
  font-size: 0.62rem;
  font-weight: 700;
  padding: 2px 6px;
  background: #F1F5F9;
  border-radius: var(--radius-pill);
  color: var(--text-secondary);
}

.mesh-path-connection {
  flex: 1;
  height: 2px;
  background: repeating-linear-gradient(90deg, #CBD5E1 0, #CBD5E1 4px, transparent 4px, transparent 8px);
  position: relative;
  margin: 0 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mesh-path-connection.is-transmitting {
  background: var(--color-brand-purple);
}

.mesh-wire-label {
  position: absolute;
  top: -16px;
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--text-muted);
  white-space: nowrap;
}

.mesh-packet-dot {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-brand-purple);
  box-shadow: 0 0 8px var(--color-brand-purple);
  opacity: 0;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
}

.mesh-control-bar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mesh-step-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  background: linear-gradient(135deg, var(--color-brand-purple) 0%, #4F46E5 100%);
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.25);
  transition: all var(--transition-fast);
}

.mesh-step-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.35);
}

.mesh-reset-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: #FFFFFF;
  border: 1px solid rgba(226, 232, 240, 0.9);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.mesh-reset-btn svg { width: 18px; height: 18px; }

.mesh-reset-btn:hover {
  color: var(--color-brand-blue);
  border-color: rgba(199, 210, 254, 0.8);
}

.mesh-telemetry-box {
  background: #0F172A;
  color: #38BDF8;
  font-family: monospace;
  font-size: 0.72rem;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  max-height: 80px;
  overflow-y: auto;
}

.mesh-telemetry-box .log-time {
  color: #94A3B8;
  margin-right: 6px;
}

/* ==========================================================================
   22. Command Palette Terminal Modal (Ctrl + K)
   ========================================================================== */
.modal-container-cmd {
  max-width: 620px;
  max-height: 85vh;
  padding: 0;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.98);
}


.cmd-input-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

.cmd-prompt-icon {
  width: 20px;
  height: 20px;
  color: var(--color-brand-blue);
  flex-shrink: 0;
}

.cmd-search-input {
  flex: 1;
  border: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-primary);
  outline: none;
}

.cmd-search-input::placeholder {
  color: var(--text-muted);
}

.cmd-close-btn {
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
}

.cmd-kbd-badge {
  font-family: var(--font-heading);
  font-size: 0.7rem;
  font-weight: 800;
  padding: 3px 6px;
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
  border-radius: 4px;
  color: var(--text-muted);
}

.cmd-results-area {
  padding: 10px 14px;
  max-height: 380px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cmd-group-label {
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 6px 8px 2px;
}

.cmd-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: left;
  width: 100%;
}

.cmd-item:hover, .cmd-item.is-focused {
  background: rgba(238, 242, 255, 0.85);
  border-color: rgba(199, 210, 254, 0.7);
}

.cmd-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cmd-tag {
  font-size: 0.64rem;
  font-weight: 800;
  padding: 2px 6px;
  background: #E2E8F0;
  color: var(--text-secondary);
  border-radius: 4px;
}

.cmd-tag.tag-cyan { background: #CFFAFE; color: #0891B2; }
.cmd-tag.tag-purple { background: #EDE9FE; color: #7C3AED; }
.cmd-tag.tag-emerald { background: #D1FAE5; color: #059669; }
.cmd-tag.tag-amber { background: #FEF3C7; color: #D97706; }
.cmd-tag.tag-rose { background: #FFE4E6; color: #E11D48; }

.cmd-text {
  font-size: 0.84rem;
  color: var(--text-primary);
}

.cmd-shortcut {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
}

/* Console Output Window */
.cmd-console-output {
  padding: 14px 18px;
  background: #0B1120;
  color: #E2E8F0;
  font-family: monospace;
  font-size: 0.8rem;
  line-height: 1.5;
  max-height: 320px;
  overflow-y: auto;
  border-top: 1px solid #1E293B;
  white-space: pre-wrap;
}

.cmd-footer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  background: rgba(248, 250, 252, 0.9);
  border-top: 1px solid rgba(226, 232, 240, 0.8);
  font-size: 0.72rem;
  color: var(--text-muted);
}

.cmd-footer-bar kbd {
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  padding: 1px 4px;
  border-radius: 3px;
}

@media (max-width: 640px) {
  .fsrs-controls-grid {
    grid-template-columns: 1fr;
  }
  .fsrs-result-card {
    grid-template-columns: 1fr;
  }
  .mesh-stage-box {
    flex-direction: column;
    gap: 14px;
  }
  .mesh-path-connection {
    width: 2px;
    height: 24px;
    margin: 4px 0;
  }
  .mesh-wire-label {
    top: auto;
    left: 14px;
  }

  .modal-container-cmd {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 20px 20px 0 0;
  }

  .cmd-input-bar {
    padding: 12px 14px;
    gap: 8px;
  }

  .cmd-search-input {
    font-size: 0.88rem;
  }

  .cmd-results-area {
    max-height: 45vh;
    padding: 8px 10px;
  }

  .cmd-item {
    padding: 8px 10px;
  }

  .cmd-text {
    font-size: 0.8rem;
  }

  .cmd-shortcut {
    display: none;
  }

  .card-face-back {
    padding: 18px 14px 14px;
    gap: 12px;
  }

  .eng-action-dock {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ==========================================================================
   23. Engineering Core (SYS_CORE) Back Face & Chromatic Glitch FX
   ========================================================================== */
body.is-chromatic-glitching {
  animation: chromaticGlitch 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

@keyframes chromaticGlitch {
  0% { transform: translate(0); filter: drop-shadow(0 0 0 transparent); }
  20% { transform: translate(-3px, 2px); filter: drop-shadow(2px 0 0 #06B6D4) drop-shadow(-2px 0 0 #F43F5E); }
  40% { transform: translate(3px, -2px); filter: drop-shadow(-3px 0 0 #06B6D4) drop-shadow(3px 0 0 #8B5CF6); }
  60% { transform: translate(-2px, 1px); filter: drop-shadow(2px 0 0 #3B82F6); }
  80% { transform: translate(1px, -1px); }
  100% { transform: translate(0); filter: none; }
}

/* Full Environmental Cyber Mode when Back Face is Active */
body.is-engineering-core .ambient-background {
  background: radial-gradient(circle at 50% 20%, #0F172A 0%, #030712 100%);
  transition: background 0.8s ease;
}

body.is-engineering-core .floating-hud {
  filter: drop-shadow(0 0 20px rgba(56, 189, 248, 0.25));
}

body.is-engineering-core .hud-pill {
  background: rgba(15, 23, 42, 0.82);
  border-color: rgba(56, 189, 248, 0.35);
  color: #38BDF8;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

body.is-engineering-core .hud-pill:hover {
  background: rgba(15, 23, 42, 0.95);
  border-color: #38BDF8;
  box-shadow: 0 8px 28px rgba(56, 189, 248, 0.25);
}

body.is-engineering-core .hud-status {
  color: #38BDF8;
}

body.is-engineering-core .hud-mode-pill {
  background: rgba(15, 23, 42, 0.82);
  border-color: rgba(56, 189, 248, 0.35);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

body.is-engineering-core .mode-btn {
  color: #94A3B8;
}

body.is-engineering-core .mode-btn:hover {
  color: #F8FAFC;
  background: rgba(56, 189, 248, 0.12);
}

body.is-engineering-core .mode-btn.is-active {
  background: rgba(56, 189, 248, 0.22);
  color: #38BDF8;
  border: 1px solid rgba(56, 189, 248, 0.5);
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.3);
}

body.is-engineering-core .mode-btn.is-active .mode-svg {
  color: #38BDF8;
}

body.is-engineering-core .hud-btn {
  background: rgba(15, 23, 42, 0.82);
  border-color: rgba(56, 189, 248, 0.35);
  color: #94A3B8;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

body.is-engineering-core .hud-btn:hover {
  background: rgba(14, 165, 233, 0.2);
  border-color: #38BDF8;
  color: #38BDF8;
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.4);
}

body.is-engineering-core .hud-cmd-kbd {
  background: rgba(14, 165, 233, 0.2);
  border-color: rgba(56, 189, 248, 0.4);
  color: #38BDF8;
}


/* Engineering Console Header */
.eng-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(56, 189, 248, 0.2);
}

.eng-header-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.eng-kernel-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.eng-sys-tag {
  font-family: monospace;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #38BDF8;
}

.eng-console-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 800;
  color: #F8FAFC;
  letter-spacing: -0.01em;
  margin: 0;
}

.eng-header-badges {
  display: flex;
  align-items: center;
  gap: 6px;
}

.eng-online-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: monospace;
  font-size: 0.64rem;
  font-weight: 800;
  color: #34D399;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  padding: 2px 6px;
  border-radius: var(--radius-pill);
}

.eng-security-badge {
  font-family: monospace;
  font-size: 0.62rem;
  font-weight: 800;
  color: #A78BFA;
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.35);
  padding: 2px 6px;
  border-radius: var(--radius-pill);
}

.eng-dot-green {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 8px #10B981;
  animation: pulseGreen 1.6s infinite;
}

/* Streaming Kernel Ticker */
.eng-kernel-ticker {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.66rem;
  color: #38BDF8;
  overflow: hidden;
}

.ticker-prompt {
  color: #34D399;
  font-weight: 800;
}

.ticker-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.eng-status-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  font-family: monospace;
  font-size: 0.65rem;
  color: #94A3B8;
}

.eng-tele-mini {
  color: #E2E8F0;
  font-weight: 600;
}

.eng-meta-tag {
  color: #64748B;
}

/* Live Oscilloscope Box */
.eng-oscilloscope-box {
  background: #060911;
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.6);
}

.osc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: monospace;
  font-size: 0.6rem;
  font-weight: 700;
}

.osc-title {
  color: #64748B;
  letter-spacing: 0.04em;
}

.osc-meta {
  color: #38BDF8;
}

.eng-osc-canvas {
  width: 100%;
  height: 28px;
  display: block;
}

/* Telemetry Grid & Benchmark */
.eng-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

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

.eng-section-label {
  font-family: monospace;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #64748B;
  text-transform: uppercase;
}

.btn-micro-benchmark {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: monospace;
  font-size: 0.62rem;
  font-weight: 800;
  color: #F59E0B;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.4);
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-micro-benchmark svg {
  width: 11px;
  height: 11px;
}

.btn-micro-benchmark:hover {
  background: rgba(245, 158, 11, 0.25);
  color: #FCD34D;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
}

.eng-tele-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(30, 41, 59, 0.9);
  border-radius: var(--radius-md);
  padding: 8px 10px;
}

.tele-item {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.tele-k {
  font-family: monospace;
  font-size: 0.56rem;
  color: #64748B;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.tele-v {
  font-family: monospace;
  font-size: 0.74rem;
  color: #38BDF8;
  font-weight: 700;
}

.benchmark-result-bar {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.4);
  border-radius: 4px;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  animation: fadeInDown 0.25s ease-out;
}

.bench-res-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bench-badge-grade {
  font-family: monospace;
  font-size: 0.72rem;
  font-weight: 800;
  color: #10B981;
  background: rgba(16, 185, 129, 0.2);
  padding: 2px 5px;
  border-radius: 3px;
}

.bench-text {
  font-family: monospace;
  font-size: 0.68rem;
  color: #E2E8F0;
}

/* Engineering Decisions List & Performance Chips */
.eng-decisions-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.decision-card {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.decision-card:hover {
  border-color: rgba(56, 189, 248, 0.5);
  background: rgba(15, 23, 42, 0.95);
}

.decision-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  cursor: pointer;
  user-select: none;
}

.decision-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.decision-num {
  font-family: monospace;
  font-size: 0.72rem;
  font-weight: 800;
  color: #0284C7;
}

.decision-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.decision-proj-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.decision-proj {
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #F8FAFC;
}

.decision-chips {
  display: flex;
  align-items: center;
  gap: 4px;
}

.d-chip {
  font-family: monospace;
  font-size: 0.58rem;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 3px;
  line-height: 1.2;
}

.d-chip.chip-cyan { background: rgba(6, 182, 212, 0.15); color: #22D3EE; border: 1px solid rgba(6, 182, 212, 0.3); }
.d-chip.chip-green { background: rgba(16, 185, 129, 0.15); color: #34D399; border: 1px solid rgba(16, 185, 129, 0.3); }
.d-chip.chip-purple { background: rgba(139, 92, 246, 0.15); color: #A78BFA; border: 1px solid rgba(139, 92, 246, 0.3); }
.d-chip.chip-amber { background: rgba(245, 158, 11, 0.15); color: #FBBF24; border: 1px solid rgba(245, 158, 11, 0.3); }

.decision-sub {
  font-size: 0.67rem;
  color: #94A3B8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-inspect-decision {
  font-family: monospace;
  font-size: 0.68rem;
  font-weight: 800;
  color: #38BDF8;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.btn-inspect-decision:hover {
  background: rgba(56, 189, 248, 0.15);
  color: #FFFFFF;
}

.decision-drawer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  background: #070B14;
  border-top: 1px solid transparent;
}

.decision-card.is-expanded {
  border-color: #38BDF8;
}

.decision-card.is-expanded .decision-drawer {
  max-height: 480px;
  border-top-color: rgba(56, 189, 248, 0.25);
}

.postmortem-box {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-family: monospace;
  font-size: 0.7rem;
}

.pm-block {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pm-label {
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #64748B;
}

.pm-text {
  color: #CBD5E1;
  line-height: 1.35;
  margin: 0;
}

.pm-text.highlight-res {
  color: #34D399;
  font-weight: 700;
}

.pm-tree {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(30, 41, 59, 0.8);
  border-radius: 4px;
  padding: 6px 8px;
  margin: 2px 0;
}

.pm-tree code {
  font-family: monospace;
  font-size: 0.66rem;
  line-height: 1.4;
  color: #38BDF8;
  display: block;
}

/* Engineering Action Dock */
.eng-action-dock {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-top: 4px;
}

.eng-dock-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 6px;
  border-radius: var(--radius-sm);
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #E2E8F0;
  font-family: monospace;
  font-size: 0.68rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition-fast);
  outline: none;
}

.eng-dock-btn:hover {
  background: rgba(56, 189, 248, 0.2);
  border-color: #38BDF8;
  color: #FFFFFF;
  transform: translateY(-1px);
}

.eng-dock-svg {
  width: 14px;
  height: 14px;
  stroke-width: 2;
  flex-shrink: 0;
}

.btn-exit-core {
  background: rgba(244, 63, 94, 0.12);
  border-color: rgba(244, 63, 94, 0.4);
  color: #FDA4AF;
}

.btn-exit-core:hover {
  background: rgba(244, 63, 94, 0.25);
  border-color: #F43F5E;
  color: #FFFFFF;
}

