/* ========= */
/* = Theme = */
/* ========= */

/* @link https://utopia.fyi/type/calculator?c=320,18,1.2,1240,20,1.25,5,2,&s=0.75|0.5|0.25,1.5|2|3|4|6,s-l&g=s,l,xl,12 */

:root {
  --step--2: clamp(0.78rem, calc(0.77rem + 0.03vw), 0.80rem);
  --step--1: clamp(0.94rem, calc(0.92rem + 0.11vw), 1.00rem);
  --step-0: clamp(1.13rem, calc(1.08rem + 0.22vw), 1.25rem);
  --step-1: clamp(1.35rem, calc(1.28rem + 0.37vw), 1.56rem);
  --step-2: clamp(1.62rem, calc(1.50rem + 0.58vw), 1.95rem);
  --step-3: clamp(1.94rem, calc(1.77rem + 0.87vw), 2.44rem);
  --step-4: clamp(2.33rem, calc(2.08rem + 1.25vw), 3.05rem);
  --step-5: clamp(2.80rem, calc(2.45rem + 1.77vw), 3.82rem);
}

body {
  margin: 0 auto 2.25em 0;
  font-family: Charter, 'Bitstream Charter', 'Sitka Text', Cambria, serif;
  background-color: white;
  font-size: var(--step-1);
  color: black;
  line-height: 1.5;
  background: #f9f9f9;
}

ol {
  margin: 1em 0;
  padding-left: 1.25em;
}

ol li + li {
  margin-top: 0.5em;
}

a {
  color: #06f;
}

nav {
  display: flex;
  background-color: white;
  border-bottom: 2px solid #e6e6e6;
  padding: 1rem 2.5%;
  position: relative;
  z-index: 10;
  font-family: system-ui, sans-serif;
  contain: layout;
  view-transition-name: nav;
}

nav a {
  position: relative;
  display: block;
  font-weight: bold;
  text-decoration: none;
}

nav a[aria-current] {
  color: black;
}

nav a[aria-current]::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 4px;
  background-color: black;
  left: 0;
  right: 0;
  bottom: -6px;
  contain: layout;
  view-transition-name: current;
}

nav a + a {
  margin-left: 2.5%;
}

nav a:last-child {
  margin-left: auto;
}

main {
  width: 95%;
  max-width: 48rem;
  margin: 0 auto;
  contain: layout;
}

h1 {
  margin: 0.667em 0;
  font-family: system-ui, sans-serif;
  font-size: var(--step-5);
  font-weight: 800;
  color: black;
  line-height: 1;
  contain: layout;
  view-transition-name: heading;
}

h2 {
  font-size: var(--step-2);
  margin: 0.667em 0;
  font-family: system-ui, sans-serif;
}

p {
  line-height: 1.4;
  margin: 1em 0;
}

pre {
  width: 100%;
  overflow-x: auto;
  font-size: var(--step-0);
}

code {
  font-family: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, 'DejaVu Sans Mono', monospace;
}

.timelines {
  text-align: center;
}

.animation-timeline {
  display: grid;
}

.animation {
  font-family: system-ui, sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  font-size: var(--step--1);
  padding: 0.25rem 0.5rem;
  color: white;
  letter-spacing: 0.05em;
}

.animation-exit {
  text-align: left;
  background-image: linear-gradient(to right, black, white);
}

.animation-enter {
  text-align: right;
  background-image: linear-gradient(to left, black, white);
}

.animation-transition {
  text-align: center;
  color: black;
  background-image: linear-gradient(to left, black, white, white, black);
}

.or {
  font-family: system-ui, sans-serif;
  font-size: var(--step--1);
  font-weight: 600;
  text-transform: uppercase;
}

html.turn-no-view-transitions #no-view-transitions {
  color: darkred;
  display: block;
}

.videos {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--step--2);
}

video {
  aspect-ratio: 16 / 9;
  object-fit: cover;
  width: 100%;
  contain: layout;
}

::view-transition-old(title) {
  display: none;
}

::view-transition-new(title) {
  animation: none;
}

::view-transition-old(video) {
  display: none;
}

::view-transition-new(video) {
  animation: none;
}
