:root {
  --primary-bg: #FAFAFA;
  --primary-bg-dark: #0a0a0a;
  --primary-color: #4A5FC1;
  --accent-color: #00BFA6;
}

body {
  background-color: var(--primary-bg);
  transition: background-color 0.3s ease;
}

body.dark-mode {
  background-color: var(--primary-bg-dark);
  transition: background-color 0.3s ease;
}

header {
  height: 10dvh;
}

/* NAV */
nav {
  position: fixed;
  top: 0;
  width: 96dvw;
  display: flex;
  justify-content: end;
  margin: 15px;
  z-index: 3;
}

.navText {
  display: flex;
  width: 250px;
  justify-content: space-between;
  align-items: center;
}

.navText_mode {
  background-image: url("../img/luna.png");
  background-size: cover;
  width: 24px;
  height: 24px;
  border: none;
  background-color: transparent;
}

.navText_mode.foco {
  background-image: url("../img/luna_w.png") !important;
  background-size: cover;
  width: 24px;
  height: 24px;
  border: none;
  background-color: transparent;
}

.navText_link {
  text-decoration: none;
  color: black;
  font-family: "Nunito Sans", sans-serif;
  transition: background-color 0.3s ease;
}

body.dark-mode .navText_link {
  color: white !important;
  transition: background-color 0.3s ease;
}

.navText_link:hover {
  color: black;
}

.navText_button {
  background-color: var(--primary-color);
  border: none;
  color: white;
  padding: 6px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  border-radius: 12px;
  width: 100px;
  font-family: "Nunito Sans", sans-serif;
  transition: background-color 0.3s ease;
}

body.dark-mode .navText_button,
body.dark-mode .viewCV,
body.dark-mode .contact_form_button {
  background-color: var(--accent-color);
  transition: background-color 0.3s ease;
}

.navText_button:hover {
  opacity: 75%;
  color: white;
}

/* PRESENTATION */
.presentation {
  min-height: 90dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-evenly;
  text-align: center;
}

h1 {
  color: black;
  font-family: "Nunito Sans", sans-serif;
  font-weight: 700;
  transition: background-color 0.3s ease;
}

body.dark-mode h1 {
  color: white;
  transition: background-color 0.3s ease;
}

h2 {
  color: black;
  font-family: "Space Grotesk", sans-serif;
}

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

