/*
╔══════════════════════════════════════════════════════════════╗
║  ARCHIVO:   styles.css                                       ║
║  PROYECTO:  clbinformatica                                   ║
║                                                              ║
║  ESTÉTICA:  Industrial-tecnológica. Dark theme con acento    ║
║  en verde terminal (#00ff88). Tipografía técnica (IBM Plex  ║
║  Mono) combinada con display moderna (Syne).                 ║
║                                                              ║
║  ARQUITECTURA:                                               ║
║  1. Variables del sistema (design tokens)                    ║
║  2. Reset & base                                             ║
║  3. Cursor personalizado                                     ║
║  4. Navbar                                                   ║
║  5. Sección Hero                                             ║
║  6. Sección Sobre Mí                                         ║
║  7. Secciones de Servicios (Software / Hardware)             ║
║  8. Sección Social                                           ║
║  9. Sección Contacto                                         ║
║  10. Footer                                                  ║
║  11. Animaciones (keyframes)                                 ║
║  12. Media Queries (responsive)                              ║
╚══════════════════════════════════════════════════════════════╝
*/


/* ════════════════════════════════════════════════════════════
   1. VARIABLES DEL SISTEMA (Design Tokens)
   CAMBIAR AQUÍ: toda la paleta de colores y tipografías.
   Modifica solo estas variables y el cambio se propaga a todo.
════════════════════════════════════════════════════════════ */
:root {
  /* ── Colores principales ───────────────────────────────── */
  /* CAMBIAR AQUÍ: fondo oscuro principal */
  --bg:           #070d14;
  /* Fondo ligeramente más claro (superficies) */
  --bg-2:         #0b1422;
  /* Superficie de tarjetas y paneles */
  --surface:      #0f1e30;
  /* Borde sutil */
  --border:       rgba(0, 255, 136, 0.12);
  /* Borde más visible */
  --border-2:     rgba(0, 255, 136, 0.22);

  /* ── Acento: verde terminal ────────────────────────────── */
  /* CAMBIAR AQUÍ: color de acento principal */
  --accent:       #00ff88;
  --accent-dim:   rgba(0, 255, 136, 0.15);
  --accent-dark:  #00cc6a;

  /* ── Texto ─────────────────────────────────────────────── */
  --text:         #d4e4f0;        /* Texto principal */
  --text-muted:   #4a6480;        /* Texto secundario */
  --text-bright:  #eef6ff;        /* Texto en titulares */

  /* ── Tipografías ───────────────────────────────────────── */
  /* CAMBIAR AQUÍ: fuentes del proyecto */
  --font-display: 'Syne', system-ui, sans-serif;
  --font-mono:    'IBM Plex Mono', 'Courier New', monospace;

  /* ── Espaciado y radios ────────────────────────────────── */
  --radius:      10px;
  --radius-lg:   18px;
  --container:   1160px;
  --pad:         clamp(1.2rem, 5vw, 3rem);

  /* ── Transiciones ──────────────────────────────────────── */
  --ease:        cubic-bezier(0.4, 0, 0.2, 1);
  --t-fast:      150ms;
  --t-base:      260ms;
  --t-slow:      420ms;
}


/* ════════════════════════════════════════════════════════════
   2. RESET & BASE
════════════════════════════════════════════════════════════ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  cursor: none; /* Oculta el cursor nativo (usamos uno personalizado) */
}

body {
  font-family: var(--font-mono);
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* En móvil, restaura el cursor nativo */
@media (hover: none) {
  html { cursor: auto; }
  .cursor-dot, .cursor-ring { display: none; }
}

img { max-width: 100%; height: auto; display: block; }
a   { color: inherit; text-decoration: none; }
button { cursor: none; font-family: inherit; border: none; background: none; }
ul { list-style: none; }

/* Foco visible para accesibilidad con teclado */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Títulos con la fuente display (Syne) */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  color: var(--text-bright);
}

/* La cursiva en títulos → acento verde */
em {
  font-style: italic;
  color: var(--accent);
}

/* Contenedor centrado */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--pad);
}

/* Secciones: padding vertical uniforme */
section { padding: 6rem 0; }

/* Etiqueta técnica de sección (ej: "> sobre_mi.txt") */
.section-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  letter-spacing: 0.08em;
  margin-bottom: 1.2rem;
  opacity: 0.85;
}

