/* =========================
   BASE / RESET
========================= */

* {
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: var(--color-bg-tertiary) var(--color-bg);
}

/* Remove blue tap highlight on mobile (iOS/Android) */
a,
button,
input,
[role="button"] {
  -webkit-tap-highlight-color: transparent;
  tap-highlight-color: transparent;
}

html {
  color-scheme: dark;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--text-primary);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  line-height: 1.6;
}

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

/* =========================
   GLOBAL SCROLLBAR (WebKit)
========================= */

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

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

::-webkit-scrollbar-thumb {
  background-color: var(--color-bg-tertiary);
  border-radius: 999px;
  border: 2px solid var(--color-bg);
  transition: background-color 0.25s ease;
}

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

/* =========================
   GLOBAL TYPOGRAPHY
========================= */

h1, h2, h3, h4, h5, h6 {
  margin-top: 0;
  line-height: 1.3;
}

h1, h2, h3, h4 {
  margin-top: 1rem;
}

/* Content headings (posts & projects) */
main article h2,
main article h3,
main article h4 {
  background: none;
  -webkit-text-fill-color: unset;
  color: var(--text-primary);
}

h1 {
  font-size: 2rem;
  color: var(--text-primary);
}

h3 {
  font-size: 1.25rem;
  color: var(--text-primary);
}

h4, h5, h6 {
  font-size: 1rem;
  color: var(--text-primary);
}

/* Lists */
ul, ol {
  margin: 1rem 0;
  padding-left: 2rem;
  line-height: 1.8;
}

ul li, ol li {
  margin: 0.5rem 0;
  color: var(--text-primary);
}

ul li::marker {
  color: var(--text-highlighted);
}

ol li::marker {
  color: var(--text-highlighted);
  font-weight: 600;
}

/* Links */
a {
  color: var(--text-highlighted);
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
}

a:hover {
  color: var(--gradient-end);
}

a:visited {
  color: var(--text-highlighted);
}

/* Paragraphs */
p {
  margin: 1rem 0;
  line-height: 1.8;
}
