/* ═══════════════════════════════════════════════════════════════
   base.css  —  EduNudge SciLab | Motion
   Reset, CSS variables, typography, global layout
═══════════════════════════════════════════════════════════════ */

/* ───────────────────────────────────────────────────────────────
   1.  CSS CUSTOM PROPERTIES
─────────────────────────────────────────────────────────────── */
:root {
  /* Colours */
  --bg-page: #080c18;
  --bg-panel: #0d1225;
  --bg-panel-section: #111827;
  --bg-panel-hover: #161e30;
  --border-color: #1e2d4a;
  --border-bright: #2a3f6a;

  /* Text */
  --text-primary: #e8edf5;
  --text-secondary: #8a9bb8;
  --text-muted: #4a5a78;
  --text-accent: #4fc3f7;

  /* Brand */
  --brand-blue: #1a73e8;
  --brand-glow: #4fc3f7;

  /* Motion type colours */
  --color-uniform: #4fc3f7;
  --color-accel: #43e97b;
  --color-decel: #f7971e;
  --color-rest: #a29bfe;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 14px;
  --space-lg: 20px;
  --space-xl: 28px;

  /* Typography */
  --font-main: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-mono: 'Consolas', 'Courier New', monospace;
  --font-size-base: 13px;
  --font-size-sm: 11px;
  --font-size-lg: 15px;
  --font-size-xl: 18px;

  /* Borders */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-med: 0.3s ease;
  --transition-slow: 0.5s ease;

  /* Layout */
  --header-height: 52px;
  --footer-height: 36px;
  --left-panel-width: 210px;
  --right-panel-width: 200px;
}

/* ───────────────────────────────────────────────────────────────
   2.  RESET
─────────────────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: var(--font-size-base);
  height: 100%;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-page);
  color: var(--text-primary);
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ───────────────────────────────────────────────────────────────
   3.  SCROLLBAR
─────────────────────────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}

::-webkit-scrollbar-track {
  background: var(--bg-panel);
}

::-webkit-scrollbar-thumb {
  background: var(--border-bright);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--brand-glow);
}

/* ───────────────────────────────────────────────────────────────
   4.  MAIN LAYOUT
─────────────────────────────────────────────────────────────── */
.main-layout {
  display: flex;
  flex-direction: row;
  flex: 1;
  overflow: hidden;
  height: calc(100vh - var(--header-height) - var(--footer-height));
}

/* ───────────────────────────────────────────────────────────────
   5.  TYPOGRAPHY
─────────────────────────────────────────────────────────────── */
h1,
h2,
h3 {
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.01em;
}

a {
  color: var(--brand-glow);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: #ffffff;
  text-decoration: underline;
}

/* ───────────────────────────────────────────────────────────────
   6.  FOOTER
─────────────────────────────────────────────────────────────── */
.site-footer {
  height: var(--footer-height);
  background: var(--bg-panel);
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.site-footer a {
  color: var(--text-secondary);
  margin: 0 var(--space-xs);
}

.site-footer a:hover {
  color: var(--brand-glow);
}

/* ───────────────────────────────────────────────────────────────
   7.  BACKGROUND GRID  (decorative)
─────────────────────────────────────────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--border-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-color) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.18;
  pointer-events: none;
  z-index: 0;
}

header,
main,
footer,
aside,
section {
  position: relative;
  z-index: 1;
}