/* Título de sección base */
.section-title {
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 800;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

/* ── Botones ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.75rem;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  transition: all var(--t-base) var(--ease);
  cursor: none;
  white-space: nowrap;
}

/* Botón primario: verde sobre oscuro */
.btn-primary {
  background: var(--accent);
  color: #000;
  border: 1px solid var(--accent);
}
.btn-primary:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 255, 136, 0.25);
}

/* Botón outline: solo borde verde */
.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--border-2);
}
.btn-outline:hover {
  border-color: var(--accent);
  background: var(--accent-dim);
  transform: translateY(-2px);
}

/* Variante ancho completo (formulario / panel HW) */
.btn-full {
  width: 100%;
  justify-content: center;
  padding: 0.9rem 2rem;
}


/* ════════════════════════════════════════════════════════════
   3. CURSOR PERSONALIZADO
   Dos capas: punto rápido + aro con lag (animado por JS).
════════════════════════════════════════════════════════════ */
.cursor-dot {
  position: fixed;
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: opacity var(--t-fast);
}

.cursor-ring {
  position: fixed;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(0, 255, 136, 0.5);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: width var(--t-base) var(--ease),
              height var(--t-base) var(--ease),
              border-color var(--t-base),
              opacity var(--t-fast);
}

/* Estado "hover sobre elemento interactivo" — clase añadida por JS */
.cursor-ring.hovered {
  width: 48px;
  height: 48px;
  border-color: var(--accent);
  background: rgba(0, 255, 136, 0.05);
}


/* ════════════════════════════════════════════════════════════
   4. NAVBAR
   Fija en la parte superior. Se oscurece al hacer scroll
   (clase .scrolled añadida por JS).
════════════════════════════════════════════════════════════ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 1.2rem 0;
  transition: background var(--t-slow), padding var(--t-slow),
              border-color var(--t-slow);
  border-bottom: 1px solid transparent;
}

.navbar.scrolled {
  background: rgba(7, 13, 20, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-color: var(--border);
  padding: 0.9rem 0;
}

.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo de marca */
.nav-brand {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  display: flex;
  align-items: baseline;
  gap: 0;
  letter-spacing: -0.02em;
}
.brand-prefix { color: var(--accent); }
.brand-suffix { color: var(--text-bright); }

/* Cursor parpadeante del logo */
.brand-cursor {
  color: var(--accent);
  animation: blink 1.1s step-start infinite;
  margin-left: 1px;
}

/* Menú desktop */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.nav-link {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  transition: color var(--t-fast);
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width var(--t-base) var(--ease);
}
.nav-link:hover { color: var(--text); }
.nav-link:hover::after { width: 100%; }

/* Botón CTA del navbar */
.nav-cta {
  background: var(--accent-dim);
  color: var(--accent) !important;
  border: 1px solid var(--border-2);
  padding: 0.45rem 1.2rem;
  border-radius: 4px;
  transition: all var(--t-base) var(--ease);
}
.nav-cta::after { display: none; }
.nav-cta:hover {
  background: var(--accent);
  color: #000 !important;
  border-color: var(--accent);
}

/* Hamburguesa */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 0.4rem;
  cursor: none;
}
.ham-line {
  display: block;
  width: 22px; height: 1.5px;
  background: var(--text);
  border-radius: 99px;
  transition: all var(--t-base) var(--ease);
  transform-origin: center;
}
.hamburger.open .ham-line:nth-child(1) { transform: rotate(45deg) translate(4.5px, 4.5px); }
.hamburger.open .ham-line:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open .ham-line:nth-child(3) { transform: rotate(-45deg) translate(4.5px, -4.5px); }


/* ════════════════════════════════════════════════════════════
   5. HERO
════════════════════════════════════════════════════════════ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  gap: 3rem;
  padding: calc(80px + 4rem) var(--pad) 5rem;
  max-width: var(--container);
  margin: 0 auto;
  position: relative;
}

/* Fondo: grid + orbes de luz */
.hero-bg {
  position: fixed; /* fixed para efecto parallax ligero */
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,255,136,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,255,136,0.03) 1px, transparent 1px);
  background-size: 48px 48px;
}

/* Orbes de luz difusa (decoración de fondo) */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.18;
}
.orb-1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, #00ff88 0%, transparent 70%);
  top: -100px; right: -100px;
  animation: orbFloat 12s ease-in-out infinite alternate;
}
.orb-2 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, #0066ff 0%, transparent 70%);
  bottom: 100px; left: -80px;
  animation: orbFloat 16s 3s ease-in-out infinite alternate;
}

