@import url('https://fonts.googleapis.com/css2?family=Jost:wght@200;300&family=Montserrat:wght@200&display=swap');

:root {
  --background: 255, 255, 255;
  --black: 5, 5, 5;
  --color: 35, 35, 35;
  --color-darker: 45, 45, 45;
  --color-muted: 235, 235, 235;
  --font-size: calc(15px + 1vh);
  --nav-font-size: 65%;
  --sidebar-bg: rgb(45, 45, 45);
  --sidebar-color: white;
  --sidebar-font-size: 65%;
  --transition-normal: all .25s linear;
}

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

body {
  background-color: rgb(var(--background));
  color: rgb(var(--color));
  display: flex;
  font-family: 'Jost', sans-serif;
  font-size: var(--font-size);
  min-height: 100vh;
}

h1 {
  font-weight: 200;
  margin: 0 0 .735ch 0;
  position: relative;
}

h1::after {
  background-color: rgba(var(--color), 0.2);
  content: '';
  left: 0;
  height: 1px;
  position: absolute;
  right: 0;
  top: 105%;
}

p {
  line-height: 3.235ch;
}

main {
  margin: 5vw;
  order: 2;
}

article p {
  line-height: 2.35em;
}

.top-nav {
  display: flex;
  font-size: var(--.top-nav-font-size);
  height: 50px;
  left: 375px;
  position: fixed;
  right: 15px;
  top: 15px;
}

.top-nav button {
  border: 1px solid rgba(0, 0, 0, .2);
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(0, 0, 0, .15);
  color: rgba(var(--color-darker), .5);
  font-size: .635em;
  height: 40px;
  margin: auto 5px auto auto;
  min-width: 40px;
  position: relative;
  transition: all 1s ease-in-out;
}

.top-nav button:hover {
  background-color: rgb(var(--color));
  border: 1px solid rgb(var(--color-muted), .2);
  box-shadow: 0 0 8px rgba(0, 0, 0, .65);
}

.top-nav button::after {
  background-color: transparent;
  border-radius: 50%;
  content: '';
  inset: -18px;
  position: absolute;
  z-index: -1;
}

.top-nav button span {
  display: block;
  letter-spacing: 3px;
  transform: translateX(1px) translateY(1px) rotate(90deg);
  transition: all 1s ease-in-out;
}

.top-nav button:hover span {
  color: rgb(var(--color-muted));
  transform: translateY(0) translateX(1px) rotate(0);
}

.top-nav ul {
  background-color: var(--sidebar-color);
  border: 1px solid rgba(var(--black), .135);
  border-top-right-radius: 25px;
  box-shadow: -1px 2px 8px rgba(0, 0, 0, .105);
  display: flex;
  flex-flow: column nowrap;
  font-size: .735em;
  letter-spacing: 1px;
  list-style: none;
  opacity: 0;
  padding: 65px 0 0 0;
  position: absolute;
  right: -8px;
  top: -8px;
  transform: scaleX(.8) scaleY(.95);
  transform-origin: 100% 0;
  transition: var(--transition-normal);
  visibility: hidden;
  width: 250px;
  z-index: -1;
}

