:root {
  --text-color: hsl(187, 91%, 13%);
  --bg-color: hsl(0, 0%, 90%);
  --bg-card-color: hsl(0, 0%, 98%); 
  --transition: color 0.1s, background-color 0.2s ease-in-out;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background-color: var(--bg-color);
  color: var(--text-color);
  transition: var(--transition);
  font-family: 'Roboto Mono', monospace;
}

body.dark {
  --text-color: hsl(0, 0%, 83%);
  --bg-color: hsl(186, 94%, 6%); /*#011b1e*/
  --bg-card-color: hsl(187, 91%, 13%); 

}

/* -------------------- Header -------------------- */
.header {
  display: grid;
  position: sticky;
  top: 0em;
  z-index: 1;
  grid-template-columns: 40% 60%;
  height: 5%;
  padding: 0 1.5em;
  background-color: var(--bg-card-color);
  transition: var(--transition);
}

.switches {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.toggle-theme {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.toggle-theme__icon {
  margin-right: 0.5em;
  width: 20px;
}

.toggle-theme__text {
  font-size: 0.8rem;
}

.languages {
  margin-left: 10%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.languages-container {
  display: flex;
}

.flags {
  width: 2em;
  cursor: pointer;
}

ul {
  list-style: none;
}

/* -------------------- Main -------------------- */
.image-background {
  background-image: url("/src/assets/images/matrix-356024_640.jpg");
  background-size: cover;
  color: hsl(0, 0%, 83%);
  height: 25em;
}

.text-animation-1 {
  animation-duration: 3s;
  animation-iteration-count: infinite;
  animation-name: slidein;
}

@keyframes slidein {
  from {
    margin-left: 70%;
  }

  to {
    margin-left: 0%;
  }
}

.text-animation-2 {
  animation-duration: 5s;
  animation-iteration-count: infinite;
  animation-name: slidein2;
}

@keyframes slidein2 {
  from {
    margin-left: 0%;
  }

  to {
    margin-left: 60%;
  }
}

.text-animation-3 {
  animation-duration: 1s;
  animation-iteration-count: infinite;
  animation-name: slidein3;
}

@keyframes slidein3 {
  from {
    margin-left: 0%;
  }

  to {
    margin-left: 85%;
  }
}

.text-animation-4 {
  animation-duration: 8s;
  animation-iteration-count: infinite;
  animation-name: slidein4;
}

@keyframes slidein4 {
  from {
    margin-left: 0%;
  }

  to {
    margin-left: 63%;
  }
}

.text-animation-5 {
  animation-duration: 4s;
  animation-iteration-count: infinite;
  animation-name: slidein5;
}

@keyframes slidein5 {
  from {
    margin-left: 0%;
  }

  to {
    margin-left: 63%;
  }
}

.text-animation-6 {
  animation-duration: 2s;
  animation-iteration-count: infinite;
  animation-name: slidein6;
}

@keyframes slidein6 {
  from {
    margin-left: 70%;
  }

  to {
    margin-left: 0%;
  }
}

.main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 10%;
  margin-top: 0%;
  flex-flow:column;
}

/* ---------- Main-Intro ---------- */
.intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 1.15em;
  text-align: center;
}

.intro-title {
  text-align: center;
}

/* ---------- Main-Skills ---------- */
.links {
  margin-top: 1em;
}

.skills-title {
  text-align: center;
}

.tech-images-container {
  display: grid;
  position: relative;
  padding: 2rem;
  grid-template-columns: 50% 50%;
}

.tech-images__js {
  width: 50%;
  grid-column-start: 1;
  margin-top: 25%;
  margin-left: 25%;
  animation: turn1 10s linear infinite;
}

.tech-images__nj {
  width: 50%;
  grid-column-start: 1;
  margin-left: 75%;
  animation: turn1 10s linear infinite;
}

@keyframes turn1 {
  to {
    transform: rotate(1turn);
  }
}

.tech-images__ts {
  width: 50%;
  grid-column-start: 2;
  margin-top: 25%;
  margin-left: 25%;
  animation: turn2 10s linear infinite;
}

@keyframes turn2 {
  to {
    transform: rotate(-1turn);
  }
}

.tech-images-frontend {
  display: grid;
  grid-template-columns: 20% 20% 20% 20% 20%;
}

.tech-images {
  width: 50%;
  margin-left: 25%;
  margin-top: 25%;
}

.skills-text {
  text-align: center;
  font-size: .6em;
}

.tech-images-backend {
  margin-top: 1em;
  display: grid;
  grid-template-columns: 20% 20% 20% 20% 20%;
}

.color-change {
  filter: invert(43%) sepia(94%) saturate(396%) hue-rotate(131deg) brightness(94%) contrast(92%);
}

/* ---------- Main-Projects ---------- */
.projects-background {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 1em;
}

.project-title {
  margin-block-start: 2em;
  text-align: center;
}

.projects {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 5%;
}

.projects-container {
  background-color: transparent;
  max-width: 300px;
  width: 100%;
  perspective: 1000px;
  min-height: 350px;
  transform-style: preserve-3d;
  transition: all 600ms;
  transform: translateZ(60px);
}

.card {
  border-radius: 1em;
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.8s;
  transform-style: preserve-3d;
}

.projects-container:hover .card {
  transform: rotateY(180deg);
}

.card-front, .card-back {
  box-shadow: 0 8px 14px 0 rgba(0, 0, 0, 0.2);
  position: absolute;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border: 1px solid hsl(116, 96%, 21%);
  border-radius: .5em; 
}

.card-front {
  background: rgb(71,91,139);
  background: linear-gradient(
    120deg, 
    rgba(71,91,139,1) 25%, 
    rgba(76,110,188,1) 41%, 
    rgba(103,132,197,1) 87%,
    rgb(21,46,105) 4%
  );
  color: rgb(21,46,105);
  display: grid;
  grid-template-rows: 50% 50%;
  justify-content: center;
  justify-items: center;
}

.text-container-front {
  grid-row-start: 2;
  margin-bottom: 5%;
}

.card-front-text {
  margin: 7%;
}

.card-back {
  background: rgb(21,46,105);
  background: linear-gradient(
    120deg, 
    rgba(21,46,105,0.9794292717086834) 25%, 
    rgba(36,84,196,1) 41%, 
    rgba(57,72,108,1) 87%,
    rgba(76,110,188,1) 4%
  );
  color: white;
  transform: rotateY(180deg);
}

.card-back-text {
  margin: 5%;
  font-size: .9em;
}

.image-container {
  width: 80%;
  grid-row-start: 1;
}

.projectone {
  margin-top: 1em;
  width: 100%;
  border-radius: .25em;
}

.deploy-container {
  display: grid;
  position: relative;
  grid-template-columns: 33.3% 33.3% 33.3%;
  font-size: .7em;
}

.deploy-frontend {
  grid-column-start: 1;
}

.deploy-repository {
  grid-column-start: 2;
}

.deploy-backend {
  grid-column-start: 3;
}

.backend-project {
  width: 45%;
  cursor: pointer;
}

/* -------------------- Footer -------------------- */
.footer {
  display: grid;
  grid-template-columns: 40% 60%;
  height: 5%;
  padding: 0 1.5em;
  margin-bottom: 0;
  background-color: var(--bg-card-color);
  transition: var(--transition);
}

.contact-title {
  font-size: 1.2em;
}

.footer-contacts {
  display: grid;
  grid-template-columns: 33.3% 33.3% 33.3%;
  align-items: center;
  justify-content: space-between;
}

.github-image {
  grid-column-start: 1;
  display: flex;
  justify-content: end;
  justify-items: end;
}

.linkedin-image {
  grid-column-start: 2;
  display: flex;
  justify-content: end;
  justify-items: end;
}

.email-image {
  grid-column-start: 3;
  display: flex;
  justify-content: end;
  justify-items: end;
}

.contact-image {
  width: 2em;
  cursor: pointer;
}



/* -------------------- Screens -------------------- */

/* Tablets */
@media screen and (min-width: 481px) and (max-width: 768px) {

  /* ---------- Main-Intro ---------- */
  .intro {
    font-size: 1.2em;
  }

  /* ---------- Main-Skills ---------- */
  .skills-text {
    font-size: .8em;
  }

  /* ---------- Main-Projects ---------- */
  .project-title {
    margin-block-start: 2.5em;
  }

  /* ---------- Footer ---------- */
  .contact-title {
    font-size: 1.3em;
  }

  .contact-image {
    width: 2em;
  }
}

/* Laptops */
@media screen and (min-width: 769px) and (max-width: 1024px) {

  /* ---------- Main-Intro ---------- */
  .intro {
    font-size: 1.2em;
  }

  /* ---------- Main-Skills ---------- */
  .skills-text {
    font-size: .8em;
  }

  /* ---------- Main-Projects ---------- */
  .project-title {
    margin-block-start: 2.5em;
  }

  .projects-background {
    margin-top: 1em;
    width: 100%;
    display: grid;
    grid-template-columns: 50% 50%;
    justify-content: center;
  }
  
  .projects {
    width: 90%;
    display: flex;
    justify-content: center;
    margin-left: 5%;
    margin-bottom: 5%;
  }

  /* ---------- Footer ---------- */
  .contact-title {
    font-size: 1.3em;
  }

  .contact-image {
    width: 2.6em;
  }
}

/* PC and big screen */
@media screen and (min-width: 1025px) {

  /* ---------- Main-Intro ---------- */
  .intro {
    font-size: 1.25em;
  }

  /* ---------- Main-Skills ---------- */
  .skills-text {
    font-size: .85em;
  }

  /* ---------- Main-Projects ---------- */
  .project-title {
    margin-block-start: 2.5em;
  }

  .projects-background {
    margin-top: 1.5em;
    width: 100%;
    display: grid;
    grid-template-columns: 33.3% 33.3% 33.3%;
    justify-content: center;
  }

  .projects {
    width: 90%;
    display: flex;
    justify-content: center;
    margin-left: 5%;
    margin-bottom: 5%;
  }

  /* ---------- Footer ---------- */
  .contact-title {
    font-size: 1.4em;
  }

  .contact-image {
    width: 2.85em;
  }
}