/* Texto fantasma gigante en el fondo */
.hero-ghost {
  position: absolute;
  bottom: -60px; right: -20px;
  font-family: var(--font-display);
  font-size: clamp(140px, 20vw, 260px);
  font-weight: 800;
  color: transparent;
  -webkit-text-stroke: 1px rgba(0,255,136,0.06);
  user-select: none;
  letter-spacing: -0.05em;
  line-height: 1;
  pointer-events: none;
}

/* Contenido del hero */
.hero-content {
  flex: 1;
  max-width: 620px;
  animation: fadeUp 0.7s ease-out both;
}

/* Etiqueta de terminal */
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--accent);
  border: 1px solid var(--border-2);
  background: var(--accent-dim);
  padding: 0.3rem 0.75rem;
  border-radius: 4px;
  margin-bottom: 1.8rem;
  letter-spacing: 0.05em;
}
.tag-bracket { opacity: 0.5; }
.tag-blink   { animation: blink 1s step-start infinite; }

/* Título hero */
.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
  animation: fadeUp 0.7s 0.1s ease-out both;
}
/* Palabras destacadas en acento verde */
.hl { color: var(--accent); }

/* Subtítulo hero */
.hero-subtitle {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 2.2rem;
  max-width: 480px;
  animation: fadeUp 0.7s 0.2s ease-out both;
}

/* Botones del hero */
.hero-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
  animation: fadeUp 0.7s 0.3s ease-out both;
}

/* Stack tecnológico */
.hero-stack {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  flex-wrap: wrap;
  animation: fadeUp 0.7s 0.4s ease-out both;
}
.stack-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  padding-top: 0.2rem;
  white-space: nowrap;
}
.stack-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.stack-tags span {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent);
  border: 1px solid var(--border-2);
  padding: 0.2rem 0.6rem;
  border-radius: 3px;
  background: var(--accent-dim);
  letter-spacing: 0.03em;
}

/* Terminal decorativa (desktop, columna derecha del hero) */
.hero-terminal {
  flex-shrink: 0;
  width: 320px;
  background: rgba(11, 20, 34, 0.95);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0,0,0,0.5),
              0 0 0 1px rgba(0,255,136,0.05);
  animation: fadeUp 0.7s 0.5s ease-out both;
}
.terminal-header {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 1rem;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid var(--border);
}
.t-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
}
.t-dot.t-red    { background: #ff5f57; }
.t-dot.t-yellow { background: #febc2e; }
.t-dot.t-green  { background: #28c840; }
.t-filename {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-left: 0.5rem;
}
.terminal-body {
  padding: 1.25rem 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.terminal-body p {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.4;
}
.t-prompt { color: var(--accent); margin-right: 0.5rem; }
.t-out    { color: var(--text-muted); padding-left: 1.2rem; }
.t-ok     { color: var(--accent); }
.t-cursor-blink { animation: blink 1s step-start infinite; color: var(--accent); }


/* ════════════════════════════════════════════════════════════
   6. SOBRE MÍ
════════════════════════════════════════════════════════════ */
.sobre-mi {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.sobre-mi .container {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 4rem;
  align-items: start;
}

/* Avatar placeholder con marcos de esquina */
.sobre-visual {
  position: relative;
  display: flex;
  justify-content: center;
}
.avatar-box {
  position: relative;
  width: 260px; height: 280px;
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
}
.avatar-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-muted);
}
.avatar-inner span {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-bright);
}

/* Esquinas decorativas del avatar */
.corner {
  position: absolute;
  width: 14px; height: 14px;
  border-color: var(--accent);
  border-style: solid;
  opacity: 0.6;
}
.corner.tl { top: -1px; left: -1px;   border-width: 2px 0 0 2px; }
.corner.tr { top: -1px; right: -1px;  border-width: 2px 2px 0 0; }
.corner.bl { bottom: -1px; left: -1px; border-width: 0 0 2px 2px; }
.corner.br { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; }

/* Métricas flotantes */
.metric {
  position: absolute;
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  padding: 0.6rem 1rem;
  text-align: center;
}
.metric.m1 { bottom: 40px; right: -20px; }
.metric.m2 { top: 30px;    left: -20px; }
.mn {
  display: block;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}
.ml {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

/* Texto del perfil */
.sobre-content { padding-top: 0.5rem; }
.sobre-p {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 1rem;
}

/* Lista de valores */
.sobre-valores {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.5rem;
}
.sobre-valores li {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.vi {
  color: var(--accent);
  font-size: 1.1rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
}
.sobre-valores li div { display: flex; flex-direction: column; gap: 0.15rem; }
.sobre-valores strong {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--text-bright);
  font-size: 0.9375rem;
}
.sobre-valores span {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}


/* ════════════════════════════════════════════════════════════
   7. SECCIONES DE SERVICIOS (Software & Hardware)
   Clases compartidas + variantes específicas.
════════════════════════════════════════════════════════════ */

/* ── Encabezado de sección de servicio ────────────────────── */
.srv-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 3.5rem;
}
.srv-intro {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-top: 0.5rem;
}

/* Variantes de color para la etiqueta de sección */
.st-sw { color: #4af; }  /* Azul para Software */
.st-hw { color: var(--accent); } /* Verde para Hardware */

/* ── Fondo alternado entre secciones ──────────────────────── */
.sw-section { background: var(--bg-2); border-top: 1px solid var(--border); }
.hw-section { background: var(--bg); }

/* ── Grid de servicios web ────────────────────────────────── */
.srv-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-bottom: 3rem;
}

/* Tarjeta de servicio web */
.srv-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: all var(--t-base) var(--ease);
  overflow: hidden;
}
.srv-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform var(--t-base) var(--ease);
}
.srv-card:hover {
  border-color: var(--border-2);
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.35);
}
.srv-card:hover::after { transform: scaleX(1); }

