/* ==========================================================================
   Nurax Training — Premium dark theme
   ========================================================================== */

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

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

:root {
  --bg: #06060a;
  --bg2: #0a0a10;
  --bg3: #14141a;
  --card: #0d0d12;
  --card-hover: #151519;
  --border: #1e1e28;
  --border-hover: #2e2e3a;
  --text: #f0f0f5;
  --text2: #b0b0c0;
  --text3: #6b6b80;
  --accent: #7c3aed;
  --accent2: #a78bfa;
  --accent-glow: rgba(124, 58, 237, 0.12);
  --green: #34d399;
  --green-bg: rgba(52, 211, 153, 0.1);
  --orange: #fb923c;
  --orange-bg: rgba(251, 146, 60, 0.1);
  --red: #f87171;
  --red-bg: rgba(248, 113, 113, 0.08);
  --blue: #60a5fa;
  --blue-bg: rgba(96, 165, 250, 0.1);
  --cyan: #22d3ee;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, system-ui, sans-serif;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.7;
  color: var(--text2);
  background: var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
}

/* Subtle grid background */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 80px 80px;
  opacity: 0.15;
  pointer-events: none;
  z-index: 0;
  mask-image: radial-gradient(ellipse 60% 60% at 50% 30%, black 10%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 60% 60% at 50% 30%, black 10%, transparent 70%);
}

/* Top glow */
body::after {
  content: '';
  position: fixed;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 600px;
  background: radial-gradient(ellipse, rgba(124, 58, 237, 0.06) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

h1 { font-size: 32px; font-weight: 700; line-height: 1.2; margin-bottom: 12px; color: var(--text); letter-spacing: -0.02em; }
h2 { font-size: 22px; font-weight: 600; line-height: 1.3; margin: 40px 0 16px; color: var(--text); letter-spacing: -0.01em; }
h3 { font-size: 16px; font-weight: 600; line-height: 1.4; margin: 20px 0 8px; color: var(--text); }
p { margin-bottom: 14px; }

a { color: var(--accent2); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--text); }

::selection { background: var(--accent); color: white; }

code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  background: var(--bg3);
  padding: 2px 7px;
  border-radius: 5px;
  color: var(--cyan);
  border: 1px solid var(--border);
}

pre {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  overflow-x: auto;
  margin: 12px 0 16px;
}

pre code { background: none; padding: 0; border: none; font-size: 13px; line-height: 1.7; }

/* --------------------------------------------------------------------------
   Top Navigation
   -------------------------------------------------------------------------- */

.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 52px;
  background: rgba(6, 6, 10, 0.85);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  display: flex;
  align-items: center;
  padding: 0 24px;
}

.nav-brand {
  font-weight: 600;
  font-size: 16px;
  color: var(--text);
  text-decoration: none;
  margin-right: 28px;
  white-space: nowrap;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-brand:hover { color: var(--accent2); }

.nav-brand-dim { font-weight: 300; color: var(--text3); margin-left: -2px; }

.nav-logo-svg {
  /* let width scale from height to preserve aspect ratio */
  width: auto;
  height: 18px;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
}

.nav-links a {
  display: block;
  padding: 5px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text3);
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.15s;
  white-space: nowrap;
}

.nav-links a:hover { color: var(--text); background: var(--bg3); }

.nav-links a.active {
  color: var(--text);
  background: var(--bg3);
}

.nav-divider {
  width: 1px;
  height: 16px;
  background: var(--border);
  margin: 0 6px;
  flex-shrink: 0;
}

.nav-missions-badge {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  text-decoration: none;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 14px;
  transition: border-color 0.15s;
  height: 36px;
}

.nav-missions-badge:hover { border-color: var(--accent); }

.nav-missions-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.nav-missions-bar-wrap {
  width: 80px;
  height: 4px;
  background: var(--bg);
  border-radius: 100px;
  overflow: hidden;
}

.nav-missions-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--green));
  border-radius: 100px;
  transition: width 0.5s ease;
}

.nav-missions-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent2);
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */

.content-area {
  max-width: 980px;
  margin: 0 auto;
  padding: 76px 32px 80px;
  width: 100%;
  position: relative;
  z-index: 1;
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  text-align: center;
  padding: 56px 0 32px;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: -76px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(ellipse, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
}

.hero-title {
  font-size: 52px;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--text) 0%, var(--accent2) 50%, var(--accent) 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 16px;
  animation: gradientShift 8s ease infinite;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.hero-subtitle {
  font-size: 17px;
  color: var(--text2);
  line-height: 1.6;
  max-width: 520px;
  margin: 0 auto 24px;
}

.hero-rule {
  display: inline-block;
  background: var(--red-bg);
  border: 1px solid rgba(248, 113, 113, 0.2);
  padding: 8px 20px;
  border-radius: 100px;
  font-size: 13px;
  color: var(--red);
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   CTA Box
   -------------------------------------------------------------------------- */

.cta-box {
  position: relative;
  border: 1px solid rgba(124, 58, 237, 0.3);
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.06), rgba(52, 211, 153, 0.02));
  border-radius: var(--radius-lg);
  padding: 36px 40px;
  margin: 40px 0;
  text-align: center;
  overflow: hidden;
}

