:root {
  /* Colores principales */
    --color-negro-profundo: #0D0D0D;
    --color-rojo-vibrante: #E63946;

  /* Colores secundarios / neutros */
    --color-gris-oscuro: #1E1E1E;
    --color-gris-claro: #E0E0E0;
    --color-blanco-suave: #F5F5F5;

  /* Variaciones de rojo */
    --color-rojo-oscuro: #A41623;
    --color-rojo-suave: #FF6B6B;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', 'Montserrat', sans-serif;
  scroll-behavior: smooth;
}

body {
  background-color: var(--color-blanco-suave);
}
/* Header Section */

.header {
  width: 100dvw;
  padding: 10px 0 24px 0;
  position: fixed;
  top: 0;
  background-color: var(--color-gris-oscuro);
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all .3s;
  z-index: 100;
}

.header__nav {
  background-color: var(--color-negro-profundo);
  padding: 10px;
  display: none;
  position: relative;
}

label input[type="checkbox"] {
  display: none;
}

.header__nav-toggle {
  position: absolute;
  color: var(--color-blanco-suave);
  right: 0;
  top: 5px;
}

header:has(input[type="checkbox"]:checked) .header__nav, header:has(input[type="checkbox"]:checked) {
  padding-top: 34px;
  z-index: 20;
  width: 100dvw;
  display: flex;
  flex-direction: column;
  background-color: var(--color-gris-oscuro);
}

.header:has(input[type="checkbox"]:checked) .header__nav {
  border-top: 1px solid var(--color-gris-claro);
}

.nav__link {
  text-decoration: none;
  margin: auto;
  position: relative;
  top: 0;
  color: var(--color-blanco-suave);
  padding: 5px;
}

/* Hero Section */

.hero-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  background: linear-gradient(to top, var(--color-negro-profundo), #741623);
  padding: 20px;
  text-align: center;
}

.hero__img {
  margin-top: 5vh;
  order: -1;
  align-self: center;
  max-width: clamp(128px, 50%, 700px);
  display: flex;
  justify-content: center;
}

.hero__photo {
  width: 100%;
  height: auto;
  border-radius: 50%;
  filter: drop-shadow(0px 0px 2px var(--color-blanco-suave));
}


.hero-content {
  flex: 1;
  max-width: 700px;
  align-self: center;
}

.hero-buttons {
  display: flex;
  gap: 2rem;
  margin-top: 2rem;
}

@media screen and (max-width: 1023px) {
  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }
}

h1 {
  font-size: clamp(2rem, 10dvw, 7rem);
  margin: 2rem 0;
  color: var(--color-rojo-vibrante);
  text-shadow: 0 0 5px var(--color-negro-profundo);
  font-family: 'Raleway', sans-serif;
  font-weight: 700;
  letter-spacing: 1px;
  filter: drop-shadow(0 0 20px var(--color-rojo-vibrante));
  animation: h1anim infinite 10s ease;
}

@keyframes h1anim {
  from {
    translate: 0;
  }

  50% {
    translate: 0 1rem;
  }

  to {
    translate: 0;
  }
}

.hero__bio {
  max-width: clamp(200px, 75vw, 480px);
  text-shadow: 0px 0px 5px var(--color-negro-profundo);
  font-size: clamp(1.2rem, 5dvw, 5rem);
  font-weight: 500;
  text-wrap: pretty;
  margin: 1rem;
  margin-bottom: 3rem;
  color: var(--color-gris-claro);
  font-family: Helvetica, Times, serif;
  letter-spacing: 1px;
  text-align: center;
}

.hero__contact-button, .hero__work-button {
  text-decoration: none;
  color: var(--color-gris-oscuro);
  background-color: var(--color-rojo-vibrante);
  margin-top: 1.4rem;
  padding: 15px;
  min-width: clamp(250px, 40vw, 480px);
  text-align: center;
  border: none;
  border-radius: 20px;
  font-weight: bold;
  box-shadow: 0px 0px 20px var(--color-gris-oscuro);
}

.hero__work-button {
  background-color: var(--color-gris-claro);
}

/* HERO ENDS */

/* SKILLS SECTION */

.skills-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: linear-gradient(to bottom, var(--color-gris-oscuro), var(--color-negro-profundo));
}

.skills__grid-container {
  display: grid;
  align-items: start;
  grid-template-columns: 1fr
}

.skills-section__title {
  color: var(--color-blanco-suave);
  margin-top: 50px;
  font-family: 'Montserrat';
  font-weight: 600;
  letter-spacing: 1px;
}

.skill {
  margin: 20px;
  padding: 5px;
  display: flex;
  flex-direction: column;
  width: clamp(200px, 70dvw, 300px);
  background-color: var(--color-blanco-suave);
  color: var(--color-gris-claro);
  border-radius: 5px;
}

