/* ============================================================
   CAMILA HURTATIZ — PORTAFOLIO
   style.css — Variables · Reset · Base · Cursor · Utilidades
   ============================================================ */

/* ── 1. GOOGLE FONTS ──────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;1,300;1,400;1,500&family=DM+Sans:opsz,wght@9..40,300;9..40,400;9..40,500&display=swap');

/* ── 2. VARIABLES ─────────────────────────────────────────── */
:root {
  /* Paleta */
  --principal:  #6B1A2A;
  --secundario: #8B2A3A;
  --base:       #F7F4EF;
  --apoyo:      #E8E0D4;
  --acento:     #C4A882;
  --oscuro:     #1A0D10;

  /* Tipografía */
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans:  'DM Sans', system-ui, sans-serif;

  /* Easing */
  --expo: cubic-bezier(0.16, 1, 0.3, 1);
  --power2: cubic-bezier(0.25, 0.46, 0.45, 0.94);

  /* Espaciado */
  --section-pad: 120px 8vw;
  --section-pad-mobile: 80px 6vw;

  /* Transición estándar */
  --t: 0.35s var(--power2);
}

/* ── 3. RESET ─────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--base);
  color: var(--oscuro);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.7;
  overflow-x: hidden;
  cursor: none;
}

img, video {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

button {
  background: none;
  border: none;
  cursor: none;
  font-family: inherit;
}

/* ── 4. TIPOGRAFÍA BASE ───────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 300;
  line-height: 1.1;
}

h1 { font-size: clamp(3rem, 7vw, 5.5rem); }
h2 { font-size: clamp(2rem, 4vw, 3.25rem); }
h3 { font-size: clamp(1.4rem, 2.5vw, 2rem); }
h4 { font-size: clamp(1.1rem, 1.8vw, 1.5rem); }

p {
  font-size: 1rem;
  line-height: 1.8;
  color: rgba(26, 13, 16, 0.8);
}

/* ── 5. UTILIDADES ────────────────────────────────────────── */
.eyebrow {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--acento);
  margin-bottom: 1rem;
}

.section-title {
  font-family: var(--serif);
  font-size: clamp(2.2rem, 4.5vw, 3.5rem);
  font-weight: 300;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.section-title em {
  font-style: italic;
  color: var(--principal);
}

/* Clase base para animaciones scroll — GSAP maneja el transform */
.reveal {
  opacity: 0;
}

/* Exp-items ocultos inicialmente (animación propia, sin .reveal) */
.exp-item {
  opacity: 0;
}

/* Pill / tag */
.tag {
  display: inline-block;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 12px;
  border: 1px solid var(--acento);
  color: var(--oscuro);
  background: transparent;
  transition: background var(--t), color var(--t);
}

.tag:hover {
  background: var(--acento);
  color: var(--oscuro);
}

/* Botón outline estándar */
.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--acento);
  border: 1px solid var(--acento);
  padding: 14px 36px;
  background: transparent;
  position: relative;
  overflow: hidden;
  transition: color 0.35s var(--expo), border-color var(--t);
}

.btn-outline::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--acento);
  transform: translateX(-101%);
  transition: transform 0.4s var(--expo);
}

.btn-outline span {
  position: relative;
  z-index: 1;
}

.btn-outline:hover {
  color: var(--oscuro);
}

.btn-outline:hover::before {
  transform: translateX(0);
}

/* ── 6. CURSOR PERSONALIZADO ──────────────────────────────── */
#cursor-dot,
#cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 9999;
  will-change: transform;
  border-radius: 50%;
}

#cursor-dot {
  width: 6px;
  height: 6px;
  background: var(--principal);
  transform: translate(-50%, -50%);
}

#cursor-ring {
  width: 28px;
  height: 28px;
  border: 1.5px solid var(--acento);
  background: transparent;
  transform: translate(-50%, -50%);
  transition:
    width 0.3s var(--expo),
    height 0.3s var(--expo),
    background 0.3s,
    border-color 0.3s;
  z-index: 9998;
}

/* Estado hover sobre interactivos */
body.cursor-hover #cursor-ring {
  width: 62px;
  height: 62px;
  background: rgba(107, 26, 42, 0.12);
  border-color: var(--principal);
}

/* ── 7. LAYOUT DE SECCIONES ───────────────────────────────── */
.section {
  padding: var(--section-pad);
}

