:root {
  --bg: #fdf6f0;
  --primary: #2b2b2b;
  --accent: #ff7f11;
  --accent-light: #ffc07f;
  --accent-dark: #d14300;
  --card: #fff;
  --border: #f0e1d2;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  --radius: 16px;

  /* Tech Colors */
  --tech-sql: #d18f00;
  --tech-vite: #7c4dff;
  --tech-react: #61dafb;
  --tech-js: #f7df1e;
  --tech-css: #264de4;
  --tech-html: #e34c26;

  /* Extras */
  --bubble-bg: #ffe7d6;
  --bubble-border: #ffcba0;
  --link-hover: #ff5c00;

  /* Font */
  --font-family: system-ui, sans-serif;
  --text-primary: #2b2b2b;
  --text-secondary: #6e4e2e;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family: "Helvetica Neue", Arial, sans-serif;
  background: #fff1e6 url("textura-ligera.png") repeat;
  color: var(--primary);
  min-height: 100vh;
}
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2); /* Negro translúcido */
  border-radius: 8px;
  transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.35); /* Más visible al pasar el cursor */
}
header {
  display: flex;
  align-items: center;
  gap: 4rem;
  padding: 5rem 4rem 5rem 4rem;
  max-width: 1200px;
  margin: auto;
  flex-direction: row;
  height: 100vh;
}
.profile-pic {
  width: 300px; /* Aumentamos el tamaño de la imagen */
  height: 300px;
  border-radius: 50%;
  object-fit: cover;
  border: none; /* Quitamos el borde naranja original */
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1); /* Sombra más sutil y moderna */
  flex-shrink: 0;
}
.desc {
  flex: 1;
  max-width: 55%; /* Le da más peso al contenido de texto */
}
.desc h1 {
  font-size: 3.5rem; /* El nombre más grande */
  margin-bottom: 0.5rem;
}
.text-intro {
  font-family: 'Poppins', sans-serif;
  line-height: 1.7;
  color: var(--text-primar);
  font-size: 1.15rem;
  margin-bottom: 25px;
}
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  margin-left: auto;
  z-index: 20;
}
.hamburger span {
  display: block;
  height: 4px;
  width: 28px;
  background: var(--accent, #ff7f11);
  border-radius: 2px;
  transition: all 0.3s;
}
nav {
  display: flex;
  gap: 2rem;
  justify-content: center;
  margin-bottom: 2rem;
}
nav a {
  text-decoration: none;
  color: var(--primary);
  font-weight: 700;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: background 0.2s;
}
nav a:hover,
nav a.active {
  background: var(--accent);
  color: #fff;
}
main {
  max-width: 80vw;
  margin: auto;
  padding: 0 2rem 2rem 2rem;
}
section {
  margin-bottom: 3rem;
}
h2 {
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
  letter-spacing: 0.02em;
}
/* Proyectos */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(550px, 1fr));
  gap: 2rem;
}

#proyectos,
#estudios,
#skills {
  max-height: 100vh; /* Ajusta el valor según prefieras */
  overflow-y: auto;
  padding-right: 8px; /* Espacio para la barra de scroll */
}

.project-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--bubble-border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
}
.project-img-bar {
  background: #f1f1f1;
  height: 36px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
}
.project-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.dot-red {
  background: #ff5f56;
}
.dot-yellow {
  background: #ffbd2e;
}
.dot-green {
  background: #27c93f;
}
.project-img-container {
  position: relative;
  background: #e0e1dd;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 180px;
}
.project-img {
  max-width: 100%;
  max-height: 160px;
  border-radius: 8px;
  margin: 8px 0;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}
