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

:root {
  --bg:    oklch(7% 0.008 270);
  --bg2:   oklch(10.5% 0.008 270);
  --bg3:   oklch(13.5% 0.008 270);
  --bg4:   oklch(17% 0.008 270);
  --border:  oklch(100% 0 0 / 0.07);
  --border2: oklch(100% 0 0 / 0.13);
  --accent:  oklch(97% 0.22 122);
  --text:    oklch(93% 0 0);
  --text-muted: oklch(53% 0.006 270);
  --text-mid:   oklch(68% 0.004 270);
  --font: 'Space Grotesk', 'Inter', sans-serif;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font-family: var(--font); font-size: 16px; line-height: 1.6; overflow-x: hidden; text-wrap: pretty; position: relative; }

/* Grano sutil sobre todo el sitio, para que el negro no quede plano */
body::after {
  content: '';
  position: fixed; inset: 0; z-index: 3; pointer-events: none;
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch' result='t'/%3E%3CfeColorMatrix in='t' type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
h1, h2, h3, h4 { text-wrap: balance; }
a { color: inherit; text-decoration: none; }
strong { color: var(--text); font-weight: 600; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 40px; }
.accent { color: var(--accent); }

/* ===== PRELOADER ===== */
#preloader {
  position: fixed; inset: 0; z-index: 10000;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
#preloader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.preloader-logo {
  font-size: 40px; font-weight: 800; letter-spacing: -1px; color: var(--text);
  animation: preloaderPulse 1.1s ease-in-out infinite;
}
@keyframes preloaderPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }
@media (prefers-reduced-motion: reduce) {
  .preloader-logo { animation: none; }
  #preloader { transition: none; }
}

/* ===== NAV ===== */
#navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 18px 0;
  transition: background 0.3s, backdrop-filter 0.3s, padding 0.3s;
}
#navbar.scrolled {
  background: rgba(10,10,10,0.9);
  backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
}
.nav-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 40px;
  display: flex; align-items: center; justify-content: space-between; gap: 32px;
}
.nav-logo { font-size: 28px; font-weight: 800; letter-spacing: -1px; flex-shrink: 0; transition: color 0.2s; }
.nav-logo:hover { color: var(--accent); }
.nav-links { list-style: none; display: flex; gap: 32px; }
.nav-links a { font-size: 13px; font-weight: 500; color: var(--text-muted); transition: color 0.2s; letter-spacing: 0.3px; }
.nav-links a:hover, .nav-links a.active-link { color: var(--text); }
.nav-cta {
  flex-shrink: 0;
  background: var(--accent); color: #000;
  font-size: 13px; font-weight: 700; padding: 9px 22px;
  border-radius: 100px; transition: transform 0.2s, box-shadow 0.2s;
  white-space: nowrap;
}
.nav-cta:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(232,255,0,0.3); }

/* ===== HERO ===== */
#hero {
  min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  position: relative; overflow: hidden; padding: 140px 40px 0;
}
.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 50% 55%, rgba(232,255,0,0.07) 0%, transparent 65%),
    radial-gradient(ellipse 40% 35% at 92% 4%, rgba(232,255,0,0.05) 0%, transparent 62%),
    radial-gradient(ellipse 40% 35% at 4% 96%, rgba(232,255,0,0.04) 0%, transparent 62%);
}
.hero-bg::after {
  content: ''; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 72px 72px;
}
.hero-content { text-align: center; position: relative; z-index: 1; max-width: 800px; }

.hero-available {
  display: inline-flex; align-items: center; gap: 8px;
  background: oklch(97% 0.22 122 / 0.08); border: 1px solid oklch(97% 0.22 122 / 0.22);
  color: var(--accent); font-size: 12px; font-weight: 600;
  letter-spacing: 0.5px;
  padding: 7px 18px; border-radius: 100px; margin-bottom: 32px;
}
.pulse {
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.5; transform: scale(0.8); } }

