/* Hermes Agent — Linear-inspired Design System
   Only what Tailwind can't handle: animations, pseudo-elements,
   scrollbar, font-feature-settings, backdrop-filter, selection. */

/* ——————————————————————————————————————————————
   1. Global font feature settings
   —————————————————————————————————————————————— */
html, body {
  font-feature-settings: "cv01", "ss03";
  scroll-behavior: smooth;
}

/* ——————————————————————————————————————————————
   2. Custom scrollbar
   —————————————————————————————————————————————— */
.custom-scrollbar::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: #191a1b;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Firefox */
.custom-scrollbar {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) #191a1b;
}

/* ——————————————————————————————————————————————
   3. Message enter animation
   —————————————————————————————————————————————— */
.message-enter {
  animation: messageSlideIn 200ms ease-out;
}

@keyframes messageSlideIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ——————————————————————————————————————————————
   4. Typing indicator
   —————————————————————————————————————————————— */
.typing-dot {
  animation: typingBounce 1.4s ease-in-out infinite;
}

.typing-dot:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typingBounce {
  0%, 60%, 100% {
    transform: translateY(0);
    opacity: 0.4;
  }
  30% {
    transform: translateY(-4px);
    opacity: 1;
  }
}

/* ——————————————————————————————————————————————
   5. Code blocks in chat
   —————————————————————————————————————————————— */
pre, code {
  font-family: 'JetBrains Mono', monospace;
}

/* Inline code */
code {
  background: rgba(255, 255, 255, 0.06);
  color: #d0d6e0;
  padding: 0.15em 0.35em;
  border-radius: 3px;
  font-size: 0.85em;
}

/* Fenced / block code */
pre code {
  background: #191a1b;
  color: #d0d6e0;
  display: block;
  padding: 0.75em 1em;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow-x: auto;
  white-space: pre;
}

/* ——————————————————————————————————————————————
   6. Model autocomplete dropdown — frosted glass
   —————————————————————————————————————————————— */
.model-menu {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* ——————————————————————————————————————————————
   7. Nav link hover / active indicator
   —————————————————————————————————————————————— */
.nav-link {
  position: relative;
}

.nav-link::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%) scaleY(0);
  width: 2px;
  height: 16px;
  background: #5e6ad2;
  border-radius: 1px;
  transition: transform 0.15s ease;
}

.nav-link:hover::before,
.nav-link.active::before {
  transform: translateY(-50%) scaleY(1);
}

/* ——————————————————————————————————————————————
   8. Page transition — subtle fade-in on load
   —————————————————————————————————————————————— */
main {
  animation: pageFadeIn 200ms ease-out;
}

@keyframes pageFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ——————————————————————————————————————————————
   9. Focus styles — accent ring
   —————————————————————————————————————————————— */
*:focus-visible {
  outline: 2px solid rgba(94, 106, 210, 0.3);
  outline-offset: 2px;
}

/* ——————————————————————————————————————————————
   10. Selection color — accent tinted
   —————————————————————————————————————————————— */
::selection {
  background: rgba(94, 106, 210, 0.35);
  color: #f7f8f8;
}

/* ——————————————————————————————————————————————
   11. Progress bar smooth animation
   —————————————————————————————————————————————— */
.progress-bar {
  transition: width 0.5s ease;
}

/* ——————————————————————————————————————————————
   12. Smooth scrolling on scrollable containers
   —————————————————————————————————————————————— */
.scroll-smooth {
  scroll-behavior: smooth;
}

/* ——————————————————————————————————————————————
   Utility: textarea height transition
   —————————————————————————————————————————————— */
textarea {
  transition: height 0.1s ease;
}
