/* =========================================
   1. VARIABLES Y ESTILOS GLOBALES
   ========================================= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 100%;
}

::selection {
  background-color: hsla(40, 40%, 68%, 1);
  color: black;
}

body {
  font-family: system-ui, Arial, sans-serif;
  margin: 0;           
  padding: 26px;       
  background-color: hsla(21, 27%, 73%, 0.2);
  line-height: 1.6;
}
}

/* =========================================
   2. TIPOGRAFÍA Y ELEMENTOS BASE
   ========================================= */
h1, h2, h3 {
  text-align: center;
  margin: 1rem 0;
}

h1 {
  display: inline-block;
  width: fit-content;
  margin: 0 auto;
  margin-top: 0.6rem;
  padding: 1rem;
  border: 0px solid transparent;
  border-radius: 6px;
  background-color: hsla(40, 50%, 50%, 0.3);
  font-size: 2.5rem;
  font-weight:600;
  transition: 1.3s;
  color: hsla(40, 40%, 45%, 1);
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

h1:hover {
  /*transform: scale(1.03);*/
  text-decoration:none;
  border-top: 1px solid hsla(40, 50%, 50%, 0.3);
  border-bottom: 1px solid hsla(40, 50%, 50%, 0.3);
  padding-bottom: 25px;
  padding-top: 25px;
  border-color: hsla(40, 40%, 40%, 1);
}

h2 { font-size: 1.5rem; font-weight: bold; }
h3 { font-size: 1.25rem; font-weight: bold; }
h4 { font-size: 1.1rem; font-weight: bold; }

h2:hover, h3:hover, h4:hover, a:hover {
  color: hsla(55, 40%, 40%, 1);
}

p {
  padding: 10px;
  margin: 10px;
}

p + p {
  font-size: 1.1rem;
  font-weight: bolder;
}

p::first-line {
  font-size: 1.20rem;
  font-weight: bold;
}

.font-p {
  font-weight: normal;
  margin: 0 auto;
}

p .font-lighter {
  font-weight: normal;
}

a:link { color: hsla(40, 40%, 40%, 1); }
a[target="_blank"] { color: hsla(45, 20%, 40%, 1); }

hr {
  width: 100%;
  border: none;
  border-top: 1px solid hsla(45, 20%, 40%, 1);
  margin: 20px 0;
  background-color:hsla(20, 25%, 60%, 0.20);
}

.bold { font-weight: bold; }
.bold ~ p { font-weight:bold; }

/* =========================================
   3. LAYOUT PRINCIPAL Y COMPONENTES
   ========================================= */

/* --- HEADER --- */

header {
  display: block;
  padding: 1rem;       
  margin: 0;           
  height: 250px;
  background-color: hsla(40, 60%, 40%, 0.1);
  color: hsla(45, 20%, 40%, 1);
  border-radius: 3px;
  border: 2px solid transparent;
  text-align: center;
  transition: 2s;
}

header:hover {
  border-color: hsla(40, 40%, 40%, 1);
}

#subtitle {
  display: block;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 1.65rem;
  font-style: italic;
  font-weight: bold;
  transition: 1s;
  color: hsla(40, 40%, 55%, 1);
}

#subtitle::after {
  content: ""; 
  display: inline-block;
  width: 90px; 
  height: 90px;
  background-color: transparent; 
  background-image: url("../img/pc-img.svg");
  background-size: contain; 
  background-repeat: no-repeat;
  background-position: center; 
  margin-left: 20px;
  vertical-align: middle;
  transition: 1.8s;
}

#subtitle:hover::after {
    filter: brightness(65%) saturate(1) hue-rotate(2deg) brightness(0.7) contrast(1.5);
    transform: translateX(100px) translateY(-60px) scale(1.9);    
}

#subtitle::before {
  content: ""; 
  display: inline-block;
  width: 45px; 
  height: 45px;
  background-color: transparent; 
  background-image: url("../img/biblioteca-en-linea.svg");
  background-size: contain; 
  background-repeat: no-repeat;
  background-position: center; 
  margin-right: 25px;
  vertical-align: middle;
  transition: 1.8s;
}

#subtitle:hover::before {
    filter: sepia(20%) saturate(1) hue-rotate(2deg) brightness(0.8) contrast(1.1);
    transform: translateX(-100px) translateY(-60px) scale(1.9);
}

/* --- NAVEGACIÓN--- */
nav {
  display: block;
  width: 80%;
  text-align: center;
  padding: 1.2rem;
  margin: 0 auto;
  margin-top: 10px;
  margin-bottom: 10px;
  border-radius: 3px;
  border: 2px solid transparent;
  background-color: hsla(20, 25%, 60%, 0.20);
  box-sizing: border-box;
  color: hsla(40, 40%, 40%, 1);
  transition: 2s;
}

