/* Talks section. Reuses the design tokens from styles.css and mirrors the
   patterns in blog.css so /talks/ reads as part of the same site. The talk
   page also loads blog.css and uses `article.post` for its prose. */

.talks-content {
  max-width: 680px;
  margin: 0 auto;
  min-height: calc(100vh - 4em); /* body has padding: 2em top and bottom */
  display: flex;
  flex-direction: column;
}

.talks-content > footer {
  margin-top: auto;
}

/* Header — mirrors .blog-header */
.talks-header {
  margin-bottom: 2.5em;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 1em;
  justify-content: space-between;
}

.talks-brand {
  font-weight: 600;
  text-decoration: none;
  color: inherit;
}

.talks-brand:hover {
  text-decoration: underline;
}

.talks-nav {
  display: flex;
  gap: 0.75em;
  font-size: 0.95em;
}

.talks-nav a[aria-current="page"] {
  color: var(--text);
  text-decoration: none;
  cursor: default;
}

/* Intro blurb on the index */
.talks-intro {
  margin-bottom: 2.5em;
}

.talks-intro p {
  color: var(--secondary-text);
  margin-bottom: 0;
}

/* Listing — mirrors .post-list */
.talk-list {
  list-style: none;
  padding: 0;
}

.talk-list li {
  margin-bottom: 1.5em;
  line-height: 150%;
  display: grid;
  grid-template-columns: 9em 1fr;
  grid-template-rows: auto auto auto;
  column-gap: 1em;
  align-items: start;
}

.talk-thumb {
  grid-column: 1;
  grid-row: 1 / span 3;
  align-self: start;
  display: block;
  border-radius: 4px;
  overflow: hidden;
  line-height: 0;
  background: var(--highlight);
}

.talk-thumb img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.talk-title {
  grid-column: 2;
  grid-row: 1;
  font-weight: 500;
}

.talk-meta {
  grid-column: 2;
  grid-row: 2;
  color: var(--secondary-text);
  font-size: 0.9em;
  margin-top: 0.15em;
}

.talk-dek {
  grid-column: 2;
  grid-row: 3;
  color: var(--secondary-text);
  font-size: 0.95em;
  margin-top: 0.1em;
}

@media screen and (max-width: 600px) {
  .talk-list li {
    grid-template-columns: 6.5em 1fr;
    column-gap: 0.75em;
  }
}

/* Talk page — video + player controls */
.talk-video {
  width: 100%;
  display: block;
  border-radius: 6px;
  background: #000;
  aspect-ratio: 16 / 9;
}

.player-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 0.75em;
  font-size: 0.85em;
  color: var(--secondary-text);
}

.player-controls .group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.player-controls .label {
  margin-right: 4px;
}

.player-controls button {
  appearance: none;
  background: none;
  border: none;
  padding: 4px 8px;
  font: inherit;
  color: var(--text);
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.player-controls button:hover {
  background: var(--highlight);
  color: var(--hover-link);
}

.player-controls button[aria-pressed="true"] {
  background: var(--link);
  color: #fff;
  font-weight: 600;
}

/* Action chips */
.talk-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 1.5em 0 0;
}

.talk-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 0.9em;
  font-weight: 500;
  color: #fff;
  background: var(--link);
  border-radius: 999px;
  text-decoration: none;
  transition: background 0.15s, transform 0.15s;
}

.talk-chip:hover {
  background: var(--hover-link);
  color: #fff;
  transform: translateY(-1px);
}

.talk-chip--ghost {
  color: var(--link);
  background: var(--highlight);
}

.talk-chip--ghost:hover {
  color: var(--hover-link);
  background: var(--highlight);
}

/* Materials — extras on top of article.post prose */
.materials {
  margin-top: 2.5em;
  padding-top: 2em;
  border-top: 1px solid rgba(122, 122, 122, 0.35);
}

.copy-block {
  position: relative;
  margin: 1em 0 1.25em;
}

.copy-block pre {
  margin: 0;
  padding-right: 76px; /* room for the copy button */
}

.copy-button {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 5px 9px;
  border: 1px solid rgba(122, 122, 122, 0.35);
  border-radius: 7px;
  color: var(--secondary-text);
  background: var(--background);
  font: inherit;
  font-size: 0.75em;
  cursor: pointer;
}

.copy-button:hover {
  color: var(--hover-link);
}

.callout {
  margin: 1.5em 0;
  padding: 1em 1.15em;
  border: 1px solid rgba(122, 122, 122, 0.35);
  border-radius: 8px;
  background: var(--highlight);
}

.callout > :first-child {
  margin-top: 0;
}

.callout > :last-child {
  margin-bottom: 0;
}

.callout img {
  max-width: 520px;
  margin: 1em 0;
  border: 1px solid rgba(122, 122, 122, 0.35);
  border-radius: 8px;
}
