:root {
  --main-width: 1024px;
  --link-color: rgb(58, 123, 143);
  --yellow: rgb(255, 216, 0);
  --main-padding: 25px;
}

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

html {
  font-size: 10px;
  scroll-behavior: smooth;
}

body {
  font-family: "Poppins", sans-serif;
  font-size: 1.8rem;
}

body:before {
  content: "";
  position: fixed;
  top: 0;
  bottom: 0;
  z-index: -1;
  width: 100%;
  background: linear-gradient(to right bottom, #fec051, #3aa6be 85%);
  opacity: 0.4;
}

ul {
  list-style: none;
}

pre,
code {
  white-space: pre-line;
}

a {
  color: var(--link-color);
  transition: all 0.3s ease;
}

a:hover {
  text-decoration: none;
  opacity: 0.95;
}

.link {
  color: rgba(0, 0, 0, 1);
  text-decoration: none;
  background-image: linear-gradient(rgba(255, 216, 0, 0.5), rgba(255, 216, 0, 0.5));
  background-repeat: repeat-x;
  background-position: 0 88%;
  background-size: 0% 0%;
  transition: all 0.15s linear;
  border-radius: 3px;
}

.link:hover {
  background-size: 100% 100%;
}

.container {
  max-width: var(--main-width);
  margin: 0 auto;
  padding: 0 var(--main-padding) 30px;
}

.wrapper {
  max-width: var(--main-width);
  margin: 0 auto;
  padding: var(--main-padding);
  background-color: #ffffff;
  border-radius: 15px;
  box-shadow: 0 3px 26px 0 rgba(0, 0, 0, 0.2);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--main-padding) 0;
}

.header-image {
  object-fit: cover;
  width: 18rem;
  height: 180px;
  border-radius: 50%;
}

.main-title {
  font-size: 3rem;
  font-weight: 600;
}

.section {
  margin-bottom: 35px;
}

.section:last-child {
  margin-bottom: 0;
}

.section-title {
  position: relative;
  font-weight: 600;
  font-size: 2.4rem;
  border-bottom: 2px solid #ececec;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 50%;
  max-width: 15rem;
  height: 2px;
  background-color: var(--yellow);
}

.section-content {
  margin: 10px 0;
}

.section-content li {
  padding-left: 15px;
}

.section-content li::before {
  content: ">";
  padding-right: 5px;
  color: var(--link-color);
  margin-left: -15px;
}

.section-content li:hover:before {
  color: var(--yellow);
}

.nav {
  padding: 0 0 var(--main-padding);
}

.nav-list {
  display: flex;
  list-style-type: none;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px 10px;
}

.nav-item {
  transition: all 0.5s linear;
}

.nav-item:hover {
  animation: rotate-btn 1.5s linear infinite;
}

.nav-link {
  padding: 5px calc(var(--main-padding) * 0.7);
  color: #ffffff;
  background-color: var(--link-color);
  border-radius: 5px;
  text-decoration: none;
  opacity: 1;
}

.pre {
  margin: 0;
  padding: var(--main-padding);
  border-radius: 7px;
  background-color: #eeeeee;
}

.projects {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  row-gap: var(--main-padding);
}

.project {
  flex-basis: calc(50% - calc(var(--main-padding) / 2));
  display: flex;
  flex-direction: column;
  border-radius: 10px;
  text-align: center;
}

.project > a {
  line-height: 0;
}

.project:nth-child(odd) {
  margin-right: var(--main-padding);
}

.project__link {
  display: block;
  padding: var(--main-padding);
}

.project__image {
  object-fit: cover;
  height: 210px;
  width: 100%;
  border-radius: 10px;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

.project__image:hover {
  animation: rotate-block 2.5s linear infinite;
}

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

@media screen and (max-width: 520px) {
  :root {
    --main-padding: 15px;
  }

  html {
    font-size: 8px;
  }

  .header-container {
    flex-direction: column;
  }

  .header-info {
    order: 1;
    text-align: center;
    padding-top: var(--main-padding);
  }

  .nav-list {
    padding: var(--main-padding);
  }

  .projects {
    flex-direction: column;
  }

  .project:nth-child(odd) {
    margin-right: 0;
  }
}

@media screen and (min-width: 1024px) {
  .nav-list {
    justify-content: space-between;
    flex-wrap: wrap;
  }
}

@keyframes rotate-btn {
  0% {
    transform: rotateY(0deg);
  }

  25% {
    transform: matrix3d(1.01, 0.01, 0, 0.001, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  }

  75% {
    transform: matrix3d(0.99, -0.00495, 0, -0.001, 0, 0.99, 0, -0.0001, 0, 0, 1, 0, 0, 0, 0, 1);
  }

  100% {
    transform: rotateY(0deg);
  }
}

@keyframes rotate-block {
  0% {
    transform: rotateY(0deg);
  }

  25% {
    transform: matrix3d(1.002, 0.002, 0, 0.0002, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  }

  75% {
    transform: matrix3d(
      0.998,
      -0.000499,
      0,
      -0.0002,
      0,
      0.998,
      0,
      -0.00002,
      0,
      0,
      1,
      0,
      0,
      0,
      0,
      1
    );
  }

  100% {
    transform: rotateY(0deg);
  }
}