.techGroups {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.tech {
  background-color: var(--accent-color);
  border: 1px solid black;
  color: black;
  padding: 6px;
  margin: 6px;
  text-align: center;
  display: inline-block;
  border-radius: 12px;
  width: 120px;
  opacity: 0;
  transition: opacity 1s;
  animation: fadeIn 0.5s ease-in-out 1s forwards;
  font-family: "Space Grotesk", sans-serif;
  transition: background-color 0.3s ease;
}

@keyframes fadeIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

body.dark-mode .tech,
body.dark-mode .tec {
  background-color: var(--primary-color);
  color: white;
  border: 1px solid white;
  transition: background-color 0.3s ease;
}

.viewCV {
  background-color: var(--primary-color);
  border: none;
  color: white;
  padding: 6px;
  margin: 6px;
  text-align: center;
  display: inline-block;
  border-radius: 12px;
  width: 150px;
  height: 50px;
  opacity: 0;
  transition: opacity 1s;
  animation: fadeIn 1s ease-in-out 1.5s forwards;
  font-family: "Nunito Sans", sans-serif;
  font-weight: 700;
  transition: background-color 0.3s ease;
}

.viewCV:hover {
  opacity: 75% !important;
}

.more {
  background-color: black;
  border: none;
  color: white;
  padding: 6px;
  margin: 6px;
  text-align: center;
  display: inline-block;
  border-radius: 12px;
  width: 100px;
  height: 50px;
  text-decoration: none;
  padding-top: 13px;
  opacity: 0;
  transition: opacity 1s;
  animation: fadeIn 0.5s ease-in-out 1s forwards, shadows 3s infinite;
  position: relative;
  font-family: "Nunito Sans", sans-serif;
  font-weight: 700;
  transition: background-color 0.3s ease;
}

@keyframes shadows {
  0% {
    box-shadow: var(--primary-color) 0 0 20px;
  }
  50% {
    box-shadow: grey 0 0 20px;
  }
  75% {
    box-shadow: black 0 0 20px;
  }
  100% {
    box-shadow: var(--accent-color) 0 0 20px;
  }
}

.more:hover {
  opacity: 75%;
  color: white;
}

body.dark-mode .more {
  background-color: white;
  color: black;
  transition: background-color 0.3s ease;
}

.hidden {
  opacity: 0;
  transform: translateY(-100%);
  transition: opacity 0.5s, transform 0.5s;
}

.hidden2 {
  opacity: 0;
  transform: translateY(100%);
  transition: opacity 0.5s, transform 0.5s;
  color: var(--primary-color);
  transition: background-color 0.3s ease;
}

body.dark-mode .hidden2,
body.dark-mode h3,
body.dark-mode h4 {
  color: var(--accent-color);
  transition: background-color 0.3s ease;
}

.show {
  opacity: 1;
  transform: translateY(0);
}

/* PORTFOLIO */
.portfolio {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  background-color: #EEEEEE;
  transition: background-color 0.3s ease;
}

body.dark-mode .portfolio {
  background-color: #050505;
  transition: background-color 0.3s ease;
}

.hidden3 {
  opacity: 0;
  filter: blur(5px);
  transform: translateX(-100%);
  transition: all 1s;
}

.show3 {
  opacity: 1;
  filter: blur(0);
  transform: translateX(0);
}

.proyecto {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 20px 0;
  width: fit-content;
}

.proyecto:nth-child(1) {
  transition-delay: 400ms;
}

.proyecto:nth-child(2) {
  transition-delay: 200ms;
}

h3 {
  font-family: "Space Grotesk", sans-serif;
  font-size: calc(1.375rem + 1.5vw);
  color: var(--primary-color);
  transition: background-color 0.3s ease;
}

.mediaContainer {
  position: relative;
  display: inline-block; 
  width: 420px; 
  height: 280px; 
  overflow: hidden; 
  box-sizing: border-box;
  margin-bottom: 15px;
}

.proyecto_imagen, .media-video {
  margin-bottom: 20px;
  border-radius: 12px;
  border: 3px black solid;
  width: 100%;
  height: 100%;
  object-fit: cover; 
  box-sizing: border-box; 
  transition: background-color 0.3s ease;
}

body.dark-mode .proyecto_imagen,
body.dark-mode .contact_photo {
  border: 3px white solid;
  transition: background-color 0.3s ease;
}

.mediaContainer:hover .proyecto_imagen {
  display: none; /* Hide image when hovering */
}

.mediaContainer:hover .media-video {
  display: block; /* Show video on hover */
}

.proyecto_texto {
  width: 70%;
  font-family: "Nunito Sans", sans-serif;
  text-align: center;
  color: black;
  transition: background-color 0.3s ease;
}

body.dark-mode .proyecto_texto {
  color: white;
  transition: background-color 0.3s ease;
}

.proyecto_links {
  display: flex;
  align-items: center;
  width: 70%;
  justify-content: space-around;
}

.proyecto_links_tec {
  display: flex;
  width: 70%;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.tec {
  background-color: var(--accent-color);
  border: 1px solid black;
  color: black;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  width: 40px;
  margin: 0 2px;
  height: 40px;
  font-size: larger;
  transition: background-color 0.3s ease;
}

.proyecto_links_visit {
  background-color: black;
  border: none;
  text-decoration: none;
  color: white;
  margin: 6px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 12px;
  width: 65px;
  height: 40px;
  transition: opacity 1s;
  animation: shadows 3s infinite;
  position: relative;
  font-family: "Nunito Sans", sans-serif;
  font-weight: 700;
  transition: background-color 0.3s ease;
}

.proyecto_links_visit:hover {
  color: white;
}

body.dark-mode .proyecto_links_visit {
  background-color: white;
  transition: background-color 0.3s ease;
  color: black;
}

/* CONTACT */
.contact {
  min-height: 92dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-evenly;
}

.contact_photo {
  width: 200px;
  height: 200px;
  border-radius: 150px;
  margin-top: 30px;
  border: 3px solid black;
  transition: background-color 0.3s ease;
}

h4 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 2.5rem;
  color: var(--primary-color);
  transition: background-color 0.3s ease;
}

.contact_form {
  display: flex;
  flex-direction: column;
  width: 300px;
  align-items: center;
}

.contact_form_field {
  border-radius: 12px;
  width: 100%;
  margin: 5px;
  font-family: "Nunito Sans", sans-serif;
  text-align: center;
  border: var(--accent-color) 1px solid;
  transition: background-color 0.3s ease;
}

body.dark-mode .contact_form_field {
  border: #6A7FDB 2px solid;
  transition: background-color 0.3s ease;
}

.contact_form_field:focus {
  outline: none;
  border: var(--accent-color) 3px solid;
  transition: background-color 0.3s ease;
}

body.dark-mode .contact_form_field:focus {
  outline: none;
  border: #6A7FDB 4px solid;
  transition: background-color 0.3s ease;
}

.contact_form_button {
  background-color: var(--primary-color);
  border: none;
  color: white;
  padding: 6px;
  margin: 6px;
  text-align: center;
  display: inline-block;
  border-radius: 12px;
  width: 150px;
  height: 50px;
  font-family: "Nunito Sans", sans-serif;
  font-weight: 700;
  transition: background-color 0.3s ease;
}

.contact_form_button:hover {
  opacity: 0.8;
}

footer {
  display: flex;
  height: 8dvh;
  justify-content: center;
  margin-bottom: 10px;
}

.contact_links_link {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: black;
  border: none;
  color: white;
  padding: 6px;
  border-radius: 12px;
  width: 40px;
  margin: 5px;
  padding: 0;
  height: 40px;
  margin-bottom: 5px;
  transition: background-color 0.3s ease;
}

.contact_links_link:hover {
  color: white;
}

body.dark-mode .contact_links_link {
  background-color: white;
  color: black;
  transition: background-color 0.3s ease;
}

/* MEDIA SCREENS */
@media screen and (max-width: 1300px) {
  .portfolio {
    flex-direction: column;
    height: auto;
  }
  .proyecto {
    width: 60%;
  }
  .proyecto_links {
    width: 50%;
  }
}

@media screen and (max-width: 1080px) {
  .proyecto {
    width: 75%;
  }
}

@media screen and (max-width: 800px) {
  .proyecto {
    width: 90%;
  }
  .proyecto_links {
    width: 60%;
  }
  .tec {
    margin: 2px;
  }
}

@media screen and (max-width: 500px) {
  .navText {
    width: 150px;
  }
  .navText_button {
    display: none;
  }
  .proyecto {
    margin-bottom: 45px;
  }
}

@media screen and (max-width: 420px) {
  .mediaContainer {
    width: 320px;
    height: 180px;
  }
  .proyecto_links_tec {
    width: 60%;
  }
  .contact_form {
    width: 90%;
  }
  .contact_photo {
    width: 70%;
    height: auto;
  }
}


