/* Global */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'DM Mono', monospace; /* Cambio: se unifica tipografía */
  background: radial-gradient(circle at center,#F8AD7C 45%, #a6b9e7 69%);
  background-attachment: fixed;
  background-size: cover;
  color: #333;
  text-align: center;

}

/* Header */
header {
  width: 100%;
  padding-top: 2rem;
  display: flex;
  justify-content: center;
}

.navbar {
  position: fixed;
  z-index: 10;
  border-radius: 18px;
  width: 60%;
  padding: 5px;
  display: flex;
  align-items: center;
  justify-content: space-between; /* Cambio: mejor distribución */
  box-shadow: 0 4px 20px rgba(243, 243, 243, 0.467);
  background: rgba(255, 255, 255, 0.333);
  backdrop-filter: blur(8px);
  animation: escala 6s infinite ease-in-out;
}

.adp img {
  width: 45px;
  cursor: pointer;
}

/* Navbar Links */
#nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 45px;
  align-items: center;
  transition: all 0.3s ease-in-out;
}

.navbar a {
  text-decoration: none;
  text-transform: lowercase;
  font-weight: 200;
  font-size: 18px;
  transition: color 0.3s;
  color: #333;
}

.navbar a:hover {
  color: #fff;
}

@keyframes escala {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

/* Mobile Menu Button */
.menu-toggle {
  display: none; /* Cambio: solo visible en mobile */
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
}

.menu-toggle span {
  width: 25px;
  height: 3px;
  background-color: #333;
  transition: 0.3s;
}

/* Intro */
.intro {
  padding: 5rem 0;
  margin: auto;
  display: flex;
  flex-direction: column;
  justify-content: start;
  align-items: start;
  width: 50%;
}

.intro h1 {
  font-size: 90px;
  text-transform: uppercase;
  margin: 40px 0 10px;
  text-align: start;
}

.intro p {
  font-size: 18px;
  font-weight: 100;
  margin-bottom: 18px;
  text-align: left;
  line-height: 1.3;
  width: 80%;
}

.links {
  padding: 2rem 0;
}

.links a {
  margin: 0 10px;
  padding: 10px 20px;
  background: #efefef;
  color: #333;
  border-radius: 30px;
  text-decoration: none;
  text-transform: uppercase;
  transition: background 0.3s;
  box-shadow: 0 4px 20px rgba(32, 32, 32, 0.166);
}

.links a:hover {
  background: #5d85e2;
  color: #fff;
}

/* Languages Section */
.languages {
  overflow: hidden;
  margin: 50px 0;
}

.marquee {
  display: flex;
  overflow: hidden;
  justify-content: flex-start;
  position: relative;
  width: 70%;
  margin: auto;
}

.marquee-content {
  display: flex;
  gap: 80px;
  width: max-content;
  animation: scroll 5s linear infinite;
}

.marquee-content img {
  width: 60px;
  height: 60px;
}

.marquee-content img:hover {
  opacity: 0.5;
}

@keyframes scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Projects Section */
.projects {
  padding: 10rem 5rem;
  display: flex;
  justify-content: center;
  gap: 6rem;
  width: 80%;
  margin: auto;
}

.project-txt {
  display: flex;
  flex-direction: column;
  justify-content: start;
  flex: 1;
  align-content: left;
}

.projects h3 {
  margin: 0;
  font-size: 60px;
  font-weight: 500;
  text-align: left;
  text-transform: uppercase;
}

.projects p {
  text-transform: uppercase;
  text-align: left;
  line-height: 1.3;
  font-size: 17px;
  font-weight: 400;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(200px, 1fr));
  gap: 5rem;
  flex: 1;
}

/* Cards */
.card-inner {
  position: relative;
  width: 100%;
  padding-top: 100%;
  transform-style: preserve-3d;
  transition: transform 0.8s;
  cursor:pointer;
}

.card:hover .card-inner {
  transform: rotateY(180deg);
}

.card-front, .card-back {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  backface-visibility: hidden;
  border-radius: 30px;
  font-weight: bold;
}

.card-back {
  transform: rotateY(180deg);
  font-size: 28px;
  color: #fff;
}

.card-back a{
  color: #fff;
  text-decoration: none;
}

/* Card Background Animations */
.card-front1{ 
  background-image: url(2.png);
  background-position: center; 
  background-size: cover; 
  animation: grow 4s infinite; 
}
.card-front2{ 
  background-image: url(4.png);
  background-position: center;
  background-size: cover; 
  animation: grow 4s infinite; }
