:root {
  --text-color: #1a1c20;
  --link-color: #0099ff;
  --background-color: #eeeff1;
  --border-color: #b5b5b5;
  --primary-light: rgb(0, 153, 255);
  --card-bg-color: #ffffff;
  --card-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "JetBrains Mono", sans-serif;
  background-color: var(--background-color);
  height: 100dvh;
  color: var(--text-color);
  transition: background-color 0.3s ease-in-out, color 0.3s ease-in-out;
}

.dark {
  --text-color: #eeeff1;
  --link-color: #09f;
  --background-color: #1a1c20;
  --border-color: #555;
  --primary-light: #3498db;
  --card-bg-color: #2b2d31;
  --card-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

.disabled {
  pointer-events: none;
  color: gray;
  text-decoration: none;
  background-color: rgb(224, 224, 224);
}

a {
  color: var(--link-color);
  text-decoration: none;
}

/* NAVBAR */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 50px;
  height: 80px;
}

nav .left a {
  color: var(--text-color);
  font-size: 22px;
  font-weight: 600;
}

nav .right a {
  color: var(--text-color);
  margin: 0 10px;
  position: relative;
  padding: 5px 2px;
  transition: color 0.3s ease;
}

/* underline animado */
nav .right a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0%;
  height: 2px;
  background: var(--text-color);
  transition: width 0.3s ease;
}

nav .right a:hover {
  color: var(--text-color);
}

nav .right a:hover::after {
  width: 100%;
}

/* Botón destacado */
nav .right a:nth-last-child(2) {
  color: var(--background-color);
  background-color: var(--text-color);
  padding: 5px 15px;
  border-radius: 5px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Hover del botón destacado */
nav .right a:nth-last-child(2):hover {
  background-color: transparent;
  color: var(--text-color);
  border: 1px solid var(--text-color);
}

/* SECTION 1: HERO */
.gradient-underline {
  display: inline-block;
  position: relative;
}

.gradient-underline::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  height: 3px;
  width: 100%;
  background: linear-gradient(
    90deg,
    #000,
    #fff,
    #000
  );
  background-size: 200% 100%;
  animation: smooth-move 20s ease-in-out infinite;
  border-radius: 3px;
}

@keyframes smooth-move {
  0% {
    background-position: 0% 0%;
  }
  50% {
    background-position: 100% 0%;
  }
  100% {
    background-position: 0% 0%;
  }
}

.hero-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 50px;
  margin: 50px 0;
  margin-bottom: 100px;
  gap: 40px;
}
.hero-section .text {
  flex: 5;
}
.hero-section .text h1 {
  padding-bottom: 0px;
  margin-bottom: 30px;
  font-size: 45px;
}

.hero-section .text h2 {
  font-size: 25px;
}

.hero-section .text p {
  margin-top: 15px;
}
.hero-section .text .links {
  margin-top: 25px;
}
.hero-section .text .links a {
  display: inline-block;
  padding: 5px 10px;
  border: 2px solid var(--link-color);
  border-radius: 5px;
  margin-right: 10px;
  margin-bottom: 10px;
  transition: border-color 0.3s ease-in-out;
}
.hero-section .text .links a:hover {
  background-color: var(--primary-light);
  color: #ffffff;
}
.hero-section .headshot {
  flex: 2;
  display: flex;
  justify-content: right;
}
.hero-section .headshot img {
  width: 450px;
  height: 450px;
  object-fit: cover;
  border-radius: 100%;
}

/* EMOJI ANIMATION */
@keyframes wave {
  0% { transform: rotate(0deg); }
  10% { transform: rotate(14deg); }
  20% { transform: rotate(-8deg); }
  30% { transform: rotate(14deg); }
  40% { transform: rotate(-4deg); }
  50% { transform: rotate(10deg); }
  60% { transform: rotate(0deg); }
  100% { transform: rotate(0deg); }
}