nav:hover {
  border-color: hsla(40, 40%, 40%, 1);
}

nav ul {
  display: inline-block;
  width: 100%;
  padding: 0;
  margin: 0;
  text-decoration-color: hsla(40, 40%, 40%, 1);
  color: hsla(40, 40%, 40%, 1);
}

nav a {
  display: block; /* Permite que el enlace ocupe todo el espacio del <li> */
  text-decoration: none;
  font-weight: bold;
  color: hsla(40, 40%, 40%, 1);
}

.button {
  display: inline-block;
  margin: 0 50px 0 50px;
  transition: 1.3s;
  border: 1px none hsla(45, 20%, 40%, 1);
  border-radius: 3px;
  color: hsla(40, 40%, 40%, 1);
}

.button:hover {
  transform: scale(1.35);
}

/* --- CONTENEDOR PRINCIPAL (MAIN) --- */
main {
  display: block;
  text-align: center; 
  width: 100%;
  max-width: 1600px;
  height: auto;     
  margin: 0;
  background-color: transparent;  
}


/* --- ARTICLE: About Me --- */

#about-me-article {
  display: inline-block;
  vertical-align: top;
  width: 73%; 
  height: auto;
  min-height: 470px;
  background-color: hsla(40, 45%, 65%, 0.4);
  border-radius: 3px;
  border: 2px solid transparent;
  padding: 1rem;
  box-sizing: border-box;
  transition: 2s;
}

#about-me-article:hover {
  border-color: hsla(40, 40%, 40%, 1);
}

#about-me-article img, aside img {
  display: block;
  margin: 0 auto;
}

#about-me-article h2, #about-me-article p {
  margin-top: 1rem;
  padding-left: 1rem;
  padding-right: 1rem;
}

#about-me-article h2 {
  display: inline-block;
  padding: 0rem;
  padding-left: 2.4rem;
  margin-bottom: 1.9rem;
  border: 0px solid transparent;
  transition: 1.2s;
  font-size: 1.7rem;
  font-weight: 600;
  color: hsla(40, 40%, 45%, 1);
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

#about-me-article h2:hover {
  text-decoration:none;
  border-top: 1px solid hsla(40, 50%, 50%, 0.3);
  border-bottom: 1px solid hsla(40, 50%, 50%, 0.3);
  padding-bottom: 15px;
  padding-top: 15px;
  border-color: hsla(40, 40%, 40%, 1);
  transition: 1s;

}

article h2::after {
  content: "💼";
  display: inline-block;
  margin-left: 10px;
  transition: 1.5s;
  transform: translateX(0px);
}

#about-me-article h2:hover::after {
  transform: translateX(120px) translateY(107px) scale(3);
}

#foto-perfil {
  display: block;
  padding: 0;
  width: 8rem;
  height: 8rem;
  border: 1px solid transparent;
  border-radius: 4px;
  transition: 1s;
  opacity: 0.85;
}

#foto-perfil:hover {
  transform: scale(1.20);
  border-color: hsla(40, 40%, 40%, 1);
}

#paragraph {
  margin: 0.3rem;
  line-height: 1.5;
  text-align: justify;
  color: hsla(35, 40%, 30%, 0.9);
  font-size: 1.15rem;
}

#paragraph::first-letter {
  font-size: 1.8rem;
  font-weight: bold;
  margin-right: 0px;
}

#paragraph2 {
  margin: 0.3rem;
  line-height: 1.5;
  text-align: justify;
  color: hsla(35, 40%, 30%, 0.9);
  font-weight: normal;
  font-size: 1rem;
}

/* --- SECTION: Interests --- */

#interests-section {
  display: inline-block;
  background-color: rgb(224, 214, 203);
  width: 80%;
  margin: 0 auto;
  border: 2px solid transparent;
  padding: 10px 20px 20px;
  box-sizing: border-box;
  text-align: center;
  transition: 1.3s;
}

#interests-section:hover {
  border-color: hsla(40, 40%, 40%, 1);
}

#interests-section h3 {
  display: block;
  width: fit-content;
  margin: 0 auto;
  color: hsla(40, 40%, 40%, 1);
  border: 0px solid transparent;
  transition: 1s;
  padding-bottom: 12px;
  padding-top: 12px;
  font-size: 1.2rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
}


#interests-section h3:hover {
  text-decoration: none;
  border-top: 1px solid hsla(40, 40%, 40%, 1);
  border-bottom: 1px solid hsla(40, 40%, 40%, 1);
  padding-bottom: 16px;
  padding-top: 16px;
  border-color: hsla(40, 40%, 40%, 1);
}