.section--base    { background: var(--base); }
.section--apoyo   { background: var(--apoyo); }
.section--oscuro  { background: var(--oscuro); color: var(--base); }

/* Línea divisoria decorativa */
.divider {
  width: 0;
  height: 1px;
  background: var(--acento);
  margin: 0 auto;
}

/* ── 8. SCROLLBAR ─────────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--base); }
::-webkit-scrollbar-thumb { background: var(--acento); }

/* ── 9. SELECCIÓN ─────────────────────────────────────────── */
::selection {
  background: var(--principal);
  color: var(--base);
}

/* ── 10. RESPONSIVE ───────────────────────────────────────── */
@media (max-width: 768px) {
  /* Restaurar cursor nativo en mobile */
  body {
    cursor: auto;
  }

  #cursor-dot,
  #cursor-ring {
    display: none;
  }

  .section {
    padding: var(--section-pad-mobile);
  }

  h1 { font-size: clamp(2.2rem, 10vw, 3.2rem); }
  h2 { font-size: clamp(1.8rem, 8vw, 2.4rem); }
}

/* ── 11. PREFERS-REDUCED-MOTION ───────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================================
   NAVBAR
   ============================================================ */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 400;
  height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5vw;
  transition: background 0.4s, box-shadow 0.4s;
}

#navbar.scrolled {
  background: rgba(26, 13, 16, 0.96);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgba(196, 168, 130, 0.12);
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.nav-logo img {
  height: clamp(56px, 4.8vw, 74px);
  width: auto;
  object-fit: contain;
  opacity: 0.96;
  filter: brightness(0) invert(1) drop-shadow(0 0 10px rgba(247, 244, 239, 0.24));
  transition: opacity var(--t), transform var(--t);
}

.nav-logo:hover img {
  opacity: 1;
  transform: translateY(-1px);
}

.nav-links {
  display: flex;
  gap: 2.5rem;
}

.nav-links a {
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--acento);
  position: relative;
  padding-bottom: 3px;
  transition: color var(--t);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 1px;
  background: var(--acento);
  transition: width 0.4s var(--expo);
}

.nav-links a:hover,
.nav-links a.active { color: var(--base); }

.nav-links a.active::after,
.nav-links a:hover::after { width: 100%; }

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
}

.nav-hamburger span {
  display: block;
  width: 24px; height: 1.5px;
  background: var(--acento);
  transition: transform 0.35s var(--expo), opacity 0.25s;
}

.nav-hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Mobile menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: var(--oscuro);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s var(--expo);
}

.mobile-menu.open {
  opacity: 1;
  pointer-events: all;
}

.mobile-menu ul {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  text-align: center;
}

.mobile-menu a {
  font-family: var(--serif);
  font-size: 2.4rem;
  font-weight: 300;
  color: var(--base);
  letter-spacing: 0.04em;
  transition: color var(--t);
}

.mobile-menu a:hover { color: var(--acento); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  pointer-events: none;
  z-index: 0;
}

.hero-video::-webkit-media-controls,
.hero-video::-webkit-media-controls-panel,
.hero-video::-webkit-media-controls-start-playback-button {
  display: none !important;
  -webkit-appearance: none;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(26, 13, 16, 0.82) 0%,
    rgba(26, 13, 16, 0.25) 100%
  );
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 0 8vw 10vh;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: flex-end;
  gap: 4rem;
}

.hero-eyebrow {
  color: var(--acento);
  opacity: 0;
}

.hero-name {
  font-family: var(--serif);
  font-size: clamp(3.5rem, 8vw, 6.5rem);
  font-weight: 300;
  line-height: 0.95;
  color: var(--base);
  margin-bottom: 1.2rem;
  overflow: hidden;
}

.hero-name em {
  font-style: italic;
  color: var(--acento);
  display: block;
}

.hero-name-line {
  display: block;
  opacity: 0;
  transform: translateY(80px);
}

.hero-sub {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(232, 224, 212, 0.65);
  line-height: 2;
  margin-bottom: 2rem;
  opacity: 0;
}

.hero-stats {
  display: flex;
  gap: 1.8rem;
  margin-bottom: 2.4rem;
  opacity: 0;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 10px 18px;
  border: 1px solid rgba(196, 168, 130, 0.3);
  background: rgba(247, 244, 239, 0.05);
}

