/* Reset básico */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background 0.3s, color 0.3s;
}
:root {
  --bg: #ffffff;
  --text: #111;
  --primary: #4f46e5;
  --secondary: #10b981;
}
body.dark {
  --bg: #0b0d12;
  --text: #f3f3f3;
}

/* NAV */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  background: var(--bg);
  border-bottom: 1px solid #ddd;
}
.navbar a {
  margin: 0 0.5rem;
  text-decoration: none;
  color: var(--text);
}
.navbar button {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
}

/* HERO */
.hero {
  padding: 4rem 2rem;
  text-align: center;
}
.hero h1 {
  font-size: 2.5rem;
}
.hero .gradient {
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  color: transparent;
}
.buttons {
  margin-top: 1.5rem;
}
.btn {
  display: inline-block;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
}
.btn.primary {
  background: var(--primary);
  color: #fff;
}
.btn.outline {
  border: 2px solid var(--primary);
  color: var(--primary);
}
.btn.ghost {
  color: var(--text);
}
.btn.small {
  font-size: 0.85rem;
  padding: 0.4rem 0.8rem;
}

/* SECTIONS */
.section {
  padding: 3rem 2rem;
}
.section h2 {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

/* GRID DE PROYECTOS */
.grid {
  display: grid;
  gap: 1.5rem;
}
@media(min-width: 768px) {
  .grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.card {
  background: var(--bg);
  border: 1px solid #ddd;
  padding: 1.5rem;
  border-radius: 12px;
  transition: transform 0.2s;
}
.card:hover {
  transform: translateY(-5px);
}
.tag {
  display: inline-block;
  margin-top: 0.5rem;
  background: var(--secondary);
  color: #fff;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  font-size: 0.8rem;
}

/* SKILLS */
.skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: center;
}
.skills li {
  background: var(--primary);
  color: #fff;
  padding: 0.5rem 0.9rem;
  border-radius: 6px;
  font-size: 0.9rem;
}

/* CONTACTO */
.contact-links {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 1rem;
}

/* FOOTER */
footer {
  text-align: center;
  padding: 1rem;
  border-top: 1px solid #ddd;
  font-size: 0.9rem;
}