.wave-emoji {
  display: inline-block;
  transform-origin: 70% 70%;
  animation-name: wave;
  animation-duration: 2.5s;
  animation-iteration-count: infinite;
  animation-timing-function: ease-in-out;
  animation-delay: 1s;
}

/* SECTION 2: SKILLS */
.skills-section {
  padding: 0 50px;
  margin-bottom: 100px;
}
.skills-section h2 {
  text-align: center;
  font-size: 25px;
}
.skills-section .text {
  text-align: center;
  margin-bottom: 20px;
}
.skills-section .cells {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}
.skills-section .cells .cell {
  gap: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 200px;
  padding: 10px 20px;
  margin: 10px;
  border: 1.5px solid var(--border-color);
  background-color: var(--card-bg-color);
  border-radius: 5px;
  transition: background-color 0.3s ease-in-out, border-color 0.3s ease-in-out;
}
.skills-section .cells .cell img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  border-radius: 2px;
}
.skills-section .cells .cell span {
  font-size: 18px;
}

/* SECTION 3: PROJECTS */
.projects-section {
  padding: 0 50px;
  margin-bottom: 100px;
}
.projects-section h2 {
  text-align: center;
  font-size: 25px;
  margin-bottom: 20px;
}
.project-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

.project {
  flex-basis: 314px;
  flex-grow: 1;
  flex-shrink: 1;
  display: flex;
  flex-direction: column;
  background-color: var(--card-bg-color);
  box-shadow: var(--card-shadow);
  border-radius: 16px;
  padding: 16px;
  transition: background-color 0.3s ease-in-out,
              box-shadow 0.3s ease-in-out,
              transform 0.3s ease-in-out;
}

.project:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.dark .project:hover {
  transform: translateY(-5px);
  box-shadow: 0 0 20px 0px #41404094;
}

.project .projectImg {
  width: 100%;
  height: auto;
}

.imgCont {
  width: 600px;
  height: fit-content;
}

.project h3 {
  margin-top: 10px;
}

.project .technologies {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 10px;
}
.project .tech {
  gap: 5px;
  display: flex;
  align-items: center;
  width: auto;
  padding: 4px 8px;
  margin: 0;
  border: 1.5px solid var(--border-color);
  border-radius: 5px;
  transition: border-color 0.3s ease-in-out;
}
.project .tech img {
  width: 16px;
  height: 16px;
  object-fit: contain;
  border-radius: 2px;
}
.project .tech span {
  font-size: 12px;
}

.project .project-description {
  margin-top: 10px;
}

.project .project-links {
  margin-top: auto;
  padding-top: 15px;
}
.project .project-links a {
  display: inline-block;
  padding: 5px 10px;
  border: 2px solid var(--link-color);
  border-radius: 5px;
  margin-right: 10px;
  margin-bottom: 10px;
  transition: border-color 0.3s ease-in-out;
}
.project .project-links a:hover {
  background-color: var(--primary-light);
  color: #fff;
}

/* SECTION 4: CONTACT */
.contact-section {
  padding: 0 50px;
  margin-bottom: 100px;
}
.contact-section h2 {
  font-size: 35px;
}
.contact-section .group {
  display: flex;
  gap: 20px;
}
.contact-section .group .text {
  flex: 3;
  margin-top: 20px;
}
.contact-section .group form {
  flex: 3;
  display: flex;
  flex-direction: column;
  margin-bottom: 50px;
}
.contact-section .group form input,
.contact-section .group form textarea {
  font-family: "JetBrains Mono", sans-serif;
  border: 2px solid var(--link-color);
  background-color: transparent;
  padding: 10px;
  margin-bottom: 15px;
  outline: none;
  resize: none;
  font-size: 16px;
  color: var(--text-color);
  transition: border-color 0.3s ease-in-out, color 0.3s ease-in-out;
}
.contact-section .group form button {
  font-family: "JetBrains Mono", sans-serif;
  height: 50px;
  padding: 10px;
  border: none;
  background-color: var(--link-color);
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  transition: 0.3s ease-in-out;
}
.contact-section .group form button:hover {
  filter: brightness(90%);
}

