:root {
  --bg-primary: #080808;
  --bg-secondary: #121212;
  --accent-primary: #00ffee;
  --accent-secondary: #00ffee74;
  --text-primary: #ecf0f1;
  --text-secondary: #212121;

}

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

body,
html {
  margin: 0;
  padding: 0;
  font-family: "Montserrat", sans-serif;
  background-image: linear-gradient(to bottom,
      var(--bg-primary),
      var(--bg-secondary));
  color: var(--text-primary);
}

h2 {
  align-self: center;
  font-size: 2.5rem;
  color: var(--accent-primary);
  letter-spacing: .2rem;
  margin-bottom: 3rem;
  font-weight: 500;
  opacity: .7;


}



/*Inicio header*/
nav {
  display: flex;
  background-color: transparent;
  position: relative;
  width: 100%;
  height: 8vh;
  padding: 1.5rem 0;
  z-index: 1000;
  font-size: 19px;
  align-items: center;
  animation: become-sticky linear both;
  animation-timeline: scroll(root);
  animation-range: 0 140vh;
}

nav.active {
  opacity: 1;
  background-color: #3434345f;
  backdrop-filter: blur(5px);
  transition: background .5s ease-in;
}

nav.inactive {
  transition: background .2s ease-out;
}

nav.heightActive {
  height: 35vh;
}

@keyframes become-sticky {
  to {
    opacity: 1;
    position: sticky;
    top: 0;
    left: 0;
  }
}

#menu-icon {
  display: none;
  font-size: 2rem;
  color: var(--text-primary);
  cursor: pointer;
}

#menu-icon.active {
  display: block;
  color: var(--accent-primary);
}

.nav-content {
  max-width: 80%;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-links {
  display: flex;
  gap: 1.4rem;
  list-style: none;
}

.nav-links:hover a {
  transform: scale(1.4);
}

.nav-links.active {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  right: 0;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 500;
  padding: 3px 0;
  border-bottom: 3px solid transparent;
  transition: border-bottom 0.6s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent-primary);
  border-bottom: 2px solid var(--accent-primary);
}

.nav-links li {
  transition: transform .2s;

  &:hover {
    transform: scale(1.1);
  }
}

#scroll-back {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 999;
  background: var(--accent-primary);
  color: var(--text-secondary);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: none;
  justify-content: center;
  align-items: center;
  font-size: 2em;
  padding: 0.78em;
  cursor: pointer;
  box-shadow: 0 0px 15px #3a3a4536;
  transition: background-color 0.3s ease, transform 0.3s ease;
  rotate: -90deg;
}

#scroll-back:hover {
  background-color: var(--accent-secondary);
  transform: scale(1.1);
}

/*Inicio sección hero*/
.hero {
  width: 100%;
  height: 100vh;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  background-color: #3434345f;
  animation: herovh 1s forwards .1s;
}

@keyframes herovh {
  to {
    height: 92vh;
  }
}

.hero-content p {
  color: var(--text-primary);
  font-weight: 600;
  font-size: 2rem;
  opacity: 0;
  transform: scale(0.6);
  animation: grow 1s forwards;
  margin-bottom: 1.5rem;
}

.hero-content h1 {
  opacity: 0;
  text-shadow: 0px 0px 10px rgba(0, 255, 238, 0.19);
  transform: scale(0.6);
  animation: grow .5s forwards;

}

.button-container {
  opacity: 0;
  transform: scale(0.6);
  animation: grow 1.8s forwards
}

