.videos-page {
  max-width: 1280px;
  margin: 0 auto;
  padding: 35px 5vw 40px;
}

.videos-head {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 60px;
  align-items: end;
  margin-bottom: 80px;
}
.videos-head .illo { width: 100%; max-width: 340px; aspect-ratio: 1 / 1; }
.videos-head .meta {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ink-dim);
  display: inline-flex; gap: 10px; align-items: center;
  margin-bottom: 22px;
}
.videos-head .meta .pin {
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--riso-pink);
  box-shadow: 2px 2px 0 var(--riso-green);
}
.videos-head h1 {
  font-size: clamp(40px, 5vw, 72px);
  line-height: 1;
  letter-spacing: -0.03em;
  font-weight: 600;
  max-width: 18ch;
  text-wrap: balance;
  margin-bottom: 18px;
}
.videos-head h1 em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--riso-pink);
  text-shadow: 2px 1px 0 var(--riso-green);
}
.videos-head .lede {
  font-size: 18px;
  color: var(--ink-dim);
  max-width: 56ch;
  line-height: 1.55;
}

/* ── Sections: podcast, students, teachers ─────────────────────── */
.video-section { margin-bottom: 64px; }
.video-section:last-child { margin-bottom: 0; }
.video-section-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-bottom: 20px;
}
.video-section-label {
  font-family: var(--font-mono);
  font-size: 15px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
}
a.video-section-label {
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 3px;
  transition: text-decoration-color 0.15s, color 0.15s;
}
a.video-section-label:hover {
  color: var(--riso-pink-deep);
  text-decoration-color: var(--riso-pink);
}
.video-section-sub {
  font-family: var(--font-mono);
  font-size: 15px;
  letter-spacing: 0.03em;
  color: var(--ink-dim);
}
.video-section-link {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.04em;
  color: var(--ink);
  font-weight: 500;
  white-space: nowrap;
  padding: 9px 16px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  background: var(--paper-white);
  box-shadow: 3px 3px 0 var(--riso-pink);
  transition: transform 0.15s, box-shadow 0.15s;
}
.video-section-link:hover {
  transform: translateY(-2px);
  box-shadow: 3px 3px 0 var(--riso-green), 0 10px 22px rgba(255, 126, 182, 0.2);
}
.video-section-link .ext { font-size: 12px; color: var(--riso-pink); }

/* Live YouTube embeds for the podcast row. */
.podcast-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
.podcast-embed {
  aspect-ratio: 16 / 9;
  border: 1.5px solid var(--ink);
  border-radius: 14px;
  overflow: hidden;
  background: var(--paper-white);
  box-shadow: 3px 3px 0 var(--riso-green);
}
.podcast-embed iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.video-card {
  display: flex; flex-direction: column;
  gap: 14px;
  cursor: pointer;
  color: var(--ink);
}
.video-thumb {
  aspect-ratio: 16 / 9;
  position: relative;
  overflow: hidden;
  border: 1.5px solid var(--ink);
  border-radius: 14px;
  background: var(--paper-white);
  box-shadow: 3px 3px 0 var(--riso-pink);
  transition: transform 0.18s, box-shadow 0.18s;
}
.video-card:hover .video-thumb {
  transform: translateY(-3px);
  box-shadow: 3px 3px 0 var(--riso-green), 0 14px 28px rgba(255, 126, 182, 0.22);
}
.video-thumb::after {
  /* Halftone-pink riso fill */
  content: "";
  position: absolute; inset: 0;
  background-image: radial-gradient(var(--riso-pink) 1.5px, transparent 1.9px);
  background-size: 6px 6px;
  pointer-events: none;
  opacity: 0.55;
}
.video-thumb::before {
  content: "";
  position: absolute; inset: 0;
  background-image: url("/img/grain.svg");
  background-repeat: repeat;
  mix-blend-mode: multiply;
  opacity: 0.3;
  pointer-events: none;
  z-index: 2;
}
.video-thumb .play {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 60px; height: 60px;
  border-radius: 50%;
  background: var(--paper-white);
  border: 1.5px solid var(--ink);
  display: grid; place-items: center;
  transition: transform 0.2s, background 0.2s;
  box-shadow: 2px 2px 0 var(--riso-pink);
  z-index: 3;
}
.video-card:hover .play {
  transform: translate(-50%, -50%) scale(1.06);
  box-shadow: 2px 2px 0 var(--riso-green);
}
.video-thumb .play svg { width: 18px; height: 18px; }
.video-thumb .play svg path { fill: var(--ink); }
.video-thumb .duration {
  position: absolute; bottom: 10px; right: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  background: var(--paper-white);
  color: var(--ink);
  border: 1.5px solid var(--ink);
  padding: 3px 8px;
  border-radius: 999px;
  letter-spacing: 0.02em;
  z-index: 3;
}
.video-thumb .placeholder-label {
  position: absolute;
  top: 12px; left: 14px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-dim);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  z-index: 3;
  background: rgba(244, 250, 246, 0.85);
  padding: 2px 8px;
  border-radius: 4px;
}

/* Alternate every other thumb to halftone-green */
.video-card:nth-child(2n) .video-thumb::after {
  background-image: radial-gradient(var(--riso-green) 1.5px, transparent 1.9px);
}
.video-card:nth-child(3n) .video-thumb { box-shadow: 3px 3px 0 var(--riso-green); }
.video-card:nth-child(3n):hover .video-thumb { box-shadow: 3px 3px 0 var(--riso-pink), 0 14px 28px rgba(45, 184, 118, 0.22); }

.video-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}
.video-meta h3 {
  font-size: 17px; font-weight: 600; letter-spacing: -0.01em;
  line-height: 1.3;
  text-wrap: balance;
  flex: 1;
  color: var(--ink);
}
.video-meta .views {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-faint);
  white-space: nowrap;
}
.video-card .topic {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--riso-pink);
  letter-spacing: 0.06em;
  font-weight: 500;
  text-shadow: 1px 0.5px 0 var(--riso-green);
}

@media (max-width: 900px) {
  .videos-head { grid-template-columns: 1fr; gap: 32px; margin-bottom: 60px; }
  .videos-head .illo { max-width: 240px; }
  /* Two columns at tablet width is more interesting than one big stack */
  .video-grid { grid-template-columns: 1fr 1fr; }
  .podcast-grid { grid-template-columns: 1fr; }
}

@media (max-width: 540px) {
  .videos-page { padding: 36px 5vw 30px; }
  .videos-head { gap: 20px; margin-bottom: 40px; }
  .videos-head .illo { max-width: 180px; }
  .videos-head h1 { font-size: clamp(28px, 8vw, 40px); }
  .videos-head .lede { font-size: 15px; }
  .video-grid { grid-template-columns: 1fr; gap: 18px; }
  .video-meta h3 { font-size: 16px; }
  .video-thumb .play { width: 50px; height: 50px; }
  .video-section { margin-bottom: 48px; }
}