#interests-section ul {
  display: inline-block;
  text-align: center;
  margin: 0;
  padding: 0;
}

#interests-section li {
  display:inline-block;
  margin: 20px 60px 5px 60px;
  padding: 0;
  font-weight: bolder;
  color: hsla(35, 40%, 30%, 1);
}

#music {
  transition: 2s;
}

#music::before {
  content: "🎶 ";
}

#music:hover {
  transform: rotate(15deg);
}

#programming {
  transition: 2s;
}

#programming::before {
  content: "💻 ";
}

#programming:hover {
  transform: rotate(-15deg);
}

#exercise {
  transition: 2s;
}

#exercise::before {
  content: "🚴 ";
}

#exercise:hover {
  transform: rotate(15deg);
}

/* --- ASIDE: Enlaces Útiles --- */

aside {
  display: inline-block;
  vertical-align: top; 
  width: 26%; 
  height: auto;
  min-height: 470px; 
  background-color: rgb(224, 214, 203);
  border-radius: 3px;
  padding: 16px 16px 16px 21px;
  border: 2px solid transparent;
  font-size: 0.90rem;
  box-sizing: border-box;
  transition: 2s;
}

aside:hover {
  border-color: hsla(40, 40%, 40%, 1);
}

aside h2 {
  transition: 1s;
  padding: 1rem;
  max-width: 90%;
  border: 0px solid transparent;
  color: hsla(40, 40%, 45%, 1);
  font-size: 1.7rem;
  font-weight: 600;
  margin: 0 auto;
  margin-bottom: 25px;
  margin-top: 10px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

aside h2:hover {
  border-top: 1.2px solid ;
  border-bottom: 1.2px solid ;
  padding-bottom: 24px;
  padding-top: 24px;
  border-color: hsla(40, 40%, 40%, 1);
}

aside h2::before {
  content: "📌";
}

aside h4 {
  color: hsla(35, 40%, 30%, 1);
  transition: 1s;
}

aside ul {
  margin: 0 auto;
  padding:0.5rem;
  margin-bottom: 12px;
  margin-top: 10px; 
}

aside ul li {
  margin-top: 9px;
  margin-bottom: 9px;
}

.visitar-sitio {
  box-sizing: border-box;
  font-size: 1.rem;
}

.visitar-sitio::after {
  content: "↗";
}

#hombreTrabajandoEnPc {
  box-sizing: border-box;
  display: block;
  width: 5rem;
  height: 5rem;
  margin: 0 auto;
  padding: 0.6rem;
  transition: 0.9s;
}

#hombreTrabajandoEnPc:hover {
  transform: scale(1.07);
}

/* --- FOOTER --- */

footer {
  display: block;
  padding: 16px;
  width: 100%;       
  background-color: hsla(40, 45%, 65%, 0.4);
  text-align: center;
  color: hsla(40, 40%, 45%, 1);
  font-size: 0.95rem;
  font-weight: bold;
  margin: 0;         
}


footer h2 {
  display: inline-block;
  font-weight: bolder;
  padding-top: 0px;
  margin-top: 0px;
  color: hsla(40, 40%, 45%, 1);
}

footer p {
  margin-top: 0px;
  padding-top: 0px;
  color: hsla(40, 40%, 40%, 1);
}

footer p a {
  color: hsla(40, 40%, 40%, 1);
}

#small {
  margin: 0.2rem;
  padding: 0.2rem;
}

/* =========================================================
   TOUCH DEVICES: neutralizar hovers destructivos
   ========================================================= */
@media (hover: none) and (pointer: coarse) {
  header:hover,
  nav:hover,
  #about-me-article:hover,
  #interests-section:hover,
  aside:hover,
  h1:hover,
  .button:hover,
  #foto-perfil:hover,
  #hombreTrabajandoEnPc:hover,
  #about-me-article h2:hover::after,
  #subtitle:hover::before,
  #subtitle:hover::after {
    transform: none !important;
    filter: none !important;
    padding-top: inherit;
    padding-bottom: inherit;
  }
}

/* =========================================================
   SMALL PHONES
   ========================================================= */
