/* JCMB Core Styles — shared across all pages */
:root {
  --bg: #000000;
  --fg: #fafafa;
  --muted: #a1a1aa;
  --border: #27272a;
}
:root.light {
  --bg: #fafafa;
  --fg: #0a0a0b;
  --muted: #6b7280;
  --border: #e5e7eb;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

@keyframes scanlines {
  0% { background-position: 0 0; }
  100% { background-position: 0 4px; }
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

html, body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
}
a { color: var(--fg); text-decoration: none; }
a:hover { color: var(--muted); }

/* CRT scanline effect */
.dark body::after {
  content: "";
  position: fixed; inset: 0; pointer-events: none; z-index: 9999;
  background: repeating-linear-gradient(0deg,
    transparent, transparent 2px,
    rgba(255,255,255,0.046) 2px, rgba(255,255,255,0.046) 4px);
  animation: scanlines 0.5s linear infinite;
}
.light body::after {
  content: "";
  position: fixed; inset: 0; pointer-events: none; z-index: 9999;
  background: repeating-linear-gradient(0deg,
    transparent, transparent 2px,
    rgba(0,0,0,0.03) 2px, rgba(0,0,0,0.03) 4px);
  animation: scanlines 0.5s linear infinite;
}

/* Navbar */
.navbar {
  position: fixed; top: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: center;
  gap: 0.5rem; padding: 0.5rem 1rem; z-index: 100;
  background: var(--bg); border-bottom: 1px solid var(--border);
}
.nav-btn {
  background: none; color: var(--fg); border: 1px solid var(--border);
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; border-radius: 4px; transition: all 0.2s;
  padding: 0; font-family: inherit; font-size: 0.75rem; position: relative;
}
.nav-btn:hover { border-color: var(--fg); }

/* Language menu */
.lang-menu {
  position: absolute; top: 100%; left: 50%; transform: translateX(-50%); margin-top: 4px;
  background: var(--bg); border: 1px solid var(--border); border-radius: 4px;
  display: none; flex-direction: column; min-width: 48px; overflow: hidden;
  z-index: 200;
}
.lang-menu.open { display: flex; }
.lang-option {
  background: none; border: none; color: var(--fg); font-family: inherit;
  font-size: 0.8rem; padding: 0.4rem 0.75rem; cursor: pointer; text-align: center;
  transition: background 0.15s;
}
.lang-option:hover { background: var(--border); }
.lang-option.active { color: var(--muted); }

/* Footer */
footer {
  position: fixed; bottom: 0; left: 0; right: 0;
  padding: 1rem; text-align: center; font-size: 0.65rem;
  color: var(--muted); border-top: 1px solid var(--border);
  background: var(--bg);
}
footer a { color: var(--fg); text-decoration: none; transition: color 0.2s; }
footer a:hover { color: var(--muted); }

/* Utilities */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.cursor-blink {
  display: inline-block; width: 8px; height: 16px;
  background: var(--fg); margin-left: 2px;
  animation: blink 1s step-end infinite;
  vertical-align: middle; margin-bottom: 2px;
}
