/* Aesthetically Pleasing Dark Theme - Multi-Color Accents (Sky, Indigo, Emerald, Amber) */

:root {
  --glow-sky: rgba(56, 189, 248, 0.15);
  --glow-indigo: rgba(99, 102, 241, 0.15);
  --glow-emerald: rgba(16, 185, 129, 0.15);
}

/* Smooth Scrolling */
html {
  scroll-behavior: smooth;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #080d1a;
}

::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

::-webkit-scrollbar-thumb:hover {
  background: #334155;
}

.scrollbar-thin::-webkit-scrollbar {
  width: 5px;
}

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

.scrollbar-thin::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 3px;
}

/* Refined Skill Tags */
.skill-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.625rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-family: "JetBrains Mono", monospace;
  background-color: rgba(30, 41, 59, 0.6);
  color: #cbd5e1;
  border: 1px solid rgba(71, 85, 105, 0.4);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.skill-tag:hover {
  color: #f8fafc;
  border-color: rgba(56, 189, 248, 0.5);
  background-color: rgba(14, 165, 233, 0.12);
  transform: translateY(-1px);
}

/* Glassmorphism Cards */
.glass-card {
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.glass-card:hover {
  border-color: rgba(56, 189, 248, 0.3);
  box-shadow: 0 12px 30px -10px rgba(14, 165, 233, 0.12);
}

/* Refined Terminal Console */
#terminal-body {
  font-family: 'JetBrains Mono', monospace;
  background: #090e17;
}

.term-cmd {
  color: #38bdf8;
  font-weight: 600;
}

.term-res {
  color: #cbd5e1;
  margin-top: 2px;
  line-height: 1.6;
}

/* Ambient Background Breathing Glow */
@keyframes ambientDrift {
  0%, 100% {
    opacity: 0.35;
    transform: scale(1) translate(0, 0);
  }
  50% {
    opacity: 0.55;
    transform: scale(1.08) translate(15px, -10px);
  }
}

.glow-ambient {
  animation: ambientDrift 10s ease-in-out infinite;
}

/* Toast Active State */
.toast-active {
  transform: translateY(0) !important;
  opacity: 1 !important;
}

/* AI Chat Widget Specific Styles */
#ai-chat-window {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  transform-origin: bottom right;
}

#ai-chat-window.chat-closed {
  transform: scale(0.85) translateY(20px);
  opacity: 0;
  pointer-events: none;
}

#ai-chat-window.chat-open {
  transform: scale(1) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

@media (max-width: 639px) {
  #ai-chat-window {
    right: 0.75rem !important;
    left: 0.75rem !important;
    bottom: 5.25rem !important;
    width: auto !important;
    max-width: calc(100vw - 1.5rem) !important;
    max-height: calc(100dvh - 6.5rem) !important;
    border-radius: 1.5rem !important;
  }
}

.term-help-trigger {
  text-decoration-style: dotted;
  transition: color 0.15s ease;
}

.term-help-trigger:hover {
  color: #38bdf8;
  text-decoration: underline;
}

/* Typing Indicator Animation */
.typing-dot {
  width: 6px;
  height: 6px;
  background-color: #38bdf8;
  border-radius: 50%;
  display: inline-block;
  animation: typingBounce 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }
.typing-dot:nth-child(3) { animation-delay: 0s; }