i {
  font-size: clamp(2.5rem, 30dvw, 5rem);
  text-align: center;
  text-shadow: 0px 0px 2px #3332;
  margin-right: 5px;
}
.skill__level {
  font-size: clamp(1rem, 2dvw, 1.5rem);
  overflow-wrap: break-word;
  color: #aaa;
  text-align: center;
}

.skill__soft {
  color: var(--color-gris-oscuro);
  text-align: center;
  font-size: clamp(1.5rem, calc(100% + 2dvw), 2.4rem);
}

/* SKILLS ENDS */

/* PROJECTS SECTION */

.projects-section {
  margin-top: 2rem;
}

.projects-section__title {
  font-size: 2rem;
  text-align: center;
}

.projects-container {
  display: grid;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.project {
  background-color: var(--color-rojo-suave);
  width: clamp(200px, 80vw, 800px);
  height: 100%;
  border-radius: 5px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.project__info {
  align-self: start;
}

.project__title {
  text-align: center;
  font-size: 1.7rem;
  font-family: 'Poppins';
  margin-top: 1rem;
}

.project__img {
  max-width: 90%;
  border-radius: 5px;
  margin: 3rem 0;
  transition: transform .3s;
}

.project__img:hover {
  transform: scale(1.05);
}


.project__description {
  font-weight: normal;
  font-family: 'Montserrat';
  color: var(--color-gris-claro);
  margin: 10px;
  text-wrap: pretty;
}

.project__skill {
  font-size: 2.5rem;
  filter: drop-shadow(0px 0px 2px #222);
  border-radius: 50%;
}

.project__link {
  text-decoration: none;
  font-family: 'Montserrat';
  padding: 10px;
  background-color: var(--color-rojo-vibrante);
  color: var(--color-negro-profundo);
  margin: 10px 0;
  border-radius: 10px;
  transition: all .3s;
}

/* PROJECTS ENDS */

/* ABOUT SECTION */

.about-section {
  background: linear-gradient(to bottom, var(--color-negro-profundo), var(--color-gris-oscuro));
  padding: 3rem 1rem;
  color: var(--color-blanco-suave);
}

.about__body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.about__body--text-container {
  text-align: justify;
  text-wrap-style: pretty;
  max-width: 80dvw;
}

.about__title {
  font-size: clamp(1.8rem, 6vw, 2.5rem);
  margin-bottom: 0.5rem;
  color: var(--color-rojo-vibrante);
  font-family: 'Raleway', sans-serif;
}

.about__text {
  font-size: clamp(1rem, 3vw, 1.1rem);
  line-height: 1.6;
  word-spacing: 2px;
  margin-bottom: 1.5rem;
  max-width: 90dvw;
}

.about__list {
  list-style: none;
  margin: 1rem 0;
}

.about__list li {
  position: relative;
  padding-left: 1.2rem;
  margin-bottom: 0.5rem;
}

.about__list li::before {
  content: '•';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--color-rojo-vibrante);
  font-size: 1.2rem;
  line-height: 1;
}

.about__link {
  color: #fff;
  font-weight: bold;
  text-decoration: none;
}

.about__link:hover {
  text-decoration: underline;
}

/* ABOUT ENDS */

/* CONTACT SECTION */
.contact-section {
  padding: 4rem 1rem;
  background-color: var(--color-gris-claro);
}

.contact-title {
  font-family: 'Raleway', sans-serif;
  color: var(--color-rojo-vibrante);
  text-align: center;
  margin-bottom: 2rem;
  font-size: clamp(1.8rem, 6vw, 2.5rem);
  letter-spacing: 1px;
}

.contact__form {
  max-width: 600px;
  margin: 0 auto;
  padding: 20px;
  border-radius: 5px;
  background-color: var(--color-blanco-suave);
}

.form__group {
  margin-bottom: 1.5rem;
}

.form__label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--color-gris-oscuro);
  font-family: 'Montserrat', sans--serif;
  font-weight: 600;
  font-size: 0.9rem;
}

.form__input,
.form__textarea {
  width: 100%;
  padding: 0.8rem;
  border: 2px solid var(--color-gris-claro);
  border-radius: 8px;
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  transition: all 0.3s ease;
  background-color: white;
}

.form__input:focus,
.form__textarea:focus {
  outline: none;
  border-color: var(--color-rojo-vibrante);
  box-shadow: 0 0 8px rgba(230, 57, 70, 0.2);
}

.form__textarea {
  resize: vertical;
  min-height: 150px;
}

