/* =========================================
   1. VARIABLES Y CONFIGURACIÓN BASE
   ========================================= */
@import url("https://fonts.googleapis.com/css2?family=Krona+One&family=Montserrat:wght@400;600&display=swap");

:root {
  /* Paleta de Colores Original */
  --color-fondo: #102e50; /* Azul oscuro */
  --color-sidebar: #0b1d36; /* Azul más oscuro */
  --color-texto: #fbf5de; /* Crema suave */
  --color-acento: #d1a273; /* Dorado */
  --color-hover: #dc3c22; /* Rojo/Naranja */

  /* Tipografías */
  --fuente-titulos: "Krona One", sans-serif;
  --fuente-cuerpo: "Montserrat", sans-serif;

  /* Dimensiones */
  --ancho-sidebar: 25%; /* 25% del ancho de la página */
}

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--color-fondo);
  color: var(--color-texto);
  font-family: var(--fuente-cuerpo);
  font-size: 16px;
  line-height: 1.6;
}

/* =========================================
   2. LAYOUT PRINCIPAL (La Estructura)
   ========================================= */
.layout-wrapper {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* --- BARRA LATERAL (Izquierda) --- */
.sidebar-menu {
  width: var(--ancho-sidebar);
  background-color: var(--color-sidebar);
  height: 100vh;
  position: fixed; /* Se queda quieta mientras scrolleas */
  left: 0;
  top: 0;
  border-right: 1px solid rgba(209, 162, 115, 0.2);
  display: flex;
  flex-direction: column;
  justify-content: center; /* Centra todo verticalmente */
  align-items: center;
  padding: 2rem;
  z-index: 100;
  text-align: center;
}

/* Foto de Perfil */
.perfil-resumen img.sidebar-foto {
  width: 200px;
  height: 160px;
  object-fit: cover;
  border-radius: 15px; /* Recuadro más cuadrado */
  border: 3.5px solid var(--color-acento);
  margin-bottom: 1.5rem;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}

.perfil-resumen h2 {
  font-family: var(--fuente-titulos);
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
  color: var(--color-texto);
}

.perfil-resumen p {
  color: var(--color-acento);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 1px;
  margin-bottom: 2rem;
}

/* Navegación */
.navegacion {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
}

.nav-link {
  font-family: var(--fuente-titulos);
  text-decoration: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  padding: 0.8rem;
  transition: all 0.3s ease;
  border-radius: 8px;
}

.nav-link:hover {
  color: var(--color-acento);
  background-color: rgba(255, 255, 255, 0.05);
  transform: translateX(5px);
}

/* Footer Sidebar (Redes) */
.sidebar-footer {
  margin-top: auto; /* Empuja al fondo */
  padding-top: 2rem;
}

.sidebar-footer .redes-sociales a {
  color: var(--color-texto);
  margin: 0 8px;
  font-size: 1.2rem;
  transition: color 0.3s;
}

.sidebar-footer .redes-sociales a:hover {
  color: var(--color-acento);
}

/* --- ÁREA DE CONTENIDO (Derecha) --- */
.content-area {
  margin-left: var(--ancho-sidebar); /* Deja espacio para la sidebar */
  width: calc(100% - var(--ancho-sidebar));
  padding: 0;
  display: flex;
  flex-direction: column;
}

/* =========================================
   3. SECCIONES (Estilo de cada pantalla)
   ========================================= */
.seccion-contenido {
  min-height: 100vh; /* Cada sección ocupa toda la pantalla */
  padding: 4rem 10%; /* Espacio a los lados cómodo */
  display: flex;
  flex-direction: column;
  justify-content: center; /* Centrado vertical */
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Títulos Generales */
.titulo-principal {
  font-family: var(--fuente-titulos);
  font-size: 3rem; /* Tamaño grande pero controlado */
  line-height: 1.2;
  margin-bottom: 1.5rem;
}

.destacado {
  color: var(--color-acento);
  display: block;
}

.intro-texto,
.texto-bloque p {
  font-size: 1.1rem;
  max-width: 800px;
  opacity: 0.9;
  margin-bottom: 2rem;
}

.subtitulo {
  font-family: var(--fuente-titulos);
  font-size: 2rem;
  color: var(--color-acento);
  margin-bottom: 3rem;
  position: relative;
  display: inline-block;
}

/* Tarjetas (Skills / Proyectos) */
.corporate-grid,
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.corp-card,
.skill-card {
  background: rgba(255, 255, 255, 0.03);
  padding: 2rem;
  border-radius: 12px;
  border: 1px solid transparent;
  transition:
    transform 0.3s ease,
    border-color 0.3s ease;
}

.corp-card:hover,
.skill-card:hover {
  transform: translateY(-5px);
  border-color: var(--color-acento);
  background: rgba(255, 255, 255, 0.06);
}

.corp-card h3,
.skill-card h3 {
  font-family: var(--fuente-titulos);
  color: var(--color-acento);
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

/* =========================================
   4. FORMULARIO DE CONTACTO
   ========================================= */
.contact-form {
  max-width: 600px;
  width: 100%;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-family: var(--fuente-titulos);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  color: var(--color-acento);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: white;
  font-family: var(--fuente-cuerpo);
  font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-acento);
}

.btn-submit {
  padding: 1rem 2.5rem;
  background-color: transparent;
  color: var(--color-acento);
  border: 2px solid var(--color-acento);
  font-family: var(--fuente-titulos);
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.btn-submit:hover {
  background-color: var(--color-acento);
  color: var(--color-fondo);
}

/* =========================================
   5. RESPONSIVE (Móviles)
   ========================================= */
@media (max-width: 900px) {
  .layout-wrapper {
    flex-direction: column; /* Apila todo verticalmente */
  }

  .sidebar-menu {
    position: relative; /* Ya no fija */
    width: 100%;
    height: auto;
    padding: 2rem 1rem;
    border-right: none;
    border-bottom: 1px solid rgba(209, 162, 115, 0.2);
  }

  .perfil-resumen img.sidebar-foto {
    width: 120px;
    height: 120px;
  }

  .content-area {
    margin-left: 0;
    width: 100%;
  }

  .seccion-contenido {
    padding: 3rem 5%;
    min-height: auto; /* En móvil no forzamos altura completa */
    padding-bottom: 5rem;
  }

  .titulo-principal {
    font-size: 2rem;
  }

  /* Botón hamburguesa (si lo usas en JS) */
  .hamburger-menu {
    display: block; /* O ajusta según tu JS */
  }
}
