@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600&display=swap");

html {
  scroll-behavior: smooth;
}

:root {
  --bg-color: #f7f7f7;
  --text-color: #333;
  --accent-color: #4caf50;
  --gradient-start: #dee5d4;
  --gradient-end: #f7f7f7;
  --font: "Poppins", sans-serif;
  --radiust: 12px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  width: 100%;
  font-family: var(--font), serif;
  background-color: var(--bg-color);
  color: var(--text-color);
}

#wrapper {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
  max-width: 1200px;
  margin: 0 auto;
}
/*_NAV_____________________________________________*/
nav {
  display: flex;
  justify-content: end;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem;
  background: var(--text-color);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

nav a {
  text-decoration: none;
  color: white;
  letter-spacing: 1px;
  font-size: 0.9rem;
  transition: transform 0.3s ease, filter 0.3s ease, opacity 0.3s ease;
  opacity: 0.8;
}

nav a:hover {
  transform: scale(1.2);
  opacity: 1;
}

.icon {
  width: 1.5rem;
  height: 1.5rem;
  transition: transform 0.3s ease, filter 0.3s ease, opacity 0.3s ease;
  opacity: 0.8;
}

.icon:hover {
  transform: scale(1.2);
  opacity: 1;
}
/*_________________________________________________*/
.dev-text {
  text-align: center;
  font-size: 0.9rem;
  letter-spacing: 1px;
  font-family: "Fira Code", monospace;
  font-weight: bold;
  display: inline-block;
  background: linear-gradient(
    20deg,
    #4caf50,
    #4caf50,
    #3f51b5,
    #4caf50,
    #e91e63,
    #4caf50
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
/*_________________________________________________*/
#main-content {
  background: white;
  margin: 1rem auto;
  width: 100%;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  border-radius: var(--radiust);
}
/*SWITCHER_________________________________________________*/
#switch-button {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
}

#toggleButton {
  position: relative;
  display: inline-block;
  width: 200px;
  height: 40px;
  border: none;
  border-radius: var(--radiust);
  cursor: pointer;
  overflow: hidden;
  background: transparent;
  transition: background 0.3s ease;
}

#toggleButton span {
  position: absolute;
  top: 0;
  width: 50%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.4s ease;
}

.left {
  left: 0;
  background: var(--gradient-start);
  opacity: 1;
  transition: color 0.4s ease;
}

.left:hover {
  color: var(--accent-color);
}

.right {
  right: 0;
  background: var(--gradient-start);
  opacity: 0.3;
  transition: color 0.4s ease;
}

.right:hover {
  color: var(--accent-color);
}

#toggleButton.active .left {
  opacity: 0.3;
}

#toggleButton.active .right {
  opacity: 1;
}

:not(.active) .left {
  opacity: 1;
}

:not(.active) .right {
  opacity: 0.3;
}
/*CONTENT_______________________________________________*/
#info {
  display: flex;
  flex-direction: row;
  justify-content: center;
  width: 100%;
  height: 50vh;
  min-height: 600px;
  position: relative;
}

#info-content {
  display: flex;
  flex-wrap: wrap;
  width: 50%;
  height: 100%;
  overflow: hidden;
  position: relative;
}

#skills,
#facts {
  width: 100%;
  height: 100%;
  position: absolute;
  transition: opacity 2s ease;
  padding: 20px;
}

#skills {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  visibility: visible;
  opacity: 1;
}

.skill-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: center;
  height: 100%;
}

.skill-container img {
  display: block;
  margin: 0 auto;
  width: 50px;
  height: 50px;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.skill-container img:hover {
  transform: scale(1.2);
}

.skill-container span {
  font-family: "Fira Code", monospace;
}

#facts {
  display: flex;
  flex-direction: column;
  visibility: hidden;
}

.fact-container {
  display: flex;
  flex-direction: column;
  margin: 0.5rem 0 1rem 0;
  padding: 0.2rem;
  width: 100%;
  text-align: center;
  border-radius: var(--radiust);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  background-color: white;
  transition: transform 0.3s ease;
}

.fact-container:hover {
  transform: translateY(-5px);
}

.fact-text {
  font-size: 0.9rem;
  color: var(--text-color);
}

.code-text {
  font-family: "Fira Code", monospace;
  font-weight: bold;
  display: inline-block;
  background: linear-gradient(
    20deg,
    #4caf50,
    #4caf50,
    #3f51b5,
    #4caf50,
    #e91e63,
    #4caf50
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradientMove 4s infinite alternate;
}

.photo {
  width: 50%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.photo img {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 1s ease, clip-path 1s ease;
  transform: translateX(70px);
}

#image1 {
  z-index: 1;
  opacity: 0;
}

#image2 {
  z-index: 2;
  clip-path: inset(0 0 0 0);
  opacity: 1;
}
/*PROJECTS_________________________________________________*/
.project-link a {
  text-decoration: none;
  color: var(--text-color);
  font-size: 1.2rem;
  transition: color 0.3s ease;
  padding: 0.5rem;
  background: white;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  background: linear-gradient(
    to right,
    var(--gradient-start),
    var(--gradient-end)
  );
  border-radius: var(--radiust);
  white-space: nowrap;
}

