/* ============ Tu Código Original (Sin cambios de color) ============ */
:root {
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --text: #1e293b;
  --muted: #64748b;
  --brand: #2563eb;
  --brand-2: #7c3aed;
  --border: #e2e8f0;
  --shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
  --radius: 16px;
  --maxw: 1100px;
}

#particles-js {
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: -1; 
  background-color: var(--bg);
}

* { box-sizing: border-box; }
html, body { height: 100%; scroll-behavior: smooth; }

body {
  margin: 0; 
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--text); 
  background: transparent;
  line-height: 1.6;
}

a { color: var(--brand); text-decoration: none; transition: 0.3s; }
a:hover { color: var(--brand-2); }

.container { width: min(100% - 2rem, var(--maxw)); margin-inline: auto; }

header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.8);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; padding: 1rem 0; }
.brand { display: flex; gap:.6rem; align-items:center; font-weight: 800; color: var(--text); }
.logo { width: 28px; height: 28px; border-radius: 8px; background: linear-gradient(135deg, var(--brand), var(--brand-2)); }
.nav a { font-weight: 600; color: var(--text); }

#menu-toggle { display: none; }
.links { display: flex; gap: 1.5rem; }

.hero { padding: 6rem 0 4rem; display: grid; grid-template-columns: 1.2fr .8fr; gap: 2rem; align-items: center; }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); line-height: 1.1; margin-bottom: 1rem; color: #0f172a; }
.hero p { color: var(--muted); font-size: 1.1rem; max-width: 600px; }
.tag { display:inline-flex; background: #f1f5f9; color: var(--brand); font-weight: 600; padding:.4rem .8rem; border-radius: 20px; font-size: 0.85rem; margin-bottom: 1rem; }
.cta { display:flex; gap: 1rem; margin-top: 2rem; }
.btn { padding:.8rem 1.5rem; border-radius: 12px; font-weight: 700; transition: 0.3s; text-align: center; }
.btn:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(37, 99, 235, 0.2); }
.btn.primary { background: var(--text); color: white; }
.btn.ghost { background: white; color: var(--text); border: 1px solid var(--border); }

section { padding: 5rem 0; opacity: 0; transform: translateY(20px); transition: 0.8s all ease-out; }
section.visible { opacity: 1; transform: translateY(0); }
.section-title { font-size: 2.2rem; font-weight: 800; margin-bottom: 2.5rem; text-align: center; }

.skills-grid, .certifications-grid, .grid { 
  display: grid; gap: 1.5rem; 
}
.skills-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.certifications-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.grid { grid-template-columns: repeat(3, 1fr); }

.skill, .certification, .card {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: 0.3s;
  box-shadow: var(--shadow);
}
.skill:hover, .certification:hover, .card:hover { border-color: var(--brand); background: white; }

.skill { display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.skill-icon { width: 45px; height: 45px; }

.card { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.card .media { background: #e2e8f0; height: 180px; display: grid; place-items: center; font-weight: 800; color: #94a3b8; }
.card .content { padding: 1.5rem; flex-grow: 1; }
.card .actions { padding: 0 1.5rem 1.5rem; }

footer { padding: 4rem 0; text-align: center; color: var(--muted); border-top: 1px solid var(--border); background: white; }

/* ============ REGLAS DE RESPONSIVO ============ */

@media (max-width: 760px) {
  /* ESTO ARREGLA EL MENÚ DE ARRIBA AMONTONADO */
  .menu-btn { display: block !important; cursor: pointer; font-size: 1.5rem; order: 2; }
  .brand { order: 1; }
  
  .links { 
    display: none; 
    position: absolute; 
    top: 100%; 
    right: 0; 
    background: white; 
    flex-direction: column; 
    width: 200px; 
    padding: 1rem; 
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
  }

  #menu-toggle:checked ~ .links { display: flex; }

  .hero { grid-template-columns: 1fr; text-align: center; padding: 3rem 0; }
  .cta { flex-direction: column; align-items: stretch; }
  .btn { width: 100%; }
  .grid { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) and (min-width: 761px) {
  .hero { grid-template-columns: 1fr; text-align: center; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .cta { justify-content: center; }
}