/* The AI Lecture Hall — © Janin A Apurba (CSE, AUST), Advanced ICT Officer, CNRS-UNHCR. All rights reserved. */
:root {
  --bg: #070b1a;
  --bg-2: #0c1229;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-2: rgba(255, 255, 255, 0.08);
  --surface-solid: #111834;
  --border: rgba(255, 255, 255, 0.10);
  --border-strong: rgba(255, 255, 255, 0.18);
  --text: #e8ebf7;
  --text-strong: #ffffff;
  --muted: #9aa3c3;
  --accent: #8b5cf6;
  --accent-2: #22d3ee;
  --accent-3: #f472b6;
  --code-bg: #0b1024;
  --shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.6);
  --blob-opacity: 0.55;
  --radius: 18px;
  --maxw: 1200px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'Cascadia Code', Consolas, monospace;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f5f6fc;
  --bg-2: #eceffa;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-2: rgba(255, 255, 255, 0.92);
  --surface-solid: #ffffff;
  --border: rgba(20, 24, 60, 0.10);
  --border-strong: rgba(20, 24, 60, 0.18);
  --text: #283052;
  --text-strong: #0d1230;
  --muted: #5d6689;
  --accent: #6d28d9;
  --accent-2: #0891b2;
  --accent-3: #db2777;
  --code-bg: #0f1530;
  --shadow: 0 20px 50px -24px rgba(40, 40, 110, 0.35);
  --blob-opacity: 0.28;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.65;
  color: var(--text); background: var(--bg); min-height: 100vh; overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--display); color: var(--text-strong); line-height: 1.2; letter-spacing: -0.02em; }
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.center { text-align: center; }
::selection { background: rgba(139, 92, 246, 0.45); color: #fff; }

/* ------------------------------------------------ animated background */
.bg-scene { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
  background: radial-gradient(1200px 600px at 10% -10%, rgba(124, 58, 237, .22), transparent 60%),
              radial-gradient(900px 500px at 110% 10%, rgba(34, 211, 238, .16), transparent 60%),
              linear-gradient(180deg, var(--bg), var(--bg-2)); }
.blob { position: absolute; border-radius: 50%; filter: blur(90px); opacity: var(--blob-opacity); will-change: transform; }
.b1 { width: 520px; height: 520px; background: #7c3aed; top: -120px; left: -120px; animation: float1 26s ease-in-out infinite; }
.b2 { width: 460px; height: 460px; background: #06b6d4; top: 30%; right: -160px; animation: float2 30s ease-in-out infinite; }
.b3 { width: 420px; height: 420px; background: #ec4899; bottom: -160px; left: 30%; animation: float3 34s ease-in-out infinite; opacity: calc(var(--blob-opacity) * .7); }
.grid-overlay { position: absolute; inset: 0;
  background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 56px 56px; mask-image: radial-gradient(ellipse at 50% 0%, #000 20%, transparent 70%); -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 20%, transparent 70%); opacity: .55; }
@keyframes float1 { 50% { transform: translate(140px, 120px) scale(1.1); } }
@keyframes float2 { 50% { transform: translate(-160px, 80px) scale(.9); } }
@keyframes float3 { 50% { transform: translate(120px, -140px) scale(1.15); } }
@media (prefers-reduced-motion: reduce) { .blob { animation: none; } html { scroll-behavior: auto; } }

/* ------------------------------------------------ top bar */
.progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 100;
  background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent-3)); box-shadow: 0 0 12px var(--accent); transition: width .1s linear; }
.topbar { position: sticky; top: 0; z-index: 50; backdrop-filter: saturate(160%) blur(16px); -webkit-backdrop-filter: saturate(160%) blur(16px);
  background: color-mix(in srgb, var(--bg) 72%, transparent); border-bottom: 1px solid var(--border); }
.nav-inner { display: flex; align-items: center; gap: 20px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text-strong); font-family: var(--display); font-weight: 700; font-size: 1.08rem; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand-mark { display: grid; filter: drop-shadow(0 4px 14px rgba(139, 92, 246, .55)); }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text small { font-family: var(--font); font-weight: 500; font-size: .72rem; color: var(--muted); letter-spacing: .02em; }
.nav-links { display: flex; gap: 4px; margin-left: auto; }
.nav-links a { color: var(--text); padding: 8px 14px; border-radius: 10px; font-weight: 500; font-size: .95rem; }
.nav-links a:hover, .nav-links a.active { background: var(--surface-2); text-decoration: none; color: var(--text-strong); }
.nav-actions { display: flex; gap: 8px; }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text-strong); cursor: pointer; transition: .2s; }
.icon-btn:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.i-moon { display: none; }
[data-theme="light"] .i-sun { display: none; }
[data-theme="light"] .i-moon { display: block; }
.menu-btn { display: none; }
@media (max-width: 860px) {
  .menu-btn { display: grid; }
  .nav-links { position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; padding: 12px 16px 18px; gap: 2px;
    background: var(--surface-solid); border-bottom: 1px solid var(--border); display: none; box-shadow: var(--shadow); }
  .nav-links.open { display: flex; }
  .nav-actions { margin-left: auto; }
}

/* ------------------------------------------------ buttons & bits */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 22px; border-radius: 14px; font-weight: 600; font-size: .98rem; cursor: pointer; border: 1px solid transparent; transition: transform .2s, box-shadow .2s, background .2s; font-family: var(--font); }
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-primary { color: #fff; background: linear-gradient(120deg, #7c3aed, #2563eb 60%, #06b6d4); box-shadow: 0 10px 30px -8px rgba(124, 58, 237, .7); }
.btn-primary:hover { box-shadow: 0 16px 40px -10px rgba(124, 58, 237, .9); }
.btn-ghost { color: var(--text-strong); background: var(--surface); border-color: var(--border-strong); }
.btn-ghost:hover { background: var(--surface-2); }
.kicker { display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; background: linear-gradient(90deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; margin-bottom: 6px; }
.grad { background: linear-gradient(100deg, #a78bfa, #60a5fa 45%, #22d3ee); -webkit-background-clip: text; background-clip: text; color: transparent; }
.grad-2 { background: linear-gradient(100deg, #f472b6, #fb923c); -webkit-background-clip: text; background-clip: text; color: transparent; }
[data-theme="light"] .grad { background-image: linear-gradient(100deg, #6d28d9, #2563eb 45%, #0891b2); }
[data-theme="light"] .grad-2 { background-image: linear-gradient(100deg, #db2777, #ea580c); }
.lvl { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .74rem; font-weight: 600; letter-spacing: .02em; border: 1px solid; }
.lvl-beginner { color: #34d399; border-color: rgba(52, 211, 153, .4); background: rgba(52, 211, 153, .1); }
.lvl-intermediate { color: #fbbf24; border-color: rgba(251, 191, 36, .4); background: rgba(251, 191, 36, .1); }
.lvl-advanced { color: #f87171; border-color: rgba(248, 113, 113, .4); background: rgba(248, 113, 113, .1); }
[data-theme="light"] .lvl-beginner { color: #047857; } [data-theme="light"] .lvl-intermediate { color: #a16207; } [data-theme="light"] .lvl-advanced { color: #b91c1c; }
.avatar { width: 42px; height: 42px; flex: none; border-radius: 50%; display: grid; place-items: center; font-family: var(--display); font-weight: 700; color: #fff;
  background: conic-gradient(from 200deg, #7c3aed, #06b6d4, #ec4899, #7c3aed); box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px rgba(139, 92, 246, .5); }
.avatar.big { width: 84px; height: 84px; font-size: 1.8rem; }
.avatar.huge { width: 140px; height: 140px; font-size: 3rem; }

/* ------------------------------------------------ hero */
.hero { position: relative; padding: 90px 0 70px; overflow: hidden; }
#heroCanvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .75; }
.hero-inner { position: relative; text-align: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface); font-size: .88rem; font-weight: 500; backdrop-filter: blur(8px); }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: #22d3ee; box-shadow: 0 0 0 0 rgba(34, 211, 238, .7); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 12px rgba(34, 211, 238, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 211, 238, 0); } }
.hero h1 { font-size: clamp(2.2rem, 5.6vw, 4.3rem); margin: 22px auto 18px; max-width: 16ch; max-width: 980px; }
.lead { font-size: clamp(1.02rem, 1.6vw, 1.2rem); color: var(--muted); max-width: 760px; margin: 0 auto; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin: 32px 0 44px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; max-width: 820px; margin: 0 auto; }
.stats > div { padding: 18px 10px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); backdrop-filter: blur(10px); }
.stats b { display: block; font-family: var(--display); font-size: 2rem; color: var(--text-strong); }
.stats span { font-size: .85rem; color: var(--muted); }
@media (max-width: 640px) { .stats { grid-template-columns: repeat(2, 1fr); } .hero { padding-top: 56px; } }

/* ------------------------------------------------ sections */
.section { padding: 56px 20px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.section-head h2 { margin: 0; font-size: clamp(1.6rem, 3vw, 2.2rem); }
.more { font-weight: 600; }

.tracks-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.track { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 6px; padding: 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); color: var(--text); transition: transform .25s, border-color .25s, box-shadow .25s; isolation: isolate; }
.track::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(135deg, var(--c1), var(--c2)); opacity: 0; transition: opacity .3s; }
.track::after { content: ""; position: absolute; width: 180px; height: 180px; right: -60px; top: -60px; border-radius: 50%; background: linear-gradient(135deg, var(--c1), var(--c2)); filter: blur(30px); opacity: .35; z-index: -1; }
.track:hover { transform: translateY(-4px); text-decoration: none; border-color: transparent; box-shadow: 0 20px 50px -18px var(--c1); color: #fff; }
.track:hover::before { opacity: .95; }
.track:hover h3, .track:hover p, .track:hover .track-count, .track:hover .track-num { color: #fff; }
.track h3 { margin: 6px 0 0; font-size: 1.2rem; }
.track p { margin: 0; font-size: .92rem; color: var(--muted); flex: 1; }
.track-num { position: absolute; top: 18px; right: 20px; font-family: var(--display); font-weight: 700; color: var(--muted); font-size: .9rem; }
.track-icon { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; font-size: 1.5rem; background: linear-gradient(135deg, var(--c1), var(--c2)); color: #fff; box-shadow: 0 8px 24px -8px var(--c1); }
.track-icon.xl { width: 72px; height: 72px; font-size: 2.2rem; border-radius: 20px; }
.track-count { font-weight: 600; font-size: .9rem; color: var(--accent-2); margin-top: 8px; }

/* ------------------------------------------------ cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.card { position: relative; display: flex; flex-direction: column; border-radius: var(--radius); overflow: hidden; background: var(--surface); border: 1px solid var(--border); backdrop-filter: blur(10px); transition: transform .25s, box-shadow .25s, border-color .25s; }
.card:hover { transform: translateY(-5px); border-color: var(--border-strong); box-shadow: 0 24px 50px -22px var(--c1); }
.card-link { position: absolute; inset: 0; z-index: 2; }
.card-cover { position: relative; aspect-ratio: 2 / 1; overflow: hidden; }
.cover { display: block; width: 100%; height: 100%; transition: transform .6s; }
.card:hover .cover { transform: scale(1.06); }
.card-cat { position: absolute; top: 12px; left: 12px; padding: 4px 10px; border-radius: 999px; font-size: .75rem; font-weight: 600; color: #fff; background: rgba(0, 0, 0, .35); backdrop-filter: blur(6px); border: 1px solid rgba(255, 255, 255, .2); }
.card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.card-body h3 { margin: 0 0 8px; font-size: 1.12rem; }
.card-body p { margin: 0 0 14px; font-size: .92rem; color: var(--muted); flex: 1; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { display: flex; align-items: center; gap: 12px; font-size: .82rem; color: var(--muted); }
.card-meta span:last-child { margin-left: auto; font-family: var(--mono); }
.card.hide { display: none; }

.filters { display: flex; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.search { flex: 1; min-width: 240px; display: flex; align-items: center; gap: 10px; padding: 0 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border-strong); color: var(--muted); }
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(139, 92, 246, .18); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text-strong); font: inherit; padding: 14px 0; }
.filters select { padding: 0 16px; min-height: 50px; border-radius: 14px; background: var(--surface-solid); color: var(--text-strong); border: 1px solid var(--border-strong); font: inherit; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 26px; }
.chip { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-size: .88rem; font-weight: 500; cursor: pointer; transition: .2s; }
.chip:hover { border-color: var(--border-strong); }
.chip.active { color: #fff; border-color: transparent; background: linear-gradient(120deg, var(--c1, #7c3aed), var(--c2, #06b6d4)); box-shadow: 0 8px 20px -8px var(--c1, #7c3aed); }
.empty { text-align: center; padding: 50px; color: var(--muted); }
.load-more-wrap { text-align: center; margin-top: 34px; }

.author-band { display: flex; gap: 32px; align-items: center; padding: 38px; border-radius: 26px; background: linear-gradient(135deg, rgba(124, 58, 237, .18), rgba(6, 182, 212, .12)); border: 1px solid var(--border-strong); }
.author-band h2 { margin: 0 0 4px; }
.author-band p { max-width: 760px; }
@media (max-width: 700px) { .author-band { flex-direction: column; text-align: center; padding: 28px 20px; } }

/* ------------------------------------------------ post */
.post-hero { position: relative; padding: 60px 0 56px; overflow: hidden; isolation: isolate; border-bottom: 1px solid var(--border); }
.post-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(120deg, color-mix(in srgb, var(--c1) 55%, transparent), color-mix(in srgb, var(--c2) 40%, transparent)); }
.post-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, transparent 30%, var(--bg) 100%); }
.post-hero-art { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; opacity: .5; }
.post-hero-art text { display: none; }
.post-hero-inner { max-width: 900px; }
.post-hero h1 { font-size: clamp(2rem, 4.6vw, 3.3rem); margin: 16px 0 14px; color: #fff; text-shadow: 0 2px 30px rgba(0, 0, 0, .35); }
.post-hero .lead { margin: 0; color: rgba(255, 255, 255, .85); }
[data-theme="light"] .post-hero h1 { color: var(--text-strong); text-shadow: none; }
[data-theme="light"] .post-hero .lead { color: var(--text); }
.crumbs { display: flex; gap: 8px; flex-wrap: wrap; font-size: .88rem; color: rgba(255, 255, 255, .75); margin-bottom: 18px; }
.crumbs a { color: rgba(255, 255, 255, .9); }
[data-theme="light"] .crumbs, [data-theme="light"] .crumbs a { color: var(--muted); }
.pill { display: inline-block; padding: 6px 14px; border-radius: 999px; font-size: .82rem; font-weight: 600; color: #fff; background: rgba(0, 0, 0, .28); border: 1px solid rgba(255, 255, 255, .25); backdrop-filter: blur(8px); }
.post-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; margin-top: 26px; font-size: .92rem; color: var(--text); }
.post-meta small { color: var(--muted); }
.post-meta .sep { width: 1px; height: 28px; background: var(--border-strong); }

.post-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 48px; padding-top: 44px; padding-bottom: 20px; }
.sidebar { position: relative; }
.sidebar-inner { position: sticky; top: 90px; display: flex; flex-direction: column; gap: 18px; max-height: calc(100vh - 110px); }
.sidebar-inner .toc { flex: 1 1 auto; min-height: 0; }
.sidebar-inner .side-card { flex: none; }
.toc { padding: 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); overflow: auto; }
.toc-title { font-family: var(--display); font-weight: 700; color: var(--text-strong); margin-bottom: 10px; }
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc li a { display: block; padding: 6px 10px; border-left: 2px solid var(--border); color: var(--muted); font-size: .88rem; line-height: 1.4; }
.toc li.lvl3 a { padding-left: 22px; font-size: .84rem; }
.toc li a:hover { color: var(--text-strong); text-decoration: none; }
.toc li a.active { color: var(--text-strong); border-left-color: var(--accent); background: linear-gradient(90deg, rgba(139, 92, 246, .16), transparent); }
.side-card { padding: 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); display: flex; flex-direction: column; gap: 10px; }
.side-title { font-family: var(--display); font-weight: 700; color: var(--text-strong); }
.side-progress { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.side-progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--c1), var(--c2)); }
@media (max-width: 1000px) { .post-layout { grid-template-columns: 1fr; } .sidebar { order: -1; } .sidebar-inner { position: static; max-height: none; } .toc { max-height: none; } .side-card { display: none; } }

/* prose */
.prose { font-size: 1.06rem; line-height: 1.8; min-width: 0; }
.prose.narrow { max-width: 820px; }
.prose > p:first-child::first-letter { float: left; font-family: var(--display); font-size: 3.6rem; line-height: .9; padding: 6px 10px 0 0; font-weight: 700;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.prose h2 { font-size: 1.75rem; margin: 2.3em 0 .6em; padding-bottom: .35em; border-bottom: 1px solid var(--border); scroll-margin-top: 90px; }
.prose h3 { font-size: 1.3rem; margin: 1.8em 0 .5em; scroll-margin-top: 90px; }
.prose h4 { font-size: 1.08rem; margin: 1.5em 0 .4em; }
.prose h2 .anchor, .prose h3 .anchor { margin-left: 10px; opacity: 0; color: var(--muted); font-weight: 400; transition: opacity .2s; }
.prose h2:hover .anchor, .prose h3:hover .anchor { opacity: 1; text-decoration: none; }
.prose p { margin: 0 0 1.15em; }
.prose strong { color: var(--text-strong); }
.prose ul, .prose ol { padding-left: 1.4em; margin: 0 0 1.2em; }
.prose li { margin: .35em 0; }
.prose li::marker { color: var(--accent); font-weight: 700; }
.prose :not(pre) > code { font-family: var(--mono); font-size: .88em; padding: .15em .45em; border-radius: 7px; background: var(--surface-2); border: 1px solid var(--border); color: var(--accent-3); }
.prose blockquote { margin: 1.5em 0; padding: 14px 22px; border-left: 4px solid var(--accent); background: var(--surface); border-radius: 0 14px 14px 0; font-style: italic; color: var(--text); }
.prose blockquote p:last-child { margin-bottom: 0; }
.prose hr { border: 0; height: 1px; margin: 2.5em 0; background: linear-gradient(90deg, transparent, var(--border-strong), transparent); }
.prose img { border-radius: 14px; }
.math-block { margin: 1.4em 0; padding: 18px 20px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); overflow-x: auto; text-align: center; }
.katex { font-size: 1.08em; }
.katex-display { margin: 0; }
.code-wrap { margin: 1.5em 0; border-radius: 16px; overflow: hidden; background: var(--code-bg); border: 1px solid rgba(255, 255, 255, .1); box-shadow: var(--shadow); }
.code-head { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: rgba(255, 255, 255, .04); border-bottom: 1px solid rgba(255, 255, 255, .08); }
.dots { display: flex; gap: 6px; } .dots i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; } .dots i:nth-child(2) { background: #febc2e; } .dots i:nth-child(3) { background: #28c840; }
.code-head .lang { font-family: var(--mono); font-size: .76rem; color: #9aa3c3; text-transform: uppercase; letter-spacing: .08em; }
.copy-btn { margin-left: auto; font: 600 .75rem var(--font); color: #cfd5ee; padding: 5px 12px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, .15); background: rgba(255, 255, 255, .05); cursor: pointer; }
.copy-btn:hover { background: rgba(255, 255, 255, .12); }
.code-wrap pre { margin: 0; padding: 18px 20px; overflow-x: auto; font-family: var(--mono); font-size: .88rem; line-height: 1.65; color: #e6e9f5; }
.code-wrap pre code.hljs { background: transparent; padding: 0; }
.table-wrap { overflow-x: auto; margin: 1.5em 0; border-radius: 14px; border: 1px solid var(--border); }
.prose table { border-collapse: collapse; width: 100%; font-size: .94rem; }
.prose th { text-align: left; font-family: var(--display); color: var(--text-strong); background: var(--surface-2); }
.prose th, .prose td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
.prose tr:last-child td { border-bottom: 0; }
.prose tbody tr:hover { background: var(--surface); }

.callout { margin: 1.6em 0; padding: 18px 22px; border-radius: 16px; border: 1px solid; position: relative; }
.callout-title { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; color: var(--text-strong); margin-bottom: 6px; }
.callout-body > :last-child { margin-bottom: 0; }
.callout-body p { margin-bottom: .7em; }
.callout-note { background: rgba(139, 92, 246, .10); border-color: rgba(139, 92, 246, .35); }
.callout-tip { background: rgba(34, 211, 238, .08); border-color: rgba(34, 211, 238, .35); }
.callout-warning { background: rgba(251, 146, 60, .09); border-color: rgba(251, 146, 60, .4); }
.callout-exercise { background: rgba(52, 211, 153, .08); border-color: rgba(52, 211, 153, .35); }
.callout-takeaway { background: linear-gradient(135deg, rgba(124, 58, 237, .14), rgba(6, 182, 212, .10)); border-color: var(--border-strong); }
.callout-example { background: rgba(96, 165, 250, .08); border-color: rgba(96, 165, 250, .35); }
.callout-definition { background: rgba(244, 114, 182, .08); border-color: rgba(244, 114, 182, .35); }

.post-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 40px 0 20px; }
.post-tags span { padding: 5px 12px; border-radius: 999px; font-size: .82rem; background: var(--surface-2); border: 1px solid var(--border); color: var(--muted); }
.copyright-note { font-size: .85rem; color: var(--muted); padding: 14px 18px; border-radius: 12px; border: 1px dashed var(--border-strong); margin-bottom: 26px; }
.author-box { display: flex; gap: 22px; align-items: center; padding: 26px; border-radius: 20px; background: linear-gradient(135deg, rgba(124, 58, 237, .15), rgba(6, 182, 212, .1)); border: 1px solid var(--border-strong); }
.author-box h3 { margin: 0 0 4px; }
.author-box p { margin: 0; font-size: .95rem; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 30px; }
.pager a { display: flex; flex-direction: column; gap: 4px; padding: 18px 20px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); color: var(--text-strong); font-weight: 600; transition: .2s; line-height: 1.4; }
.pager a:hover { border-color: var(--accent); text-decoration: none; transform: translateY(-2px); }
.pager small { color: var(--muted); font-weight: 500; }
.pager .next { text-align: right; }
@media (max-width: 640px) { .pager { grid-template-columns: 1fr; } .author-box { flex-direction: column; text-align: center; } }

/* ------------------------------------------------ tracks & roadmap */
.track-hero { padding-bottom: 60px; }
.syllabus { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.syllabus a { display: flex; align-items: center; gap: 18px; padding: 16px 20px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); color: var(--text); transition: .2s; }
.syllabus a:hover { text-decoration: none; border-color: var(--c1); transform: translateX(4px); box-shadow: 0 12px 30px -18px var(--c1); }
.syl-num { flex: none; width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-family: var(--display); font-weight: 700; color: #fff; background: linear-gradient(135deg, var(--c1), var(--c2)); }
.syl-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.syl-body strong { color: var(--text-strong); font-family: var(--display); font-size: 1.05rem; }
.syl-body small { color: var(--muted); }
.syl-meta { display: flex; flex-direction: column; align-items: end; gap: 4px; color: var(--muted); }
@media (max-width: 640px) { .syl-meta { display: none; } }
.page-hero { padding: 70px 20px 20px; }
.page-hero h1 { font-size: clamp(2.1rem, 5vw, 3.6rem); margin: 8px 0 14px; max-width: 900px; }
.page-hero .lead { margin: 0; }
.page-hero.center .lead { margin: 0 auto 28px; }
.about-hero { display: flex; gap: 36px; align-items: center; }
.about-hero .lead { margin: 0; }
@media (max-width: 700px) { .about-hero { flex-direction: column; text-align: center; } }
.roadmap { position: relative; }
.roadmap::before { content: ""; position: absolute; left: 47px; top: 60px; bottom: 60px; width: 3px; border-radius: 3px; background: linear-gradient(180deg, #7c3aed, #06b6d4, #ec4899, #f59e0b); opacity: .6; }
.road-step { position: relative; display: flex; gap: 26px; margin-bottom: 28px; }
.road-dot { flex: none; z-index: 1; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; font-family: var(--display); font-weight: 700; color: #fff; background: linear-gradient(135deg, var(--c1), var(--c2)); box-shadow: 0 0 0 6px var(--bg), 0 10px 30px -8px var(--c1); }
.road-card { flex: 1; min-width: 0; padding: 24px; border-radius: 20px; background: var(--surface); border: 1px solid var(--border); backdrop-filter: blur(10px); }
.road-head { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 14px; }
.road-head h2 { margin: 0 0 4px; font-size: 1.45rem; } .road-head h2 a { color: var(--text-strong); } .road-head p { margin: 0; }
.road-list { list-style: none; padding: 0; margin: 0 0 14px; columns: 2; column-gap: 24px; }
.road-list li { break-inside: avoid; }
.road-list a { display: flex; gap: 10px; padding: 5px 0; color: var(--text); font-size: .93rem; line-height: 1.45; }
.road-list a span { font-family: var(--mono); color: var(--muted); font-size: .82rem; padding-top: 2px; }
@media (max-width: 760px) { .road-list { columns: 1; } .roadmap::before { left: 27px; } .road-dot { width: 40px; height: 40px; font-size: .85rem; } .road-step { gap: 14px; } .road-card { padding: 18px; } .road-head .track-icon { display: none; } }

/* ------------------------------------------------ footer */
.footer { margin-top: 60px; padding: 50px 0 30px; border-top: 1px solid var(--border); background: color-mix(in srgb, var(--bg) 70%, transparent); backdrop-filter: blur(10px); }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 36px; }
.footer h4 { margin: 0 0 12px; font-size: 1rem; }
.footer ul { list-style: none; padding: 0; margin: 0; columns: 1; }
.footer li a { color: var(--muted); font-size: .9rem; line-height: 2; }
.footer li a:hover { color: var(--text-strong); }
.footer p { font-size: .92rem; }
.copyright { margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--border); text-align: center; }
.copyright p { margin: 4px 0; font-size: .88rem; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr; } }

.to-top { position: fixed; right: 20px; bottom: 20px; width: 46px; height: 46px; border-radius: 14px; border: 1px solid var(--border-strong); background: var(--surface-solid); color: var(--text-strong); font-size: 1.2rem; cursor: pointer; opacity: 0; pointer-events: none; transform: translateY(10px); transition: .25s; z-index: 40; box-shadow: var(--shadow); }
.to-top.show { opacity: 1; pointer-events: auto; transform: none; }
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* Animated companion lesson (AI in Motion) */
.anim-box { display: flex; gap: 16px; align-items: flex-start; margin: 0 0 1.8em; padding: 18px 20px; border-radius: 16px; background: linear-gradient(135deg, rgba(34,211,238,.12), rgba(167,139,250,.14) 55%, rgba(244,114,182,.12)); border: 1px solid rgba(167,139,250,.45); }
.anim-ic { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: linear-gradient(135deg, #22d3ee, #a78bfa, #f472b6); color: #060a17; font-size: 18px; padding-left: 3px; box-shadow: 0 0 22px rgba(167,139,250,.55); }
.anim-kicker { font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; opacity: .75; margin-bottom: 4px; }
.anim-box a { display: block; font-weight: 700; text-decoration: none; margin: 2px 0; }
.anim-box a:hover { text-decoration: underline; }
.anim-box a span { font-weight: 500; opacity: .75; }
.anim-box small { display: block; margin-top: 6px; opacity: .75; }