.card-front3{ 
  background-image: url(4.png); 
  background-position: center;
  background-size: cover; 
  animation: grow 4s infinite; }
.card-front4{ 
  background-image: url(2.png); 
  background-position: center;
  background-size: cover; 
  animation: grow 4s infinite; }

@keyframes grow { 
  0% { transform: scale(1); } 
  50% { transform: scale(1.2); } 
  100% { transform: scale(1); } }

/* Form Section */
.contacto{ 
  color: #5d85e2; 
  font-size: 65px; 
}

.form-section { 
  display: flex; 
  justify-content: center; 
  align-items: center; 
  min-height: 60vh; }

.formulario { 
  display: flex; 
  flex-direction: column; 
  gap: 50px; 
  width: 500px; 
  margin-bottom: 5rem; }

.input-field, .textarea-field {
  background: transparent;
  border: none;
  border-left: 2px solid white;
  border-bottom: 2px solid white;
  padding: 12px;
  font-size: 16px;
  color: white;
  outline: none;
  resize: none;
}

.textarea-field { 
  height: 180px; 
}

.input-field::placeholder, .textarea-field::placeholder { 
  color:#5d85e2; 
  opacity: 0.8; }

.send{
  height: 50px;
  width: 150px;
  align-self: center;

  background: #5d85e2;
  border: white solid;
  border-radius: 10px;
  color: #fff;
}

/* Footer */
footer {
  margin-top: 50px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.449);
  border-top: 1px solid #ccc;
}

.info-footer{
  display: flex;
  justify-content: space-around;
  align-items: center;
}

footer .socials a { margin: 0 10px; transition: color 0.3s; }
footer .socials a:hover { color: #f07586; }

.socials a img{ animation: grow 4s ease-in-out infinite; }





/* Mobile: hasta 600px */
@media (max-width: 600px) {
  .navbar {
    width: 80%;
    justify-content: center;
  }

  #nav-links { 
    display: none; 
    flex-direction: column; 
    justify-content: center;
    align-items: center;
    width: 70%;
    gap: 1rem; 
    background: rgba(255,255,255,0.8); 
    position: absolute; 
    top: 5rem; 
    border-radius: 12px; 
    padding: 1rem; }

  #nav-links.active { 
    display: flex; }

  .menu-toggle { 
    display: flex; } /* muestra el icono del menú */

  .intro { 
    width: 90%; 
    padding: 2rem 1rem; 
    align-items: center; 
    text-align: center; }

  .intro h1 { 
    font-size: 48px; }

  .intro p { 
    font-size: 16px; 
    width: 100%; }

  .projects { 
    flex-direction: column; 
    width: 100%; 
    padding: 4rem 1rem; gap: 3rem; }

  .projects h3 { 
    font-size: 36px; 
    text-align: center; }

  .projects p { 
    text-align: center; 
    font-size: 15px; 
    padding: 2rem; }

  .grid { 
    grid-template-columns: 1fr; 
    gap: 2rem; 
    width: 100%; 
    padding: 2rem; }

  .formulario { 
    width: 90%; 
    padding: 2rem; 
    gap: 20px; }

  .contacto { font-size: 42px; }
  footer .info-footer { 
    flex-direction: column; 
    gap: 1rem; }
}

/* Tablets: 601px a 1199px */
@media (min-width: 601px) and (max-width: 1199px) {
  .navbar 
  { width: 80%; 
    gap: 2rem; }

  #nav-links { 
    display: flex; 
    gap: 30px; 
    position: static; 
    background: none; 
    flex-direction: row; 
    padding: 0; }

  .menu-toggle { 
    display: none; } /* icono desaparece */
}

/* Desktop: 1200px+ */
@media (min-width: 1200px) {
  .navbar 
  { width: 50%; 
    padding: 1rem 4rem; 
  }
  .intro { 
    width: 50%; 
    padding: 8rem 0 5rem 0; 
  }
  .intro p { 
    width: 60%; 
  }
  .projects { 
    width: 80%; 
  }
  .projects p { 
    margin-top: 5rem; 
    font-size: 20px; 
    text-align: left; 
    width: 80%; }

  .languages { 
    margin: 70px 0; 
  }
  .marquee { 
    width: 40%; 
  }
}