.top-nav ul.open {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.top-nav ul::after {
  align-items: center;
  background-color: rgba(var(--black), .635);
  color: rgba(255, 255, 255, .735);
  content: 'template credits';
  display: flex;
  font-size: .535em;
  font-weight: 600;
  height: 32px;
  left: 15px;
  letter-spacing: .435em;
  position: absolute;
  padding: 2px 0 0 18px;
  right: 25px;
  text-transform: uppercase;
  top: 16px;
}

.top-nav li {
  background-color: rgba(var(--black), .635);
  height: 75px;
  transition: var(--transition-normal);
  width: 100%;
}

.top-nav li:hover {
  background-color: rgba(var(--black), .735);
}

.top-nav a {
  align-items: center;
  color: var(--sidebar-color);
  display: flex;
  height: 100%;
  justify-content: flex-end;
  text-decoration: none;
  width: 100%;
}

.top-nav a::after {
  content: '';
  padding: 10px;
}

.sidebar {
  align-items: center;
  align-self: stretch;
  background-color: var(--sidebar-bg);
  color: var(--sidebar-color);
  display: flex;
  flex-flow: column;
  font-size: var(--sidebar-font-size);
  justify-content: center;
  min-width: 375px;
  order: 1;
  transition: all 1s ease-in-out;
}

.container {
  -ms-overflow-style: none;
  align-items: center;
  display: flex;
  flex-flow: column;
  height: -moz-fit-content;
  justify-content: center;
  overflow-y: auto;
  scrollbar-width: none;
  width: 100%;
}

.container::-webkit-scrollbar {
  display: none;
}

.sidebar a,
.sidebar button {
  align-items: center;
  background-color: rgba(var(--black), .5);
  border: 1px solid rgba(var(--color-muted), .5);
  color: rgb(var(--color-muted));
  font-size: calc(var(--font-size) * .5);
  display: flex;
  min-height: 50px;
  letter-spacing: .635ch;
  justify-content: center;
  margin: 15px auto;
  position: relative;
  text-decoration: none;
  text-transform: uppercase;
  width: 85%;
}

.sidebar button::before {
  background-color: rgb(var(--color-muted));
  content: '';
  height: 2px;
  left: 0;
  position: absolute;
  right: 0;
  top: 125%;
}

.sidebar .sidebar-toggle {
  background-color: rgb(var(--color-muted));
  border: 1px solid rgb(35, 135, 235);
  border-radius: 50%;
  display: none;
  height: 45px;
  right: -50%;
  top: -1.5%;
  position: relative;
  width: 48px;
}

.sidebar-toggle:after {
  border: 13px solid rgba(var(--color), .5);
  border-bottom-color: transparent;
  border-right-color: transparent;
  border-top-color: transparent;
  content: '';
  height: 0;
  position: absolute;
  right: 2px;
  transform: scale(.7);
  width: 0;
}

.sidebar-toggle::before {
  display: none;
}

.sub-menu {
  list-style: none;
  height: 0;
  opacity: 0;
  transform: scaleY(0);
  transform-origin: top;
  transition: all 1s ease-in-out;
  visibility: hidden;
  width: 85%;
}

.sub-menu-open {
  height: auto;
  opacity: 1;
  visibility: visible;
  transform: scaleY(1);
}

.footer {
  align-items: center;
  background-color: rgba(var(--black), .5);
  bottom: 5%;
  color: var(--sidebar-color);
  display: flex;
  font-size: .635em;
  gap: 25px;
  justify-content: space-between;
  padding-left: 25px;
  position: fixed;
  right: 5%;
  z-index: -1;
}

.footer::after {
  background-color: rgba(var(--black), .25);
  content: '';
  height: 2px;
  position: absolute;
  inset: calc(100% + 5px) 0 0 0;
  width: 100%;
}

.footer a {
  background-color: var(--sidebar-bg);
  color: var(--sidebar-color);
  padding: .75em 1.5em;
  position: relative;
  text-decoration: none;
  transition: all .5s ease-in-out;
}

.footer a:hover {
  background-color: var(--sidebar-bg);
  color: var(--sidebar-color);
}

.footer a:after {
  background-color: var(--sidebar-color);
  bottom: 15%;
  content: '';
  left: 15%;
  opacity: 0;
  position: absolute;
  right: 75%;
  top: 84%;
  transition: all .5s ease-in-out;
}

.footer a:hover::after {
  opacity: 1;
  right: 15%;
}

@media only screen and (max-width: 450px) {
  .top-nav button {
    margin-left: -15px;
  }
}

@media only screen and (max-width: 768px) {
  .sidebar {
    background-color: var(--sidebar-bg);
    bottom: 0;
    color: var(--sidebar-color);
    left: -95%;
    position: fixed;
    right: 99.95%;
    top: 0;
  }

  .container {
    justify-content: center;
    bottom: 0;
    position: absolute;
    top: 0;
  }

  .open {
    left: 0;
    right: 05%;
  }

  .open .sidebar-toggle::after {
    border-bottom-color: transparent;
    border-right-color: rgba(var(--color), .5);
    border-left-color: transparent;
    border-top-color: transparent;
    right: 15px;
  }

  .sidebar .sidebar-toggle {
    display: flex;
  }
}
