/* ============================================
   BASE.CSS
   Reset mặc định của trình duyệt + style nền tảng.
   ============================================ */

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

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  font-family: var(--font-body);
  background: var(--bg-void);
  color: var(--text-primary);
  overflow-x: hidden;
  position: relative;
}

/* Canvas bầu trời sao vẽ bằng JS, nằm cố định phía sau toàn bộ nội dung */
#starfield {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

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

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

::selection {
  background: var(--accent-mint-dim);
  color: var(--text-primary);
}

/* Trạng thái focus rõ ràng cho bàn phím, phục vụ khả năng tiếp cận */
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent-mint);
  outline-offset: 3px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
