/* ===== Reset ===== */
html { scroll-behavior: smooth; }
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img { max-width: 100%; display: block; }

:root{
  --bg1:#0b1220;
  --bg2:#111827;

  --text:#e5e7eb;
  --muted:#cbd5e1;

  --glass: rgba(255,255,255,0.08);
  --border: rgba(255,255,255,0.14);

  --shadow: 0 18px 50px rgba(0,0,0,0.35);
  --shadow-soft: 0 10px 26px rgba(0,0,0,0.22);

  /* Acentos por sección */
  --accent-skills: #22c55e;   /* verde */
  --accent-about:  #60a5fa;   /* azul */
  --accent-project:#a78bfa;   /* morado */
  --accent-contact:#f59e0b;   /* ámbar */
}

/* ===== Base ===== */
body{
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  line-height: 1.55;
  color: var(--text);
  background:
    radial-gradient(900px 700px at 15% 10%, rgba(96,165,250,0.25), transparent 55%),
    radial-gradient(900px 700px at 85% 15%, rgba(167,139,250,0.22), transparent 55%),
    radial-gradient(900px 700px at 70% 85%, rgba(34,197,94,0.18), transparent 55%),
    linear-gradient(180deg, var(--bg1), var(--bg2));
}

.container{
  width: min(980px, 100% - 32px);
  margin: 0 auto;
}

/* ===== Hero ===== */
.hero{
  padding: 42px 0 18px;
}

.hero__content{
  display: flex;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;

  background: linear-gradient(180deg, rgba(239,68,68,0.25), rgba(255,255,255,0.05));
  border: 1px solid rgba(239,68,68,0.35);
  border-radius: 22px;
  padding: 22px;
  box-shadow: 0 18px 50px rgba(239,68,68,0.25);
  backdrop-filter: blur(12px);
}

.avatar{
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 999px;
  border: 2px solid rgba(255,255,255,0.25);
  box-shadow: 0 10px 22px rgba(0,0,0,0.35);
}

.hero__text{ flex: 1 1 320px; }

.hero__name{
  margin: 0;
  font-size: 34px;
  letter-spacing: -0.02em;
  font-weight: 800;
}

.hero__role{
  margin: 6px 0 10px;
  color: var(--muted);
  font-weight: 700;
}

.hero__bio{
  margin: 0 0 14px;
  color: var(--muted);
  max-width: 60ch;
}

.hero__buttons{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ===== Botones ===== */
.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 14px;
  border-radius: 14px;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -0.01em;
  border: 1px solid rgba(255,255,255,0.18);
  color: var(--text);
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, border-color 160ms ease;
  box-shadow: var(--shadow-soft);
}

.btn:hover{
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(0,0,0,0.35);
}

.btn--primary{
  background: linear-gradient(135deg, rgba(96,165,250,0.85), rgba(167,139,250,0.85));
  border-color: rgba(255,255,255,0.22);
}

.btn--ghost{
  background: rgba(255,255,255,0.08);
}

.btn--ghost:hover{
  background: rgba(255,255,255,0.12);
}

/* ===== Tarjetas / secciones ===== */
.card{
  border-radius: 18px;
  padding: 16px;
  margin: 14px 0;
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

/* Barra de acento arriba */
.card::before{
  content:"";
  position:absolute;
  top:0; left:0; right:0;
  height: 5px;
  background: rgba(255,255,255,0.18);
}

/* Colores por sección */
#habilidades{
  background: linear-gradient(180deg, rgba(34,197,94,0.16), rgba(255,255,255,0.05));
}
#habilidades::before{ background: linear-gradient(90deg, var(--accent-skills), rgba(34,197,94,0.2)); }

#sobre-mi{
  background: linear-gradient(180deg, rgba(96,165,250,0.16), rgba(255,255,255,0.05));
}
#sobre-mi::before{ background: linear-gradient(90deg, var(--accent-about), rgba(96,165,250,0.2)); }

#proyectos{
  background: linear-gradient(180deg, rgba(167,139,250,0.16), rgba(255,255,255,0.05));
}
#proyectos::before{ background: linear-gradient(90deg, var(--accent-project), rgba(167,139,250,0.2)); }

#contacto{
  background: linear-gradient(180deg, rgba(236,72,153,0.18), rgba(255,255,255,0.05));
}
#contacto::before{
  background: linear-gradient(90deg, #ec4899, rgba(236,72,153,0.3));
}

h2{
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

h3{
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 800;
}

.muted{ color: var(--muted); }

/* ===== Pills (habilidades) ===== */
.pills{ display:flex; flex-wrap:wrap; gap:8px; }

.pill{
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.14);
  font-size: 13px;
  font-weight: 700;
}

/* ===== Lista ===== */
.list{
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--muted);
}

/* ===== Proyectos ===== */
.projects{
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.project{
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px;
  padding: 14px;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.project:hover{
  transform: translateY(-2px);
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.18);
}

.tags{ display:flex; flex-wrap:wrap; gap:8px; margin:10px 0; }

.tag{
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  font-weight: 700;
}

.link{
  text-decoration: none;
  font-weight: 800;
  color: var(--text);
  border-bottom: 1px dashed rgba(255,255,255,0.28);
}
.link:hover{
  border-bottom-color: rgba(255,255,255,0.55);
}

/* ===== Contacto ===== */
.contact{
  display:flex;
  flex-wrap:wrap;
  gap:14px;
  margin-top: 10px;
}

.contact__item{
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  transition: transform 160ms ease, background 160ms ease;
}

.contact__item:hover{
  transform: translateY(-2px);
  background: rgba(255,255,255,0.12);
}

/* ===== Footer ===== */
.footer{
  padding: 18px 0 40px;
  opacity: 0.85;
  font-size: 13px;
}

/* ===== Responsive ===== */
@media (max-width: 720px){
  .hero__name{ font-size: 28px; }
  .projects{ grid-template-columns: 1fr; }
}

/* Animación suave de entrada */
.hero__content, .card {
  animation: fadeUp 500ms ease both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
