/* ========================================
   CSS RESET - Modern Normalize
======================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

body {
  font-family: var(--font-main);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  min-height: 100vh;
  overflow-x: clip;
  position: relative;
  width: 100%;
  max-width: 100%;
  overscroll-behavior-x: none;
}

#page-wrap {
  overflow: hidden;
  width: 100%;
  position: relative;
}

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

img {
  height: auto;
  object-fit: cover;
}

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

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

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

ul, ol {
  list-style: none;
}

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

p {
  line-height: 1.7;
}

table {
  border-collapse: collapse;
  width: 100%;
}

:focus-visible {
  outline: 2px solid var(--neon-blue);
  outline-offset: 2px;
}

::selection {
  background-color: rgba(var(--neon-blue-rgb), 0.3);
  color: var(--color-text);
}

::-moz-selection {
  background-color: rgba(var(--neon-blue-rgb), 0.3);
  color: var(--color-text);
}

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

::-webkit-scrollbar-track {
  background: var(--color-bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--color-text-muted);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--neon-blue);
}

/* Firefox scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--color-text-muted) var(--color-bg-secondary);
}

/* Remove default tap highlight on mobile */
* {
  -webkit-tap-highlight-color: transparent;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
