/*******************************************************************************
CUSTOM STYLES

Add your custom CSS styles here to override or extend the default styles.
*******************************************************************************/

.site-nav {
  flex-wrap: wrap;
}

/* Source code: JetBrains Mono (loaded in page head) */
code,
pre,
pre > code,
.line-numbers-rows {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas,
    "Liberation Mono", monospace;
}

/*
  Media embeds (talk videos, poster PDF iframe).
  Match the main Tufte text column (~55%) so they do not spill into the
  margin-note gutter. Full-bleed was ~1.8× the body width at desktop sizes.
*/
.talk-media,
.poster-embed {
  width: 55%;
  max-width: 55%;
  margin: 1.5rem 0;
  box-sizing: border-box;
}

.talk-media video,
.talk-media iframe,
.poster-embed iframe {
  display: block;
  width: 100%;
  max-width: 100%;
  border: 0;
}

.talk-media video {
  height: auto;
  aspect-ratio: 16 / 9;
  background: #000;
}

.talk-media iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  min-height: 0;
}

.poster-embed iframe {
  width: 100%;
  /* Portrait poster; keep height bounded so the iframe is not a full viewport. */
  aspect-ratio: 3 / 4;
  height: auto;
  min-height: 18rem;
  max-height: 36rem;
  background: var(--theme-pre-bg, #f7f7f7);
}

.talk-media-fallback {
  margin-top: 0.75rem;
}

.software-badge {
  display: inline-block;
  height: 1.25em;
  width: auto;
  margin-left: 0.35rem;
  vertical-align: -0.2em;
}

.software-apps {
  margin-top: 2rem;
}

.software-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  gap: 1.25rem;
  margin: 1.5rem 0;
}

.software-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  min-width: 0;
  padding: 1rem;
  border: 1px solid var(--border-color, #bbb);
  border-radius: 0.35rem;
}

.software-card > img {
  width: 5rem;
  height: 5rem;
  flex: 0 0 5rem;
  object-fit: contain;
}

.software-card-body {
  min-width: 0;
}

.software-card-body h4 {
  margin-top: 0;
}

@media (max-width: 40rem) {
  .talk-media,
  .poster-embed {
    width: 100%;
    max-width: 100%;
  }

  .talk-media iframe {
    aspect-ratio: 16 / 9;
    height: auto;
    min-height: 0;
  }

  .poster-embed iframe {
    max-height: none;
  }
}