.hero-title {
  position: relative;
  font-size: clamp(52px, 7.5vw, 96px); font-weight: 900;
  line-height: 1.08; letter-spacing: -0.03em; margin-bottom: 24px;
}
.hero-title::before {
  content: ''; position: absolute; z-index: -1; pointer-events: none;
  left: 50%; top: 50%; width: 90%; height: 140%;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse, oklch(97% 0.22 122 / 0.22) 0%, transparent 65%);
  filter: blur(30px);
}
.hero-title .accent { text-shadow: 0 0 36px oklch(97% 0.22 122 / 0.55), 0 0 80px oklch(97% 0.22 122 / 0.3); }
.hero-role {
  font-size: 15px; color: var(--text-mid); font-weight: 500;
  letter-spacing: 0.3px; margin-bottom: 20px;
}
.sep { color: var(--accent); margin: 0 8px; }
.hero-sub { font-size: 17px; color: var(--text-muted); margin-bottom: 44px; font-weight: 400; line-height: 1.75; max-width: 56ch; margin-left: auto; margin-right: auto; }
.hero-btns { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.btn-primary {
  display: inline-block; background: var(--accent); color: #000;
  font-weight: 700; font-size: 14px; letter-spacing: 0.2px;
  padding: 14px 34px; border-radius: 100px;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 32px oklch(97% 0.22 122 / 0.28); }

.btn-outline {
  display: inline-block; background: transparent;
  border: 1px solid var(--border2); color: var(--text);
  font-weight: 600; font-size: 14px; padding: 14px 34px;
  border-radius: 100px; transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.btn-outline:hover { border-color: var(--accent); background: oklch(97% 0.22 122 / 0.06); }

/* Marquee */
.hero-marquee {
  width: 100%; overflow: hidden; margin-top: 80px;
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  padding: 16px 0; position: relative; z-index: 1;
}
.marquee-track {
  display: flex; gap: 0; white-space: nowrap;
  animation: marquee 30s linear infinite;
}
.marquee-track span { font-size: 13px; font-weight: 500; color: var(--text-muted); padding: 0 20px; }
.marquee-track .dot-sep { color: var(--accent); padding: 0 4px; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ===== CLIENT STRIP ===== */
.client-strip { padding: 32px 0; background: var(--bg2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.client-strip-text { text-align: center; font-size: 14px; color: var(--text-mid); letter-spacing: 0.1px; }
.client-strip-label { color: var(--text-muted); font-weight: 700; text-transform: uppercase; font-size: 11px; letter-spacing: 1.5px; margin-right: 8px; }

/* ===== HERRAMIENTAS ===== */
#herramientas {
  position: relative; overflow: hidden;
  background: var(--bg2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.tools-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.tools-group h4 { font-size: 11px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--text-muted); margin-bottom: 16px; }

/* ===== EXPERIENCIA (preview) ===== */
#experiencia-preview { position: relative; overflow: hidden; background: var(--bg); }
#experiencia-preview::before {
  content: ''; position: absolute; z-index: 0; pointer-events: none;
  bottom: -35%; right: -15%; width: 65%; height: 160%;
  background: radial-gradient(ellipse, oklch(97% 0.22 122 / 0.11) 0%, transparent 68%);
}
#experiencia-preview .container { position: relative; z-index: 1; }
.section-header-row { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 40px; gap: 20px; flex-wrap: wrap; }
.section-header-row h2 { margin-bottom: 0 !important; font-size: clamp(30px, 3.6vw, 44px) !important; }
.section-link { font-size: 13px; font-weight: 700; color: var(--accent); white-space: nowrap; transition: opacity 0.2s; }
.section-link:hover { opacity: 0.7; }

.exp-preview-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.exp-preview-card {
  background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px 20px; transition: border-color 0.25s var(--ease-out), transform 0.25s var(--ease-out);
}
.exp-preview-card:hover { border-color: oklch(97% 0.22 122 / 0.25); transform: translateY(-3px); }
.exp-preview-period { display: block; font-size: 11px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.exp-preview-card h3 { font-size: 15px; font-weight: 700; letter-spacing: -0.2px; margin-bottom: 6px; line-height: 1.3; }
.exp-preview-company { font-size: 12px; color: var(--text-muted); }

@media (max-width: 1024px) {
  .exp-preview-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ===== SECTIONS COMMON ===== */
section { padding: 112px 0; }

/* Glow ambiente en todas las secciones (excepto las que ya tienen uno propio) */
section:not(#hero):not(#servicios):not(#experiencia-preview):not(#cta-final),
.page-header {
  position: relative; overflow: hidden;
}
section:not(#hero):not(#servicios):not(#experiencia-preview):not(#cta-final)::before,
.page-header::before {
  content: ''; position: absolute; z-index: 0; pointer-events: none;
  top: -25%; width: 55%; height: 150%;
  background: radial-gradient(ellipse, oklch(97% 0.22 122 / 0.09) 0%, transparent 68%);
}
section:not(#hero):not(#servicios):not(#experiencia-preview):not(#cta-final):nth-of-type(odd)::before,
.page-header::before {
  left: -12%;
}
section:not(#hero):not(#servicios):not(#experiencia-preview):not(#cta-final):nth-of-type(even)::before {
  right: -12%; left: auto;
}
section:not(#hero):not(#servicios):not(#experiencia-preview):not(#cta-final) > .container,
.page-header > .container {
  position: relative; z-index: 1;
}
.section-tag {
  display: inline-block; color: var(--accent); font-size: 11px; font-weight: 700;
  letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 14px;
}
section > .container > h2 {
  font-size: clamp(36px, 4.5vw, 60px); font-weight: 800;
  letter-spacing: -0.03em; line-height: 1.05; margin-bottom: 56px;
}

/* ===== ABOUT ===== */
#about { background: var(--bg2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.about-grid {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 80px;
  align-items: start; margin-bottom: 64px;
}
.about-lead { font-size: 20px; color: var(--text); font-weight: 500; line-height: 1.6; margin-bottom: 20px; }
.about-body { font-size: 15px; color: var(--text-muted); line-height: 1.8; margin-bottom: 16px; font-weight: 400; max-width: 65ch; }
.about-left h2 { font-size: clamp(34px,4.5vw,52px); font-weight: 800; letter-spacing: -0.03em; margin-bottom: 28px; line-height: 1.05; }

.about-info-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 36px;
}
.info-item {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 14px 16px;
  display: flex; flex-direction: column; gap: 4px;
}
.info-label { font-size: 10px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--text-muted); }
.info-val { font-size: 14px; font-weight: 600; color: var(--text); }

.skills-block { margin-bottom: 32px; }
.skills-block h4 { font-size: 11px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--text-muted); margin-bottom: 16px; }

.skill-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.skill-pills span {
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--text-mid); font-size: 12px; font-weight: 500;
  padding: 6px 14px; border-radius: 100px;
  transition: border-color 0.2s, color 0.2s;
}
.skill-pills span:hover { border-color: var(--accent); color: var(--accent); }

.skill-bars { display: flex; flex-direction: column; gap: 16px; }
.skill-bar-item { display: flex; flex-direction: column; gap: 8px; }
.skill-bar-label { display: flex; justify-content: space-between; font-size: 13px; font-weight: 500; }
.skill-bar-label span:last-child { color: var(--accent); font-weight: 700; font-size: 12px; }
.skill-bar-track { height: 4px; background: var(--bg4); border-radius: 100px; overflow: hidden; }
.skill-bar-fill {
  height: 100%; width: 0%; border-radius: 100px;
  background: var(--accent);
}

/* Stats */
.stats-row {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
}
.stat-card {
  background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px 20px; display: flex; flex-direction: column; gap: 6px;
  transition: border-color 0.25s var(--ease-out), transform 0.25s var(--ease-out);
}
.stat-card:hover { border-color: oklch(97% 0.22 122 / 0.28); transform: translateY(-3px); }
.stat-num { font-size: 48px; font-weight: 900; color: var(--accent); letter-spacing: -0.04em; line-height: 1; }
.stat-plus { font-size: 36px; }
.stat-label { font-size: 12px; color: var(--text-muted); font-weight: 400; line-height: 1.4; }

/* ===== SERVICIOS ===== */
#servicios { position: relative; overflow: hidden; background: var(--bg); }
#servicios::before {
  content: ''; position: absolute; z-index: 0; pointer-events: none;
  top: -35%; right: -15%; width: 65%; height: 160%;
  background: radial-gradient(ellipse, oklch(97% 0.22 122 / 0.12) 0%, transparent 68%);
}
#servicios .container { position: relative; z-index: 1; }
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.service-card {
  background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px 24px; transition: border-color 0.25s var(--ease-out), transform 0.25s var(--ease-out);
}
.service-card:hover { border-color: oklch(97% 0.22 122 / 0.28); transform: translateY(-3px); }
.service-icon { font-size: 26px; display: block; margin-bottom: 16px; }
.service-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 8px; letter-spacing: -0.3px; }
.service-card p { font-size: 13px; color: var(--text-muted); line-height: 1.6; }

@media (max-width: 1024px) { .services-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px) { .services-grid { grid-template-columns: 1fr; } }

/* ===== EXPERIENCE ===== */
#experience { background: var(--bg); }

.timeline { display: flex; flex-direction: column; gap: 0; margin-bottom: 72px; }

.timeline-item {
  display: grid; grid-template-columns: 32px 1fr; gap: 24px;
  padding-bottom: 40px; position: relative;
}
.timeline-item:last-child { padding-bottom: 0; }

.timeline-marker { display: flex; flex-direction: column; align-items: center; }
.timeline-dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--bg4); border: 2px solid var(--border2); flex-shrink: 0;
  margin-top: 6px;
}
.timeline-dot.active { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 12px rgba(232,255,0,0.4); }
.timeline-marker::after {
  content: ''; flex: 1; width: 1px;
  background: var(--border); margin-top: 8px;
}
.timeline-item:last-child .timeline-marker::after { display: none; }

.timeline-content {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px 28px;
  transition: border-color 0.2s;
}
.timeline-content:hover { border-color: var(--border2); }
.timeline-item.current .timeline-content { border-color: rgba(232,255,0,0.15); }

.timeline-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 16px;
}
.timeline-period {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase; color: var(--text-muted); margin-bottom: 6px;
}
.current-badge { color: var(--accent); }
.timeline-content h3 { font-size: 18px; font-weight: 700; letter-spacing: -0.5px; margin-bottom: 4px; }
.timeline-company { font-size: 13px; color: var(--accent); font-weight: 600; }
.timeline-icon { font-size: 24px; flex-shrink: 0; }

