/* Portfolio Styles */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');

:root {
  --color-primary: #6366f1;
  --color-secondary: #10b981;
  --color-accent: #8b5cf6;
  --color-bg: #0f172a;
  --color-bg-alt: #1e293b;
  --color-text: #f8fafc;
  --color-muted: #94a3b8;
  --radius: 14px;
  --transition: 0.3s ease;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
  font-size: 1rem;
  position: relative;
  overflow-x: hidden;
}

/* === Fondo animado estilo "data flow" === */
body::before,
body::after {
  content: "";
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
}

body::before {
  background: repeating-linear-gradient(
    to top,
    rgba(255, 255, 255, 0.02),
    rgba(255, 255, 255, 0.02) 1px,
    transparent 2px,
    transparent 20px
  );
  animation: flow-lines 15s linear infinite;
}

body::after {
  background: radial-gradient(circle at 20% 30%, rgba(144, 97, 249, 0.08) 0%, transparent 50%),
              radial-gradient(circle at 80% 60%, rgba(15, 240, 252, 0.07) 0%, transparent 50%);
  animation: pulse-bg 60s ease infinite;
}

@keyframes flow-lines {
  from { background-position: 0 0; }
  to { background-position: 0 -1000px; }
}

@keyframes pulse-bg {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.02); opacity: 0.6; }
}

/* Containers & Sections */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 0;
}

.hero {
  text-align: center;
  padding: 5rem 0 4rem;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--color-accent);
}

.subtitle {
  font-size: 1.5rem;
  color: var(--color-muted);
  margin-bottom: 2rem;
}

.nav-menu {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.25rem;
  list-style: none;
  margin-bottom: 2rem;
}

.nav-menu a {
  color: var(--color-text);
  text-decoration: none;
  font-weight: 600;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius);
  background-color: var(--color-bg-alt);
  transition: background-color var(--transition);
}

.nav-menu a:hover {
  background-color: var(--color-accent);
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1rem;
}

.social-links a {
  color: var(--color-text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  text-decoration: none;
  transition: color var(--transition);
}

.social-links a:hover {
  color: var(--color-secondary);
}

section h2 {
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 2rem;
  color: var(--color-secondary);
  text-align: center;
}

.about p,
.contact p {
  font-size: 1.1rem;
  text-align: center;
  margin-bottom: 1rem;
}

/* Tecnología */
.tech-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  list-style: none;
  padding: 0;
  text-align: center;
}

.tech-list li {
  background-color: var(--color-bg-alt);
  padding: 1rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  font-weight: 500;
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: var(--color-text);
}

.tech-list li:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Proyectos */
.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* Dos columnas iguales */
  gap: 2.5rem;
  justify-items: center;
  max-width: 900px; /* Limitar ancho para mejor alineación */
  margin: 0 auto; /* Centrar la grid */
  padding: 0 1rem;
}

.project-card {
  background-color: #f9f9f9; /* Un fondo muy claro */
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  width: 420px; /* Más ancho para que se vean más grandes */
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  color: #222; /* Color oscuro para texto legible */
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.project-card img {
  width: 100%;
  height: 250px; /* Un poco más alto para mayor impacto */
  object-fit: cover;
  border-bottom: 3px solid #0077cc; /* Línea azul para detalle */
}

.project-card h3 {
  margin: 1.2rem 0 0.6rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: #003d66; /* Azul oscuro */
}

.project-card p {
  padding: 0 1.5rem;
  font-size: 1.05rem;
  flex-grow: 1;
  color: #444; /* Gris oscuro para lectura cómoda */
  line-height: 1.4;
}

.project-card a {
  margin: 1.5rem 1.5rem 1.5rem;
  padding: 0.7rem 1.5rem;
  background-color: #0077cc;
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  box-shadow: 0 3px 8px rgba(0, 119, 204, 0.5);
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.project-card a:hover {
  background-color: #005fa3;
  box-shadow: 0 5px 15px rgba(0, 95, 163, 0.7);
}

/* Responsive para pantallas más pequeñas */
@media (max-width: 900px) {
  .project-grid {
    grid-template-columns: 1fr; /* Una columna para móviles */
  }

  .project-card {
    width: 90%;
  }
}

/* Contacto */
.contact a {
  color: var(--color-accent);
  font-weight: 600;
  text-decoration: underline;
}

/* Footer */
.footer {
  background-color: #020617;
  color: white;
  text-align: center;
  padding: 2rem 0;
  font-size: 0.9rem;
  border-top: 1px solid #1e293b;
}

/* Experiencia laboral moderna */
.job-block {
  background-color: var(--color-bg-alt);
  padding: 1.5rem;
  margin-bottom: 2rem;
  border-left: 4px solid var(--color-secondary);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform var(--transition);
}

.job-block:hover {
  transform: translateY(-5px);
}

.job-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.job-header h3 {
  font-size: 1.3rem;
  font-weight: 600;
  margin: 0;
  color: var(--color-text);
}

.job-header span {
  font-size: 0.95rem;
  color: var(--color-muted);
}

.job-block p {
  font-size: 1.05rem;
  color: var(--color-text);
  line-height: 1.6;
}

.job-block img {
  vertical-align: middle;
  margin: 0 0.3rem;
  width: 20px;
  height: 20px;
  object-fit: contain;
}

/* Reveal scroll */
.will-fade {
  opacity: 0;
  transform: translateY(30px);
}

.fade-in {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

/* Responsive */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.25rem;
  }

  .subtitle {
    font-size: 1.1rem;
  }

  .tech-list {
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  }
}
.cv-button {
  margin-top: 1.5rem;
  display: flex;
  justify-content: center;
}

.btn-cv {
  background-color: var(--color-secondary);
  color: #000;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: background-color var(--transition), transform var(--transition), box-shadow var(--transition);
  box-shadow: var(--shadow);
  display: inline-block;
}

.btn-cv:hover {
  background-color: #059669;
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.4);
}
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
