:root {
  color-scheme: dark;
  font-family: "Avenir Next", Avenir, system-ui, sans-serif;
  background: #111827;
  color: #f8fafc;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background: radial-gradient(circle at top, #24324a 0, #111827 48%, #090f1c 100%);
}

.presentation {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 1rem;
  padding: 1rem 1.25rem;
}

.presentation__header,
.presentation__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
}

.presentation__header h1 {
  margin: 0;
  font-size: clamp(1rem, 2vw, 1.35rem);
  font-weight: 600;
}

.presentation__header a {
  color: #f9a8d4;
}

.presentation__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem 1rem;
}

.stage {
  display: grid;
  grid-template-columns: minmax(3rem, 5rem) minmax(0, 1fr) minmax(3rem, 5rem);
  align-items: center;
  gap: 1rem;
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
}

figure {
  margin: 0;
  display: grid;
  justify-items: center;
  gap: 0.65rem;
}

#slide {
  display: block;
  width: min(100%, calc((100vh - 10rem) * 16 / 9));
  max-height: calc(100vh - 10rem);
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: #ffffff;
  box-shadow: 0 1.5rem 4rem rgb(0 0 0 / 35%);
}

figcaption,
.presentation__footer p {
  margin: 0;
  color: #cbd5e1;
  font-size: 0.9rem;
}

button {
  border: 1px solid #64748b;
  border-radius: 0.5rem;
  background: #1e293b;
  color: #f8fafc;
  font: inherit;
  cursor: pointer;
}

button:hover,
button:focus-visible {
  border-color: #f9a8d4;
  outline: 2px solid transparent;
  background: #334155;
}

.nav-button {
  width: 100%;
  aspect-ratio: 1;
  font-size: 1.6rem;
}

#fullscreen {
  padding: 0.55rem 0.9rem;
}

.noscript {
  padding: 1rem;
  text-align: center;
}

@media (max-width: 720px) {
  .presentation {
    padding: 0.75rem;
  }

  .presentation__header,
  .presentation__footer {
    align-items: flex-start;
  }

  .presentation__header h1,
  .presentation__footer p {
    max-width: 70%;
  }

  .presentation__links {
    justify-content: flex-start;
  }

  .stage {
    grid-template-columns: 2.75rem minmax(0, 1fr) 2.75rem;
    gap: 0.5rem;
  }

  #slide {
    max-height: calc(100vh - 12rem);
  }
}

:fullscreen .presentation__header,
:fullscreen .presentation__footer {
  display: none;
}

:fullscreen .presentation {
  padding: 0;
}

:fullscreen .stage {
  max-width: none;
  grid-template-columns: 4rem minmax(0, 1fr) 4rem;
}

:fullscreen #slide {
  width: min(100%, calc(100vh * 16 / 9));
  max-height: 100vh;
}

:fullscreen figcaption {
  position: fixed;
  right: 1rem;
  bottom: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 0.3rem;
  background: rgb(15 23 42 / 80%);
}
