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

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}

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

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

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

input,
select,
textarea {
  font: inherit;
  color: inherit;
}

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

ul,
ol {
  list-style: none;
}

h1, h2, h3, h4 {
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

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

.mono {
  font-family: var(--font-mono);
  font-feature-settings: "tnum";
  letter-spacing: 0;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 200;
  background: var(--surface-3);
  border: 1px solid var(--border-strong);
  color: var(--text);
  padding: 10px 16px;
  border-radius: var(--radius-s);
  transition: top var(--dur) var(--ease);
}

.skip-link:focus {
  top: 16px;
}

[id] {
  scroll-margin-top: 86px;
}

.page > * {
  animation: fadeUp var(--dur-slow) var(--ease) both;
}

.page > *:nth-child(2) {
  animation-delay: 40ms;
}

.page > *:nth-child(3) {
  animation-delay: 80ms;
}

.page > *:nth-child(4) {
  animation-delay: 120ms;
}

.page > *:nth-child(5) {
  animation-delay: 160ms;
}

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

:focus:not(:focus-visible) {
  outline: none;
}

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

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border: 3px solid var(--bg);
  border-radius: 8px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.18);
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes pulseDot {
  0%, 100% {
    box-shadow: 0 0 0 0 var(--accent-glow);
  }
  50% {
    box-shadow: 0 0 0 5px transparent;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}