/* === style.css === */
/* ============================================================
   EduSmartUp - Web Developer Learning Platform
   Global Stylesheet v2.0 - Dynamic · Dark Mode · Responsive
   ============================================================ */

/* ---- CSS Custom Properties (Light Mode) ---- */
:root {
  --primary:        #1768d1; /* was #1a73e8 (4.3:1 on tints) */
  --primary-dark:   #1557b0;
  --primary-light:  #e8f0fe;
  --primary-glow:   rgba(26,115,232,.22);
  --primary-grad:   linear-gradient(135deg, #1a73e8 0%, #0d5fc7 100%);
  --secondary:      #1c1e2e;
  --secondary-mid:  #2a2d3e;
  --secondary-light:#3a3d50;
  --accent:         #f0a500;
  --accent2:        #10b981;
  --danger:         #e53935;
  --purple:         #8b5cf6;
  --pink:           #ec4899;

  --text-dark:   #0f1117;
  --text-med:    #4a4d60;
  --text-light:  #6b6e81; /* was #8b8fa8 (2.9:1) */
  --bg:          #ffffff;
  --bg-light:    #f4f5fb;
  --bg-card:     #ffffff;
  --border:      #e0e2ef;
  --border-light:#ecedf7;
  --code-bg:     #1a1b2e;
  --code-text:   #f8f8f2;
  --shadow-xs:   0 1px 3px rgba(0,0,0,.05), 0 1px 2px rgba(0,0,0,.08);
  --shadow-sm:   0 2px 8px rgba(0,0,0,.07), 0 1px 3px rgba(0,0,0,.06);
  --shadow:      0 4px 20px rgba(0,0,0,.09), 0 2px 8px rgba(0,0,0,.06);
  --shadow-lg:   0 8px 40px rgba(0,0,0,.13), 0 4px 16px rgba(0,0,0,.08);
  --shadow-xl:   0 20px 60px rgba(0,0,0,.15), 0 8px 24px rgba(0,0,0,.10);
  --sidebar-w:   290px;
  --header-h:    58px;
  --radius:      12px;
  --radius-lg:   18px;
  --radius-xl:   26px;
  --transition:  .22s ease;
  --transition-slow: .35s cubic-bezier(.2,.8,.2,1);
}

/* ---- Dark Mode ---- */
[data-theme="dark"] {
  --primary:        #4f9cf9;
  --primary-dark:   #3a7edb;
  --primary-light:  #0d1e40;
  --primary-glow:   rgba(79,156,249,.2);
  --primary-grad:   linear-gradient(135deg, #4f9cf9 0%, #3a7edb 100%);
  --secondary:      #0e0f1a;
  --secondary-mid:  #15162a;
  --text-dark:      #e6eaf6;
  --text-med:       #9096b8;
  --text-light:     #5a5f7e;
  --code-ink:       #f06aa8;
  --bg:             #0d0e1a;
  --bg-light:       #141526;
  --bg-card:        #191a2e;
  --border:         #252742;
  --border-light:   #1e2038;
  --code-bg:        #0b0c18;
  --shadow-xs:      0 1px 4px rgba(0,0,0,.35);
  --shadow-sm:      0 2px 8px rgba(0,0,0,.45);
  --shadow:         0 4px 20px rgba(0,0,0,.55);
  --shadow-lg:      0 8px 40px rgba(0,0,0,.65);
  --shadow-xl:      0 20px 60px rgba(0,0,0,.7);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 10px); }
body {
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, Arial, sans-serif;
  font-size: 15px; line-height: 1.72;
  color: var(--text-dark); background: var(--bg);
  transition: background var(--transition), color var(--transition);
  overflow-x: hidden; -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(circle at top left, rgba(26,115,232,.06), transparent 34%),
    radial-gradient(circle at top right, rgba(16,185,129,.05), transparent 26%),
    linear-gradient(180deg, rgba(255,255,255,.6), transparent 18%);
}
a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { text-decoration: underline; color: var(--primary-dark); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { padding-left: 22px; }
li { margin-bottom: 5px; }

/* ============================================================
   SCROLL PROGRESS BAR
   ============================================================ */
#scroll-progress {
  position: fixed; top: 0; left: 0; z-index: 9999;
  height: 3px; width: 0%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width .1s linear;
  pointer-events: none;
}

/* ============================================================
   TOP NAVIGATION
   ============================================================ */
.top-nav {
  background: rgba(17, 20, 34, 0.92);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  height: var(--header-h);
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky; top: 0; z-index: 1000;
  box-shadow: 0 1px 0 rgba(255,255,255,.05), 0 18px 42px rgba(0,0,0,.22);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.top-nav .logo {
  font-size: 20px; font-weight: 800;
  color: #fff; display: flex; align-items: center; gap: 8px;
  white-space: nowrap; text-decoration: none !important; letter-spacing: -.3px;
}
.top-nav .logo .logo-accent { 
  background: linear-gradient(135deg, #4f9cf9, #a78bfa);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.top-nav .logo .logo-badge {
  background: linear-gradient(135deg, var(--primary), #8b5cf6);
  color: #fff;
  font-size: 9px; font-weight: 700; padding: 2px 7px;
  border-radius: 4px; letter-spacing: .6px; text-transform: uppercase;
}
.nav-links { display: flex; gap: 2px; align-items: center; }
.nav-links a {
  color: rgba(255,255,255,.72); padding: 9px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 500; text-transform: uppercase;
  letter-spacing: .4px; transition: all var(--transition); white-space: nowrap;
}
.nav-links a:hover, .nav-links a.active {
  background: rgba(26,115,232,.95); color: #fff; text-decoration: none;
  box-shadow: 0 8px 20px rgba(26,115,232,.24);
}
.nav-right { display: flex; gap: 8px; align-items: center; }
.nav-auth-fallback,
.nav-auth-cluster { display: flex; align-items: center; gap: 8px; }
.nav-auth-cluster {
  min-width: 0;
}
.nav-auth-fallback .btn,
.nav-auth-fallback .btn-signin,
.nav-auth-cluster .btn,
.nav-auth-cluster .btn-signin { white-space: nowrap; }
.nav-user-mini {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%;
  font-size: 12px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, var(--primary), #10b981);
}
.nav-account-menu { position: relative; }
.nav-account-trigger {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 36px; padding: 3px 9px 3px 5px;
  border: 1px solid rgba(255,255,255,.16); border-radius: 999px;
  background: rgba(255,255,255,.07); color: rgba(255,255,255,.9);
  cursor: pointer; font: inherit; transition: border-color .16s, background .16s, box-shadow .16s;
}
.nav-account-trigger:hover,
.nav-account-trigger[aria-expanded="true"] {
  background: rgba(255,255,255,.12);
  border-color: rgba(26,115,232,.55);
  box-shadow: 0 10px 24px rgba(0,0,0,.18);
}
.nav-account-copy {
  display: flex; flex-direction: column; align-items: flex-start;
  min-width: 0; line-height: 1.05;
}
.nav-account-name {
  max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: #fff; font-size: 12px; font-weight: 800;
}
.nav-account-role {
  color: rgba(255,255,255,.48); font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
}
.nav-account-caret { color: rgba(255,255,255,.42); font-size: 10px; }
.nav-account-dropdown {
  position: absolute; right: 0; top: calc(100% + 9px); z-index: 1200;
  display: none; min-width: 190px; padding: 6px;
  background: rgba(13,18,30,.98); border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px; box-shadow: 0 18px 46px rgba(0,0,0,.38);
}
.nav-account-dropdown.open { display: block; }
.nav-account-dropdown a {
  display: flex; align-items: center; min-height: 34px;
  padding: 7px 10px; border-radius: 8px;
  color: rgba(255,255,255,.78); font-size: 12px; font-weight: 700; text-decoration: none;
}
.nav-account-dropdown a:hover {
  background: rgba(26,115,232,.18); color: #fff; text-decoration: none;
}
.nav-account-divider {
  display: block; height: 1px; margin: 5px 4px;
  background: rgba(255,255,255,.1);
}

.public-notifications {
  position: relative;
}

.public-notification-btn {
  position: relative;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 50%;
  background: rgba(255,255,255,.07);
  color: rgba(255,255,255,.86);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease;
}

.public-notification-btn:hover,
.public-notification-btn[aria-expanded="true"] {
  background: rgba(255,255,255,.12);
  border-color: rgba(79,156,249,.55);
  color: #fff;
  box-shadow: 0 10px 24px rgba(0,0,0,.18);
}

.public-notification-count {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  border: 2px solid #111827;
  font-size: 10px;
  font-weight: 900;
  line-height: 15px;
  text-align: center;
}

.public-notification-menu {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(360px, calc(100vw - 28px));
  max-height: 440px;
  overflow: hidden;
  border: 1px solid rgba(224,226,239,.95);
  border-radius: 12px;
  background: rgba(255,255,255,.98);
  box-shadow: 0 22px 60px rgba(12,22,44,.22);
  z-index: 1200;
}

.public-notification-menu[hidden] {
  display: none !important;
}

.public-notifications.open .public-notification-menu {
  display: block;
}

.public-notifications:not(.open) .public-notification-menu {
  display: none !important;
}

.public-notification-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}

.notification-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.public-notification-head strong {
  font-size: 14px;
  color: var(--text-dark);
}

.public-notification-head button {
  border: 0;
  background: transparent;
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.notification-close-btn {
  background: #f1f5f9 !important;
  color: #475569 !important;
  border-radius: 999px;
  padding: 5px 8px;
}

.notification-close-btn:hover {
  background: #e2e8f0 !important;
  color: #0f172a !important;
}

.public-notification-list {
  max-height: 374px;
  overflow-y: auto;
  padding: 8px;
}

.public-notification-item {
  display: grid;
  gap: 5px;
  width: 100%;
  padding: 11px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.public-notification-topline,
.portal-notification-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.notification-type-pill {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(15,23,42,.06);
  color: #475569;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.public-notification-item:hover {
  background: #f8fbff;
  border-color: #dbeafe;
}

.public-notification-item.unread {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.public-notification-item.notification-type-proposal,
.portal-notification-item.notification-type-proposal {
  border-color: rgba(16,185,129,.24);
}

.public-notification-item.notification-type-proposal.unread,
.portal-notification-item.notification-type-proposal.unread {
  background: linear-gradient(180deg, rgba(236,253,245,.96), rgba(240,253,250,.92));
  border-color: rgba(16,185,129,.36);
}

.notification-type-proposal .notification-type-pill {
  background: rgba(16,185,129,.12);
  color: #047857;
}

.notification-type-proposal_review .notification-type-pill {
  background: rgba(26,115,232,.12);
  color: #1557b0;
}

.public-notification-item strong {
  color: var(--text-dark);
  font-size: 13px;
  line-height: 1.35;
}

.public-notification-item p {
  margin: 0;
  color: var(--text-med);
  font-size: 12px;
  line-height: 1.45;
}

.public-notification-meta {
  color: var(--text-light);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.public-notification-action,
.portal-notification-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: start;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: #0f172a;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

.notification-type-proposal .public-notification-action,
.notification-type-proposal .portal-notification-action {
  background: #047857;
  box-shadow: 0 8px 18px rgba(4,120,87,.18);
}

.public-notification-empty {
  padding: 26px 14px;
  color: var(--text-light);
  font-size: 13px;
  text-align: center;
}

[data-theme="dark"] .public-notification-menu {
  background: rgba(18,20,35,.98);
  border-color: rgba(64,76,112,.72);
}

[data-theme="dark"] .public-notification-head {
  border-color: rgba(64,76,112,.45);
}

[data-theme="dark"] .public-notification-head strong,
[data-theme="dark"] .public-notification-item strong {
  color: #e6eaf6;
}

[data-theme="dark"] .public-notification-item p {
  color: rgba(200,214,240,.72);
}

[data-theme="dark"] .public-notification-item:hover {
  background: rgba(79,156,249,.12);
  border-color: rgba(79,156,249,.26);
}

[data-theme="dark"] .public-notification-item.unread {
  background: rgba(79,156,249,.16);
  border-color: rgba(79,156,249,.36);
}

[data-theme="dark"] .notification-type-pill {
  background: rgba(148,163,184,.14);
  color: #cbd5e1;
}

[data-theme="dark"] .notification-type-proposal .notification-type-pill {
  background: rgba(16,185,129,.18);
  color: #86efac;
}

[data-theme="dark"] .notification-type-proposal_review .notification-type-pill {
  background: rgba(79,156,249,.18);
  color: #bfdbfe;
}

[data-theme="dark"] .public-notification-action,
[data-theme="dark"] .portal-notification-action {
  background: rgba(79,156,249,.18);
  color: #dbeafe;
}

.btn-dark-toggle {
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15);
  color: rgba(255,255,255,.8); padding: 7px 12px; border-radius: 999px;
  font-size: 15px; cursor: pointer; transition: all var(--transition);
  display: flex; align-items: center;
}
.btn-dark-toggle:hover { background: rgba(255,255,255,.15); color: #fff; }

.btn-nav-search {
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15);
  color: rgba(255,255,255,.8); padding: 7px 12px; border-radius: 999px;
  font-size: 15px; cursor: pointer; transition: all var(--transition);
}
.btn-nav-search:hover { background: rgba(255,255,255,.15); color: #fff; }

.code-icon {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 6px; border: 1px solid transparent;
  font-size: 10px; font-weight: 800; line-height: 1; letter-spacing: .02em;
  text-transform: uppercase; box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}
.code-icon-sm { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 5px; font-size: 9px; }
.code-icon-svg { padding: 0; border: none; background: transparent; box-shadow: none; min-width: auto; }
.code-icon-svg svg { display: block; overflow: visible; }
.code-icon-html { background: rgba(228,77,38,.16); color: #ff9d7a; border-color: rgba(228,77,38,.35); }
.code-icon-css { background: rgba(38,77,228,.16); color: #8fb0ff; border-color: rgba(38,77,228,.35); }
.code-icon-js { background: rgba(247,223,30,.14); color: #ffe36c; border-color: rgba(247,223,30,.3); }
.code-icon-python { background: rgba(79,156,249,.14); color: #a9d3ff; border-color: rgba(79,156,249,.34); }
.code-icon-sql { background: rgba(56,189,248,.14); color: #b6ecff; border-color: rgba(56,189,248,.34); }
.code-icon-php { background: rgba(167,139,250,.16); color: #ddd1ff; border-color: rgba(167,139,250,.34); }
.code-icon-laravel { background: rgba(255,45,32,.14); color: #ff958d; border-color: rgba(255,45,32,.34); }
.code-icon-react { background: rgba(97,218,251,.14); color: #9de9ff; border-color: rgba(97,218,251,.34); }
.code-icon-node { background: rgba(52,199,89,.14); color: #8df5ac; border-color: rgba(52,199,89,.34); }
.code-icon-java { background: rgba(255,132,90,.16); color: #ffc4af; border-color: rgba(255,132,90,.34); }
.code-icon-generic,
.code-icon-bootstrap,
.code-icon-jquery,
.code-icon-cpp,
.code-icon-tool,
.code-icon-reference,
.code-icon-ui,
.code-icon-home,
.code-icon-roadmap,
.code-icon-feature { background: rgba(255,255,255,.08); color: #e6ebff; border-color: rgba(255,255,255,.16); }
.btn-signin {
  background: transparent; border: 1px solid rgba(255,255,255,.3);
  color: rgba(255,255,255,.78); padding: 7px 14px;
  border-radius: 999px; font-size: 12.5px; cursor: pointer;
  transition: all var(--transition); white-space: nowrap;
}
.btn-dark-toggle .code-icon, .btn-nav-search .code-icon { pointer-events: none; }
.btn-signin:hover { border-color: var(--primary); color: var(--primary); }

.hamburger { display: none; background: none; border: none; cursor: pointer; padding: 4px; }
.hamburger span { display: block; width: 22px; height: 2px; background: #fff; margin: 5px 0; transition: transform .3s, opacity .3s; }
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ---- Mobile Menu ---- */
.mobile-menu {
  display: none; position: fixed; top: var(--header-h); left: 0; right: 0; bottom: 0;
  z-index: 998; background: var(--secondary); flex-direction: column;
  padding: 18px; gap: 2px; overflow-y: auto;
  transform: translateX(-100%); transition: transform .3s cubic-bezier(.4,0,.2,1);
}
.mobile-menu.open { transform: translateX(0); }
.sr-icon { display: inline-flex; align-items: center; justify-content: center; }
.mobile-menu a {
  color: rgba(255,255,255,.78); padding: 13px 18px; border-radius: 14px;
  font-size: 15px; font-weight: 500; display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid rgba(255,255,255,.06); transition: all var(--transition);
}
.mobile-menu a:hover { background: rgba(26,115,232,.95); color: #fff; text-decoration: none; }

.big-card .ci .code-icon,
.rch-icon .code-icon,
.tool-pill .tp-icon .code-icon,
.feature-card .f-icon .code-icon { transform: scale(1.35); }
/* ---- Language Strip ---- */
.lang-strip {
  background: var(--secondary-mid); padding: 0 12px;
  display: flex; gap: 0; flex-wrap: nowrap;
  overflow-x: auto;
  border-bottom: 1px solid rgba(255,255,255,.05);
}
.tool-pill .tp-icon { display: flex; align-items: center; justify-content: center; }
.lang-strip::-webkit-scrollbar { display: none; }
@supports (scrollbar-width: none) { .lang-strip { scrollbar-width: none; } }
.lang-strip a {
  color: rgba(255,255,255,.66); font-size: 12.5px;
  padding: 10px 13px; border-bottom: 2px solid transparent;
  white-space: nowrap; transition: all var(--transition); flex-shrink: 0;
}
.lang-strip a:hover { color: #fff; border-bottom-color: var(--primary); text-decoration: none; background: rgba(255,255,255,.05); }

/* ============================================================
   SEARCH OVERLAY
   ============================================================ */
#search-overlay {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(0,0,0,.65); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  display: flex; align-items: flex-start; justify-content: center;
  padding-top: 10vh; opacity: 0; pointer-events: none;
  transition: opacity .22s;
}
#search-overlay.open { opacity: 1; pointer-events: all; }
.search-modal {
  background: var(--bg-card); border-radius: var(--radius-xl);
  padding: 24px; width: 100%; max-width: 640px; margin: 0 16px;
  box-shadow: var(--shadow-xl); transform: translateY(-20px);
  transition: transform .22s;
  border: 1px solid var(--border);
}
#search-overlay.open .search-modal { transform: translateY(0); }
.search-modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.search-modal-head h3 { font-size: 14px; color: var(--text-light); font-weight: 500; }
.search-modal-head button { background: none; border: none; color: var(--text-light); font-size: 20px; cursor: pointer; padding: 2px 6px; border-radius: 4px; }
.search-modal-head button:hover { background: var(--bg-light); color: var(--text-dark); }
#global-search {
  width: 100%; padding: 14px 18px; border-radius: 16px;
  border: 1.5px solid var(--border); font-size: 16px;
  background: var(--bg); color: var(--text-dark); outline: none;
  transition: border-color var(--transition);
}
#global-search:focus { border-color: var(--primary); }
#search-results { margin-top: 14px; max-height: 380px; overflow-y: auto; }
.sr-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: var(--radius);
  color: var(--text-dark); transition: background var(--transition);
  cursor: pointer; text-decoration: none !important;
}
.sr-item:hover { background: var(--bg-light); text-decoration: none !important; }
.sr-icon { font-size: 20px; width: 36px; text-align: center; flex-shrink: 0; }
.sr-title { font-weight: 600; font-size: 14.5px; color: var(--text-dark); display: block; }
.sr-cat { font-size: 11.5px; color: var(--text-light); }
.sr-no { text-align: center; color: var(--text-light); padding: 20px; font-size: 14px; }

/* ============================================================
   TUTORIAL LAYOUT
   ============================================================ */
.tutorial-layout { display: flex; min-height: calc(100vh - var(--header-h)); }

.sidebar {
  width: var(--sidebar-w); min-width: var(--sidebar-w);
  background: linear-gradient(180deg, var(--bg-light), var(--bg)); border-right: 1px solid var(--border);
  position: sticky; top: var(--header-h);
  height: calc(100vh - var(--header-h));
  overflow-y: auto; transition: all var(--transition);
}
.sidebar::-webkit-scrollbar { width: 3px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 4px; }
.sidebar-inner { padding: 10px 0 30px; }
.sb-heading { 
  padding: 14px 20px 6px; font-size: 10px; font-weight: 800; 
  text-transform: uppercase; letter-spacing: 1.4px; color: var(--text-light);
}
.sidebar a { 
  display: flex; align-items: center; padding: 8px 20px; 
  color: var(--text-med); font-size: 13.5px; 
  border-left: 3px solid transparent; transition: all .18s ease;
}
.sidebar a:hover { background: var(--primary-light); color: var(--primary); border-left-color: var(--primary); text-decoration: none; }
.sidebar a.active { background: var(--primary-light); color: var(--primary); border-left-color: var(--primary); font-weight: 600; }

.main-content { flex: 1; padding: 36px 50px; max-width: 1000px; overflow-x: hidden; background: linear-gradient(180deg, rgba(255,255,255,.62), transparent 14%); }
.main-content h1 { font-size: 38px; color: var(--text-dark); margin-bottom: 12px; line-height: 1.12; font-weight: 850; letter-spacing: -.8px; }
.main-content h2 { font-size: 25px; color: var(--text-dark); margin: 44px 0 16px; padding-bottom: 10px; border-bottom: 1px solid var(--border); position: relative; }
.main-content h2::after { content: ''; position: absolute; bottom: -2px; left: 0; width: 40px; height: 2px; background: var(--primary); }
.main-content h3 { font-size: 19px; color: var(--text-dark); margin: 24px 0 10px; }
.main-content h4 { font-size: 16px; color: var(--text-med); margin: 16px 0 8px; }
.main-content p { margin-bottom: 14px; line-height: 1.78; color: var(--text-med); }
.main-content ul, .main-content ol { margin: 8px 0 14px; }
.main-content li { color: var(--text-med); }
.intro-text { font-size: 17px; color: var(--text-med); margin-bottom: 24px; }
.topic-section { margin-bottom: 60px; padding-bottom: 32px; border-bottom: 1px solid var(--border); }
.topic-section:last-of-type { border-bottom: none; }

/* Reading Progress */
#read-progress { position: fixed; top: var(--header-h); left: 0; z-index: 900; height: 2px; width: 0%; background: var(--primary); transition: width .15s linear; pointer-events: none; }

/* ============================================================
   CODE BLOCKS
   ============================================================ */
.code-box { background: var(--code-bg); border-radius: 18px; margin: 18px 0; overflow: hidden; box-shadow: var(--shadow); border: 1px solid rgba(255,255,255,.05); }
.code-box-header { background: rgba(255,255,255,.04); padding: 10px 16px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(255,255,255,.06); }
.code-lang { color: #6db3fc; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }
.btn-copy { 
  background: transparent; border: 1px solid rgba(255,255,255,.15); 
  color: rgba(255,255,255,.58); padding: 6px 12px; border-radius: 999px; 
  font-size: 11px; cursor: pointer; transition: all .18s ease; 
  display: flex; align-items: center; gap: 4px;
}
.btn-copy:hover { border-color: var(--primary); color: #8fc3ff; background: rgba(79,156,249,.1); }
.code-box pre { padding: 18px 20px; overflow-x: auto; }
.code-box pre::-webkit-scrollbar { height: 5px; }
.code-box pre::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 4px; }
.code-box pre code { font-family: 'Fira Code','JetBrains Mono','Consolas',monospace; font-size: 13.5px; line-height: 1.76; color: var(--code-text); }
.kw  { color: #66d9ef; } .str { color: #a6e22e; } .val { color: #e6db74; }
.cmt { color: #75715e; font-style: italic; } .tag { color: #f92672; }
.atr { color: #a6e22e; } .num { color: #ae81ff; } .fn  { color: #a6da95; }
.cls { color: #fd971f; } .op  { color: #f92672; }

code:not(.code-box pre code) {
  background: var(--bg-light); color: var(--code-ink, #c72f7b);
  padding: 2px 6px; border-radius: 4px;
  font-family: 'Consolas',monospace; font-size: 13px; border: 1px solid var(--border);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 24px; border-radius: 999px; font-size: 14px; font-weight: 700; cursor: pointer; border: none; transition: all .2s ease; text-decoration: none !important; white-space: nowrap; letter-spacing: .01em; }
.btn-primary { background: var(--primary-grad); color: #fff !important; box-shadow: 0 10px 28px var(--primary-glow); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 34px var(--primary-glow), 0 4px 12px rgba(0,0,0,.15); filter: brightness(1.06); }
.btn-primary:active { transform: translateY(0); }
.btn-secondary { background: var(--secondary); color: #fff !important; }
.btn-secondary:hover { background: var(--secondary-mid); transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn-outline:hover { background: var(--primary-grad); color: #fff !important; border-color: transparent; transform: translateY(-1px); text-decoration: none; }
.btn-outline-white { background: rgba(255,255,255,.08); color: #fff; border: 1.5px solid rgba(255,255,255,.28); padding: 12px 24px; border-radius: 999px; font-size: 14px; font-weight: 700; cursor: pointer; transition: all .2s ease; text-decoration: none !important; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.btn-outline-white:hover { border-color: rgba(255,255,255,.75); background: rgba(255,255,255,.16); text-decoration: none !important; color: #fff; transform: translateY(-2px); }
.try-btn { display: inline-flex; align-items: center; gap: 6px; background: linear-gradient(135deg, #059669, #10b981); color: #fff !important; padding: 9px 18px; border-radius: 999px; font-size: 13px; font-weight: 700; margin-top: 8px; cursor: pointer; border: none; transition: all .2s ease; text-decoration: none !important; box-shadow: 0 8px 18px rgba(16,185,129,.24); }
.try-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(16,185,129,.3); filter: brightness(1.05); }

/* ============================================================
   INFO BOXES
   ============================================================ */
.note-box { padding: 14px 18px; border-radius: var(--radius); margin: 14px 0; border-left: 4px solid; font-size: 14px; }
.note-box strong { display: block; margin-bottom: 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .6px; font-weight: 700; }
.note-box.info    { background: #e3f2fd; border-color: #2196f3; color: #0d47a1; }
.note-box.warning { background: #fff8e1; border-color: #f0a500; color: #7a3800; }
.note-box.tip     { background: var(--primary-light); border-color: var(--primary); color: #1a3a6b; }
.note-box.danger  { background: #ffebee; border-color: #f44336; color: #b71c1c; }
[data-theme="dark"] .note-box.info    { background: #0d2444; color: #82c4ff; border-color: #2979ff; }
[data-theme="dark"] .note-box.warning { background: #2e2000; color: #ffd082; border-color: #f0a500; }
[data-theme="dark"] .note-box.tip     { background: var(--primary-light); color: #79b8ff; }
[data-theme="dark"] .note-box.danger  { background: #2e0d0d; color: #ff8a80; border-color: #f44336; }

/* ============================================================
   TABLES
   ============================================================ */
.data-table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 14px; border-radius: var(--radius); overflow: hidden; }
.data-table th { background: var(--secondary); color: #fff; padding: 11px 14px; text-align: left; font-weight: 600; font-size: 12.5px; }
.data-table td { padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: top; color: var(--text-med); }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:nth-child(even) td { background: var(--bg-light); }
.data-table tr:hover td { background: var(--primary-light); }
.data-table code { background: var(--bg-light); padding: 2px 6px; border-radius: 3px; font-family: 'Consolas',monospace; font-size: 12.5px; color: var(--code-ink, #c72f7b); border: 1px solid var(--border); }

/* ============================================================
   RESULT BOX
   ============================================================ */
.result-box { background: var(--bg-card); border: 2px solid var(--primary); border-radius: var(--radius); padding: 18px 22px; margin: 10px 0; }
.result-label { font-size: 10.5px; color: var(--primary); font-weight: 700; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px; }

/* ============================================================
   BREADCRUMB & PAGE NAV
   ============================================================ */
.breadcrumb { display: flex; align-items: center; gap: 6px; padding: 10px 0; margin-bottom: 16px; font-size: 13px; color: var(--text-light); }
.breadcrumb a { color: var(--primary); }
.page-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--border); }
.page-nav a { display: flex; align-items: center; gap: 8px; padding: 10px 18px; background: var(--bg-light); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text-dark); font-weight: 500; font-size: 14px; transition: all var(--transition); }
.page-nav a:hover { background: var(--primary); color: #fff; border-color: var(--primary); text-decoration: none; }

/* ============================================================
   SCROLL REVEAL ANIMATIONS
   ============================================================ */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .55s ease, transform .55s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-left { opacity: 0; transform: translateX(-30px); transition: opacity .55s ease, transform .55s ease; }
.reveal-left.visible { opacity: 1; transform: translateX(0); }
.reveal-right { opacity: 0; transform: translateX(30px); transition: opacity .55s ease, transform .55s ease; }
.reveal-right.visible { opacity: 1; transform: translateX(0); }
.reveal-scale { opacity: 0; transform: scale(.92); transition: opacity .5s ease, transform .5s ease; }
.reveal-scale.visible { opacity: 1; transform: scale(1); }
.reveal-d1 { transition-delay: .05s !important; }
.reveal-d2 { transition-delay: .12s !important; }
.reveal-d3 { transition-delay: .19s !important; }
.reveal-d4 { transition-delay: .26s !important; }
.reveal-d5 { transition-delay: .33s !important; }
.reveal-d6 { transition-delay: .40s !important; }

/* ============================================================
   HOMEPAGE — HERO
   ============================================================ */
.hero {
  background: linear-gradient(135deg, #060811 0%, #0d1020 30%, #0d1635 60%, #080d1a 100%);
  padding: 100px 22px 86px; text-align: center; color: #fff;
  position: relative; overflow: hidden;
}
/* Mesh grid overlay */
.hero::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image: 
    linear-gradient(rgba(26,115,232,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(26,115,232,.05) 1px, transparent 1px);
  background-size: 50px 50px;
  -webkit-mask-image: radial-gradient(ellipse 80% 50% at 50% 50%, black 40%, transparent 100%);
  mask-image: radial-gradient(ellipse 80% 50% at 50% 50%, black 40%, transparent 100%);
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: 
    radial-gradient(ellipse 60% 50% at 30% 60%, rgba(139,92,246,.12) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 70% 30%, rgba(26,115,232,.15) 0%, transparent 60%),
    radial-gradient(ellipse 40% 70% at 50% -10%, rgba(26,115,232,.20) 0%, transparent 65%);
  pointer-events: none;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(79,156,249,.1); border: 1px solid rgba(79,156,249,.3);
  color: #6db3fc; font-size: 12.5px; font-weight: 600;
  padding: 5px 16px; border-radius: 20px; margin-bottom: 24px; letter-spacing: .3px;
  position: relative; z-index: 1;
}
.hero-eyebrow .pulse { width: 7px; height: 7px; background: #4ade80; border-radius: 50%; animation: pulse-dot 1.8s infinite; flex-shrink: 0; }
@keyframes pulse-dot { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.35;transform:scale(.6)} }
.hero h1 { 
  font-size: clamp(3rem, 7vw, 5.5rem); font-weight: 900; margin-bottom: 20px; line-height: 1.04; 
  letter-spacing: -2.4px; position: relative; z-index: 1;
}
.hero h1 .accent { 
  background: linear-gradient(135deg, #4f9cf9 0%, #a78bfa 50%, #f472b6 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.cursor { display: inline-block; width: 3px; height: .88em; background: #4f9cf9; vertical-align: middle; margin-left: 2px; animation: blink .78s step-end infinite; -webkit-text-fill-color: #4f9cf9; }
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }
.hero-sub { font-size: 18.5px; color: rgba(255,255,255,.65); max-width: 620px; margin: 0 auto 38px; line-height: 1.68; position: relative; z-index: 1; }
.hero-btns { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; position: relative; z-index: 1; }
.hero-btns .btn { font-size: 15px; padding: 13px 30px; border-radius: 999px; }
.hero-btns .btn-primary { border-radius: 999px; box-shadow: 0 10px 30px rgba(26,115,232,.45); }
.hero-btns .btn-outline-white { border-radius: 50px; }
.hero-tags { margin-top: 40px; display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; position: relative; z-index: 1; }
.hero-tags span { color: rgba(255,255,255,.38); font-size: 11.5px; padding: 4px 12px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); border-radius: 20px; transition: all .2s; }
.hero-tags span:hover { color: rgba(255,255,255,.7); border-color: rgba(255,255,255,.2); background: rgba(255,255,255,.07); }

/* ---- Stats Bar ---- */
.stats-bar { 
  background: linear-gradient(135deg, #11439a 0%, #1a73e8 45%, #0d5fc7 100%);
  padding: 24px 22px; display: flex; justify-content: center; flex-wrap: wrap;
  box-shadow: 0 18px 42px rgba(26,115,232,.22);
}
.stat-item { text-align: center; color: #fff; padding: 8px 40px; border-right: 1px solid rgba(255,255,255,.16); }
.stat-item:last-child { border-right: none; }
.stat-num { font-size: 34px; font-weight: 900; line-height: 1.1; letter-spacing: -1px; }
.stat-label { font-size: 12px; opacity: .78; margin-top: 3px; font-weight: 500; }

/* ---- Section Heading ---- */
.section-head { text-align: center; margin-bottom: 50px; }
.section-head .badge { 
  display: inline-block; background: var(--primary-light); color: var(--primary);
  font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
  padding: 4px 14px; border-radius: 20px; margin-bottom: 14px;
  border: 1px solid rgba(26,115,232,.18);
}
.section-head h2 { font-size: clamp(2rem, 3vw, 3.05rem); font-weight: 850; margin-bottom: 10px; color: var(--text-dark); letter-spacing: -.7px; line-height: 1.12; }
.section-head p { color: var(--text-med); font-size: 16px; max-width: 540px; margin: 0 auto; }
.section-divider {
  width: 56px; height: 4px;
  background: linear-gradient(90deg, var(--primary), #8b5cf6);
  margin: 18px auto 0; border-radius: 4px;
}

/* ---- Quick Search ---- */
.quick-search-section { padding: 42px 22px; background: var(--bg-light); }
.quick-search-inner { max-width: 660px; margin: 0 auto; text-align: center; }
.quick-search-inner h3 { font-size: 22px; font-weight: 700; margin-bottom: 6px; color: var(--text-dark); }
.quick-search-inner p { color: var(--text-med); margin-bottom: 20px; font-size: 14.5px; }
.quick-search-bar { display: flex; gap: 8px; background: var(--bg-card); border: 1.5px solid var(--border); border-radius: 999px; padding: 6px 6px 6px 20px; box-shadow: var(--shadow-sm); transition: border-color var(--transition), box-shadow var(--transition); }
.quick-search-bar:focus-within { border-color: var(--primary); }
#qs-input { flex: 1; border: none; outline: none; font-size: 15px; background: transparent; color: var(--text-dark); padding: 4px 0; }
#qs-btn { background: var(--primary); color: #fff; border: none; padding: 8px 22px; border-radius: 40px; font-size: 14px; font-weight: 600; cursor: pointer; transition: background var(--transition); }
#qs-btn:hover { background: var(--primary-dark); }
.quick-tags { display: flex; gap: 7px; flex-wrap: wrap; justify-content: center; margin-top: 14px; }
.quick-tags a { font-size: 12.5px; padding: 4px 14px; border-radius: 20px; border: 1px solid var(--border); color: var(--text-med); background: var(--bg-card); transition: all var(--transition); }
.quick-tags a:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; background: var(--primary-light); }

/* ---- Courses Section ---- */
.featured-section { padding: 80px 22px; background: var(--bg); }
.courses-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 24px; max-width: 1280px; margin: 0 auto; }
.big-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 28px; display: flex; flex-direction: column; gap: 16px;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; position: relative; overflow: hidden; box-shadow: var(--shadow-xs);
}
/* Top accent line */
.big-card::before { 
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; 
  background: linear-gradient(90deg, var(--primary), #8b5cf6);
  transform: scaleX(0); transform-origin: left; transition: transform .3s ease;
}
/* Subtle glow on hover */
.big-card::after {
  content: ''; position: absolute; inset: 0; border-radius: var(--radius-lg);
  opacity: 0; transition: opacity .3s;
  background: radial-gradient(ellipse 80% 60% at 50% -10%, rgba(26,115,232,.08), transparent 65%);
  pointer-events: none;
}
.big-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-xl); border-color: rgba(26,115,232,.26); }
.big-card:hover::before { transform: scaleX(1); }
.big-card:hover::after { opacity: 1; }
.big-card .card-top { display: flex; align-items: center; gap: 16px; }
.big-card .ci { 
  font-size: 42px; flex-shrink: 0; width: 60px; height: 60px; 
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-light); border-radius: var(--radius); border: 1px solid var(--border);
}
.big-card .card-top div h3 { font-size: 19px; margin-bottom: 2px; color: var(--text-dark); font-weight: 700; }
.big-card .card-top div p { color: var(--text-light); font-size: 12px; margin: 0; }
.big-card > .card-desc { color: var(--text-med); font-size: 14px; line-height: 1.7; margin: 0; }
.card-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.badge-level, .badge-time { font-size: 11px; padding: 3px 10px; border-radius: 20px; font-weight: 600; }
.badge-level.beginner  { background: #dcfce7; color: #15803d; }
.badge-level.intermediate { background: #fef3c7; color: #b45309; }
.badge-level.advanced  { background: #fce7f3; color: #9d174d; }
[data-theme="dark"] .badge-level.beginner     { background: #052e16; color: #4ade80; }
[data-theme="dark"] .badge-level.intermediate { background: #451a03; color: #fbbf24; }
[data-theme="dark"] .badge-level.advanced     { background: #4a044e; color: #f472b6; }
.badge-time { background: var(--bg-light); color: var(--text-med); border: 1px solid var(--border); }
.big-card .example-snippet { 
  background: var(--code-bg); border-radius: var(--radius); padding: 14px 16px; 
  font-family: 'Consolas','Fira Code','JetBrains Mono',monospace; font-size: 12.5px; 
  color: #a6da95; line-height: 1.68; flex-grow: 1;
  border: 1px solid rgba(255,255,255,.04);
}
.card-actions { display: flex; gap: 7px; flex-wrap: wrap; }
.card-actions a { 
  font-size: 12.5px; padding: 6px 14px; border-radius: var(--radius); 
  background: var(--bg-light); color: var(--text-med); font-weight: 600; 
  transition: all .18s ease; border: 1px solid var(--border);
}
.card-actions a:hover { background: var(--primary-grad); color: #fff !important; border-color: transparent; text-decoration: none; transform: translateY(-1px); }

/* ---- Roadmap ---- */
.roadmap-section { padding: 80px 22px; background: var(--bg-light); }
.roadmap-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 28px; max-width: 1080px; margin: 0 auto; }
.roadmap-col-head { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.rch-icon { width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 700; flex-shrink: 0; }
.rch-1 { background: linear-gradient(135deg, #1a73e8, #4f9cf9); color: #fff; box-shadow: 0 4px 12px rgba(26,115,232,.3); }
.rch-2 { background: linear-gradient(135deg, #059669, #10b981); color: #fff; box-shadow: 0 4px 12px rgba(16,185,129,.3); }
.rch-3 { background: linear-gradient(135deg, #8b5cf6, #a78bfa); color: #fff; box-shadow: 0 4px 12px rgba(139,92,246,.3); }
[data-theme="dark"] .rch-1 { box-shadow: 0 4px 12px rgba(26,115,232,.4); } 
[data-theme="dark"] .rch-2 { box-shadow: 0 4px 12px rgba(16,185,129,.4); }
[data-theme="dark"] .rch-3 { box-shadow: 0 4px 12px rgba(139,92,246,.4); }
.roadmap-col-title { font-size: 16px; font-weight: 800; color: var(--text-dark); }
.roadmap-col-sub { font-size: 12px; color: var(--text-light); margin-top: 2px; }
.roadmap-step {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 11px 15px; margin-bottom: 8px;
  display: flex; align-items: center; gap: 12px;
  transition: all .2s ease; text-decoration: none !important; box-shadow: var(--shadow-xs);
}
.roadmap-step:hover { border-color: var(--primary); background: var(--primary-light); transform: translateX(5px); box-shadow: var(--shadow-sm); text-decoration: none !important; }
.rs-num { width: 26px; height: 26px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), #8b5cf6); color: #fff; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.rs-info h4 { font-size: 13px; color: var(--text-dark); margin-bottom: 1px; font-weight: 600; }
.rs-info p { font-size: 11px; color: var(--text-light); margin: 0; }

/* ---- Tools Section ---- */
.more-tools { padding: 62px 22px; background: var(--bg); }
.tools-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 14px; max-width: 1100px; margin: 0 auto; }
.tool-pill { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px 16px; text-align: center; transition: all var(--transition); display: flex; flex-direction: column; align-items: center; gap: 8px; box-shadow: var(--shadow-xs); }
.tool-pill:hover { border-color: var(--primary); box-shadow: 0 6px 20px var(--primary-glow); transform: translateY(-3px); text-decoration: none; }
.tool-pill .tp-icon { font-size: 30px; }
.tool-pill .tp-name { font-size: 13.5px; font-weight: 700; color: var(--text-dark); }
.tool-pill .tp-desc { font-size: 11.5px; color: var(--text-light); }

/* ---- How-To ---- */
.howto-section { padding: 72px 22px; background: var(--bg-light); }
.howto-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 18px; max-width: 1150px; margin: 0 auto; }
.howto-card { background: var(--bg-card); border-radius: var(--radius-lg); padding: 22px; border-left: 4px solid var(--primary); transition: all var(--transition); box-shadow: var(--shadow-xs); }
.howto-card:hover { background: var(--primary-light); transform: translateX(4px); }
.howto-card h4 { font-size: 14.5px; margin-bottom: 7px; color: var(--text-dark); font-weight: 700; }
.howto-card p { font-size: 13px; color: var(--text-med); margin: 0; }
.howto-card a.howto-more { font-size: 12px; color: var(--primary); display: inline-block; margin-top: 8px; font-weight: 600; }

/* ---- Why Section ---- */
.why-section { padding: 80px 22px; background: var(--bg); }

/* ---- Platform Features Section ---- */
.platform-features-section {
  padding: 88px 22px; background: var(--bg-light);
  position: relative; overflow: hidden;
}
.platform-features-section::before {
  content: ''; position: absolute; top: -60px; left: 50%; transform: translateX(-50%);
  width: 800px; height: 400px; border-radius: 50%;
  background: radial-gradient(ellipse, rgba(26,115,232,.06), transparent 70%);
  pointer-events: none;
}
.pf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 22px; max-width: 1140px; margin: 0 auto 48px;
}
.pf-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 28px 26px; position: relative; overflow: hidden;
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.pf-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-xl); border-color: rgba(26,115,232,.22); }
.pf-card--hero { grid-column: span 2; }
@media (max-width: 720px) { .pf-card--hero { grid-column: span 1; } }
.pf-card-badge {
  display: inline-block; font-size: 10px; font-weight: 800; letter-spacing: .08em;
  text-transform: uppercase; padding: 2px 8px; border-radius: 20px;
  background: var(--primary-light); color: var(--primary); margin-bottom: 12px;
  border: 1px solid rgba(26,115,232,.18);
}
.pf-badge-new { background: rgba(74,222,128,.1); color: #16a34a; border-color: rgba(74,222,128,.2); }
.pf-icon-wrap {
  width: 54px; height: 54px; border-radius: 14px; display: flex;
  align-items: center; justify-content: center; margin-bottom: 14px;
  font-size: 26px;
}
.pf-c1 { background: rgba(26,115,232,.12); }
.pf-c2 { background: rgba(167,139,250,.12); }
.pf-c3 { background: rgba(74,222,128,.1); }
.pf-c4 { background: rgba(251,191,36,.1); }
.pf-c5 { background: rgba(249,115,22,.1); }
.pf-c6 { background: rgba(239,68,68,.08); }
.pf-icon-emoji { line-height: 1; }
.pf-card h3 { font-size: 18px; font-weight: 700; color: var(--text-dark); margin-bottom: 9px; }
.pf-card p { color: var(--text-med); font-size: 13.5px; line-height: 1.72; margin-bottom: 14px; }
.pf-list { list-style: none; padding: 0; margin: 0 0 18px; display: flex; flex-direction: column; gap: 5px; }
.pf-list li { font-size: 13px; color: var(--text-med); }
.pf-list li:first-child { color: var(--primary); font-weight: 600; }
.pf-cta {
  display: inline-block; font-size: 13px; font-weight: 700;
  color: var(--primary); text-decoration: none;
  padding: 7px 16px; border: 1px solid rgba(26,115,232,.3);
  border-radius: 8px; transition: background .2s, color .2s;
}
.pf-cta:hover { background: var(--primary); color: #fff; }
/* Animated editor preview */
.pf-editor-preview {
  max-width: 820px; margin: 0 auto; border-radius: 12px; overflow: hidden;
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
  font-family: 'Fira Code', 'Consolas', monospace;
  background: #0d0d14;
}
.pfe-bar {
  display: flex; align-items: center; gap: 8px; padding: 10px 16px;
  background: #1a1a2e; border-bottom: 1px solid rgba(255,255,255,.06);
}
.pfe-dot { width: 12px; height: 12px; border-radius: 50%; }
.pfe-red    { background: #ff5f57; }
.pfe-yellow { background: #febc2e; }
.pfe-green  { background: #28c840; }
.pfe-title { font-size: 12px; color: rgba(255,255,255,.5); flex: 1; text-align: center; font-family: var(--font-base); }
.pfe-tag {
  font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 10px;
  font-family: var(--font-base);
}
.new-tag    { background: rgba(74,222,128,.15); color: #4ade80; border: 1px solid rgba(74,222,128,.25); }
.collab-tag { background: rgba(167,139,250,.12); color: #a78bfa; border: 1px solid rgba(167,139,250,.2); }
.cloud-tag  { background: rgba(96,165,250,.1);   color: #60a5fa; border: 1px solid rgba(96,165,250,.2); }
.pfe-body { padding: 20px 24px; font-size: 13px; line-height: 1.8; }
.pfe-line { color: rgba(255,255,255,.35); }
.pfe-line--new { background: rgba(74,222,128,.06); border-left: 2px solid #4ade80; padding-left: 8px; margin-left: -8px; color: rgba(255,255,255,.7); }
.pfe-cursor-line { color: rgba(255,255,255,.5); }
.pfe-kw  { color: #c792ea; }
.pfe-tag { color: #89ddff; }
.pfe-attr{ color: #82aaff; }
.pfe-str { color: #c3e88d; }
.pfe-comment { color: #546e7a; font-style: italic; }
.pfe-cursor { color: #4ade80; animation: blink .9s step-end infinite; font-weight: 400; }
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }
.pfe-statusbar {
  display: flex; gap: 18px; padding: 8px 20px;
  background: rgba(26,115,232,.12); border-top: 1px solid rgba(255,255,255,.06);
  font-size: 11px; color: rgba(255,255,255,.5); font-family: var(--font-base);
  flex-wrap: wrap;
}
.pfe-statusbar span:first-child { color: #4ade80; }

[data-theme="dark"] .pf-card { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.08); }
[data-theme="dark"] .pf-card:hover { border-color: rgba(96,165,250,.3); }
[data-theme="dark"] .pf-cta { border-color: rgba(96,165,250,.3); color: #60a5fa; }
[data-theme="dark"] .pf-cta:hover { background: #1a73e8; color: #fff; }
[data-theme="dark"] .pf-card p,
[data-theme="dark"] .pf-list li { color: rgba(255,255,255,.6); }
.features-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 24px; max-width: 1100px; margin: 0 auto; }
.feature-card {
  background: var(--bg-card); border-radius: var(--radius-lg); padding: 32px 26px;
  text-align: center; box-shadow: var(--shadow-sm); transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  border: 1px solid var(--border); position: relative; overflow: hidden;
}
.feature-card::before {
  content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 60%; height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  opacity: 0; transition: opacity .3s;
}
.feature-card:hover { transform: translateY(-7px); box-shadow: var(--shadow-xl); border-color: rgba(26,115,232,.18); }
.feature-card:hover::before { opacity: 1; }
.feature-card .f-icon { 
  font-size: 44px; margin-bottom: 16px; 
  display: flex; align-items: center; justify-content: center;
  width: 72px; height: 72px; margin: 0 auto 16px;
  background: var(--bg-light); border-radius: 20px; border: 1px solid var(--border);
}
.feature-card h3 { font-size: 17px; margin-bottom: 9px; color: var(--text-dark); font-weight: 700; }
.feature-card p { color: var(--text-med); font-size: 13.5px; margin: 0; line-height: 1.72; }

/* ---- FAQ ---- */
.faq-section { padding: 72px 22px; background: var(--bg-light); }
.faq-wrap { max-width: 760px; margin: 0 auto; }
.faq-item { border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 10px; overflow: hidden; transition: all var(--transition); }
.faq-item.open { border-color: var(--primary); }
.faq-q { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; cursor: pointer; background: var(--bg-card); font-size: 15px; font-weight: 600; color: var(--text-dark); gap: 12px; transition: background var(--transition); }
.faq-q:hover { background: var(--primary-light); color: var(--primary); }
.faq-item.open .faq-q { background: var(--primary-light); color: var(--primary); }
.faq-arrow { font-size: 14px; transition: transform .3s; flex-shrink: 0; color: var(--primary); font-weight: 700; }
.faq-item.open .faq-arrow { transform: rotate(180deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .4s cubic-bezier(.4,0,.2,1); background: var(--bg-card); padding: 0 20px; font-size: 14px; color: var(--text-med); line-height: 1.7; }
.faq-item.open .faq-a { max-height: 300px; }
.faq-a-inner { padding: 16px 0; border-top: 1px solid var(--border); }

/* ---- Testimonials ---- */
.testimonials { 
  padding: 80px 22px;
  background: linear-gradient(160deg, #080a14 0%, #0d1020 50%, #080e1a 100%);
  position: relative; overflow: hidden;
}
.testimonials::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 50% 60% at 20% 50%, rgba(139,92,246,.08), transparent 60%),
    radial-gradient(ellipse 40% 50% at 80% 50%, rgba(26,115,232,.08), transparent 60%);
}
.testi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; max-width: 1100px; margin: 0 auto; position: relative; }
.testi-card { 
  background: rgba(255,255,255,.04); border-radius: var(--radius-lg); padding: 28px;
  border: 1px solid rgba(255,255,255,.08); transition: all .25s ease;
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.testi-card:hover { background: rgba(255,255,255,.08); transform: translateY(-4px); border-color: rgba(255,255,255,.15); box-shadow: 0 8px 30px rgba(0,0,0,.4); }
.testi-stars { color: #fbbf24; font-size: 14px; margin-bottom: 14px; letter-spacing: 2px; }
.testi-card p { color: rgba(255,255,255,.72); font-size: 14px; line-height: 1.78; margin-bottom: 20px; font-style: italic; }
.testi-author { display: flex; align-items: center; gap: 12px; }
.testi-avatar { 
  width: 44px; height: 44px; border-radius: 50%; 
  background: linear-gradient(135deg, var(--primary), #8b5cf6);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 800; color: #fff;
  box-shadow: 0 4px 12px rgba(26,115,232,.3);
}
.testi-info .name { color: #fff; font-weight: 700; font-size: 14px; }
.testi-info .role { color: rgba(255,255,255,.4); font-size: 12px; margin-top: 2px; }

/* ---- Newsletter ---- */
.newsletter-section { 
  background: linear-gradient(135deg, var(--primary), #1557b0);
  padding: 64px 22px; text-align: center; color: #fff;
  position: relative; overflow: hidden;
}
.newsletter-section::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 40% 80% at 50% 100%, rgba(255,255,255,.1), transparent);
}
.newsletter-section h2 { font-size: 28px; font-weight: 800; margin-bottom: 8px; position: relative; letter-spacing: -.3px; }
.newsletter-section p { font-size: 15.5px; opacity: .88; margin-bottom: 28px; position: relative; }
.newsletter-form { display: flex; gap: 8px; max-width: 500px; margin: 0 auto; position: relative; }
.newsletter-form input[type="email"] { flex: 1; padding: 13px 20px; border-radius: 50px; border: 2px solid rgba(255,255,255,.3); background: rgba(255,255,255,.1); color: #fff; font-size: 14.5px; outline: none; transition: border-color var(--transition); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.newsletter-form input::placeholder { color: rgba(255,255,255,.55); }
.newsletter-form input:focus { border-color: rgba(255,255,255,.7); }
.newsletter-form button { background: #fff; color: var(--primary); border: none; padding: 13px 26px; border-radius: 50px; font-size: 14px; font-weight: 700; cursor: pointer; transition: all .2s ease; white-space: nowrap; }
.newsletter-form button:hover { background: var(--secondary); color: #fff; transform: translateY(-1px); }

/* ---- CTA Banner ---- */
.cta-banner { 
  background: linear-gradient(135deg, #0d1020, #121428, #0a0f1e);
  padding: 80px 22px; text-align: center; color: #fff; 
  position: relative; overflow: hidden;
}
.cta-banner::before { 
  content: ''; position: absolute; inset: 0;
  background: 
    radial-gradient(ellipse 50% 70% at 50% 130%, rgba(26,115,232,.28) 0%, transparent 70%),
    radial-gradient(ellipse 30% 40% at 80% 20%, rgba(139,92,246,.12), transparent 60%);
  pointer-events: none;
}
.cta-banner h2 { font-size: 36px; font-weight: 900; margin-bottom: 14px; position: relative; letter-spacing: -.5px; }
.cta-banner p { font-size: 17px; opacity: .75; max-width: 540px; margin: 0 auto 32px; position: relative; }
.cta-btns { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; position: relative; }

/* ============================================================
   FOOTER
   ============================================================ */
footer { 
  background: #060810; color: rgba(255,255,255,.45); 
  padding: 70px 22px 28px;
  border-top: 1px solid rgba(255,255,255,.04);
}
.footer-inner { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 36px; max-width: 1240px; margin: 0 auto 50px; }
.footer-col h4 { 
  color: rgba(255,255,255,.9); margin-bottom: 18px; font-size: 11px; 
  text-transform: uppercase; letter-spacing: 1.2px; font-weight: 700;
}
.footer-col ul { list-style: none; padding: 0; }
.footer-col ul li { margin-bottom: 9px; }
.footer-col ul li a { color: rgba(255,255,255,.4); font-size: 13.5px; transition: color var(--transition); }
.footer-col ul li a:hover { color: var(--primary); text-decoration: none; }
.footer-logo { font-size: 22px; font-weight: 900; color: #fff; margin-bottom: 12px; }
.footer-logo span { 
  background: linear-gradient(135deg, #4f9cf9, #a78bfa);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.footer-desc { font-size: 13px; line-height: 1.7; max-width: 240px; color: rgba(255,255,255,.35); }
.footer-social { display: flex; gap: 9px; margin-top: 18px; }
.footer-social a { 
  width: 36px; height: 36px; border-radius: 9px; 
  border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.04);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; color: rgba(255,255,255,.4); transition: all .2s ease;
}
.footer-social a:hover { border-color: var(--primary); background: var(--primary); color: #fff; text-decoration: none; transform: translateY(-2px); }
.footer-bottom { 
  text-align: center; padding-top: 24px; 
  border-top: 1px solid rgba(255,255,255,.06); 
  font-size: 13px; color: rgba(255,255,255,.22);
}
.footer-bottom b { color: var(--primary); }
.footer-privacy { color: rgba(255,255,255,.35); }
.testi-head { margin-bottom: 36px; }
.testi-title { color: #fff; }
.testi-subtitle { color: rgba(255,255,255,.55); }

/* ============================================================
   BACK TO TOP
   ============================================================ */
#back-to-top { position: fixed; bottom: 28px; right: 28px; z-index: 800; width: 44px; height: 44px; border-radius: 50%; background: var(--primary); color: #fff; border: none; font-size: 18px; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 16px var(--primary-glow); opacity: 0; transform: translateY(16px) scale(.8); transition: all var(--transition); pointer-events: none; }
#back-to-top.show { opacity: 1; transform: translateY(0) scale(1); pointer-events: all; }
#back-to-top:hover { background: var(--primary-dark); transform: translateY(-2px); }

/* ============================================================
   TRY-IT EDITOR
   ============================================================ */
.editor-wrap { display: grid; grid-template-columns: 1fr 1fr; height: calc(100vh - var(--header-h)); }
.editor-pane { display: flex; flex-direction: column; }
.editor-bar { background: var(--secondary); padding: 7px 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.editor-tabs { display: flex; gap: 4px; }
.editor-tab-btn { padding: 5px 12px; border: 1px solid rgba(255,255,255,.2); background: transparent; color: rgba(255,255,255,.6); border-radius: 3px; font-size: 12px; cursor: pointer; transition: all var(--transition); }
.editor-tab-btn.active, .editor-tab-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.run-btn { background: var(--primary); color: #fff; border: none; padding: 5px 16px; border-radius: var(--radius); font-size: 13px; font-weight: 700; cursor: pointer; transition: background var(--transition); }
.run-btn:hover { background: var(--primary-dark); }
.code-area { flex: 1; resize: none; border: none; outline: none; padding: 14px; font-family: 'Consolas',monospace; font-size: 13.5px; background: var(--code-bg); color: #f8f8f2; line-height: 1.65; tab-size: 2; }
.preview-pane { display: flex; flex-direction: column; border-left: 1px solid var(--border); }
.preview-bar { background: var(--bg-light); padding: 7px 14px; font-size: 12.5px; font-weight: 600; color: var(--text-light); border-bottom: 1px solid var(--border); }
.preview-iframe { flex: 1; border: none; width: 100%; background: #fff; }

/* ============================================================
   REFERENCE PAGES
   ============================================================ */
.ref-hero { background: var(--secondary); padding: 34px 40px; }
.ref-hero h1 { color: #fff; font-size: 30px; margin-bottom: 8px; font-weight: 800; }
.ref-hero p { color: rgba(255,255,255,.6); font-size: 15px; margin: 0; }
.ref-search-bar { display: flex; gap: 10px; margin-top: 18px; }
.ref-search-bar input { flex: 1; max-width: 460px; padding: 11px 16px; border: none; border-radius: var(--radius); font-size: 15px; outline: none; background: #fff; color: #222; }
.ref-table { width: 100%; border-collapse: collapse; }
.ref-table th { background: var(--secondary); color: #fff; padding: 11px 16px; text-align: left; font-size: 12.5px; text-transform: uppercase; letter-spacing: .5px; }
.ref-row td { padding: 10px 16px; border-bottom: 1px solid var(--border); font-size: 14px; vertical-align: top; color: var(--text-med); }
.ref-row:nth-child(even) td { background: var(--bg-light); }
.ref-row:hover td { background: var(--primary-light); }
.ref-row td:first-child { font-family: 'Consolas',monospace; color: var(--code-ink, #c72f7b); font-size: 13px; white-space: nowrap; }

/* ============================================================
   QUIZ
   ============================================================ */
.quiz-section { background: var(--bg-light); border-radius: var(--radius-lg); padding: 26px; margin: 22px 0; }
.quiz-section h4 { font-size: 15.5px; margin-bottom: 14px; color: var(--text-dark); }
.quiz-opt { display: block; padding: 10px 16px; background: var(--bg-card); border: 2px solid var(--border); border-radius: var(--radius); margin-bottom: 8px; cursor: pointer; font-size: 13.5px; transition: all var(--transition); color: var(--text-dark); }
.quiz-opt:hover { border-color: var(--primary); background: var(--primary-light); }
.quiz-opt.correct { border-color: var(--primary); background: var(--primary-light); color: #1565c0; }
.quiz-opt.wrong { border-color: var(--danger); background: #ffebee; color: #b71c1c; }
[data-theme="dark"] .quiz-opt.wrong { background: #2e0d0d; color: #ff8a80; }

/* ============================================================
   ACCORDION
   ============================================================ */
.acc-group { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin: 14px 0; }
.acc-btn { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 13px 18px; background: var(--bg-card); border: none; text-align: left; font-size: 14.5px; font-weight: 600; color: var(--text-dark); cursor: pointer; transition: background var(--transition); gap: 10px; }
.acc-btn::after { content: '▾'; font-size: 16px; color: var(--primary); transition: transform .3s; flex-shrink: 0; }
.acc-btn.open::after { transform: rotate(-180deg); }
.acc-btn:hover { background: var(--primary-light); color: var(--primary); }
.acc-panel { max-height: 0; overflow: hidden; transition: max-height .4s ease; background: var(--bg-card); padding: 0 18px; font-size: 14px; color: var(--text-med); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
  :root { --sidebar-w: 245px; }
  .main-content { padding: 24px 28px; }
  .roadmap-grid { grid-template-columns: repeat(2, 1fr); }
  .courses-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
}
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-auth-fallback,
  .nav-auth-cluster { display: none; }
  .hamburger { display: block; }
  .mobile-menu { display: flex; }
  .sidebar { position: fixed; left: -100%; top: var(--header-h); height: calc(100vh - var(--header-h)); z-index: 997; width: 280px; box-shadow: 4px 0 20px rgba(0,0,0,.3); }
  .sidebar.open { left: 0; }
  .editor-wrap { grid-template-columns: 1fr; }
  .hero h1 { font-size: clamp(28px, 6vw, 42px); letter-spacing: -.5px; }
  .hero-sub { font-size: 16px; }
  .main-content { padding: 16px 16px; }
  .main-content h1 { font-size: 26px; }
  .main-content h2 { font-size: 20px; }
  .stat-item { padding: 8px 22px; }
  #back-to-top { bottom: 18px; right: 18px; width: 40px; height: 40px; }
  /* Tutorial pages */
  .tutorial-hero { padding: 28px 22px 22px; }
  .tutorial-hero h1 { font-size: 22px; }
  /* Reference pages */
  .ref-hero { padding: 22px 18px; }
  .ref-hero h1 { font-size: 24px; }
  .ref-search-bar { flex-direction: column; }
  .ref-search-bar input { max-width: 100%; }
  /* Roadmap */
  .roadmap-grid { grid-template-columns: 1fr; }
  /* Policy pages */
  .policy-grid { grid-template-columns: 1fr; }
  .policy-sidebar { position: static; }
  .policy-highlight-grid { grid-template-columns: 1fr; }
  .policy-hero { padding: 40px 18px; }
  /* Tables */
  .data-table { display: block; overflow-x: auto; }
  /* Announcement bar */
  .announcement-bar { font-size: 12.5px; padding: 8px 16px; }
}
@media (max-width: 480px) {
  .hero { padding: 62px 16px 52px; }
  .hero h1 { font-size: 28px; letter-spacing: -.5px; }
  .hero-btns { flex-direction: column; align-items: stretch; }
  .hero-btns .btn, .hero-btns .btn-outline-white { text-align: center; justify-content: center; }
  .hero-sub { font-size: 15px; }
  .page-nav { flex-direction: column; }
  .cta-btns { flex-direction: column; align-items: center; }
  .newsletter-form { flex-direction: column; }
  .stat-item { flex: 1 1 50%; border-right: none; border-bottom: 1px solid rgba(255,255,255,.18); }
  .main-content h1 { font-size: 24px; }
  .main-content h2 { font-size: 19px; }
  .cta-banner h2 { font-size: 26px; }
  .top-nav { padding: 0 14px; }
  .feature-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-col { min-width: 0; }
}

/* ============================================================
   TECH TICKER
   ============================================================ */
.tech-ticker {
  background: var(--secondary-mid);
  overflow: hidden; padding: 0; height: 38px;
  display: flex; align-items: center;
  border-bottom: 1px solid rgba(255,255,255,.06);
  position: relative;
}
.tech-ticker::before,
.tech-ticker::after {
  content: ''; position: absolute; top: 0; bottom: 0; width: 60px; z-index: 2;
  pointer-events: none;
}
.tech-ticker::before { left: 0; background: linear-gradient(to right, var(--secondary-mid), transparent); }
.tech-ticker::after  { right: 0; background: linear-gradient(to left, var(--secondary-mid), transparent); }
.tt-track {
  display: flex; align-items: center;
  animation: tt-scroll 45s linear infinite;
  white-space: nowrap; will-change: transform;
}
.tt-track:hover { animation-play-state: paused; }
.tt-track span {
  display: inline-flex; align-items: center;
  padding: 0 18px; height: 38px;
  color: rgba(255,255,255,.55); font-size: 12px; font-weight: 500;
  border-right: 1px solid rgba(255,255,255,.08);
  transition: color .2s; flex-shrink: 0; gap: 5px;
}
.tt-track span:hover { color: var(--primary); }
@keyframes tt-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ============================================================
   HERO TERMINAL WIDGET
   ============================================================ */
.hero-terminal {
  background: #0d1117; border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius-lg); max-width: 520px;
  margin: 28px auto 0; overflow: hidden; text-align: left;
  box-shadow: 0 12px 40px rgba(0,0,0,.6);
  font-family: 'Consolas','Fira Code','JetBrains Mono',monospace; font-size: 12.5px;
  position: relative;
}
.ht-bar {
  background: #161b22; padding: 9px 14px;
  display: flex; align-items: center; gap: 7px;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.ht-dot { width: 11px; height: 11px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.ht-red    { background: #ff5f57; }
.ht-yellow { background: #febc2e; }
.ht-green  { background: #28c840; }
.ht-title  { color: rgba(255,255,255,.3); font-size: 11px; margin-left: 4px; }
.ht-body   { padding: 14px 18px; color: #e6edf3; line-height: 1.9; }
.ht-body p { margin: 0; }
.ht-prompt { color: #58a6ff; font-weight: 700; -webkit-user-select: none; user-select: none; }
.ht-cmd    { color: #a6e3a1; }
.ht-out    { color: #79c0ff; padding-left: 22px; }
.ht-cursor {
  display: inline-block; width: 7px; height: 13px;
  background: #58a6ff; vertical-align: middle;
  animation: blink .78s step-end infinite;
}

/* ============================================================
   DEVELOPER TOOLKIT SECTION
   ============================================================ */
.devkit-section { padding: 72px 22px; background: var(--bg); }
.devkit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 22px; max-width: 1100px; margin: 0 auto;
}
.devkit-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 22px;
  display: flex; flex-direction: column; gap: 12px;
  box-shadow: var(--shadow-xs); transition: box-shadow var(--transition), border-color var(--transition);
}
.devkit-card:hover { box-shadow: var(--shadow); border-color: var(--primary); }
.dkt-head { display: flex; align-items: flex-start; gap: 14px; }
.dkt-icon {
  width: 44px; height: 44px; border-radius: var(--radius);
  background: var(--code-bg); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800; font-family: 'Consolas',monospace;
  flex-shrink: 0; border: 1px solid rgba(255,255,255,.06); letter-spacing: -.5px;
}
.dkt-head h3 { font-size: 15px; color: var(--text-dark); margin-bottom: 3px; font-weight: 700; margin-top: 0; }
.dkt-head p  { font-size: 12.5px; color: var(--text-light); margin: 0; }
.dkt-input {
  width: 100%; padding: 10px 12px; border-radius: var(--radius);
  border: 1.5px solid var(--border); background: var(--bg-light);
  color: var(--text-dark); font-family: 'Consolas',monospace;
  font-size: 12.5px; resize: vertical; min-height: 68px;
  outline: none; transition: border-color var(--transition);
}
.dkt-input:focus { border-color: var(--primary); }
.dkt-btns { display: flex; gap: 7px; flex-wrap: wrap; }
.dkt-btn {
  padding: 6px 14px; background: var(--primary-light); color: var(--primary);
  border: 1px solid transparent; border-radius: var(--radius);
  font-size: 12.5px; font-weight: 600; cursor: pointer; transition: all var(--transition);
}
.dkt-btn:hover { background: var(--primary); color: #fff; }
.dkt-btn.dkt-copy {
  background: var(--bg-light); color: var(--text-med); border-color: var(--border);
  margin-left: auto;
}
.dkt-btn.dkt-copy:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.dkt-output {
  background: var(--code-bg); color: #a6da95;
  font-family: 'Consolas',monospace; font-size: 12.5px;
  padding: 10px 12px; border-radius: var(--radius);
  min-height: 40px; word-break: break-all; white-space: pre-wrap;
  line-height: 1.65; max-height: 130px; overflow-y: auto;
}
.dkt-output:empty::before { content: 'Output will appear here…'; color: rgba(255,255,255,.2); }
.dkt-output.error { color: #ff8a80; }

/* ============================================================
   PROGRESS TRACKING
   ============================================================ */
.sbp-wrap {
  margin: 10px 12px 8px;
  background: var(--primary-light);
  border-radius: var(--radius);
  padding: 10px 14px;
}
.sbp-row { display: flex; justify-content: space-between; font-size: 12px; font-weight: 700; color: var(--primary); margin-bottom: 6px; }
.sbp-pct { opacity: .75; }
.sbp-bar { background: var(--border); border-radius: 4px; height: 6px; overflow: hidden; }
.sbp-fill { height: 100%; background: var(--primary); border-radius: 4px; transition: width .5s ease; }
.sb-tick { color: var(--primary); font-size: 10px; font-weight: 800; margin-left: 3px; }
.mark-done-btn {
  display: inline-flex; align-items: center; gap: 7px;
  margin-top: 20px; padding: 8px 20px;
  background: var(--bg-light); color: var(--text-med);
  border: 1.5px solid var(--border); border-radius: var(--radius);
  font-size: 13px; font-weight: 600; cursor: pointer;
  transition: all var(--transition);
}
.mark-done-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.mark-done-btn.done { background: var(--primary); color: #fff !important; border-color: var(--primary); }
.mark-done-btn.done:hover { background: var(--primary-dark); }
@keyframes cflyup {
  0%   { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-90px) scale(1.8); }
}

/* ============================================================
   READING TIME BADGE
   ============================================================ */
.read-time-badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12.5px; color: var(--text-light);
  background: var(--bg-light); border: 1px solid var(--border);
  border-radius: 20px; padding: 4px 14px;
  margin-bottom: 16px; -webkit-user-select: none; user-select: none;
}

/* ============================================================
   KEYBOARD SHORTCUTS OVERLAY
   ============================================================ */
.ksh-overlay {
  position: fixed; inset: 0; z-index: 3000;
  background: rgba(0,0,0,.65); -webkit-backdrop-filter: blur(7px); backdrop-filter: blur(7px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity .22s;
}
.ksh-overlay.open { opacity: 1; pointer-events: all; }
.ksh-modal {
  background: var(--bg-card); border-radius: var(--radius-lg);
  padding: 28px 30px; width: 100%; max-width: 460px; margin: 0 16px;
  box-shadow: var(--shadow-lg); transform: scale(.95); transition: transform .22s;
}
.ksh-overlay.open .ksh-modal { transform: scale(1); }
.ksh-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.ksh-head h3 { font-size: 17px; font-weight: 700; color: var(--text-dark); }
.ksh-head button { background: none; border: none; font-size: 20px; cursor: pointer; color: var(--text-light); padding: 2px 6px; border-radius: 4px; }
.ksh-head button:hover { background: var(--bg-light); color: var(--text-dark); }
.ksh-list { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }
.ksh-row { display: flex; align-items: center; justify-content: space-between; padding: 9px 14px; background: var(--bg-light); border-radius: var(--radius); font-size: 13.5px; color: var(--text-dark); font-weight: 500; }
.ksh-keys { display: flex; align-items: center; gap: 3px; flex-shrink: 0; margin-right: 12px; }
.ksh-tip { font-size: 12px; color: var(--text-light); text-align: center; margin: 0; }
kbd {
  background: var(--secondary); color: #cfcfcf;
  border: 1px solid rgba(255,255,255,.12);
  padding: 3px 8px; border-radius: 4px;
  font-size: 11px; font-family: 'Consolas', monospace;
  box-shadow: 0 2px 0 rgba(0,0,0,.4); white-space: nowrap;
}

/* ============================================================
   QUIZ FEEDBACK
   ============================================================ */
.quiz-feedback {
  display: flex; flex-direction: column; gap: 6px;
  margin-top: 12px; padding: 12px 16px;
  border-radius: var(--radius); font-size: 14px; font-weight: 600;
}
.quiz-feedback.correct { background: var(--primary-light); border: 1.5px solid var(--primary); color: var(--primary); }
.quiz-feedback.wrong   { background: #ffebee; border: 1.5px solid var(--danger); color: var(--danger); }
[data-theme="dark"] .quiz-feedback.wrong { background: #2e0d0d; color: #ff8a80; border-color: #f44336; }
.quiz-expl { font-size: 13px; color: var(--text-med); font-weight: 400; margin: 0; padding-top: 6px; border-top: 1px solid var(--border); width: 100%; }

/* ============================================================
   PRINT CSS
   ============================================================ */
@media print {
  .top-nav, .mobile-menu, #search-overlay, #back-to-top,
  .sidebar, .btn-copy, .try-btn, .mark-done-btn, .sbp-wrap,
  .ksh-overlay, #scroll-progress, #read-progress,
  .newsletter-section, .cta-banner, footer, .hero-btns,
  .lang-strip, .stats-bar, .card-actions { display: none !important; }
  body { font-size: 11pt; color: #000 !important; background: #fff !important; }
  .main-content { padding: 0 !important; max-width: 100% !important; }
  .tutorial-layout { display: block !important; }
  .code-box { border: 1px solid #bbb; page-break-inside: avoid; break-inside: avoid; box-shadow: none; }
  .code-box pre code { color: #000 !important; }
  .code-box pre { background: #f4f4f4 !important; }
  .topic-section { break-inside: avoid; }
  h1, h2, h3 { break-after: avoid; color: #000 !important; border-color: #ccc !important; }
  a { color: #000; text-decoration: underline; }
  .note-box { border: 1px solid #aaa !important; background: #f9f9f9 !important; color: #000 !important; }
  .result-box { border: 1px solid #ccc !important; }
}

/* ============================================================
   PRO ENHANCEMENTS v3.0 — World-Class Learning Platform
   ============================================================ */

/* ---- Gradient Text Utility ---- */
.gradient-text {
  background: linear-gradient(135deg, #4f9cf9 0%, #a78bfa 50%, #f472b6 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.gradient-text-green {
  background: linear-gradient(135deg, #10b981, #059669);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---- "NEW" Flash Badge ---- */
.new-badge {
  display: inline-flex; align-items: center; gap: 4px;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: #fff; font-size: 9.5px; font-weight: 800; padding: 2px 7px;
  border-radius: 4px; text-transform: uppercase; letter-spacing: .5px;
  vertical-align: middle; margin-left: 6px;
  animation: flash-badge 2.5s ease-in-out infinite;
}
@keyframes flash-badge {
  0%, 100% { box-shadow: 0 0 6px rgba(245,158,11,.4); }
  50% { box-shadow: 0 0 14px rgba(245,158,11,.7); }
}

/* ---- Announcement Bar ---- */
.announcement-bar {
  background: linear-gradient(90deg, #8b5cf6 0%, #1a73e8 50%, #06b6d4 100%);
  color: #fff; text-align: center; padding: 10px 22px;
  font-size: 13px; font-weight: 500; position: relative;
}
.announcement-bar strong { font-weight: 700; }
.announcement-bar a { color: #fff; text-decoration: underline; text-underline-offset: 2px; font-weight: 700; }
.announcement-bar .ann-close {
  position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: rgba(255,255,255,.7); cursor: pointer;
  font-size: 16px; line-height: 1; padding: 2px 6px; border-radius: 4px;
  transition: all .2s;
}
.announcement-bar .ann-close:hover { background: rgba(255,255,255,.2); color: #fff; }
.announcement-bar.hidden { display: none; }
.ann-hidden .announcement-bar { display: none; }

/* ---- Lang Strip Enhanced ---- */
.lang-strip {
  background: var(--secondary-mid); padding: 0 12px;
  display: flex; gap: 0; flex-wrap: nowrap;
  overflow-x: auto;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.lang-strip::-webkit-scrollbar { display: none; }
@supports (scrollbar-width: none) { .lang-strip { scrollbar-width: none; } }
.lang-strip a {
  color: rgba(255,255,255,.5); font-size: 12px; font-weight: 600;
  padding: 9px 14px; border-bottom: 2px solid transparent;
  white-space: nowrap; transition: all .18s ease; flex-shrink: 0;
  text-transform: uppercase; letter-spacing: .5px;
}
.lang-strip a:hover { color: #fff; border-bottom-color: var(--primary); text-decoration: none; }
.lang-strip a.active { color: var(--primary); border-bottom-color: var(--primary); }

/* ---- Tool Pills Enhanced ---- */
.more-tools { padding: 70px 22px; background: var(--bg); }
.tools-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; max-width: 1100px; margin: 0 auto; }
.tool-pill {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 20px 18px; text-align: center;
  transition: all .22s ease; display: flex; flex-direction: column; align-items: center; gap: 9px;
  box-shadow: var(--shadow-xs); position: relative; overflow: hidden;
}
.tool-pill::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(26,115,232,.06), rgba(139,92,246,.04));
  opacity: 0; transition: opacity .3s;
}
.tool-pill:hover { border-color: var(--primary); box-shadow: 0 8px 24px var(--primary-glow); transform: translateY(-4px); text-decoration: none; }
.tool-pill:hover::before { opacity: 1; }
.tool-pill .tp-icon { font-size: 32px; position: relative; }
.tool-pill .tp-name { font-size: 13px; font-weight: 700; color: var(--text-dark); position: relative; }
.tool-pill .tp-desc { font-size: 11.5px; color: var(--text-light); position: relative; }

/* ---- How-To Enhanced ---- */
.howto-section { padding: 80px 22px; background: var(--bg-light); }
.howto-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; max-width: 1180px; margin: 0 auto; }
.howto-card {
  background: var(--bg-card); border-radius: var(--radius-lg); padding: 24px;
  border-left: 4px solid var(--primary); transition: all .22s ease; box-shadow: var(--shadow-xs);
  border-top: 1px solid var(--border); border-right: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.howto-card:hover { 
  box-shadow: var(--shadow); transform: translateX(3px);
  border-left-color: #8b5cf6;
}
.howto-card h4 { font-size: 14.5px; margin-bottom: 8px; color: var(--text-dark); font-weight: 700; }
.howto-card p { font-size: 13px; color: var(--text-med); margin: 0; line-height: 1.72; }
.howto-card a.howto-more { font-size: 12px; color: var(--primary); display: inline-flex; align-items: center; gap: 4px; margin-top: 10px; font-weight: 600; transition: gap .18s; }
.howto-card a.howto-more:hover { gap: 7px; text-decoration: none; }

/* ---- Page Navigation Enhanced ---- */
.page-nav a {
  display: flex; align-items: center; gap: 8px; padding: 12px 20px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); color: var(--text-dark);
  font-weight: 600; font-size: 14px; transition: all .2s ease;
}
.page-nav a:hover { background: var(--primary-grad); color: #fff !important; border-color: transparent; text-decoration: none; transform: translateY(-2px); box-shadow: 0 4px 14px var(--primary-glow); }

/* ---- Skill Level Badges ---- */
.skill-badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.skill-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 12px; border-radius: 20px; font-size: 12px; font-weight: 600;
  border: 1px solid;
}
.skill-badge.blue   { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.skill-badge.green  { background: #f0fdf4; color: #15803d; border-color: #bbf7d0; }
.skill-badge.purple { background: #faf5ff; color: #7e22ce; border-color: #ddd6fe; }
.skill-badge.orange { background: #fff7ed; color: #c2410c; border-color: #fed7aa; }
[data-theme="dark"] .skill-badge.blue   { background: #0c1445; color: #60a5fa; border-color: #1e3a8a; }
[data-theme="dark"] .skill-badge.green  { background: #052e16; color: #4ade80; border-color: #166534; }
[data-theme="dark"] .skill-badge.purple { background: #1e0a3c; color: #a78bfa; border-color: #5b21b6; }
[data-theme="dark"] .skill-badge.orange { background: #2d1100; color: #fb923c; border-color: #7c2d12; }

/* ---- Tutorial Hero Banner ---- */
.tutorial-hero {
  background: linear-gradient(135deg, #060a14 0%, #0d1225 60%, #08101e 100%);
  padding: 42px 50px 32px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  position: relative; overflow: hidden;
}
.tutorial-hero::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 60% 100% at 80% 50%, rgba(26,115,232,.1), transparent 65%);
}
.tutorial-hero h1 {
  color: #fff; font-size: 28px; font-weight: 800; margin-bottom: 6px;
  position: relative; letter-spacing: -.3px;
}
.tutorial-hero p {
  color: rgba(255,255,255,.55); font-size: 14.5px; margin: 0; position: relative;
}
.tutorial-hero-meta {
  display: flex; align-items: center; gap: 16px; margin-top: 14px;
  flex-wrap: wrap; position: relative;
}
.thm-item {
  display: flex; align-items: center; gap: 5px;
  color: rgba(255,255,255,.5); font-size: 12.5px;
}
.thm-item strong { color: rgba(255,255,255,.8); }

/* ---- Progress Bar (inline reading progress) ---- */
#read-progress { 
  position: fixed; top: var(--header-h); left: 0; z-index: 900; 
  height: 2px; width: 0%; 
  background: linear-gradient(90deg, var(--primary), #8b5cf6);
  transition: width .15s linear; pointer-events: none;
  box-shadow: 0 0 8px rgba(79,156,249,.5);
}

/* ---- Back to Top Enhanced ---- */
#back-to-top { 
  position: fixed; bottom: 28px; right: 28px; z-index: 800; 
  width: 46px; height: 46px; border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), #8b5cf6); 
  color: #fff; border: none; font-size: 18px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(26,115,232,.4);
  opacity: 0; transform: translateY(16px) scale(.8);
  transition: all .25s cubic-bezier(.34,1.56,.64,1); pointer-events: none;
}
#back-to-top.show { opacity: 1; transform: translateY(0) scale(1); pointer-events: all; }
#back-to-top:hover { transform: translateY(-3px) scale(1.07); box-shadow: 0 8px 28px rgba(26,115,232,.5); }

/* ---- Scroll Reveal Enhanced ---- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-left { opacity: 0; transform: translateX(-28px); transition: opacity .6s ease, transform .6s ease; }
.reveal-left.visible { opacity: 1; transform: translateX(0); }
.reveal-right { opacity: 0; transform: translateX(28px); transition: opacity .6s ease, transform .6s ease; }
.reveal-right.visible { opacity: 1; transform: translateX(0); }
.reveal-scale { opacity: 0; transform: scale(.93); transition: opacity .55s ease, transform .55s ease; }
.reveal-scale.visible { opacity: 1; transform: scale(1); }
.reveal-d1 { transition-delay: .04s !important; }
.reveal-d2 { transition-delay: .10s !important; }
.reveal-d3 { transition-delay: .16s !important; }
.reveal-d4 { transition-delay: .22s !important; }
.reveal-d5 { transition-delay: .28s !important; }
.reveal-d6 { transition-delay: .34s !important; }

/* ---- Result Box Enhanced ---- */
.result-box { 
  background: var(--bg-card); border: 2px solid var(--primary); 
  border-radius: var(--radius-lg); padding: 20px 24px; margin: 12px 0;
  box-shadow: 0 0 0 4px var(--primary-glow);
}
.result-label { 
  font-size: 10px; color: var(--primary); font-weight: 800; 
  text-transform: uppercase; letter-spacing: 1.2px; margin-bottom: 10px;
  display: flex; align-items: center; gap: 6px;
}
.result-label::before { content: '●'; font-size: 8px; }

/* ---- Note Boxes Enhanced ---- */
.note-box { 
  padding: 14px 18px; border-radius: var(--radius); margin: 16px 0; 
  border-left: 4px solid; font-size: 14px; 
}
.note-box strong { display: flex; align-items: center; gap: 5px; margin-bottom: 5px; font-size: 11px; text-transform: uppercase; letter-spacing: .6px; font-weight: 800; }
.note-box.info    { background: #eff6ff; border-color: #3b82f6; color: #1e3a5f; }
.note-box.warning { background: #fffbeb; border-color: #f59e0b; color: #7c2d12; }
.note-box.tip     { background: #f0fdf4; border-color: #10b981; color: #065f46; }
.note-box.danger  { background: #fef2f2; border-color: #ef4444; color: #7f1d1d; }
[data-theme="dark"] .note-box.info    { background: #0c1a3a; color: #93c5fd; border-color: #3b82f6; }
[data-theme="dark"] .note-box.warning { background: #2d1600; color: #fcd34d; border-color: #f59e0b; }
[data-theme="dark"] .note-box.tip     { background: #052e16; color: #6ee7b7; border-color: #10b981; }
[data-theme="dark"] .note-box.danger  { background: #2e0d0d; color: #fca5a5; border-color: #ef4444; }

/* ---- Breadcrumb Enhanced ---- */
.breadcrumb { 
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  padding: 10px 0; margin-bottom: 20px; font-size: 12.5px; color: var(--text-light);
}
.breadcrumb a { color: var(--primary); font-weight: 500; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { color: var(--text-light); }

/* ---- Table Enhanced ---- */
.data-table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 14px; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); }
.data-table th { 
  background: linear-gradient(135deg, var(--secondary), var(--secondary-mid)); 
  color: rgba(255,255,255,.9); padding: 12px 16px; 
  text-align: left; font-weight: 700; font-size: 12px; letter-spacing: .3px;
}
.data-table td { padding: 10px 16px; border-bottom: 1px solid var(--border); vertical-align: top; color: var(--text-med); }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:nth-child(even) td { background: var(--bg-light); }
.data-table tr:hover td { background: var(--primary-light); }
.data-table code { background: var(--bg-light); padding: 2px 6px; border-radius: 4px; font-family: 'Fira Code','Consolas',monospace; font-size: 12.5px; color: var(--code-ink, #c72f7b); border: 1px solid var(--border); }

/* ---- Mark Done Button Enhanced ---- */
.mark-done-btn {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 22px; padding: 9px 22px;
  background: var(--bg-light); color: var(--text-med);
  border: 1.5px solid var(--border); border-radius: 50px;
  font-size: 13px; font-weight: 600; cursor: pointer;
  transition: all .2s ease;
}
.mark-done-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); transform: translateY(-1px); }
.mark-done-btn.done { 
  background: linear-gradient(135deg, #059669, #10b981); 
  color: #fff !important; border-color: transparent;
  box-shadow: 0 4px 12px rgba(16,185,129,.3);
}
.mark-done-btn.done:hover { filter: brightness(1.06); transform: translateY(-1px); }

/* ---- Quiz Enhanced ---- */
.quiz-section { background: var(--bg-light); border-radius: var(--radius-lg); padding: 28px; margin: 24px 0; border: 1px solid var(--border); }
.quiz-section h4 { font-size: 15.5px; margin-bottom: 16px; color: var(--text-dark); font-weight: 700; }
.quiz-opt { 
  display: flex; align-items: center; gap: 10px; padding: 11px 16px; 
  background: var(--bg-card); border: 2px solid var(--border); 
  border-radius: var(--radius); margin-bottom: 8px; cursor: pointer; 
  font-size: 13.5px; transition: all .18s ease; color: var(--text-dark);
}
.quiz-opt::before { content: ''; display: inline-block; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--border); flex-shrink: 0; transition: all .18s; }
.quiz-opt:hover { border-color: var(--primary); background: var(--primary-light); }
.quiz-opt:hover::before { border-color: var(--primary); }
.quiz-opt.correct { border-color: #10b981; background: #f0fdf4; color: #065f46; }
.quiz-opt.correct::before { background: #10b981; border-color: #10b981; }
.quiz-opt.wrong   { border-color: var(--danger); background: #fef2f2; color: #7f1d1d; }
.quiz-opt.wrong::before { background: var(--danger); border-color: var(--danger); }
[data-theme="dark"] .quiz-opt.correct { background: #052e16; color: #6ee7b7; border-color: #10b981; }
[data-theme="dark"] .quiz-opt.wrong   { background: #2e0d0d; color: #fca5a5; }

/* ---- FAQ Enhanced ---- */
.faq-section { padding: 80px 22px; background: var(--bg-light); }
.faq-wrap { max-width: 780px; margin: 0 auto; }
.faq-item { border: 1px solid var(--border); border-radius: var(--radius-lg); margin-bottom: 12px; overflow: hidden; transition: all .2s ease; }
.faq-item.open { border-color: var(--primary); box-shadow: 0 4px 14px var(--primary-glow); }
.faq-q { display: flex; align-items: center; justify-content: space-between; padding: 17px 22px; cursor: pointer; background: var(--bg-card); font-size: 15px; font-weight: 600; color: var(--text-dark); gap: 14px; transition: background .2s; }
.faq-q:hover { background: var(--bg-light); color: var(--primary); }
.faq-item.open .faq-q { background: var(--primary-light); color: var(--primary); }
.faq-arrow { font-size: 14px; transition: transform .3s; flex-shrink: 0; color: var(--primary); font-weight: 700; }
.faq-item.open .faq-arrow { transform: rotate(180deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .4s cubic-bezier(.4,0,.2,1); background: var(--bg-card); padding: 0 22px; font-size: 14.5px; color: var(--text-med); line-height: 1.74; }
.faq-item.open .faq-a { max-height: 350px; }
.faq-a-inner { padding: 18px 0; border-top: 1px solid var(--border); }

/* ---- Search Overlay Enhanced ---- */
.search-modal {
  background: var(--bg-card); border-radius: var(--radius-xl);
  padding: 26px; width: 100%; max-width: 640px; margin: 0 16px;
  box-shadow: var(--shadow-xl); transform: translateY(-24px) scale(.97);
  transition: transform .22s cubic-bezier(.34,1.56,.64,1);
  border: 1px solid var(--border);
}
#search-overlay.open .search-modal { transform: translateY(0) scale(1); }
#global-search {
  width: 100%; padding: 14px 20px; border-radius: 50px;
  border: 2px solid var(--border); font-size: 16px;
  background: var(--bg-light); color: var(--text-dark); outline: none;
  transition: border-color .2s; font-family: inherit;
}
#global-search:focus { border-color: var(--primary); background: var(--bg); box-shadow: 0 0 0 4px var(--primary-glow); }

/* ---- DevKit Enhanced ---- */
.devkit-section { padding: 80px 22px; background: var(--bg-light); }
.devkit-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px;
  display: flex; flex-direction: column; gap: 14px;
  box-shadow: var(--shadow-xs); transition: all .2s ease;
}
.devkit-card:hover { box-shadow: var(--shadow); border-color: var(--primary); transform: translateY(-3px); }
.dkt-icon {
  width: 46px; height: 46px; border-radius: var(--radius);
  background: linear-gradient(135deg, var(--secondary), var(--secondary-mid));
  color: var(--primary); display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800; font-family: 'Fira Code','Consolas',monospace;
  flex-shrink: 0; border: 1px solid rgba(255,255,255,.08); letter-spacing: -.5px;
}
.dkt-btn {
  padding: 7px 16px; background: var(--primary-light); color: var(--primary);
  border: 1.5px solid rgba(26,115,232,.2); border-radius: var(--radius);
  font-size: 12.5px; font-weight: 600; cursor: pointer; transition: all .18s; 
  font-family: inherit;
}
.dkt-btn:hover { background: var(--primary); color: #fff; border-color: transparent; transform: translateY(-1px); }

/* ---- Inline code Enhanced ---- */
code:not(.code-box pre code) {
  background: var(--bg-light); color: var(--code-ink, #c72f7b);
  padding: 2px 7px; border-radius: 5px;
  font-family: 'Fira Code','Consolas',monospace; font-size: 12.5px; 
  border: 1px solid var(--border); white-space: nowrap;
}
[data-theme="dark"] code:not(.code-box pre code) {
  background: rgba(255,255,255,.06); color: #f472b6; border-color: rgba(255,255,255,.1);
}

/* ---- Hero Terminal Enhanced ---- */
.hero-terminal {
  background: #080d16; border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius-xl); max-width: 540px;
  margin: 36px auto 0; overflow: hidden; text-align: left;
  box-shadow: 0 0 0 1px rgba(255,255,255,.05), 0 20px 60px rgba(0,0,0,.7);
  font-family: 'Fira Code','JetBrains Mono','Consolas',monospace; font-size: 12.5px;
  position: relative; z-index: 1;
}
.ht-bar {
  background: #0f141e; padding: 10px 16px;
  display: flex; align-items: center; gap: 7px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.ht-dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.ht-red    { background: #ff5f57; }
.ht-yellow { background: #febc2e; }
.ht-green  { background: #28c840; }
.ht-title  { color: rgba(255,255,255,.25); font-size: 11px; margin-left: 6px; }
.ht-body   { padding: 16px 20px; color: #e6edf3; line-height: 1.95; }
.ht-body p { margin: 0; }
.ht-prompt { color: #58a6ff; font-weight: 700; -webkit-user-select: none; user-select: none; }
.ht-cmd    { color: #a6e3a1; }
.ht-out    { color: #79c0ff; padding-left: 22px; }
.ht-cursor {
  display: inline-block; width: 2px; height: 14px;
  background: #58a6ff; vertical-align: middle;
  animation: blink .78s step-end infinite;
}

/* ---- Tech Ticker Enhanced ---- */
.tech-ticker {
  background: linear-gradient(90deg, #12141f, #1a1c2e, #12141f);
  overflow: hidden; padding: 0; height: 40px;
  display: flex; align-items: center;
  border-bottom: 1px solid rgba(255,255,255,.05);
  position: relative;
}
.tech-ticker::before,
.tech-ticker::after {
  content: ''; position: absolute; top: 0; bottom: 0; width: 80px; z-index: 2;
  pointer-events: none;
}
.tech-ticker::before { left: 0; background: linear-gradient(to right, #12141f, transparent); }
.tech-ticker::after  { right: 0; background: linear-gradient(to left, #12141f, transparent); }
.tt-track { display: flex; align-items: center; animation: tt-scroll 50s linear infinite; white-space: nowrap; will-change: transform; }
.tt-track:hover { animation-play-state: paused; }
.tt-track span {
  display: inline-flex; align-items: center; padding: 0 20px; height: 40px;
  color: rgba(255,255,255,.4); font-size: 12px; font-weight: 600;
  border-right: 1px solid rgba(255,255,255,.06);
  transition: color .2s; flex-shrink: 0; gap: 6px; letter-spacing: .3px;
}
.tt-track span:hover { color: var(--primary); }

/* ---- Syntax highlight token colors (example-snippet cards in index.html) ---- */
.sn-tag   { color: #f92672; }
.sn-str   { color: #e6db74; }
.sn-attr  { color: #a6e22e; }
.sn-kw    { color: #66d9ef; }
.sn-num   { color: #ae81ff; }
.sn-param { color: #fd971f; }
.sn-fn    { color: #a6da95; }

/* ---- Hero particles base rule ---- */
.hero-particles span {
  position: absolute; width: 2px; height: 2px; border-radius: 50%;
  background: rgba(26,115,232,.6);
  animation: float-up var(--dur,8s) linear infinite;
  left: var(--x,50%); bottom: -10px;
  animation-delay: var(--delay,0s);
}
@keyframes float-up {
  0%   { transform: translateY(0) scale(1); opacity: .6; }
  100% { transform: translateY(-110vh) scale(.2); opacity: 0; }
}

/* ---- Hero particle positions/durations (index.html) ---- */
.hero-particles span:nth-child(1) { --x:8%;  --dur:9s;  --delay:0s }
.hero-particles span:nth-child(2) { --x:18%; --dur:13s; --delay:2s }
.hero-particles span:nth-child(3) { --x:30%; --dur:10s; --delay:5s }
.hero-particles span:nth-child(4) { --x:45%; --dur:14s; --delay:1s }
.hero-particles span:nth-child(5) { --x:58%; --dur:8s;  --delay:4s }
.hero-particles span:nth-child(6) { --x:70%; --dur:11s; --delay:3s }
.hero-particles span:nth-child(7) { --x:82%; --dur:12s; --delay:6s }
.hero-particles span:nth-child(8) { --x:93%; --dur:9s;  --delay:2s }

/* ---- html/index.html demo output styles ---- */
.result-box .demo-hw-h1  { font-size: 20px; margin-bottom: 6px; }
.result-box .demo-hw-p   { margin: 0; }
.result-box .demo-h1     { font-size: 26px; margin: 2px 0; }
.result-box .demo-h2     { font-size: 22px; margin: 2px 0; border: none; padding: 0; }
.result-box .demo-h3     { font-size: 18px; margin: 2px 0; }
.result-box .demo-h4     { font-size: 15px; margin: 2px 0; }
.result-box .demo-h5     { font-size: 13px; margin: 2px 0; }
.result-box .demo-h6     { font-size: 12px; margin: 2px 0; }
.demo-color-grid         { display: grid; grid-template-columns: repeat(6,1fr); gap: 8px; margin-top: 14px; }
.demo-swatch             { padding: 18px 0; text-align: center; border-radius: 5px; color: #fff; font-size: 12px; font-weight: 600; }
.sw-tomato               { background: #FF6347; }
.sw-royal                { background: #4169E1; }
.sw-green-swatch         { background: #04AA6D; }
.sw-orange               { background: #FF8C00; }
.sw-orchid               { background: #9932CC; }
.sw-navy                 { background: #282A35; }
.demo-table-flush        { margin: 0; }
.demo-svg-box            { border: 1px solid #e0e0e0; border-radius: 5px; margin-top: 10px; }

/* ---- css-tutorial/index.html demo output styles ---- */
.demo-flex-wrap          { display: flex; gap: 12px; flex-wrap: wrap; }
.demo-border-box         { padding: 12px 18px; border-radius: 5px; }
.demo-bdr-solid          { border: 2px solid #04AA6D; }
.demo-bdr-dashed         { border: 2px dashed #FF6347; }
.demo-bdr-dotted         { border: 2px dotted #9932CC; }
.demo-bdr-double         { border: 4px double #4169E1; }
.demo-circle             { width: 60px; height: 60px; border-radius: 50%; background: #04AA6D; display: flex; align-items: center; justify-content: center; color: white; font-size: 12px; }
.bm-wrap                 { text-align: center; padding: 20px; }
.bm-outer                { display: inline-block; background: #FFE0B2; padding: 20px; border: 3px solid #FF6347; margin: 20px; font-size: 13px; min-width: 200px; }
.bm-inner-padding        { background: #C8E6C9; padding: 20px; border: 2px dashed #04AA6D; text-align: center; }
.bm-content-box          { background: #B3E5FC; padding: 18px; font-weight: bold; }
.bm-green-label          { color: #04AA6D; }
.bm-red-label            { color: #FF6347; }
.bm-orange-label         { color: #FF8C00; }
.demo-flex-ctr           { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.demo-fi                 { color: #fff; padding: 14px 20px; border-radius: 5px; font-weight: 600; }
.demo-fi-1               { background: #04AA6D; }
.demo-fi-2               { background: #282A35; flex: 2; }
.demo-fi-3               { background: #FF6347; }
.demo-grid-2col          { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; font-size: 13px; font-weight: 600; }
.demo-gc                 { color: #fff; text-align: center; border-radius: 5px; }
.demo-gc-sm              { padding: 12px; }
.demo-gc-lg              { padding: 18px; }
.demo-gc-full            { grid-column: 1/-1; }
.demo-gc-dark            { background: #282A35; }
.demo-gc-green           { background: #04AA6D; }
.demo-gc-blue            { background: #4169E1; }
.demo-gc-red             { background: #FF6347; }
.demo-grad-grid          { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; height: 80px; }
.demo-grad-box           { border-radius: 5px; }
.demo-grad-1             { background: linear-gradient(135deg,#04AA6D,#282A35); }
.demo-grad-2             { background: radial-gradient(circle,#FF6347,#9932CC); }
.demo-grad-3             { background: linear-gradient(to right,#4169E1,#FF8C00); }

/* ============================================================
   PRO HEADER: SCROLL-AWARE + DROPDOWN
   ============================================================ */
.top-nav {
  transition: height .3s ease, box-shadow .3s ease, background .3s ease;
}
.top-nav.scrolled {
  height: 52px;
  background: rgba(14, 16, 30, 0.99);
  box-shadow: 0 2px 32px rgba(0, 0, 0, .6), 0 1px 0 rgba(255,255,255,.06);
}

/* Nav link underline-slide active indicator */
.nav-links a {
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  right: 50%;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
  transition: left .22s ease, right .22s ease;
}
.nav-links a:hover::after,
.nav-links a.active::after {
  left: 8px;
  right: 8px;
}
.nav-links a:hover,
.nav-links a.active {
  background: rgba(255,255,255,.1);
}

/* ---- More Dropdown ---- */
.nav-dropdown {
  position: relative;
}
.nav-drop-btn {
  color: rgba(255,255,255,.7);
  padding: 7px 10px;
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .4px;
  transition: all var(--transition);
  white-space: nowrap;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-drop-btn:hover,
.nav-drop-btn[aria-expanded="true"] {
  color: #fff;
  background: rgba(255,255,255,.1);
}
.nav-chevron {
  font-size: 10px;
  display: inline-block;
  transition: transform .22s ease;
  line-height: 1;
}
.nav-drop-btn[aria-expanded="true"] .nav-chevron {
  transform: rotate(180deg);
}
.nav-drop-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  background: rgba(12, 14, 28, 0.98);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px;
  padding: 6px;
  min-width: 190px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .55), 0 2px 8px rgba(0,0,0,.4);
  opacity: 0;
  transform: translateY(-8px) scale(.97);
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  z-index: 1001;
}
.nav-drop-menu.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}
.nav-drop-menu a {
  display: block;
  padding: 9px 14px;
  border-radius: 8px;
  color: rgba(255,255,255,.65);
  font-size: 13px;
  font-weight: 500;
  transition: background .15s, color .15s;
  text-decoration: none !important;
}
.nav-drop-menu a:hover {
  background: var(--primary);
  color: #fff;
  text-decoration: none !important;
}
.nav-drop-menu a.active {
  color: var(--primary);
  font-weight: 700;
}
.nav-drop-divider {
  height: 1px;
  background: rgba(255,255,255,.08);
  margin: 6px 8px;
}

/* ---- Mobile Backdrop Overlay ---- */
.mobile-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .6);
  z-index: 996;
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  animation: fadeIn .25s ease;
}
.mobile-backdrop.open {
  display: block;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ============================================================
   PRO FOOTER: NEWSLETTER + GRADIENT BORDER
   ============================================================ */
footer {
  border-top: none;
  position: relative;
}
footer::before {
  content: '';
  display: block;
  height: 3px;
  background: linear-gradient(90deg, #4f9cf9 0%, #a78bfa 50%, #f472b6 100%);
}
.footer-newsletter {
  background: linear-gradient(135deg, #0a0c1e 0%, #131530 50%, #0a0c1e 100%);
  padding: 56px 22px;
  text-align: center;
}
.fnl-inner {
  max-width: 520px;
  margin: 0 auto;
}
.fnl-inner h3 {
  color: #fff;
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 8px;
  letter-spacing: -.3px;
}
.fnl-inner p {
  color: rgba(255,255,255,.45);
  font-size: 14.5px;
  margin-bottom: 24px;
  line-height: 1.6;
}
.fnl-form {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
.fnl-form input[type="email"] {
  padding: 12px 18px;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color: #fff;
  font-size: 14px;
  outline: none;
  width: 240px;
  font-family: inherit;
  transition: border-color var(--transition), background var(--transition);
}
.fnl-form input[type="email"]::placeholder {
  color: rgba(255,255,255,.28);
}
.fnl-form input[type="email"]:focus {
  border-color: var(--primary);
  background: rgba(255,255,255,.09);
}
.fnl-form button {
  padding: 12px 24px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--primary) 0%, #8b5cf6 100%);
  color: #fff;
  border: none;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: opacity var(--transition), transform var(--transition);
  white-space: nowrap;
}
.fnl-form button:hover {
  opacity: .88;
  transform: translateY(-1px);
}

/* Updated footer-inner padding */
footer .footer-inner {
  padding-top: 62px;
}

/* SVG social icons */
.footer-social a svg {
  width: 16px;
  height: 16px;
  display: block;
  flex-shrink: 0;
}

/* Updated footer-bottom: flex layout */
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-bottom p {
  margin: 0;
}
.footer-bottom-links {
  display: flex;
  gap: 20px;
}
.footer-bottom-links a {
  color: rgba(255,255,255,.28);
  font-size: 12.5px;
  transition: color var(--transition);
  text-decoration: none;
}
.footer-bottom-links a:hover {
  color: var(--primary);
  text-decoration: none;
}

/* ============================================================
   LEGAL / UTILITY PAGES
   ============================================================ */
.policy-shell {
  background:
    radial-gradient(ellipse 60% 40% at 15% 15%, rgba(26,115,232,.08), transparent 60%),
    radial-gradient(ellipse 60% 50% at 85% 0%, rgba(139,92,246,.08), transparent 60%),
    linear-gradient(180deg, var(--bg-light) 0%, var(--bg) 20%, var(--bg) 100%);
}
.policy-hero {
  position: relative;
  overflow: hidden;
  padding: 84px 22px 50px;
  background: linear-gradient(135deg, #07101f 0%, #0d1734 50%, #0a1123 100%);
  color: #fff;
}
.policy-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(79,156,249,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79,156,249,.06) 1px, transparent 1px);
  background-size: 42px 42px;
  -webkit-mask-image: radial-gradient(circle at center, #000 35%, transparent 100%);
  mask-image: radial-gradient(circle at center, #000 35%, transparent 100%);
}
.policy-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin: 0 auto;
}
.policy-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 16px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.16);
  color: rgba(255,255,255,.82);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.policy-hero h1 {
  max-width: 760px;
  font-size: clamp(34px, 6vw, 58px);
  line-height: 1.04;
  letter-spacing: -0.04em;
  margin-bottom: 16px;
}
.policy-hero p {
  max-width: 720px;
  color: rgba(255,255,255,.7);
  font-size: 17px;
  margin: 0;
}
.policy-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}
.policy-meta span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  color: rgba(255,255,255,.8);
  font-size: 13px;
}
.policy-main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 38px 22px 80px;
}
.policy-grid {
  display: grid;
  grid-template-columns: minmax(0, 290px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.policy-sidebar {
  position: sticky;
  top: calc(var(--header-h) + 20px);
  display: grid;
  gap: 18px;
}
.policy-card,
.policy-toc,
.policy-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow-xs);
}
.policy-card {
  padding: 20px;
}
.policy-card h2,
.policy-toc h2 {
  font-size: 14px;
  margin-bottom: 10px;
  color: var(--text-dark);
}
.policy-card p {
  margin: 0;
  color: var(--text-med);
  font-size: 14px;
}
.policy-toc {
  padding: 20px;
}
.policy-toc ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.policy-toc li + li {
  margin-top: 8px;
}
.policy-toc a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--text-med);
  background: var(--bg-light);
  border: 1px solid transparent;
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
}
.policy-toc a:hover {
  color: var(--primary);
  border-color: rgba(26,115,232,.18);
  background: var(--primary-light);
}
.policy-body {
  display: grid;
  gap: 18px;
}
.policy-panel {
  padding: 26px 28px;
}
.policy-panel h2 {
  font-size: 22px;
  line-height: 1.2;
  margin-bottom: 10px;
  color: var(--text-dark);
}
.policy-panel p,
.policy-panel li {
  color: var(--text-med);
  font-size: 14.5px;
  line-height: 1.8;
}
.policy-panel ul {
  margin: 12px 0 0;
}
.policy-highlight-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}
.policy-highlight {
  padding: 16px;
  border-radius: 16px;
  background: var(--bg-light);

  border: 1px solid var(--border);
}
.policy-highlight strong {
  display: block;
  margin-bottom: 6px;
  color: var(--text-dark);
  font-size: 13px;
}
.policy-highlight span {
  display: block;
  color: var(--text-med);
  font-size: 13px;
  line-height: 1.7;
}
.site-map-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.site-map-group {
  padding: 22px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  box-shadow: var(--shadow-xs);
}
.site-map-group h2 {
  font-size: 18px;
  margin-bottom: 6px;
}
.site-map-group p {
  color: var(--text-med);
  font-size: 14px;
  margin-bottom: 14px;
}
.site-map-links {
  display: grid;
  gap: 10px;
}
.site-map-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--bg-light);
  border: 1px solid var(--border);
  color: var(--text-dark);
  font-weight: 600;
  text-decoration: none;
}
.site-map-links a:hover {
  border-color: rgba(26,115,232,.2);
  background: var(--primary-light);
  color: var(--primary);
}
.site-map-links small {
  color: var(--text-light);
  font-weight: 500;
}

/* Responsive updates for new components */
@media (max-width: 768px) {
  .top-nav { padding: 0 14px; gap: 10px; }
  .top-nav .logo { font-size: 17px; gap: 6px; }
  .top-nav .logo .logo-badge { display: none; }
  .nav-right { gap: 6px; }
  .btn-dark-toggle, .btn-nav-search { padding: 5px 8px; }
  .nav-dropdown { display: none; }
  .fnl-form { flex-direction: column; align-items: center; }
  .fnl-form input[type="email"] { width: 100%; max-width: 320px; }
  .search-modal { padding: 18px; margin: 0 12px; }
  #search-overlay { padding-top: 7vh; }
  .quick-search-bar, .newsletter-form { flex-direction: column; border-radius: 20px; padding: 12px; }
  #qs-btn, .newsletter-form button, .newsletter-form input[type="email"] { width: 100%; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 24px; }
  .policy-hero { padding: 68px 18px 38px; }
  .policy-main { padding: 28px 16px 64px; }
  .policy-grid, .site-map-grid, .policy-highlight-grid { grid-template-columns: 1fr; }
  .policy-sidebar { position: static; }
  .policy-panel { padding: 20px 18px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .footer-bottom-links { justify-content: center; }
}
@media (max-width: 480px) {
  .announcement-bar { padding: 10px 44px 10px 14px; font-size: 12px; }
  .top-nav { padding: 0 10px; }
  .top-nav .logo { font-size: 15px; }
  .footer-newsletter { padding: 36px 16px; }
  .fnl-inner h3 { font-size: 20px; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-bottom-links { gap: 14px; flex-wrap: wrap; }
  .policy-meta span { width: 100%; justify-content: center; }
}

/* ============================================================
   DYNAMIC UI v4.0 — World-Class Visual Upgrade
   ============================================================ */

/* ----- Hero page-load entrance sequence ----- */
@keyframes hero-enter {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero-eyebrow  { animation: hero-enter .65s cubic-bezier(.22,1,.36,1) both; animation-delay: .05s; }
.hero h1       { animation: hero-enter .7s  cubic-bezier(.22,1,.36,1) both; animation-delay: .2s;  }
.hero-sub      { animation: hero-enter .7s  cubic-bezier(.22,1,.36,1) both; animation-delay: .35s; }
.hero-btns     { animation: hero-enter .7s  cubic-bezier(.22,1,.36,1) both; animation-delay: .5s;  }
.hero-terminal { animation: hero-enter .75s cubic-bezier(.22,1,.36,1) both; animation-delay: .65s; }
.hero-tags     { animation: hero-enter .6s  cubic-bezier(.22,1,.36,1) both; animation-delay: .8s;  }

/* ----- Animated gradient on hero h1 accent text ----- */
@keyframes grad-shift-v4 {
  0%   { background-position: 0% 50% }
  50%  { background-position: 100% 50% }
  100% { background-position: 0% 50% }
}
.hero h1 .accent {
  background: linear-gradient(135deg, #60abff 0%, #c084fc 25%, #fb7185 55%, #34d399 80%, #60abff 100%);
  background-size: 300% 300%;
  animation: grad-shift-v4 6s ease infinite;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ----- Particle color & size variety (layered on top of existing positions) ----- */
.hero-particles { transition: transform .15s ease; }
.hero-particles span:nth-child(1) { background: rgba(96,171,255,.9);   width: 3px; height: 3px; }
.hero-particles span:nth-child(2) { background: rgba(192,132,252,.85); width: 5px; height: 5px; }
.hero-particles span:nth-child(3) { background: rgba(52,211,153,.75);  width: 2px; height: 2px; }
.hero-particles span:nth-child(4) { background: rgba(251,113,133,.85); width: 4px; height: 4px; }
.hero-particles span:nth-child(5) { background: rgba(96,165,250,.9);   width: 3px; height: 3px; }
.hero-particles span:nth-child(6) { background: rgba(251,191,36,.7);   width: 3px; height: 3px; }
.hero-particles span:nth-child(7) { background: rgba(167,139,250,.9);  width: 5px; height: 5px; }
.hero-particles span:nth-child(8) { background: rgba(6,182,212,.85);   width: 3px; height: 3px; }

/* ----- Hero aurora slow-pulse ----- */
@keyframes aurora-pulse-v4 {
  0%, 100% {
    background:
      radial-gradient(ellipse 60% 50% at 30% 60%, rgba(139,92,246,.14) 0%, transparent 60%),
      radial-gradient(ellipse 60% 50% at 70% 30%, rgba(26,115,232,.18) 0%, transparent 60%),
      radial-gradient(ellipse 40% 70% at 50% -10%, rgba(26,115,232,.22) 0%, transparent 65%);
  }
  50% {
    background:
      radial-gradient(ellipse 70% 60% at 15% 75%, rgba(26,115,232,.2) 0%, transparent 60%),
      radial-gradient(ellipse 50% 60% at 85% 15%, rgba(167,139,250,.2) 0%, transparent 60%),
      radial-gradient(ellipse 35% 60% at 55% -5%, rgba(52,211,153,.08) 0%, transparent 65%);
  }
}
.hero::before { animation: aurora-pulse-v4 10s ease-in-out infinite; }

/* ----- Hero terminal lines staggered appearance ----- */
@keyframes term-line-enter {
  from { opacity: 0; transform: translateX(-6px); }
  to   { opacity: 1; transform: translateX(0); }
}
.ht-body p { opacity: 0; }
.ht-body p:nth-child(1) { animation: term-line-enter .3s ease forwards; animation-delay: 1.0s;  }
.ht-body p:nth-child(2) { animation: term-line-enter .3s ease forwards; animation-delay: 2.2s;  }
.ht-body p:nth-child(3) { animation: term-line-enter .2s ease forwards; animation-delay: 3.0s;  }
.ht-body p:nth-child(4) { animation: term-line-enter .2s ease forwards; animation-delay: 3.3s;  }
.ht-body p:nth-child(5) { animation: term-line-enter .2s ease forwards; animation-delay: 3.6s;  }
.ht-body p:nth-child(6) { animation: term-line-enter .2s ease forwards; animation-delay: 3.9s;  }
.ht-body p:nth-child(7) { animation: term-line-enter .3s ease forwards; animation-delay: 4.4s;  }

/* ----- Stats bar glow on numbers ----- */
.stat-num { text-shadow: 0 0 24px rgba(255,255,255,.18); }

/* ----- Feature card icon spring-bounce on hover ----- */
.feature-card .f-icon {
  transition: transform .3s cubic-bezier(.34,1.56,.64,1), background .3s, box-shadow .3s, border-color .3s;
}
.feature-card:hover .f-icon {
  transform: scale(1.1) rotate(-4deg);
  background: rgba(26,115,232,.12);
  box-shadow: 0 0 22px rgba(26,115,232,.22);
  border-color: rgba(26,115,232,.28);
}

/* ----- Platform feature icon spring hover ----- */
.pf-icon-wrap { transition: transform .3s cubic-bezier(.34,1.56,.64,1), filter .3s; }
.pf-card:hover .pf-icon-wrap { transform: scale(1.1) rotate(-3deg); filter: brightness(1.18); }

/* ----- Roadmap step number spring bounce ----- */
.rs-num { transition: transform .22s cubic-bezier(.34,1.56,.64,1), box-shadow .22s; }
.roadmap-step:hover .rs-num { transform: scale(1.22); box-shadow: 0 4px 16px rgba(26,115,232,.45); }

/* ----- Hero tag glow on hover ----- */
.hero-tags span:hover {
  color: #60abff !important;
  border-color: rgba(96,171,255,.4) !important;
  background: rgba(96,171,255,.1) !important;
  box-shadow: 0 0 14px rgba(96,171,255,.2);
  transform: translateY(-2px) scale(1.05);
}

/* ----- Testimonial card decorative quote mark ----- */
.testi-card { position: relative; overflow: hidden; }
.testi-card::before {
  content: '\201C';
  position: absolute; top: 8px; right: 16px;
  font-size: 60px; line-height: 1;
  color: rgba(96,171,255,.1);
  font-family: Georgia, serif; font-weight: 900;
  pointer-events: none; -webkit-user-select: none; user-select: none;
}

/* ----- CTA banner — grid dot overlay ----- */
.cta-banner { isolation: isolate; }
.cta-banner::after {
  content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(79,156,249,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79,156,249,.04) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 20%, transparent 100%);
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 20%, transparent 100%);
}
.cta-banner h2, .cta-banner p, .cta-btns { position: relative; z-index: 1; }

/* ----- Newsletter animated gradient ----- */
.newsletter-section {
  background: linear-gradient(135deg, #1557b0 0%, #1a73e8 30%, #7c3aed 70%, #1557b0 100%);
  background-size: 300% 300%;
  animation: grad-shift-v4 10s ease infinite;
}

/* ----- Announcement bar shimmer ----- */
@keyframes shimmer-v4 {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}
.announcement-bar {
  background: linear-gradient(90deg, #8b5cf6 0%, #1a73e8 22%, #06b6d4 45%, #10b981 68%, #1a73e8 88%, #8b5cf6 100%);
  background-size: 400% 100%;
  animation: shimmer-v4 10s linear infinite;
}

/* ----- Section divider animated gradient ----- */
.section-divider {
  background: linear-gradient(90deg, var(--primary), #8b5cf6, #f472b6, var(--primary));
  background-size: 300% 100%;
  animation: grad-shift-v4 5s ease infinite;
}

/* ----- Quick search tags lift on hover ----- */
.quick-tags a:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 4px 14px var(--primary-glow);
}

/* ----- Scroll progress bar glow ----- */
#scroll-progress { box-shadow: 0 0 10px rgba(79,156,249,.4); }

/* ----- Back-to-top button pulse ----- */
@keyframes btt-pulse-v4 {
  0%, 100% { box-shadow: 0 4px 20px rgba(26,115,232,.4); }
  50%       { box-shadow: 0 6px 30px rgba(26,115,232,.65), 0 0 0 6px rgba(26,115,232,.1); }
}
#back-to-top.show { animation: btt-pulse-v4 3s ease-in-out infinite; }
#back-to-top.show:hover { animation: none; }

/* ----- Glassmorphism dark mode cards ----- */
[data-theme="dark"] .big-card {
  background: rgba(22,24,46,.88);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border-color: rgba(79,156,249,.1);
}
[data-theme="dark"] .big-card:hover {
  border-color: rgba(79,156,249,.32);
  box-shadow: 0 12px 50px rgba(0,0,0,.5), 0 0 0 1px rgba(79,156,249,.16);
}
[data-theme="dark"] .feature-card {
  background: rgba(22,24,46,.88);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  border-color: rgba(255,255,255,.07);
}
[data-theme="dark"] .howto-card { background: rgba(22,24,46,.92); }
[data-theme="dark"] .devkit-card, [data-theme="dark"] .tool-pill {
  background: rgba(22,24,46,.92); border-color: rgba(255,255,255,.07);
}

/* ----- Course card tilt — fast transition (JS handles transform) ----- */
.big-card { transition: box-shadow .25s ease, border-color .25s ease; }

/* ----- Code snippet sweep shine on card hover ----- */
.big-card .example-snippet { position: relative; overflow: hidden; }
.big-card .example-snippet::after {
  content: ''; position: absolute;
  top: 0; left: -120%; width: 50%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(79,156,249,.07), transparent);
  transition: left .5s ease; pointer-events: none;
}
.big-card:hover .example-snippet::after { left: 130%; }

/* ----- Roadmap column hover highlight ----- */
.roadmap-col {
  border-radius: var(--radius-lg);
  transition: background .3s, box-shadow .3s;
}
.roadmap-col:hover {
  background: rgba(26,115,232,.04);
  box-shadow: 0 0 0 1px rgba(26,115,232,.1), 0 8px 24px rgba(26,115,232,.05);
}
[data-theme="dark"] .roadmap-col:hover {
  background: rgba(79,156,249,.05);
  box-shadow: 0 0 0 1px rgba(79,156,249,.15), 0 8px 24px rgba(79,156,249,.06);
}

/* ----- FAQ open item glow ----- */
.faq-item.open { box-shadow: 0 0 0 1px var(--primary), 0 4px 16px var(--primary-glow); }

/* ----- Devkit card hover lift ----- */
.devkit-card:hover { transform: translateY(-4px); }

/* ----- Tool pill icons larger & spring ----- */
.tool-pill .tp-icon { transition: transform .3s cubic-bezier(.34,1.56,.64,1); }
.tool-pill:hover .tp-icon { transform: scale(1.18) rotate(-4deg); }

/* ----- Section badge micro-animation ----- */
.section-head .badge { transition: all .2s ease; cursor: default; }
.section-head .badge:hover {
  background: var(--primary); color: #fff;
  box-shadow: 0 4px 12px var(--primary-glow);
  transform: translateY(-1px);
}

/* ----- Reduce motion: disable all new animations ----- */
@media (prefers-reduced-motion: reduce) {
  .hero-eyebrow, .hero h1, .hero-sub, .hero-btns, .hero-terminal, .hero-tags,
  .hero h1 .accent, .ht-body p, .hero::before,
  .announcement-bar, .newsletter-section, .section-divider,
  #back-to-top.show { animation: none !important; opacity: 1 !important; transform: none !important; }
}

/* ============================================================
   HOMEPAGE PRO POLISH v5
   Scoped to index.html only via body.home-page
   ============================================================ */
.home-page {
  --home-ink: #10131f;
  --home-muted: #5d6478;
  --home-line: rgba(20,28,45,.1);
  --home-panel: rgba(255,255,255,.92);
  --home-panel-strong: #ffffff;
  --home-dark: #080b12;
  --home-dark-2: #111827;
  --home-blue: #2563eb;
  --home-cyan: #06b6d4;
  --home-green: #10b981;
  --home-amber: #f59e0b;
  --home-pink: #f43f5e;
  background:
    radial-gradient(circle at 10% 0%, rgba(37,99,235,.08), transparent 28rem),
    radial-gradient(circle at 90% 10%, rgba(16,185,129,.08), transparent 30rem),
    #f7f9fc;
}

.home-page .announcement-bar {
  background: linear-gradient(90deg, #111827 0%, #1d4ed8 32%, #0f766e 68%, #111827 100%);
  border-bottom: 1px solid rgba(255,255,255,.12);
}

.home-page .top-nav {
  height: 60px;
  background: rgba(8,11,18,.88);
  border-bottom: 1px solid rgba(255,255,255,.1);
  box-shadow: 0 14px 40px rgba(0,0,0,.22);
}

.home-page .nav-links a {
  border-radius: 6px;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 650;
}

.home-page .nav-links a:hover,
.home-page .nav-links a.active {
  background: rgba(255,255,255,.1);
  color: #fff;
}

.home-page .btn-dark-toggle,
.home-page .btn-nav-search {
  min-width: 36px;
  height: 34px;
  justify-content: center;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .03em;
}

.home-page .lang-strip {
  background: #10131f;
  border-bottom: 1px solid rgba(255,255,255,.08);
  justify-content: center;
}

.home-page .lang-strip a {
  padding: 10px 14px;
  color: rgba(255,255,255,.62);
  font-weight: 650;
}

.home-page .lang-strip a:hover {
  color: #fff;
  background: rgba(255,255,255,.08);
  border-bottom-color: var(--home-green);
}

.home-page .hero {
  min-height: calc(100vh - 116px);
  display: grid;
  align-content: center;
  padding: clamp(72px, 9vw, 118px) 22px 74px;
  background:
    linear-gradient(rgba(37,99,235,.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37,99,235,.08) 1px, transparent 1px),
    radial-gradient(circle at 18% 24%, rgba(6,182,212,.22), transparent 25rem),
    radial-gradient(circle at 80% 16%, rgba(16,185,129,.18), transparent 27rem),
    radial-gradient(circle at 50% 100%, rgba(245,158,11,.12), transparent 25rem),
    linear-gradient(180deg, #070a12 0%, #101624 58%, #0b111c 100%);
  background-size: 54px 54px, 54px 54px, auto, auto, auto, auto;
}

.home-page .hero::before {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255,255,255,.11), transparent 34rem),
    linear-gradient(180deg, transparent 0%, rgba(8,11,18,.38) 100%);
}

.home-page .hero::after {
  background:
    linear-gradient(115deg, transparent 0 12%, rgba(255,255,255,.05) 12% 12.2%, transparent 12.2% 100%),
    linear-gradient(245deg, transparent 0 18%, rgba(6,182,212,.08) 18% 18.2%, transparent 18.2% 100%);
  background-size: 100% 100%;
  -webkit-mask-image: none;
  mask-image: none;
}

.home-page .hero-eyebrow {
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.16);
  color: rgba(255,255,255,.82);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}

.home-page .hero h1 {
  max-width: 980px;
  margin-left: auto;
  margin-right: auto;
  font-size: clamp(42px, 7.2vw, 82px);
  line-height: .98;
  letter-spacing: -0.065em;
  text-wrap: balance;
}

.home-page .hero h1 .accent {
  background: linear-gradient(90deg, #60a5fa 0%, #22d3ee 28%, #34d399 55%, #fbbf24 78%, #fb7185 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
}

.home-page .hero-sub {
  max-width: 760px;
  color: rgba(255,255,255,.72);
  font-size: clamp(16px, 1.6vw, 20px);
  line-height: 1.7;
  margin-bottom: 30px;
}

.home-page .hero-btns {
  gap: 12px;
}

.home-page .hero-btns .btn,
.home-page .hero-btns .btn-outline-white {
  min-height: 46px;
  border-radius: 8px;
  padding: 12px 22px;
  box-shadow: none;
}

.home-page .hero-btns .btn-primary {
  background: linear-gradient(135deg, #2563eb, #0891b2);
  border: 1px solid rgba(255,255,255,.16);
  box-shadow: 0 16px 40px rgba(37,99,235,.26);
}

.home-page .hero-btns .btn-outline-white {
  background: rgba(255,255,255,.075);
  border-color: rgba(255,255,255,.18);
}

.home-page .hero-btns .btn:hover,
.home-page .hero-btns .btn-outline-white:hover {
  transform: translateY(-2px);
}

.hero-proof-row {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px auto 0;
}

.hero-proof-row span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.68);
  font-size: 12.5px;
  font-weight: 650;
}

.hero-proof-row strong {
  color: #fff;
  font-weight: 850;
}

.home-page .hero-terminal {
  width: min(920px, calc(100vw - 32px));
  margin-top: 42px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(15,23,42,.86);
  box-shadow:
    0 30px 90px rgba(0,0,0,.38),
    0 0 0 1px rgba(255,255,255,.04),
    inset 0 1px 0 rgba(255,255,255,.08);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.home-page .ht-bar {
  background: rgba(2,6,23,.78);
  border-bottom-color: rgba(255,255,255,.1);
}

.home-page .ht-title {
  color: rgba(255,255,255,.58);
  font-weight: 650;
}

.home-page .ht-body {
  padding: 20px 24px;
  text-align: left;
}

.home-page .ht-prompt {
  color: #22c55e;
}

.home-page .ht-cmd {
  color: #dbeafe;
}

.home-page .ht-out {
  color: #86efac;
}

.home-page .hero-tags {
  max-width: 860px;
  margin: 26px auto 0;
}

.home-page .hero-tags span {
  border-radius: 999px;
  color: rgba(255,255,255,.62);
  background: rgba(255,255,255,.055);
  border-color: rgba(255,255,255,.12);
}

.home-page .stats-bar {
  margin: -1px auto 0;
  padding: 20px 18px;
  background: #ffffff;
  border-bottom: 1px solid var(--home-line);
  box-shadow: 0 14px 50px rgba(15,23,42,.08);
}

.home-page .stat-item {
  color: var(--home-ink);
  min-width: 150px;
  border-right-color: rgba(15,23,42,.1);
}

.home-page .stat-num {
  color: var(--home-blue);
  text-shadow: none;
}

.home-page .stat-label {
  color: var(--home-muted);
  opacity: 1;
}

.home-page section:not(.hero):not(.newsletter-section):not(.cta-banner),
.home-page .quick-search-section {
  position: relative;
}

.home-page .section-head {
  max-width: 780px;
  margin-left: auto;
  margin-right: auto;
}

.home-page .section-head .badge {
  border-radius: 999px;
  padding: 6px 12px;
  background: rgba(37,99,235,.08);
  color: #1d4ed8;
  border-color: rgba(37,99,235,.16);
}

.home-page .section-head h2 {
  font-size: clamp(30px, 4vw, 48px);
  letter-spacing: -0.045em;
  line-height: 1.04;
  text-wrap: balance;
}

.home-page .section-head p {
  max-width: 690px;
  color: var(--home-muted);
  font-size: 16.5px;
}

.home-page .section-divider {
  width: 74px;
  height: 3px;
  background: linear-gradient(90deg, var(--home-blue), var(--home-green), var(--home-amber));
}

.home-page .quick-search-section {
  padding: 54px 22px;
  background:
    linear-gradient(90deg, rgba(37,99,235,.06), rgba(16,185,129,.06)),
    #f8fafc;
  border-top: 1px solid rgba(15,23,42,.06);
  border-bottom: 1px solid rgba(15,23,42,.06);
}

.home-page .quick-search-inner {
  max-width: 760px;
}

.home-page .quick-search-inner h3 {
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.035em;
}

.home-page .quick-search-bar,
.home-page .newsletter-form {
  border-radius: 8px;
  border: 1px solid rgba(15,23,42,.1);
  box-shadow: 0 18px 45px rgba(15,23,42,.08);
}

.home-page #qs-btn,
.home-page .newsletter-form button,
.home-page .fnl-form button {
  border-radius: 6px;
}

.home-page .platform-features-section,
.home-page .why-section,
.home-page .faq-section {
  background:
    radial-gradient(circle at 12% 0%, rgba(37,99,235,.06), transparent 26rem),
    radial-gradient(circle at 88% 10%, rgba(16,185,129,.06), transparent 28rem),
    #f7f9fc;
}

.home-page .pf-grid,
.home-page .features-grid,
.home-page .testi-grid,
.home-page .courses-grid {
  gap: 18px;
}

.home-page .pf-card,
.home-page .feature-card,
.home-page .big-card,
.home-page .howto-card,
.home-page .testi-card,
.home-page .devkit-card,
.home-page .tool-pill,
.home-page .roadmap-col,
.home-page .faq-item,
.home-page .pf-editor-preview {
  border-radius: 8px;
  border: 1px solid rgba(15,23,42,.09);
  background: var(--home-panel);
  box-shadow: 0 16px 42px rgba(15,23,42,.07);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.home-page .pf-card:hover,
.home-page .feature-card:hover,
.home-page .big-card:hover,
.home-page .howto-card:hover,
.home-page .testi-card:hover,
.home-page .devkit-card:hover,
.home-page .tool-pill:hover {
  transform: translateY(-4px);
  border-color: rgba(37,99,235,.2);
  box-shadow: 0 24px 60px rgba(15,23,42,.12);
}

.home-page .pf-card--hero {
  background:
    linear-gradient(135deg, rgba(37,99,235,.08), rgba(16,185,129,.06)),
    var(--home-panel-strong);
}

.home-page .pf-card-badge,
.home-page .badge-level,
.home-page .pf-cta,
.home-page .howto-more {
  border-radius: 999px;
}

.home-page .pf-icon-wrap,
.home-page .feature-card .f-icon,
.home-page .ci,
.home-page .rch-icon,
.home-page .tp-icon {
  border-radius: 8px;
}

.home-page .pf-card h3,
.home-page .feature-card h3,
.home-page .big-card h3,
.home-page .howto-card h4,
.home-page .devkit-card h3 {
  letter-spacing: -0.02em;
}

.home-page .pf-list {
  padding-left: 0;
  list-style: none;
}

.home-page .pf-list li {
  display: flex;
  gap: 8px;
  margin-bottom: 7px;
}

.home-page .pf-editor-preview {
  overflow: hidden;
  background: #0f172a;
  border-color: rgba(255,255,255,.12);
  box-shadow: 0 24px 70px rgba(15,23,42,.25);
}

.home-page .pfe-bar,
.home-page .pfe-statusbar {
  background: #111827;
  border-color: rgba(255,255,255,.1);
}

.home-page .pfe-body {
  background:
    linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
    #0b1220;
  background-size: 100% 26px;
}

.home-page .tech-ticker {
  border-top: 1px solid rgba(255,255,255,.08);
  border-bottom: 1px solid rgba(255,255,255,.08);
  background: #0b1220;
}

.home-page .tt-track span {
  color: rgba(255,255,255,.68);
}

.home-page .testimonials {
  background:
    radial-gradient(circle at 50% 0%, rgba(245,158,11,.08), transparent 24rem),
    #ffffff;
}

.home-page .testi-avatar {
  border-radius: 8px;
  background: linear-gradient(135deg, var(--home-blue), var(--home-green));
}

.home-page .newsletter-section,
.home-page .cta-banner {
  border-radius: 0;
  background:
    radial-gradient(circle at 18% 20%, rgba(34,211,238,.2), transparent 25rem),
    radial-gradient(circle at 85% 10%, rgba(16,185,129,.18), transparent 23rem),
    linear-gradient(135deg, #0f172a 0%, #111827 52%, #052e2b 100%);
}

.home-page .newsletter-section h2,
.home-page .cta-banner h2 {
  letter-spacing: -0.045em;
}

.home-page .newsletter-form {
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.14);
}

.home-page .newsletter-form input[type="email"] {
  border-radius: 6px;
  border-width: 1px;
}

.home-page footer {
  background:
    linear-gradient(180deg, #080b12, #05070c);
  border-top: 1px solid rgba(255,255,255,.08);
}

[data-theme="dark"] .home-page {
  background:
    radial-gradient(circle at 10% 0%, rgba(37,99,235,.12), transparent 28rem),
    radial-gradient(circle at 90% 10%, rgba(16,185,129,.1), transparent 30rem),
    #080b12;
}

[data-theme="dark"] .home-page .stats-bar,
[data-theme="dark"] .home-page .quick-search-section,
[data-theme="dark"] .home-page .platform-features-section,
[data-theme="dark"] .home-page .why-section,
[data-theme="dark"] .home-page .faq-section,
[data-theme="dark"] .home-page .testimonials {
  background: #0b1020;
}

[data-theme="dark"] .home-page .pf-card,
[data-theme="dark"] .home-page .feature-card,
[data-theme="dark"] .home-page .big-card,
[data-theme="dark"] .home-page .howto-card,
[data-theme="dark"] .home-page .testi-card,
[data-theme="dark"] .home-page .devkit-card,
[data-theme="dark"] .home-page .tool-pill,
[data-theme="dark"] .home-page .roadmap-col,
[data-theme="dark"] .home-page .faq-item {
  background: rgba(17,24,39,.86);
  border-color: rgba(255,255,255,.08);
  box-shadow: 0 18px 52px rgba(0,0,0,.3);
}

[data-theme="dark"] .home-page .stat-item {
  color: #e5e7eb;
  border-right-color: rgba(255,255,255,.1);
}

[data-theme="dark"] .home-page .stat-label,
[data-theme="dark"] .home-page .section-head p {
  color: rgba(229,231,235,.66);
}

@media (max-width: 900px) {
  .home-page .hero {
    min-height: auto;
    padding-top: 72px;
  }
  .home-page .stats-bar {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .home-page .stat-item {
    border-right: none;
    padding: 10px;
  }
}

@media (max-width: 640px) {
  .home-page .hero {
    padding: 58px 16px 46px;
  }
  .home-page .hero h1 {
    font-size: clamp(38px, 13vw, 54px);
  }
  .home-page .hero-btns {
    display: grid;
    grid-template-columns: 1fr;
  }
  .hero-proof-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    max-width: 420px;
  }
  .hero-proof-row span {
    justify-content: center;
  }
  .home-page .hero-terminal {
    margin-top: 28px;
  }
  .home-page .ht-body {
    padding: 16px;
    font-size: 12px;
  }
  .home-page .stats-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .home-page .pf-card,
  .home-page .feature-card,
  .home-page .big-card,
  .home-page .howto-card,
  .home-page .testi-card {
    box-shadow: 0 12px 30px rgba(15,23,42,.08);
  }
}

/* ============================================================
   Professional UI Polish Layer
   ============================================================ */
:root {
  --pro-surface: rgba(255,255,255,.92);
  --pro-surface-solid: #ffffff;
  --pro-surface-muted: #f7f9fc;
  --pro-border: rgba(15,23,42,.10);
  --pro-border-strong: rgba(15,23,42,.16);
  --pro-shadow-xs: 0 1px 2px rgba(15,23,42,.05);
  --pro-shadow-sm: 0 8px 24px rgba(15,23,42,.07);
  --pro-shadow-md: 0 18px 44px rgba(15,23,42,.10);
  --pro-shadow-lg: 0 28px 70px rgba(15,23,42,.14);
  --pro-focus: 0 0 0 4px rgba(26,115,232,.18);
  --pro-success: #0f9f6e;
  --pro-warning: #d97706;
}

[data-theme="dark"] {
  --pro-surface: rgba(21,23,39,.90);
  --pro-surface-solid: #151827;
  --pro-surface-muted: #101321;
  --pro-border: rgba(148,163,184,.18);
  --pro-border-strong: rgba(148,163,184,.28);
  --pro-shadow-xs: 0 1px 2px rgba(0,0,0,.28);
  --pro-shadow-sm: 0 8px 24px rgba(0,0,0,.34);
  --pro-shadow-md: 0 18px 44px rgba(0,0,0,.42);
  --pro-shadow-lg: 0 28px 70px rgba(0,0,0,.55);
  --pro-focus: 0 0 0 4px rgba(79,156,249,.22);
}

body {
  text-rendering: optimizeLegibility;
  background:
    linear-gradient(180deg, rgba(248,250,252,.98) 0%, rgba(255,255,255,1) 360px),
    var(--bg);
}

[data-theme="dark"] body {
  background:
    linear-gradient(180deg, rgba(13,16,30,.98) 0%, rgba(9,11,20,1) 360px),
    var(--bg);
}

::selection {
  background: rgba(26,115,232,.18);
  color: var(--text-dark);
}

:focus-visible {
  outline: 2px solid rgba(26,115,232,.72);
  outline-offset: 3px;
}

[data-theme="dark"] :focus-visible {
  outline-color: rgba(79,156,249,.78);
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 10000;
  transform: translateY(-160%);
  background: #fff;
  color: #0f172a;
  border: 2px solid rgba(26,115,232,.72);
  border-radius: 8px;
  padding: 9px 14px;
  font-weight: 800;
  box-shadow: 0 16px 36px rgba(15,23,42,.22);
  transition: transform .18s ease, box-shadow .18s ease;
}

.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
  text-decoration: none;
}

[data-theme="dark"] .skip-link {
  background: #101827;
  color: #f8fafc;
  border-color: rgba(79,156,249,.82);
}

body.nav-open,
body.search-open {
  overflow: hidden;
}

.top-nav {
  min-height: var(--header-h);
  border-bottom: 1px solid rgba(255,255,255,.10);
  background: rgba(13,16,28,.94);
  box-shadow: 0 14px 34px rgba(2,6,23,.24);
}

.top-nav.scrolled {
  background: rgba(10,13,22,.98);
  box-shadow: 0 18px 42px rgba(2,6,23,.32);
}

.top-nav .logo,
.top-nav .logo .logo-badge,
.nav-links a,
.nav-drop-btn,
.btn,
.btn-outline-white,
.btn-signin,
.btn-dark-toggle,
.btn-nav-search {
  letter-spacing: 0;
}

.nav-links a,
.nav-drop-btn {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 999px;
}

.nav-links a::after {
  display: none;
}

.nav-links a:hover,
.nav-links a.active,
.nav-drop-btn:hover,
.nav-drop-btn.active {
  background: rgba(26,115,232,.18);
  border-color: rgba(79,156,249,.24);
  color: #fff;
}

.mobile-menu {
  background: rgba(13,16,30,.98);
  border-top: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 24px 48px rgba(2,6,23,.34);
}

.mobile-menu a {
  border: 1px solid transparent;
  border-bottom-color: rgba(255,255,255,.07);
}

.mobile-menu a:hover,
.mobile-menu a.active {
  background: rgba(26,115,232,.18);
  border-color: rgba(79,156,249,.28);
}

:is(.btn, .btn-outline-white, .btn-signin, .btn-dark-toggle, .btn-nav-search, .btn-copy) {
  border-radius: 999px;
  transition:
    background-color .18s ease,
    border-color .18s ease,
    color .18s ease,
    box-shadow .18s ease,
    transform .18s ease,
    filter .18s ease;
}

.btn {
  box-shadow: var(--pro-shadow-xs);
}

.btn-primary {
  background: linear-gradient(135deg, #1a73e8 0%, #0d86d6 52%, #0f9f6e 118%);
  box-shadow: 0 14px 30px rgba(26,115,232,.22);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 36px rgba(26,115,232,.28);
  filter: none;
}

.btn-outline,
.btn-outline-white,
.btn-signin {
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}

.btn-outline:hover,
.btn-outline-white:hover,
.btn-signin:hover,
.btn-copy:hover {
  transform: translateY(-1px);
}

.btn:disabled,
.btn[aria-disabled="true"],
button:disabled {
  transform: none !important;
  box-shadow: none !important;
  cursor: not-allowed;
}

:is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="color"]), select, textarea) {
  border-radius: 14px;
}

:is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="color"]), select, textarea):focus {
  outline: none;
  border-color: rgba(26,115,232,.56);
  box-shadow: var(--pro-focus);
}

.quick-search,
.ref-search-bar input,
.footer-newsletter input,
.newsletter-form input {
  border: 1px solid var(--pro-border);
  background: var(--pro-surface);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7), var(--pro-shadow-xs);
}

.quick-search:focus-within,
.ref-search-bar:focus-within,
.footer-newsletter:focus-within,
.newsletter-form:focus-within {
  border-color: rgba(26,115,232,.42);
  box-shadow: var(--pro-focus);
}

:is(.pf-card, .feature-card, .big-card, .howto-card, .testi-card, .devkit-card, .tool-pill, .roadmap-col, .faq-item, .note-box, .lesson-card, .topic-card, .reference-card, .course-card, .quick-card, .card) {
  border-radius: 18px;
}

:is(.pf-card, .feature-card, .big-card, .howto-card, .testi-card, .devkit-card, .roadmap-col, .faq-item, .note-box) {
  border-color: var(--pro-border);
  box-shadow: var(--pro-shadow-sm);
}

:is(.pf-card, .feature-card, .big-card, .howto-card, .testi-card, .devkit-card, .roadmap-col, .faq-item):hover {
  border-color: var(--pro-border-strong);
  box-shadow: var(--pro-shadow-md);
}

.section-head h2,
.home-page .hero h1,
.home-page .section-head h2,
.tutorial-title,
.page-title {
  letter-spacing: 0;
}

.data-table,
.ref-table {
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--pro-border);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--pro-shadow-sm);
  background: var(--pro-surface-solid);
}

.data-table th,
.ref-table th {
  background: linear-gradient(180deg, #192033, #101522);
  color: rgba(255,255,255,.94);
  letter-spacing: 0;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.data-table td,
.ref-table td {
  border-bottom: 1px solid var(--pro-border);
}

.data-table tr:nth-child(even) td,
.ref-table tr:nth-child(even) td {
  background: rgba(248,250,252,.72);
}

.data-table tr:hover td,
.ref-table tr:hover td {
  background: rgba(26,115,232,.07);
}

[data-theme="dark"] .data-table,
[data-theme="dark"] .ref-table {
  background: var(--pro-surface-solid);
  border-color: var(--pro-border);
}

[data-theme="dark"] .data-table th,
[data-theme="dark"] .ref-table th {
  background: linear-gradient(180deg, #1b2034, #111522);
}

[data-theme="dark"] .data-table tr:nth-child(even) td,
[data-theme="dark"] .ref-table tr:nth-child(even) td {
  background: rgba(255,255,255,.025);
}

[data-theme="dark"] .data-table tr:hover td,
[data-theme="dark"] .ref-table tr:hover td {
  background: rgba(79,156,249,.10);
}

.code-box,
.example-box,
.output-box,
pre:not(.CodeMirror-line) {
  border-radius: 8px;
}

.footer,
footer {
  border-top: 1px solid rgba(255,255,255,.08);
  background:
    linear-gradient(180deg, #101827 0%, #090d18 100%);
}

.footer-col h4,
.footer-logo,
.footer-bottom b {
  letter-spacing: 0;
}

.footer-social a,
.footer-bottom-links a {
  border-radius: 999px;
}

@media (max-width: 900px) {
  .top-nav {
    padding-inline: 16px;
  }

  .nav-right {
    gap: 6px;
  }

  .nav-auth-fallback .btn,
  .nav-auth-fallback .btn-signin {
    display: none;
  }

  .nav-account-copy,
  .nav-account-caret {
    display: none;
  }

  .nav-account-trigger {
    width: 38px;
    min-width: 38px;
    padding: 4px;
    justify-content: center;
  }

  .public-notification-btn {
    width: 38px;
    height: 38px;
  }

  .data-table,
  .ref-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 640px) {
  .btn,
  .btn-outline-white {
    justify-content: center;
    min-height: 42px;
  }

  .footer-inner {
    gap: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  :is(.btn, .btn-outline-white, .btn-signin, .btn-dark-toggle, .btn-nav-search, .pf-card, .feature-card, .big-card, .howto-card, .testi-card, .devkit-card, .roadmap-col, .faq-item) {
    transition: none !important;
  }
}

/* ============================================================
   Installable App Prompt
   ============================================================ */
.pwa-install-card {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 1200;
  width: min(390px, calc(100vw - 28px));
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(148,163,184,.24);
  border-radius: 8px;
  background: rgba(13,17,31,.96);
  color: #fff;
  box-shadow: 0 24px 70px rgba(2,6,23,.36);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}

.pwa-install-card.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.pwa-install-mark {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #1a73e8, #0f9f6e);
  color: #fff;
  font-size: 15px;
  font-weight: 900;
}

.pwa-install-copy {
  min-width: 0;
}

.pwa-install-copy strong,
.pwa-install-copy span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pwa-install-copy strong {
  font-size: 13px;
  line-height: 1.25;
}

.pwa-install-copy span {
  margin-top: 3px;
  color: rgba(226,232,240,.72);
  font-size: 12px;
}

.pwa-install-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pwa-install-btn,
.pwa-install-close {
  min-height: 34px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  font: inherit;
}

.pwa-install-btn {
  padding: 0 12px;
  background: #1a73e8;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.pwa-install-close {
  width: 34px;
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.74);
  font-size: 18px;
  line-height: 1;
}

.pwa-install-btn:hover,
.pwa-install-close:hover {
  filter: brightness(1.08);
}

@media (max-width: 640px) {
  .pwa-install-card {
    left: 14px;
    right: 14px;
    bottom: 14px;
    width: auto;
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .pwa-install-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }
}
.spin-demo { width: 50px; height: 50px; border: 5px solid #e0e0e0; border-top-color: #04aa6d; border-radius: 50%; animation: spin 1s linear infinite; margin: 10px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.newsletter-success { color: #fff; font-weight: 700; font-size: 15px; }


/* EduSmartUp platform: the main site's base reset (layer legacy) sets ul { list-style: none }.
   The original Developers site relied on browser-default bullets in tutorial content. */
.main-content ul { list-style: disc; }
.main-content ol { list-style: decimal; }