@keyframes grow {
  0% {
    opacity: 0;
    transform: scale(0.8);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.hero-content .highlight {
  font-size: 8rem;
  color: var(--accent-primary);
}

.hero-content .social-links a {
  color: var(--text-primary);
  font-size: 2rem;

}

.hero-content .social-links a i {
  opacity: 0;
  transform: scale(0.6);
  animation: grow 1.4s forwards;
  margin: 10px 8px;
}

.hero-content .social-links a i:hover {
  text-shadow: 0px 0px 16px rgba(0, 255, 238, 0.53);

}

.button-container {
  margin-top: 1.5rem;

}

.split-button {
  position: relative;
  padding: 17px 25px;
  font-size: 16px;
  color: white;
  background-color: transparent;
  box-shadow: 0 0 3px var(--accent-primary);
  border: 2px solid var(--accent-primary);
  border-radius: 15px;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.3s ease;

  &:hover {
    box-shadow: 0 0 10px var(--accent-primary);
  }
}

.default-text {
  display: block;
  color: var(--accent-primary);
  font-weight: 600;
  transition: opacity 0.3s ease 0.3s;
}

.hover-text {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.split-button .hover-text .left,
.split-button .hover-text .right {
  color: var(--text-primary);
  width: 50%;
  text-align: center;
  padding: 17px 0;
  border: 1px solid var(--accent-secondary);
  text-decoration: none;
  background-color: transparent;
  transition: background-color 0.3s ease;
}

.split-button .hover-text .left:hover,
.split-button .hover-text .right:hover {
  background-color: var(--accent-secondary);
}

.split-button:hover .default-text {
  opacity: 0;
  transition-delay: 0s;
}

.split-button:hover .hover-text {
  opacity: 1;
}

/*Inicio de sección About Me*/
#about {
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin: 7rem auto;
  max-width: 75rem;
  padding: 6rem 0;
}

.about-content {
  display: flex;

  justify-content: space-between;
  border-radius: 1.25rem;
  width: 100%;
}

.about-text-image {
  display: flex;
  align-items: center;
  justify-content: space-between;


}

.about-text {
  display: flex;
  flex-direction: column;
  padding-top: 1rem;
  max-width: 53ch;
  text-align: left;
  font-size: 1.2rem;
  line-height: 1.6;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  gap: 1rem;
}

.about-image {
  filter: opacity(.7);
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;


}



/*Inicio sección Projects*/
#projects {
  display: flex;
  flex-direction: column;
  min-height: 70vh;
  margin: 4rem auto;
  max-width: 75rem;
  justify-content: center;
  padding: 6rem 0;
}

.projects-grid {
  display: flex;
  flex-direction: column;
  gap: 5rem;
  width: 90%;
  justify-content: center;
  align-items: center;
  margin: 0 auto;
}

.project-card {
  display: flex;
  gap: 2rem;
  padding: .5rem;
  background-color: var(--bg-primary);
  border: 1px solid var(--accent-primary);
  border-radius: 0.9375rem;
  box-shadow: 0 2px 10px 0 #00ffee5f;
  overflow: hidden;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  max-width: 100%;
  height: auto;
  view-timeline-name: --card;
  view-timeline-axis: block;
  animation-timeline: --card;
  animation-name: scroll;
  animation-range: entry 15% cover 25%;
  animation-fill-mode: both;

}

.project-description {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  padding: 2rem;
  max-width: 57ch;
}

.project-card:nth-child(2) {
  flex-direction: row-reverse;
}

.project-card h3 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--accent-primary);
}

.project-card p {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
}

.project-card:hover {
  box-shadow: 0 0 12px var(--accent-primary);
}

@keyframes scroll {
  from {
    opacity: 0;
    transform: scale(0.25);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.project-image {
  display: flex;
  height: 100%;
  width: 100%;
  align-self: center;
  justify-content: center;
}

.project-image img {
  box-shadow: 0px 5px 20px 2px #00ffee05;
  width: 400px;
  border-radius: 10px;
  object-fit: contain;
  transition: transform 0.2s ease;
}

.project-image img:hover {
  transform: scale(1.02);
}

.project-links {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.project-links .button {
  flex: 1;
  text-align: center;
  background-color: var(--accent-primary);
  align-content: center;
  color: var(--text-secondary);
  padding: 0.8rem 1.5rem;
  border-radius: 1.56rem;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
}

.project-links .button:hover {
  transform: scale(1.05);
  box-shadow: 0 5px 15px #00ffee29;
}

/*Inicio sección Experiencia*/
#experience {
  display: flex;
  flex-direction: column;
  gap: 4rem;
  margin: 10rem auto;
  max-width: 75rem;
  justify-content: center;
  padding: 6rem 0;
}

.experience-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  border-radius: 1.25rem;
  width: 100%;
}

.experience-text {
  padding-top: 1rem;
  max-width: 50ch;
  text-align: left;
  font-size: 1.2rem;
  line-height: 1.6;
  color: var(--text-primary);
}

.experience-timeline {
  list-style-type: none;
  font-size: 1rem;
}

.timeline {
  position: relative;
  padding-left: 30px;
}

.timeline-item {
  position: relative;
  padding-left: 30px;
  padding-bottom: 30px;

}

.timeline-item::before {
  background: linear-gradient(to bottom, var(--accent-primary), transparent);
}

.timeline li {
  list-style: none;
}

.timeline-item .circle {
  position: absolute;
  left: -12px;
  top: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 3px solid var(--accent-primary);
  background: black;
  box-shadow: 0 0 8px var(--accent-secondary);
  z-index: 1;
}

.timeline-item time {

  color: var(--text-primary);
  margin-bottom: 1rem;
  display: block;
  opacity: .7;

}

.timeline-item h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--accent-primary);
  margin: 0;
}

.timeline-item p {

  color: var(--text-primary);
  margin-top: 8px;
  line-height: 1.5;
}

.timeline-item:before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 2px;
  height: 170%;
  background-color: #e5e5e5;
  z-index: 0;
}

.timeline-item:last-child:before {
  content: none;
}