.timeline-list { list-style: none; margin-bottom: 16px; }
.timeline-list li {
  font-size: 14px; color: var(--text-muted); padding: 4px 0;
  padding-left: 16px; position: relative; line-height: 1.5;
}
.timeline-list li::before { content: '—'; position: absolute; left: 0; color: var(--accent); font-size: 12px; }

.timeline-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.timeline-tags span {
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--text-muted); font-size: 11px; font-weight: 500;
  padding: 3px 10px; border-radius: 100px;
}

/* Educación */
.edu-row { border-top: 1px solid var(--border); padding-top: 60px; }
.edu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.edu-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px 28px;
  display: flex; gap: 20px; align-items: flex-start;
  transition: border-color 0.2s;
}
.edu-card:hover { border-color: rgba(232,255,0,0.2); }
.edu-icon { font-size: 28px; flex-shrink: 0; }
.edu-year { font-size: 11px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--accent); display: block; margin-bottom: 6px; }
.edu-card h4 { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.edu-inst { font-size: 13px; color: var(--text-muted); }

/* ===== WORKS ===== */
#works { background: var(--bg2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.filter-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 48px; }
.filter-btn {
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--text-muted); font-family: var(--font); font-size: 13px; font-weight: 500;
  padding: 8px 20px; border-radius: 100px; cursor: pointer; transition: all 0.2s;
}
.filter-btn:hover, .filter-btn.active {
  background: var(--accent); border-color: var(--accent); color: #000; font-weight: 700;
}

