:root {
  --dropdown-border-radius: 8px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  color: rgb(9, 17, 53);
  -webkit-font-smoothing: antialiased;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 60em;
  margin: 1rem auto;
  padding: 0 1rem;
  flex-direction: column;
  gap: 1rem;

  & > div {
    display: flex;
    align-items: center;
  }

  @media (width >= 600px) {
    flex-direction: row;
    gap: 0;
  }

  navigation {
    display: flex;
  }
}

header navigation a:link,
header navigation a:visited {
  font-family:
    ui-rounded,
    system-ui,
    -apple-system,
    "Helvetica Neue",
    Helvetica,
    Arial,
    sans-serif;
  font-size: 1.1rem;
  margin: 0 1rem;
  color: rgb(9, 17, 53);
  display: block;
  padding: 10px;
  text-underline-offset: 0.3em;
  text-decoration-thickness: 2px;
  text-decoration-color: oklch(from currentColor l c h / 10%);

  @media (width >= 600px) {
    display: inline;
    padding: 0;
  }
}

header navigation a:hover {
  text-decoration-color: oklch(from currentColor l c h / 80%);
}

header a:link.headline,
header a:visited.headline {
  text-decoration: none;
}

h1 {
  font-family:
    ui-rounded,
    system-ui,
    -apple-system,
    "Helvetica Neue",
    Helvetica,
    Arial,
    sans-serif;
  font-weight: 600;
  font-size: 1.5em;
  color: #000;
  padding-left: 1rem;
}

h2 {
  font-family:
    ui-rounded,
    system-ui,
    -apple-system,
    "Helvetica Neue",
    Helvetica,
    Arial,
    sans-serif;
  color: rgb(9, 17, 53);
  padding: 1.5rem 1rem;
}

#demos-dropdown {
  position: relative;
  display: inline-block;

  .content {
    display: none;
    position: absolute;
    top: 40px;
    left: -5px;
    border-radius: var(--dropdown-border-radius);
    flex-direction: column;
    background: #fff;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
    z-index: 1;
    margin: 0;
    padding: 4px;

    &.active {
      display: flex;
    }

    a:link,
    a:visited {
      margin: 0;
      padding: 1rem 1rem;
      text-decoration: none;
    }

    a:hover {
      background-color: rgb(231 231 231);
      border-radius: calc(var(--dropdown-border-radius) / 2);
    }
  }
}

footer {
  margin: 4rem auto 0 auto;
  font-family: ui-rounded, sans-serif;
  font-size: 1.1rem;
  padding: 2rem 1rem;
  max-width: 60rem;
  display: flex;
  place-content: space-between;

  @media (width < 600px) {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  copyright {
    color: rgba(0, 0, 0, 0.5);
  }

  a:link,
  a:visited {
    color: rgb(78, 72, 205);
    text-underline-offset: 0.2em;
    text-decoration-thickness: 2px;
    text-decoration-color: oklch(from currentColor l c h / 30%);
    margin-left: 1rem;

    @media (width < 600px) {
      &:first-child {
        margin-left: 0;
      }
    }
  }

  a:hover {
    text-decoration-color: oklch(from currentColor l c h / 80%);
  }
}
