:root {
  --main-color: #00b2d4;
  --accent-color: #20d1c0;
  --light-bg: #111;
  --dark-text: #f5f5f5;
  --sidebar-width: 300px;
  --gradient: linear-gradient(to bottom, #007399, #00b2d4);
  --font-title: 'Poppins', sans-serif;
  --font-text: 'Open Sans', sans-serif;
}

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

body {
  font-family: var(--font-text);
  color: var(--dark-text);
  background-color: var(--light-bg);
  scroll-snap-type: y mandatory;
  overflow-y: scroll;
}

.layout {
  display: flex;
  min-height: 100vh;
}

/* ----------- SIDEBAR (solo visible en escritorio) ----------- */
.sidebar {
  width: var(--sidebar-width);
  background: var(--gradient);
  color: white;
  padding: 2rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  justify-content: center;
}

.sidebar .avatar {
  width: 250px;
  height: 250px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid white;
  margin-bottom: 2rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.side-nav ul {
  list-style: none;
  width: 100%;
  text-align: center;
}

.side-nav li {
  margin: 1rem 0;
}

.side-nav a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  font-size: 1.2rem;
  transition: all 0.3s ease;
}

.side-nav a:hover {
  color: var(--accent-color);
}


/* ----------- CONTENIDO PRINCIPAL ----------- */
.content {
  margin-left: var(--sidebar-width);
  flex: 1;
  padding: 3rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}


/* ----------- PANTALLA INICIO ----------- */
.hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 90vh;
}

.hero h1 {
  font-family: var(--font-title);
  font-size: 3.5rem;
  font-weight: 600;
  color: var(--dark-text);
}

.nombre {
  color: var(--main-color);
}

.apellido {
  color: var(--accent-color);
}

.tagline {
  font-style: italic;
  font-size: 1.1rem;
  color: #aaa;
  margin-top: 0.5rem;
}


/* ----------- SECCIONES ----------- */
.section h2 {
  font-family: var(--font-title);
  font-size: 1.5rem;
  color: var(--main-color);
  margin-bottom: 1rem;
  border-bottom: 2px solid var(--accent-color);
  display: inline-block;
}

.section p {
  font-size: 1rem;
  line-height: 1.7;
  max-width: 800px;
}


/* ----------- TECNOLOGÍAS ----------- */
.tech-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.tech-icons span {
  background-color: #0078a4;
  color: white;
  padding: 0.5rem 0.75rem;
  border-radius: 5px;
  font-size: 0.9rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}


/* ----------- CONTACTO ----------- */
.contact-columns {
  display: flex;
  gap: 3rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.contact-columns p {
  flex: 1;
  min-width: 180px;
  font-size: 1rem;
  line-height: 1.6;
}

.contact-columns a {
  color: var(--accent-color);
  text-decoration: none;
  font-weight: 400;
}


/* ----------- PROYECTOS ----------- */
.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem 3rem;
  justify-content: center;
  margin-top: 2rem;
}

.project-card {
  background: #1e1e1e;
  padding: 1rem;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 280px;
}

.project-card img {
  width: 100%;
  border-radius: 6px;
  margin-bottom: 0.8rem;
}

.project-card h3 {
  color: var(--main-color);
  margin-bottom: 0.5rem;
}

.project-card a {
  background: var(--accent-color);
  color: white;
  padding: 0.4rem 1rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: bold;
  margin-top: auto;
}


/* ----------- LAYOUT DE PÁGINAS ----------- */
.page {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  scroll-snap-align: start;
  padding: 0 2rem;
}

.container-centrado {
  width: 100%;
  max-width: 900px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3rem;
}

.info-centralizada {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3rem;
  padding: 2rem;
  width: 100%;
  max-width: 900px;
}


/* ========== NUEVA NAVBAR MÓVIL ========== */
.mobile-navbar {
  display: none;
}

/*.top-navbar {
  display: none;
  background: var(--gradient);
  padding: 1rem;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
}

.top-nav ul {
  list-style: none;
  display: flex;
  justify-content: space-around;
  padding: 0;
  margin: 0;
}

.top-nav li a {
  color: white;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
}*/


/* ========== RESPONSIVE PARA MÓVIL ========== */
@media (max-width: 768px) {
  /* Oculta el sidebar tradicional */
  .sidebar {
    display: none;
  }

  /* Muestra navbar superior en móvil */
  .mobile-navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1rem;
    background: var(--gradient);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
  }

  .avatar-mobile {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 2px solid white;
  }

  .nav-mobile ul {
    display: flex;
    gap: 1rem;
    list-style: none;
    margin: 0;
    padding: 0;
  }

  .nav-mobile a {
    color: white;
    font-weight: bold;
    text-decoration: none;
    font-size: 0.95rem;
  }

  /* Ajustes para que no se oculte contenido tras la navbar móvil */
  .content {
    margin-left: 0;
    padding-top: 4rem;
  }

  .hero h1 {
    font-size: 2.2rem;
  }

  .tagline {
    font-size: 1rem;
  }

  .section h2 {
    font-size: 1.3rem;
  }

  .section p {
    font-size: 0.95rem;
    text-align: left;
  }

  .info-centralizada {
    align-items: flex-start;
    text-align: left;
  }

  .contact-columns {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    text-align: left;
  }

  .contact-columns p {
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
  }

  .contact-columns p strong {
    display: none;
  }

  .contact-columns a {
    display: inline;
    font-weight: normal;
  }

  .tech-icons {
    gap: 0.5rem;
    font-size: 0.85rem;
  }

  .tech-icons span {
    font-size: 0.85rem;
  }

  .project-grid {
    grid-template-columns: 1fr;
  }

  /* 🔧 Código anterior innecesario (comentado) */
  /*
  .top-navbar {
    display: none;
  }

  .top-nav ul, .top-nav {
    display: none;
  }
  */
}
