/* Reset básico */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #121826; /* se mantiene */
  color: #f1f5f9;
  line-height: 1.6;
  font-size: 16px;
}

/* Links base */
a {
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

a:hover {
  opacity: 0.9;
}

/* Encabezado */
header {
  background-image: linear-gradient(rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.55)), url("../img/mininst.jpg");
  background-color: #1e293b; /* fallback */
  background-size: cover;
  background-position: center bottom 20%;
  background-repeat: no-repeat;
  color: #ffffff;
  padding: 150px 120px;
  text-align: left;
  border-bottom: 3px solid #3b82f6;
  position: relative;
}

header h1 {
  font-size: 2 rem;
  font-weight: 700;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
}

.tagline {
  font-size: 1.1rem;
  color: #94a3b8;
  margin-top: 12px;
  max-width: 600px;
}

/* Avatar */
.avatar img {
  border-radius: 50%;
  border: 4px solid #3b82f6;
  width: 110px;
  height: 110px;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.avatar img:hover {
  transform: scale(1.08);
  box-shadow: 0 8px 18px rgba(59, 130, 246, 0.4);
}

/* Containers */
.container {
  width: 90%;
  max-width: 1100px;
  margin: 50px auto;
  padding: 20px;
}

/* Títulos */
h2 {
  color: #3b82f6;
  font-size: 2rem;
  margin-bottom: 25px;
  border-left: 4px solid #3b82f6;
  padding-left: 12px;
}

/* Sección Acerca de mí */
#about p {
  font-size: 1.1rem;
  color: #cbd5e1;
  margin-bottom: 15px;
}

.muted {
  color: #94a3b8;
  font-size: 0.95rem;
  font-style: italic;
}

/* Trabajos */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 25px;
}

.card {
  background-color: #1f2937;
  padding: 22px;
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 24px rgba(59, 130, 246, 0.3);
}

.card p {
  color: #d1d5db;
  margin-bottom: 12px;
}

/* Botones en tarjetas */
.card a {
  display: inline-block;
  margin-top: 15px;
  padding: 10px 16px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.card a:first-child {
  background-color: #3b82f6;
  color: white;
  box-shadow: 0 3px 10px rgba(59, 130, 246, 0.3);
}

.card a:first-child:hover {
  background-color: #2563eb;
  transform: translateY(-2px);
}

.card a:last-child {
  background-color: #334155;
  color: #f1f5f9;
}

.card a:last-child:hover {
  background-color: #475569;
  transform: translateY(-2px);
}

/* Habilidades */
#habilidades ul {
  list-style: none;
  margin-top: 20px;
}

#habilidades li {
  font-size: 1.1rem;
  margin-bottom: 10px;
  padding-left: 1.2rem;
  position: relative;
  color: #cbd5e1;
}

#habilidades li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: #3b82f6;
  font-weight: bold;
}

/* Footer */
footer {
  background-color: #1e293b;
  color: #94a3b8;
  text-align: center;
  padding: 25px;
  margin-top: 60px;
  border-top: 2px solid #3b82f6;
}

/* Animaciones iniciales */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(25px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

header, main, footer {
  animation: fadeIn 1s ease-out;
}

/* Sección Actividades */
#actividades .grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 18px;
  margin-top: 25px;
}

#actividades .btn {
  display: block;
  text-align: center;
  padding: 12px;
  border-radius: 8px;
  background: #2563eb;
  color: white;
  font-weight: bold;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 3px 12px rgba(37, 99, 235, 0.3);
}

#actividades .btn:hover {
  background: #1e40af;
  transform: translateY(-2px);
}

.btn-back {
  background: #6b7280;
  color: white;
}

.btn-back:hover {
  background: #374151;
}

/* Proyectos */
#proyectos .grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 18px;
  margin-top: 25px;
}

#proyectos .btn {
  display: block;
  text-align: center;
  padding: 12px;
  border-radius: 8px;
  background: #2563eb;
  color: white;
  font-weight: bold;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 3px 12px rgba(37, 99, 235, 0.3);
}

#proyectos .btn:hover {
  background: #1e40af;
  transform: translateY(-2px);
}

/* Navegación */
nav ul {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  list-style: none;
}

.nav-btn {
  padding: 10px 16px;
  background-color: #3498db;
  color: white;
  border-radius: 8px;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: 0 3px 10px rgba(52, 152, 219, 0.3);
}

.nav-btn:hover {
  background-color: #2c80b4;
  transform: translateY(-2px);
}
