/* ============================================================
   rebcoder.com — shared chrome
   Design tokens, reset, background layers, nav, footer,
   section scaffolding, shared keyframes.
   Page-specific styles stay inline in each page's <style>.
   Injected markup (nav/footer/orbs) lives in /js/chrome.js.
   ============================================================ */

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

:root {
  --bg: #0a0a0b;
  --bg-subtle: #111113;
  --bg-card: #16161a;
  --bg-card-hover: #1c1c21;
  --border: #2a2a30;
  --border-bright: #3a3a42;
  --text: #e8e8ed;
  --text-dim: #8888a0;
  --text-muted: #55556a;
  --accent: #00ff88;
  --accent-dim: #00cc6a;
  --accent-glow: rgba(0, 255, 136, 0.15);
  --accent-glow-strong: rgba(0, 255, 136, 0.3);
  --red: #ff4444;
  --yellow: #ffd700;
  --blue: #4488ff;
  --font-display: 'Outfit', sans-serif;
  --font-mono: 'JetBrains Mono', 'IBM Plex Mono', monospace;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
  color: var(--text);
}

body {
  font-family: var(--font-mono);
  background: var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* === NOISE OVERLAY === */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  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.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
}

/* === GRID BACKGROUND === */
.grid-bg {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

/* === GLOW ORBS === */
.glow-orb {
  position: fixed;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  top: -200px;
  right: -200px;
  pointer-events: none;
  z-index: 0;
  animation: orbFloat 8s ease-in-out infinite;
}

.glow-orb-2 {
  position: fixed;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(68, 136, 255, 0.08) 0%, transparent 70%);
  bottom: -100px;
  left: -100px;
  pointer-events: none;
  z-index: 0;
  animation: orbFloat2 10s ease-in-out infinite;
}

/* === CONTAINERS === */
.container {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px;
}

.container-wide {
  position: relative;
  z-index: 1;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 24px;
}

/* === NAV === */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 24px;
  background: rgba(10, 10, 11, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.5px;
}

.nav-logo span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 24px;
  list-style: none;
}

.nav-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: color 0.2s;
  letter-spacing: 0.5px;
}

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

.nav-links a.active {
  color: var(--accent);
}

/* === SECTIONS === */
.section {
  padding: 80px 0;
}

.section-label {
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 4px;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 12px;
}

.section-title {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -1px;
  margin-bottom: 32px;
  color: var(--text);
}

.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
  margin: 0;
}

/* === FOOTER === */
footer {
  padding: 40px 0;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer-text {
  font-size: 12px;
  color: var(--text-muted);
}

.footer-text span {
  color: var(--accent);
}

/* === SHARED KEYFRAMES === */
@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-40px, 30px); }
}

@keyframes orbFloat2 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(30px, -20px); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

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

@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 var(--accent-glow); }
  50% { opacity: 0.7; box-shadow: 0 0 8px 4px var(--accent-glow); }
}

/* === SCROLL FADE-IN === */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* === RESPONSIVE (chrome only — pages keep their own 640px block) === */
@media (max-width: 640px) {
  .section { padding: 60px 0; }
  .nav-links { gap: 16px; }
  .nav-links a { font-size: 12px; }
}