.stat-num {
  font-family: var(--serif);
  font-size: 1.8rem;
  font-weight: 300;
  color: var(--base);
  line-height: 1;
}

.stat-label {
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(196, 168, 130, 0.7);
}

.hero-cta {
  opacity: 0;
  animation: heroCtaPulse 2.9s ease-in-out infinite;
  box-shadow: 0 0 0 0 rgba(196, 168, 130, 0.25);
}

.cta-arrow {
  display: inline-block;
  transition: transform 0.3s var(--expo);
}

.hero-cta:hover .cta-arrow { transform: translateX(5px); }

@keyframes heroCtaPulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(196, 168, 130, 0.24);
    transform: translateY(0);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(196, 168, 130, 0);
    transform: translateY(-1px);
  }
}

.hero-right { opacity: 0; }

.hero-quote {
  font-family: var(--serif);
  font-size: clamp(1.2rem, 2.2vw, 1.9rem);
  font-style: italic;
  color: rgba(247, 244, 239, 0.55);
  line-height: 1.5;
  border: none;
  padding: 0;
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  opacity: 0;
}

.scroll-line {
  width: 1px;
  height: 50px;
  background: linear-gradient(to bottom, transparent, var(--acento));
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { transform: scaleY(1); opacity: 0.4; }
  50%       { transform: scaleY(1.3); opacity: 1; }
}

.scroll-indicator span {
  font-size: 0.55rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(196, 168, 130, 0.5);
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

/* ============================================================
   PERFIL
   ============================================================ */
.perfil-grid {
  display: grid;
  grid-template-columns: 55% 45%;
  gap: 6rem;
  max-width: 1280px;
  margin: 0 auto 6rem;
}

.perfil-text p { margin-bottom: 1.2rem; }

.perfil-img-wrap {
  position: relative;
}

.perfil-img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  object-position: center top;
  clip-path: polygon(0 0, 100% 0, 100% 88%, 88% 100%, 0 100%);
}

.perfil-img-card {
  position: absolute;
  bottom: -1.5rem;
  left: 1.5rem;
  right: 1.5rem;
  background: var(--oscuro);
  padding: 1.2rem 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.perfil-img-card strong {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--base);
}

.perfil-img-card span {
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  color: var(--acento);
}

/* Timeline formación */
.timeline-section {
  max-width: 1280px;
  margin: 5rem auto 0;
}

.timeline-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 520px);
  gap: 3rem;
  align-items: start;
}

.timeline {
  position: relative;
  margin-top: 2.5rem;
  padding-left: 2rem;
}

.timeline-visual {
  margin: 2.5rem 0 0;
  position: sticky;
  top: 6.5rem;
  overflow: hidden;
  padding: 1.5rem;
  border: 1px solid rgba(196, 168, 130, 0.24);
  background:
    radial-gradient(circle at top left, rgba(196, 168, 130, 0.16), transparent 42%),
    linear-gradient(180deg, rgba(247, 244, 239, 0.98), rgba(232, 224, 212, 0.92));
  box-shadow: 0 22px 50px rgba(107, 26, 42, 0.08);
}

.timeline-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(196, 168, 130, 0.12), transparent 28%, transparent 72%, rgba(107, 26, 42, 0.08));
  pointer-events: none;
}

.timeline-visual::after {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(107, 26, 42, 0.08);
  pointer-events: none;
}

.timeline-visual-img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
  object-position: center center;
  filter: saturate(0.9) contrast(0.98) brightness(0.985);
  transform-origin: center center;
}

.timeline-axis {
  position: absolute;
  left: 0;
  top: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, var(--acento), transparent);
}

.tl-item {
  position: relative;
  padding: 0 0 2.5rem 2rem;
}

.tl-dot {
  position: absolute;
  left: -5px;
  top: 6px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--acento);
  border: 2px solid var(--base);
}

.tl-date {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--acento);
  display: block;
  margin-bottom: 0.3rem;
}

.tl-title {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 300;
  color: var(--oscuro);
  margin-bottom: 0.2rem;
}

.tl-org {
  font-size: 0.75rem;
  color: rgba(26, 13, 16, 0.5);
}

/* ============================================================
   SKILLS
   ============================================================ */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3.5rem;
  max-width: 1280px;
  margin: 3rem auto 0;
}

.skill-col-title {
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--principal);
  margin-bottom: 1.5rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid rgba(107, 26, 42, 0.2);
}

