:root {
  --text: #dddddd;
  --header-text: #ffffff;
  --link-text: #6ae8f1;
  --background: #1a1a1a;
  --code-background: #313131;
  --header-background: rgba(255, 255, 255, 0.067);
  --container-background: #414141;
  --shadow: rgba(0, 0, 0, 0.35);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Rubik', monospace;
  color: var(--text);
}

body {
  background-color: var(--background);
}

header {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  position: fixed;
  top: 0;
  width: 100%;
  height: 4rem;
  padding: 2rem;
  box-shadow: var(--shadow) 0px 3px 8px;
  backdrop-filter: blur(6px);
  background-color: var(--header-background);
}

.header-left {
  display: flex;
  flex-direction: row;
  justify-content: start;
  align-items: center;
  gap: 1rem;
}

.logo {
  width: auto;
  height: 2rem;
}

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

nav ul {
  display: flex;
  flex-direction: row;
  justify-content: end;
  gap: 2rem;
  list-style-type: none;
}

nav li {
  display: flex;
  flex-direction: row;
  justify-content: start;
  align-items: center;
}

header a:focus {
  background: none;
}

#link-burger-icon {
  display: none;
  width: 2rem;
  height: 2rem;
}

main {
  display: flex;
  flex-direction: column;
  align-items: center;
}

article {
  width: 50%;
  margin-bottom: 4rem;
  padding: 2rem;
  border-radius: 25px;
  line-height: 1.3;
  box-shadow: var(--shadow) 0px 5px 15px;
  background-color: var(--container-background);
}

article:first-of-type {
  margin-top: 8rem;
}

article h2 {
  width: 100%;
  margin-bottom: 2rem;
  text-align: center;
  color: var(--header-text);
  scroll-margin-top: 8rem;
  scroll-behavior: smooth;
}

section {
  width: 100%;
}

section#intro {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: start;
  gap: 2rem;
}

section#intro img {
  width: 15rem;
  height: auto;
  border-radius: 0.5rem;
}

section h3 {
  margin-top: 2rem;
  color: var(--header-text);
}

section p+h4 {
  margin-top: 1rem;
}

section ul {
  list-style-type: disc;
  list-style-position: inside;
}

.image-container {
  display: flex;
  flex-direction: column;
  justify-content: start;
  align-items: center;
  gap: 1rem;
  width: 100%;
  height: 50dvh;
  padding: 1rem;
  margin: 1rem 0 1rem 0;
  overflow-y: auto;
  background-color: var(--code-background);
  border-radius: 1rem;
  scroll-snap-type: y mandatory;
  scroll-padding-top: 1rem;
}

.image-container img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 0.5rem;
  scroll-snap-align: start;
  cursor: pointer;
}

p {
  color: var(--text);
}

a,
a:link,
a:visited,
a:hover,
a:active {
  color: var(--link-text);
  text-decoration: none;
  background:
    linear-gradient(to right, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0)),
    linear-gradient(to right, var(--link-text), var(--link-text));
  background-size:
    100% 0.1rem,
    0 0.1rem;
  background-position:
    100% 100%,
    0 100%;
  background-repeat: no-repeat;
  transition: background-size 300ms;
}

a:focus,
a:hover {
  background-size:
    0 0.1rem,
    100% 0.1rem;
}

@media only screen and (max-width: 1000px) {
  section#intro {
    flex-direction: column-reverse;
    align-items: center;
    gap: 1rem;
  }

  section#intro img {
    width: 80%;
  }
}

@media only screen and (max-width: 900px) {
  article {
    width: 70%;
  }

  section#intro img {
    width: 60%;
  }
}

@media only screen and (max-width: 650px) {
  body {
    font-size: 0.8rem;
  }

  article {
    width: 95%;
    padding: 1rem;
  }

  #link-burger-icon {
    display: block;
  }

  nav {
    position: absolute;
    top: 4rem;
    right: -100%;
    width: 70%;
    height: 100vh;
    padding-top: 1rem;
    font-size: 1rem;
    box-shadow: var(--shadow) 0px 3px 8px;
    transition: right 200ms linear;
    background-color: var(--container-background);
  }

  nav.active {
    right: 0;
  }

  nav ul {
    display: flex;
    flex-direction: column;
    justify-content: start;
    align-items: center;
    width: 100%;
    height: 100%;
  }

  .image-container img {
    border-radius: 0.2rem;
  }
}