body {
  box-sizing: border-box;
  margin: 0;
  padding: 0 5px;
  width: 100%;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-family: system-ui;
  background-color: white;
  color: black;

  a {
    color: black;
  }

  [data-mode='dark'] {
    display: initial;
  }
  [data-mode='light'] {
    display: none;
  }

  &.dark {
    background-color: black;
    color: white;

    a {
      color: white;
    }

    [data-mode='dark'] {
      display: none;
    }
    [data-mode='light'] {
      display: initial;
    }

    .article {
      border-bottom-color: white;
    }
  }
}

@media (prefers-color-scheme: dark) {
  body {
    background-color: black;
    color: white;

    a {
      color: white;
    }

    [data-mode='dark'] {
      display: none;
    }
    [data-mode='light'] {
      display: initial;
    }

    .article {
      border-bottom-color: white;
    }

    &.light {
      background-color: white;
      color: black;

      a {
        color: black;
      }

      [data-mode='dark'] {
        display: initial;
      }
      [data-mode='light'] {
        display: none;
      }

      .article {
        border-bottom-color: black;
      }
    }
  }
}

header {
  h1 {
    margin: 0;
    text-align: right;
    letter-spacing: 3px;
  }
  section {
    display: flex;
    flex-direction: row;
    justify-content: end;
    align-items: center;

    svg {
      width: 20px;
      height: 20px;
      cursor: pointer;
    }
  }
  nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;

    a {
      display: flex;
      flex-direction: row;
      justify-content: center;
      align-items: end;
      gap: 5px;

      svg {
        width: 40px;
        height: 40px;
      }

      &:hover {
        svg {
          transform: rotate(20deg);
        }
      }
    }
  }
}

main {
  margin: 0 auto;
  max-width: 650px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  flex-grow: 1;

  > section {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    gap: 10px;

    section {
      display: flex;
      flex-direction: row;
      justify-content: space-between;
      align-items: center;
    }

    p {
      margin: 0;
    }
  }
}

footer {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;

  nav {
    display: flex;
    justify-content: center;
    align-items: center;
  }
}
