/* * * * * * * * * * * * * * * * * * * * * * * * * */
/* variables */
/* * * * * * * * * * * * * * * * * * * * * * * * * */
:root {
  --main-bg-colour: #0e1116;
  --header-bg-colour: #171b21;

  --main-link-colour: #6ba4f8;

  --main-text-colour: #cad1d8;
  --dim-text-colour: #8d949d;
  --bright-text-colour: #f1f6fb;
  --accent-text-colour: #64b75d;

  --main-border-colour: #31363c;
}

/* * * * * * * * * * * * * * * * * * * * * * * * * */
/* base */
/* * * * * * * * * * * * * * * * * * * * * * * * * */

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

html {
  font-size: 62.5%;
  overflow-x: hidden;
  scroll-behavior: smooth;
  scroll-padding-top: 7rem;
}

body {
  line-height: 1;
  overflow-x: hidden;
  font-family: "Inter", sans-serif;
  font-size: 1.6rem;
  font-weight: 400;
  color: var(--main-text-colour);
  background-color: var(--main-bg-colour);
}

/* * * * * * * * * * * * * * * * * * * * * * * * * */
/* utilities */
/* * * * * * * * * * * * * * * * * * * * * * * * * */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  border: 0;
  padding: 0;
  white-space: nowrap;
  clip-path: inset(100%);
  clip: rect(0 0 0 0);
  overflow: hidden;
}

.hidden-list {
  list-style: none;
}

.u-bold {
  font-weight: 700;
}

.u-grey-font {
  color: var(--dim-text-colour);
}

.u-accent-font-color {
  color: var(--accent-text-colour);
}

/* * * * * * * * * * * * * * * * * * * * * * * * * */
/* components */
/* * * * * * * * * * * * * * * * * * * * * * * * * */

.container {
  max-width: 1200px;
  margin: 0 auto;
}

main.container {
  padding-top: 56px;
}

.section {
  margin: 30px;
}

.columns {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
}

.columns--about {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 20px;
  align-items: center;
}

.block {
  border: solid 2px var(--main-border-colour);
  border-radius: 10px;
  padding: 20px;
  line-height: 150%;
  overflow: hidden;
}

.block h2 {
  font-size: 2rem;
  font-family: "Overpass Mono", monospace;
  background-color: var(--header-bg-colour);
  margin: -20px;
  margin-bottom: 20px;
  padding: 15px;
  border-bottom: solid 2px var(--main-border-colour);
}

.block:target {
  animation: 2s block-target-animation;
}

.block:target h2 {
  animation: 2s h2-target-animation;
}

@keyframes block-target-animation {
  0% {
    border: solid 2px var(--main-border-colour);
  }
  30% {
    border: solid 2px var(--accent-text-colour);
  }
  99% {
    border: solid 2px var(--main-border-colour);
  }
}

@keyframes h2-target-animation {
  0% {
    border-bottom: solid 2px var(--main-border-colour);
  }
  30% {
    border-bottom: solid 2px var(--accent-text-colour);
  }
  99% {
    border-bottom: solid 2px var(--main-border-colour);
  }
}

.button,
.button:link,
.button:visited {
  display: inline-block;
  margin-top: 15px;
  padding: 10px 25px;
  background-color: #22262c;
  color: var(--main-link-colour);
  text-align: center;
  text-decoration: none;
  border: solid 2px #373b41;
  border-radius: 10px;
  font-weight: 700;
  transition: all 0.5s;
}

.button:hover {
  background-color: #31363e;
}

.button:active {
  color: #fff;
  background-color: #1875ff;
  border: solid 2px var(--main-link-colour);
}

.button-mobile-nav {
  margin: auto;
  margin-right: 10px;
  border: none;
  background: none;
  cursor: pointer;
  display: none;
  z-index: 999;
  position: relative;
}

.icon-mobile-nav {
  height: 4.8rem;
  width: 4.8rem;
  color: var(--bright-text-colour);
  transition: all 0.5s;
}

.icon-mobile-nav:hover {
  color: #babbbd;
}

.icon-mobile-nav[name="close-outline"] {
  display: none;
}