.skill-bar { margin-bottom: 1.2rem; }

.skill-bar-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.35rem;
  font-size: 0.82rem;
}

.skill-level {
  font-size: 0.65rem;
  color: var(--acento);
  letter-spacing: 0.06em;
}

.skill-track {
  height: 1px;
  background: rgba(107, 26, 42, 0.15);
  overflow: hidden;
}

.skill-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(to right, var(--principal), var(--acento));
  transition: width 1.2s var(--expo);
}

/* Soft skills */
.soft-skills-wrap {
  max-width: 1280px;
  margin: 3.5rem auto 0;
}

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}

.pill {
  opacity: 0;
  transform: scale(0.85);
}

/* ============================================================
   PROYECTOS
   ============================================================ */
.proyectos-header {
  max-width: 1280px;
  margin: 0 auto 3rem;
}

.proyectos-sub {
  font-size: 0.9rem;
  color: rgba(26, 13, 16, 0.55);
  margin-top: 0.5rem;
}

.proyectos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
  max-width: 1280px;
  margin: 0 auto;
}

.proj-card {
  background: var(--apoyo);
  overflow: hidden;
  cursor: none;
  border: 0.5px solid transparent;
  transition: border-color var(--t), box-shadow var(--t), transform 0.45s var(--expo);
}

.proj-card:hover {
  transform: translateY(-7px);
  box-shadow: 0 24px 64px rgba(26, 13, 16, 0.16);
  border-color: rgba(107, 26, 42, 0.2);
}

.proj-thumb {
  width: 100%;
  aspect-ratio: 4/3;
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
  transition: transform 0.55s var(--expo);
}

.proj-card:hover .proj-thumb { transform: scale(1.04); }

.proj-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 30%, rgba(26, 13, 16, 0.72));
  opacity: 0;
  transition: opacity 0.4s;
}

.proj-card:hover .proj-overlay { opacity: 1; }

.proj-btn {
  position: absolute;
  bottom: 1.2rem;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--base);
  border: 1px solid rgba(247, 244, 239, 0.5);
  padding: 8px 22px;
  background: transparent;
  opacity: 0;
  transition: opacity 0.3s, transform 0.35s var(--expo), background var(--t);
  white-space: nowrap;
}

.proj-card:hover .proj-btn {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.proj-btn:hover { background: rgba(247, 244, 239, 0.15); }

.proj-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,0.06) 50%, transparent 60%);
  transform: translateX(-100%);
  transition: transform 0.7s;
}

.proj-card:hover .proj-shine { transform: translateX(100%); }

.proj-info {
  padding: 1.2rem 1.4rem 1.6rem;
}

.proj-cat {
  font-size: 0.62rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--acento);
  display: block;
  margin-bottom: 0.3rem;
}

.proj-name {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 300;
  line-height: 1.2;
  color: var(--oscuro);
  margin-bottom: 0.2rem;
  transition: color var(--t);
}

.proj-card:hover .proj-name { color: var(--principal); }

.proj-loc {
  font-size: 0.7rem;
  color: rgba(26, 13, 16, 0.45);
}