/* Inicio sección Contacto */
#contact {
  display: flex;
  flex-direction: column;
  min-height: 70vh;
  margin: 4rem auto;
  max-width: 75rem;
  padding: 6rem 0;
}

#contact form {
  display: flex;
  flex-direction: column;
  padding: 3rem;
  justify-content: space-between;
  border-radius: 12px;

}

#contact form label {
  margin-bottom: .4rem;
}

#contact form input {
  margin-bottom: 1rem;

  color: var(--text-primary);
  font-family: "Montserrat", sans-serif;
  border-radius: 8px;
  border: none;
  background-color: #080808;
  padding: 1rem;
}

#contact form input:focus-visible,
#contact form textarea:focus-visible {
  outline-color: var(--accent-primary);
}

#contact form textarea {
  margin-bottom: 1rem;
  resize: none;
  color: var(--text-primary);
  font-family: "Montserrat", sans-serif;
  border-radius: 8px;
  padding: 1rem;
  background-color: #080808;
  min-width: 380px;
  min-height: 100px;
  border: none;
}

#contact form button {
  background-color: #ffffffbb;
  font-family: "Montserrat", sans-serif;
  display: inline-flex;
  font-weight: 500;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  border-radius: 15px;
  padding: .5rem;
  width: fit-content;

  &:hover {
    background-color: white;
  }
}

#submitSvg {
  display: flex;
  margin-right: -.5rem;
}

.contact-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-direction: row;
  max-width: 75rem;
}

.contact-info {
  display: flex;
  flex-direction: column;
  border-radius: 1.25rem;
  min-width: 18rem;
}

.contact-info a {
  text-shadow: 0 0 3px transparent;
}

.link {
  text-decoration: none;
  color: var(--text-primary);
  font-size: 1rem;
  display: flex;
  align-items: center;
  min-width: 17.8125rem;
}

.contact-info a:hover {
  color: var(--accent-primary);
  text-shadow: 0 0 2px var(--accent-primary);
}

.contact-item {
  display: flex;
  width: fit-content;
  align-items: center;
  padding: 1rem;
  border-radius: 0.75rem;
  transition: all 0.3s ease;
}

.contact-item:hover i {
  transform: scale(1.3);
}

.contact-item i {
  font-size: 1.4rem;
  margin-right: 1.2rem;
  width: 2.8125rem;
  height: 2.8125rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--accent-primary);
  transition: all 0.3s ease;
}

.contact-item p {
  font-size: 1rem;
  color: var(--text-primary);
}

/* Sección Footer */
footer {
  text-align: center;
  padding: 2rem;
  color: var(--text-primary);
  background-image: linear-gradient(to top, var(--bg-primary), var(--bg-secondary));
}

/* Media queries */
@media screen and (max-width: 1000px) {

  .project-card,
  .project-card:nth-child(2) {
    max-width: 450px;
    padding: 0;
    flex-direction: column;
    height: 100%;
    align-items: center;
  }

  .project-image img {
    max-width: 450px;
    width: 100%;
  }

}

@media screen and (max-width: 800px) {
  .nav-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  #about,
  #projects,
  #contact,
  #experience {
    padding: 2rem 0.7rem;
  }

  .about-content,
  .contact-content {
    display: flex;
    flex-direction: column;
  }

  .contact-info {
    min-width: auto;
    padding: 0.4rem;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .about-image {
    display: flex;
    align-self: center;
    margin-top: 2rem;

  }

}

@media screen and (max-width: 650px) {
  h2 {
    align-self: center;
  }

  .hero-content .highlight {
    font-size: 3.6rem;
  }

  .hero-content p {
    font-size: 1.2rem;
  }

  .hero-content .social-links a {
    font-size: 1.7rem;
  }

  .split-button {
    padding: 12px;
  }

  nav {
    position: sticky;
    top: 0;
    left: 0;

  }

  .project-card {
    gap: 0;
  }

  .project-image img {
    border-radius: 0;
    border-bottom: 1px solid #00ffee;

  }

  #contact form {
    padding: 1rem;
  }

}

@media screen and (max-width: 500px) {
  h2 {
    font-size: 2rem;
  }

  #menu-icon {
    display: block;
  }

  .nav-links {
    display: none;
  }

  .contact-info {
    margin-top: 2rem;

  }

}

@media screen and (max-width: 430px) {
  h2 {

    font-size: 1.8rem;
  }

  .contact-item {
    padding-left: .5rem;
    padding-right: .5rem;
  }

  .project-links .button {
    flex: none;
    padding: .8rem .7rem;
  }

  #contact form input,
  #contact form textarea {
    min-width: auto;
  }

  .about-image {
    max-width: 200px;
  }

}

@media screen and (max-width: 300px) {
  .hero-content .highlight {
    font-size: 3rem;
  }
}