/* Week 6 — Intro to AI. Layouts for the slides that aren't plain markdown. */

/* One huge word, centred on the slide ("Hi", "AI"). */
.big-word {
  font-size: 4.5em;
  font-weight: 300;
  text-align: center;
  line-height: 1;
}

.big-question {
  font-size: 1.6em;
  text-align: center;
}

/* Screenshot of a site, centred, with its link underneath. */
.shot {
  text-align: center;
}
.shot img {
  max-height: 500px;
  margin: 0 auto;
  border-radius: 6px;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.15);
}
.shot.tall img {
  max-height: 560px;
  box-shadow: none;
}
.shot p {
  margin: 0.25em 0;
}
.src-link {
  font-size: 0.55em;
}

/* "Who is this?" — hand-drawn shape on the left, answer on the right. */
.guess {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  justify-items: center;
  height: 600px;
}
.guess img {
  margin: 0;
}
.guess .blob {
  transform: scale(1.35);
}
.guess .answer {
  height: 420px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  border-radius: 8px;
}
.guess .name {
  font-size: 2.4em;
}

/* Emoji training data → new emoji → prediction. */
.emoji-train {
  display: grid;
  grid-template-columns: auto auto auto auto 1fr;
  grid-template-rows: auto auto auto auto;
  column-gap: 0.9em;
  align-items: center;
  justify-items: center;
  margin-top: 0.6em;
}
.emoji-train .emoji {
  font-size: 2.8em;
  line-height: 1.15;
}
.emoji-train .label,
.emoji-train .head {
  font-size: 0.7em;
  margin-bottom: 0.9em;
}
.emoji-train .head {
  color: #888;
  justify-self: end;
}
.emoji-train .test {
  grid-column: 5;
  grid-row: 1 / span 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3em;
}
.emoji-train .test img {
  height: 150px;
  margin: 0;
}
.emoji-train .result {
  font-size: 0.85em;
  text-align: center;
  line-height: 1.3;
}
.emoji-train .arrow {
  color: #888;
}

/* How an image generator finds "an apple that looks like a chair". */
.space {
  width: 100%;
  height: auto;
  display: block;
}
.space text {
  fill: currentColor;
  font-size: 30px;
}
.space .prompt rect {
  fill: #ececec;
}
.space .prompt text {
  font-size: 24px;
  text-anchor: middle;
}
.space line {
  stroke: #3b3b3b;
  stroke-width: 2;
}

/* A row of same-sized images. */
.row {
  display: flex;
  gap: 12px;
  justify-content: center;
}
.row img {
  flex: 1 1 0;
  min-width: 0;
  aspect-ratio: 1;
  object-fit: cover;
  margin: 0;
  border-radius: 6px;
}

/* Hide the "CEOs" caption printed across the top of the image. */
.crop-top {
  height: 600px;
  aspect-ratio: 1024 / 880;
  object-fit: cover;
  object-position: bottom;
}

.subhead {
  display: block;
  text-align: center;
  font-size: 0.8em;
  color: #666;
}

/* Columns whose contents sit on the same vertical centre line. Quarto's
   columns are inline-blocks, so this is vertical-align, not flexbox. */
.columns.v-center > .column {
  vertical-align: middle;
}

/* Let flowcharts use the full slide width; the viewBox keeps proportions. */
.reveal svg.mermaid-js {
  width: 100%;
  max-width: none !important;
  height: auto;
}
/* Mermaid sizes label boxes a few px too narrow for this font; without this
   the last letter wraps onto a hidden second line ("Classif"). */
.reveal svg.mermaid-js foreignObject {
  overflow: visible;
}
.reveal svg.mermaid-js .nodeLabel,
.reveal svg.mermaid-js .edgeLabel {
  white-space: nowrap;
}
