/* ============================================
   Base — Typography & Global Element Styles
   ============================================ */

/* ---- Font Imports ---- */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:ital,wght@0,400;0,500;0,600;0,700;1,400&family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,700;1,9..40,400&display=swap');

/* ---- Body ---- */
body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-normal);
  color: var(--color-text-primary);
  background-color: var(--color-bg);
}

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

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl);  }

/* ---- Paragraphs ---- */
p {
  color: var(--color-text-secondary);
  line-height: var(--line-height-loose);
  max-width: 65ch;
}

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

/* ---- Links ---- */
a {
  transition: color var(--transition-fast);
}

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

a:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ---- Selection ---- */
::selection {
  background-color: var(--color-accent-dim);
  color: var(--color-text-primary);
}

/* ---- Scrollbar (subtle) ---- */
::-webkit-scrollbar {
  width: 6px;
}

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

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

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

/* ---- Monospace elements ---- */
code, kbd {
  font-family: var(--font-display);
  font-size: var(--text-sm);
}

/* ---- Strong / Em ---- */
strong {
  font-weight: var(--font-weight-bold);
  color: var(--color-text-primary);
}

em {
  font-style: italic;
}