/* ============================================================
   MODAL
   ============================================================ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 600;
  background: rgba(26, 13, 16, 0);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  pointer-events: none;
  transition: background 0.45s;
}

.modal-backdrop.open {
  pointer-events: all;
  background: rgba(26, 13, 16, 0.95);
}

.modal {
  background: var(--oscuro);
  width: 100%;
  max-width: 1100px;
  max-height: 92vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  transform: translateY(32px) scale(0.96);
  opacity: 0;
  transition: transform 0.5s var(--expo), opacity 0.5s var(--expo);
}

.modal-backdrop.open .modal {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.modal-close {
  position: absolute;
  top: 0.9rem; right: 0.9rem;
  z-index: 20;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(247, 244, 239, 0.1);
  border: 0.5px solid rgba(247, 244, 239, 0.2);
  color: var(--base);
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s, background var(--t);
}

.modal-close:hover {
  transform: rotate(90deg);
  background: rgba(247, 244, 239, 0.2);
}

.modal-gallery {
  position: relative;
  background: #0a0806;
  flex-shrink: 0;
}

.modal-main-wrap {
  width: 100%;
  height: 52vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.modal-main-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity 0.3s;
}

.modal-main-img.switching { opacity: 0; }

.modal-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px; height: 42px;
  border-radius: 50%;
  background: rgba(247, 244, 239, 0.08);
  border: 0.5px solid rgba(247, 244, 239, 0.18);
  color: var(--base);
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--t);
  backdrop-filter: blur(4px);
}

.modal-prev { left: 0.8rem; }
.modal-next { right: 0.8rem; }
.modal-arrow:hover { background: rgba(247, 244, 239, 0.2); }

.modal-img-label {
  position: absolute;
  bottom: 68px; left: 0; right: 0;
  padding: 0.45rem 1rem;
  background: rgba(10, 8, 6, 0.55);
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(247, 244, 239, 0.6);
  backdrop-filter: blur(4px);
}

.modal-thumbs {
  display: flex;
  gap: 2px;
  height: 68px;
  background: #111;
  overflow-x: auto;
}

.modal-thumbs::-webkit-scrollbar { height: 2px; background: #222; }
.modal-thumbs::-webkit-scrollbar-thumb { background: var(--acento); }

.modal-thumb {
  flex-shrink: 0;
  height: 68px;
  width: 108px;
  object-fit: cover;
  opacity: 0.38;
  cursor: none;
  border-bottom: 2.5px solid transparent;
  transition: opacity 0.25s, border-color 0.25s;
}

.modal-thumb.active {
  opacity: 1;
  border-bottom-color: var(--acento);
}

.modal-thumb:hover { opacity: 0.75; }

.modal-info {
  padding: 1.4rem 2rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.5rem;
  border-top: 0.5px solid rgba(247, 244, 239, 0.08);
  overflow-y: auto;
}

.modal-cat {
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--acento);
  display: block;
  margin-bottom: 0.3rem;
}

.modal-name {
  font-family: var(--serif);
  font-size: 1.7rem;
  font-weight: 300;
  color: var(--base);
  margin-bottom: 0.5rem;
}

.modal-desc {
  font-size: 0.82rem;
  line-height: 1.8;
  color: rgba(247, 244, 239, 0.55);
}

.modal-tags {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  align-items: flex-end;
  min-width: 160px;
}

.modal-tags .tag {
  color: var(--acento);
  border-color: rgba(196, 168, 130, 0.3);
  font-size: 0.6rem;
}

/* ============================================================
   EXPERIENCIA — grain + parallax layer
   ============================================================ */
.experiencia-section {
  position: relative;
  overflow: hidden;
}

/* Grain animado tipo película */
.experiencia-section::after {
  content: '';
  position: absolute;
  inset: -30%;
  width: 160%;
  height: 160%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 220px 220px;
  opacity: 0.032;
  pointer-events: none;
  z-index: 0;
  animation: grainShift 0.6s steps(1) infinite;
}

@keyframes grainShift {
  0%   { background-position:   0px   0px; }
  16%  { background-position: -44px  20px; }
  33%  { background-position:  22px -66px; }
  50%  { background-position: -66px  44px; }
  66%  { background-position:  44px  22px; }
  83%  { background-position: -22px -44px; }
  100% { background-position:  66px -22px; }
}

/* Capa de parallax (gradiente radial de profundidad) */
.exp-parallax-layer {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 80% 60% at 50% 110%,
    rgba(107, 26, 42, 0.14) 0%,
    transparent 70%
  );
  pointer-events: none;
  z-index: 0;
  will-change: transform;
}

/* Contenido sobre grain y parallax */
.exp-timeline,
.experiencia-section > .eyebrow,
.experiencia-section > .section-title {
  position: relative;
  z-index: 1;
}

/* ── BOTÓN DE MÚSICA ──────────────────────────────────────── */
.music-btn {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  z-index: 500;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.65rem 1.1rem 0.65rem 0.85rem;
  background: rgba(26, 13, 16, 0.82);
  border: 1px solid rgba(196, 168, 130, 0.22);
  backdrop-filter: blur(12px);
  cursor: none;
  transition: border-color 0.3s, background 0.3s;
  user-select: none;
}

.music-btn:hover {
  border-color: var(--acento);
  background: rgba(26, 13, 16, 0.95);
}

.music-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--acento);
  display: flex;
  align-items: center;
  justify-content: center;
}

.music-icon svg { width: 16px; height: 16px; }

/* Barras animadas (visibles solo al reproducir) */
.music-bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 14px;
  opacity: 0;
  transition: opacity 0.4s;
}

