body {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  background: #f9f9f9;
  animation: fadeIn 0.5s ease-in-out;
}
html { scroll-behavior: smooth; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

/* Animaciones */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideDown { from { transform: translateY(-100%); } to { transform: translateY(0); } }

/* Layout */
header {
  background: #4CAF50;
  color: #ffffff;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  animation: slideDown 0.6s ease-out;
}
.logo { font-size: 1.5rem; font-weight: bold; }
nav ul { list-style: none; display: flex; gap: 1rem; }
nav ul li a { padding: 0.5rem; transition: background 0.3s ease; }
nav ul li a:hover { background: rgba(255,255,255,0.2); border-radius: 4px; }

.container {
  max-width: 960px;
  margin: 2rem auto;
  padding: 0 1rem;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
section { margin-bottom: 3rem; opacity: 0; animation: fadeIn 1s ease-in-out forwards; }
section:nth-of-type(1) { animation-delay: 0.3s; }
section:nth-of-type(2) { animation-delay: 0.5s; }
section:nth-of-type(3) { animation-delay: 0.7s; }
section:nth-of-type(4) { animation-delay: 0.9s; }
section:nth-of-type(5) { animation-delay: 1.1s; }
h2 { margin-bottom: 1rem; color: #4CAF50; }

/* Proyectos */
.projects { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.project-card { border: 1px solid #ddd; border-radius: 8px; overflow: hidden; box-shadow: 0 2px 4px rgba(0,0,0,0.1); transition: transform 0.3s ease, box-shadow 0.3s ease; }
.project-card:hover { transform: translateY(-5px); box-shadow: 0 4px 12px rgba(0,0,0,0.2); }
.project-card img { height: 160px; object-fit: cover; }
.project-content { padding: 1rem; }
.project-title { font-size: 1.2rem; margin-bottom: 0.5rem; }

/* Secciones de CV */
.skills-list, .experience-list, .education-list { list-style: disc inside; }

/* Contacto */
form { display: grid; gap: 1rem; }
input, textarea { width: 100%; padding: 0.75rem; border: 1px solid #ccc; border-radius: 4px; transition: border-color 0.3s ease; }
input:focus, textarea:focus { border-color: #4CAF50; outline: none; }
button { background: #4CAF50; color: #fff; border: none; padding: 0.75rem 1.5rem; border-radius: 4px; cursor: pointer; transition: background 0.3s ease; }
button:hover { background: #45A049; }

/* Pie de página */
footer { text-align: center; padding: 1rem; background: #f4f4f4; font-size: 0.9rem; }
.social-links { display: flex; justify-content: center; gap: 1rem; margin-top: 0.5rem; }

/* Fondo degradado animado */
body {
  /* Degradado en diagonal */
  background: linear-gradient(135deg,
    #0f2027 0%, /* azul oscuro */
    #203a43 50%, /* azul medio */
    #2c5364 100% /* azul claro */
  );
  background-size: 400% 400%;
  animation: gradientBG 20s ease infinite;
}

/* Keyframes que hacen moverse el degradado */
@keyframes gradientBG {
  0%   { background-position: 0%   50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0%   50%; }
}

/* Opcional: si quieres secciones con un fondo semi‐transparente */
.container {
  background: rgba(255,255,255,0.8);
}
