/* ===== ALLWAYSTHERE - Dark Professional Theme ===== */

/* Blob morphing animations */
.hero-blob {
  animation: blobMorph 20s ease-in-out infinite;
}
.hero-blob:nth-child(2) { animation-delay: -7s; animation-duration: 25s; }
.hero-blob:nth-child(3) { animation-delay: -14s; animation-duration: 18s; }

@keyframes blobMorph {
  0%, 100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; transform: translate(0, 0) scale(1); }
  25%      { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; transform: translate(10px, -15px) scale(1.02); }
  50%      { border-radius: 50% 60% 30% 60% / 30% 50% 70% 50%; transform: translate(-5px, 10px) scale(0.98); }
  75%      { border-radius: 40% 60% 50% 50% / 60% 40% 60% 40%; transform: translate(8px, 5px) scale(1.01); }
}

/* Hero circle float */
.hero-float { animation: gentleFloat 6s ease-in-out infinite; }
@keyframes gentleFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-12px); }
}

/* Badge float */
.badge-float { animation: badgeFloat 4s ease-in-out infinite; }
@keyframes badgeFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}

/* Scroll-triggered animations */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: var(--delay, 0s);
}
.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Navbar */
#navbar { background: transparent; }
#navbar.scrolled {
  background: rgba(17, 17, 20, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

/* Mobile menu toggle */
#mobile-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(4px, 4px); }
#mobile-toggle.active span:nth-child(2) { opacity: 0; }
#mobile-toggle.active span:nth-child(3) { width: 1.5rem; transform: rotate(-45deg) translate(4px, -4px); }

/* Timeline relative positioning for dots */
.timeline-item { position: relative; }

/* Form focus glow */
input:focus, textarea:focus { box-shadow: 0 0 0 4px rgba(212, 162, 42, 0.15); }

/* Smooth scroll offset */
:target { scroll-margin-top: 80px; }

/* Selection */
::selection { background-color: rgba(212, 162, 42, 0.25); color: inherit; }

/* Custom scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #111114; }
::-webkit-scrollbar-thumb { background: #404040; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #606060; }

/* Chat widget */
#chat-panel {
  animation: chatSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes chatSlideIn {
  from { opacity: 0; transform: translateY(12px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

#chat-toggle {
  animation: chatPulse 3s ease-in-out infinite;
}

@keyframes chatPulse {
  0%, 100% { box-shadow: 0 4px 15px rgba(212, 162, 42, 0.3); }
  50%      { box-shadow: 0 4px 25px rgba(212, 162, 42, 0.5); }
}

#chat-toggle.active {
  animation: none;
}

.chat-msg-user {
  background: rgba(212, 162, 42, 0.12);
  border: 1px solid rgba(212, 162, 42, 0.2);
}

.chat-msg-ai {
  background: rgba(42, 42, 42, 0.5);
}

.typing-indicator span {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #d4a22a;
  border-radius: 50%;
  animation: typingBounce 1.4s infinite;
  margin: 0 2px;
}
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-6px); }
}

/* Chat scrollbar */
#chat-messages::-webkit-scrollbar { width: 4px; }
#chat-messages::-webkit-scrollbar-track { background: transparent; }
#chat-messages::-webkit-scrollbar-thumb { background: #404040; border-radius: 2px; }

/* Accessibility: reduced motion */
@media (prefers-reduced-motion: reduce) {
  .hero-blob, .hero-float, .badge-float { animation: none; }
  .animate-on-scroll { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}
