/* Shared styles for the /videos pages (same tokens as the homepage) */
:root {
  --bg: #0e0e0f;
  --bg-2: #141415;
  --card: #19191b;
  --line: #2a2a2d;
  --text: #f1f1f1;
  --muted: #9b9ba1;
  --red: #e5242b;
  --red-hi: #ff3a41;
  --max: 1180px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: clip; }
body { background: var(--bg); color: var(--text); font: 16px/1.6 "Archivo", system-ui, sans-serif; -webkit-font-smoothing: antialiased; overflow-x: clip; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.wrap.narrow { max-width: 820px; }
.serif { font-family: "Instrument Serif", Georgia, serif; font-style: italic; font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--red); }
.eyebrow { font: 600 12px/1 "JetBrains Mono", monospace; letter-spacing: .14em; text-transform: uppercase; color: var(--red); display: inline-flex; align-items: center; gap: 10px; }
.eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--red); }
.lead { color: var(--muted); font-size: 18px; max-width: 680px; }

/* brand */
.mark { --s: 34px; width: var(--s); height: var(--s); position: relative; flex: none; display: grid; place-items: center; font: italic 900 calc(var(--s) * .52)/1 "Archivo", sans-serif; color: #fff; }
.mark::before, .mark::after { content: ""; position: absolute; inset: 0; --c: var(--red); --w: calc(var(--s) * .07); --l: calc(var(--s) * .26);
  background: linear-gradient(var(--c) 0 0) top left / var(--l) var(--w), linear-gradient(var(--c) 0 0) top left / var(--w) var(--l),
    linear-gradient(var(--c) 0 0) top right / var(--l) var(--w), linear-gradient(var(--c) 0 0) top right / var(--w) var(--l),
    linear-gradient(var(--c) 0 0) bottom left / var(--l) var(--w), linear-gradient(var(--c) 0 0) bottom left / var(--w) var(--l),
    linear-gradient(var(--c) 0 0) bottom right / var(--l) var(--w), linear-gradient(var(--c) 0 0) bottom right / var(--w) var(--l);
  background-repeat: no-repeat; }
.mark::after { background: var(--red); width: calc(var(--s) * .07); height: calc(var(--s) * .07); border-radius: 50%; inset: calc(var(--s) * .14) auto auto calc(var(--s) * .14); }
.wordmark { font: italic 900 1em/1 "Archivo", sans-serif; text-transform: uppercase; letter-spacing: -.01em; white-space: nowrap; text-shadow: -.035em 0 rgba(229,36,43,.55), .03em 0 rgba(80,200,255,.25); }
.wordmark b { color: var(--red); font-weight: 900; }
.brand { display: flex; align-items: center; gap: 12px; font-size: 18px; }

.btn { display: inline-flex; align-items: center; gap: 10px; padding: 14px 22px; border-radius: 8px; font-weight: 700; font-size: 15px; transition: transform .15s, background .15s; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-hi); }

/* nav */
nav#nav { position: sticky; top: 0; z-index: 50; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); background: rgba(14,14,15,.82); border-bottom: 1px solid var(--line); }
nav#nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; }
nav#nav ul { display: flex; gap: 30px; list-style: none; font-size: 14px; color: var(--muted); }
nav#nav ul a:hover, nav#nav ul a.on { color: var(--text); }
nav#nav .btn { padding: 10px 18px; font-size: 14px; }
.menu-btn { display: none; background: none; border: 0; color: var(--text); cursor: pointer; }

/* shared meta */
.crumbs { font: 600 12px "JetBrains Mono", monospace; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; }
.crumbs a { color: var(--red); }
.art-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; font: 12px "JetBrains Mono", monospace; color: var(--muted); margin-top: 16px; }
.art-meta span + span::before { content: "·"; margin-right: 18px; color: var(--red); }

/* directory headers */
.dir-head { padding: 70px 0 40px; border-bottom: 1px solid var(--line); position: relative; overflow: hidden;
  background: radial-gradient(ellipse 50% 80% at 85% 0%, rgba(229,36,43,.16), transparent 70%); }
