/* Estilo General */
* {
  box-sizing: border-box;
}

/* Body */
html, body {
  height: 100%;
  margin: 0;
}
body {
  display: flex;
  flex-direction: column;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif
}

/* Banner */
div #banner {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}
div #banner-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('https://images.unsplash.com/photo-1475296204602-08d15839e95f?q=80&w=1170&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D');
  background-size: cover;
  background-position: center;
  z-index: 0;
}
div #banner-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  z-index: 2;
  color: white;
  padding: 20px 40px;
  border-radius: 12px;
  background: transparent;
  pointer-events: auto;
  cursor: default;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
div #banner-content h1, div #banner-content p {
  position: relative;
  display: inline-block;
  margin: 0;
  transition: background 0.3s ease, color 0.3s ease, padding 0.3s ease, border-radius 0.3s ease;
  color: white;
  text-shadow: 0 0 6px rgba(0,0,0,0.7);
}
div #banner-content h1 { /* Cápsula blanca sólida para h1 */
  padding: 10px 30px;
  border-radius: 20px;
  background: #fff;
  animation: pulse 2s infinite ease-in-out;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
  color: #222;
}
div #banner-content p { /* p sin cápsula por defecto */
  padding: 0;
  border-radius: 0;
  opacity: 0.9;
  color: white;
}
div #banner-content:hover h1 { /* Cuando hover en banner-content, cápsula se mueve a p */
  background: transparent;
  padding: 0;
  border-radius: 0;
  color: #ccc;
  box-shadow: none;
  animation: none;
}
div #banner-content:hover p { /* Cuando hover en banner-content, p tiene cápsula y texto negro */
  background: #fff;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
  padding: 10px 30px;
  border-radius: 20px;
  opacity: 1;
  color: #222;
}
div #banner-content h1::after { /* Underline solo para h1 sin cápsula */
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 1px;
  background: white;
  opacity: 0;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.5);
  transition: opacity 0.3s ease;
}
div #banner-content:hover h1::after { /* Mostrar underline de h1 cuando pierde cápsula */
  opacity: 1;
}
div #banner-content p::after { /* Underline para p sin cápsula */
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 1px;
  background: white;
  opacity: 1;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.5);
  transition: opacity 0.3s ease;
}
div #banner-content:hover p::after { /* Ocultar underline de p cuando tiene cápsula */
  opacity: 0;
}

/* Encabezado */
header {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 3;
  width: 100%;
  padding: 20px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: white;
  box-sizing: border-box;
  background-color: rgba(0, 0, 0, 0.2); /* Fondo oscuro semitransparente */
  backdrop-filter: blur(8px); /* Blur del fondo */
  -webkit-backdrop-filter: blur(8px);
}
header .left, header .right {
  display: flex;
  gap: 20px;
  position: relative;
}
header .left .highlight { /* Menu (Izquierda) */
  position: absolute;
  background: white;
  border-radius: 6px;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.5);
  animation: pulse 2s infinite ease-in-out;
  transition: transform 0.3s ease, width 0.3s ease, height 0.3s ease, opacity 0.3s ease;
  z-index: 0;
  pointer-events: none;
  opacity: 1;
}
@keyframes pulse {
  0%, 100% {
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.5);
  }
  50% {
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.9);
  }
}
header .left a {
  position: relative;
  display: inline-block;
  padding: 8px 14px;
  font-weight: 500;
  text-decoration: none;
  color: white;
  z-index: 1;
  transition: all 0.3s ease;
}
header .left a.active, header .left a:hover {
  color: white;
  mix-blend-mode: difference;
}
header .right a img { /* Redes (Derecha) */
  width: 24px;
  height: 24px;
  filter: invert(70%);
  transition: filter 0.3s ease;
}
header .right a:hover img {
  filter: invert(100%);
}
header .icon-left {
  flex: 0 0 auto;
  width: 35px;
  height: 35px;
  pointer-events: none;
  user-select: none;
  filter: invert(70%);
  margin-right: 10px;
}
header .icon-left img {
  width: 100%;
  height: 100%;
  display: block;
}

/* Footer */
footer {
  background-color: #111;
  color: #898989;
  font-size: 12px;
  text-align: center;
  padding: 100px;
  padding-bottom: 75px;
}
footer hr {
  border: none;
  border-top: 1px solid #444;
  width: 80%;
  margin: 10px auto;
}
footer div {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 10px;
}
footer a {
  color: #ccc;
  text-decoration: none;
  transition: color 0.3s, border-bottom 0.3s;
  padding-bottom: 1px;
  border-bottom: 1px solid transparent;
}
footer a:hover {
  color: #fff;
  border-bottom: 1px solid #fff;
}

/* Contenido */
main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 400px;
  padding: 350px 40px;
  background-color: #25282b;
  margin-top: calc(80vw * 9 / 16); /* para dejar espacio al banner */
  z-index: 0;
}

/** Articulos **/

/* Base */

article {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1.5s ease, transform 1.5s ease;
}

article.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Descripcion y Experiencia */

article#description, article#experience {
  color: #ddd;
  max-width: 800px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-start;
  text-align: left;
}

article#description h1, article#experience h1 {
  font-size: 2.4rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 0 6px rgba(255, 255, 255, 0.2);
  margin: 0;
}

article#description p, article#experience p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #ccc;
  margin: 0;
  opacity: 0.95;
  max-width: 100%;
  width: 100%;
  text-align: left;
}

/* Bullet Points */

article#bulletPoints {
  color: #ddd;
  max-width: 800px;
  width: 100%;
  display: grid;
  gap: 24px;
  align-items: flex-start;
  text-align: left;
}

article#bulletPoints .bullet {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background-color: #2d2f33;
  padding: 20px 24px;
  border-radius: 16px;
  transition: all 0.3s ease;
  outline: 1px solid transparent;
}

article#bulletPoints .bullet:hover {
  transform: scale(1.02);
  outline: 1px solid #555;
  background-color: #35383d;
}

article#bulletPoints .icon {
  font-size: 1.8rem;
  flex-shrink: 0;
  margin-top: 4px;
  color: #fff;
}

article#bulletPoints .content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

article#bulletPoints .content h1 {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0;
  color: #fff;
  text-shadow: 0 0 4px rgba(255, 255, 255, 0.1);
}

article#bulletPoints .content p {
  font-size: 1rem;
  line-height: 1.6;
  color: #ccc;
  margin: 0;
  opacity: 0.9;
}

/*** Efectos ***/

/* Typewritter */

.typewriter {
  overflow: hidden; /* Ensures the content is not revealed until the animation */
  border-right: .2em solid white; /* The typwriter cursor */
  white-space: nowrap; /* Keeps the content on a single line */
  margin: 0 auto; /* Gives that scrolling effect as the typing happens */
  letter-spacing: .025em; /* Adjust as needed */
  animation: 
    typing 2s steps(30, end),
    blink-caret .5s step-end infinite;
}

/* The typing effect */
@keyframes typing {
  from { width: 0 }
  to { width: 100% }
}

/* The typewriter cursor effect */
@keyframes blink-caret {
  from, to { border-color: transparent }
  50% { border-color: white }
}

/*
Layout responsiva

Se encarga de que el menú y su contenido (dentro de la sección) se muestre de
forma vertical en lugar de horizontal
*/
@media (max-width: 600px) {
  section {
    -webkit-flex-direction: column;
    flex-direction: column;
  }
}