/* --- CONFIGURACIÓN GENERAL Y VARIABLES PREMIUM --- */
html {
  scroll-behavior: smooth;
}

:root {
  --bg-main: #0b111e;         
  --bg-section-alt: #0e1626;  
  --bg-card: #131c2e;         
  --bg-card-hover: #1a263f;   
  --text-primary: #ffffff;
  --text-secondary: #94a3b8;
  --accent-blue: #0ea5e9;     
  --accent-green: #10b981;    
  --accent-amber: #f59e0b;    
  --border-color: #1e293b;    
}

body {
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  margin: 0;
  padding-top: 70px; 
  line-height: 1.6;
  overflow-x: hidden;
}

/* --- NAVBAR MODERNA --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 70px;
  background: rgba(11, 17, 30, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  z-index: 2000;
}

.nav-container {
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  box-sizing: border-box;
}

.nav-logo {
  font-weight: 700;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-box {
  background: linear-gradient(135deg, var(--accent-blue), #1d4ed8);
  color: #ffffff;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 0.9rem;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  margin-left: 20px;
  font-size: 0.95rem;
  font-weight: 500;
  transition: 0.3s;
}

.nav-links a:hover {
  color: var(--accent-blue);
}

/* --- CABECERA / HERO SECTION --- */
.hero-section {
  background: radial-gradient(circle at 50% 20%, #1e3a8a 0%, var(--bg-main) 65%);
  padding: 80px 20px;
  border-bottom: 1px solid var(--border-color);
}

.hero-container {
  max-width: 1100px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  background-color: rgba(16, 185, 129, 0.1);
  color: #34d399;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 30px;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent-green);
  border-radius: 50%;
  margin-right: 8px;
  display: inline-block;
  box-shadow: 0 0 8px var(--accent-green);
}

.hero-main {
  display: flex;
  gap: 40px;
  align-items: center;
  text-align: left;
  justify-content: flex-start;
}

/* Deja esta clase exactamente así en tu styles.css */
.hero-avatar {
  width: 150px;
  height: 150px;
  min-width: 150px;
  min-height: 150px;
  border-radius: 50%;
  border: 3px solid #0ea5e9; /* Forzado color cian */
  box-shadow: 0 0 25px rgba(14, 165, 233, 0.4);
  position: relative;
  flex-shrink: 0;
  background-color: #0ea5e9; /* Color de respaldo si falla el gradiente */
  background: linear-gradient(135deg, #0ea5e9 0%, #1d4ed8 100%) !important; /* Forzado absoluto */
}

.hero-content {
  flex-grow: 1;
  max-width: 750px;
}

.hero-content h1 {
  font-size: 2.8rem;
  margin: 0 0 10px 0;
  font-weight: 800;
  letter-spacing: -1px;
}

.subtitle {
  color: var(--accent-blue);
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 15px;
}

.description {
  color: var(--text-secondary);
  line-height: 1.6;
  font-size: 1.05rem;
}

.hero-location {
  display: flex;
  gap: 20px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin: 20px 0;
}

.hero-buttons {
  display: flex;
  gap: 15px;
  margin-top: 25px;
}

/* --- BOTONES BASE --- */
.btn {
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary { background-color: var(--accent-blue); color: #fff; }
.btn-primary:hover { background-color: #0284c7; transform: translateY(-2px); }
.btn-linkedin { background-color: #1e293b; color: #fff; border: 1px solid var(--border-color); }
.btn-linkedin:hover { background-color: #0077b5; transform: translateY(-2px); }
.btn-github { background-color: #1e293b; color: #fff; border: 1px solid var(--border-color); }
.btn-github:hover { background-color: #333; transform: translateY(-2px); }

/* --- SECCIÓN ACERCA DE (DOS COLUMNAS) --- */
.about-section {
  padding: 90px 20px;
  max-width: 1100px;
  margin: 0 auto;
}

.about-container {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 50px;
  align-items: start;
}

.section-tag {
  color: var(--accent-amber);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 2px;
  margin-bottom: 8px;
}

.about-left h2 {
  font-size: 2.2rem;
  margin-top: 0;
  font-weight: 800;
}

.about-left p {
  color: var(--text-secondary);
  line-height: 1.7;
  font-size: 1.05rem;
}

.about-right {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.about-card {
  display: flex;
  gap: 20px;
  background-color: var(--bg-card);
  padding: 22px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.about-card:hover {
  background-color: var(--bg-card-hover);
  border-color: rgba(14, 165, 233, 0.4);
  transform: translateX(4px);
}

.card-icon {
  color: var(--accent-blue);
  font-size: 1.6rem;
  background: rgba(14, 165, 233, 0.1);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  flex-shrink: 0;
}

.card-text h3 {
  margin: 0 0 6px 0;
  font-size: 1.15rem;
  color: var(--text-primary);
}

.card-text p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* --- SECCIÓN HABILIDADES (BLOQUES COMPACTOS) --- */
.skills-section {
  padding: 90px 20px;
  background-color: var(--bg-section-alt);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.skills-container {
  max-width: 1100px;
  margin: 0 auto;
}

.skills-section h2 {
  font-size: 2.2rem;
  font-weight: 800;
  margin-top: 0;
  margin-bottom: 40px;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 25px;
}

.skill-group-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 25px;
  border-radius: 12px;
  transition: all 0.3s ease;
}

.skill-group-card:hover {
  border-color: var(--accent-blue);
  transform: translateY(-3px);
}

.skill-group-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
  border-bottom: 1px solid #1e293b;
  padding-bottom: 12px;
}

.skill-group-header h3 {
  margin: 0;
  font-size: 1.15rem;
}

.skill-group-header i { font-size: 1.6rem; }
.icon-aws { color: #ff9900; }
.icon-net { color: #38bdf8; }
.icon-iac { color: #84cc16; }
.icon-docker { color: #0db7ed; }
.icon-cicd { color: #ec4899; }
.icon-obs { color: #a855f7; }

.skill-group-card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* --- SECCIÓN PORTFOLIO Y TARJETAS PREMIUM --- */
.projects-section {
  padding: 90px 20px;
  max-width: 1100px;
  margin: 0 auto;
}

.projects-section h2 {
  font-size: 2.2rem;
  font-weight: 800;
  margin-top: 0;
  margin-bottom: 40px;
}

.projects-showcase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(460px, 1fr));
  gap: 35px;
}

.project-premium-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
}

.project-premium-card:hover {
  border-color: var(--accent-blue);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
  transform: translateY(-5px);
}

.project-media {
  background: linear-gradient(135deg, #111827 0%, #1f2937 100%);
  height: 210px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
}

.diagram-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: #4b5563;
  font-size: 0.9rem;
}

.diagram-placeholder i {
  font-size: 2.8rem;
  color: var(--accent-blue);
  opacity: 0.4;
}

.project-info {
  padding: 30px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.project-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  text-transform: uppercase;
  width: max-content;
  margin-bottom: 15px;
}

.level-prof { background-color: rgba(14, 165, 233, 0.15); color: var(--accent-blue); }
.level-adv { background-color: rgba(245, 158, 11, 0.15); color: #f59e0b; }
/* Badge exclusivo para el proyecto de GitOps */
.level-gitops {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.3);
}

/* Estilos de consola específicos para simular ArgoCD */
.argocd-logs {
  font-family: 'Fira Code', 'Courier New', Courier, monospace;
  font-size: 0.85rem;
  line-height: 1.4;
}
.t-comment { color: #64748b; font-style: italic; }
.t-warning { color: #f59e0b; }
.t-info { color: #38bdf8; }

.project-info h3 {
  margin: 0 0 12px 0;
  font-size: 1.4rem;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.project-tags span {
  background-color: #0b111e;
  border: 1px solid var(--border-color);
  color: var(--accent-blue);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
}

.project-info p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0 0 20px 0;
}

.project-impact {
  background-color: rgba(14, 165, 233, 0.04);
  border-left: 3px solid var(--accent-blue);
  padding: 12px 16px;
  border-radius: 0 8px 8px 0;
  margin-bottom: 25px;
  font-size: 0.9rem;
  color: #e2e8f0;
}

.project-impact strong {
  color: var(--accent-blue);
  display: block;
  margin-bottom: 3px;
}

.btn-project-github {
  background-color: #0b111e;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  text-align: center;
  padding: 12px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  margin-top: auto;
}

.btn-project-github:hover {
  background-color: var(--accent-blue);
  border-color: var(--accent-blue);
}

/* --- SECCIÓN CONTACTO --- */
.contact-section {
  padding: 90px 20px;
  background-color: var(--bg-section-alt);
  border-top: 1px solid var(--border-color);
  text-align: center;
}

.contact-container {
  max-width: 650px;
  margin: 0 auto;
}

.contact-section h2 {
  font-size: 2.2rem;
  font-weight: 800;
  margin: 0 0 15px 0;
}

.contact-desc {
  color: var(--text-secondary);
  margin-bottom: 35px;
  font-size: 1.05rem;
}

.contact-actions {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.btn-contact-action {
  padding: 14px 28px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 700;
  color: #fff;
  transition: all 0.3s ease;
}

.btn-contact-action:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.3);
}

.mail-btn { background-color: #2563eb; }
.mail-btn:hover { background-color: #1d4ed8; }
.linkedin-btn { background-color: #0077b5; }
.linkedin-btn:hover { background-color: #005987; }

/* --- INTERFAZ AUXILIAR / FOOTER --- */
.back-to-top {
  position: fixed; bottom: 25px; right: 25px; background: var(--accent-blue); color: #fff;
  width: 45px; height: 45px; border-radius: 50%; display: flex; justify-content: center;
  align-items: center; text-decoration: none; font-weight: bold; opacity: 0;
  pointer-events: none; transition: 0.3s; z-index: 3000; box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}
.back-to-top.show { opacity: 1; pointer-events: auto; }

footer {
  text-align: center; padding: 40px 20px; background: #070a10; border-top: 1px solid var(--border-color); color: #6b7280; font-size: 0.95rem;
}

/* --- RESPONSIVE / ADAPTACIÓN MÓVIL --- */
@media (max-width: 900px) {
  .about-container { grid-template-columns: 1fr; gap: 40px; }
  .projects-showcase-grid { grid-template-columns: 1fr; }
  .hero-main { flex-direction: column; text-align: center; justify-content: center; }
  .hero-location, .hero-buttons { justify-content: center; flex-wrap: wrap; }
}

/* --- SECCIÓN PIPELINE SHOWROOM (ESTILO INTERACTIVO LARRY RONDAN) --- */
.pipeline-showroom {
  padding: 50px 20px;
  background-color: #090e1a;
  border-top: 1px solid var(--border-color);
  text-align: center;
}

.showroom-container {
  max-width: 1100px;
  margin: 0 auto;
}

.section-tag-center {
  color: var(--accent-blue);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 2px;
  margin-bottom: 10px;
}

.showroom-title {
  font-size: 1.5rem;
  margin-top: 0;
  margin-bottom: 40px;
  font-weight: 700;
  color: var(--text-primary);
}

.pipeline-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  max-width: 850px;
  margin: 0 auto;
  background: var(--bg-card);
  padding: 30px;
  border-radius: 16px;
  border: 1px solid var(--border-color);
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

.pipeline-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 110px;
}

.pipeline-node i {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: #1e293b;
  border: 2px solid #475569;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: all 0.4s ease;
}

.pipeline-node span {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.pipeline-line {
  flex-grow: 1;
  height: 3px;
  background-color: #1e293b;
  position: relative;
  margin-bottom: 25px; /* Alineación con los círculos */
}

/* --- ESTADOS ACTIVOS Y ANIMACIONES PREMIUM --- */
.pipeline-node.done i {
  background-color: rgba(16, 185, 129, 0.15);
  border-color: var(--accent-green);
  color: var(--accent-green);
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.3);
}

.pipeline-node.done span {
  color: #fff;
}

.pipeline-line.done {
  background-color: var(--accent-green);
}

.pipeline-line.active::after {
  content: '';
  position: absolute;
  top: 0; left: 0; height: 100%; width: 0;
  background-color: var(--accent-blue);
  animation: compileProgress 2.5s infinite linear;
}

.pipeline-node.pulse i {
  background-color: rgba(14, 165, 233, 0.1);
  border-color: var(--accent-blue);
  color: var(--accent-blue);
  animation: neonGlow 1.5s infinite alternate;
}

.pipeline-node.pulse span {
  color: var(--accent-blue);
}

/* Keyframes de animación */
@keyframes compileProgress {
  0% { width: 0%; opacity: 1; }
  100% { width: 100%; opacity: 0.8; }
}

@keyframes neonGlow {
  0% { box-shadow: 0 0 5px rgba(14, 165, 233, 0.2); }
  100% { box-shadow: 0 0 20px rgba(14, 165, 233, 0.6); }
}

/* Ajustes Responsive */
@media (max-width: 768px) {
  .pipeline-visual { flex-direction: column; gap: 25px; }
  .pipeline-line { width: 3px; height: 30px; margin-bottom: 0; }
  .pipeline-line.active::after { width: 100%; height: 0; animation: compileProgressVertical 2.5s infinite linear; }
}

@keyframes compileProgressVertical {
  0% { height: 0%; opacity: 1; }
  100% { height: 100%; opacity: 0.8; }
}
/* --- EFECTO REVEAL (FADE-IN CON SCROLL) --- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* --- MOCK TERMINAL PARA PROYECTOS (ESTILO GITOPS VIVO) --- */
.mock-terminal {
  width: 90%;
  max-width: 420px;
  background-color: #05070c;
  border: 1px solid #1e293b;
  border-radius: 8px;
  box-shadow: 0 12px 24px rgba(0,0,0,0.6);
  font-family: 'Courier New', Courier, monospace;
  text-align: left;
  overflow: hidden;
}

.terminal-header {
  background-color: #0f172a;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid #1e293b;
}

.terminal-header .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.dot.red { background-color: #ef4444; }
.dot.yellow { background-color: #f59e0b; }
.dot.green { background-color: #10b981; }

.terminal-title {
  color: #64748b;
  font-size: 0.75rem;
  margin-left: 10px;
}

.terminal-body {
  padding: 15px;
  font-size: 0.8rem;
  line-height: 1.4;
  color: #e2e8f0;
}

.t-cmd { color: #38bdf8; font-weight: bold; }
.t-success { color: #4ade80; }
.t-info { color: #fbbf24; }

.t-table {
  width: 100%;
  border-collapse: collapse;
  color: #94a3b8;
  margin: 8px 0;
}
.t-table td {
  padding: 2px 4px;
}

/* Animación simulada de escritura */
.code-typing p, .code-typing-delay p, .t-table {
  overflow: hidden;
  white-space: nowrap;
  animation: typingSim 2s steps(40, end);
}

.code-typing-delay {
  animation: fadeInBody 1s ease-in;
}

@keyframes typingSim {
  from { width: 0; }
  to { width: 100%; }
}

/* --- TERMINAL CON LOGS DINÁMICOS INFINITOS --- */
.terminal-body {
  padding: 15px;
  font-size: 0.8rem;
  line-height: 1.5;
  color: #e2e8f0;
  height: 160px; /* Altura fija para hacer el efecto máscara */
  overflow: hidden;
  position: relative;
}

/* Contenedor que se deslizará hacia arriba simulando nuevos logs */
.terminal-log-stream {
  display: flex;
  flex-direction: column;
  animation: logScrolling 12s infinite linear;
}

.t-cmd { color: #38bdf8; font-weight: bold; margin-bottom: 6px; }
.t-success { color: #4ade80; margin: 2px 0; }
.t-info { color: #fbbf24; margin: 2px 0; }
.t-error { color: #f87171; margin: 2px 0; }

.t-table {
  width: 100%;
  border-collapse: collapse;
  color: #94a3b8;
  margin: 6px 0;
}

/* Keyframes para simular la salida continua de logs en producción */
@keyframes logScrolling {
  0% { transform: translateY(0); }
  10% { transform: translateY(0); }
  25% { transform: translateY(-40px); }
  45% { transform: translateY(-80px); }
  65% { transform: translateY(-120px); }
  85% { transform: translateY(-160px); }
  100% { transform: translateY(0); } /* Reinicia el bucle */
}
/* --- NUEVA HERO SECTION ESTILO BANNER PREMIUM --- */
.hero-section {
  padding: 40px 20px;
  background-color: #0b121f;
}

.hero-card {
  background: #0f172a;
  border: 1px solid #1e293b;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  max-width: 1200px;
  margin: 0 auto;
}

/* El banner tecnológico superior */
.hero-banner {
  height: 220px;
  background: linear-gradient(135deg, #1e1b4b 0%, #0f172a 50%, #1e3a8a 100%);
  position: relative;
  overflow: hidden;
}

/* Efecto de rejilla/partículas en el banner */
.hero-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(#38bdf8 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0.15;
}

/* Contenedor principal de la información */
.hero-body {
  padding: 30px;
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 30px;
}

/* Posicionamiento flotante del avatar sobre el banner */
.hero-avatar-wrapper {
  margin-top: -90px; /* Sube el avatar para que muerda el banner */
  position: relative;
  z-index: 10;
}

.hero-avatar-inner {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  border: 4px solid #0f172a;
  box-shadow: 0 8px 16px rgba(0,0,0,0.5);
  overflow: hidden;
  background: #1e293b;
}

/* Bloque central de contenido */
.hero-main-content {
  flex: 1;
}

.hero-main-content h1 {
  font-size: 2.2rem;
  color: #f8fafc;
  margin: 0 0 5px 0;
}

.hero-main-content .subtitle {
  font-size: 1.1rem;
  color: #38bdf8;
  font-weight: 600;
  margin: 0 0 15px 0;
}

.hero-main-content .description {
  color: #94a3b8;
  line-height: 1.6;
  font-size: 0.95rem;
  margin-bottom: 20px;
  max-width: 800px;
}

.hero-meta-tags {
  display: flex;
  gap: 15px;
  font-size: 0.85rem;
  color: #64748b;
  flex-wrap: wrap;
}

.hero-meta-tags span {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Bloque lateral derecho de botones (Como Larry) */
.hero-side-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 180px;
  margin-top: 10px;
}

/* Botones con colores de la referencia */
.btn-cv {
  background-color: #2563eb;
  color: #ffffff;
}
.btn-cv:hover { background-color: #1d4ed8; }

.btn-linkedin {
  background-color: #0077b5;
  color: white;
}
.btn-linkedin:hover { background-color: #005987; }

.btn-github {
  background-color: #24292e;
  color: white;
  border: 1px solid #334155;
}
.btn-github:hover { background-color: #1a1e22; }

/* Selector de idioma en la Navbar */
.lang-selector {
  display: flex;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: bold;
  align-items: center;
  margin-left: 15px;
  border-left: 1px solid #334155;
  padding-left: 15px;
}

.lang-selector span {
  cursor: pointer;
  color: #64748b;
  transition: color 0.2s;
}

.lang-selector span.active {
  color: #38bdf8;
}

/* Responsive para pantallas móviles o pequeñas */
@media (max-width: 900px) {
  .hero-body {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .hero-avatar-wrapper {
    margin-top: -80px;
  }
  .hero-side-actions {
    width: 100%;
    flex-direction: row;
    justify-content: center;
  }
  .hero-meta-tags {
    justify-content: center;
  }
}

/* 1. IMAGEN DE BANNER REAL (Reemplaza la propiedad .hero-banner previa) */
.hero-banner {
  height: 220px;
  /* Usamos una imagen real de alta definición sobre tecnología/redes */
  background: linear-gradient(to bottom, rgba(15, 23, 42, 0.3), #0f172a), 
              url('https://images.unsplash.com/photo-1618005182384-a83a8bd57fbe?q=80&w=1200&auto=format&fit=crop') no-repeat center center;
  background-size: cover;
  position: relative;
  overflow: hidden;
}

/* 2. BOTONES LATERALES ULTRA REDONDEADOS (Estilo Cápsula) */
.hero-side-actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 24px;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 50px; /* <--- Esto los hace igual de redondeados que el badge verde */
  transition: all 0.2s ease-in-out;
  text-decoration: none;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Ajustes específicos de los botones del lateral */
.btn-cv { background-color: #2563eb; color: white; }
.btn-cv:hover { background-color: #1d4ed8; transform: translateY(-2px); }

.btn-linkedin { background-color: #0077b5; color: white; }
.btn-linkedin:hover { background-color: #005987; transform: translateY(-2px); }

.btn-github { background-color: #24292e; color: white; border: 1px solid #334155; }
.btn-github:hover { background-color: #1a1e22; transform: translateY(-2px); }


/* 3. SELECTOR DE IDIOMA EN LA ESQUINA SUPERIOR DERECHA EXTRACTO */
.lang-selector {
  display: flex;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: bold;
  align-items: center;
  /* Forzamos una posición absoluta real respecto a la pantalla/barra */
  position: absolute;
  right: 24px;       /* Distancia fija al borde derecho de la pantalla */
  top: 50%;          /* Lo centra verticalmente en la barra */
  transform: translateY(-50%);
  z-index: 100;      /* Se asegura de estar por encima de todo */
  background: transparent;
}

/* Asegurar que la barra de navegación sea el contenedor de referencia */
.nav-container {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

/* Espaciado a la derecha de los links para que no pisen el selector */
.nav-links {
  margin-right: 80px; 
}

.nav-container {
  position: relative; /* Esto es vital para que el 'absolute' de arriba se oriente aquí */
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Animación de scroll infinito para la terminal de ArgoCD */
.argocd-logs {
  display: flex;
  flex-direction: column;
  animation: scrollLogsArgo 12s infinite linear;
}

@keyframes scrollLogsArgo {
  0% { transform: translateY(0); }
  10% { transform: translateY(0); }
  35% { transform: translateY(-20px); }
  60% { transform: translateY(-40px); }
  85% { transform: translateY(-60px); }
  100% { transform: translateY(0); }
}

/* Color morado corporativo de ArgoCD para destacar elementos */
.text-purple {
  color: #a855f7;
}

/* Contenedor principal de controles de búsqueda */
.projects-filter-wrapper {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 30px;
  width: 100%;
}

/* Pestañas/Botones de Filtro */
.filter-tabs {
  display: flex;
  gap: 10px;
}
.filter-btn {
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(71, 85, 105, 0.4);
  color: #94a3b8;
  padding: 8px 18px;
  border-radius: 20px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s ease;
}
.filter-btn:hover, .filter-btn.active {
  background: #38bdf8;
  color: #0f172a;
  border-color: #38bdf8;
  box-shadow: 0 4px 12px rgba(56, 189, 248, 0.2);
}

/* Caja de Búsqueda y Contador */
.search-box-container {
  display: flex;
  align-items: center;
  gap: 15px;
}
.search-counter {
  color: #64748b;
  font-size: 0.9rem;
}
.search-input-wrapper {
  position: relative;
}
.search-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
}
#project-search {
  background: #1e293b;
  border: 1px solid rgba(71, 85, 105, 0.6);
  color: #f8fafc;
  padding: 10px 15px 10px 40px;
  border-radius: 24px;
  width: 280px;
  outline: none;
  transition: all 0.3s ease;
}
#project-search:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
}

/* Limitar el ancho del contenedor de proyectos para alinearlo con el resto de la web */
.projects-container {
  max-width: 1200px;  /* Ajusta este número al ancho de tu sección 'about' o 'skills' si es necesario */
  margin: 0 auto;     /* Centra el bloque entero en la pantalla */
  padding: 0 20px;    /* Evita que toque los bordes en pantallas medianas o tablets */
  width: 100%;
}

/* Forzar que la barra de filtros y el buscador sigan el mismo ancho */
.projects-filter-wrapper {
  max-width: 1200px;
  margin: 0 auto 30px auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  width: 100%;
}

/* --- DISEÑO RESPONSIVO DEFINITIVO (NAVBAR MOBILE) --- */
@media (max-width: 768px) {
  
  /* Reset completo del contenedor: permite múltiples filas */
  .navbar .nav-container {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 10px 16px !important;
  }

  /* El logo se queda fijo a la izquierda en la fila superior */
  .navbar .nav-logo {
    flex: 1 !important;
    text-align: left !important;
  }

  /* El selector de idioma se va a la derecha en la fila superior */
  .navbar .lang-selector {
    text-align: right !important;
    margin: 0 !important;
    padding: 0 0 0 10px !important;
    border-left: none !important; /* Quitamos bordes raros si los hubiera */
  }

  /* Forzamos a los enlaces a bajar a una nueva fila exclusiva */
  .navbar .nav-links {
    width: 100% !important;
    flex-basis: 100% !important; /* Corte de línea obligatorio */
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 8px 10px !important;    /* Espaciado vertical y horizontal constante */
    margin-top: 14px !important;  /* Separación respecto al logo */
    padding: 6px 0 0 0 !important;
  }

  /* Convertimos los enlaces de texto en botones estilo "cápsula" */
  .navbar .nav-links a {
    font-size: 12px !important;
    padding: 6px 12px !important;
    background: rgba(255, 255, 255, 0.06) !important; /* Fondo sutil translúcido */
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 30px !important; /* Bordes totalmente redondeados */
    white-space: nowrap !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    color: #e2e8f0 !important;
    transition: all 0.2s ease;
  }

  /* Efecto sutil al pulsar los botones del menú */
  .navbar .nav-links a:active, .navbar .nav-links a:hover {
    background: rgba(56, 189, 248, 0.2) !important; /* Color azul de tu tema */
    border-color: #38bdf8 !important;
  }
}