/* ==========================================================
   Magnus Academy — shared design system
   Used by: courses.html, faculty.html, results.html
   (index.html has its own separate look — see css/home.css)
   ========================================================== */

:root {
  --page: #edf4ff;
  --surface: rgba(255,255,255,.72);
  --solid: #fff;
  --ink: #10213b;
  --muted: rgba(16,33,59,.62);
  --line: rgba(20,55,100,.14);
  --blue: #1689fe;
  --cyan: #16b9dc;
  --violet: #7764eb;
  --shadow: 0 30px 80px rgba(36,78,130,.15);
}

html[data-theme="dark"] {
  --page: #020611;
  --surface: rgba(12,20,39,.78);
  --solid: #0c1427;
  --ink: #f4f7fb;
  --muted: rgba(244,247,251,.62);
  --line: rgba(255,255,255,.11);
  --shadow: 0 30px 80px rgba(0,0,0,.35);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  min-height: 100svh;
  padding: 24px;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 8%, rgba(70,217,255,.16), transparent 28rem),
    radial-gradient(circle at 88% 18%, rgba(143,123,255,.13), transparent 30rem),
    var(--page);
  font-family: Manrope, system-ui, sans-serif;
}

a { color: inherit; text-decoration: none; }
button { color: inherit; font: inherit; }

.page {
  width: min(1280px, 100%);
  min-height: calc(100svh - 48px);
  margin: 0 auto;
  padding: 0 34px 60px;
}

/* ---------- header / nav ---------- */
header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0 72px;
}
.brand { display: flex; align-items: center; gap: 10px; font-size: .86rem; font-weight: 800; letter-spacing: .08em; }
.brand-mark { display: grid; place-items: center; width: 26px; height: 26px; }

nav { display: flex; align-items: center; gap: 28px; color: var(--muted); font-size: .78rem; font-weight: 700; }
nav a {
  padding: 8px 12px;
  border-radius: 10px;
  transition: color .2s ease, background-color .2s ease;
}
nav a:hover, nav a:focus-visible {
  color: var(--ink);
  background: rgba(22,137,254,.1);
  outline: none;
}
nav a.login-link {
  border: 1px solid var(--line);
  color: var(--ink);
}
nav a.login-link:hover, nav a.login-link:focus-visible {
  border-color: var(--blue);
  background: rgba(22,137,254,.1);
}

.theme-toggle {
  display: grid; place-items: center; width: 34px; height: 34px;
  border: 1px solid var(--line); border-radius: 50%; background: var(--surface);
  cursor: pointer;
}

.mobile-menu-toggle {
  display: none; place-items: center; width: 34px; height: 34px;
  border: 1px solid var(--line); border-radius: 50%; background: var(--surface);
  cursor: pointer; font-size: 1.05rem; line-height: 1;
}

.mobile-menu {
  display: none; position: absolute; top: 64px; left: 0; right: 0; z-index: 5;
  padding: 10px; border: 1px solid var(--line); border-radius: 18px;
  background: var(--solid); box-shadow: var(--shadow); backdrop-filter: blur(18px);
}
.mobile-menu.open { display: grid; }
.mobile-menu a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 12px; border-radius: 11px; color: var(--ink); font-size: .8rem; font-weight: 800;
}
.mobile-menu a:hover { background: rgba(22,137,254,.08); }

.mobile-menu .theme-toggle-mobile {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; padding: 13px 12px; margin-top: 4px;
  border: none; border-top: 1px solid var(--line); border-radius: 11px;
  background: transparent; color: var(--ink); font-size: .8rem; font-weight: 800;
  font-family: inherit; cursor: pointer;
}
.mobile-menu .theme-toggle-mobile:hover { background: rgba(22,137,254,.08); }

/* current-page highlight — add class="active" to the matching nav link on each page */
nav a.active {
  color: var(--ink);
  background: rgba(22,137,254,.08);
}

/* ---------- shared typography helpers ---------- */
.eyebrow { color: var(--muted); font-size: .68rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.kicker { display: flex; align-items: center; gap: 10px; }
.kicker::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 5px rgba(22,185,220,.12); }

h1 { max-width: 800px; margin: 20px 0 18px; font-size: clamp(3rem, 7vw, 6.5rem); line-height: .94; letter-spacing: -.075em; }
.gradient { background: linear-gradient(100deg, var(--cyan), var(--blue) 48%, var(--violet)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.intro { margin: 0; color: var(--muted); font-size: 1rem; line-height: 1.75; }

/* ---------- footer ---------- */
footer {
  display: flex; justify-content: space-between; gap: 20px;
  margin-top: 74px; padding-top: 22px; border-top: 1px solid var(--line);
  color: var(--muted); font-size: .72rem;
}

/* ---------- shared responsive header/footer behaviour ---------- */
@media (max-width: 760px) {
  body { padding: 14px; }
  .page { min-height: calc(100svh - 28px); padding: 0 14px 38px; }
  header { padding: 16px 0 54px; }
  nav a { display: none; }
  nav { gap: 12px; }
  .theme-toggle { display: none; }
  .mobile-menu-toggle { display: grid; }
  h1 { font-size: clamp(3rem, 16vw, 5rem); }
  footer { flex-direction: column; }
}