.works-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

.work-card {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  transition: transform 0.3s var(--ease-out), border-color 0.3s;
}
.work-card:hover { transform: translateY(-4px); border-color: oklch(97% 0.22 122 / 0.2); }
.work-card.hidden { display: none; }
.work-card.featured { grid-column: span 2; }

.work-thumb {
  position: relative; aspect-ratio: 16/9; background: var(--bg4); overflow: hidden;
}
.work-card.featured .work-thumb { aspect-ratio: 21/9; }
.work-thumb video, .work-thumb img { width: 100%; height: 100%; object-fit: cover; }

.work-card { cursor: pointer; }

.work-overlay {
  position: absolute; inset: 0; background: rgba(0,0,0,0.45);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.3s; pointer-events: none;
}
.work-card:hover .work-overlay { opacity: 1; }

/* Ícono play siempre visible en mobile (esquina inferior derecha) */
.play-icon {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--accent); color: #000;
  font-size: 20px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.2s, box-shadow 0.2s;
  pointer-events: none;
}
.work-card:hover .play-icon {
  transform: scale(1.1);
  box-shadow: 0 10px 36px rgba(232,255,0,0.45);
}

/* En dispositivos touch: mostrar mini-ícono siempre visible */
@media (hover: none) {
  .work-overlay {
    opacity: 1;
    background: rgba(0,0,0,0.25);
  }
  .play-icon {
    width: 44px; height: 44px; font-size: 16px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  }
}

