/* Sensible defaults that preserve browser-normal sizing on mobile. */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  --page-gutter: clamp(1rem, 3vw, 2rem);
  padding: 0 var(--page-gutter) var(--page-gutter);
  min-width: 0;
  font-family: "Fira Mono", monospace;
  font-size: 1rem;
  line-height: 1.5;
  overflow-wrap: break-word;
}

img,
video,
canvas,
svg {
  max-width: 100%;
  height: auto;
}

input,
button,
select,
textarea {
  max-width: 100%;
  font: inherit;
}

nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  padding: 0.5rem 1rem;
  background: #172033;
  border-radius: 0.75rem;
}

.nav-toggle {
  display: none;
}

header {
  margin-top: 5rem;
}

nav ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

nav a {
  display: block;
  padding: 0.65rem 1rem;
  border-radius: 0.5rem;
  color: #f8fafc;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 150ms ease, color 150ms ease;
  position: relative;
}

nav a.current-page {
  background: #33415f;
}

nav a.current-page {
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.18);
}

nav a:hover,
nav a:focus-visible {
  background: #33415f;
  color: #ffffff;
}

.link-list {
  margin: 1rem 0 0;
  padding-left: 1.25rem;
}

.link-list li + li {
  margin-top: 0.75rem;
}

.link-list a {
  color: #172033;
  text-decoration: underline;
}

nav a:focus-visible {
  outline: 2px solid #93c5fd;
  outline-offset: 2px;
}

@media (max-width: 600px) {
  nav {
    top: 1rem;
    right: 1rem;
    left: auto;
    width: 3.5rem;
    height: 3.5rem;
    padding: 0;
    border-radius: 50%;
    transition: width 220ms ease, height 220ms ease, top 220ms ease, right 220ms ease, border-radius 220ms ease;
  }

  nav.is-open {
    top: 0;
    right: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    border-radius: 0;
  }

  .nav-toggle {
    position: absolute;
    top: 0;
    right: 0;
    display: grid;
    width: 3.5rem;
    height: 3.5rem;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #f8fafc;
    font-size: 1.6rem;
    cursor: pointer;
  }

  .nav-toggle:focus-visible {
    outline: 2px solid #93c5fd;
    outline-offset: -4px;
  }

  nav ul {
    display: none;
  }

  nav.is-open ul {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    width: 100%;
    height: 100%;
    padding: 4rem 1rem 1rem;
  }

  nav.is-open a {
    padding: 0.75rem 1.25rem;
    font-size: 1.25rem;
  }

}
