@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700&family=Plus+Jakarta+Sans:wght@400;500;600&family=Fira+Code:wght@400;500&display=swap');

/* ── Variables ── */
:root {
  --red:        #E53535;
  --red-dark:   #C0392B;
  --red-light:  #FDECEA;
  --blue:       #4A90D9;
  --blue-dark:  #2A6DB5;
  --blue-light: #EBF4FF;
  --navy:       #0F1F3D;
  --dark:       #1A2540;
  --text:       #1A1A2E;
  --text-muted: #6B7280;
  --text-hint:  #9CA3AF;
  --bg:         #F8F9FC;
  --bg-card:    #FFFFFF;
  --border:     rgba(0,0,0,0.08);
  --border-md:  rgba(0,0,0,0.14);
  --sidebar-w:  240px;
  --topbar-h:   56px;
  --radius:     8px;
  --radius-lg:  12px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Plus Jakarta Sans', sans-serif; background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.7; }
a { text-decoration: none; color: inherit; }

/* ── Kite animation ── */
@keyframes kiteFloat {
  0%,100% { transform: translate(0,0) rotate(-10deg); }
  25%     { transform: translate(2px,-4px) rotate(-5deg); }
  50%     { transform: translate(4px,-7px) rotate(0deg); }
  75%     { transform: translate(2px,-3px) rotate(-6deg); }
}
@keyframes tailWave {
  0%,100% { transform: rotate(0deg); }
  50%     { transform: rotate(4deg) translateX(2px); }
}
.kite-fly  { animation: kiteFloat 3s ease-in-out infinite; transform-origin: bottom center; }
.kite-tail { animation: tailWave 3s ease-in-out infinite; transform-origin: top center; }

/* ── Topbar ── */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--topbar-h);
  background: #111111;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.topbar-logo { display: flex; align-items: center; gap: 2px; }
.topbar-logo svg { overflow: visible; }
.logo-text { display: flex; align-items: baseline; gap: 0; }
.logo-red   { font-family: 'Nunito', sans-serif; font-size: 20px; font-weight: 700; color: var(--red); letter-spacing: -0.3px; }
.logo-kite  { font-family: 'Nunito', sans-serif; font-size: 20px; font-weight: 700; color: var(--red); letter-spacing: -0.3px; }
.logo-cloud { font-family: 'Nunito', sans-serif; font-size: 20px; font-weight: 400; color: var(--blue); letter-spacing: -0.3px; }
.topbar-nav { display: flex; align-items: center; gap: 24px; }
.topbar-nav a { font-size: 13px; color: rgba(255,255,255,0.7); transition: color 0.2s; }
.topbar-nav a:hover { color: white; }
.topbar-search {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius);
  padding: 6px 14px; color: white; font-size: 13px; width: 180px; outline: none;
  font-family: 'Plus Jakarta Sans', sans-serif;
  transition: border-color 0.2s;
}
.topbar-search::placeholder { color: rgba(255,255,255,0.35); }
.topbar-search:focus { border-color: var(--blue); }

/* ── Layout ── */
.layout { display: flex; margin-top: var(--topbar-h); min-height: calc(100vh - var(--topbar-h)); }

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-w); flex-shrink: 0;
  position: fixed; top: var(--topbar-h); left: 0; bottom: 0;
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  overflow-y: auto;
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border-md); border-radius: 4px; }
.sidebar-section { border-bottom: 1px solid var(--border); padding-bottom: 8px; margin-bottom: 0; }
.sidebar-section-title {
  padding: 14px 16px 6px;
  font-size: 10px; font-weight: 700; color: var(--text-hint);
  letter-spacing: 1px; text-transform: uppercase;
}
.sidebar-item {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 16px; font-size: 13px; color: var(--text-muted);
  cursor: pointer; border-left: 2px solid transparent;
  transition: all 0.15s;
}
.sidebar-item:hover { background: var(--bg); color: var(--text); }
.sidebar-item.active { background: var(--red-light); color: var(--red-dark); border-left-color: var(--red); font-weight: 600; }
.sidebar-item .dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: 0.4; flex-shrink: 0; }
.sidebar-item.active .dot { opacity: 1; }
.sidebar-item .coming { font-size: 10px; background: var(--bg); color: var(--text-hint); padding: 1px 6px; border-radius: 10px; margin-left: auto; }

/* ── Main content ── */
.main { margin-left: var(--sidebar-w); flex: 1; padding: 32px 40px 80px; max-width: 900px; }

/* ── Breadcrumb ── */
.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-hint); margin-bottom: 20px; }
.breadcrumb a { color: var(--blue); }
.breadcrumb span { color: var(--text-hint); }

