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

body {
  background: #0a0a0a;
  color: #fff;
  font-family: 'Segoe UI', Arial, sans-serif;
  min-height: 100vh;
}

/* ══════════════════════════════
   NAVBAR
══════════════════════════════ */
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 3rem;
  border-bottom: 1px solid #1a1a1a;
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: #0a0a0a;
}

html {
  scroll-behavior: smooth;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border: 1.5px solid #31b3e6;
  border-radius: 6px;
  padding: 0.45rem 0.75rem;
  text-decoration: none;
}

.logo-icon {
  width: 28px;
  height: 28px;
}

.logo-text {
  font-size: 0.8rem;
  line-height: 1.3;
  color: #fff;
}

.logo-text span {
  color: #31cbe6;
  font-family: monospace;
}

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

nav ul a {
  color: #ccc;
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s;
}

nav ul a:hover {
  color: #fff;
}

.logo-social {
  display: flex;
  align-items: center;
  gap: 2.1rem;
}

.logo-social a {
  color: #5f5f5f;
  display: flex;
  align-items: center;
  transition: color 0.2s;
}

.logo-social a:hover {
  color: #fff;
}

.logo-social svg {
  width: 28px;
  height: 28px;
}

/* ══════════════════════════════
   HERO — reemplaza el bloque .hero anterior en style.css
   ══════════════════════════════ */

.hero {
  display: grid;
  grid-template-columns: 1fr 420px;
  align-items: center;
  min-height: calc(100vh - 73px);
  padding: 0 3rem;
  gap: 2rem;
}

.hero-content {
  max-width: 580px;
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
}

/* ── Grupos de barras ── */
.code-bars {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.bar-group {
  display: flex;
  align-items: center;
  gap: 7px;
  padding-left: var(--indent, 0px);
}

/* ── Barra individual ── */
.bar {
  height: 10px;
  width: var(--w);
  background: var(--c);
  border-radius: 2px;
  opacity: 0;
  transform: scaleX(0);
  transform-origin: left;
  animation: barIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) var(--delay) forwards;
}

@keyframes barIn {
  from { opacity: 0; transform: scaleX(0); }
  to   { opacity: 1; transform: scaleX(1); }
}

/* ── Punto separador ── */
.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4a5568;
  flex-shrink: 0;
  opacity: 0;
  animation: fadeIn 0.3s ease 0.5s forwards;
}

@keyframes fadeIn {
  to { opacity: 1; }
}