@keyframes typingBounce {
  0%, 80%, 100% { transform: scale(0); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

/* Chat Prompt Chips */
.chat-chip {
  display: inline-block;
  font-size: 0.72rem;
  padding: 0.3rem 0.65rem;
  border-radius: 9999px;
  background-color: rgba(30, 41, 59, 0.7);
  color: #93c5fd;
  border: 1px solid rgba(56, 189, 248, 0.25);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.chat-chip:hover {
  background-color: rgba(14, 165, 233, 0.2);
  border-color: rgba(56, 189, 248, 0.6);
  color: #ffffff;
  transform: translateY(-1px);
}

/* ============================================================
   Online Ordering Sandbox & Project Styles
   ============================================================ */

/* Sandbox Tab Navigation */
.sandbox-tab-btn {
  position: relative;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.sandbox-tab-btn.active {
  color: #ffffff;
  background-color: rgba(30, 41, 59, 0.85);
  border-color: rgba(56, 189, 248, 0.5);
  box-shadow: 0 4px 14px -2px rgba(14, 165, 233, 0.2);
}

.sandbox-tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 15%;
  right: 15%;
  height: 2px;
  background: linear-gradient(90deg, #38bdf8, #6366f1);
  border-radius: 2px;
}

/* POS Thermal Receipt Styling */
.thermal-receipt {
  background: #0f1623;
  border: 1px dashed rgba(148, 163, 184, 0.25);
  position: relative;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
}

.thermal-receipt::before,
.thermal-receipt::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 6px;
  background-size: 12px 6px;
  background-repeat: repeat-x;
  pointer-events: none;
}

.thermal-receipt::before {
  top: -6px;
  background-image: radial-gradient(circle at 6px 6px, transparent 6px, #0f1623 6px);
}

.thermal-receipt::after {
  bottom: -6px;
  background-image: radial-gradient(circle at 6px 0, transparent 6px, #0f1623 6px);
}

/* KDS (Kitchen Display System) Card Styling */
.kds-card {
  transition: transform 0.2s ease, opacity 0.2s ease, border-color 0.2s ease;
}

.kds-card.bumping {
  transform: scale(0.92) translateY(10px);
  opacity: 0;
}

/* JSON Code Preview Blocks */
.json-display {
  font-family: 'JetBrains Mono', monospace;
  background: #080d17;
  border: 1px solid rgba(51, 65, 85, 0.7);
  border-radius: 0.75rem;
}

/* Pulse animation for active simulation status */
@keyframes badgePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(0.97); }
}

.animate-badge-pulse {
  animation: badgePulse 2s infinite ease-in-out;
}

/* ============================================================
   Experience Timeline: Desktop Seamless Reveal & Mobile-Optimized
   ============================================================ */

/* Base Card Container */
.experience-card-container {
  background-color: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1.25rem;
  transition: border-color 0.3s ease, 
              box-shadow 0.3s ease, 
              background-color 0.3s ease;
}

.experience-details {
  transition: opacity 0.4s ease, 
              transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
              max-height 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.bubble-chevron {
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ------------------------------------------------------------
   MOBILE-OPTIMIZED VIEW (< 768px):
   100% stable, full details readable, zero scroll layout-jank!
   ------------------------------------------------------------ */
@media (max-width: 767px) {
  .experience-card-container {
    padding: 1rem 1.125rem !important;
    margin-bottom: 1rem;
    box-shadow: 0 4px 16px -4px rgba(0, 0, 0, 0.4);
  }

  /* Cards are naturally open and stable on mobile */
  .experience-card-container .experience-details {
    max-height: none !important;
    opacity: 1 !important;
    overflow: visible !important;
    transform: none !important;
  }

  .experience-card-container .bubble-chevron {
    transform: rotate(180deg);
  }

  /* When explicitly tapped to collapse on mobile */
  .experience-card-container.mobile-collapsed .experience-details {
    max-height: 0 !important;
    opacity: 0 !important;
    overflow: hidden !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
  }

  .experience-card-container.mobile-collapsed .bubble-chevron {
    transform: rotate(0deg);
  }

  /* Hide desktop-only controls on mobile screens */
  .desktop-exp-control {
    display: none !important;
  }
}

/* ------------------------------------------------------------
   DESKTOP VIEW (>= 768px):
   Sleek compact preview that seamlessly reveals and stays open!
   ------------------------------------------------------------ */
@media (min-width: 768px) {
  .experience-card-container {
    will-change: transform, opacity;
  }

  /* Compact Initial State */
  .experience-card-container.is-bubble {
    opacity: 0.92;
    cursor: pointer;
    background-color: rgba(15, 23, 42, 0.72);
    border-color: rgba(255, 255, 255, 0.06);
    transition: all 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .experience-card-container.is-bubble:hover {
    border-color: rgba(56, 189, 248, 0.3);
    background-color: rgba(15, 23, 42, 0.88);
  }

  .experience-card-container.is-bubble .experience-details {
    max-height: 0 !important;
    opacity: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    transform: translateY(6px);
  }

  .experience-card-container.is-bubble .bubble-chevron {
    transform: rotate(0deg);
  }

  /* Seamlessly Unfolded State (Stays open permanently once scrolled to) */
  .experience-card-container.is-blown-up {
    opacity: 1;
    background-color: rgba(15, 23, 42, 0.95);
    box-shadow: 0 16px 36px -10px rgba(0, 0, 0, 0.5);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .experience-card-container.is-blown-up .experience-details {
    max-height: 1200px !important;
    opacity: 1 !important;
    overflow: visible !important;
    pointer-events: auto !important;
    transform: translateY(0);
  }

  .experience-card-container.is-blown-up .bubble-chevron {
    transform: rotate(180deg);
  }
}

/* Subtle glow for the timeline node when active */
.experience-timeline-row.active-expanded .experience-node {
  transform: translateX(-50%) scale(1.18);
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.4);
}


