/* ─── CSS Variables & Reset ───────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,300;0,400;0,500;1,300&display=swap');

:root {
  --bg:        #0c0c0c;
  --surface:   #131313;
  --surface2:  #191919;
  --border:    #222222;
  --muted:     #3a3a3a;
  --subtle:    #262626;
  --text:      #e4e4e4;
  --text-dim:  #666666;
  --text-faint:#333333;
  --accent:    #c8ff00;
  --accent-dim:rgba(200,255,0,0.12);
  --danger:    #ff4d4d;
  --warn:      #f5c542;
  --mono:      'JetBrains Mono', 'Courier New', monospace;
  --ease-out:  cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html { height: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono);
  min-height: 100%;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ─── Film grain ──────────────────────────────────────────── */
.grain {
  position: fixed;
  inset: -50%;
  width: 200%;
  height: 200%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.028;
  pointer-events: none;
  z-index: 900;
  animation: grain-anim 0.45s steps(2) infinite;
}

@keyframes grain-anim {
  0%   { transform: translate(0, 0); }
  25%  { transform: translate(-2%, -3%); }
  50%  { transform: translate(3%, 1%); }
  75%  { transform: translate(-1%, 4%); }
  100% { transform: translate(2%, -1%); }
}

/* ─── Scrollbar ───────────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* ─── Utility ─────────────────────────────────────────────── */
.hidden { display: none !important; }