.project-actions {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  gap: 8px;
}
.project-actions a {
  background: #fff;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  color: var(--primary);
  text-decoration: none;
  font-size: 1.2rem;
  transition: background 0.2s;
}
.project-actions a:hover {
  background: var(--accent);
  color: #fff;
}
.project-content {
  padding: 1rem 1.2rem 0.5rem 1.2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.project-title {
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}
.project-desc {
  font-size: 0.97rem;
  color: #444;
  margin-bottom: 1rem;
}
.project-techs {
  display: flex;
  gap: 8px;
  margin-bottom: 0.5rem;
}
.tech-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-block;
  border: 2px solid #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.sql {
  background: var(--tech-sql);
}
.vite {
  background: var(--tech-vite);
}
.react {
  background: var(--tech-react);
}
.js {
  background: var(--tech-js);
}
.css {
  background: var(--tech-css);
}
.html {
  background: var(--tech-html);
}
.php {
  background: #777bb4;
}
.node {
  background: #8cc84b;
}
.mongodb {
  background: #47a248;
}
.btn-logiscool{
  background-color: #264de4 !important;
}
/* Otros apartados */
.studies-list,
.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
  align-items: center;
  justify-content: center;
}
.studies-list li,
.skills-list li {
  border-radius: 8px;
  padding: 1rem 1.5rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  font-weight: 500;
  font-size: 1rem;
  border: 1px solid var(--bubble-border);
}
/* Contacto */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 400px;
}
.contact-icons {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  margin: 2.5rem 0 2rem 0;
}
.contact-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(34, 34, 59, 0.1);
  width: 70px;
  height: 70px;
  color: var(--accent, #277da1);
  font-size: 2.2rem;
  transition: transform 0.18s, box-shadow 0.18s, color 0.18s;
  border: 2px solid var(--border, #e0e1dd);
  text-decoration: none;
  overflow: hidden; /* <-- Esto evita que el SVG sobresalga */
}

/* Cambia el fondo del icono de correo a blanco al hacer hover */
.contact-icons a:hover svg circle {
  fill: #f1efed !important;
}
.contact-icons a:hover svg g path[stroke="#FF7F11"] {
  stroke: #f8f5f2 !important; /* Mantiene el pliegue naranja */
}
.contact-icons a:hover svg g path[fill="#fff"] {
  fill: #ff7f11 !important; /* Opcional: cambia el sobre a naranja si quieres */
}
.contact-icons a:hover {
  transform: scale(1.13);
  box-shadow: 0 4px 16px rgba(34, 34, 59, 0.18);
  color: #fff;
  background: var(--accent, #277da1);
  border-color: var(--accent, #277da1);
}
.contact-icons img {
  border-radius: 50%;
  object-fit: cover;
  background: transparent;
}
.contact-icons svg,
.contact-icons img {
  width: 2.2em;
  height: 2.2em;
  display: block;
}
.contact-form input,
.contact-form textarea {
  padding: 0.7rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-size: 1rem;
  font-family: inherit;
  background: #fff;
  resize: none;
}
.contact-form button {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.8rem 1.2rem;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}
.contact-form button:hover {
  background: #277da1;
}
.hidden-section {
  display: none !important;
}
.wp {
  background: #21759b;
}
@media (max-width: 600px) {
  header,
  main {
    padding: 1rem;
  }
  .projects-grid {
    grid-template-columns: 1fr;
  }
  header {
    flex-direction: column;
    text-align: center;
    padding: 4rem 2rem;
    gap: 2rem;
  }
  .profile-pic {
    order: -1;
    width: 150px;
    height: 150px;
    margin-bottom: 0.5rem;
  }
  .desc {
    width: 100%;
    padding: 0;
  }
  .project-techs {
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 0.5rem;
    justify-content: flex-start;
  }
  .tech-badge {
    font-size: 0.95rem;
    margin-bottom: 4px;
  }

  nav {
    position: relative;
    flex-direction: row;
    align-items: center;
    padding: 0 0.5rem;
  }
  .hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    margin-right: auto;
    z-index: 20;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    gap: 0.5rem;
    position: absolute;
    top: 48px;
    left: 0;
    width: 100%;
    background: #fff;
    box-shadow: 0 4px 16px rgba(34, 34, 59, 0.08);
    border-radius: 0 0 12px 12px;
    z-index: 10;
    padding: 1rem 0;
    animation: fadeIn 0.2s;
  }
  .nav-links.show {
    display: flex;
  }
  nav a {
    width: 100%;
    text-align: center;
    font-size: 1rem;
    padding: 0.7rem 0;
    border-radius: 8px;
    margin: 0;
  }

  .timeline {
    margin: 1rem 0 1rem 0.5rem;
    padding-left: 1rem;
    gap: 1.2rem;
  }
  .evento {
    flex-direction: column;
    gap: 0.7rem;
  }
  .year {
    min-width: unset;
    font-size: 1rem;
    margin-bottom: 0.2rem;
  }
  .details {
    padding: 0.7rem 1rem;
    font-size: 1rem;
  }
}

.tech-badge {
  display: inline-flex;
  align-items: center;
  background: #f1f5fa;
  border-radius: 999px;
  padding: 0.2em 0.8em 0.2em 0.3em;
  margin-right: 0.5em;
  font-weight: 600;
  font-size: 1rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  border: 1px solid var(--border);
  gap: 0.5em;
  transition: background 0.2s;
}
.tech-badge .tech-dot {
  margin-right: 0.3em;
  margin-left: 0;
}

/* // Timeline */
.timeline {
  position: relative;
  margin: 2rem 0 2rem 2rem;
  padding-left: 2rem;
  border-left: 3px dashed var(--accent);
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.evento {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
}

.evento::before {
  content: "";
  position: absolute;
  left: -2.2rem;
  top: 0.5rem;
  width: 1.2rem;
  height: 1.2rem;
  background: var(--accent);
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 0 0 2px var(--accent);
}

.year {
  min-width: 90px;
  font-size: 1.1rem;
  font-weight: bold;
  color: var(--accent);
  margin-top: 0.2rem;
}

.details {
  background: #fff;
  border-radius: 8px;
  padding: 1rem 1.5rem;
  box-shadow: 0 2px 8px rgba(34, 34, 59, 0.06);
  border: 1px solid var(--border);
  flex: 1;
}

.details h3 {
  margin: 0 0 0.3rem 0;
  font-size: 1.1rem;
  color: var(--primary);
}

.details p {
  margin: 0;
  color: #444;
  font-size: 0.98rem;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
/* --- Nuevos Estilos para Botones CTA (Basado en la imagen) --- */

.hero-actions {
  margin-top: 2rem;
  display: flex;
  gap: 15px;
  align-items: center;
}

.btn {
  padding: 12px 25px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.05rem;
  transition: all 0.3s ease;
  cursor: pointer;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-primary {
  /* Botón relleno: "Soy alumno de Logiscool" */
  background-color: var(--cta-blue);
  color: white;
  border: 1px solid var(--cta-blue);
}

.btn-primary:hover {
  background-color: var(--cta-blue-hover);
  border-color: var(--cta-blue-hover);
  box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

.btn-secondary {
  /* Botón delineado: "View My Work" */
  background-color: transparent;
  color: var(--cta-blue);
  border: 1px solid var(--cta-blue);
  box-shadow: none;
}

.btn-secondary:hover {
  background-color: rgba(
    59,
    130,
    246,
    0.1
  ); /* Fondo azul muy claro al pasar el ratón */
  color: var(--cta-blue-hover);
  border-color: var(--cta-blue-hover);
}

/* --- Media Query para Responsividad (Móviles/Tabletas) --- */

@media (max-width: 768px) {
  header {
    flex-direction: column; /* Apila imagen y texto verticalmente */
    text-align: center;
    padding: 4rem 2rem;
    gap: 2rem;
  }
  .profile-pic {
    order: -1; /* Mueve la imagen arriba del texto en móvil */
    margin-bottom: 1.5rem;
    width: 200px;
    height: 200px;
    box-shadow: none;
  }
  .desc {
    max-width: 100%;
  }
  .desc h1 {
    font-size: 2.5rem;
  }
  .hero-actions {
    justify-content: center; /* Centra los botones en móvil */
    flex-direction: column; /* Apila los botones verticalmente en móvil */
  }
  .btn {
    width: 100%; /* Botones de ancho completo */
    max-width: 300px; /* Máximo ancho para que no sean enormes */
  }
}