.form__button {
  display: block;
  width: 100%;
  padding: 1rem;
  background-color: var(--color-rojo-vibrante);
  color: var(--color-blanco-suave);
  border: none;
  border-radius: 8px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.form__button:hover {
  background-color: var(--color-rojo-oscuro);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(230, 57, 70, 0.3);
}

/* CONTACT ENDS */

/* FOOTER SECTION */

footer {
  background-color: #000;
  color: var(--color-gris-claro);
  text-align: center;
  padding: 2rem 1rem;
  font-size: clamp(0.8rem, 2.5vw, 1rem);
}

footer a {
  color: var(--color-blanco-suave);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}

footer a:hover {
  color: var(--color-rojo-vibrante);
}

footer .footer-content {
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.5;
}

/* FOOTER ENDS */

/* MEDIA QUERIERS */

/* MEDIA QUERIES - VERSIÓN ESCRITORIO (min 1024px) */
@media screen and (min-width: 768px) {
  /* HEADER */
  .header {
    justify-content: space-between;
    padding: 15px 50px;
  }

  .header .header__nav-toggle {
    display: none;
  }

  .header__nav {
    display: flex;
    gap: 2rem;
    background-color: transparent;
    padding: 0;
    position: static;
  }

  .nav__link {
    position: relative;
    padding: 5px 10px;
    transition: color 0.3s;
  }

  .nav__link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-rojo-vibrante);
    transition: width 0.3s;
  }

  .nav__link:hover::after {
    width: 100%;
  }

  /* HERO SECTION */
  .hero-section {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    padding: 100px 5% 0;
    text-align: left;
  }

  .hero__img {
    order: 2;
    max-width: 35%;
    margin: 0 0 0 50px;
  }

  h1 {
    font-size: 4rem;
    text-align: justify;
    margin: 0 0 2rem;
    line-height: 1.1;
  }

  .hero__bio {
    text-align: left;
    margin: 0 0 3rem;
    max-width: 600px;
    font-size: 1.5rem;
  }

  .hero__contact-button,
  .hero__work-button {
    display: block;
    min-width: 300px;
    margin: 1rem 0;
    transition: 1s all;
  }

  .hero__contact-button:hover,
  .hero__work-button:hover {
    transform: translateY(-3px);
  }

  /* SKILLS SECTION */
  .skills__grid-container {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    padding: 2rem;
    max-width: 1200px;
  }

  .skill {
    width: 300px;
    margin: 0;
    transition: transform 0.3s;
  }

  .skill:hover {
    transform: translateY(-5px);
  }

  /* PROJECTS SECTION */
  .projects-container {
    grid-template-columns: repeat(3, 1fr);
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
  }

  .project {
    width: 100%;
    transition: transform 0.3s;
  }

  .project:hover {
    transform: scale(1.03);
  }

  .project__img {
    max-width: 350px;
  }

  .project__link:hover {
    transform: scale(1.05);
  }

  /* ABOUT SECTION */
  .about__body--text-container {
    max-width: 800px;
    padding: 2rem;
  }

  .about__text {
    font-size: 1.1rem;
  }

  /* CONTACT SECTION */
  .contact-section {
    padding: 6rem 2rem;
  }

  .contact-form {
    padding: 2rem;
    background: var(--color-blanco-suave);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  }

  /* FOOTER */
  footer {
    padding: 4rem 2rem;
  }
}

/* Añadir media query específica para móviles pequeños */
@media (max-width: 480px) {
  .hero__bio {
    font-size: 1rem;
    max-width: 90vw;
  }
  
  .hero-buttons a {
    min-width: 90%;
    padding: 12px;
    font-size: 0.9rem;
  }
  
  
  .project {
    width: 95vw;
  }
  
  .form__input, .form__textarea {
    font-size: 0.9rem;
  }
}

/* Mejorar touch targets */
.nav__link {
  padding: 12px 15px;
  min-height: 48px;
}

.hero__contact-button, .hero__work-button {
  min-height: 48px;
}

/* MEDIA QUERY INTERMEDIA (768px - 1023px) */
@media screen and (min-width: 768px) and (max-width: 1023px) {
  /* HERO STYLES */
  h1 {
    text-align: center;
    letter-spacing: 5px;
    font-size: clamp(4rem, 8vw, 7rem);
  }

  /* SKILLS GRID */
  .skills__grid-container {
    grid-template-columns: 1fr 1fr;
  }

  /* PROJECTS GRID */
  .projects-container {
    grid-template-columns: repeat(2, 1fr);
  }

  /* NAVEGACIÓN */
  .header__nav {
    gap: 1.5rem;
  }

  /* ABOUT SECTION */
  .about__body--text-container {
    max-width: 700px;
  }
}

/* AJUSTES GENERALES PARA TODAS LAS PANTALLAS GRANDES */
@media screen and (min-width: 768px) {
  /* HEADER */
  .header {
    padding: 15px 30px;
  }

  /* HERO BIO */
  .hero__bio {
    font-size: 1.8rem;
  }

  /* PROJECT TITLES */
  .project__title {
    font-size: 2rem;
  }

  /* FORM INPUTS */
  .form-input,
  .form-textarea {
    font-size: 1.1rem;
    padding: 1rem;
  }

  /* FOOTER LINKS */
  footer a {
    font-size: 1.1rem;
  }
}

/* END */