/* Tarjeta destacada */
.srv-card.featured {
  border-color: rgba(0,255,136,0.25);
  background: linear-gradient(145deg, rgba(0,255,136,0.06) 0%, var(--surface) 100%);
}

.featured-badge {
  position: absolute;
  top: 1rem; right: 1rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--accent);
  border: 1px solid var(--border-2);
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  background: var(--accent-dim);
  letter-spacing: 0.04em;
}

/* Ícono de la tarjeta */
.srv-icon {
  width: 44px; height: 44px;
  background: var(--accent-dim);
  border: 1px solid var(--border-2);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

/* Número de índice decorativo */
.srv-num {
  position: absolute;
  top: 1.2rem; right: 1.2rem;
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 800;
  color: rgba(0,255,136,0.05);
  line-height: 1;
  user-select: none;
}
/* En la tarjeta featured, el .featured-badge está arriba; el num va más abajo */
.featured .srv-num { top: 3rem; }

.srv-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
}
.srv-card p {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.7;
  flex: 1;
}
.srv-features {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}
.srv-features li {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  padding-left: 1rem;
  position: relative;
}
.srv-features li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* CTA debajo del grid de servicios web */
.srv-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}
.cta-note {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ── Layout de Hardware ────────────────────────────────────── */
.hw-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2rem;
  align-items: start;
}

.hw-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Ítem de servicio hardware */
.hw-item {
  display: flex;
  gap: 1.5rem;
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--border);
  transition: padding-left var(--t-base) var(--ease);
}
.hw-item:first-child { padding-top: 0; }
.hw-item:last-child  { border-bottom: none; }
.hw-item:hover { padding-left: 0.5rem; }

.hw-num {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: rgba(0,255,136,0.12);
  line-height: 1;
  flex-shrink: 0;
  width: 48px;
  padding-top: 0.2rem;
  transition: color var(--t-base);
}
.hw-item:hover .hw-num { color: rgba(0,255,136,0.35); }

.hw-body h3 {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}
.hw-body p {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 0.75rem;
}
.hw-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.hw-tags span {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--accent);
  border: 1px solid var(--border-2);
  padding: 0.1rem 0.5rem;
  border-radius: 3px;
  background: var(--accent-dim);
}

/* Panel de especificaciones técnicas */
.spec-panel {
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  overflow: hidden;
  position: sticky;
  top: 90px;
}
.spec-head {
  padding: 0.75rem 1.25rem;
  background: rgba(0,255,136,0.05);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}
.spec-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.spec-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}
.sk {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}
.sv {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text);
}
.sv.ok     { color: var(--accent); font-weight: 500; }
/* Estado "OPERATIVO" con pulso */
.sv.pulse  {
  color: var(--accent);
  animation: textPulse 2s ease-in-out infinite;
}
.spec-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0.25rem 0;
}
.spec-panel .btn { margin: 0 1.25rem 1.25rem; width: calc(100% - 2.5rem); }


