/* ============================================================
   AIHub — styles.css  (v2 — mobile-first, tight, smooth)
   ============================================================ */

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

:root {
  /* colours */
  --bg:      #07070d;
  --bg2:     #0d0d16;
  --bg3:     #101019;
  --surf:    #13131e;
  --surf2:   #1a1a28;
  --border:  rgba(255,255,255,0.07);
  --border2: rgba(255,255,255,0.13);
  --text:    #e4e4f0;
  --text2:   #8888a8;
  --accent:  #6366f1;
  --accent2: #818cf8;
  --grad:    linear-gradient(135deg,#6366f1,#8b5cf6,#06b6d4);
  /* sizing */
  --nav-h:   60px;
  --r:       12px;
  --r-sm:    8px;
  --sh:      0 4px 20px rgba(0,0,0,.45);
  --sh-lg:   0 8px 40px rgba(0,0,0,.55);
  /* fonts */
  --font:    'Inter', system-ui, sans-serif;
  --fdsp:    'Space Grotesk', system-ui, sans-serif;
  /* transitions */
  --ease:    cubic-bezier(.22,.68,0,1.2);
  --ease-out:cubic-bezier(.16,1,.3,1);
}

/* light theme */
[data-theme="light"] {
  --bg:      #f8f8fc;
  --bg2:     #f0f0f8;
  --bg3:     #eaeaf4;
  --surf:    #ffffff;
  --surf2:   #f4f4fb;
  --border:  rgba(0,0,0,0.08);
  --border2: rgba(0,0,0,0.15);
  --text:    #111120;
  --text2:   #55556a;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* scrollbar */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--surf2); border-radius: 3px; }

/* ============================================================ PROGRESS BAR */
.progress-bar {
  position: fixed; top: 0; left: 0; z-index: 200;
  height: 2.5px; width: 0%;
  background: var(--grad);
  transition: width .1s linear;
  pointer-events: none;
}

/* ============================================================ TOAST */
.toast-container {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  z-index: 300; display: flex; flex-direction: column; gap: 8px;
  pointer-events: none;
}
.toast {
  background: var(--surf2); border: 1px solid var(--border2);
  color: var(--text); padding: 10px 20px; border-radius: 100px;
  font-size: .82rem; font-weight: 500;
  box-shadow: var(--sh); white-space: nowrap;
  animation: toastIn .3s var(--ease-out);
  pointer-events: all;
}
.toast.out { animation: toastOut .25s ease forwards; }
@keyframes toastIn  { from { opacity:0; transform:translateY(12px) scale(.95); } to { opacity:1; transform:none; } }
@keyframes toastOut { to   { opacity:0; transform:translateY(8px) scale(.95); } }

/* ============================================================ BACK TO TOP */
.back-top {
  position: fixed; bottom: 28px; right: 20px; z-index: 100;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--surf2); border: 1px solid var(--border2);
  color: var(--text2); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--sh);
  opacity: 0; transform: translateY(12px) scale(.9);
  transition: opacity .25s, transform .25s var(--ease), background .2s, color .2s;
  pointer-events: none;
}
.back-top.show { opacity: 1; transform: none; pointer-events: all; }
.back-top:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ============================================================ NAVBAR */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 99;
  height: var(--nav-h);
  background: rgba(7,7,13,.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow .3s, background .3s;
}
[data-theme="light"] .navbar { background: rgba(248,248,252,.88); }
.navbar.scrolled { box-shadow: var(--sh); }

.nav-container {
  max-width: 1260px; margin: 0 auto;
  padding: 0 16px; height: 100%;
  display: flex; align-items: center; gap: 24px;
}
.nav-logo {
  display: flex; align-items: center; gap: 7px;
  text-decoration: none; font-family: var(--fdsp);
  font-size: 1.15rem; font-weight: 600; color: var(--text);
  white-space: nowrap; flex-shrink: 0;
}
.nav-logo strong { color: var(--accent2); }
.logo-icon { background: var(--grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; font-size: .8rem; }

.nav-links { display: flex; gap: 2px; flex: 1; }
.nav-links a {
  padding: 5px 11px; border-radius: var(--r-sm);
  text-decoration: none; color: var(--text2);
  font-size: .85rem; font-weight: 500;
  transition: color .15s, background .15s;
}
.nav-links a:hover { color: var(--text); background: var(--surf); }

.nav-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }

