/* CaspiMind: palette from caspimind/brand.py, so the site matches the videos. */
:root {
  --bg: #07070F;
  --panel: #10142A;
  --line: #222846;
  --deep-sea: #0A1633;
  --caspian: #2EC4D6;
  --gold: #FFD166;
  --red: #FF5C7A;
  --white: #FFFFFF;
  --text: #E6E8F2;
  --muted: #8A8FB0;
  --az-blue: #00B5E2;
  --az-red: #EF3340;
  --az-green: #509E2F;
  --radius: 14px;
  --font: "Avenir Next", "Nunito Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "SF Mono", Menlo, Consolas, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 17px/1.6 var(--font); -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--caspian); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { color: var(--white); line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); font-weight: 800; letter-spacing: -.01em; }
h2 { font-size: 1.35rem; font-weight: 800; margin-top: 1.8em; }
p { margin: 0 0 1em; }
.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.accent { color: var(--caspian); }
.eyebrow { color: var(--caspian); font-weight: 800; letter-spacing: .14em; text-transform: uppercase; font-size: .8rem; }
.lead { font-size: 1.15rem; color: var(--text); }

/* buttons */
.btn {
  display: inline-block; padding: .7em 1.25em; border-radius: 999px; font-weight: 800;
  background: var(--caspian); color: var(--bg); border: 2px solid var(--caspian);
}
.btn:hover { text-decoration: none; filter: brightness(1.1); }
.btn-ghost { background: transparent; color: var(--white); border-color: var(--line); }
.btn-small { padding: .35em .9em; font-size: .9rem; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }

/* header / footer */
.site-header { position: sticky; top: 0; z-index: 10; background: rgb(7 7 15 / .85); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.wordmark { display: flex; align-items: center; gap: .55rem; color: var(--white); font-weight: 800; font-size: 1.3rem; }
.wordmark:hover { text-decoration: none; }
.wordmark b { color: var(--caspian); font-weight: 800; }
nav { display: flex; align-items: center; gap: 1.25rem; }
nav a:not(.btn) { color: var(--text); font-weight: 600; }
nav a[aria-current] { color: var(--caspian); }
.site-footer { margin-top: 5rem; padding: 2.5rem 0; border-top: 1px solid var(--line); color: var(--muted); text-align: center; }
.site-footer .tagline { color: var(--white); font-weight: 800; font-size: 1.1rem; }

/* hero */
.hero { padding: clamp(3rem, 8vw, 6rem) 0 3rem; background:
  radial-gradient(60% 80% at 85% 40%, rgb(46 196 214 / .12), transparent 70%),
  radial-gradient(40% 50% at 80% 45%, rgb(255 209 102 / .07), transparent 70%); }
.hero-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 2rem; align-items: center; }
.hero-logo { width: min(320px, 70vw); justify-self: center; filter: drop-shadow(0 0 40px rgb(46 196 214 / .25)); }

/* sections */
.section-title { font-size: 1.6rem; margin: 0 0 1rem; }
.latest { padding: 2rem 0; }
.latest-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 2rem; align-items: start; }
.latest-text h3 { font-size: 1.5rem; }
.latest-text h3 a { color: var(--white); }
.more { font-weight: 700; }
.library { padding: 3rem 0 0; }
.library-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.row-title { color: var(--muted); font-size: .85rem; letter-spacing: .12em; text-transform: uppercase; margin: 2rem 0 1rem; }

/* filter chips */
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip { font: inherit; font-size: .9rem; font-weight: 700; color: var(--text); background: var(--panel);
  border: 1px solid var(--line); border-radius: 999px; padding: .35em .9em; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--caspian); color: var(--bg); border-color: var(--caspian); }

