nav {
  position: absolute;
  top: 0;
  right: 0;
  padding: 3em;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  z-index: 100000;
}

.nav-item {
  flex: 1;
  padding: 0.25em 1em;
  text-align: right;
}

.nav-item a {
  position: relative;
  font-size: 16px;
  text-transform: none;
  color: var(--color-accent);
}

.nav-item.active a::after {
  content: "";
  position: absolute;
  top: 90%;
  left: 0;
  width: 100%;
  height: 2px;
  border-bottom: 1.5px dashed var(--color-accent);
}

nav button {
  background: none;
  border: none;
  outline: none;
  color: var(--color-accent);
  text-transform: uppercase;
  font-size: 12px;
  padding: 0.5em 1em;
  cursor: pointer;
}

nav button.active {
  opacity: 0.35;
}

/* Below the design's breakpoint the nav — absolutely positioned top-right,
   with 3em of padding — sat directly on top of the headings, which by then run
   the full width of the screen. "DAMIEN TSARANTOS" and "Projects / Awards"
   were printed over each other. Put it in the flow as a row instead, so the
   content starts underneath it. */
@media (max-width: 900px) {
  nav {
    position: relative;
    padding: 1.5em 2em 0.5em;
  }

  nav ul {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 0.25em 1.25em;
  }

  .nav-item {
    flex: 0 0 auto;
    padding: 0.25em 0;
    text-align: left;
  }
}
