/* ============================================
   CSS RESET & NORMALIZE
   ============================================ */

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

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

/* HTML & Body */
html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--color-bg-primary);
  color: var(--color-text-primary);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  font-size: var(--font-size-body-md);
  line-height: var(--line-height-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6,
p,
span,
a,
button,
input,
textarea,
select {
  margin: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  background: none;
  border: none;
}

h1 {
  font-size: var(--font-size-h1);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
}

h2 {
  font-size: var(--font-size-h2);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
}

h3 {
  font-size: var(--font-size-h3);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
}

h4 {
  font-size: var(--font-size-h4);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
}

h5 {
  font-size: var(--font-size-h5);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-normal);
}

h6 {
  font-size: var(--font-size-h6);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-normal);
}

p {
  font-size: var(--font-size-body-md);
  line-height: var(--line-height-relaxed);
}

/* Links */
a {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: color var(--transition-normal) var(--timing-ease-out);
}

a:hover {
  color: var(--color-primary);
}

/* Lists */
ul,
ol,
li {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Forms */
button {
  cursor: pointer;
  border: none;
  background: none;
  font: inherit;
  padding: 0;
  margin: 0;
}

input,
textarea,
select {
  border: none;
  padding: 0;
  margin: 0;
  font-family: inherit;
  font-size: inherit;
}

input::placeholder,
textarea::placeholder {
  color: var(--color-text-secondary);
  opacity: 1;
}

textarea {
  resize: vertical;
}

select {
  appearance: none;
}

/* Images */
img,
svg,
picture,
video,
canvas {
  display: block;
  max-width: 100%;
  height: auto;
}

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

/* Tables */
table {
  border-collapse: collapse;
  border-spacing: 0;
  width: 100%;
}

td,
th {
  padding: 0;
  text-align: left;
}

/* Preformatted */
pre,
code {
  font-family: 'Courier New', Courier, monospace;
  margin: 0;
  padding: 0;
}

/* Utility Classes */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Scrollbar Styles (Optional) */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: var(--border-radius-md);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-text-secondary);
}