/* cards */
.grid { display: grid; gap: 1.25rem; }
.grid-long { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.grid-short { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.card { display: block; color: var(--text); border-radius: var(--radius); background: var(--panel);
  border: 1px solid var(--line); overflow: hidden; transition: transform .15s, border-color .15s; }
.card:hover { text-decoration: none; transform: translateY(-3px); border-color: var(--caspian); }
.card[hidden] { display: none; }
.thumb { position: relative; display: block; background: var(--deep-sea); }
.card-long .thumb img { aspect-ratio: 16 / 9; width: 100%; object-fit: cover; }
.card-short .thumb img { aspect-ratio: 9 / 16; width: 100%; object-fit: cover; }
.dur { position: absolute; right: .5rem; bottom: .5rem; background: rgb(0 0 0 / .75); color: var(--white);
  font: 600 .78rem var(--mono); padding: .15em .45em; border-radius: 6px; }
.meta { display: block; padding: .8rem 1rem 1rem; }
.kind { display: block; color: var(--caspian); font-size: .75rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.card-title { display: block; color: var(--white); font-weight: 700; line-height: 1.3; margin-top: .3rem; }

/* player (lite YouTube embed: the iframe loads only on click) */
.player { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--deep-sea);
  border: 1px solid var(--line); aspect-ratio: 16 / 9; }
.player-short { aspect-ratio: 9 / 16; max-width: 380px; margin-inline: auto; }
.player img, .player iframe { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; }
.player .play { position: absolute; inset: 0; margin: auto; width: 68px; height: 48px; padding: 0; border: 0;
  background: none; cursor: pointer; filter: drop-shadow(0 4px 12px rgb(0 0 0 / .5)); transition: transform .15s; }
.player .play:hover { transform: scale(1.1); }
.player .soon { position: absolute; left: 50%; bottom: 1rem; transform: translateX(-50%); background: rgb(0 0 0 / .7);
  color: var(--white); padding: .4em .9em; border-radius: 999px; font-weight: 700; white-space: nowrap; }

/* video page */
.video-page { padding-top: 2rem; }
.crumbs { color: var(--muted); font-size: .9rem; }
.video-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 2.5rem; margin-top: 1.5rem; }
.video-short .video-layout { grid-template-columns: minmax(0, 1fr) 340px; }
.video-main > .player { margin-bottom: 1.75rem; }
.bullets { padding-left: 1.2rem; }
.bullets li { margin: .35em 0; }
.bullets li::marker { color: var(--caspian); }
.note { color: var(--muted); font-size: .95rem; overflow-wrap: anywhere; }
.tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 2rem; }
.tags span { font-size: .78rem; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: .15em .7em; }
.video-side h2:first-child { margin-top: 0; }
.chapters { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.chapters li + li { border-top: 1px solid var(--line); }
.chapters a { display: flex; gap: .8rem; padding: .6rem .9rem; color: var(--text); }
.chapters a:hover { background: var(--panel); text-decoration: none; }
.ts { font: 600 .85rem/1.9 var(--mono); color: var(--caspian); min-width: 2.8rem; }
.video-side .card { margin-bottom: 1rem; }
.video-side .card-short { max-width: 200px; }
.cta-box { margin-top: 2rem; padding: 1.25rem; border-radius: var(--radius); background: var(--panel);
  border: 1px solid var(--line); color: var(--muted); }
.cta-box .btn { margin-top: .75rem; }

/* about / 404 */
.prose { max-width: 720px; padding-top: 3rem; }
.about-logo { width: 120px; margin-bottom: 1.5rem; }
.notfound { padding: 6rem 0; text-align: center; }
.notfound .actions { justify-content: center; }

@media (max-width: 860px) {
  .hero-grid, .latest-grid, .video-layout, .video-short .video-layout { grid-template-columns: 1fr; }
  .hero-logo { order: -1; width: 160px; justify-self: start; }
  nav { gap: .9rem; }
  nav a:not(.btn) { font-size: .95rem; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .card { transition: none; } }
.video-page h1 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); }
@media (max-width: 520px) {
  .wordmark { font-size: 1.1rem; gap: .4rem; }
  .wordmark img { width: 28px; height: 28px; }
  nav { gap: .75rem; }
  nav a[href="/#videos"] { display: none; }   /* the home page itself is the library */
  .hero { padding-top: 2rem; }
  .hero-logo { width: 110px; }
  .hero-grid { gap: .5rem; }
}
