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

.page-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
  margin-top: 100px;
  padding: 20px;
}

/* ---------------------------------------------
   HEADER
--------------------------------------------- */
header {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: #1780c7;
  color: white;
  padding: 10px 15px;
  text-align: center;
  z-index: 1200;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
  transition: transform 0.3s ease;
}

header.hidden {
  transform: translateY(-100%);
  opacity: 0;
}

header nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
}

header nav a {
  padding: 10px 18px;
  color: #ffd700;
  text-decoration: none;
  font-weight: bold;
  border-radius: 6px;
  background-color: #005bb5;
  transition: background 0.3s, color 0.3s;
}

header nav a:hover,
header nav a.active {
  background-color: #003f66;
  color: #ffd700;
}

@media (max-width: 700px) {
  header nav {
    display: flex;
    flex-direction: column;
    /* enlaces en columna */
    align-items: center;
    /* centrados horizontalmente */
    gap: 8px;
    /* espacio entre enlaces */
    padding: 6px 0;
    /* menos padding */
  }

  header nav a {
    width: 80%;
    /* un poco de margen a los lados */
    max-width: 250px;
    /* opcional */
    text-align: center;
    padding: 8px 12px;
    font-size: 0.9rem;
    border-radius: 6px;
    /* opcional, mejora visual */
  }
}

/* ---------------------------------------------
   BODY
--------------------------------------------- */
body {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  scroll-behavior: smooth;
  background-color: #8dc3f7;
  background-image: radial-gradient(circle,
      rgba(255, 255, 255, 0.1) 1px,
      transparent 1px);
  background-size: 40px 40px;
}

/* ---------------------------------------------
   SECCIONES GENERALES
--------------------------------------------- */
section {
  padding: 25px 15px;
  text-align: center;
  max-width: 1000px;
  margin: 0 auto 20px auto;
  scroll-margin-top: 120px;
}

section:first-of-type {
  padding-top: 120px;
}

#Formacion {
  margin-top: -60px;
  padding-top: 15px;
}

#Formacion h2 {
  margin-top: 0;
}

#DatosInteres h3 {
  margin-top: 30px;
  font-size: clamp(1.1rem, 1.5vw, 1.35rem);
  color: #003f66;
}

