/* ============================================
   CSS Reset & Normalization
   ============================================ */

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--color-background);
  color: var(--color-text-primary);
  font-family: var(--font-arimo);
  font-size: var(--font-size-16);
  line-height: var(--line-height-normal);
  overflow-x: hidden;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: var(--line-height-tight);
  margin: 0;
  padding: 0;
}

/* Paragraphs */
p {
  margin: 0;
  padding: 0;
}

p + p {
  margin-top: var(--space-16);
}

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

a:hover {
  text-decoration: underline;
}

a:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Buttons */
button {
  border: none;
  background: none;
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: all var(--transition-base);
  padding: 0;
  margin: 0;
}

button:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

/* Images */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

figure {
  margin: 0;
  padding: 0;
}

figcaption {
  font-size: var(--font-size-14);
  color: var(--color-text-secondary);
  margin-top: var(--space-8);
}

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

/* Forms */
input,
textarea,
select {
  font: inherit;
  color: inherit;
  border: none;
  background: transparent;
  padding: 0;
  margin: 0;
}

input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Sections */
section {
  margin: 0;
  padding: 0;
}

article {
  margin: 0;
  padding: 0;
}

/* Code */
code, pre {
  font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
  font-size: 0.9em;
}

/* HR */
hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: var(--space-32) 0;
}

/* Blockquote */
blockquote {
  margin: 0;
  padding: 0;
}

/* Focus visible for all interactive elements */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Accessibility: Skip to main content */
.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;
}

/* Print styles */
@media print {
  html {
    background: white;
    color: black;
  }

  body {
    background: white;
    color: black;
  }

  a {
    text-decoration: underline;
  }

  img {
    max-width: 100%;
  }
}
