.tutorials-hero {
  padding: calc(var(--nav-height) + 64px) 0 56px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(ellipse 900px 420px at 15% 0%, rgba(45,125,246,.16), transparent 60%),
    radial-gradient(ellipse 700px 380px at 100% 10%, rgba(240,199,106,.1), transparent 55%),
    var(--bg);
}
.tutorials-hero .eyebrow { color: var(--blue-light); }
.tutorials-hero h1 { max-width: 760px; margin: 0; font-size: 52px; line-height: 1.08; font-weight: 800; }
.tutorials-hero h1 span { color: var(--blue-light); }
.tutorials-hero-copy { max-width: 620px; margin: 20px 0 0; color: var(--muted); font-size: 18px; line-height: 1.7; }

.category-filter {
  position: sticky;
  top: var(--nav-height);
  z-index: 30;
  border-bottom: 1px solid var(--line);
  background: rgba(5, 8, 13, 0.92);
  backdrop-filter: blur(14px);
}
.category-filter-inner { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 0; }
.category-pill {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255,255,255,.03);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}
.category-pill:hover { color: #fff; border-color: rgba(255,255,255,.3); }
.category-pill.active { border-color: rgba(45,125,246,.5); background: rgba(45,125,246,.14); color: #bad5ff; }

.tutorials-section { padding: 72px 0; }
.tutorials-section + .tutorials-section { border-top: 1px solid var(--line); }
.tutorials-section-title { display: flex; align-items: center; gap: 12px; margin: 0; font-size: 30px; font-weight: 800; }
.tutorials-section-title i { color: var(--blue-light); font-size: 22px; }
.tutorials-section-copy { max-width: 640px; margin: 12px 0 0; color: var(--muted); font-size: 15px; line-height: 1.65; }

.video-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 36px; }

.video-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
  text-align: left;
  padding: 0;
  transition: transform 160ms ease, border-color 160ms ease;
}
.video-card:hover { transform: translateY(-3px); border-color: rgba(45,125,246,.4); }
.video-thumb { position: relative; aspect-ratio: 16 / 9; background: #0b1118 center / cover no-repeat; }
.video-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(5,8,13,.55), transparent 55%);
}
.video-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 1;
}
.video-play i {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(5,8,13,.55);
  border: 1px solid rgba(255,255,255,.35);
  color: #fff;
  font-size: 18px;
  backdrop-filter: blur(4px);
}
.video-duration {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 1;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(5,8,13,.75);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}
.video-card-body { padding: 16px 18px 18px; }
.video-card-body h3 { margin: 0; font-size: 15px; line-height: 1.35; }
.video-card-body p { margin: 8px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.55; }

.video-empty {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 46px 20px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
}
.video-empty i { font-size: 22px; color: var(--blue-light); }
.video-empty strong { color: var(--text); font-size: 14px; }
.video-empty span { font-size: 12.5px; max-width: 360px; }

[hidden] { display: none !important; }

.video-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(2,4,7,.94);
  backdrop-filter: blur(16px);
}
.video-modal.open { display: flex; }
.video-modal-inner { width: min(920px, 100%); }
.video-modal-inner video {
  width: 100%;
  max-height: 72vh;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #000;
}
.video-modal-caption { padding: 16px 4px 0; }
.video-modal-caption h3 { margin: 0; font-size: 17px; }
.video-modal-caption p { margin: 8px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; }

@media (max-width: 1060px) {
  .video-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 680px) {
  .tutorials-hero { padding-top: calc(var(--nav-height) + 44px); padding-bottom: 40px; }
  .tutorials-hero h1 { font-size: 36px; }
  .tutorials-hero-copy { font-size: 15px; }
  .category-filter { top: var(--nav-height); }
  .category-filter-inner { flex-wrap: nowrap; overflow-x: auto; padding: 12px 0; }
  .category-pill { flex: 0 0 auto; }
  .tutorials-section { padding: 52px 0; }
  .tutorials-section-title { font-size: 24px; }
  .video-grid { grid-template-columns: 1fr; gap: 16px; margin-top: 26px; }
}
