/* ========================================
   CircuitQuEEst — Shared Styles
   Dark circuit-board theme
   ======================================== */

:root {
  --bg:          #1E1E2E;
  --surface:     #2D2D44;
  --surface-lite:#3D3D5C;
  --blue:        #1A73E8;
  --blue-light:  #5DA3FF;
  --gold:        #F9A825;
  --gold-light:  #FFD54F;
  --green:       #00E676;
  --red:         #FF5252;
  --text:        #E0E0E0;
  --text-muted:  #9E9E9E;
  --border:      rgba(255,255,255,0.08);
  --radius:      12px;
  --radius-sm:   8px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
}

/* ---- Circuit grid background ---- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(26,115,232,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(26,115,232,0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

/* ---- Navigation ---- */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(30,30,46,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 1.5rem;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--blue-light);
  text-decoration: none;
}

.nav-brand .bolt { color: var(--gold); font-size: 1.4rem; }

.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--blue-light); }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.btn-primary {
  background: var(--blue);
  color: #fff;
}
.btn-primary:hover { background: var(--blue-light); transform: translateY(-1px); }

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-outline:hover { border-color: var(--blue-light); color: var(--blue-light); }

/* ---- Cards ---- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  transition: border-color 0.2s, transform 0.2s;
}
.card:hover { border-color: rgba(26,115,232,0.35); transform: translateY(-2px); }

/* ---- Sections ---- */
.section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.section-subtitle {
  color: var(--text-muted);
  margin-bottom: 2.5rem;
}

/* ---- Grid helpers ---- */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; }

/* ---- Badge ---- */
.badge {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-blue  { background: rgba(26,115,232,0.2);  color: var(--blue-light); }
.badge-gold  { background: rgba(249,168,37,0.2);  color: var(--gold-light); }
.badge-green { background: rgba(0,230,118,0.15);  color: var(--green); }

/* ---- Footer ---- */
footer {
  border-top: 1px solid var(--border);
  padding: 2rem 1.5rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

footer a { color: var(--blue-light); text-decoration: none; }
footer a:hover { text-decoration: underline; }

/* ---- Table ---- */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
th {
  text-align: left;
  padding: 0.65rem 0.75rem;
  background: var(--surface-lite);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
td {
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255,255,255,0.02); }

/* ---- Code blocks ---- */
pre, code {
  font-family: 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
  font-size: 0.9rem;
}

pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  overflow-x: auto;
  line-height: 1.7;
}

code {
  background: rgba(255,255,255,0.07);
  padding: 0.15em 0.4em;
  border-radius: 4px;
}

pre code { background: none; padding: 0; }

/* ---- Typography helpers ---- */
h1,h2,h3,h4 { font-weight: 700; line-height: 1.3; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.15rem; }

.text-blue  { color: var(--blue-light); }
.text-gold  { color: var(--gold); }
.text-green { color: var(--green); }
.text-muted { color: var(--text-muted); }

/* ---- Divider ---- */
hr { border: none; border-top: 1px solid var(--border); margin: 2rem 0; }

/* ---- Responsive ---- */
@media (max-width: 600px) {
  .nav-links { display: none; }
  .section { padding: 2.5rem 1rem; }
  .section-title { font-size: 1.4rem; }
  .hero-title { font-size: 2rem !important; }
}