.work-cat-badge {
  position: absolute; top: 12px; left: 12px;
  background: rgba(0,0,0,0.72); backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.1); color: var(--text);
  font-size: 10px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase;
  padding: 4px 12px; border-radius: 100px;
}
.featured-badge {
  position: absolute; top: 12px; right: 12px;
  background: var(--accent); color: #000;
  font-size: 10px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
  padding: 4px 12px; border-radius: 100px;
}

.carousel-count {
  position: absolute; bottom: 12px; right: 12px;
  background: rgba(0,0,0,0.72); backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.1); color: var(--text);
  font-size: 10px; font-weight: 700; letter-spacing: 0.5px;
  padding: 4px 10px; border-radius: 100px;
}
.carousel-card .work-thumb::after {
  content: ''; position: absolute; inset: 6px -6px -6px 6px; z-index: -1;
  background: var(--bg4); border: 1px solid var(--border); border-radius: var(--radius);
}

.carousel-modal { position: relative; width: 100%; background: #000; display: flex; align-items: center; justify-content: center; }
.carousel-modal img { width: 100%; max-height: 62vh; object-fit: contain; display: block; }
.carousel-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; border-radius: 50%; border: none;
  background: rgba(0,0,0,0.55); color: #fff; font-size: 22px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background 0.2s;
}
.carousel-nav:hover { background: var(--accent); color: #000; }
.carousel-prev { left: 14px; }
.carousel-next { right: 14px; }
.carousel-counter {
  position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%);
  background: rgba(0,0,0,0.6); color: var(--text); font-size: 12px; font-weight: 600;
  padding: 5px 14px; border-radius: 100px;
}

.work-info { padding: 18px 20px 20px; }
.work-info h3 { font-size: 17px; font-weight: 700; margin-bottom: 5px; letter-spacing: -0.4px; }
.work-info p { font-size: 12px; color: var(--text-muted); line-height: 1.5; margin-bottom: 12px; }
.work-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.work-tags span {
  background: var(--bg4); border: 1px solid var(--border);
  color: var(--text-muted); font-size: 11px; font-weight: 500;
  padding: 3px 10px; border-radius: 100px;
}

/* ===== PROJECTS ===== */
#projects { background: var(--bg); }
.projects-sub { color: var(--text-muted); font-size: 16px; margin-top: -40px; margin-bottom: 48px; font-weight: 300; }

.projects-grid { display: flex; flex-direction: column; gap: 0; }
.project-item {
  display: grid; grid-template-columns: 80px 1fr auto;
  align-items: center; gap: 20px;
  padding: 16px 0; border-bottom: 1px solid var(--border);
  transition: padding-left 0.2s;
}
.project-item:hover { padding-left: 8px; }
.project-item:first-child { border-top: 1px solid var(--border); }
.project-year { font-size: 12px; font-weight: 700; color: var(--accent); letter-spacing: 1px; }
.project-name { font-size: 15px; font-weight: 500; color: var(--text); }
.project-cat {
  font-size: 11px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase;
  color: var(--text-muted); background: var(--bg3); border: 1px solid var(--border);
  padding: 3px 12px; border-radius: 100px;
}