/* ── Badges ── */
.badge-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.badge { font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 20px; }
.badge-red   { background: var(--red-light); color: var(--red-dark); }
.badge-blue  { background: var(--blue-light); color: var(--blue-dark); }
.badge-green { background: #EAF3DE; color: #3B6D11; }
.badge-amber { background: #FAEEDA; color: #854F0B; }
.badge-gray  { background: #F1EFE8; color: #5F5E5A; }

/* ── Page title ── */
.page-title { font-size: 26px; font-weight: 700; color: var(--text); margin-bottom: 6px; letter-spacing: -0.5px; line-height: 1.3; }
.page-subtitle { font-size: 15px; color: var(--text-muted); margin-bottom: 24px; line-height: 1.7; }

/* ── Info box ── */
.info-box { background: var(--blue-light); border: 1px solid #B5D4F4; border-radius: var(--radius); padding: 14px 18px; margin-bottom: 24px; font-size: 13px; color: var(--blue-dark); line-height: 1.7; }
.info-box strong { font-weight: 600; }
.warn-box { background: #FAEEDA; border: 1px solid #FAC775; border-radius: var(--radius); padding: 14px 18px; margin-bottom: 24px; font-size: 13px; color: #854F0B; line-height: 1.7; }

/* ── TOC ── */
.toc { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px 20px; margin-bottom: 28px; }
.toc-title { font-size: 11px; font-weight: 700; color: var(--text-hint); letter-spacing: 1px; text-transform: uppercase; margin-bottom: 10px; }
.toc-item { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--blue); padding: 4px 0; cursor: pointer; }
.toc-item::before { content: ''; width: 4px; height: 4px; border-radius: 50%; background: var(--blue); flex-shrink: 0; }

/* ── Content ── */
.section-heading { font-size: 17px; font-weight: 700; color: var(--text); margin: 28px 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.content-para { font-size: 14px; color: var(--text-muted); line-height: 1.8; margin-bottom: 16px; }

/* ── Steps ── */
.steps { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; }
.step { display: flex; gap: 14px; align-items: flex-start; }
.step-num { width: 26px; height: 26px; background: var(--red); color: white; border-radius: 50%; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 2px; }
.step-text { font-size: 14px; color: var(--text-muted); line-height: 1.7; padding-top: 3px; }
.step-text strong { color: var(--text); font-weight: 600; }

/* ── Code block ── */
.code-block { background: #1E1E2E; border-radius: var(--radius-lg); padding: 18px 20px; margin-bottom: 20px; font-family: 'Fira Code', monospace; font-size: 13px; line-height: 1.7; overflow-x: auto; }
.code-block .cm  { color: #6C7086; }
.code-block .kw  { color: #CBA6F7; }
.code-block .str { color: #A6E3A1; }
.code-block .var { color: #89DCEB; }
.code-block .txt { color: #CDD6F4; }
.code-label { font-size: 11px; color: var(--text-hint); font-weight: 600; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 6px; }

/* ── Nav footer ── */
.nav-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--border); }
.nav-btn { display: flex; align-items: center; gap: 8px; padding: 10px 20px; border-radius: var(--radius); border: 1px solid var(--border-md); background: var(--bg-card); color: var(--text); font-size: 13px; font-weight: 500; cursor: pointer; transition: all 0.15s; font-family: 'Plus Jakarta Sans', sans-serif; }
.nav-btn:hover { background: var(--bg); }
.nav-btn.primary { background: var(--red); color: white; border-color: var(--red); }
.nav-btn.primary:hover { background: var(--red-dark); }

/* ── Home hero ── */
.hero { background: #111111; border-radius: var(--radius-lg); padding: 32px; margin-bottom: 28px; color: white; position: relative; overflow: hidden; }
.hero::before { content: ''; position: absolute; top: -40px; right: -40px; width: 200px; height: 200px; background: var(--red); opacity: 0.06; border-radius: 50%; }
.hero::after { content: ''; position: absolute; bottom: -60px; right: 60px; width: 160px; height: 160px; background: var(--blue); opacity: 0.06; border-radius: 50%; }
.hero h1 { font-size: 26px; font-weight: 700; margin-bottom: 10px; line-height: 1.3; }
.hero h1 span { color: var(--red); }
.hero p { font-size: 14px; color: rgba(255,255,255,0.65); line-height: 1.7; max-width: 560px; }
.hero-badges { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.hero-badge { font-size: 12px; padding: 5px 14px; border-radius: 20px; border: 1px solid rgba(255,255,255,0.15); color: rgba(255,255,255,0.7); }

/* ── Module grid ── */
.section-label { font-size: 11px; font-weight: 700; color: var(--text-hint); letter-spacing: 1px; text-transform: uppercase; margin-bottom: 14px; }
.module-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 32px; }
.module-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px; cursor: pointer; transition: all 0.2s; position: relative; }
.module-card:hover { border-color: var(--red); transform: translateY(-2px); }
.module-card-icon { width: 36px; height: 36px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; margin-bottom: 12px; font-size: 18px; }
.module-card-title { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 5px; }
.module-card-desc { font-size: 12px; color: var(--text-muted); line-height: 1.5; }
.module-card-meta { margin-top: 12px; display: flex; align-items: center; justify-content: space-between; }
.module-card-count { font-size: 11px; color: var(--red); font-weight: 600; }
.module-card-cert { font-size: 10px; background: var(--bg); color: var(--text-hint); padding: 2px 8px; border-radius: 10px; }
.module-card.coming-soon { opacity: 0.6; }
.module-card.coming-soon:hover { transform: none; border-color: var(--border); }

/* ── Cert cards ── */
.cert-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 32px; }
.cert-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 14px 18px; display: flex; align-items: center; gap: 14px; cursor: pointer; transition: border-color 0.2s; }
.cert-card:hover { border-color: var(--blue); }
.cert-badge { width: 40px; height: 40px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex-shrink: 0; }
.cert-info { flex: 1; }
.cert-name { font-size: 13px; font-weight: 600; color: var(--text); }
.cert-desc { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.cert-level { font-size: 11px; padding: 3px 10px; border-radius: 20px; font-weight: 600; flex-shrink: 0; }

/* ── Footer ── */
.footer { margin-left: var(--sidebar-w); background: var(--bg-card); border-top: 1px solid var(--border); padding: 18px 40px; }
.footer-disclaimer { font-size: 11px; color: var(--text-hint); line-height: 1.7; margin-bottom: 8px; max-width: 860px; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; }
.footer-copy { font-size: 11px; color: var(--red); font-weight: 600; }
.footer-tag  { font-size: 11px; color: var(--text-hint); }

/* ── Responsive ── */
@media (max-width: 768px) {
  .sidebar { display: none; }
  .main { margin-left: 0; padding: 20px; }
  .footer { margin-left: 0; }
  .topbar-nav a { display: none; }
}
