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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-dungeon);
  background-image: var(--stone-pattern);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background-color var(--transition), color var(--transition);
  overflow-x: hidden;
}

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

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

ul {
  list-style: none;
}

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

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

/* ===== Typography Utilities ===== */
.pixel-text {
  font-family: var(--font-pixel);
}

.accent {
  color: var(--accent);
}

/* ===== Layout Utilities ===== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ===== Particles Canvas ===== */
#particles-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* Dwarven rune decoration on section titles */
[data-theme="dark"] .section-title::before {
  content: "᚛ ";
  color: var(--accent);
  opacity: 0.6;
}

[data-theme="dark"] .section-title::after {
  content: " ᚜";
  color: var(--accent);
  opacity: 0.6;
}

/* ===== Keyframe Animations ===== */
@keyframes flicker {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

@keyframes lavaPulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

/* Respect reduced-motion: calm the flicker/animations */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
  }
}