/* ===== CONTACT ===== */
#contact { background: var(--bg2); border-top: 1px solid var(--border); }
.contact-sub { color: var(--text-muted); font-size: 16px; margin-top: -40px; margin-bottom: 56px; font-weight: 300; }

.contact-main { display: grid; grid-template-columns: 1fr 360px; gap: 32px; align-items: start; }

.contact-cards { display: flex; flex-direction: column; gap: 12px; }
.contact-card {
  background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px 24px; display: flex; align-items: center; gap: 16px;
  transition: border-color 0.2s, transform 0.2s;
}
.contact-card:hover { border-color: var(--accent); transform: translateX(4px); }
.contact-icon { font-size: 20px; color: var(--accent); flex-shrink: 0; width: 20px; }
.contact-label { font-size: 10px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--text-muted); display: block; }
.contact-value { font-size: 14px; font-weight: 600; color: var(--text); }
.contact-arrow { margin-left: auto; color: var(--text-muted); font-size: 18px; transition: transform 0.2s, color 0.2s; }
.contact-card:hover .contact-arrow { transform: translateX(4px); color: var(--accent); }

.contact-card-split { padding: 0; }
.contact-card-main {
  flex: 1; display: flex; align-items: center; gap: 16px;
  padding: 20px 24px;
}
.copy-btn {
  flex-shrink: 0; margin-right: 16px;
  background: var(--bg4); border: 1px solid var(--border); color: var(--text-mid);
  font-family: var(--font); font-size: 12px; font-weight: 600;
  padding: 7px 16px; border-radius: 100px; cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.copy-btn:hover { border-color: var(--accent); color: var(--accent); }
.copy-btn.copied { background: var(--accent); border-color: var(--accent); color: #000; }

.contact-cta-box {
  background: var(--bg3); border: 1px solid oklch(97% 0.22 122 / 0.15);
  border-radius: var(--radius); padding: 36px;
  display: flex; flex-direction: column; gap: 16px;
}
.contact-cta-box h3 { font-size: 22px; font-weight: 800; letter-spacing: -0.5px; }
.contact-cta-box p { font-size: 14px; color: var(--text-muted); line-height: 1.7; }

/* ===== CTA FINAL ===== */
#cta-final { background: var(--bg2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.cta-final-box {
  position: relative; overflow: hidden;
  text-align: center; max-width: 640px; margin: 0 auto;
  background: var(--bg3); border: 1px solid var(--border2); border-radius: var(--radius-lg);
  padding: 56px 40px;
}
.cta-final-box::before {
  content: ''; position: absolute; z-index: 0; pointer-events: none;
  top: -40%; left: 50%; transform: translateX(-50%);
  width: 80%; height: 140%;
  background: radial-gradient(ellipse, oklch(97% 0.22 122 / 0.14) 0%, transparent 68%);
}
.cta-final-box > * { position: relative; z-index: 1; }
.cta-final-box h2 { font-size: clamp(28px, 3.6vw, 40px) !important; margin-bottom: 12px !important; }
.cta-final-box p { color: var(--text-muted); font-size: 16px; margin-bottom: 28px; }

/* ===== FOOTER ===== */
footer { background: var(--bg); border-top: 1px solid var(--border); padding: 28px 0; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; }
footer p { font-size: 12px; color: var(--text-muted); }
.footer-links { display: flex; gap: 24px; }
.footer-links a { font-size: 12px; color: var(--text-muted); transition: color 0.2s; }
.footer-links a:hover { color: var(--accent); }
.footer-wa { display: inline-flex; align-items: center; gap: 6px; }
.wa-icon { flex-shrink: 0; }

/* ===== SPOTLIGHT HOVER (glow que sigue el cursor) ===== */
.service-card, .exp-preview-card, .stat-card, .work-card,
.timeline-content, .edu-card, .contact-card {
  position: relative;
}
.service-card::before, .exp-preview-card::before, .stat-card::before, .work-card::before,
.timeline-content::before, .edu-card::before, .contact-card::before {
  content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none; border-radius: inherit;
  background: radial-gradient(280px circle at var(--mx, 50%) var(--my, 50%), oklch(97% 0.22 122 / 0.10), transparent 72%);
  opacity: 0; transition: opacity 0.35s ease;
}
.service-card:hover::before, .exp-preview-card:hover::before, .stat-card:hover::before, .work-card:hover::before,
.timeline-content:hover::before, .edu-card:hover::before, .contact-card:hover::before {
  opacity: 1;
}
.service-card > *, .exp-preview-card > *, .stat-card > *, .work-card > *,
.timeline-content > *, .edu-card > *, .contact-card > * {
  position: relative; z-index: 1;
}

/* ===== MODAL ===== */
.modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 24px; }
.modal.hidden { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.88); backdrop-filter: blur(10px); }
.modal-box {
  position: relative; z-index: 1; background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); max-width: 900px; width: 100%; overflow: hidden;
  animation: modalIn 0.25s ease;
}
@keyframes modalIn { from { opacity: 0; transform: scale(0.94) translateY(16px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.modal-close {
  position: absolute; top: 14px; right: 14px; width: 36px; height: 36px;
  border-radius: 50%; background: rgba(255,255,255,0.08); border: none;
  color: var(--text); font-size: 15px; cursor: pointer; z-index: 2; transition: background 0.2s;
}
.modal-close:hover { background: rgba(255,255,255,0.18); }
#modal-media video, #modal-media img { width: 100%; max-height: 62vh; object-fit: contain; background: #000; display: block; }
.modal-text { padding: 22px 28px 28px; }
.modal-text h3 { font-size: 20px; font-weight: 700; margin-bottom: 8px; letter-spacing: -0.4px; }
.modal-text p { color: var(--text-muted); font-size: 14px; line-height: 1.7; }

/* ===== PAGE HEADER (páginas internas) ===== */
.page-header {
  padding: 140px 0 60px;
  border-bottom: 1px solid var(--border);
  background: var(--bg2);
}
.page-header h1 {
  font-size: clamp(36px, 5.5vw, 68px);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-top: 12px;
}
.page-header-sub {
  font-size: 16px;
  color: var(--text-muted);
  margin-top: 16px;
  font-weight: 300;
}

/* Navegación editorial en home */
.home-sections-nav {
  margin-top: 56px;
  border-top: 1px solid var(--border);
}
.home-section-link {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  transition: padding-left 0.3s var(--ease-out);
}
.home-section-link:hover { padding-left: 10px; }
.home-section-content { flex: 1; }
.home-section-content h4 { font-size: 15px; font-weight: 700; margin-bottom: 2px; }
.home-section-content p { font-size: 13px; color: var(--text-muted); }
.home-section-arrow {
  color: var(--text-muted); font-size: 18px; flex-shrink: 0;
  transition: transform 0.25s var(--ease-out), color 0.2s;
}
.home-section-link:hover .home-section-arrow { transform: translateX(4px); color: var(--accent); }

/* Nav active link */
.nav-active { color: var(--text) !important; }

/* Contact card text */
.contact-card-text { display: flex; flex-direction: column; gap: 2px; flex: 1; }

/* ===== HAMBURGER ===== */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: border-color 0.2s;
  z-index: 200;
}
.hamburger:hover { border-color: var(--accent); }
.hamburger span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease, width 0.3s ease;
  transform-origin: center;
}
/* X cuando está abierto */
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; width: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Fix iOS Safari: evita scroll del body cuando el menú está abierto */
body.menu-open {
  position: fixed;
  width: 100%;
  overflow-y: scroll;
}

/* Overlay fondo oscuro */
.menu-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  z-index: 98;
  opacity: 0;
  transition: opacity 0.3s;
}
.menu-overlay.visible {
  display: block;
  opacity: 1;
}