/* ════════════════════════════════════════════════════════════
   8. SECCIÓN SOCIAL
════════════════════════════════════════════════════════════ */
.social-section {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.social-header {
  text-align: center;
  max-width: 560px;
  margin: 0 auto 3rem;
}
.social-intro {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-top: 0.5rem;
}

/* Grid de 2 tarjetas sociales */
.social-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

/* Tarjeta social base */
.social-card {
  position: relative;
  display: block;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--t-base) var(--ease);
}
.social-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(0,0,0,0.4);
}

/* Fondo con gradiente específico por red */
.sc-bg {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity var(--t-slow);
}
.social-card:hover .sc-bg { opacity: 1; }

/* Instagram: gradiente rosa/naranja */
.sc-ig .sc-bg {
  background: linear-gradient(135deg, rgba(240,60,90,0.15) 0%, rgba(255,140,30,0.1) 100%);
}
.sc-ig { border-color: rgba(240,60,90,0.2); }
.sc-ig:hover { border-color: rgba(240,60,90,0.4); }

/* LinkedIn: azul */
.sc-li .sc-bg {
  background: linear-gradient(135deg, rgba(10,100,230,0.15) 0%, rgba(30,170,240,0.1) 100%);
}
.sc-li { border-color: rgba(10,100,230,0.2); }
.sc-li:hover { border-color: rgba(10,100,230,0.4); }

.sc-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 2rem 2rem;
  background: var(--surface);
  transition: background var(--t-base);
}
.social-card:hover .sc-content { background: transparent; }

/* Ícono grande de la red social */
.sc-icon {
  width: 64px; height: 64px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  flex-shrink: 0;
  transition: all var(--t-base) var(--ease);
}
.sc-ig .sc-icon {
  background: linear-gradient(135deg, #f03c5a, #ff8c1e);
  color: #fff;
}
.sc-li .sc-icon {
  background: #0a64e6;
  color: #fff;
}
.sc-icon:hover { transform: scale(1.08); }

.sc-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1;
}
.sc-handle {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-bright);
}
.sc-platform {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.sc-desc {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* Flecha en la esquina derecha */
.sc-arrow {
  color: var(--text-muted);
  flex-shrink: 0;
  transition: all var(--t-base) var(--ease);
}
.social-card:hover .sc-arrow {
  color: var(--text-bright);
  transform: translate(3px, -3px);
}


/* ════════════════════════════════════════════════════════════
   9. SECCIÓN CONTACTO
════════════════════════════════════════════════════════════ */
.contacto-section {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
}

.contacto-layout {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 4rem;
  align-items: start;
}

/* Columna izquierda: info */
.ct-info { position: sticky; top: 90px; }
.ct-desc {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 2rem;
}

/* Items de contacto directo */
.ct-metodos {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.ct-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.875rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition: all var(--t-fast);
}
.ct-item:hover {
  border-color: var(--border-2);
  background: rgba(0,255,136,0.03);
}
.ct-ico {
  width: 36px; height: 36px;
  background: var(--accent-dim);
  border: 1px solid var(--border-2);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--accent);
  flex-shrink: 0;
}
.ct-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.ct-valor {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text);
  font-weight: 500;
}

/* Indicador de disponibilidad */
.disponibilidad {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}
.disp-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 2px rgba(0,255,136,0.2);
  animation: disp-pulse 2s ease-in-out infinite;
}