.cta-box::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 20%;
  right: 20%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent2), transparent);
}

.cta-box h3 { color: var(--text); margin-bottom: 8px; font-size: 20px; }
.cta-box p { color: var(--text2); margin-bottom: 20px; font-size: 15px; }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn-primary {
  background: var(--accent);
  color: #ffffff;
  font-weight: 600;
  font-size: 14px;
  padding: 10px 24px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: all 0.2s ease;
  box-shadow: 0 0 0 0 var(--accent-glow);
}

.btn-primary:hover {
  background: #8b5cf6;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 20px var(--accent-glow), 0 0 40px var(--accent-glow);
}

/* --------------------------------------------------------------------------
   Cards
   -------------------------------------------------------------------------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 16px 0 32px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  transition: all 0.2s ease;
  position: relative;
}

.card::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 16px;
  right: 16px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-hover), transparent);
  opacity: 0;
  transition: opacity 0.2s;
}

.card:hover {
  background: var(--card-hover);
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.card:hover::before { opacity: 1; }

.card h3 { margin: 8px 0 6px; font-size: 15px; color: var(--text); }
.card p { font-size: 13px; color: var(--text3); margin: 0; line-height: 1.5; }

.label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--accent2);
}

/* --------------------------------------------------------------------------
   Callouts
   -------------------------------------------------------------------------- */

.tip {
  border-left: 2px solid var(--accent);
  background: rgba(124, 58, 237, 0.04);
  padding: 14px 18px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 16px 0;
  font-size: 14px;
}

.tip strong { color: var(--accent2); }

.warning {
  border-left: 2px solid var(--red);
  background: var(--red-bg);
  padding: 14px 18px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 16px 0;
  font-size: 14px;
}

.warning strong { color: var(--red); }

/* --------------------------------------------------------------------------
   Command Blocks
   -------------------------------------------------------------------------- */

.cmd {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--cyan);
  margin: 10px 0 16px;
  overflow-x: auto;
  line-height: 1.7;
}

.cmd .comment { color: var(--text3); }

/* --------------------------------------------------------------------------
   Missions
   -------------------------------------------------------------------------- */

.mission {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 8px;
  overflow: hidden;
  transition: border-color 0.15s;
}

.mission:hover { border-color: var(--border-hover); }

.mission-header {
  padding: 12px 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  user-select: none;
  transition: background 0.1s;
}

.mission-header:hover { background: var(--card-hover); }

.task-check {
  width: 20px; height: 20px; border-radius: 5px;
  border: 2px solid var(--border);
  background: transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  flex-shrink: 0;
  font-size: 12px;
  color: transparent;
}

.task-check:hover { border-color: var(--accent2); }
.task-check.checked { background: var(--green); border-color: var(--green); color: #fff; }

.mission-name { font-size: 14px; font-weight: 500; flex-grow: 1; color: var(--text); }
.mission-name.done { text-decoration: line-through; color: var(--text3); }

.mission-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 100px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.tag-do { background: var(--green-bg); color: var(--green); }
.tag-read { background: var(--blue-bg); color: var(--blue); }
.tag-challenge { background: var(--orange-bg); color: var(--orange); }

.mission-arrow {
  color: var(--text3); transition: all 0.15s; font-size: 10px; flex-shrink: 0;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--bg3); display: flex; align-items: center; justify-content: center;
}
.mission-header:hover .mission-arrow { background: var(--accent); color: white; }
.mission.open .mission-arrow { transform: rotate(90deg); background: var(--accent); color: white; }

.mission-body {
  display: none;
  padding: 0 18px 18px;
  border-top: 1px solid var(--border);
}

.mission.open .mission-body { display: block; }
.mission-body p { font-size: 14px; margin: 12px 0 8px; }
.mission-body p:first-child { margin-top: 12px; }

/* --------------------------------------------------------------------------
   Phases
   -------------------------------------------------------------------------- */

.phase { margin-bottom: 36px; }

.phase-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.phase-number {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent);
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; flex-shrink: 0;
}