/* Item extra solo en mobile */
.nav-mobile-cta { display: none; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .works-grid { grid-template-columns: repeat(2, 1fr); }
  .work-card.featured { grid-column: span 2; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .contact-main { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .page-header { padding: 110px 0 40px; }
  .page-header h1 { letter-spacing: -0.03em; }
  /* Nav mobile */
  .hamburger { display: flex; }
  .nav-cta { display: none; }
  .nav-mobile-cta { display: block; }

  .nav-links {
    display: flex !important;
    flex-direction: column;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(300px, 80vw);
    background: var(--bg2);
    border-left: 1px solid var(--border);
    padding: 90px 32px 40px;
    gap: 0;
    z-index: 99;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
  }
  .nav-links.open { transform: translateX(0); }

  .nav-links li { border-bottom: 1px solid var(--border); }
  .nav-links li:first-child { border-top: 1px solid var(--border); }
  .nav-links a {
    display: block;
    padding: 16px 0;
    font-size: 17px;
    font-weight: 600;
    color: var(--text-muted);
    transition: color 0.2s, padding-left 0.2s;
  }
  .nav-links a:hover { color: var(--text); padding-left: 8px; }

  .nav-mobile-cta a {
    margin-top: 28px;
    display: inline-block;
    background: var(--accent);
    color: #000 !important;
    font-weight: 700 !important;
    font-size: 14px !important;
    padding: 12px 24px;
    border-radius: 100px;
    border-bottom: none !important;
  }
  .nav-mobile-cta { border: none !important; }

  /* General */
  .container { padding: 0 20px; }
  section { padding: 72px 0; }
  section > .container > h2 { margin-bottom: 40px; }

  /* Hero */
  #hero { padding: 120px 20px 0; }
  .hero-title { letter-spacing: -0.025em; }
  .hero-role { font-size: 13px; }
  .hero-sub { font-size: 16px; }
  .hero-btns { flex-direction: column; align-items: center; gap: 12px; }
  .hero-btns .btn-primary,
  .hero-btns .btn-outline { width: 100%; max-width: 280px; text-align: center; }
  .hero-marquee { margin-top: 56px; }

  /* Herramientas / Experiencia preview */
  .tools-grid { grid-template-columns: 1fr; gap: 28px; }
  .exp-preview-grid { grid-template-columns: 1fr; }
  .section-header-row { align-items: flex-start; }

  /* About */
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-left h2 { font-size: 36px; }
  .about-info-row { grid-template-columns: 1fr 1fr; }
  .stats-row { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stat-num { font-size: 40px; }

  /* Experience */
  .timeline-item { grid-template-columns: 20px 1fr; gap: 14px; }
  .timeline-content { padding: 18px 20px; }
  .timeline-header { flex-direction: column; gap: 8px; }
  .timeline-icon { display: none; }
  .edu-grid { grid-template-columns: 1fr; gap: 12px; }

  /* Works */
  .works-grid { grid-template-columns: 1fr; gap: 16px; }
  .work-card.featured { grid-column: span 1; }
  .work-card.featured .work-thumb { aspect-ratio: 16/9; }
  .filter-row { gap: 8px; }
  .filter-btn { font-size: 12px; padding: 7px 14px; }

  /* Projects */
  .project-item { grid-template-columns: 56px 1fr; gap: 12px; }
  .project-cat { display: none; }
  .project-name { font-size: 14px; }

  /* Contact */
  .contact-cta-box { padding: 24px; }

  /* Footer */
  .footer-inner { flex-direction: column; gap: 12px; text-align: center; }
  .footer-links { justify-content: center; }
}

@media (max-width: 480px) {
  .about-info-row { grid-template-columns: 1fr; }
  .hero-title { letter-spacing: -0.025em; font-size: 52px; }
  .timeline-content { padding: 14px 16px; }
  .contact-cards { gap: 10px; }
}

/* ===== HERO ENTRANCE ===== */
@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero-available { animation: heroFadeUp 0.6s var(--ease-out) both; }
.hero-title     { animation: heroFadeUp 0.7s var(--ease-out) 0.1s both; }
.hero-role      { animation: heroFadeUp 0.6s var(--ease-out) 0.2s both; }
.hero-sub       { animation: heroFadeUp 0.6s var(--ease-out) 0.28s both; }
.hero-btns      { animation: heroFadeUp 0.6s var(--ease-out) 0.36s both; }
.hero-marquee   { animation: heroFadeUp 0.6s var(--ease-out) 0.44s both; }

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .hero-available, .hero-title, .hero-role, .hero-sub, .hero-btns, .hero-marquee {
    animation: none;
    opacity: 1;
    transform: none;
  }
  .marquee-track { animation: none; }
  .pulse { animation: none; }
}