.icon-btn {
  width: 36px; height: 36px; border-radius: var(--r-sm);
  background: none; border: 1px solid var(--border);
  color: var(--text2); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: border-color .15s, color .15s, background .15s;
  flex-shrink: 0;
}
.icon-btn:hover { border-color: var(--border2); color: var(--text); background: var(--surf); }

/* theme toggle icons */
[data-theme="dark"]  .icon-sun  { display: block; }
[data-theme="dark"]  .icon-moon { display: none; }
[data-theme="light"] .icon-sun  { display: none; }
[data-theme="light"] .icon-moon { display: block; }

.nav-cta { flex-shrink: 0; }
.btn-primary {
  background: var(--grad); color: #fff;
  border: none; padding: 7px 16px;
  border-radius: var(--r-sm); font-size: .855rem; font-weight: 600;
  cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center;
  transition: opacity .15s, transform .15s var(--ease);
}
.btn-primary:hover { opacity: .88; transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0) scale(.97); }
.btn-primary.btn-lg { padding: 11px 24px; font-size: .95rem; border-radius: var(--r); }

.btn-ghost {
  background: transparent; color: var(--text2);
  border: 1px solid var(--border2);
  padding: 7px 16px; border-radius: var(--r-sm);
  font-size: .855rem; font-weight: 500; cursor: pointer;
  text-decoration: none;
  display: inline-flex; align-items: center; gap: 7px;
  transition: border-color .15s, color .15s, background .15s;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--text); }
.btn-ghost.btn-lg { padding: 11px 24px; font-size: .95rem; border-radius: var(--r); }

/* hamburger */
.hamburger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 6px; flex-shrink: 0;
}
.hamburger span { display: block; width: 20px; height: 2px; background: var(--text2); border-radius: 2px; transition: all .3s; }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* mobile overlay */
.mobile-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.5); z-index: 97;
  backdrop-filter: blur(4px);
  opacity: 0; transition: opacity .25s;
}
.mobile-overlay.open { display: block; opacity: 1; }

/* Search dropdown */
.search-drop {
  position: fixed; top: var(--nav-h); left: 0; right: 0;
  background: var(--bg2); border-bottom: 1px solid var(--border);
  z-index: 98; padding: 12px 16px 16px;
  transform: translateY(-6px); opacity: 0;
  transition: transform .2s var(--ease-out), opacity .2s;
  pointer-events: none;
}
.search-drop.open { transform: translateY(0); opacity: 1; pointer-events: all; }
.search-inner {
  max-width: 620px; margin: 0 auto;
  display: flex; align-items: center; gap: 10px;
  background: var(--surf); border: 1px solid var(--border2);
  border-radius: var(--r); padding: 9px 14px;
}
.search-inner svg { color: var(--text2); flex-shrink: 0; }
.search-inner input {
  flex: 1; background: none; border: none; outline: none;
  color: var(--text); font-size: .92rem; font-family: var(--font);
}
.search-inner input::placeholder { color: var(--text2); }
.search-inner kbd {
  font-size: .68rem; background: var(--surf2);
  border: 1px solid var(--border); border-radius: 4px;
  padding: 2px 6px; color: var(--text2); flex-shrink: 0;
}
.search-results { max-width: 620px; margin: 6px auto 0; }
.sri {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 12px; border-radius: var(--r-sm);
  cursor: pointer; text-decoration: none;
  transition: background .15s;
}
.sri:hover { background: var(--surf); }
.sri strong { color: var(--text); font-size: .875rem; }
.sri span   { color: var(--text2); font-size: .78rem; margin-left: auto; }

