/* Custom styles for VA pure HTML version */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  /* Prevent iOS zoom on orientation change */
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Computer Modern Serif', 'Latin Modern Roman', 'CMU Serif', Georgia, serif;
  overflow-x: hidden;
  animation: pageLoad 2s ease-out;
  /* Prevent overscroll bounce which causes blank areas during rotation */
  overscroll-behavior-y: none;
}

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

/* Scroll arrow breathing animation */
/* Note: Opacity is controlled by JS for fade-out, so we only animate transform and scale */
/* Must include translateX(-50%) to preserve horizontal centering from Tailwind */
@keyframes breathe {
  0%, 100% {
    transform: translateX(-50%) translateY(0) scale(1);
  }
  50% {
    transform: translateX(-50%) translateY(4px) scale(1.1);
  }
}

#scroll-arrow {
  animation: breathe 2s ease-in-out infinite;
}

/* Scroll indicator dots */
.scroll-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: rgba(212, 209, 201, 0.2);
  transition: all 0.3s ease;
  cursor: pointer;
}

.scroll-dot:hover {
  background-color: rgba(212, 209, 201, 0.4);
}

.scroll-dot.active {
  background-color: rgba(212, 209, 201, 0.8);
}

/* Mobile scroll dots */
@media (max-width: 768px) {
  .scroll-dot {
    width: 6px;
    height: 6px;
  }
}

/* Canvas container */
#particle-canvas {
  display: block;
}

/* Monospace font for entropy display */
.font-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* Smooth transitions for sections */
section {
  transition: opacity 0.1s ease-out;
}

/* Focus styles for accessibility */
button:focus-visible,
a:focus-visible {
  outline: 2px solid rgba(212, 209, 201, 0.5);
  outline-offset: 2px;
}

/* Hide scrollbar but keep functionality */
html {
  scrollbar-width: none; /* Firefox */
}

::-webkit-scrollbar {
  width: 0px;
  background: transparent; /* Chrome, Safari, Edge */
}

/* KaTeX equation styling — responsive to match hero title scaling */
#function-latex .katex {
  font-size: 0.9em;
}

#function-btn:hover .katex {
  color: inherit;
}

/* Entropy display styling */
#entropy-display .katex,
#brownian-entropy-display .katex {
  font-size: 0.9em;
}

@media (min-width: 768px) {
  #function-latex .katex {
    font-size: 1.0em;
  }
  #entropy-display .katex,
  #brownian-entropy-display .katex {
    font-size: 1.0em;
  }
}

@media (min-width: 1024px) {
  #function-latex .katex {
    font-size: 1.2em;
  }
  #entropy-display .katex,
  #brownian-entropy-display .katex {
    font-size: 1.2em;
  }
}

/* Brownian controls styling */
#brownian-controls .katex {
  font-size: 1.1em;
}

/* Custom slider styling */
#brownian-controls input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  cursor: pointer;
}

#brownian-controls input[type="range"]::-webkit-slider-runnable-track {
  background: rgba(212, 209, 201, 0.15);
  height: 4px;
  border-radius: 2px;
}

#brownian-controls input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  margin-top: -4px;
  background-color: rgba(212, 209, 201, 0.7);
  height: 12px;
  width: 12px;
  border-radius: 50%;
  transition: background-color 0.2s ease;
}

#brownian-controls input[type="range"]::-webkit-slider-thumb:hover {
  background-color: rgba(212, 209, 201, 0.9);
}

#brownian-controls input[type="range"]::-moz-range-track {
  background: rgba(212, 209, 201, 0.15);
  height: 4px;
  border-radius: 2px;
}

#brownian-controls input[type="range"]::-moz-range-thumb {
  background-color: rgba(212, 209, 201, 0.7);
  height: 12px;
  width: 12px;
  border-radius: 50%;
  border: none;
  transition: background-color 0.2s ease;
}

#brownian-controls input[type="range"]::-moz-range-thumb:hover {
  background-color: rgba(212, 209, 201, 0.9);
}
