[data-theme="dark"] {
  color-scheme: dark;
}

body {
  font-family: var(--font-family-primary);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  color: var(--text-primary);
  background-color: var(--bg-body);
  min-height: 100vh;
  text-wrap-style: pretty;
}

main {
  padding: var(--header-hero-height) 0 0 0;
  transition: padding var(--transition-base);
}

:has(header.shrink) main {
  padding: var(--header-hero-height-shrink) 0 0 0;
}

/* ------------------ Typography ------------------ */

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

h1 {
  font-size: var(--font-size-4xl);
}

h2 {
  font-size: var(--font-size-3xl);
}

h3 {
  font-size: var(--font-size-2xl);
}

h4 {
  font-size: var(--font-size-xl);
}

h5 {
  font-size: var(--font-size-lg);
}

h6 {
  font-size: var(--font-size-base);
}

p {
  color: var(--text-secondary);
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

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

video {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ------------------ Lists ------------------ */

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

/* ------------------ Buttons ------------------ */

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  outline: none;
}

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

/* ------------------ Container ------------------ */

.container {
  width: 100%;
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding-inline: var(--container-padding);
}

/* ------------------ Selection ------------------ */

::selection {
  background-color: var(--color-primary);
  color: var(--text-on-primary);
}

[data-theme="dark"] ::selection {
  background-color: var(--color-primary-light);
  color: var(--text-inverse);
}

/* ------------------ Scrollbar ------------------ */

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

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

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

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

[data-theme="dark"] ::-webkit-scrollbar-track {
  background: var(--bg-surface);
}

[data-theme="dark"] ::-webkit-scrollbar-thumb {
  background: var(--border-color-dark);
}

[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ------------------ Focus Styles ------------------ */

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

[data-theme="dark"] :focus-visible {
  outline-color: var(--color-primary-light);
}

/* ------------------ Screen Reader Only ------------------ */

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

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}