/* AI in Motion — © Janin A Apurba, CSE, AUST · Advanced ICT Officer, CNRS-UNHCR */
:root {
  --bg: #060a17; --bg2: #0b1129; --panel: #0f1633; --panel2: #141d42; --line: #222c58; --ink: #eef1ff; --muted: #97a1c7;
  --cyan: #22d3ee; --violet: #a78bfa; --pink: #f472b6; --amber: #fbbf24; --green: #34d399;
  --grad: linear-gradient(100deg, #22d3ee, #a78bfa 45%, #f472b6);
  --head: 'Space Grotesk', 'Inter', sans-serif; --sans: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif; --mono: 'JetBrains Mono', Consolas, monospace;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.65 var(--sans); overflow-x: hidden; -webkit-font-smoothing: antialiased;
  background-image: radial-gradient(900px 500px at 85% -10%, rgba(167,139,250,.16), transparent 60%), radial-gradient(800px 500px at -10% 30%, rgba(34,211,238,.1), transparent 60%); background-attachment: fixed; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--head); line-height: 1.12; margin: 0 0 .45em; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
button, input { font: inherit; color: inherit; }
.wrap { width: min(1240px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--muted); } .small { font-size: .88rem; } .center { text-align: center; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--cyan); color: #000; padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }
kbd { font: 700 .78em var(--mono); background: var(--panel2); border: 1px solid var(--line); border-bottom-width: 3px; padding: 1px 6px; border-radius: 6px; }
[hidden] { display: none !important; }

/* header */
.top { position: sticky; top: 0; z-index: 50; background: rgba(6,10,23,.78); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.top-in { width: min(1320px, 100% - 32px); margin: auto; height: 66px; display: flex; align-items: center; gap: 18px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 600 1.2rem var(--head); white-space: nowrap; }
.brand b { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.logo { position: relative; width: 36px; height: 36px; border-radius: 11px; background: var(--grad); box-shadow: 0 0 22px rgba(167,139,250,.5); display: grid; place-items: center; flex: none; }
.logo i { width: 0; height: 0; border-left: 12px solid #060a17; border-top: 8px solid transparent; border-bottom: 8px solid transparent; margin-left: 4px; }
.nav { display: flex; gap: 2px; margin-left: auto; }
.nav a { text-decoration: none; font-size: .9rem; font-weight: 600; color: var(--muted); padding: 8px 10px; border-radius: 10px; transition: color .2s, background .2s; }
.nav a:hover { color: var(--ink); background: color-mix(in srgb, var(--a, var(--cyan)) 14%, transparent); }
.top-act { display: flex; align-items: center; gap: 8px; }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); cursor: pointer; }
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.menu { display: none; }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: 14px; font-weight: 700; font-size: .95rem; text-decoration: none; border: 1px solid transparent; cursor: pointer; transition: transform .2s, box-shadow .2s, background .2s; }
.btn svg { width: 18px; height: 18px; fill: currentColor; }
.btn:hover { transform: translateY(-2px); }
.btn-glow { background: var(--grad); color: #060a17; box-shadow: 0 10px 30px -10px rgba(167,139,250,.8); }
.btn-line { border-color: var(--line); background: rgba(20,29,66,.6); }
.btn-line:hover { border-color: var(--cyan); }
.btn-sm { padding: 8px 14px; font-size: .84rem; border-radius: 11px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 22px 0; }
.kicker { display: inline-block; font: 700 .76rem var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--cyan); margin-bottom: 10px; }
.lead { font-size: 1.1rem; color: var(--muted); max-width: 44em; }
.sec { padding: 56px 0 8px; }
.sec-head h2, .how h2 { font-size: clamp(1.9rem, 3.8vw, 2.8rem); }

/* hero */
.hero { padding: 48px 0 20px; }
.hero-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 44px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: .86rem; font-weight: 700; padding: 8px 14px; border-radius: 99px; background: var(--panel); border: 1px solid var(--line); }
.rec { width: 9px; height: 9px; border-radius: 50%; background: #ff4d6d; box-shadow: 0 0 12px #ff4d6d; animation: blink 1.4s steps(1) infinite; }
@keyframes blink { 50% { opacity: .25; } }
.hero h1 { font-size: clamp(2.6rem, 5.8vw, 4.6rem); margin: 22px 0 16px; }
.hero-feats { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.hero-feats li { font-size: .86rem; font-weight: 600; padding: 7px 12px; border-radius: 99px; background: var(--panel); border: 1px solid var(--line); }
.reel-frame { border-radius: 22px; padding: 6px; background: var(--grad); box-shadow: 0 40px 90px -40px rgba(167,139,250,.9); }
.reel-frame .mv { border-radius: 18px; overflow: hidden; }
.hero-reel p { margin-top: 12px; }

/* tracks and cards */
.tracks { display: grid; grid-template-columns: repeat(auto-fill, minmax(228px, 1fr)); gap: 16px; }
.track { padding: 22px; border-radius: 20px; background: linear-gradient(160deg, color-mix(in srgb, var(--a) 14%, var(--panel)), var(--panel)); border: 1px solid var(--line); text-decoration: none; transition: transform .25s, border-color .25s; }
.track:hover { transform: translateY(-5px); border-color: var(--a); }
.track-ic { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: color-mix(in srgb, var(--a) 22%, transparent); color: var(--a); font-size: 1.5rem; margin-bottom: 14px; box-shadow: 0 0 24px color-mix(in srgb, var(--a) 35%, transparent); }
.track-ic.big { width: 64px; height: 64px; font-size: 2rem; }
.track h3 { font-size: 1.2rem; } .track p { color: var(--muted); font-size: .9rem; }
.track-n { font-weight: 700; font-size: .86rem; color: var(--a); }
.tools { display: flex; flex-direction: column; gap: 14px; margin: 18px 0 22px; }
.search { display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 18px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); max-width: 640px; }
.search:focus-within { border-color: var(--cyan); }
.search svg { width: 20px; height: 20px; fill: none; stroke: var(--muted); stroke-width: 2; }
.search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { cursor: pointer; padding: 8px 14px; border-radius: 99px; border: 1px solid var(--line); background: var(--panel); font-size: .88rem; font-weight: 600; }
.chip em { font-style: normal; opacity: .6; margin-left: 3px; font-size: .78rem; }
.chip.on { background: var(--a, var(--cyan)); color: #060a17; border-color: transparent; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 20px; }
.card { display: flex; flex-direction: column; border-radius: 20px; overflow: hidden; background: var(--panel); border: 1px solid var(--line); text-decoration: none; transition: transform .25s, border-color .25s, box-shadow .25s; }
.card:hover { transform: translateY(-6px); border-color: var(--a); box-shadow: 0 24px 50px -24px color-mix(in srgb, var(--a) 60%, transparent); }
.thumb { position: relative; aspect-ratio: 16 / 9; background: #070b1c; }
.thumb canvas { width: 100%; height: 100%; display: block; }
.deep-badge { position: absolute; left: 10px; bottom: 10px; font: 800 .66rem var(--head); letter-spacing: .09em; text-transform: uppercase; padding: 4px 9px; border-radius: 7px; background: linear-gradient(100deg, #fbbf24, #fb923c); color: #1a1205; box-shadow: 0 4px 14px rgba(251,191,36,.35); }
.deep-pill { background: color-mix(in srgb, #fbbf24 22%, transparent); color: #fbbf24; }
.dur { position: absolute; right: 10px; bottom: 10px; font: 700 .76rem var(--mono); padding: 3px 8px; border-radius: 6px; background: rgba(0,0,0,.75); }
.play { position: absolute; left: 50%; top: 50%; width: 54px; height: 54px; margin: -27px 0 0 -27px; border-radius: 50%; display: grid; place-items: center; background: rgba(6,10,23,.7); border: 2px solid var(--a); opacity: 0; transform: scale(.8); transition: opacity .25s, transform .25s; }
.play svg { width: 22px; height: 22px; fill: var(--ink); margin-left: 3px; }
.card:hover .play { opacity: 1; transform: none; }
.card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.card-track { font: 700 .72rem var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--a); }
.card h3 { font-size: 1.1rem; margin: 8px 0; }
.card p { font-size: .9rem; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { margin-top: auto; font-size: .8rem; font-weight: 600; color: var(--muted); }
.empty { text-align: center; color: var(--muted); padding: 40px; }
.how { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; padding: 36px; border-radius: 24px; background: var(--panel); border: 1px solid var(--line); }
.steps { margin: 0; padding-left: 1.3em; display: grid; gap: 12px; align-content: center; }
.steps li::marker { color: var(--cyan); font-weight: 800; }

/* the video player */
.mv { position: relative; background: #060a17; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); outline: none; }
.mv:focus-visible { box-shadow: 0 0 0 3px var(--cyan); }
.mv-stage { position: relative; aspect-ratio: 16 / 9; cursor: pointer; }
.mv-canvas { width: 100%; height: 100%; display: block; }
.mv-cap { position: absolute; left: 50%; bottom: 5%; transform: translateX(-50%); max-width: 86%; text-align: center; font: 600 var(--cap, 17px)/1.4 var(--sans); padding: .35em .8em; border-radius: 10px; background: rgba(0,0,0,.72); color: #fff; pointer-events: none; }
.mv-cap.empty { display: none; }
.mv-min .mv-cap { font-size: calc(var(--cap, 17px) * .95); }
.mv-big { position: absolute; left: 50%; top: 50%; width: 88px; height: 88px; margin: -44px 0 0 -44px; border-radius: 50%; border: 0; cursor: pointer; background: var(--grad); display: grid; place-items: center; box-shadow: 0 0 50px rgba(167,139,250,.7); transition: transform .2s, opacity .3s; }
.mv-big svg { width: 36px; height: 36px; fill: #060a17; margin-left: 5px; }
.mv-big:hover { transform: scale(1.08); }
.mv.started .mv-big { opacity: 0; pointer-events: none; }
.mv-flash { position: absolute; left: 24px; top: 20px; font: 700 .9rem var(--head); padding: 6px 12px; border-radius: 10px; background: rgba(0,0,0,.6); opacity: 0; pointer-events: none; }
.mv-flash.show { animation: flash 2.4s ease forwards; }
@keyframes flash { 10%, 80% { opacity: 1; } 100% { opacity: 0; } }
.mv-bar { padding: 10px 14px 0; background: #0a1026; }
.mv-track { position: relative; height: 18px; cursor: pointer; touch-action: none; }
.mv-track::before { content: ''; position: absolute; left: 0; right: 0; top: 7px; height: 4px; border-radius: 2px; background: #283266; }
.mv-fill { position: absolute; left: 0; top: 7px; height: 4px; border-radius: 2px; background: var(--grad); }
.mv-marks i { position: absolute; top: 5px; width: 2px; height: 8px; background: #0a1026; }
.mv-knob { position: absolute; top: 3px; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: #fff; box-shadow: 0 0 10px rgba(167,139,250,.9); }
.mv-tip { position: absolute; bottom: 22px; transform: translateX(-50%); white-space: nowrap; font: 600 .76rem var(--sans); padding: 4px 8px; border-radius: 6px; background: #000; opacity: 0; pointer-events: none; transition: opacity .15s; }
.mv-track:hover .mv-tip { opacity: 1; }
.mv-ctrl { display: flex; align-items: center; gap: 4px; padding: 6px 10px 10px; background: #0a1026; }
.mv-btn { display: grid; place-items: center; min-width: 38px; height: 38px; padding: 0 8px; border-radius: 10px; border: 0; background: transparent; cursor: pointer; color: var(--ink); font: 700 .82rem var(--mono); }
.mv-btn:hover { background: #18214a; }
.mv-btn svg { width: 20px; height: 20px; fill: currentColor; }
.mv-btn.on { color: var(--cyan); }
.mv-cc:not(.on) { color: var(--muted); }
.mv-voice:not(.on) { color: var(--muted); }
.mv-time { font: 600 .82rem var(--mono); color: var(--muted); margin: 0 8px; white-space: nowrap; }
.mv-chap { flex: 1; min-width: 0; font-size: .86rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink); }
.mv-end { position: absolute; inset: 0; display: grid; place-content: center; gap: 14px; text-align: center; background: rgba(6,10,23,.82); backdrop-filter: blur(4px); cursor: default; }
.mv-end p { font: 700 1.5rem var(--head); margin: 0; }
.mv-end div { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.mv:fullscreen { border-radius: 0; display: flex; flex-direction: column; justify-content: center; background: #000; }
.mv:fullscreen .mv-stage { width: min(100vw, calc((100vh - 90px) * 16 / 9)); margin: 0 auto; }

/* watch page */
.watch { padding: 22px 0 10px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: .86rem; color: var(--muted); margin-bottom: 16px; }
.crumbs a { text-decoration: none; font-weight: 600; } .crumbs a:hover { color: var(--cyan); }
.watch-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }
.watch h1 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); margin: 22px 0 10px; }
.meta { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; font-size: .9rem; font-weight: 600; color: var(--muted); }
.pill { padding: 4px 12px; border-radius: 99px; background: color-mix(in srgb, var(--a) 22%, transparent); color: var(--a); }
.kbd-help { margin-top: 8px; }
.panel { padding: 22px; border-radius: 20px; background: var(--panel); border: 1px solid var(--line); margin-bottom: 18px; }
.panel h2 { font-size: 1.2rem; }
.side { position: sticky; top: 84px; }
.chapters { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.chapters.scroll { max-height: 440px; overflow-y: auto; overscroll-behavior: contain; padding-right: 4px; scrollbar-width: thin; }
.panel h2 small { font: 600 .8rem var(--mono); margin-left: 6px; }
.chapters button { width: 100%; display: flex; gap: 12px; align-items: center; text-align: left; padding: 9px 10px; border-radius: 10px; border: 0; background: transparent; cursor: pointer; font-size: .92rem; font-weight: 600; color: var(--muted); }
.chapters button:hover { background: var(--panel2); color: var(--ink); }
.chapters button.on { background: color-mix(in srgb, var(--a) 18%, transparent); color: var(--ink); }
.ts { font: 700 .78rem var(--mono); color: var(--a, var(--cyan)); background: none; border: 0; cursor: pointer; padding: 0; }
.takeaways { margin: 0; padding-left: 1.1em; display: grid; gap: 8px; font-size: .94rem; }
.takeaways li::marker { color: var(--green); }
.below { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 10px; }
.q { border: 0; padding: 0; margin: 0 0 16px; }
.q legend { font-weight: 700; margin-bottom: 8px; }
.q legend span { font: 700 .78rem var(--mono); color: var(--cyan); margin-right: 6px; }
.q label { display: flex; gap: 10px; align-items: flex-start; padding: 9px 12px; margin-bottom: 6px; border-radius: 10px; border: 1px solid var(--line); cursor: pointer; font-size: .94rem; }
.q label:hover { border-color: var(--cyan); }
.q label.ok { border-color: var(--green); background: rgba(52,211,153,.12); }
.q label.bad { border-color: #f87171; background: rgba(248,113,113,.12); }
.q input { margin-top: 4px; accent-color: var(--cyan); }
.why { font-size: .88rem; color: var(--green); margin: 4px 0 0; }
.quiz-foot { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.score { font-weight: 700; }
.reads { display: grid; gap: 10px; }
.read { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); text-decoration: none; transition: border-color .2s; }
.read:hover { border-color: var(--cyan); }
.read b { display: block; font-size: .94rem; } .read small { color: var(--muted); } .read em { margin-left: auto; font-style: normal; color: var(--cyan); }
.transcript summary { cursor: pointer; list-style: none; } .transcript summary::-webkit-details-marker { display: none; }
.transcript summary h2 { display: inline; } .transcript summary::after { content: ' ▾'; color: var(--muted); }
.transcript p { font-size: .96rem; color: #cfd5f0; }
.pn { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 10px 0 20px; }
.pn a { padding: 16px 18px; border-radius: 16px; border: 1px solid var(--line); background: var(--panel); text-decoration: none; display: grid; gap: 4px; }
.pn a:hover { border-color: var(--cyan); } .pn small { color: var(--muted); font-weight: 700; } .pn .next { text-align: right; }
.note { padding: 12px; border-radius: 12px; background: var(--panel2); }

.track-hero { padding: 40px 0 0; }
.track-hero h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); margin: 16px 0 10px; }
.about { padding: 60px 0; max-width: 820px; }
.about h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); }
.nf { padding: 90px 0; text-align: center; }
.nf h1 { font-size: clamp(2.4rem, 6vw, 3.6rem); }

.foot { margin-top: 70px; padding: 44px 0 26px; border-top: 1px solid var(--line); background: rgba(10,16,38,.7); }
.foot-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 30px; }
.foot-grid h4 { font: 700 .76rem var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.foot-grid a:not(.brand) { display: block; text-decoration: none; color: var(--muted); font-size: .92rem; padding: 3px 0; }
.foot-grid a:hover { color: var(--ink); }
.foot-grid p { margin-top: 12px; } .foot-grid p a { display: inline !important; color: var(--cyan) !important; }
.foot-bottom { margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--line); font-size: .88rem; }
.foot-bottom p { margin: 0 0 4px; }

@media (max-width: 1220px) {
  .menu { display: inline-grid; }
  .nav { position: fixed; top: 66px; left: 12px; right: 12px; flex-direction: column; padding: 10px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); opacity: 0; pointer-events: none; transform: translateY(-8px); transition: opacity .2s, transform .2s; }
  .nav.open { opacity: 1; pointer-events: auto; transform: none; }
  .nav a { padding: 12px 14px; font-size: 1rem; }
  .top-act { margin-left: auto; }
}
@media (max-width: 1080px) {
  .hero-grid, .watch-grid, .how, .below { grid-template-columns: 1fr; }
  .side { position: static; }
}
@media (max-width: 640px) {
  .top-act .btn { display: none; }
  .tracks, .foot-grid, .pn { grid-template-columns: 1fr; }
  .mv-chap, .mv-time { display: none; }
  .mv-ctrl { justify-content: space-between; }
  .mv-big { width: 64px; height: 64px; margin: -32px 0 0 -32px; }
  .how { padding: 24px; }
  .kbd-help { display: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* media: chapter thumbnails, seek preview, illustrated notes */
.ch-thumb { width: 64px; height: 36px; border-radius: 6px; object-fit: cover; flex: none; background: #070b1c; border: 1px solid var(--line); }
.mv-tip img { display: block; width: 160px; height: 90px; border-radius: 4px; margin: 0 auto 4px; background: #070b1c; }
.mv-tip span { display: block; text-align: center; }
.noscript-frame { width: 100%; height: auto; border-radius: 16px; margin-bottom: 10px; }
.lec-actions { margin: 4px 0 10px; }
.notes { max-width: 980px; padding: 28px 0 40px; }
.notes-head h1 { font-size: clamp(1.9rem, 4vw, 2.9rem); margin: 14px 0 10px; }
.notes-head h1 .muted { font-weight: 500; }
.note-ch { margin: 38px 0; }
.note-ch h2 { font-size: 1.22rem; display: flex; gap: 12px; align-items: baseline; margin-bottom: 10px; }
.note-ch img { width: 100%; height: auto; display: block; border-radius: 16px; border: 1px solid var(--line); background: #070b1c; margin-bottom: 12px; }
.note-ch p { color: #cfd5f0; font-size: 1.04rem; }
.notes-quiz li, .notes-reads li { margin: 10px 0; }
.notes-quiz details { color: var(--muted); margin-top: 4px; }
.notes-quiz summary { cursor: pointer; color: var(--a, var(--cyan)); font-weight: 600; }
@media print {
  .top, .foot, .skip, .no-print { display: none !important; }
  body { background: #fff !important; color: #111; }
  .notes { max-width: none; width: 100%; padding: 0; }
  .note-ch { break-inside: avoid; page-break-inside: avoid; margin: 18px 0; }
  .note-ch p, .notes .lead, .takeaways li { color: #111; }
  .note-ch img { border-color: #bbb; }
  .panel { background: #fff; border-color: #bbb; break-inside: avoid; }
  .notes-quiz details { display: block; } .notes-quiz details > * { display: block; }
  a { color: #111; text-decoration: none; }
  .pill { border: 1px solid #999; color: #111; background: none; }
}