.g-recaptcha {
    padding-top: 10px;
  }

@media (max-width: 1600px) {
  .imgCont {
    width: 100%;
  }

  .project-container {
    padding: 20px;
  }
}

@media (max-width: 850px) {
  .hero-section .text h2 {
    font-size: 30px;
  }

  .hero-section .headshot img {
    padding: 20px;
  }
}

@media (max-width: 740px) {
  .hero-section {
    flex-direction: column-reverse;
  }
  .hero-section .headshot img {
    width: 300px;
  }
}

@media (max-width: 740px) {
  nav {
    padding: 0 20px;
  }
  nav .right a {
    font-size: 22px;
  }
  nav .right a:last-child {
    background-color: transparent;
    color: var(--text-color);
    padding: 0;
  }
  nav .right a span {
    display: none;
  }

  .hero-section {
    padding: 0 20px;
  }
  .hero-section .text h2 {
    font-size: 20px;
  }

  .skills-section {
    padding: 0 20px;
  }
  .skills-section .cells .cell span {
    font-size: 16px;
  }

  .projects-section {
    padding: 0 20px;
  }

  .project {
    flex-basis: 100% !important;
    max-width: 100%;
  }

  .project-container {
    padding-right: 20px;
  }

  .imgCont {
    width: 100%;
  }

  .contact-section {
    padding: 0 20px;
  }
  .contact-section .group {
    flex-direction: column;
  }
  .hero-section .headshot img {
    border-radius: 100% !important;
    width: 350px !important;
    height: 350px !important;
  }
}

@media (max-width: 500px) {
  nav .left a {
    font-size: 16px;
  }

  nav .right {
    flex-wrap: nowrap;
  }

  nav .right a {
    font-size: 18px;
    margin: 0 4px;
  }

  nav .right a:nth-last-child(2) {
    background-color: transparent;
    color: var(--text-color);
    padding: 0;
    border-radius: 0;
  }

  .hero-section .text {
    width: 300px;

    .gradient-underline {
      width: 300px;
    }
  }

  .project-container {
    gap: 15px;
    padding: 10px
  }

  .project {
    flex-basis: 100% !important;
    max-width: 100%;
  }

  .imgCont {
    width: 100%;
  }

  .project .projectImg {
    width: 100%;
    height: auto;
  }

  .hero-section .headshot img {
    border-radius: 100% !important;
    width: 350px !important;
    height: 350px !important;
  }

  .gradient-underline {
    width: 350px;
  }
}

@media (max-width: 340px) {
  nav .left a {
    font-size: 14px;
  }

  nav .right {
    flex-wrap: nowrap;
  }

  nav .right a {
    font-size: 15px;
    margin: 0 4px;
  }

  nav .right a:nth-last-child(2) {
    background-color: transparent;
    color: var(--text-color);
    padding: 0;
    border-radius: 0;
  }

  .hero-section .headshot img {
    width: 300px !important;
    height: 300px !important;
  }

  .gradient-underline {
    margin-right: 20px;
  }
}

@media (max-width: 265px) {
  nav {
    gap: 0px;
  }
  nav .left a {
    font-size: 14px;
  }

  nav .right {
    flex-wrap: nowrap;
    width: 80px;
  }

  nav .right a {
    font-size: 18px;
;
    margin: 0 4px;
  }

  nav .right a:nth-last-child(2) {
    background-color: transparent;
    color: var(--text-color);
    padding: 0;
    border-radius: 0;
  }

  .hero-section .headshot img {
    width: 250px !important;
    height: 250px !important;
  }

  .hero-section .text {
    width: 200px;
    font-size: 15px;

    h1 {
      font-size: 25px;
    }
  }
  
  .project {
    flex-basis: 100% !important;
    max-width: 100%;
    
  }

  .project-description {
    font-size: 13px;
  }
}