/* CV: estilos de la página (diseño). Estructura en index.html; lógica en js/. */
  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
  :root {
    --bg: #0a0a0f; --surface: #13131a; --card: #1a1a24; --border: #2a2a3a;
    --accent-blue: #4f8ef7; --accent-cyan: #00d4c8; --accent-orange: #ff6b35;
    --accent-purple: #9b6dff; --text: #f0f0f5; --text-muted: #c9cdde; --text-dim: #a9aec4; /* más claros: la página es oscura (Luis, 31-oct; antes #7a7a9a y #4a4a6a) */
  }
  html { scroll-behavior: smooth; font-size: 112.5%; overflow-x: hidden; } /* página fija: no se mueve de lado (Luis, 31-oct) */
  html, body { max-width: 100%; width: 100%; position: relative; overflow-x: hidden; overflow-x: clip; touch-action: pan-y; } /* solo desplazar arriba/abajo: sin arrastrar de lado ni zoom con los dedos */ /* letra más grande y fácil de leer (Luis, 31-oct-2026; antes 100%) */
  body { background: var(--bg); color: var(--text); font-family: 'DM Sans', sans-serif; font-size: 18px; line-height: 1.6; overflow-x: hidden; }
  body::before {
    content: ''; position: fixed; inset: 0;
    background-image: linear-gradient(rgba(79,142,247,0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(79,142,247,0.03) 1px, transparent 1px);
    background-size: 60px 60px; pointer-events: none; z-index: 0;
  }
  /* Marco del tamaño de la pantalla para las luces del fondo: así no se salen y la página no se mueve de lado (31-oct) */
  .timeline-company a { color: inherit; text-decoration: underline; text-decoration-color: rgba(0,212,200,.45); text-underline-offset: 3px; } /* el hotel abre su página (31-oct) */
  .orbes { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
  .orb { position: absolute; border-radius: 50%; filter: blur(120px); pointer-events: none; z-index: 0; opacity: 0.15; }
  .orb-1 { width: 600px; height: 600px; background: var(--accent-blue); top: -200px; right: -200px; }
  .orb-2 { width: 400px; height: 400px; background: var(--accent-cyan); bottom: 10%; left: -100px; }
  .orb-3 { width: 300px; height: 300px; background: var(--accent-purple); top: 50%; right: 10%; }
  .container { max-width: 1000px; margin: 0 auto; padding: 0 24px; position: relative; z-index: 1; }
  nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    padding: 16px 24px; display: flex; justify-content: space-between; align-items: center;
    background: rgba(10,10,15,0.8); backdrop-filter: blur(20px); border-bottom: 1px solid var(--border);
  }
  .nav-logo { font-family: 'Syne', sans-serif; font-weight: 800; font-size: 1.1rem; color: var(--accent-cyan); letter-spacing: -0.5px; }
  .nav-links { display: flex; gap: 32px; }
  .nav-links a { color: var(--text-muted); text-decoration: none; font-size: 0.95rem; font-weight: 500; letter-spacing: 0.5px; text-transform: uppercase; transition: color 0.2s; }
  .nav-links a:hover { color: var(--accent-cyan); }
  .hero { min-height: 100vh; display: flex; align-items: center; padding-top: 80px; }
  .hero-inner { display: grid; grid-template-columns: 1fr auto; gap: 60px; align-items: center; width: 100%; }
  .hero-tag {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(79,142,247,0.1); border: 1px solid rgba(79,142,247,0.3);
    border-radius: 100px; padding: 6px 16px; font-size: 0.75rem; color: var(--accent-blue);
    letter-spacing: 1px; text-transform: uppercase; font-weight: 500; margin-bottom: 24px;
  }
  .hero-tag::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--accent-cyan); animation: pulse 2s infinite; }
  @keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.5; transform: scale(0.8); } }
  .hero h1 { font-family: 'Syne', sans-serif; font-size: clamp(2.5rem, 6vw, 4.5rem); font-weight: 800; line-height: 1.05; letter-spacing: -2px; margin-bottom: 8px; }
  .hero h1 span { background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
  .hero-subtitle { font-size: 1.1rem; color: var(--text-muted); margin-bottom: 32px; font-weight: 300; max-width: 480px; }
  .hero-subtitle strong { color: var(--text); font-weight: 500; }
  .hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; }
  .btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 24px; border-radius: 8px; font-family: 'DM Sans', sans-serif; font-size: 0.9rem; font-weight: 500; text-decoration: none; cursor: pointer; border: none; transition: all 0.2s; }
  .btn-primary { background: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan)); color: #000; }
  .btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(79,142,247,0.4); }
  .btn-whatsapp { background: linear-gradient(135deg, #25d366, #128c7e); color: #fff; }
  .btn-whatsapp:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(37,211,102,0.4); }
  .btn-videos { background: linear-gradient(135deg, var(--accent-orange), #e0522a); color: #fff; }
  .btn-videos:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(255,107,53,0.4); }
  /* My Work: videos verticales con vista previa y botón de play */
  .videos-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .video-wrap { background: var(--card); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; transition: border-color 0.2s, transform 0.2s; }
  .video-wrap:hover { border-color: rgba(255,107,53,0.45); transform: translateY(-2px); }
  .video-frame { position: relative; aspect-ratio: 9 / 16; background: #000; }
  .video-frame video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
  .video-frame.playing video { object-fit: contain; }
  .play-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; border: 0; cursor: pointer;
    background: linear-gradient(180deg, rgba(0,0,0,0) 55%, rgba(0,0,0,0.55) 100%); }
  .play-btn { width: 64px; height: 64px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--accent-orange), #e0522a); box-shadow: 0 8px 30px rgba(255,107,53,0.45); transition: transform 0.15s; }
  .play-overlay:hover .play-btn { transform: scale(1.08); }
  .play-btn svg { width: 26px; height: 26px; margin-left: 4px; fill: #fff; }
  .video-duration { position: absolute; right: 10px; bottom: 10px; font-size: 0.75rem; font-weight: 500; padding: 2px 8px; border-radius: 6px; background: rgba(0,0,0,0.65); color: #fff; }
  .video-frame.playing .play-overlay, .video-frame.playing .video-duration { display: none; }
  .video-label { padding: 12px 14px; }
  .video-label strong { display: block; font-size: 0.9rem; font-weight: 500; color: var(--text); }
  .video-label span { font-size: 0.9rem; color: var(--text-muted); }
  .video-dots { display: none; }
  .video-arrows { display: none; }
  @media (max-width: 900px) { .videos-grid { grid-template-columns: repeat(2, 1fr); } }
  /* Escritorio (25-oct-2026): carrusel en una sola fila, 3 videos a la vista (2 en pantallas medianas), flechas a los lados
     y puntitos debajo. El teléfono (≤ 640 px) sigue con su carrusel "Focus" de abajo, sin cambios. */
  .work-carrusel { position: relative; }
  @media (min-width: 641px) {
    .videos-grid { --vis: 3; --gap: 20px; display: flex; gap: var(--gap); overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; padding: 4px 2px 8px; }
    .videos-grid::-webkit-scrollbar { display: none; }
    .video-wrap { flex: 0 0 calc((100% - var(--gap) * (var(--vis) - 1)) / var(--vis)); scroll-snap-align: start; }
    .video-dots { display: flex; justify-content: center; gap: 6px; margin-top: 16px; }
    .video-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--border); transition: all 0.2s; cursor: pointer; }
    .video-dots i.on { width: 20px; border-radius: 4px; background: var(--accent-orange); }
    .video-arrows { display: block; }
    .video-arrows button { position: absolute; top: calc(50% - 50px); transform: translateY(-50%); z-index: 2; width: 52px; height: 52px; border-radius: 50%;
      border: 1px solid var(--border); background: rgba(15,18,30,0.85); color: var(--text); font-size: 30px; line-height: 1; cursor: pointer;
      box-shadow: 0 6px 24px rgba(0,0,0,0.45); transition: background 0.2s, opacity 0.2s, border-color 0.2s; }
    .video-arrows button:hover { background: var(--accent-orange); border-color: var(--accent-orange); }
    .video-arrows button:disabled { opacity: 0; pointer-events: none; }
    #work-prev { left: -26px; }
    #work-next { right: -26px; }
  }
  @media (min-width: 641px) and (max-width: 900px) { .videos-grid { --vis: 2; } }
  /* Teléfono: carrusel horizontal, se desliza de lado. Efecto "Focus" (24-oct-2026): las tarjetas quedan centradas; la del centro se ve
     grande y las de los lados más chicas y apagadas (lo calcula focusUpdate() en el script de abajo mientras se desliza). Solo en el teléfono:
     en pantalla grande los videos siguen en cuadrícula. El ancho de la tarjeta es fijo (--cw) para poder centrarla con el relleno. */
  @media (max-width: 640px) {
    .videos-grid { --cw: min(64vw, 260px); position: relative; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 14px; margin: 0 -24px; padding: 6px calc(50% + 24px - var(--cw) / 2) 12px; scrollbar-width: none; }
    .videos-grid::-webkit-scrollbar { display: none; }
    .video-wrap { flex: 0 0 var(--cw); scroll-snap-align: center; transition: border-color 0.2s; will-change: transform, opacity; }
    .video-wrap:hover { transform: none; }
    .video-dots { display: flex; justify-content: center; gap: 6px; margin-top: 14px; }
    .video-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--border); transition: all 0.2s; }
    .video-dots i.on { width: 18px; border-radius: 3px; background: var(--accent-orange); }
    .video-arrows { display: flex; justify-content: center; gap: 14px; margin-top: 14px; }
    .video-arrows button { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border); background: rgba(255,255,255,0.05); color: var(--text); font-size: 22px; line-height: 1; cursor: pointer; -webkit-tap-highlight-color: transparent; }
  }
  .hero-photo {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
  border: 3px solid var(--accent-cyan);
  box-shadow: 0 0 25px rgba(0,212,200,0.25);
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
  .photo-placeholder { width: 100%; height: 100%; background: var(--card); border-radius: 22px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; border: 2px solid var(--border); }
  .photo-placeholder .initials { font-family: 'Syne', sans-serif; font-size: 3rem; font-weight: 800; background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
  .photo-placeholder span { font-size: 0.7rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 1px; }
  .contact-bar { display: flex; gap: 24px; flex-wrap: wrap; margin-top: 32px; padding-top: 32px; border-top: 1px solid var(--border); }
  .contact-item { display: flex; align-items: center; gap: 8px; font-size: 1rem; color: var(--text-muted); text-decoration: none; transition: color 0.2s; }
  .contact-item:hover { color: var(--accent-cyan); }
  .contact-item svg { color: var(--accent-cyan); flex-shrink: 0; }
  section { padding: 100px 0; }
  .section-label { font-size: 0.7rem; letter-spacing: 3px; text-transform: uppercase; color: var(--accent-cyan); font-weight: 600; margin-bottom: 12px; }
  .section-title { font-family: 'Syne', sans-serif; font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 800; letter-spacing: -1px; margin-bottom: 48px; line-height: 1.1; }
  .tabs { display: flex; gap: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 4px; width: fit-content; margin-bottom: 48px; }
  .tab { padding: 10px 24px; border-radius: 8px; font-size: 0.85rem; font-weight: 500; cursor: pointer; border: none; background: transparent; color: var(--text-muted); font-family: 'DM Sans', sans-serif; transition: all 0.2s; }
  .tab.active { background: var(--card); color: var(--text); box-shadow: 0 2px 8px rgba(0,0,0,0.3); }
  .tab-content { display: none; }
  .tab-content.active { display: block; }
  .timeline { position: relative; }
  .timeline::before { content: ''; position: absolute; left: 0; top: 8px; bottom: 0; width: 1px; background: linear-gradient(to bottom, var(--accent-blue), transparent); }
  .timeline-item { padding-left: 32px; margin-bottom: 48px; position: relative; animation: fadeInUp 0.5s ease both; }
  .timeline-item::before { content: ''; position: absolute; left: -4px; top: 8px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent-cyan); box-shadow: 0 0 12px var(--accent-cyan); }
  @keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
  .timeline-date { font-size: 0.75rem; color: var(--accent-blue); font-weight: 500; letter-spacing: 0.5px; margin-bottom: 6px; text-transform: uppercase; }
  .timeline-role { font-family: 'Syne', sans-serif; font-size: 1.15rem; font-weight: 700; margin-bottom: 2px; }
  .timeline-company { font-size: 0.85rem; color: var(--accent-cyan); margin-bottom: 12px; font-weight: 500; }
  .timeline-desc { font-size: 1rem; color: var(--text-muted); line-height: 1.7; }
  .skills-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
  .skill-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 20px 24px; transition: all 0.2s; position: relative; overflow: hidden; }
  .skill-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, var(--accent-blue), var(--accent-cyan)); transform: scaleX(0); transition: transform 0.3s; }
  .skill-card:hover { border-color: rgba(79,142,247,0.4); transform: translateY(-2px); }
  .skill-card:hover::before { transform: scaleX(1); }
  .skill-card-label { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1.5px; color: var(--text-dim); margin-bottom: 8px; }
  .skill-card-title { font-family: 'Syne', sans-serif; font-weight: 700; font-size: 1rem; margin-bottom: 8px; }
  .skill-tags { display: flex; flex-wrap: wrap; gap: 6px; }
  .tag { padding: 3px 10px; border-radius: 100px; font-size: 0.72rem; font-weight: 500; border: 1px solid; }
  .tag-blue   { background: rgba(79,142,247,0.1);  color: var(--accent-blue);   border-color: rgba(79,142,247,0.3); }
  .tag-cyan   { background: rgba(0,212,200,0.1);   color: var(--accent-cyan);   border-color: rgba(0,212,200,0.3); }
  .tag-orange { background: rgba(255,107,53,0.1);  color: var(--accent-orange); border-color: rgba(255,107,53,0.3); }
  .tag-purple { background: rgba(155,109,255,0.1); color: var(--accent-purple); border-color: rgba(155,109,255,0.3); }
  .devops-highlight { background: linear-gradient(135deg, rgba(79,142,247,0.08), rgba(0,212,200,0.05)); border: 1px solid rgba(79,142,247,0.2); border-radius: 16px; padding: 32px; margin-bottom: 48px; }
  .devops-highlight h3 { font-family: 'Syne', sans-serif; font-size: 1rem; font-weight: 700; margin-bottom: 8px; color: var(--accent-cyan); }
  .devops-highlight p { font-size: 1rem; color: var(--text-muted); line-height: 1.7; }
  .arch-block { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 16px 20px; font-family: 'Courier New', monospace; font-size: 0.8rem; color: var(--accent-cyan); line-height: 1.8; margin-top: 16px; }
  .lang-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .lang-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 20px; text-align: center; }
  .lang-name { font-family: 'Syne', sans-serif; font-weight: 700; margin-bottom: 4px; }
  .lang-level { font-size: 0.95rem; color: var(--text-muted); }
  .lang-bar { height: 3px; background: var(--border); border-radius: 2px; margin-top: 12px; overflow: hidden; }
  .lang-fill { height: 100%; border-radius: 2px; background: linear-gradient(90deg, var(--accent-blue), var(--accent-cyan)); }
  .contact-links { display: flex; gap: 16px; flex-wrap: wrap; }
  .contact-link { display: inline-flex; align-items: center; gap: 10px; padding: 14px 24px; border-radius: 10px; background: var(--card); border: 1px solid var(--border); color: var(--text); text-decoration: none; font-size: 0.9rem; font-weight: 500; transition: all 0.2s; }
  .contact-link:hover { transform: translateY(-2px); border-color: var(--accent-cyan); color: var(--accent-cyan); }
  .contact-link.whatsapp:hover { border-color: #25d366; color: #25d366; }
  footer { border-top: 1px solid var(--border); padding: 32px 0; text-align: center; }
  .footer-text { font-size: 1rem; color: var(--text-muted); }
  .footer-text span { color: var(--accent-cyan); }
  .divider { height: 1px; background: linear-gradient(90deg, transparent, var(--border), transparent); }
  @media (max-width: 640px) {
    .hero-inner { grid-template-columns: 1fr; }
    .hero-photo { width: 140px; height: 140px; justify-self: start; order: -1; }
    .nav-links { display: none; }
    .lang-grid { grid-template-columns: 1fr 1fr; }
    .contact-links { flex-direction: column; }
  }

/* Clases que antes eran estilos escritos dentro de las etiquetas */
.hero-nota { font-size: 1rem; color: var(--text-muted); margin-top: 12px; }
.separado-abajo { margin-bottom: 64px; }
.lang-fill.nivel-100 { width: 100%; }
.lang-fill.nivel-30 { width: 30%; }

/* Teléfono: los títulos de sección no se salen de la pantalla ("Communication" con esta letra ancha se cortaba en la N).
   Como mucho 6,2 % del ancho de la pantalla (~24 px en un iPhone). (Luis, 31-oct) */
@media (max-width: 640px) {
  .section-title { font-size: min(clamp(1.8rem, 4vw, 2.8rem), 6.2vw); }
}