/* ---------------------------------------------
   HERO
--------------------------------------------- */
.hero-section {
  margin-top: 20px;
  margin-bottom: 0px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Contenedor principal del hero */
.hero-content {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 20px;
  max-width: 1800px;
  margin: 20px auto;
  padding: 40px 20px;
  flex-wrap: nowrap;
  overflow-x: auto;
  width: 100%;
}

/* Texto */
.hero-text {
  flex: 1 1 240px;
  min-width: 180px;
  line-height: 1.5;
  text-align: justify;
}

.hero-text p {
  font-size: clamp(0.95rem, 1vw + 0.3rem, 1.1rem);
  margin-bottom: 0px;
  hyphens: auto;
}

.hero-text h2 {
  font-size: clamp(1.5rem, 2vw + 0.5rem, 2rem);
  margin-bottom: 10px;
  text-align: left;
}

/* Foto */
.hero-photo {
  flex: 0 1 300px;
  min-width: 240px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  justify-content: center;
  height: 100%;
  margin: 25px 0 0;
}

.hero-photo img {
  width: 100%;
  max-width: 250px;
  min-width: 180px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  object-fit: cover;
  margin-top: 10px;
  margin-bottom: 0px;
}

.hero-photo p {
  margin: 0;
  font-size: 0.9rem;
  color: #555;
}

/* Responsive */
@media (max-width: 700px) {
  .hero-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .hero-text,
  .hero-photo {
    flex: 1 1 100%;
    max-width: 600px;
    margin-bottom: 20px;
  }

  .hero-photo img {
    max-width: 180px;
  }
}

/* ---------------------------------------------
   FORMACION
--------------------------------------------- */
.Formacion-container {
  display: flex;
  justify-content: center;
  gap: 25px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.Formacion-container .proyecto-card,
.Experiencia-container .proyecto-card {
  padding: 20px;
  background-color: rgb(136, 226, 226);
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: background 0.3s, box-shadow 0.3s, transform 0.3s;
}

.Formacion-container .proyecto-card:hover,
.Experiencia-container .proyecto-card:hover {
  background-color: #63aae7;
  transform: translateY(-5px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}

.Formacion-container .proyecto-card {
  width: 220px;
  max-width: 300px;
}

/* ---------------------------------------------
   EXPERIENCIA
--------------------------------------------- */
.Experiencia-container {
  display: flex;
  flex-direction: column;
  gap: 25px;
  margin-top: 25px;
  align-items: center;
}

.Experiencia-container .proyecto-card {
  width: 100%;
  max-width: 850px;
  text-align: left;
  padding: 25px;
}

/* ---------------------------------------------
   CONTACTO
--------------------------------------------- */
.contact-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin-top: 25px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.contact-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  border-radius: 10px;
  font-weight: 700;
  text-decoration: none;
  color: white;
  font-size: 1.05rem;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s, box-shadow 0.3s, background 0.3s, color 0.3s;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
  white-space: nowrap;
  max-width: 300px;
  flex: 1 1 calc(50% - 10px);
  justify-content: center;
}

.contact-btn .icon {
  font-size: 1.4rem;
  width: 2rem;
  text-align: center;
}

.contact-btn.linkedin {
  background: linear-gradient(135deg, #0077b5, #00a0dc);
}

.contact-btn.github {
  background: linear-gradient(135deg, #333, #555);
}

.contact-btn.email {
  background: linear-gradient(135deg, #d14836, #ff5a4f);
}

.contact-btn.map {
  background: linear-gradient(135deg, #ff9800, #ffc04d);
}

.contact-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
}

.linktree-card {
  background: #0b7719;
  padding: 30px 25px;
  border-radius: 20px;
  text-align: center;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 12px 30px rgba(0, 92, 170, 0.18);
  margin: 0 auto 30px;
  border: 1px solid rgba(23, 128, 199, 0.14);
}

.avatar {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 20px;
  border: 3px solid #83ca40;
}

.title {
  color: #000000;
  font-size: 26px;
  font-weight: bold;
  margin-bottom: 10px;
}

.subtitle {
  color: #000000;
  font-size: 14px;
  margin-bottom: 25px;
}

.link-btn {
  display: inline-block;
  text-decoration: none;
  background: #000000;
  color: #ffffff;
  padding: 14px 18px;
  margin-bottom: 15px;
  border-radius: 12px;
  font-weight: bold;
  transition: 0.3s;
  width: calc(100% - 4px);
}

.link-btn:hover {
  background: #005bb5;
  transform: translateY(-2px);
}

@media (max-width: 700px) {
  .contact-buttons {
    flex-direction: column;
    gap: 12px;
    align-items: center;
  }

  .contact-btn {
    justify-content: center;
    width: auto;
    max-width: 300px;
    flex: 1 1 100%;
  }
}

/* ---------------------------------------------
   MODAL
--------------------------------------------- */
#modal {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
  z-index: 2000;
  max-width: 700px;
}

#modalOverlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1500;
}

/* ---------------------------------------------
   FOOTER
--------------------------------------------- */

footer {
  background: repeating-linear-gradient(45deg,
      #00274d,
      #00274d 5px,
      #003f66 5px,
      #003f66 10px);
  color: #cacaca;
  padding: 15px 20px;
  text-align: center;
  font-size: 0.95rem;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  box-shadow: 0 -3px 8px rgba(0, 0, 0, 0.25);
}

#footerContent {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

#footerContent .linea1,
#footerContent .linea2 {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
}

.group {
  display: flex;
  align-items: center;
}

.label,
.symbol,
.text {
  color: #cacaca;
  font-weight: 500;
}

.result {
  color: #ffd700;
  font-weight: bold;
  margin-left: 5px;
}

#clock {
  color: #87ceeb;
  font-style: italic;
  animation: blink 1s infinite;
}

@keyframes blink {

  0%,
  50%,
  100% {
    opacity: 1;
  }

  25%,
  75% {
    opacity: 0.5;
  }
}

.linea3 {
  display: flex;
  align-items: center;
  gap: 5px;
}

@media (max-width: 600px) {
  #footerContent {
    align-items: flex-start;
    /* alinea todo a la izquierda */
    padding-left: 15px;
    /* opcional: un pequeño margen */
  }

  #footerContent .linea1,
  #footerContent .linea2 {
    flex-direction: column;
    gap: 10px;
  }
}