:root {
  --gutter: 1rem;
  --primary-color: rgb(182, 38, 130);
  --secondary-color: rgb(225, 245, 110);
  --keyword-color: rgb(102, 217, 239);
  --item-code-color: rgb(255, 77, 141);
  --text-color: rgb(0, 0, 0);
  --font-family: Helvetica, sans-serif;
  --max-width: 59rem;
}

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

body {
  font-family: var(--font-family);
  color: var(--text-color);
}

h1, h2, h3, h4, h5, h6 {
  margin-bottom: var(--gutter);
}

h2 {
  font-size: 1.2rem;
}

h3 {
  font-size: 1rem;
}

a {
  color: var(--primary-color);
}

.hero {
  position: relative;
  width: 100%;
  height: 11rem;
  overflow: hidden;
}

.hero__image {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  z-index: -1;
}

.header {
  position: sticky;
  top: 0;
  display: flex;
  z-index: 2;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background-color: var(--secondary-color);
  border-radius: 0.125rem;
}

.header__titles {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--gutter);
  padding: var(--gutter) var(--gutter) 0 var(--gutter);
}

.header__titles,
.navigation {
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto var(--gutter);
}

.header__title {
  position: absolute;
  top: -2.5rem;
  right: 28rem;
  font-size: 2rem;
  transform: rotate(343deg);
  z-index: 3;
  text-shadow: 0 0 10px black;
  color: white;
}


.header__author {
  margin-bottom: 0;
  font-size: 1rem;
}

@media (max-width: 768px) {
  .header__titles {
    display: none;
  }
}

.avatar {
  display: flex;
  align-items: center;
  gap: var(--gutter);
}

.avatar__image {
  width: 3rem;
}

.navigation__list {
  list-style: none;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

.navigation__link {
  position: relative;
  display: block;
  padding: 1rem;
  text-decoration: none;
}

.navigation__link::before {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  opacity: 0;
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--primary-color);
  transition: opacity 150ms ease-in-out;
}

.navigation__link.--active {
  color: var(--primary-color);
}

.navigation__link.--active::before {
  opacity: 1;
}

.navigation__link:hover {
  color: var(--primary-color);
}

.navigation__link:hover::before {
  opacity: 1;
}

.exercise,
.result {
  max-width: 50rem;
  margin: 0 auto calc(var(--gutter) * 2);
  padding: calc(var(--gutter) * 2);
}

.result p {
  margin: calc(var(--gutter) * 2) 0;
}

.answer {
  position: relative;
  color: #f8f8f2;
  background-color: #272822;
  padding: calc(var(--gutter) * 2) calc(var(--gutter) * 3);
  border-radius: 0.5rem;
}

.answer__point {
  margin-bottom: var(--gutter);
  list-style: none;
}

.answer__point::before {
  content: '🤟';
  position: absolute;
  left: 1.5rem;
}

.answer__point.--note::before {
  content: '👁️';
}

.answer__point.--solution::before {
  content: '✅';
}

.answer__point a {
  color: white;
}

.keyword {
  color: var(--keyword-color);
  font-weight: 700;
}

.line {
  font-weight: 700;
}

.item-code {
  color: var(--item-code-color);
  font-weight: 700;
}

.strong {
  font-weight: 700;
}

/* Prism Vendor */
pre[class*="language-"].line-numbers {
  position: relative;
  padding-left: 1em;
  counter-reset: linenumber;
}

pre[class*="language-"].line-numbers > code {
  position: relative;
  white-space: inherit;
}

.line-numbers .line-numbers-rows {
  position: absolute;
  pointer-events: none;
  top: 0;
  font-size: 100%;
  left: -5.8em;
  width: 3em; /* works for line-numbers below 1000 lines */
  letter-spacing: -1px;
  border-right: 1px solid #999;

  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.line-numbers-rows > span {
  display: block;
counter-increment: linenumber;
}

.line-numbers-rows > span:before {
  content: counter(linenumber);
  color: #999;
  display: block;
  padding-right: 0.8em;
  text-align: right;
}

.m-b-0 {
  margin-bottom: 0;
}

.m-b-1 {
  margin-bottom: var(--gutter);
}

.waves {
  position: relative;
  width: 100%;
  height: 15vh;
  margin-bottom: -7px;
  min-height: 100px;
  max-height: 150px;
}

/* Animation */

.parallax > use {
  animation: move-forever 25s cubic-bezier(0.55, 0.5, 0.45, 0.5) infinite;
}

.parallax > use:nth-child(1) {
  animation-delay: -2s;
  animation-duration: 7s;
}
.parallax > use:nth-child(2) {
  animation-delay: -3s;
  animation-duration: 10s;
}

.parallax > use:nth-child(3) {
  animation-delay: -4s;
  animation-duration: 13s;
}

.parallax > use:nth-child(4) {
  animation-delay: -5s;
  animation-duration: 20s;
}

@keyframes move-forever {
  0% {
   transform: translate3d(-90px, 0, 0);
  }
  100% {
    transform: translate3d(85px, 0, 0);
  }
}

/* Shrinking for mobile */
@media (min-width: 768px) {
  .waves {
    height: 40px;
    min-height: 40px;
  }

  .content {
    height: 30vh;
  }

  h1 {
    font-size: 24px;
  }
}

.waves-wrapper {
  position: relative;
  background: linear-gradient(var(--secondary-color) 0%, rgb(225 245 110 / 48%) 100%);
}