/* ============================================================ HERO */
.hero {
  position: relative; overflow: hidden;
  padding: calc(var(--nav-h) + 52px) 16px 52px;
  min-height: 92vh; display: flex; align-items: center;
}
.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(99,102,241,.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99,102,241,.055) 1px, transparent 1px);
  background-size: 44px 44px;
}
.orb {
  position: absolute; border-radius: 50%;
  filter: blur(72px); opacity: .28;
  animation: orbf 9s ease-in-out infinite;
}
.orb1 { width: 520px; height: 520px; background: radial-gradient(circle,#6366f1,transparent); top: -180px; right: -80px; }
.orb2 { width: 340px; height: 340px; background: radial-gradient(circle,#06b6d4,transparent); bottom: -60px; left: -40px; animation-delay: -4s; }
@keyframes orbf {
  0%,100% { transform: translate(0,0); }
  40%  { transform: translate(16px,-16px); }
  70%  { transform: translate(-12px,12px); }
}

.hero-inner {
  position: relative; z-index: 1;
  max-width: 1260px; margin: 0 auto; width: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 32px;
}
.hero-content { max-width: 580px; width: 100%; }

.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(99,102,241,.1); border: 1px solid rgba(99,102,241,.22);
  color: var(--accent2); padding: 5px 13px; border-radius: 100px;
  font-size: .78rem; font-weight: 500; margin-bottom: 20px;
}
.live-dot {
  width: 6px; height: 6px; border-radius: 50%; background: #22d3ee;
  animation: livep 2s ease-in-out infinite;
}
@keyframes livep { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.5;transform:scale(.75)} }

.hero-content h1 {
  font-family: var(--fdsp);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700; line-height: 1.15;
  letter-spacing: -.03em; color: #f0f0ff; margin-bottom: 16px;
}
/* gradient text always starts its own line inside headings */
h1 .gradient-text { display: block; }
.gradient-text {
  background: var(--grad);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero-sub {
  font-size: 1.05rem; color: var(--text2); line-height: 1.7;
  margin-bottom: 28px; max-width: 460px;
}
.hero-btns { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 36px; }

.hero-stats { display: flex; align-items: center; gap: 0; flex-wrap: wrap; }
.hstat { padding: 0 18px; text-align: center; }
.hstat:first-child { padding-left: 0; }
.hstat-n { display: inline; font-family: var(--fdsp); font-size: 1.4rem; font-weight: 700; color: var(--text); }
.hstat span { font-family: var(--fdsp); font-size: 1.2rem; font-weight: 700; color: var(--accent2); }
.hstat small { display: block; font-size: .72rem; color: var(--text2); margin-top: 2px; }
.hstat-sep { width: 1px; height: 28px; background: var(--border); }

/* neural net canvas area */
.hero-visual { display: none; width: 340px; height: 340px; flex-shrink: 0; }
.neural-wrap { width: 100%; height: 100%; }
/* Centre hero when neural-net panel is hidden */
@media (max-width: 1023px) {
  .hero-inner   { justify-content: center; }
  .hero-content { text-align: center; max-width: 660px; }
  .hero-btns    { justify-content: center; }
  .hero-stats   { justify-content: center; }
  .hero-badge   { margin-left: auto; margin-right: auto; }
  .hero-sub     { margin-left: auto; margin-right: auto; }
}
@media (min-width: 1024px) { .hero-visual { display: block; } }

/* ============================================================ TICKER */
.ticker-wrap {
  overflow: hidden;
  background: var(--surf); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  padding: 10px 0; user-select: none;
}
.ticker-track { display: flex; width: max-content; animation: tick 38s linear infinite; }
.ticker-track:hover { animation-play-state: paused; }
.ticker-items { display: flex; gap: 28px; padding-right: 28px; white-space: nowrap; }
.ticker-items span { font-size: .8rem; font-weight: 500; color: var(--text2); }
.ticker-items .dot { color: var(--accent); font-size: .45rem; line-height: 2.2; }
@keyframes tick { 0%{transform:translateX(0)} 100%{transform:translateX(-50%)} }

/* ============================================================ SECTIONS */
.section { padding: 72px 0; }
.section-alt { background: var(--bg2); }
.container { max-width: 1260px; margin: 0 auto; padding: 0 16px; }

.section-head { text-align: center; margin-bottom: 40px; }
.section-tag {
  display: inline-block;
  background: rgba(99,102,241,.1); border: 1px solid rgba(99,102,241,.2);
  color: var(--accent2); padding: 3px 12px; border-radius: 100px;
  font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; margin-bottom: 12px;
}
.section-head h2 {
  font-family: var(--fdsp); font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 700; color: #f0f0ff; margin-bottom: 10px; letter-spacing: -.02em;
}
[data-theme="light"] .section-head h2 { color: #111120; }
.section-head p { color: var(--text2); font-size: .97rem; max-width: 500px; margin: 0 auto; }

/* ============================================================ REVEAL ANIMATION */
.reveal {
  opacity: 0; transform: translateY(22px);
  transition: opacity .55s var(--ease-out), transform .55s var(--ease-out);
}
.reveal.in { opacity: 1; transform: translateY(0); }

/* ============================================================ FILTER TABS */
.filter-tabs { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin-bottom: 32px; }
.ftab {
  background: var(--surf); border: 1px solid var(--border);
  color: var(--text2); padding: 6px 15px; border-radius: 100px;
  font-size: .82rem; font-weight: 500; cursor: pointer;
  font-family: var(--font); transition: all .18s;
}
.ftab:hover { border-color: var(--border2); color: var(--text); }
.ftab.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ============================================================ TOPIC CARDS */
.topics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 14px;
}
.tcard {
  background: var(--surf); border: 1px solid var(--border);
  border-radius: var(--r); padding: 20px;
  display: flex; flex-direction: column; gap: 10px;
  cursor: default; position: relative; overflow: hidden;
  transition: border-color .2s, transform .2s var(--ease), box-shadow .2s;
}
.tcard::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(99,102,241,.06), transparent 70%);
  opacity: 0; transition: opacity .3s;
}
.tcard:hover { border-color: var(--border2); transform: translateY(-3px); box-shadow: var(--sh-lg); }
.tcard:hover::after { opacity: 1; }
.tcard.featured { border-color: rgba(99,102,241,.25); }
.tcard.hidden { display: none; }

.tcard-top { display: flex; align-items: center; gap: 10px; }
.tcard-icon {
  width: 38px; height: 38px; border-radius: 9px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--c) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--c) 20%, transparent);
}
.tcard-icon svg { width: 20px; height: 20px; stroke: var(--c); }
.tcard-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tcard-cat { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--c); }
.badge-hot { font-size: .64rem; background: linear-gradient(135deg,#f43f5e,#f97316); color:#fff; padding:2px 7px; border-radius:100px; font-weight:700; }
.badge-new { font-size: .64rem; background: rgba(6,182,212,.15); color:#22d3ee; padding:2px 7px; border-radius:100px; font-weight:700; border:1px solid rgba(6,182,212,.25); }

.tcard h3 { font-family: var(--fdsp); font-size: .97rem; font-weight: 600; color: var(--text); }
.tcard p  { font-size: .83rem; color: var(--text2); line-height: 1.6; }
.chips { display: flex; gap: 5px; flex-wrap: wrap; }
.chips span {
  font-size: .7rem; background: var(--surf2); border: 1px solid var(--border);
  color: var(--text2); padding: 2px 8px; border-radius: 100px;
}

.no-results { display: none; text-align: center; padding: 48px 0; color: var(--text2); font-size: .9rem; }
.no-results button { background: none; border: none; color: var(--accent2); cursor: pointer; text-decoration: underline; }

/* ============================================================ MODEL CARDS */
.models-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.mcard {
  background: var(--surf); border: 1px solid var(--border);
  border-radius: var(--r); padding: 20px;
  transition: border-color .2s, transform .2s var(--ease), box-shadow .2s;
}
.mcard:hover { border-color: var(--border2); transform: translateY(-2px); box-shadow: var(--sh); }
.mcard-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.mlogo {
  width: 40px; height: 40px; border-radius: 9px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1rem; color: #fff;
}
.mname { font-family: var(--fdsp); font-size: .9rem; font-weight: 600; color: var(--text); }
.mmake { font-size: .74rem; color: var(--text2); margin-top: 1px; }
.mbadge {
  margin-left: auto; font-size: .68rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; background: rgba(99,102,241,.12);
  border: 1px solid rgba(99,102,241,.22); color: var(--accent2);
  padding: 2px 8px; border-radius: 100px;
}
.mcard > p { font-size: .83rem; color: var(--text2); line-height: 1.6; margin-bottom: 12px; }
.mbar-wrap {
  display: flex; align-items: center; gap: 8px; margin-top: 10px;
}
.mbar {
  flex: 1; height: 3.5px; background: var(--surf2); border-radius: 2px;
  position: relative; overflow: hidden;
}
.mbar::after {
  content: ''; position: absolute; inset: 0;
  background: var(--grad); border-radius: 2px;
  width: var(--w, 0%);
  transform: scaleX(0); transform-origin: left;
  transition: transform 1s var(--ease-out) .2s;
}
.mbar.animated::after { transform: scaleX(1); }
.mbar-wrap > span { font-size: .72rem; color: var(--text2); font-weight: 600; flex-shrink: 0; }

/* ============================================================ TOOL CATEGORIES */
.tools-table-heading {
  font-family: var(--fdsp); font-size: 1rem; font-weight: 600;
  color: var(--text); margin: 32px 0 12px;
  padding-left: 4px;
}
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.tool-cat {
  background: var(--surf); border: 1px solid var(--border);
  border-radius: var(--r); padding: 20px;
  transition: border-color .2s;
}
.tool-cat:hover { border-color: var(--border2); }
.tool-cat-title {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--fdsp); font-size: .88rem; font-weight: 600;
  color: var(--text); margin-bottom: 14px;
  padding-bottom: 12px; border-bottom: 1px solid var(--border);
}
.tool-cat-title svg { width: 15px; height: 15px; color: var(--accent2); flex-shrink: 0; }
.tool-list { display: flex; flex-direction: column; }
.ti {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 4px; border-radius: var(--r-sm);
  transition: background .12s;
}
.ti:hover { background: var(--surf2); }
.ti span  { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.ti b     { font-size: .83rem; font-weight: 500; color: var(--text); flex-shrink: 0; }
.ti em    { font-size: .76rem; color: var(--text2); margin-left: auto; font-style: normal; }

/* ============================================================ GLOSSARY */
.gloss-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}
.gitem {
  background: var(--surf); border: 1px solid var(--border);
  border-radius: var(--r); padding: 16px;
  position: relative; cursor: default;
  transition: border-color .2s, box-shadow .2s;
}
.gitem:hover { border-color: var(--border2); box-shadow: var(--sh); }
.gitem strong { display: block; font-family: var(--fdsp); font-size: .87rem; color: var(--accent2); margin-bottom: 6px; }
.gitem p { font-size: .8rem; color: var(--text2); line-height: 1.6; padding-right: 24px; }
.copy-btn {
  position: absolute; top: 12px; right: 12px;
  background: none; border: none; color: var(--text2);
  cursor: pointer; font-size: .85rem; padding: 2px 5px;
  border-radius: 4px; transition: color .15s, background .15s;
}
.copy-btn:hover { color: var(--accent2); background: var(--surf2); }

/* ============================================================ NEWS */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}
.ncard {
  background: var(--surf); border: 1px solid var(--border);
  border-radius: var(--r); padding: 20px;
  transition: border-color .2s, transform .2s var(--ease), box-shadow .2s;
  cursor: pointer; display: flex; flex-direction: column; gap: 10px;
}
.ncard:hover { border-color: var(--border2); transform: translateY(-2px); box-shadow: var(--sh); }
.nfeat {
  grid-column: span 2;
  background: linear-gradient(135deg, rgba(99,102,241,.05), var(--surf));
  border-color: rgba(99,102,241,.2);
}
@media (max-width: 600px) { .nfeat { grid-column: span 1; } }
.ntag {
  display: inline-block; font-size: .69rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em; color: var(--c);
  background: color-mix(in srgb, var(--c) 12%, transparent);
  padding: 2px 8px; border-radius: 100px; align-self: flex-start;
}
.ncard h3 { font-family: var(--fdsp); font-size: .95rem; font-weight: 600; color: var(--text); line-height: 1.4; }
.nfeat h3 { font-size: 1.1rem; }
.ncard p  { font-size: .83rem; color: var(--text2); line-height: 1.6; flex: 1; }
.nmeta {
  display: flex; align-items: center; gap: 6px;
  font-size: .74rem; color: var(--text2); flex-wrap: wrap;
}
.share-btn {
  margin-left: auto; background: none; border: 1px solid var(--border);
  color: var(--text2); padding: 2px 10px; border-radius: 100px;
  font-size: .72rem; cursor: pointer; text-decoration: none;
  transition: border-color .15s, color .15s;
}
.share-btn:hover { border-color: var(--accent); color: var(--accent2); }

/* ============================================================ LEARNING PATHS */
.paths-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}
.pcard {
  background: var(--surf); border: 1px solid var(--border);
  border-radius: var(--r); padding: 22px;
  display: flex; flex-direction: column; gap: 12px;
  transition: border-color .2s, transform .2s var(--ease), box-shadow .2s;
}
.pcard:hover { border-color: var(--border2); transform: translateY(-2px); box-shadow: var(--sh); }
.plevel {
  display: inline-block; font-size: .7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .07em;
  padding: 3px 11px; border-radius: 100px; align-self: flex-start;
}
.pcard h3 { font-family: var(--fdsp); font-size: 1rem; font-weight: 600; color: var(--text); }
.pcard > p { font-size: .82rem; color: var(--text2); line-height: 1.6; }
.psteps { list-style: none; counter-reset: s; flex: 1; display: flex; flex-direction: column; gap: 7px; }
.psteps li {
  font-size: .81rem; color: var(--text2); padding-left: 22px; position: relative;
  counter-increment: s;
}
.psteps li::before {
  content: counter(s); position: absolute; left: 0;
  width: 15px; height: 15px; border-radius: 50%; top: 1px;
  background: var(--surf2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: .6rem; font-weight: 700;
}

/* ============================================================ NEWSLETTER */
.newsletter-section {
  background: var(--bg3); border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border); padding: 64px 0;
}
.nl-inner {
  position: relative; overflow: hidden;
  max-width: 900px; margin: 0 auto;
  display: flex; align-items: center; gap: 48px; flex-wrap: wrap;
}
.nl-orb { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .18; pointer-events: none; }
.nl-orb1 { width: 350px; height: 350px; background: radial-gradient(circle,#6366f1,transparent); top: -120px; left: -80px; }
.nl-orb2 { width: 250px; height: 250px; background: radial-gradient(circle,#06b6d4,transparent); bottom: -80px; right: -40px; }
.nl-text { position: relative; flex: 1; min-width: 240px; }
.nl-text h2 { font-family: var(--fdsp); font-size: clamp(1.4rem,3vw,1.9rem); font-weight: 700; color: #f0f0ff; margin-bottom: 10px; letter-spacing: -.02em; }
[data-theme="light"] .nl-text h2 { color: #111120; }
.nl-text p  { font-size: .9rem; color: var(--text2); line-height: 1.7; margin-bottom: 14px; }
.nl-text strong { color: var(--text); }
.nl-perks { list-style: none; display: flex; flex-direction: column; gap: 5px; }
.nl-perks li { font-size: .82rem; color: var(--text2); }
.nl-form { position: relative; flex: 1; min-width: 280px; }
.nl-input-wrap {
  display: flex; gap: 8px;
  background: var(--surf); border: 1px solid var(--border2);
  border-radius: var(--r); padding: 5px 5px 5px 14px;
  margin-bottom: 8px; flex-wrap: wrap;
}
.nl-input-wrap input {
  flex: 1; min-width: 160px; background: none; border: none; outline: none;
  color: var(--text); font-size: .9rem; font-family: var(--font);
}
.nl-input-wrap input::placeholder { color: var(--text2); }
.nl-note { font-size: .75rem; color: var(--text2); text-align: center; }

/* ============================================================ SHARE STRIP */
.share-strip {
  background: var(--surf); border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border); padding: 14px 0;
}
.share-strip .container { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.share-strip > .container > span { font-size: .87rem; color: var(--text2); flex: 1; }
.share-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.sbtn {
  padding: 6px 14px; border-radius: 100px; font-size: .78rem; font-weight: 600;
  cursor: pointer; border: 1px solid var(--border2); background: none;
  transition: all .18s;
}
.sbtn.twitter  { color: #e7e9ea; }
.sbtn.linkedin { color: #0a66c2; }
.sbtn.copy     { color: var(--accent2); }
.sbtn:hover    { background: var(--surf2); border-color: var(--border2); }

/* ============================================================ FOOTER */
.footer { background: var(--bg2); border-top: 1px solid var(--border); padding: 52px 0 28px; }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px; margin-bottom: 40px;
}
.foot-brand p { font-size: .84rem; color: var(--text2); margin-top: 10px; line-height: 1.65; max-width: 260px; }
.foot-social { display: flex; gap: 10px; margin-top: 14px; }
.foot-social a {
  width: 32px; height: 32px; border-radius: var(--r-sm);
  background: var(--surf); border: 1px solid var(--border);
  color: var(--text2); text-decoration: none;
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem; font-weight: 700;
  transition: border-color .15s, color .15s, background .15s;
}
.foot-social a:hover { border-color: var(--border2); color: var(--text); background: var(--surf2); }
.foot-col h4 { font-family: var(--fdsp); font-size: .83rem; font-weight: 600; color: var(--text); margin-bottom: 14px; }
.foot-col ul { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.foot-col ul a { font-size: .83rem; color: var(--text2); text-decoration: none; transition: color .15s; }
.foot-col ul a:hover { color: var(--text); }
.foot-bottom {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 8px;
  padding-top: 20px; border-top: 1px solid var(--border);
  font-size: .78rem; color: var(--text2);
}

/* ============================================================ SHARED TABLE (used in index + topic pages) */
.t-table { width:100%; border-collapse:collapse; font-size:.85rem; margin-bottom:20px; }
.t-table th { background:var(--surf2); color:var(--text); font-weight:600; padding:10px 14px; text-align:left; border-bottom:1px solid var(--border); }
.t-table td { padding:9px 14px; border-bottom:1px solid var(--border); color:var(--text2); }
.t-table tr:last-child td { border-bottom:none; }
.t-table tr:hover td { background:var(--surf); }
.t-table-wrap { overflow-x:auto; border:1px solid var(--border); border-radius:var(--r); margin-bottom:20px; }

/* ============================================================ RESPONSIVE */
@media (max-width: 960px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-column: span 2; }
}
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex; flex-direction: column; gap: 3px;
    position: fixed; top: var(--nav-h); left: 0; right: 0; bottom: 0;
    background: var(--bg); z-index: 98;
    padding: 16px; overflow-y: auto;
    animation: mslide .25s var(--ease-out);
  }
  @keyframes mslide { from{opacity:0;transform:translateX(-12px)} to{opacity:1;transform:none} }
  .nav-links.open a { padding: 12px 14px; font-size: .95rem; border-radius: var(--r-sm); }
  .hamburger { display: flex; }
  .nav-cta { display: none; }

  .hero { padding-top: calc(var(--nav-h) + 36px); min-height: auto; padding-bottom: 40px; }
  .hero-btns { flex-direction: column; align-items: flex-start; }
  .hero-btns .btn-primary, .hero-btns .btn-ghost { width: 100%; justify-content: center; }
  .hero-stats { gap: 0; width: 100%; justify-content: space-around; }
  .hstat-sep { display: none; }
  .hstat { padding: 0 8px; }

  .section { padding: 52px 0; }
  .section-head { margin-bottom: 28px; }
  .topics-grid, .models-grid, .tools-grid, .gloss-grid, .news-grid, .paths-grid {
    grid-template-columns: 1fr;
  }
  .nl-inner { flex-direction: column; gap: 28px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .foot-brand { grid-column: span 1; }
  .filter-tabs { gap: 5px; }
  .ftab { padding: 5px 11px; font-size: .78rem; }
  .nl-input-wrap { flex-direction: column; }
  .nl-input-wrap .btn-primary { width: 100%; }
  .share-strip .container { flex-direction: column; align-items: flex-start; }
  .hstat-n { font-size: 1.1rem; }
}