.music-btn.playing .music-bars { opacity: 1; }

.music-bars span {
  display: block;
  width: 3px;
  background: var(--acento);
  border-radius: 1px;
  animation: none;
}

.music-btn.playing .music-bars span:nth-child(1) {
  animation: bar 0.9s ease-in-out infinite;
}
.music-btn.playing .music-bars span:nth-child(2) {
  animation: bar 0.7s ease-in-out 0.15s infinite;
}
.music-btn.playing .music-bars span:nth-child(3) {
  animation: bar 1.1s ease-in-out 0.3s infinite;
}

@keyframes bar {
  0%, 100% { height: 4px;  }
  50%       { height: 13px; }
}

.music-label {
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(196, 168, 130, 0.7);
  white-space: nowrap;
  transition: color 0.3s;
}

.music-btn:hover .music-label,
.music-btn.playing .music-label {
  color: var(--acento);
}

@media (max-width: 768px) {
  .music-btn { bottom: 1.2rem; left: 1.2rem; }
  .music-label { display: none; }
}

/* ── EXPERIENCIA — exp-timeline ──────────────────────────── */
.exp-timeline {
  position: relative;
  max-width: 1100px;
  margin: 3rem auto 0;
}

.exp-axis {
  position: absolute;
  left: 50%;
  top: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, var(--acento), transparent);
  transform: translateX(-50%);
}

.exp-item {
  position: relative;
  width: 45%;
  margin-bottom: 3rem;
}

.exp-left  { margin-left: 0; margin-right: auto; padding-right: 2.5rem; }
.exp-right { margin-left: auto; margin-right: 0; padding-left: 2.5rem; }

.exp-dot {
  position: absolute;
  top: 1rem;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--acento);
  border: 2px solid var(--oscuro);
}

.exp-left  .exp-dot { right: -6px;  left: auto; }
.exp-right .exp-dot { left:  -6px; right: auto; }

.exp-card {
  padding: 1.6rem 1.8rem;
  border: 0.5px solid rgba(196, 168, 130, 0.15);
  background: rgba(247, 244, 239, 0.03);
  transition: background var(--t), border-color var(--t);
}

.exp-card:hover {
  background: rgba(247, 244, 239, 0.06);
  border-color: rgba(196, 168, 130, 0.3);
}

.exp-date {
  display: block;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--acento);
  margin-bottom: 0.4rem;
}

.exp-role {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 300;
  color: var(--base);
  margin-bottom: 0.2rem;
}

.exp-company {
  display: block;
  font-size: 0.72rem;
  color: rgba(196, 168, 130, 0.6);
  margin-bottom: 0.8rem;
}

.exp-desc {
  font-size: 0.8rem;
  line-height: 1.75;
  color: rgba(232, 224, 212, 0.55);
  margin-bottom: 0.9rem;
}

.exp-tags { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.exp-tags .tag {
  color: var(--acento);
  border-color: rgba(196, 168, 130, 0.22);
  font-size: 0.58rem;
}

/* ============================================================
   CONTACTO
   ============================================================ */
.contacto-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6rem;
  max-width: 1280px;
  margin: 0 auto;
  align-items: center;
}

.contacto-left .section-title { color: var(--principal); }

.contact-item {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding: 1.3rem 1.5rem;
  border: 1px solid var(--apoyo);
  margin-bottom: 0.8rem;
  transition: border-color var(--t), background var(--t);
}

.contact-item:hover {
  border-color: var(--acento);
  background: var(--apoyo);
}

.contact-icon {
  width: 40px; height: 40px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--acento);
}

.contact-icon svg { width: 22px; height: 22px; }

.contact-label {
  display: block;
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(26, 13, 16, 0.45);
  margin-bottom: 0.2rem;
}

.contact-val {
  font-size: 0.9rem;
  color: var(--oscuro);
  font-weight: 400;
}

.contact-link {
  color: var(--principal);
  transition: color var(--t);
}

.contact-link:hover { color: var(--acento); }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--oscuro);
  border-top: 1px solid var(--principal);
  padding: 2.2rem 8vw;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.footer-logo {
  height: clamp(42px, 4.2vw, 56px);
  width: auto;
  object-fit: contain;
  opacity: 0.95;
  filter: brightness(0) invert(1) drop-shadow(0 0 10px rgba(247, 244, 239, 0.22));
}