@media (max-width: 480px) {
  body {
    padding: 12px;
  }

  header {
    height: auto;
    padding: 1rem 0.75rem;
  }

  h1 {
    display: inline-block;
    width: auto;
    max-width: 100%;
    font-size: 1.8rem;
    padding: 0.5rem 0.75rem;
  }

  #subtitle {
    display: block;
    font-size: 1rem;
    margin-top: 0.75rem;
    margin-bottom: 0.5rem;
    white-space: normal;
    text-align: center;
  }

  #subtitle::before,
  #subtitle::after {
    content: "";
    display: block;
    margin: 0.35rem auto;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    transform: none;
  }

  #subtitle::before {
    width: 18px;
    height: 18px;
  }

  #subtitle::after {
    width: 30px;
    height: 30px;
  }

  nav {
    width: 100%;
    padding: 0.8rem 0;
  }

  nav ul {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    text-align: center;
  }

  .button {
    display: block;
    width: 100%;
    margin: 8px 0;
    padding: 0.7rem 0;
  }

  main {
    width: 100%;
    padding: 0;
    margin: 0;
  }

  #about-me-article,
  aside,
  #interests-section {
    display: block;
    width: 100%;
    min-height: auto;
  }

  #about-me-article {
    margin: 0 0 20px 0;
  }

  aside {
    margin: 0 0 20px 0;
    padding: 1rem;
  }

  #about-me-article h2,
  aside h2,
  #interests-section h3 {
    display: block;
    width: 100%;
    margin: 0 0 1rem;
    padding: 0.5rem 0;
  }

  #about-me-article h2:hover::after {
    transform: none;
  }

  #foto-perfil {
    width: 45%;
    height: auto;
  }

  #interests-section {
    padding: 12px 10px 16px;
    text-align: center;
  }

  #interests-section ul {
    display: block;
    margin: 0;
    padding: 0;
  }

  #interests-section li {
    display: block;
    margin: 0.5rem 0;
  }

  #paragraph,
  #paragraph2 {
    text-align: left;
    font-size: 1rem;
    padding-left: 0;
    padding-right: 0;
  }

  footer {
    padding: 12px;
  }

  footer h2 {
    font-size: 1.3rem;
  }

  footer p {
    font-size: 0.9rem;
  }

  footer small {
    font-size: 0.8rem;
  }
}

/* =========================================================
   PHONES LARGE / SMALL TABLETS
   ========================================================= */
@media (min-width: 481px) and (max-width: 768px) {
  body {
    padding: 16px;
  }

  header {
    height: auto;
    padding: 1rem;
  }

  h1 {
    font-size: 2rem;
    width: auto;
    max-width: 90%;
  }

  #subtitle {
    font-size: 1rem;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    white-space: normal;
    text-align: center;
  }

  #subtitle::before {
    width: 22px;
    height: 22px;
    margin-right: 6px;
    vertical-align: middle;
  }

  #subtitle::after {
    width: 42px;
    height: 42px;
    margin-left: 6px;
    vertical-align: middle;
  }

  #subtitle:hover::after,
  #subtitle:hover::before {
      transform: none;
      filter: none;
  }

  nav {
    width: 100%;
    padding: 1rem 0;
  }

  nav ul {
    display: block;
    text-align: center;
  }

  .button {
    display: inline-block;
    width: 46%;
    margin: 8px 1%;
    vertical-align: top;
    padding: 0.7rem 0;
  }

  #about-me-article,
  aside,
  #interests-section {
    display: block;
    width: 100%;
    min-height: auto;
  }

  #about-me-article {
    margin: 0 0 20px 0;
  }

  aside {
    margin: 0 0 20px 0;
  }

  #foto-perfil {
    width: 35%;
    height: auto;
  }

  #interests-section {
    padding: 16px 12px 20px;
  }

  #interests-section ul {
    display: block;
    margin: 0;
    padding: 0;
    text-align: center;
  }

  #interests-section li {
    display: inline-block;
    margin: 0.4rem 0.7rem;
  }

  #paragraph,
  #paragraph2 {
    text-align: left;
    font-size: 1rem;
    padding-left: 0;
    padding-right: 0;
  }
}

/* =========================================================
   TABLETS / SMALL LAPTOPS
   ========================================================= */
@media (min-width: 769px) and (max-width: 1024px) {
  body {
    padding: 20px;
  }

  header {
    height: auto;
    padding: 1rem;
  }

  h1 {
    font-size: 2.2rem;
  }

  #subtitle {
    font-size: 1rem;
    white-space: nowrap;
    text-align: center;
  }

  #subtitle::before {
    width: 22px;
    height: 22px;
    margin-right: 6px;
  }

  #subtitle::after {
    width: 42px;
    height: 42px;
    margin-left: 6px;
  }

  #subtitle:hover::after {
      transform: scale(1.1);
  }

  nav {
    width: 90%;
    padding: 1rem;
  }

  .button {
    margin: 0 12px;
  }

  #about-me-article {
    width: 72%;
    min-height: 430px;
  }

  aside {
    width: 27%;
    margin-left: 1%;
    min-height: 430px;
  }

  #foto-perfil {
    width: 7rem;
    height: 7rem;
  }

  #interests-section {
    width: 80%;
  }

  #interests-section li {
    margin: 16px 24px 4px 24px;
  }

  #about-me-article h2:hover::after {
    transform: none;
  }
}