.dir-head h1 { font: italic 900 clamp(36px, 5.4vw, 64px)/1.02 "Archivo", sans-serif; text-transform: uppercase; letter-spacing: -.02em; margin: 16px 0 14px; }
.dir-head h1 .serif { font-size: 1.05em; }
.dir-head .ico { color: var(--red); font-style: normal; }

/* topic grid on hub */
.tgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 44px 0 70px; }
.tcard { background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; transition: border-color .2s, transform .2s; display: flex; flex-direction: column; }
.tcard:hover { border-color: var(--red); transform: translateY(-3px); }
.tthumbs { display: grid; grid-template-columns: repeat(3, 1fr); height: 74px; }
.tthumbs img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.85); }
.tbody { padding: 18px; }
.tbody .ico { color: var(--red); font-size: 18px; }
.tbody h2 { font: italic 900 20px/1.1 "Archivo", sans-serif; text-transform: uppercase; margin: 6px 0 8px; }
.tbody p { color: var(--muted); font-size: 14px; line-height: 1.45; }

/* timeline */
.tl-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; flex-wrap: wrap; margin-bottom: 10px; }
.tl-head h2 { font: italic 900 32px/1 "Archivo", sans-serif; text-transform: uppercase; }
.tl-sort { font: 600 12px "JetBrains Mono", monospace; letter-spacing: .1em; text-transform: uppercase; color: var(--red); margin-left: 10px; vertical-align: middle; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: var(--bg-2); color: var(--muted); border-radius: 999px; padding: 8px 14px; font: 500 13px "Archivo", sans-serif; cursor: pointer; }
.chip:hover { color: var(--text); }
.chip.on { background: var(--red); border-color: var(--red); color: #fff; }
.year { padding: 34px 0 10px; }
.ylabel { display: flex; align-items: baseline; gap: 14px; border-bottom: 1px solid var(--line); padding-bottom: 12px; margin-bottom: 20px; position: sticky; top: 68px; background: var(--bg); z-index: 2; padding-top: 10px; }
.ylabel span { font: italic 900 34px/1 "Archivo", sans-serif; color: var(--red); }
.ylabel small { font: 12px "JetBrains Mono", monospace; color: var(--muted); }
.vgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px 16px; }
.vcard { display: block; }
.vcard .th { position: relative; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.vcard .th img { aspect-ratio: 16/9; object-fit: cover; width: 100%; transition: transform .4s; }
.vcard:hover .th img { transform: scale(1.05); }
.vcard:hover h3 { color: #fff; text-decoration: underline; text-decoration-color: var(--red); text-underline-offset: 3px; }
.dur { position: absolute; right: 7px; bottom: 7px; background: rgba(0,0,0,.82); font: 600 11px "JetBrains Mono", monospace; padding: 3px 6px; border-radius: 5px; }
.badge-art { position: absolute; left: 7px; top: 7px; background: var(--red); color: #fff; font: 600 10px "JetBrains Mono", monospace; letter-spacing: .08em; text-transform: uppercase; padding: 4px 7px; border-radius: 5px; }
.vmeta { display: flex; gap: 10px; flex-wrap: wrap; font: 11px "JetBrains Mono", monospace; color: var(--muted); margin-top: 10px; }
.vmeta .tp { color: var(--red); }
.vcard h3 { font-size: 15px; line-height: 1.35; font-weight: 600; margin-top: 5px; color: #e4e4e6; }

/* article */
.art-head { padding: 50px 0 34px; background: radial-gradient(ellipse 60% 100% at 90% 0%, rgba(229,36,43,.14), transparent 70%); }
.art-head h1 { font: 800 clamp(28px, 4vw, 44px)/1.12 "Archivo", sans-serif; letter-spacing: -.02em; margin-top: 16px; }
.article { padding-bottom: 80px; }
.embed { position: relative; aspect-ratio: 16/9; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: #000; }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.prose { margin-top: 40px; font-size: 18px; line-height: 1.75; color: #d9d9dc; }
.prose > * + * { margin-top: 1.1em; }
.prose .dek { font: italic 400 26px/1.35 "Instrument Serif", serif; color: var(--text); }
.prose h2 { font: italic 900 24px/1.15 "Archivo", sans-serif; text-transform: uppercase; color: var(--text); margin-top: 2em; }
.prose h2::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--red); margin-right: 12px; vertical-align: middle; }
.prose a, aside.links a { color: var(--text); text-decoration: underline; text-decoration-color: var(--red); text-underline-offset: 3px; }
.prose b, .prose strong { color: var(--text); }
.prose aside { border: 1px solid var(--line); border-radius: 14px; padding: 22px 24px; font-size: 16px; line-height: 1.6; margin-top: 2em; }
.prose aside.deep { background: var(--card); }
.prose aside.tips { background: linear-gradient(135deg, rgba(229,36,43,.1), transparent 60%), var(--card); }
.prose aside h3, aside.links h3 { font: 600 12px "JetBrains Mono", monospace; letter-spacing: .14em; text-transform: uppercase; color: var(--red); margin-bottom: 12px; }
.prose aside ul { list-style: none; display: grid; gap: 10px; }
.prose aside li { padding-left: 18px; position: relative; }
.prose aside li::before { content: "›"; position: absolute; left: 0; color: var(--red); font-weight: 700; }
.prose aside.chapters ol { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 20px; }
.prose aside.chapters li { padding: 0; }
.prose aside.chapters li::before { content: none; }
.prose aside.chapters a { text-decoration: none; display: flex; gap: 12px; padding: 5px 0; color: #d0d0d3; }
.prose aside.chapters a:hover { color: var(--text); }
.prose aside.chapters a span { font: 600 12px/1.9 "JetBrains Mono", monospace; color: var(--red); min-width: 42px; }
@media (max-width: 720px) { .prose aside.chapters ol { grid-template-columns: 1fr; } }
aside.links { margin-top: 32px; border: 1px dashed var(--line); border-radius: 14px; padding: 22px 24px; }
aside.links ul { list-style: none; display: grid; gap: 10px; }
aside.links li { display: flex; justify-content: space-between; gap: 16px; font-size: 15px; }
aside.links li small { font: 11px "JetBrains Mono", monospace; color: var(--muted); white-space: nowrap; }
aside.links li.code { font: 600 13px "JetBrains Mono", monospace; color: var(--red); }
aside.links h3 + ul + h3, aside.links ul + h3 { margin-top: 22px; }
aside.links details { margin-top: 20px; border-top: 1px solid var(--line); padding-top: 16px; }
aside.links summary { cursor: pointer; font: 600 12px "JetBrains Mono", monospace; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
aside.links summary:hover { color: var(--text); }
aside.links .note { font-size: 12px; color: var(--muted); margin-top: 14px; }
.watch { margin-top: 30px; }
.pn { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 44px; }
.pn a { border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; font-weight: 600; font-size: 15px; line-height: 1.35; transition: border-color .2s; }
.pn a:hover { border-color: var(--red); }
.pn a small { display: block; font: 11px "JetBrains Mono", monospace; color: var(--muted); margin-bottom: 6px; }
.pn .next { text-align: right; }

/* footer */
footer { border-top: 1px solid var(--line); padding: 30px 0; background: var(--bg-2); margin-top: 60px; }
footer .copy { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; font: 12px "JetBrains Mono", monospace; color: var(--muted); }
footer a:hover { color: var(--red); }

@media (max-width: 1000px) {
  .tgrid { grid-template-columns: repeat(2, 1fr); }
  .vgrid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 720px) {
  .wrap { padding: 0 16px; }
  nav#nav ul, nav#nav .nav-cta { display: none; }
  .menu-btn { display: block; }
  nav#nav.open ul { display: flex; flex-direction: column; position: absolute; top: 68px; left: 0; right: 0; background: var(--bg); padding: 20px 16px; border-bottom: 1px solid var(--line); gap: 18px; font-size: 17px; }
  .brand { font-size: 16px; }
  .tgrid { grid-template-columns: 1fr; }
  .vgrid { grid-template-columns: 1fr 1fr; gap: 18px 12px; }
  .vcard h3 { font-size: 13.5px; }
  .prose { font-size: 17px; }
  .pn { grid-template-columns: 1fr; }
  .pn .next { text-align: left; }
}
