@font-face {
  font-family: "JetBrains Mono";
  src: url("/fonts/JetBrainsMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("/fonts/JetBrainsMono-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0b0f14;
  --text: #c5ceda;
  --muted: #7a8696;
  --border: #2a3442;
  --highlight: #e0703a;
  --glow-a: rgba(64, 110, 160, 0.10);
  --glow-b: rgba(40, 80, 110, 0.08);
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f3f5f8;
  --text: #18202b;
  --muted: #5b6675;
  --border: #c3ccd8;
  --highlight: #b44d16;
  --glow-a: rgba(80, 130, 180, 0.10);
  --glow-b: rgba(60, 110, 150, 0.07);
  color-scheme: light;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f3f5f8;
    --text: #18202b;
    --muted: #5b6675;
    --border: #c3ccd8;
    --highlight: #b44d16;
    --glow-a: rgba(80, 130, 180, 0.10);
    --glow-b: rgba(60, 110, 150, 0.07);
    color-scheme: light;
  }
}

*, *::before { box-sizing: border-box; }

html, body { margin: 0; }

body {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 48px 20px;
  background: var(--bg);
  color: var(--muted);
  font-family: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 14px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  transition: background-color .3s, color .3s;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Faint, slow, cold background glow */
body::before {
  content: "";
  position: fixed;
  inset: -30%;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(40% 35% at 30% 35%, var(--glow-a), transparent 70%),
    radial-gradient(35% 40% at 70% 65%, var(--glow-b), transparent 70%);
  animation: drift 90s ease-in-out infinite alternate;
}

@keyframes drift {
  from { transform: translate3d(-4%, -3%, 0) rotate(0deg); }
  to   { transform: translate3d(4%, 3%, 0) rotate(8deg); }
}

@media (prefers-reduced-motion: reduce) {
  body::before { animation: none; }
}

main { width: 100%; max-width: 34rem; }

h1 {
  margin: 0 0 1.25rem;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0;
}

h1 span { color: var(--highlight); }

p { margin: 0 0 1.1rem; }

a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: color .2s, border-color .2s;
}

a:hover, a:focus-visible {
  color: var(--highlight);
  border-color: var(--highlight);
}

a:focus-visible { outline: 1px dashed var(--highlight); outline-offset: 3px; }

.controls {
  position: fixed;
  top: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
}

.lang {
  display: flex;
  gap: 8px;
  padding: 0 8px;
}

.lang a { color: var(--muted); border: 0; }
.lang a[aria-current="true"] { color: var(--text); }
.lang a:hover, .lang a:focus-visible { color: var(--highlight); }

.theme-toggle {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  cursor: pointer;
  transition: color .2s;
}

.theme-toggle:hover, .theme-toggle:focus-visible { color: var(--highlight); }
.theme-toggle:focus-visible { outline: 1px dashed var(--highlight); outline-offset: 2px; }
.theme-toggle svg { width: 16px; height: 16px; }