/* ── Cursor parpadeante ── */
.cursor {
  width: 2px;
  height: 14px;
  background: #fff;
  border-radius: 1px;
  opacity: 0;
  animation:
    fadeIn 0.1s ease var(--delay) forwards,
    blink 1s step-end 1s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* ── Texto del hero ── */
.hero-text {
  opacity: 0;
  animation: slideUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.45s forwards;
  margin-left: 35px;
}

.hero-text h1 {
  font-size: clamp(2.6rem, 5vw, 4rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
  letter-spacing: -1px;
  white-space: nowrap;
}

.hero-subtitle {
  font-size: 1.85rem;
  color: #777;
  font-weight: 400;
  margin-top: 0.4rem;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Botones ── */
.cta {
  display: flex;
  gap: 1rem;
  opacity: 0;
  animation: slideUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.65s forwards;
}

.btn-primary {
  background: #e63150;
  color: #fff;
  border: none;
  padding: 0.75rem 1.5rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 2px;
  transition: background 0.2s;
  text-decoration: none;
}

.btn-primary:hover { background: #c2185b; }

.btn-secondary {
  background: transparent;
  color: #fff;
  border: 1.5px solid #fff;
  padding: 0.75rem 1.5rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 2px;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-secondary:hover { background: rgba(255, 255, 255, 0.08); }

/* ── Iconos tech ── */
.tech-icons {
  display: flex;
  align-items: center;
  gap: 1.9rem;
  opacity: 0;
  animation: slideUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.8s forwards;
}

.tech-icon {
  width: 39px;
  height: 39px;
}

.tech-icon-ex {
  width: 64px;
  height: 64px;
  filter: brightness(0) invert(1);
}

/* ── Imagen ── */
.hero-image {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.avatar-circle {
  width: 340px;
  height: 340px;
  border-radius: 50%;
  border: 4px solid #00d4ff;
  padding: 6px;
  background: #1a1a2e;
  
  /* CLAVE: Fuerza a que el contenido respete el círculo */
  overflow: hidden; 
  display: flex;
  align-items: center;
  justify-content: center;
  
  /* Asegura que no se deforme si el padre es un flexbox */
  flex-shrink: 0; 
}

.avatar-circle img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  /* Esto recorta la foto para llenar el círculo sin deformarse */
  object-fit: cover; 
  /* Ajusta esto si quieres que se vea más la parte de arriba o el centro */
  object-position: center top; 
}

/* ══════════════════════════════
   SERVICES
══════════════════════════════ */
.services {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  padding: 5rem 6rem;
  background: #0a0a0a;
  align-items: start;
}


.workshops-header-skill {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2.5rem;
  grid-column: 1 / -1; /* Esto hace que ocupe desde la columna 1 hasta la última */
  margin-bottom: 3rem; /* Espacio entre el título y las tarjetas */
}

.workshops-header-skill h2 {
  font-size: 2.4rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.75rem;
}

.service-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
}

.service-icon {
  width: 56px;
  height: 56px;
  margin-bottom: 0.5rem;
}

.service-icon svg {
  width: 100%;
  height: 100%;
}

.service-icon img {
  width: 100%;
  height: 100%;
  filter: brightness(0) invert(1);
}

.service-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
}

.service-card p {
  font-size: 0.92rem;
  color: #999;
  line-height: 1.75;
  max-width: 320px;
}

/* ── Estilos para el apartado detallado de Skills ── */

.detailed-skills {
  grid-column: 1 / -1; /* Ocupa todo el ancho si usas grid */
  width: 100%;
  max-width: 1000px; /* Un poco más estrecho para lectura */
  margin: 1rem auto 0 auto;
  padding: 0 2rem;
  font-family: 'Fira Code', 'Courier New', monospace; /* Vibe técnico */
}

/* Encabezado de la Sección Detallada */
.skills-category-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.divider-accent.small {
  width: 3px;
  height: 24px; /* Un acento más corto que el divisor principal */
}

.skills-category-header h3 {
  color: #fff;
  font-size: 1.2rem;
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* Grupos y Títulos */
.skills-group {
  margin-bottom: 2rem;
}

.sub-category-title {
  color: #666; /* Gris tenue para que no compita con los tags */
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.8rem;
}

/* Contenedor de Tags (Flexbox para auto-ajuste) */
.tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px; /* Espacio entre pastillas */
}

/* Estilo Base de las Pastillas (Tags) */
.skill-tag {
  display: inline-block;
  padding: 6px 14px;
  background: #0d0d17; /* Fondo muy oscuro */
  color: #e0e0e0;
  border: 1px solid #2a2a3a; /* Borde sutil por defecto */
  border-radius: 4px;
  font-size: 0.85rem;
  cursor: default;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

/* Efecto Hover (Glow Cian) */
.skill-tag:hover {
  color: #00d4ff; /* Cian neón */
  border-color: #00d4ff;
  background: rgba(0, 212, 255, 0.05); /* Fondo muy suave cian */
  box-shadow: 0 0 10px rgba(0, 212, 255, 0.3); /* Resplandor */
  transform: translateY(-2px); /* Pequeña elevación */
}

/* Variación para habilidades "en proceso" o "destacadas" */
.skill-tag.success {
  border-color: #27c93f; /* Verde terminal */
  color: #27c93f;
}

.skill-tag.success:hover {
  box-shadow: 0 0 10px rgba(39, 201, 63, 0.3);
}

/* ══════════════════════════════
   WORKSHOPS
══════════════════════════════ */
.workshops {
  padding: 4rem 3rem 5rem;
  background: #0a0a0a;
}

.workshops-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2.5rem;
}

.workshops-header-left {
  max-width: 600px;
}

.workshops-accent {
  width: 48px;
  height: 4px;
  background: linear-gradient(to right, #e63150, #c2185b);
  margin-bottom: 1rem;
  border-radius: 2px;
}

.workshops-header-left span {
  color: #31cbe6;
  font-family: monospace;
  text-shadow: 0 0 10px rgba(0, 212, 255, 0.3); /* Resplandor */
}

.workshops-header h2 {
  font-size: 2.4rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.75rem;
}

.workshops-header p {
  font-size: 0.95rem;
  color: #999;
  line-height: 1.7;
}

.mini-terminal {
  width: 400px;
  height: 200px;
  background: rgba(13, 13, 23, 0.9);
  border: 1px solid #00d4ff;
  border-radius: 6px;
  font-family: 'Fira Code', 'Courier New', monospace;
  font-size: 0.75rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 15px rgba(0, 212, 255, 0.2);
  overflow: hidden;
  animation: fadeIn 1.5s ease;
  margin-top: 35px;
  margin-right: 75px;
}

/* Encabezado estilo macOS/Linux */
.term-header {
  background: #1a1a2e;
  padding: 8px;
  display: flex;
  gap: 6px;
  align-items: center;
  border-bottom: 1px solid #333;
}

.dot { width: 8px; height: 8px; border-radius: 50%; }
.red { background: #ff5f56; }
.yellow { background: #ffbd2e; }
.green { background: #27c93f; }
.term-title { color: #666; margin-left: 10px; font-size: 0.65rem; }

/* Cuerpo de la terminal */
.term-body {
  padding: 12px;
  color: #fff;
  line-height: 1.4;
}

.prompt { color: #00ffcc; font-weight: bold; }
.res { color: #aaa; margin-left: 10px; opacity: 0; animation: showLine 10s infinite; }
.success { color: #27c93f; }

/* Animación de escritura */
.typed {
  overflow: hidden;
  white-space: nowrap;
  display: inline-block;
  width: 0;
  vertical-align: bottom; /* Alinea la base del texto */
  max-width: fit-content;
  animation: typing 13s steps(20) infinite;
}

.cursor {
  animation: blink 1s infinite;
  color: #00d4ff;
}

/* 1. El Comando (Escritura) */
@keyframes typing {
  0% { width: 0; }
  15% { width: 100%; }   /* Termina de escribirse rápido */
  85% { width: 100%; }   /* Se queda visible hasta casi el final */
  90%, 100% { width: 0; } /* Se borra de golpe para reiniciar */
}

/* 2. Las Respuestas (Aparición) */
@keyframes showLine {
  0%, 25% { opacity: 0; transform: translateY(5px); } /* Espera a que el comando termine */
  30% { opacity: 1; transform: translateY(0); }      /* Aparece */
  85% { opacity: 1; transform: translateY(0); }      /* Se queda visible */
  90%, 100% { opacity: 0; }                          /* Desaparece con el comando */
}

/* 3. El Cuerpo de la Terminal (El "Clear") */
@keyframes terminalClean {
  0%, 85% { opacity: 1; }
  90% { opacity: 0; } /* Flash de limpieza sincronizado */
  100% { opacity: 1; }
}

.res:nth-child(2) { animation-delay: 0.5s; } /* Aparece casi de inmediato */
.res:nth-child(3) { animation-delay: 1.2s; } /* Un poco después */
.res:nth-child(4) { animation-delay: 2.0s; } /* La respuesta final */

.btn-discover {
  background: transparent;
  color: #fff;
  border: 1.5px solid #e63150;
  padding: 0.7rem 1.4rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 2px;
  white-space: nowrap;
  transition: all 0.2s;
  margin-top: 0.5rem;
}

.btn-discover:hover {
  background: #e63150;
}

.workshops-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.workshop-card {
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 4px;
  padding: 2rem 1.75rem;  
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  transition: background 0.3s, border-color 0.3s;
  cursor: pointer;
}

.workshop-card:hover,
.workshop-card--featured {
  background: linear-gradient(135deg, #7b1a3a 0%, #a0204e 50%, #c2185b 100%);
  border-color: transparent;
}

.workshop-card-blue {
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 4px;
  padding: 2rem 1.75rem;  
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  transition: background 0.3s, border-color 0.3s;
  cursor: pointer;
}

.workshop-card-blue:hover,
.workshop-card-blue--featured {
background: linear-gradient(135deg, #051622 0%, #004d66 50%, #00d4ff 100%);
  border-color: transparent;
}

.workshop-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.4;
}

.workshop-card svg {
  width: 16px;
  height: 16px; 
}

.workshop-card p {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.75;
  flex: 1;
}

.workshop-meta {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.workshop-meta li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
}

.workshop-meta svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0.8;
}

.workshop-meta a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: n;
}

/* ══════════════════════════════
   FOOTER
══════════════════════════════ */
.footer {
  background: #0a0a0c; /* Fondo oscuro profundo */
  padding: 60px 20px;
  color: #a0a0a0;
  text-align: center;
}

.footer-container {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 25px; /* Espacio uniforme entre bloques */
}

/* Nombre con estilo de código */
.brand-name {
  color: #fff;
  font-size: 1.8rem;
  font-family: 'Fira Code', monospace;
  letter-spacing: -1px;
}

.brand-name span {
  color: #31cbe6;
  font-family: monospace;
}

.footer-tagline {
  font-size: 1rem;
  color: #666;
  max-width: 400px;
}

/* Contenedor de iconos sociales */
.footer-social {
  display: flex;
  gap: 30px;
  justify-content: center;
  margin-top: 10px;
}

.social-link {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #a0a0a0;
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.social-link svg {
  width: 20px;
  height: 20px;
}

/* Hover con tu color azul cian */
.social-link:hover {
  color: #00d4ff;
  transform: translateY(-3px);
}

/* Línea de copyright */
.footer-bottom {
  margin-top: 20px;
  font-size: 0.8rem;
  color: #444;
  border-top: 1px solid #1a1a1a;
  padding-top: 25px;
  width: 100%;
}

.cursor-footer {
  animation: blink 1s infinite;
  color: #fff;
}


/* ══════════════════════════════
   DIVIDER
══════════════════════════════ */

.section-divider {
  display: flex;
  align-items: flex-end;
  padding: 0 3rem;
  width: 50%;
  height: 80px;
}

.section-divider-invert {
  display: flex;
  flex-direction: row-reverse; 
  align-items: center;      /* Centrado vertical para que la línea cruce el acento */
  padding: 0 3rem;
  width: 50%;               /* Ocupa la mitad derecha */
  height: 80px;
  /* CLAVE: Empuja el bloque de 50% hacia la derecha */
  margin-left: auto; 
}

.divider-line {
  flex: 1;
  border-bottom: 1px dashed #2a2a2a;
}

.divider-accent {
  width: 3px;
  height: 50px;
  background: #e63150;
  flex-shrink: 0;
}