/* ── Formulario de contacto ─────────────────────────────── */
.ct-form-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
}
.ct-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Fila de dos campos lado a lado */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* Grupo de campo */
.fg {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

/* Label del campo */
.fl {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

/* Input base (compartido por input, select, textarea) */
.fi {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.75rem 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text);
  width: 100%;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
  appearance: none;
}
.fi::placeholder { color: var(--text-muted); opacity: 0.5; }
.fi:focus {
  outline: none;
  border-color: rgba(0,255,136,0.4);
  box-shadow: 0 0 0 3px rgba(0,255,136,0.08);
}

/* Estado de error */
.fg.has-error .fi {
  border-color: rgba(255,60,60,0.5);
  box-shadow: 0 0 0 3px rgba(255,60,60,0.08);
}
/* Estado válido */
.fg.is-valid .fi {
  border-color: rgba(0,255,136,0.4);
}

/* Select: flecha personalizada */
.fsel {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5l3 3 3-3' stroke='%234a6480' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  padding-right: 2.5rem;
  cursor: none;
}
.fsel option { background: var(--surface); color: var(--text); }

.ftarea { resize: vertical; min-height: 120px; }

/* Mensaje de error */
.fe {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: rgba(255,80,80,0.9);
  display: none;
}
.fg.has-error .fe { display: block; }

/* Spinner del botón (animación de carga) */
.spinner {
  width: 14px; height: 14px;
  border: 2px solid rgba(0,0,0,0.2);
  border-top-color: #000;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

/* Mensaje de éxito */
.form-success {
  display: flex !important;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border: 1px solid rgba(0,255,136,0.25);
  border-radius: var(--radius);
  background: rgba(0,255,136,0.07);
  animation: fadeUp 0.4s ease-out;
}
.fs-check {
  width: 34px; height: 34px;
  background: rgba(0,255,136,0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 1rem;
  flex-shrink: 0;
}
.form-success strong {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-bright);
}
.form-success span {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}


/* ════════════════════════════════════════════════════════════
   10. FOOTER
════════════════════════════════════════════════════════════ */
.footer {
  border-top: 1px solid var(--border);
  padding: 3rem 0 1.5rem;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.5rem;
}
.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.footer-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}
.footer-nav {
  display: flex;
  gap: 1.75rem;
  flex-wrap: wrap;
}
.footer-nav a {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  transition: color var(--t-fast);
}
.footer-nav a:hover { color: var(--accent); }

.footer-social {
  display: flex;
  gap: 0.6rem;
}
.fs-link {
  width: 38px; height: 38px;
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.875rem;
  transition: all var(--t-fast);
}
.fs-link:hover {
  border-color: var(--border-2);
  color: var(--accent);
  background: var(--accent-dim);
}

.footer-bottom {
  text-align: center;
}
.footer-bottom p {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}


/* ════════════════════════════════════════════════════════════
   11. ANIMACIONES (keyframes)
════════════════════════════════════════════════════════════ */

/* Entrada: fade + slide desde abajo */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Parpadeante (cursor de terminal) */
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* Flotación de los orbes de fondo */
@keyframes orbFloat {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(30px, 20px) scale(1.05); }
}

/* Pulso del texto "● OPERATIVO" */
@keyframes textPulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.5; }
}

/* Pulso del indicador de disponibilidad */
@keyframes disp-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0,255,136,0.5); }
  50%       { box-shadow: 0 0 0 6px rgba(0,255,136,0); }
}

/* Spinner de carga del botón */
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Reveal al hacer scroll (clase .revealed añadida por JS) */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
}
.reveal.revealed {
  opacity: 1;
  transform: none;
}


/* ════════════════════════════════════════════════════════════
   12. MEDIA QUERIES (Diseño Responsive)
════════════════════════════════════════════════════════════ */

/* Tablet grande (≤ 1100px) */
@media (max-width: 1100px) {
  .hero { flex-direction: column; text-align: center; align-items: flex-start; }
  .hero-subtitle { max-width: 100%; }
  .hero-terminal { display: none; } /* Oculta la terminal en tablet */
  .sobre-mi .container { grid-template-columns: 1fr; }
  .sobre-visual { margin-bottom: 2rem; }
  .hw-layout { grid-template-columns: 1fr; }
  .spec-panel { position: static; }
}

/* Tablet (≤ 900px) */
@media (max-width: 900px) {
  /* Menú hamburguesa */
  .nav-menu {
    position: fixed;
    top: 0; right: -100%;
    bottom: 0;
    width: min(300px, 80vw);
    background: var(--bg-2);
    border-left: 1px solid var(--border);
    flex-direction: column;
    justify-content: center;
    padding: 2.5rem;
    gap: 2rem;
    transition: right var(--t-slow) var(--ease);
    z-index: 999;
  }
  .nav-menu.open {
    right: 0;
    box-shadow: -20px 0 60px rgba(0,0,0,0.6);
  }
  .nav-link { font-size: 1rem; color: var(--text); }
  .hamburger { display: flex; z-index: 1001; }

  section { padding: 4rem 0; }

  /* Grid de servicios web: 1 columna */
  .srv-grid { grid-template-columns: 1fr; }

  /* Social: 1 columna */
  .social-grid { grid-template-columns: 1fr; }

  /* Contacto: 1 columna */
  .contacto-layout { grid-template-columns: 1fr; }
  .ct-info { position: static; }
}

/* Móvil (≤ 600px) */
@media (max-width: 600px) {
  .hero { padding-top: calc(70px + 2rem); }
  .hero-title { font-size: 2rem; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .form-row { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .avatar-box { width: 200px; height: 220px; }
  .metric.m1 { right: 0; }
  .metric.m2 { left: 0; }
}

/* Respeta las preferencias de animación reducida */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
