.project-video { padding: 0 1.5rem 3.5rem; }
.project-video .project-video-media { overflow: hidden; border-radius: 16px; border: 0; box-shadow: none; background: white; }
.project-video :is(button, video):focus-visible { outline: 3px solid var(--primary-color); outline-offset: 3px; }
.demo-highlights { padding: 0 1.5rem 3.5rem; }
.demo-highlights-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .75rem; }
.demo-highlights-heading { font-size: .8rem; font-weight: 600; color: var(--text-secondary); }
.demo-highlight-controls { display: flex; gap: .5rem; }
.demo-highlight-controls[hidden] { display: none; }
.demo-highlight-controls button { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--border-color); border-radius: 50%; background: white; color: var(--text-primary); font-size: 1rem; cursor: pointer; }
.demo-highlight-controls button:hover:not(:disabled) { border-color: var(--primary-color); color: var(--primary-color); }
.demo-highlight-controls button:disabled { opacity: .35; cursor: default; }
.demo-highlight-grid { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 3rem) / 4); gap: 1rem; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; padding: .25rem 0 .75rem; scrollbar-width: thin; scrollbar-color: #cbd5e1 transparent; }
.demo-highlight-grid.is-looping { scroll-snap-type: none; scroll-behavior: auto; scrollbar-width: none; }
.demo-highlight-grid.is-looping::-webkit-scrollbar { display: none; }
.demo-highlights :is(button, a, .demo-highlight-grid):focus-visible { outline: 2px solid var(--primary-color); outline-offset: -2px; }
.demo-highlight { display: block; min-width: 0; scroll-snap-align: start; border: 1px solid var(--border-color); border-radius: 14px; overflow: hidden; color: var(--text-primary); background: white; transition: transform .2s ease, box-shadow .2s ease; }
.demo-highlight:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.demo-highlight img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.demo-highlight span { display: block; padding: .85rem 1rem; font-size: .85rem; font-weight: 600; }
.video-demos { padding: 4.5rem 1.5rem; border-top: 1px solid var(--border-color); background: var(--background-secondary); }
.video-demos .memory-intro { max-width: none; }
.demo-collections { display: grid; gap: 2rem; }
.demo-benchmark-intro { margin-top: 1rem; line-height: 1.7; color: var(--text-secondary); }
.demo-benchmark-intro strong { color: var(--text-primary); }
.demo-footnote { margin-top: .85rem; font-size: .75rem; color: var(--text-secondary); }
.demo-panel { scroll-margin-top: 1.5rem; border: 1px solid var(--border-color); border-radius: 20px; padding: 1.75rem; background: white; }
.demo-task-group { margin-top: 1.75rem; scroll-margin-top: 1.5rem; }
.demo-task-group:first-child { margin-top: 0; }
.demo-task-group + .demo-task-group { padding-top: 1.75rem; border-top: 1px solid var(--border-color); }
.demo-task-heading { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin-bottom: 1rem; }
.demo-task-heading h4 { font-size: .95rem; font-weight: 600; }
.demo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
.demo-card { min-width: 0; display: flex; flex-direction: column; border: 1px solid var(--border-color); border-radius: 12px; overflow: hidden; }
.demo-media { position: relative; flex-shrink: 0; background: #0f172a; aspect-ratio: 16 / 9; }
.demo-media > video, .demo-media > .demo-poster { position: absolute; inset: 0; }
.demo-poster { display: block; width: 100%; height: 100%; padding: 0; border: 0; position: relative; background: #0f172a; cursor: pointer; }
.demo-poster img { display: block; width: 100%; height: 100%; object-fit: contain; }
.demo-media video { display: block; width: 100%; height: 100%; object-fit: contain; }
.demo-player-controls { position: absolute; inset: auto 0 0; display: flex; align-items: center; gap: .5rem; padding: .4rem .5rem; background: rgb(15 23 42 / .85); color: white; }
.demo-player-controls button { display: grid; place-items: center; flex: 0 0 30px; min-height: 30px; padding: 0; border: 0; border-radius: 4px; background: transparent; color: white; font: inherit; cursor: pointer; }
.demo-player-controls button:hover { background: rgb(255 255 255 / .15); }
.demo-player-controls input { flex: 1; min-width: 0; width: 0; cursor: pointer; accent-color: white; }
.demo-player-time { font-size: .65rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.demo-media:fullscreen { width: 100%; height: 100%; }
.demo-play-icon { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); display: grid; place-items: center; height: 52px; width: 52px; padding-left: 3px; border-radius: 50%; background: rgb(15 23 42 / .78); color: white; font-size: 1rem; border: 1px solid rgb(255 255 255 / .5); transition: background .2s ease; }
.demo-poster:hover .demo-play-icon { background: var(--primary-color); }
.demo-duration { position: absolute; bottom: .6rem; right: .6rem; font-size: .7rem; color: white; background: rgb(15 23 42 / .85); border-radius: 5px; padding: .1rem .4rem; font-variant-numeric: tabular-nums; }
.demo-card-info { display: flex; align-items: center; padding: .75rem 1rem; }
.demo-clip-label, .demo-clip-heading { font-size: .85rem; font-weight: 600; }
.demo-clip-heading { padding: .75rem 1rem; flex: 1; }
.demo-badge { border-radius: 5px; padding: .15rem .4rem; font-size: .65rem; white-space: nowrap; color: #475569; background: #f1f5f9; }
.demo-badge[data-outcome="Success"] { color: #047857; background: #ecfdf5; }
.demo-badge[data-outcome="Failed"] { color: #b91c1c; background: #fef2f2; }
.demo-badge[data-outcome="Partial"] { color: #92400e; background: #fffbeb; }
.demo-error { padding: 0 1rem 1rem; font-size: .8rem; color: #b91c1c; }
.video-demos :is(button, video, input):focus-visible { outline: 3px solid var(--primary-color); outline-offset: 3px; }
@media (max-width: 768px) {
  .project-video { padding: 0 1rem 2.5rem; }
  .demo-highlights { padding: 0 1rem 2.5rem; }
  .demo-highlight-grid { grid-auto-columns: 78%; gap: .75rem; }
  .demo-highlight span { font-size: .8rem; padding: .6rem .75rem; }
  .video-demos { padding: 3rem 1rem; }
  .demo-panel { padding: 1rem; }
  .demo-grid { grid-template-columns: 1fr; gap: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  .demo-highlight, .demo-play-icon { transition: none; }
  .demo-highlight:hover { transform: none; }
}
