/* ===========================
   Estilos globales
   =========================== */
* {
  box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #091a28;
    color: #fff;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ===========================
   Header / Navbar
   =========================== */
.header-bar {
    background-color: #091a28;
    min-height: 70px;            /* flexible en lugar de height fijo */
    display: flex;
    align-items: center;
    position: relative;          /* referencia para dropdown absolute */
    z-index: 1000;
    overflow: visible;           /* permite que el dropdown no sea recortado */
    padding: 0 1rem;
}

/* Foto circular */
.foto {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 50%;
}

/* Nombre */
.nombre {
    color: #ffffff;
    font-size: 20px;
    margin: 0;
    line-height: 1;
}

/* Forzar que .nav use flex para alinear elementos */
.nav {
    display: flex;
    align-items: center;
}

/* Menú principal (links) */
.paginas .nav-link {
    color: #ffffff !important;
    font-size: 16px;
    text-decoration: none !important;
    margin: 0 10px;
}

.paginas .nav-link:hover {
    color: #dcdcdc !important;
}

/* Redes sociales */
.redes .nav-link {
    color: #ffffff !important;
    font-size: 18px;
    padding: 6px;
}

.redes .nav-link:hover {
    color: #dcdcdc !important;
}

/* Estilo del botón dropdown (móvil) */
.dropdown-toggle {
    color: #ffffff;
    border-color: #ffffff;
    font-size: 14px;
}

.dropdown-toggle:hover {
    background-color: #0d1c34;
    border-color: #ffffff;
}

/* ===========================
   Dropdown menu (reparado)
   =========================== */
/* Hacemos que el menú desplegable sea absoluto y con alto z-index para que no quede recortado */
.dropdown-menu {
    position: absolute !important;
    top: calc(100% + 6px);    /* aparece justo debajo del botón */
    right: 10px;              /* alineado a la derecha */
    left: auto;
    z-index: 2000;
    background-color: #091a28; /* mantener tema oscuro */
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px;
    padding: 0.25rem 0;
    box-shadow: 0 6px 18px rgba(0,0,0,0.35);
    min-width: 170px;
}

/* Items dentro del dropdown (blancos para legibilidad) */
.dropdown-item {
    color: #ffffff;
    padding: 8px 16px;
    display: block;
    font-weight: 500;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background-color: rgba(255,255,255,0.04);
    color: #ffffff;
}

/* Si usas dropdown-menu-end, aseguramos alineación correcta */
.dropdown-menu.dropdown-menu-end {
    right: 10px;
    left: auto;
}

/* ===========================
   Hero / Secciones principales
   =========================== */
.hero {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 12px;
    text-align: center;
    color: #fff;
    width: 100%;
    flex-grow: 1;
}

/* Nombre con dos colores (usa spans con las clases) */
.hero-name {
    font-size: 4vw; /* responsive */
    font-weight: bold;
    margin: 0;
}

.nombre-blanco { color: #ffffff; }
.nombre-azul   { color: #00bfff; }

/* Títulos y subtítulos */
.hero-title { font-size: 2vw; margin: 5px 0; }
.hero-info  { font-size: 1.2vw; color: #d1d1d1; margin: 2px 0; }

/* Ajustes para pantallas pequeñas */
@media (max-width: 768px) {
    .hero-name { font-size: 8vw; }
    .hero-title { font-size: 4vw; }
    .hero-info  { font-size: 3vw; }

    /* header flex-wrap para que no corte en móviles */
    .header-bar { flex-wrap: wrap; padding: 0.5rem 1rem; }
    .nav.redes { margin-top: 0.5rem; }
}

@media (max-width: 480px) {
    .hero-name { font-size: 9.5vw; }
    .hero-title { font-size: 5.5vw; }
    .hero-info  { font-size: 3.5vw; }
}

/* ===========================
   Contacto
   =========================== */
.contacto-section {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 4rem 2rem;
  min-height: 70vh; /* Empuja el footer hacia abajo */
}

.contacto-section h2 { font-size: 2rem; font-weight: bold; margin-bottom: 1rem; }
.contacto-section p  { font-size: 1.1rem; margin-bottom: 0.5rem; }

.contacto-section a { color: #1e90ff; text-decoration: none; font-weight: 500; }
.contacto-section a:hover { text-decoration: underline; }

/* ===========================
   Footer
   =========================== */
footer.footer {
  background-color: #212529;
  color: white;
  text-align: center;
  padding: 1rem 0;
  font-size: 0.9rem;
  width: 100%;
  position: relative; /* para asegurar que no se superponga */
  margin-top: auto; /* empuja footer al final de la página */
}

/* ===========================
   Logo genérico
   =========================== */
.logo {
  width: 200px;
  height: auto;
  display: block;
  margin-bottom: 1rem;
}

/* ===========================
   Tarjetas de proyectos
   =========================== */
.proyecto-card {
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.03);
}

.proyecto-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

/* Card body: texto claro (útil si usas imagenes con fondo claro) */
.proyecto-card .card-body { color: #fff; }

/* Listas dentro de tarjetas */
.proyecto-list {
    padding-left: 1rem;
    margin-top: 0.5rem;
    font-size: 0.95rem;
    line-height: 1.4;
    list-style-type: disc;
}

.proyecto-list li { margin-bottom: 0.5rem; }

/* Responsive: centrar tarjetas y textos en móviles */
@media (max-width: 767px) {
    .proyecto-card { text-align: center; }
}

/* ===========================
   Ajustes extra para compatibilidad
   =========================== */
/* Evitar que algún padre corte el dropdown */
.header-bar,
.header-bar * {
    overflow: visible !important;
}

/* Si usas icons dentro de nav links, darles un poco de padding */
.nav .fa, .nav .fas, .nav .fab { margin-right: 6px; }

/* Small tweaks for accessibility */
a.nav-link, .dropdown-item { cursor: pointer; }

/* animaciones */

/* ===========================
   Animación máquina de escribir
   =========================== */

/* Cursor parpadeante */


@keyframes blink {
  50% { border-color: transparent; }
}

/* Animaciones de escritura */
.typing1, .typing2, .typing3,
.typing4, .typing5, .typing6, .typing7 {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-aling: center;
  margin: 0 auto;
  width: 0;
  animation-fill-mode: forwards;
}

/* Animaciones con duración y delay */
.typing1 {
  animation: typing1 2.5s steps(21, end) forwards;
}
@keyframes typing1 {
  from { width: 0 }
  to   { width: 21ch }
}

.typing2 {
  animation: typing2 3s steps(87, end) forwards;
  animation-delay: 2.6s;
}
@keyframes typing2 {
  from { width: 0 }
  to   { width: 87ch }
}

.typing3 {
  animation: typing3 3s steps(69, end) forwards;
  animation-delay: 6s;
}
@keyframes typing3 {
  from { width: 0 }
  to   { width: 69ch }
}

.typing4 {
  animation: typing4 3s steps(51, end) forwards;
  animation-delay: 2.6s;
}
@keyframes typing4 {
  from { width: 0 }
  to   { width: 51ch }
}

.typing5 {
  animation: typing5 3s steps(50, end) forwards;
  animation-delay: 6s;
}
@keyframes typing5 {
  from { width: 0 }
  to   { width: 50ch }
}

.typing6 {
  animation: typing6 3s steps(41, end) forwards;
  animation-delay: 8.5s;
}
@keyframes typing6 {
  from { width: 0 }
  to   { width: 41ch }
}

.typing7 {
  animation: typing7 3s steps(39, end) forwards;
  animation-delay: 11.5s;
}
@keyframes typing7 {
  from { width: 0 }
  to   { width: 39ch }
}

/* Mostrar solo uno según el tamaño de pantalla */
.typing-desktop {
  display: block;
}

.typing-mobile {
  display: none;
}

@media (max-width: 768px) {
  .typing-desktop {
    display: none !important;
  }

  .typing-mobile {
    display: block !important;
  }
}

/* Animacion Nombre */

.hero-name {
  font-size: 3rem;
  font-weight: bold;
  color: #fff;
  transition: text-shadow 0.3s ease-in-out;
  opacity: 0;
  transform: translateY(-50px); /* inicia arriba */
  animation: slideDown 1s ease forwards; /* animación */
}

.hero-name:hover {
  text-shadow: 0 0 4px #00cfff, 
               0 0 8px #00cfff, 
               0 0 12px #00cfff;
}

@keyframes slideDown {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
/* Mostrar solo uno según el tamaño de pantalla */
.typing-desktop {
  display: block;
}

.typing-mobile {
  display: none;
}

@media (max-width: 768px) {
  .typing-desktop {
    display: none !important;
  }

  .typing-mobile {
    display: block !important;
  }
}


/* Fin de Animaciones */
