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

body {
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: #1a1a2e;
  background: #f8f9fa;
  line-height: 1.6;
  scroll-behavior: smooth;
}

header {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(8px);
  z-index: 100;
  border-bottom: 1px solid #e9ecef;
}

nav {
  max-width: 960px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

nav h2 {
  font-size: 1.25rem;
  color: #4361ee;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}

nav a {
  text-decoration: none;
  color: #495057;
  font-weight: 500;
  transition: color .2s;
}

nav a:hover { color: #4361ee; }

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
}

.hero-content h1 {
  font-size: 3rem;
  margin-bottom: .5rem;
}

.tagline {
  font-size: 1.25rem;
  color: #4361ee;
  font-weight: 600;
  margin-bottom: .5rem;
}

.desc {
  color: #6c757d;
  max-width: 480px;
  margin: 0 auto 1.5rem;
}

.hero-links { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

.btn, .btn-sm {
  display: inline-block;
  padding: .75rem 1.5rem;
  background: #4361ee;
  color: #fff;
  text-decoration: none;
  border-radius: .5rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: background .2s;
}

.btn:hover, .btn-sm:hover { background: #3a56d4; }

.btn-outline {
  background: transparent;
  color: #4361ee;
  border: 2px solid #4361ee;
}

.btn-outline:hover {
  background: #4361ee;
  color: #fff;
}

.btn-sm {
  padding: .4rem .9rem;
  font-size: .875rem;
}

.proyectos, .contacto {
  max-width: 960px;
  margin: 0 auto;
  padding: 5rem 1.5rem;
}

.proyectos h2, .contacto h2 {
  font-size: 2rem;
  margin-bottom: .5rem;
  text-align: center;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.card {
  background: #fff;
  border-radius: .75rem;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
  transition: transform .2s, box-shadow .2s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,.1);
}

.card-img {
  height: 160px;
  background: linear-gradient(135deg, #4361ee, #7209b7);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.25rem;
  font-weight: 600;
}

.card-body { padding: 1.25rem; }

.card-body h3 { margin-bottom: .5rem; }

.card-body p {
  color: #6c757d;
  font-size: .9rem;
  margin-bottom: .75rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin-bottom: 1rem;
}

.tags span {
  background: #e9ecef;
  padding: .2rem .6rem;
  border-radius: .25rem;
  font-size: .75rem;
  color: #495057;
}

.contacto {
  text-align: center;
}

.contacto p { color: #6c757d; margin-bottom: 1.5rem; }

form {
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

input, textarea {
  width: 100%;
  padding: .75rem;
  border: 1px solid #dee2e6;
  border-radius: .5rem;
  font-family: inherit;
  font-size: 1rem;
}

input:focus, textarea:focus {
  outline: none;
  border-color: #4361ee;
}

#form-msg {
  margin-top: 1rem;
  color: #2ecc71;
  font-weight: 500;
}

.hidden { display: none; }

footer {
  text-align: center;
  padding: 2rem;
  color: #6c757d;
  font-size: .875rem;
  border-top: 1px solid #e9ecef;
}

footer a { color: #4361ee; text-decoration: none; }
