@import "./variables.css?v=6";
@import "./components.css?v=6";
@import "./responsive.css?v=6";

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  overscroll-behavior-y: none;
}

body {
  background: radial-gradient(circle at top, var(--color-bg-alt), var(--color-bg) 60%);
  color: var(--color-text);
  font-family: var(--font-sans);
  line-height: 1.55;
  min-height: 100vh;
}

/* Decorative animated background — dark theme only. A single fixed layer
   behind everything, animated with `transform` only (GPU-composited, no
   layout/paint cost) so it stays smooth even on low-end mobile. Deliberately
   NOT using `background-attachment: fixed` (known jank/repaint issue on
   mobile Safari) or background-position animation (triggers repaints). */
#site-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh; /* fallback for browsers without lvh support */
  height: 100lvh; /* large viewport height: stays fixed-size even as the mobile toolbar hides/shows on scroll, so background-size:cover never has to recalculate mid-scroll */
  z-index: -1;
  background: var(--color-bg);
  display: none;
  pointer-events: none;
}

:root[data-theme="dark"] #site-bg {
  display: block;
  background:
    linear-gradient(180deg, rgba(4, 7, 14, 0.25) 0%, rgba(4, 7, 14, 0.15) 45%, rgba(4, 7, 14, 0.6) 100%),
    url("/public/images/bg-character.webp") center 15% / cover no-repeat;
}

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

a:hover {
  text-decoration: underline;
}

h1, h2, h3, h4 {
  font-family: "Orbitron", var(--font-sans);
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 var(--space-3);
}

p {
  margin: 0 0 var(--space-3);
  color: var(--color-text-dim);
}

code, pre {
  font-family: var(--font-mono);
}

pre {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: var(--space-3);
  overflow-x: auto;
}

#app {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-6) var(--space-5);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
