html {
  --fg: var(--slate);
  --bg: var(--yellow);
  --fg: light-dark(var(--slate), var(--yellow));
  --bg: light-dark(var(--yellow), var(--slate));
}

/* <section> is usually surrounded by a full-width div with a BG color */
section {
  max-width: var(--page-width);
  margin-inline: auto;
  padding-inline: 1.375em;
}

h1 {
  line-height: 1;
  font: 200 48px / 1 "Overpass";
  text-align: center;
}

h2 {
  font: 280 36px / 1.4 "Overpass";
  margin: 0 auto;
  text-align: center;
}

h3 {
  margin-block: 3rem 0;
}

h4 {
  margin-block: 0;
}

p {
  margin: 0;
}

@media (width <= 1024px) {
  h1   { font: 220 42px / 1 "Overpass", sans-serif; }
  h2   { font: 300 30px / 1.4 "Overpass", sans-serif; }
}

@media (width <= 500px) {
  h1   { font: 220 40px / 1 "Overpass", sans-serif; }
  h2   { font: 300 28px / 1.4 "Overpass", sans-serif; }
}

aside {
  position: relative;
  display: flex;
  align-items: baseline;
  max-width: var(--page-width);
  padding-bottom: 3rem;
  font-weight: 500;
}

@media (width > 500px) { aside { font-size: 18px } }
/* We can't just use margin-inline:auto because when scroll bars are visible,
   it makes the logo visually shift between the home page and other pages. */
@media (width > 72em) { aside { left: calc((100vw - var(--page-width)) / 2); } }

header {
  flex: 1 1 auto;
}

nav {
  display: flex;
  align-items: baseline;
}

nav div {
  position: absolute;
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 2rem;
  left: 0;
  right: 0;
  top: calc(2rem + 2px);
  width: max-content;
  margin-inline: auto;
}

#theme-toggle {
  margin-right: 1rem;
  align-self: center;
}

aside a.get-started {
  padding: .3em .4em .1em;
  border: 2px solid currentColor;
  border-radius: 4px;
  white-space: pre; /* don't wrap when narrow */
  text-decoration: none; /* override link hover style */
}

aside a.get-started:hover {
  outline: 2px solid currentColor;
  outline-offset: -1px;
}

@media (max-width: 500px) {
  .get-started { display: none; }
}

@media (max-width: 800px) {
  aside {
    flex-flow: row wrap;
    gap: 2rem 1rem;
  }

  aside #theme-toggle {
    margin-left: 0;
    margin-right: 0;
  }

  aside .get-started {
    margin-left: 0;
  }

  nav {
    flex: 1 1 100%;
    justify-content: center;
    align-items: center;
    gap: 2rem;
  }

  nav div {
    position: static;
    margin: 0;
    gap: 2rem;
    justify-content: end;
  }
}

/* Pad the aside more when burger menu is open */
@media (width <= 800px) {
  #burger-state:checked + aside {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
  }
}