.content-link:link,
.content-link:visited {
  color: var(--main-link-colour);
  text-decoration: none;
}

.content-link:hover,
.content-link:active {
  text-decoration: underline;
}

/* * * * * * * * * * * * * * * * * * * * * * * * * */
/* header */
/* * * * * * * * * * * * * * * * * * * * * * * * * */

.header {
  background-color: var(--header-bg-colour);
  font-weight: 700;
  color: var(--bright-text-colour);
  max-height: 56px;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 10;
  box-shadow: 0px 10px 14px 1px rgba(23, 27, 33, 0.8);
}

.navigation__list {
  display: flex;
  gap: 30px;
}

.navigation-link {
  display: block;
  padding: 20px 10px;
}

.navigation-link:link,
.navigation-link:visited {
  text-decoration: none;
  color: inherit;
  transition: all 0.3s;
}

.navigation-link:hover,
.navigation-link:active {
  color: #babbbd;
}

.button__mobile-nav {
  position: relative;
  border: none;
  background: none;
  cursor: pointer;
  display: none;
  z-index: 999;
}

.avatar {
  margin: 20px 0;
  height: 300px;
  width: 300px;
  background-color: var(--main-border-colour);
  border-radius: 9999px;
  border: solid 2px var(--main-border-colour);
  outline: solid 2px #26282e;
  overflow: hidden;
}

@media not all and (min-resolution: 0.001dpcm) {
  .avatar {
    outline: none;
  }
}

.avatar img {
  width: 100%;
}

.title__name {
  letter-spacing: 0.17em;
  font-size: 3.6rem;
  font-weight: 700;
  text-transform: uppercase;
}

.title {
  font-size: 3.6rem;
  color: var(--main-link-colour);
}

.summary {
  font-size: 2rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: flex-start;
}

/* * * * * * * * * * * * * * * * * * * * * * * * * */
/* code example */
/* * * * * * * * * * * * * * * * * * * * * * * * * */

.code-section {
  grid-row: span 3;
  grid-column: span 2;
}

.color-keyword {
  color: #ee8277;
}

.color-function {
  color: #cbaaf9;
}

.color-operators {
  color: #89befa;
}

.color-quotes {
  color: #afd5fb;
}

/* * * * * * * * * * * * * * * * * * * * * * * * * */
/* projects */
/* * * * * * * * * * * * * * * * * * * * * * * * * */
.project-section {
  grid-column: span 3;
}

.project {
  color: var(--dim-text-colour);
}

.project p {
  font-size: 1.3rem;
  line-height: 110%;
  margin: 10px 0;
}

.project-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 20px;
  row-gap: 20px;
}

.project__image {
  max-height: 270px;
  max-width: 494px;
  border: solid 2px var(--main-border-colour);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 10px;
}

.project__image img {
  width: 100%;
  transition: all 0.5s;
  object-fit: cover;
}

.project__image:hover img {
  transform: scale(1.1);
  cursor: pointer;
}

.project__buttons {
  display: flex;
  gap: 20px;
}

/* * * * * * * * * * * * * * * * * * * * * * * * * */
/* courses */
/* * * * * * * * * * * * * * * * * * * * * * * * * */

.courses-section {
  grid-column: span 2;
  grid-row: span 2;
}

.course {
  padding: 10px 0;
}

.course:not(:last-child) {
  border-bottom: solid 2px var(--main-border-colour);
}

.course h3 {
  text-transform: capitalize;
}

/* * * * * * * * * * * * * * * * * * * * * * * * * */
/* footer */
/* * * * * * * * * * * * * * * * * * * * * * * * * */

.footer {
  border-top: solid 2px var(--main-border-colour);
  color: var(--dim-text-colour);
}

.rss-logo {
  display: block;
  width: 121px;
  height: 45px;
  fill: #707680;
  stroke: #707680;
  transition: all 0.5s;
}

.rss-logo:hover,
.rss-logo:active {
  fill: var(--dim-text-colour);
  stroke: var(--dim-text-colour);
}

.footer .section {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-link:link,
.footer-link:visited {
  color: var(--dim-text-colour);
}

.footer-link:hover,
.footer-link:active {
  color: var(--main-link-colour);
}