.phase-title { font-size: 18px; font-weight: 600; color: var(--text); margin: 0; letter-spacing: -0.01em; }

.phase-time {
  font-size: 11px; color: var(--text3); margin-left: auto;
  background: var(--bg3); padding: 3px 10px; border-radius: 100px; font-weight: 500;
}

/* --------------------------------------------------------------------------
   Coming Soon
   -------------------------------------------------------------------------- */

.coming-soon {
  text-align: center;
  padding: 80px 0;
}

.coming-soon h2 { color: var(--text3); font-size: 18px; margin-bottom: 8px; }
.coming-soon p { font-size: 14px; max-width: 360px; margin: 0 auto; color: var(--text3); }

/* --------------------------------------------------------------------------
   Step Lists
   -------------------------------------------------------------------------- */

.step-list { counter-reset: steps; list-style: none; padding: 0; }

.step-list li {
  counter-increment: steps;
  display: flex; align-items: flex-start;
  gap: 12px; margin-bottom: 14px; font-size: 14px;
}

.step-list li::before {
  content: counter(steps);
  background: var(--accent); color: white;
  width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; flex-shrink: 0; margin-top: 2px;
}

/* --------------------------------------------------------------------------
   Credentials
   -------------------------------------------------------------------------- */

.credentials-box {
  background: var(--card);
  border: 1px solid rgba(124, 58, 237, 0.3);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin: 20px 0;
}

.credentials-box h3 { color: var(--accent2); font-size: 16px; margin-bottom: 8px; }

/* --------------------------------------------------------------------------
   Tables
   -------------------------------------------------------------------------- */

table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 14px; }

th {
  text-align: left; padding: 10px 14px;
  background: var(--bg3); border-bottom: 1px solid var(--border);
  color: var(--text); font-weight: 600; font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.5px;
}

td { padding: 10px 14px; border-bottom: 1px solid var(--border); }
tr:hover td { background: rgba(124, 58, 237, 0.02); }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer-inner {
  padding: 32px 0;
  border-top: 1px solid var(--border);
  margin-top: 64px;
  text-align: center;
  color: var(--text3);
  font-size: 12px;
  letter-spacing: 0.02em;
}

/* --------------------------------------------------------------------------
   Section Labels
   -------------------------------------------------------------------------- */

.section-label {
  font-size: 11px; font-weight: 600;
  color: var(--accent2);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 8px;
}

/* --------------------------------------------------------------------------
   Progress Bar (standalone)
   -------------------------------------------------------------------------- */

.progress-container { padding: 0; }

.progress-bar {
  height: 4px; background: var(--bg3);
  border-radius: 100px; overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--green));
  border-radius: 100px;
  transition: width 0.5s ease;
}

.progress-text { display: block; margin-top: 6px; font-size: 12px; color: var(--text3); }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 768px) {
  .card-grid { grid-template-columns: 1fr; }
  .hero-title { font-size: 36px; }
  .content-area { padding: 68px 20px 60px; }
  .nav-links a { padding: 5px 8px; font-size: 12px; }
  .cta-box { padding: 24px; }
}

/* --------------------------------------------------------------------------
   Page Navigation (prev/next)
   -------------------------------------------------------------------------- */

.page-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.page-nav a {
  display: inline-block;
  padding: 10px 20px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text2);
  text-decoration: none;
  transition: all 0.15s;
}

.page-nav a:hover {
  color: var(--text);
  border-color: var(--accent);
  background: rgba(124, 58, 237, 0.1);
}

/* --------------------------------------------------------------------------
   Nav Dropdowns
   -------------------------------------------------------------------------- */

.nav-dropdown {
  position: relative;
  list-style: none;
}

.nav-dropdown-btn {
  display: block;
  padding: 5px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text3);
  background: none;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  font-family: inherit;
}

.nav-dropdown-btn:hover,
.nav-dropdown.open .nav-dropdown-btn {
  color: var(--text);
  background: var(--bg3);
}

.nav-dropdown-btn.active {
  color: var(--accent2);
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px;
  min-width: 200px;
  z-index: 200;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.nav-dropdown.open .nav-dropdown-menu {
  display: block;
}

.nav-dropdown-menu a {
  display: block;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 400;
  color: var(--text2);
  text-decoration: none;
  border-radius: 5px;
  transition: all 0.1s;
}

.nav-dropdown-menu a:hover {
  color: var(--text);
  background: var(--bg3);
}

.nav-dropdown-menu a.active {
  color: var(--accent2);
  background: rgba(124, 58, 237, 0.08);
}

.nav-dropdown-sep {
  height: 1px;
  background: var(--border);
  margin: 4px 8px;
}
