@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
  --bg: #0a0e14;
  --bg2: #0f1319;
  --bg3: #141a22;
  --border: rgba(255,255,255,0.06);
  --w10: rgba(255,255,255,0.1);
  --w20: rgba(255,255,255,0.2);
  --w40: rgba(255,255,255,0.4);
  --w60: rgba(255,255,255,0.6);
  --w80: rgba(255,255,255,0.8);
  --text: rgba(255,255,255,0.8);
  --heading: #ffffff;
  --accent: #00dc82;
  --accent2: #00d4ff;
  --purple: #a855f7;
  --sidebar-w: 280px;
}

body.light-theme {
  --bg: #ffffff;
  --bg2: #f8fafc;
  --bg3: #f1f5f9;
  --border: rgba(0,0,0,0.08);
  --w10: rgba(0,0,0,0.05);
  --w20: rgba(0,0,0,0.1);
  --w40: rgba(0,0,0,0.5);
  --w60: rgba(0,0,0,0.7);
  --w80: rgba(0,0,0,0.9);
  --text: #334155;
  --heading: #0f172a;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.8;
  font-size: 15px;
}

/* ═══ SIDEBAR ═══ */
.sidebar {
  position: fixed; top: 0; left: 0;
  width: var(--sidebar-w); height: 100vh;
  background: var(--bg2);
  border-right: 1px solid var(--border);
  overflow-y: auto; z-index: 100;
  display: flex; flex-direction: column;
}

.sidebar-logo {
  padding: 1.5rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.sidebar-logo h2 {
  font-size: 0.95rem; font-weight: 800;
  letter-spacing: 3px;
  background: linear-gradient(135deg, #fff, #00d4ff, #00dc82);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

.sidebar-logo span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.55rem; color: var(--w20);
  letter-spacing: 0.15em; text-transform: uppercase;
}

.sidebar-nav { padding: 0.75rem 0; flex: 1; }

.sidebar-nav a {
  display: block; padding: 0.5rem 1.25rem;
  font-size: 0.8rem; color: var(--w40);
  text-decoration: none; transition: all 0.2s;
  border-left: 2px solid transparent;
}

.sidebar-nav a:hover { color: var(--w80); background: rgba(255,255,255,0.02); }
.sidebar-nav a.active { color: var(--accent); border-left-color: var(--accent); background: rgba(0,220,130,0.04); font-weight: 600; }

.sidebar-nav .nav-section {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem; color: var(--w20);
  letter-spacing: 0.15em; text-transform: uppercase;
  padding: 1rem 1.25rem 0.4rem; font-weight: 700;
}

.sidebar-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border);
  font-size: 0.65rem; color: var(--w20);
  font-family: 'JetBrains Mono', monospace;
}

/* ═══ MAIN ═══ */
.main {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
}

.content {
  max-width: 780px;
  margin: 0 auto;
  padding: 3rem 2rem 6rem;
}

/* ═══ TYPOGRAPHY ═══ */
h1 {
  font-size: 2.2rem; font-weight: 900;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, #fff 0%, #00d4ff 60%, #00dc82 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

.subtitle {
  font-size: 1rem; color: var(--w40);
  margin-bottom: 2.5rem; font-weight: 400;
}

h2 {
  font-size: 1.5rem; font-weight: 800;
  color: var(--heading); margin: 3rem 0 1rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  letter-spacing: -0.02em;
}

h2:first-of-type { border-top: none; padding-top: 0; }

h3 {
  font-size: 1.1rem; font-weight: 700;
  color: var(--w80); margin: 2rem 0 0.75rem;
}

p { margin-bottom: 1rem; }

strong { color: var(--heading); font-weight: 700; }

a { color: var(--accent2); text-decoration: none; }
a:hover { text-decoration: underline; }

blockquote {
  border-left: 3px solid var(--accent);
  padding: 0.75rem 1rem;
  margin: 1.5rem 0;
  background: rgba(0,220,130,0.04);
  border-radius: 0 8px 8px 0;
  font-style: italic; color: var(--w60);
}

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

ul, ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

li { margin-bottom: 0.4rem; }

code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85em;
  background: rgba(255,255,255,0.06);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  color: var(--accent);
}

pre {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem;
  overflow-x: auto;
  margin: 1.25rem 0;
  font-size: 0.82rem;
  line-height: 1.7;
}

pre code {
  background: none; padding: 0;
  color: var(--w60);
}

/* ═══ TABLES ═══ */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0;
  font-size: 0.85rem;
}

th {
  text-align: left;
  padding: 0.7rem 0.75rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--w40);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
}

td {
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--border);
  color: var(--w60);
}

tr:hover td { background: rgba(255,255,255,0.015); }

/* ═══ CALLOUT ═══ */
.callout {
  padding: 1rem 1.25rem;
  border-radius: 10px;
  margin: 1.5rem 0;
  font-size: 0.9rem;
  border: 1px solid;
}

.callout.green {
  background: rgba(0,220,130,0.05);
  border-color: rgba(0,220,130,0.15);
  color: var(--accent);
}

.callout.blue {
  background: rgba(0,212,255,0.05);
  border-color: rgba(0,212,255,0.15);
  color: var(--accent2);
}

/* ═══ MOBILE ═══ */
.mobile-header {
  display: none;
  position: fixed; top: 0; left: 0; right: 0;
  height: 56px; background: var(--bg2);
  border-bottom: 1px solid var(--border);
  z-index: 200; align-items: center;
  padding: 0 1rem;
}

.hamburger {
  background: none; border: none;
  color: var(--w60); cursor: pointer;
  font-size: 1.5rem; padding: 0.5rem;
}

.sidebar-overlay {
  display: none; position: fixed;
  inset: 0; background: rgba(0,0,0,0.6);
  z-index: 99;
}

@media (max-width: 860px) {
  .mobile-header { display: flex; }
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay.open { display: block; }
  .main { margin-left: 0; padding-top: 56px; }
  .content { padding: 2rem 1.25rem 4rem; }
  h1 { font-size: 1.6rem; }
  h2 { font-size: 1.25rem; }
  table { font-size: 0.75rem; }
}
/* --- PAGINATION --- */
.pagination {
  display: flex;
  justify-content: space-between;
  margin-top: 2rem;
  gap: 1rem;
}

.page-btn {
  display: flex;
  flex-direction: column;
  padding: 1rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg2);
  text-decoration: none;
  transition: all 0.2s;
  flex: 1;
}

.page-btn.prev { align-items: flex-start; }
.page-btn.next { align-items: flex-end; }

.page-btn:hover {
  border-color: var(--accent);
  background: rgba(0,220,130,0.05);
  transform: translateY(-2px);
}

.page-btn .btn-label {
  font-size: 0.75rem;
  color: var(--w40);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.page-btn .btn-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent2);
}

/* ═══ THEME TOGGLE ═══ */
.theme-toggle {
  padding: 0.5rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  color: var(--w40);
  font-size: 0.75rem;
  font-weight: 600;
  transition: all 0.2s;
}

.theme-toggle:hover { color: var(--accent); }

.theme-toggle svg { width: 14px; height: 14px; fill: currentColor; }

body.light-theme .sidebar-logo h2 {
  background: linear-gradient(135deg, #0f172a, #00d4ff, #00dc82);
  -webkit-background-clip: text;
}