.project-link a:hover {
  color: var(--accent-color);
}

#projects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 3rem;
  padding: 1rem;
  text-align: center;
  max-width: 1200px;
  margin: 0 auto;
  justify-items: center;
}

.project-card {
  padding: 2rem;
  background: white;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  border-radius: var(--radiust);
}

.project-card-content {
  display: grid;
  grid-template-columns: 1fr;
  /* grid-template-columns: 1.5fr 1.2fr; */
  gap: 1rem;
  /* align-items: center; */
  height: 100%;
  justify-content: space-between;
}

.project-card-inner {
  position: relative;
  width: 100%;
  height: 230px;
  transform-style: preserve-3d;
  transition: transform 0.6s ease;
  cursor: pointer;
  /* border: 1px black solid; */
  margin-top: 1.5em;
}
#projects img {
  height: 12.5em;
  object-fit: cover;
  cursor: pointer;
  border-radius: var(--radiust);
  background: linear-gradient(
    to right,
    var(--gradient-start),
    var(--gradient-end)
  );
  /* border: 1px black solid; */
}

.project-card-front,
.project-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: var(--radiust);
  overflow: hidden;
}

.project-card-back {
  transform: rotateY(180deg);
}

.project-card-back iframe {
  height: 12.5em;
  width: 12.5em;
  border: none;
  border-radius: var(--radiust);
  object-fit: cover;
}

.project-card-inner.flipped {
  transform: rotateY(180deg);
}

.projects-header-text {
  text-align: center;
  font-size: 1.3rem;
  letter-spacing: 1px;
  color: var(--text-color);
}

.project-desc-text {
  font-size: 0.8rem;
  color: var(--text-color);
  line-height: 1.6;
  text-align: left;
  /* border: 1px black solid; */
}

.project-desc-text ul {
  margin-top: 0.5rem;
  padding-left: 1.5rem;
}

.project-desc-text ul li {
  margin-bottom: 0.5rem;
}

.project-desc-text p {
  /* margin-top: 0.9rem; */
  font-weight: bold;
  font-size: 0.8rem;
}

.project-card-front:hover .tooltip,
.project-card-back:hover .tooltip {
  display: block;
  opacity: 1;
}

.play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  /* background-color: rgba(126, 117, 117, 0.7); */
  cursor: pointer;
  border-radius: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0.55;
}

.play-icon:hover {
  transform: translate(-50%, -50%) scale(1.1);
}

/*FOOTER_________________________________________________*/
footer {
  margin-top: auto;
  text-align: center;
  padding: 0.9rem;
  background: var(--text-color);
  color: white;
  font-size: 0.9rem;
  letter-spacing: 1px;
}

footer p {
  margin: 0;
  opacity: 0.8;
}
/*MEDIUM_________________________________________________*/
@media (max-width: 1080px) {
  #info {
    min-height: 650px;
    padding: 0;
    margin: 0;
  }

  #projects {
    width: 90%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
    padding: 0;
    margin: auto;
  }

  .project-card {
    width: 100%;
    margin-bottom: 1rem;
  }

  .project-card-content {
    display: grid;
    /* grid-template-columns: 1fr;  */
    grid-template-columns: 1.5fr 1.2fr;
  }

  .project-desc-text p {
    text-align: center;
  }

  .project-desc-text ul li {
    margin: 0;
  }

  .project-desc-text p {
    margin: 0;
    font-size: 0.8rem;
  }

  .project-card-inner {
    margin: 1rem 0 0 0;
    padding: 0.1rem;
  }

  .project-link a {
    font-size: 1rem;
  }
}

/*SMALL_________________________________________________*/
@media (max-width: 700px) {
  #main-content {
    width: 90%;
  }

  .left,
  .right {
    font-size: 1rem;
    padding: 0.3rem;
  }

  #info-content {
    width: 100%;
    padding: 0;
    margin: 0;
  }

  #skills {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .skill-container img {
    width: 40px;
    height: 40px;
  }

  .skill-container span {
    font-size: 0.8rem;
  }

  .fact-text {
    font-size: 0.8rem;
  }

  .code-text {
    font-size: 0.7rem;
  }

  .photo {
    display: none;
  }

  /* #projects {
    width: 90%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
    padding: 0;
    margin: auto;
  } */

  .project-card-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.2em;
    /* grid-template-columns: 1.5fr 1.2fr; */
  }

  .project-link a {
    font-size: 0.9rem;
  }
}
/*MICRO_________________________________________________*/
@media (max-width: 300px) {
  #info {
    min-height: 750px;
  }

  .project-link a {
    text-decoration: underline;
    color: blue;
    font-size: 0.8rem;
    padding: 0.1rem;
    background: white;
    box-shadow: none;
    background: none;
    border-radius: 0;
  }

  .project-img {
    display: none;
  }

  footer,
  nav a {
    font-size: 0.6rem;
  }
}
