/* ============================================================
   HPC Learning Hub — Landing Page Stylesheet
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=Outfit:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;700&display=swap');

/* ── CSS Variables ── */
:root {
  --bg:           #080b10;
  --bg-card:      #0d1117;
  --bg-card-2:    #111820;
  --border:       rgba(50, 108, 229, 0.18);
  --border-mid:   rgba(50, 108, 229, 0.35);
  --text:         #e8edf5;
  --text-muted:   #7a8899;
  --text-dim:     #4a5568;
  --accent:       #326ce5;
  --accent-glow:  rgba(50, 108, 229, 0.25);

  --spack:        #4caf82;
  --slurm:        #4a8fb5;
  --apptainer:    #7b68ee;
  --kubernetes:   #326ce5;

  --font-heading: 'DM Serif Display', Georgia, serif;
  --font-body:    'Outfit', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', 'Courier New', monospace;

  --radius:       12px;
  --radius-lg:    20px;
  --max-width:    1100px;
  --nav-h:        68px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; }

/* ── Grid noise overlay ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(50,108,229,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(50,108,229,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

/* ── Layout helpers ── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(8, 11, 16, 0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}
.navbar .container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.nav-brand .wheel-icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}
.nav-brand-text {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent);
  text-transform: uppercase;
  line-height: 1.2;
}
.nav-brand-text span {
  display: block;
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  font-weight: 500;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}
.nav-links a {
  font-size: 13px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 8px;
  color: var(--text-muted);
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
}
.nav-links a:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.nav-links a.--spack:hover  { color: var(--spack); }
.nav-links a.--slurm:hover  { color: var(--slurm); }
.nav-links a.--apptainer:hover { color: var(--apptainer); }
.nav-links a.--kubernetes:hover { color: var(--kubernetes); }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  background: none;
  border: none;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-muted);
  border-radius: 2px;
  transition: all 0.25s;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  padding: 60px 0 36px;
  overflow: hidden;
  z-index: 1;
}
.hero-glow {
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 500px;
  background: radial-gradient(ellipse at center, rgba(50,108,229,0.18) 0%, transparent 70%);
  pointer-events: none;
}
.hero .container {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 60px;
  align-items: center;
}
.hero-content { max-width: 620px; }
.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.hero-eyebrow::before {
  content: '';
  display: block;
  width: 28px;
  height: 1px;
  background: var(--accent);
}
.hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 16px;
}
.hero h1 em {
  font-style: italic;
  color: var(--accent);
}
.hero-desc {
  font-size: 17px;
  color: var(--text-muted);
  margin-bottom: 26px;
  max-width: 480px;
  line-height: 1.75;
}
.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  padding: 14px 28px;
  border-radius: 10px;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
  box-shadow: 0 0 30px rgba(50, 108, 229, 0.4);
}
.hero-cta:hover {
  background: #2557d6;
  transform: translateY(-2px);
  box-shadow: 0 6px 40px rgba(50, 108, 229, 0.55);
}
.hero-cta svg { width: 18px; height: 18px; }

/* Hero wheel decoration */
.hero-wheel {
  opacity: 0.12;
  animation: spin 40s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   SECTION COMMON
   ============================================================ */
section { position: relative; z-index: 1; }
.section-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 10px;
}
.section-title {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  line-height: 1.2;
  color: var(--text);
  margin-bottom: 14px;
}
.section-desc {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 520px;
  line-height: 1.75;
}

/* ============================================================
   TRAINERS GRID
   ============================================================ */
.trainers {
  padding: 36px 0 40px;
}
.trainers-header {
  margin-bottom: 32px;
}
.trainers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}
.trainer-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px 26px 26px;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
  position: relative;
  overflow: hidden;
}
.trainer-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--card-color, var(--accent));
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.trainer-card:hover {
  transform: translateY(-5px);
  border-color: var(--card-color, var(--accent));
  box-shadow: 0 12px 40px rgba(0,0,0,0.5), 0 0 0 1px var(--card-color, var(--accent));
}

.trainer-card.--spack     { --card-color: var(--spack); }
.trainer-card.--slurm     { --card-color: var(--slurm); }
.trainer-card.--apptainer { --card-color: var(--apptainer); }
.trainer-card.--kubernetes{ --card-color: var(--kubernetes); }

.card-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--card-color);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-badge::before {
  content: '';
  display: block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--card-color);
  box-shadow: 0 0 8px var(--card-color);
}
.card-title {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  color: var(--text);
  margin-bottom: 10px;
  line-height: 1.2;
}
.card-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 22px;
}
.card-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--card-color);
  transition: gap 0.2s;
}
.card-link:hover { gap: 12px; }
.card-link svg { width: 14px; height: 14px; }

/* ============================================================
   DEPLOYMENT PATH
   ============================================================ */
.path-section {
  padding: 52px 0 44px;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.path-section .section-desc { margin-bottom: 20px; }
.path-chain {
  display: flex;
  align-items: center;
  gap: 0;
  overflow-x: auto;
  padding-bottom: 8px;
}
.path-step {
  flex: 1;
  min-width: 190px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 20px 20px;
  position: relative;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.path-step:hover {
  border-color: var(--step-color);
  box-shadow: 0 0 24px rgba(0,0,0,0.4), inset 0 0 30px rgba(0,0,0,0.2);
}
.path-step.--spack     { --step-color: var(--spack); }
.path-step.--apptainer { --step-color: var(--apptainer); }
.path-step.--slurm     { --step-color: var(--slurm); }
.path-step.--kubernetes{ --step-color: var(--kubernetes); }

.step-num {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--step-color);
  letter-spacing: 0.1em;
  margin-bottom: 10px;
  opacity: 0.75;
}
.step-icon {
  font-family: var(--font-mono);
  font-size: 26px;
  margin-bottom: 10px;
}
.step-name {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  color: var(--text);
  margin-bottom: 6px;
}
.step-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}
.step-bar {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: var(--step-color);
  border-radius: 0 0 var(--radius) var(--radius);
  opacity: 0.5;
}
.path-arrow {
  flex-shrink: 0;
  width: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
}
.path-arrow svg { width: 20px; height: 20px; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  padding: 36px 0 28px;
  border-top: 1px solid var(--border);
}
.footer .container {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: start;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.footer-brand .wheel-icon { width: 32px; height: 32px; }
.footer-brand-name {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent);
  text-transform: uppercase;
}
.footer-tagline {
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 14px;
}
.footer-email {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
  transition: color 0.2s;
}
.footer-email:hover { color: var(--accent); }
.footer-copyright {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 20px;
}
.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
}
.footer-links a {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}
.footer-links a:hover { color: var(--text); }
.footer-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .hero .container {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .hero-wheel { display: none; }
  .hero { padding: 44px 0 40px; }

  .nav-links { display: none; flex-direction: column; gap: 4px; }
  .nav-links.open {
    display: flex;
    position: absolute;
    top: var(--nav-h);
    left: 0; right: 0;
    background: rgba(8,11,16,0.97);
    border-bottom: 1px solid var(--border);
    padding: 16px 24px 20px;
  }
  .nav-links a { padding: 10px 14px; }
  .nav-toggle { display: flex; }

  .path-chain { flex-direction: column; gap: 8px; }
  .path-arrow { transform: rotate(90deg); }

  .footer .container {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .footer-links { align-items: flex-start; }
}

@media (max-width: 480px) {
  .trainers-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2rem; }
}