.footer-left span {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: rgba(232, 224, 212, 0.45);
}

.footer-right {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.footer-exp-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.95rem;
  border-radius: 999px;
  border: 1px solid rgba(196, 168, 130, 0.35);
  background: linear-gradient(135deg, rgba(196, 168, 130, 0.08), rgba(196, 168, 130, 0.02));
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--acento);
  transition: color var(--t), letter-spacing var(--t), border-color var(--t), transform var(--t);
}

.footer-exp-link:hover {
  color: var(--base);
  letter-spacing: 0.15em;
  border-color: rgba(247, 244, 239, 0.65);
  transform: translateY(-1px);
}

.exp-arrow {
  display: inline-block;
  font-size: 0.95rem;
  transform: translateX(0);
}

@keyframes expArrowNudge {
  0%, 55%, 100% {
    transform: translateX(0);
  }
  70% {
    transform: translateX(4px);
  }
}

.whatsapp-float {
  position: fixed;
  right: clamp(14px, 2.2vw, 26px);
  bottom: clamp(14px, 2.2vw, 26px);
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(145deg, #28d76f, #1fa855);
  box-shadow: 0 14px 30px rgba(22, 128, 64, 0.32);
  z-index: 460;
  transform: translateY(0) scale(1);
  transition: transform var(--t), filter var(--t), box-shadow var(--t);
  animation: waFloatPulse 3.3s ease-in-out infinite;
}

.whatsapp-float svg {
  width: 30px;
  height: 30px;
}

.whatsapp-float:hover {
  transform: translateY(-3px) scale(1.05);
  filter: saturate(1.12);
  box-shadow: 0 18px 34px rgba(22, 128, 64, 0.4);
}

@keyframes waFloatPulse {
  0%, 100% {
    box-shadow: 0 14px 30px rgba(22, 128, 64, 0.32), 0 0 0 0 rgba(40, 215, 111, 0.4);
  }
  50% {
    box-shadow: 0 14px 30px rgba(22, 128, 64, 0.35), 0 0 0 12px rgba(40, 215, 111, 0);
  }
}

.footer-credits {
  font-size: 0.65rem;
  color: rgba(196, 168, 130, 0.35);
}

/* ============================================================
   RESPONSIVE — TABLET (≤ 1024px)
   ============================================================ */
@media (max-width: 1024px) {
  .perfil-grid        { grid-template-columns: 1fr; gap: 3rem; }
  .perfil-img-col     { max-width: 420px; }
  .timeline-layout    { grid-template-columns: 1fr; gap: 2rem; }
  .timeline-visual    { position: relative; top: auto; margin-top: 0; max-width: 640px; }
  .skills-grid        { grid-template-columns: 1fr 1fr; gap: 2.5rem; }
  .proyectos-grid     { grid-template-columns: repeat(2, 1fr); }
  .contacto-grid      { grid-template-columns: 1fr; gap: 3rem; }

  .exp-axis           { display: none; }
  .exp-item           { width: 100%; padding: 0 !important; margin-bottom: 1.5rem; }
  .exp-dot            { display: none; }
}

/* ============================================================
   RESPONSIVE — MOBILE (≤ 768px)
   ============================================================ */
@media (max-width: 768px) {
  .nav-links          { display: none; }
  .nav-hamburger      { display: flex; }
  #navbar             { height: 76px; }
  .nav-logo img       { height: 62px; }

  .hero-content       { grid-template-columns: 1fr; padding-bottom: 12vh; }
  .hero-right         { display: none; }
  .hero-stats         { flex-wrap: wrap; gap: 0.8rem; }
  .stat               { flex: 1; min-width: 90px; }

  .skills-grid        { grid-template-columns: 1fr; }
  .proyectos-grid     { grid-template-columns: 1fr; }

  .modal-info         { grid-template-columns: 1fr; }
  .modal-tags         { align-items: flex-start; flex-direction: row; flex-wrap: wrap; }
  .timeline           { margin-top: 1.6rem; }
  .timeline-visual    { max-width: 100%; padding: 1rem; }

  .footer-inner       { flex-direction: column; text-align: center; }
  .footer-right       { flex-direction: column; gap: 0.6rem; }

  .whatsapp-float {
    width: 54px;
    height: 54px;
    right: 14px;
    bottom: 14px;
  }
}
