/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

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

/* Custom animations */
@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slide-up {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fade-in 0.8s ease-out;
}

.animate-slide-up {
  animation: slide-up 0.6s ease-out;
}

/* Neon glow effects */
.neon-glow-cyan {
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.3);
}

.neon-glow-purple {
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.3);
}

/* Dropdown panel animation */
@keyframes scale-fade-in {
  0% {
    opacity: 0;
    transform: translateY(4px) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.animate-scale-in {
  animation: scale-fade-in 120ms ease-out;
}

/* JSON syntax highlighting hints */
code {
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Courier New', monospace;
}

/* Better scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.5);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: rgba(6, 182, 212, 0.3);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(6, 182, 212, 0.5);
}

/* Floating animation for nav */
@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-5px);
  }
}

.floating-nav {
  animation: float 3s ease-in-out infinite;
}

/* Floating navbar show/hide transitions */
.nav-transition {
  transition: opacity 200ms ease, transform 200ms ease;
  will-change: opacity, transform;
}
.nav-hidden {
  opacity: 0;
  transform: translateY(-12px);
  pointer-events: none;
}
.nav-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Defer rendering of below-the-fold sections for faster LCP */
.cv-auto {
  content-visibility: auto;
  contain-intrinsic-size: 800px 1000px; /* reserve space to avoid layout shift */
}

/* Highlight.js overrides - remove default background */
.hljs,
pre code.hljs {
  background: transparent !important;
  color: inherit; /* use our app's text color */
}

/* Highlight.js token color tweaks to fit cyan/purple theme (replace oranges) */
/* JSON keys and attributes -> cyan */
.hljs-attr,
.hljs-attribute,
.hljs-variable,
.hljs-template-variable {
  color: #22d3ee !important; /* tailwind cyan-400 */
}
/* Numbers, literals, symbols -> purple */
.hljs-number,
.hljs-literal,
.hljs-symbol,
.hljs-bullet {
  color: #a78bfa !important; /* tailwind purple-300/400 */
}

/* Select dropdown styling */
select {
  background-color: rgba(15, 23, 42, 0.8);
  color: white;
}

select option {
  background-color: #1a1f3a;
  color: white;
}

select:focus option:checked {
  background-color: rgba(6, 182, 212, 0.2);
}

/* Shimmer loading effect for skeleton lines */
@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}
.loading-shimmer::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(
    90deg,
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,0.08) 50%,
    rgba(255,255,255,0) 100%
  );
  background-size: 1000px 100%;
  animation: shimmer 1.2s infinite;
}
