/* Keep the demo gallery within the site's existing typography and page width. */
.demos-page #introduction-wrapper {
  box-sizing: border-box;
}

.demos-page #main {
  padding-bottom: 32px;
}

.demos-page #main > h2 {
  margin-bottom: 8px;
}

.demos-intro {
  margin: 0 0 26px;
}

.demo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 28px;
  row-gap: 32px;
}

.demo {
  min-width: 0;
}

.demo video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: #111;
}

.demo video:focus-visible {
  outline: 2px solid #127315;
  outline-offset: 3px;
}

.demo-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}

.demo-heading h3 {
  font-size: 1.05em;
  line-height: 1.4;
  margin: 0;
}

.demo-duration {
  flex-shrink: 0;
  color: #666;
  font-size: 0.85em;
  font-variant-numeric: tabular-nums;
}

.demo p {
  margin: 6px 0 0;
}

.demo .demo-links {
  margin-top: 8px;
  font-size: 0.9em;
}

@media (max-width: 650px) {
  .demos-page #introduction-wrapper {
    flex-direction: column;
    gap: 14px;
    padding: 18px 0 24px;
  }

  .demos-page #introduction-wrapper h1 {
    margin: 0;
  }

  .demos-page #main-profile-pic {
    width: 150px;
    height: 150px;
  }

  .demos-page #menu {
    table-layout: fixed;
    margin-bottom: 24px;
  }

  .demos-page #menu a {
    padding: 10px 2px;
    font-size: 0.9em;
  }

  .demo-grid {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 30px;
  }
}
