/* =========================================
   RESET / BASE
   ========================================= */
* { box-sizing: border-box; }

/* General de toda la página */
body {
  margin: 0;
  padding: 0;
  font-family: 'Arial', sans-serif;
  background: linear-gradient(135deg, #F7EFEA, #F9BFA0);
  color: #333;
  overflow-x: hidden;

  /* Para que el footer se quede abajo si falta contenido */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* El contenido principal “empuja” el footer hacia abajo */
main { flex: 1; }

/* Animación usada en títulos (fade in) */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* =========================================
   HEADER / NAVEGACIÓN
   ========================================= */

/* Barra superior */
header {
  background: #604997;
  padding: 15px 20px;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
}

/* Layout del nav: logo + menú + (hamburguesa en móvil) */
header nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

/* Logo */
.logo {
  height: 150px;
  width: auto;
  margin-right: 20px;
  vertical-align: middle;
  background: #FFFFFF;
  padding: 1px;
  border-radius: 50%;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Lista del menú (base) */
header nav ul {
  list-style: none;
  display: flex;
  gap: 30px;
  margin: 0;
  padding: 0;
}

/* Links del menú */
header nav ul li a {
  text-decoration: none;
  color: #FFFFFF;
  font-weight: bold;
  font-size: 20px;
  position: relative;
  transition: color 0.3s ease;
}

header nav ul li a:hover { color: #F7DACA; }

/* Accesibilidad: texto solo para lectores de pantalla */
.sr-only{
  position:absolute;
  width:1px; height:1px;
  padding:0; margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
  border:0;
}

/* Botón hamburguesa (base: oculto en escritorio) */
.nav-toggle{
  display: none;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 10px;
  width: 52px;
  height: 52px;
  z-index: 2000;
  position: relative;
}

.nav-toggle .bar{
  display: block;
  width: 34px;
  height: 4px;
  background: #ffffff;
  border-radius: 999px;
  margin: 0;
  opacity: 1;
}

/* =========================================
   INICIO / HERO
   ========================================= */
.hero {
  text-align: left;
  padding: 60px 30px 30px;
  color: #333;
  background: #fff;
  border-radius: 8px;
  margin: 40px auto;
  max-width: 800px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.hero h1 {
  font-size: 3rem;
  margin: 0;
  color: #B08090;
  animation: fadeIn 1s ease-out;
}

.hero p {
  font-size: 1.2rem;
  margin: 10px 0;
  line-height: 1.6;
  margin-bottom: 25px;
}

.hero button {
  background: #604997;
  color: #FFFFFF;
  padding: 12px 24px;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  transition: transform 0.3s ease, background-color 0.3s ease;
}

.hero button:hover {
  background: #F2A87D;
  transform: scale(1.1);
}

/* =========================================
   SECCIONES GENÉRICAS (caja blanca)
   ========================================= */
section {
  max-width: 800px;
  margin: 40px auto;
  padding: 20px;
  background: #FFFFFF;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  text-align: justify;
  line-height: 1.8;
}

section h2 {
  text-align: center;
  color: #604997;
  margin-bottom: 20px;
}

/* =========================================
   SOBRE MÍ
   ========================================= */
#sobre-mi {
  max-width: 800px;
  margin: 40px auto;
  padding: 30px;
  background: #FFFFFF;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  text-align: justify;
  line-height: 1.8;
}

#sobre-mi h2 {
  text-align: center;
  color: #604997;
  margin-bottom: 20px;
}

/* Foto circular */
.mi-foto-contenedor{
  width: 220px;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #F9BFA0;
  border-radius: 50%;
  padding: 3px;
  margin: 0 auto 20px;
}

.mi-foto{
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid #e9d8f2;
}

/* Botón CV (en Sobre mí) */
.btn {
  display: inline-block;
  margin-top: 20px;
  padding: 12px 24px;
  background: #604997;
  color: #FFFFFF;
  text-decoration: none;
  font-size: 16px;
  font-weight: bold;
  border-radius: 25px;
  text-align: center;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.btn:hover {
  background: #F9BFA0;
  transform: scale(1.1);
}

/* =========================================
   PROYECTOS
   ========================================= */

/* Grid de proyectos (si lo usas en otra página) */
#proyectos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  padding: 40px;
  background: #FFFFFF;
  border-radius: 8px;
  margin: 40px auto;
  max-width: 1000px;
  box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
}

/* Tarjeta de cada proyecto */
.project {
  border: 2px solid #604997;
  border-radius: 8px;
  background: #FFFFFF;
  padding: 20px;
  text-align: left;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  margin-bottom: 25px; /*MÁS AIRE ENTRE CAJAS */
}

.project:hover {
  transform: translateY(-6px); /* un movimiento un poco más sutil */
  box-shadow: 0px 10px 20px rgba(0, 0, 0, 0.18);
}

.project h3 {
  color: #604997;
  margin-bottom: 10px;
}

/* Layout imagen izquierda + texto derecha */
.project-layout{
  display: flex;
  gap: 32px;
  align-items: center;
}

/* Imagen del proyecto (base) */
.project-image img{
  width: 220px;              /* mockup móvil */
  border-radius: 26px;
  background: transparent;
  box-shadow: none;

  max-width: 100%;
  height: auto;
  display: block;
}

/* Variante para capturas “desktop” (monitor / portátil) */
.project-image--desktop{
  align-self: center; /* se aplica al DIV, no al IMG */
}

.project-image--desktop img{
  width: 320px;
  border-radius: 0;
  box-shadow: none;
}

/* Texto del bloque */
.project-text{
  flex: 1;
}

/* Botón “Ver proyecto” */
.button {
  display: inline-block;
  margin-top: 10px;
  padding: 12px 24px;
  background: #604997;
  color: #FFFFFF;
  text-decoration: none;
  font-size: 16px;
  font-weight: bold;
  border-radius: 25px;
  transition: background-color 0.3s ease, transform 0.3s ease;
  text-align: center;
}

.button:hover {
  background: #F2A87D;
  transform: scale(1.1);
}

/* =========================================
   CONTACTO
   ========================================= */
#contacto p {
  font-size: 1rem;
  color: #333;
  line-height: 1.8;
  text-align: left;
  padding: 20px;
  margin-bottom: 20px;
}

/* Formulario */
form{
  max-width: 600px;
  margin: 0 auto 30px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

form label {
  color: #333;
  font-size: 14px;
}

form input, form textarea {
  border: 2px solid #604997;
  border-radius: 5px;
  padding: 10px;
  font-size: 14px;
  background-color: #F7F1FC;
  transition: border-color 0.3s ease;
  font-family: inherit;
  line-height: 1.4;
  color: #333;
}

form textarea {
  min-height: 100px;
  resize: vertical;
}

form input:focus, form textarea:focus {
  border-color: #F9BFA0;
}

form button {
  background: #604997;
  color: #FFFFFF;
  padding: 10px;
  border-radius: 25px;
  border: none;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.3s ease, background-color 0.3s ease;
}

form button:hover {
  background: #F2A87D;
  transform: scale(1.05);
}

/* =========================================
   FOOTER
   ========================================= */
footer {
  background: #604997;
  color: white;
  padding: 20px;
  text-align: center;
  font-size: 14px;
  margin-top: auto;
}

.copyright { order: 1; }

.footer-content {
  order: 2;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  margin-top: 10px;
}

.links, .social-icons { flex: 1; }

.links ul {
  list-style: none;
  padding: 0;
  text-align: left;
}

.links a {
  text-decoration: none;
  color: #ffdab9;
  display: block;
  padding: 5px 0;
}

.social-icons {
  display: flex;
  justify-content: flex-end;
  margin-left: 10px;
}

.social-icons a { margin-left: 10px; }

.social-icons img {
  width: 30px;
  height: auto;
}

/* =========================================
   MEDIA QUERIES
   ========================================= */

/* -------- ESCRITORIO (>= 769px) -------- */
@media (min-width: 769px){

  /* Centrado del menú en escritorio */
  header nav ul{
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
  }

  /* Subrayado animado en hover (solo escritorio) */
  header nav ul li a::after{
    content: '';
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 0;
    height: 2px;
    background-color: #F9BFA0;
    transition: width 0.3s ease;
  }

  header nav ul li a:hover::after{
    width: 100%;
  }
}

/* -------- MÓVIL (<= 768px) -------- */
@media (max-width: 768px){

  /* Foto en Sobre mí más pequeña */
  .mi-foto-contenedor{
    width: 150px;
    height: 150px;
  }

  /* Header: logo + hamburguesa arriba; menú debajo */
  header nav{
    flex-wrap: wrap;
    gap: 10px;
  }

  .logo{
    height:70px;
    margin-right:0;
  }

  .logo-container{ order: 1; }

  /* Muestra botón hamburguesa */
  .nav-toggle{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 7px;
    margin-left: auto;
    order: 2;
  }

  /* Menú desplegable en móvil */
  .nav-menu{
    width:100%;
    order: 3;
    display:none;
    flex-direction:column;
    gap:18px;
    background:#604997;
    padding:16px 0 10px;
  }

  .nav-menu.is-open{ display:flex; }

  .nav-menu li{
    list-style:none;
    width:100%;
  }

  .nav-menu a{
    display:block;
    padding:10px 20px;
    font-size:16px;
  }

  /* IMPORTANTE: desactiva el centrado absoluto del escritorio en móvil */
  header nav ul{
    position: static !important;
    left: auto !important;
    transform: none !important;
  }

  /* Proyectos: layout en columna (imagen arriba, texto debajo) */
  .project-layout{
    flex-direction: column;
    align-items: center;
  }

  .project-image img{
    width: 170px;
  }

  .project-text{
    text-align: justify;
  }
}
