/* Reset & Base Styles */
*, *::before, *::after {
  box-sizing: border-box;
}

/* ── Global Theme Transition ────────────────────────────────────────────────
   Applied by JS for one frame during a theme switch so every element
   cross-fades its colors instead of snapping.
   Using a class lets us turn it OFF after the transition to avoid
   fighting scroll-driven / hero animations.
──────────────────────────────────────────────────────────────────────────── */
.theme-transitioning,
.theme-transitioning *,
.theme-transitioning *::before,
.theme-transitioning *::after {
  transition:
    background-color 350ms cubic-bezier(0.4, 0, 0.2, 1),
    color            350ms cubic-bezier(0.4, 0, 0.2, 1),
    border-color     350ms cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow       350ms cubic-bezier(0.4, 0, 0.2, 1) !important;
}

* {
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
}

body {
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-family: var(--font-sans);
  background-color: var(--bg-body);
  color: var(--text-main);
  /* Base transition — theme-transitioning class overrides this during switch */
  transition: background-color 350ms cubic-bezier(0.4, 0, 0.2, 1),
              color 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

input, button, textarea, select {
  font: inherit;
}

p, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-main);
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

button {
  background: transparent;
  border: none;
  cursor: pointer;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.4);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(59, 130, 246, 0.8);
}
