/* =========================================================
   AGUSTÍN PERRONE — PORTFOLIO
   Tokens
========================================================= */
:root {
  --bg: #0a0a0f;
  --bg-alt: #0d0d14;
  --surface: #15151f;
  --surface-2: #1b1b28;
  --border: #26263a;
  --border-hover: #3d3d5c;

  --text: #f4f4f6;
  --text-muted: #9ca3af;
  --text-faint: #6b7280;

  --accent: #7c6cf6;
  --accent-2: #a78bfa;
  --accent-soft: rgba(124, 108, 246, 0.12);
  --accent-gradient: linear-gradient(135deg, #7c6cf6 0%, #c084fc 100%);

  --whatsapp: #25d366;

  --font-display: 'Sora', sans-serif;
  --font-body: 'Inter', sans-serif;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  --shadow-soft: 0 8px 30px rgba(0, 0, 0, 0.35);
  --shadow-glow: 0 0 0 1px rgba(124, 108, 246, 0.15), 0 8px 30px rgba(124, 108, 246, 0.12);

  --container: 1180px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

ul { list-style: none; }

::selection { background: var(--accent); color: #fff; }

:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
  border-radius: 4px;
}

.section-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}

.section-tag {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 14px;
}

.section-header { max-width: 640px; margin-bottom: 50px; }
.section-header h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); }
.section-subtitle { color: var(--text-muted); margin-top: 14px; font-size: 1.05rem; }

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

/* =========================================================
   Hero animations — dramatic entrance
========================================================= */
.hero-anim {
  opacity: 0;
  transform: translateY(32px);
}

.hero-anim.anim-1  { animation: heroIn 0.7s cubic-bezier(0.22,1,0.36,1) 0.1s forwards; }
.hero-anim.anim-2  { animation: heroIn 0.7s cubic-bezier(0.22,1,0.36,1) 0.25s forwards; }
.hero-anim.anim-3  { animation: heroIn 0.7s cubic-bezier(0.22,1,0.36,1) 0.4s forwards; }
.hero-anim.anim-4  { animation: heroIn 0.7s cubic-bezier(0.22,1,0.36,1) 0.55s forwards; }
.hero-anim.anim-5  { animation: heroIn 0.8s cubic-bezier(0.22,1,0.36,1) 0.7s forwards; }
.hero-anim.anim-6  { animation: heroIn 0.8s cubic-bezier(0.22,1,0.36,1) 0.9s forwards; }

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

/* Typewriter cursor */
.typewriter-cursor {
  display: inline-block;
  color: var(--accent-2);
  font-weight: 300;
  margin-left: 2px;
  animation: cursorBlink 0.75s step-end infinite;
}
@keyframes cursorBlink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* hero-role empty placeholder height */
#hero-role-text:empty { min-height: 1.6em; }

/* Stat suffix inline */
.stat-number-row { display: inline-flex; align-items: baseline; }
.stat-suffix {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 800;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

@media (prefers-reduced-motion: reduce) {
  .hero-anim { animation: none !important; opacity: 1 !important; transform: none !important; }
  .typewriter-cursor { animation: none; }
}

/* =========================================================
   Reveal / fade utility animations
========================================================= */
.fade-in {
  opacity: 0;
  transform: translateY(16px);
  animation: fadeInUp 0.8s ease forwards;
}
.delay-1 { animation-delay: 0.08s; }
.delay-2 { animation-delay: 0.16s; }
.delay-3 { animation-delay: 0.24s; }
.delay-4 { animation-delay: 0.32s; }
.delay-5 { animation-delay: 0.4s; }

@keyframes fadeInUp {
  to { opacity: 1; transform: translateY(0); }
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .fade-in, .reveal { animation: none !important; transition: none !important; opacity: 1 !important; transform: none !important; }
  html { scroll-behavior: auto; }
}

/* =========================================================
   Buttons
========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 26px;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease;
  white-space: nowrap;
}
.hero-cta .btn { transition: transform 0.15s ease-out, box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease; }
.hero-cta .btn:not(:hover) { transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease; }

.btn-primary {
  background: var(--accent-gradient);
  color: #fff;
  box-shadow: 0 6px 20px rgba(124, 108, 246, 0.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(124, 108, 246, 0.45); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--border-hover); background: var(--surface); }

.btn-full { width: 100%; justify-content: center; }

.btn-nav { padding: 10px 20px; font-size: 0.88rem; }

/* =========================================================
   Barra de progreso de lectura
========================================================= */
#read-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: var(--accent-gradient);
  z-index: 2000;
  transition: width 0.1s linear;
  border-radius: 0 2px 2px 0;
  box-shadow: 0 0 8px rgba(124, 108, 246, 0.6);
}

/* =========================================================
   Navbar
========================================================= */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(10, 10, 15, 0.7);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background 0.3s ease;
}
.navbar.scrolled {
  border-bottom-color: var(--border);
  background: rgba(10, 10, 15, 0.92);
}

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

.logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.logo-shield {
  width: 32px;
  height: 37px;
  flex-shrink: 0;
  transition: transform 0.25s ease;
}
.logo:hover .logo-shield { transform: scale(1.08); }
.logo-text { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; }
.logo-dot { color: var(--accent-2); }
.footer .logo-shield { width: 28px; height: 32px; }
.footer .logo-text { font-size: 1.05rem; }

.nav-links {
  display: flex;
  gap: 32px;
  align-items: center;
}
.nav-links a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s ease;
  position: relative;
}
.nav-links a:hover { color: var(--text); }

.nav-links a.nav-active {
  color: var(--text);
}
.nav-links a.nav-active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  border-radius: 99px;
  background: var(--accent-gradient);
  animation: navUnderlineIn 0.25s ease forwards;
}
@keyframes navUnderlineIn {
  from { transform: scaleX(0); opacity: 0; }
  to   { transform: scaleX(1); opacity: 1; }
}

.nav-actions { display: flex; align-items: center; gap: 16px; }

.lang-toggle {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 6px 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-faint);
}
.lang-toggle .lang-option { transition: color 0.2s ease; padding: 2px 4px; }
.lang-toggle .lang-option.active { color: var(--accent-2); }
.lang-sep { color: var(--border-hover); }

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.3rem;
  cursor: pointer;
  min-width: 32px;
  min-height: 32px;
  align-items: center;
  justify-content: center;
}

@media (max-width: 880px) {
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #08080d;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    transform: translateY(-8px) scaleY(0.98);
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.25s ease, visibility 0.25s ease;
    transform-origin: top;
  }
  .nav-links.active {
    transform: translateY(0) scaleY(1);
    visibility: visible;
    pointer-events: auto;
  }
  .nav-links li { width: 100%; }
  .nav-links a {
    display: block;
    padding: 14px 32px;
    width: 100%;
  }
  .btn-nav { display: none; }
  .menu-toggle { display: flex; }
}

/* =========================================================
   Hero
========================================================= */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 140px 24px 80px;
  overflow: hidden;
}

.hero-particles {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.hero-glow {
  position: absolute;
  top: -20%;
  left: 50%;
  width: 1300px;
  height: 900px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at 50% 25%, rgba(124, 108, 246, 0.45) 0%, rgba(192, 132, 252, 0.18) 35%, transparent 65%);
  filter: blur(8px);
  pointer-events: none;
  z-index: 0;
  transition: background 0.4s ease;
  animation: heroGlowDrift 14s ease-in-out infinite alternate;
}

@keyframes heroGlowDrift {
  from { transform: translateX(-50%) translateY(0) scale(1); }
  to   { transform: translateX(-53%) translateY(18px) scale(1.06); }
}

/* Fondo aurora: manchas de color moviéndose lento detrás de las partículas */
.hero-aurora {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.aurora-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.55;
  will-change: transform;
}
.aurora-blob.blob-1 {
  top: -10%;
  left: 8%;
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(124, 108, 246, 0.5), transparent 70%);
  animation: auroraDrift1 22s ease-in-out infinite alternate;
}
.aurora-blob.blob-2 {
  top: 30%;
  right: 5%;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(192, 132, 252, 0.4), transparent 70%);
  animation: auroraDrift2 18s ease-in-out infinite alternate;
}
.aurora-blob.blob-3 {
  bottom: -15%;
  left: 35%;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(108, 140, 246, 0.35), transparent 70%);
  animation: auroraDrift3 26s ease-in-out infinite alternate;
}

@keyframes auroraDrift1 {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(70px, 50px) scale(1.15); }
}
@keyframes auroraDrift2 {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(-60px, 40px) scale(1.1); }
}
@keyframes auroraDrift3 {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(40px, -60px) scale(1.2); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-glow, .aurora-blob { animation: none !important; }
}

/* En mobile: menos blobs y menos blur, para no forzar la GPU de gama baja */
@media (max-width: 768px) {
  .aurora-blob { filter: blur(60px); opacity: 0.4; }
  .aurora-blob.blob-3 { display: none; }
}

/* =========================================================
   Marquee de tecnologías
   ========================================================= */
.tech-marquee {
  position: relative;
  overflow: hidden;
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 18px 0;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.tech-marquee-track {
  display: flex;
  align-items: center;
  gap: 14px;
  width: max-content;
  animation: marqueeScroll 32s linear infinite;
}
.tech-marquee-track span {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-faint);
  white-space: nowrap;
}
.tech-marquee-track span:nth-child(2n) {
  color: var(--accent-2);
  font-size: 0.7rem;
}

@keyframes marqueeScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .tech-marquee-track { animation: none; }
  .tech-marquee { overflow-x: auto; }
}


/* segundo orbe de color */
.hero::before {
  content: "";
  position: absolute;
  top: 5%;
  left: 25%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(124, 108, 246, 0.15), transparent 65%);
  filter: blur(60px);
  pointer-events: none;
  z-index: 0;
  animation: orbFloat 8s ease-in-out infinite alternate;
}

@keyframes orbFloat {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(60px, -40px) scale(1.15); }
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: radial-gradient(circle at 50% 35%, rgba(0,0,0,0.5), transparent 65%);
  pointer-events: none;
  z-index: 0;
}

.hero-content { position: relative; z-index: 1; max-width: 760px; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  border: 1px solid rgba(124, 108, 246, 0.35);
  color: var(--accent-2);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 28px;
}
.badge i { font-size: 0.75rem; }

.hero h1 {
  font-size: clamp(2.2rem, 5.5vw, 3.6rem);
  font-weight: 800;
  margin-bottom: 14px;
}
.hero h1 .highlight {
  display: block;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-top: 4px;
}

.shimmer-text {
  background: linear-gradient(
    100deg,
    #7c6cf6 30%,
    #f4f4f6 42%,
    #c084fc 48%,
    #7c6cf6 60%
  );
  background-size: 250% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmerMove 4.5s ease-in-out infinite;
}

@keyframes shimmerMove {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@media (prefers-reduced-motion: reduce) {
  .shimmer-text { animation: none; }
}

.hero-role {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.4vw, 1.4rem);
  color: var(--text);
  font-weight: 600;
  margin-bottom: 18px;
}

.hero-text {
  color: var(--text-muted);
  font-size: 1.08rem;
  max-width: 580px;
  margin: 0 auto 36px;
}

.hero-cta {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 56px;
}

.hero-stats {
  display: flex;
  gap: 48px;
  justify-content: center;
  flex-wrap: wrap;
}
.stat { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.stat-number {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 800;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat-label { font-size: 0.85rem; color: var(--text-faint); }

.scroll-cue {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-faint);
  font-size: 1rem;
  animation: bounce 2.4s ease infinite;
  z-index: 1;
}
@keyframes bounce {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 8px); }
}

/* =========================================================
   About
========================================================= */
.about { padding: 120px 0; background: var(--bg-alt); }

.about-grid {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 72px;
  align-items: center;
}

.about-image-wrap { position: relative; }
.about-image-glow {
  position: absolute;
  top: -20px; left: -20px; right: -20px; bottom: -20px;
  background: var(--accent-gradient);
  opacity: 0.18;
  filter: blur(40px);
  border-radius: var(--radius-lg);
  z-index: 0;
}
.about-image {
  position: relative;
  z-index: 1;
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}
.about-location {
  position: relative;
  z-index: 1;
  margin-top: 18px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  color: var(--text-muted);
}
.about-location i { color: var(--accent-2); }

.about-content h2 { font-size: clamp(1.8rem, 3vw, 2.3rem); margin-bottom: 22px; }
.about-text { color: var(--text-muted); margin-bottom: 16px; font-size: 1.02rem; }

.about-highlights {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 32px;
}
.highlight-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color 0.25s ease, transform 0.25s ease;
}
.highlight-card:hover { border-color: var(--border-hover); transform: translateY(-2px); }
.highlight-card i {
  font-size: 1.1rem;
  color: var(--accent-2);
  background: var(--accent-soft);
  width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}
.highlight-card h4 { font-size: 1rem; margin-bottom: 4px; }
.highlight-card p { font-size: 0.88rem; color: var(--text-faint); }

@media (max-width: 880px) {
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-image-wrap { max-width: 320px; margin: 0 auto; }
}

/* =========================================================
   Experience / Timeline
========================================================= */
.experience { padding: 120px 0; }

.timeline {
  position: relative;
  padding-left: 32px;
  border-left: 2px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.timeline-item { position: relative; }
.timeline-dot {
  position: absolute;
  left: -41px;
  top: 6px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--bg);
  border: 3px solid var(--accent-2);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.timeline-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
  transition: border-color 0.25s ease;
}
.timeline-card:hover { border-color: var(--border-hover); }

.timeline-card-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 6px;
}
.timeline-card-header h3 { font-size: 1.15rem; }
.timeline-date {
  font-size: 0.8rem;
  color: var(--accent-2);
  font-weight: 600;
  white-space: nowrap;
}
.timeline-company { color: var(--text-faint); font-size: 0.9rem; margin-bottom: 14px; }
.timeline-desc { color: var(--text-muted); font-size: 0.98rem; margin-bottom: 18px; }

.timeline-tags { display: flex; gap: 10px; flex-wrap: wrap; }
.timeline-tags li {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  color: var(--accent-2);
}

/* =========================================================
   Education
========================================================= */
.education { padding: 100px 0; background: var(--bg-alt); }

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

.education-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
  position: relative;
  transition: border-color 0.25s ease, transform 0.25s ease;
}
.education-card:hover { border-color: var(--border-hover); transform: translateY(-3px); }

.education-icon {
  width: 46px; height: 46px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent-2);
  font-size: 1.2rem;
  margin-bottom: 18px;
}

.education-date {
  position: absolute;
  top: 28px;
  right: 28px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-faint);
  background: var(--surface-2);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

.education-card h4 { font-size: 1.05rem; margin-bottom: 8px; line-height: 1.3; }
.education-place { font-size: 0.9rem; color: var(--text-muted); }

@media (max-width: 880px) {
  .education-grid { grid-template-columns: 1fr; }
  .education-date { position: static; display: inline-block; margin-bottom: 12px; }
}

/* =========================================================
   Skills
========================================================= */
.skills { padding: 100px 0; background: var(--bg-alt); }

.skills-groups {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.skills-group-title {
  font-size: 0.95rem;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  margin-bottom: 18px;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
}

.skill-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 26px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}
.skill-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  background: var(--surface-2);
}
.skill-card i { font-size: 1.8rem; color: var(--accent-2); }
.skill-card span { font-size: 0.88rem; font-weight: 500; color: var(--text-muted); }

/* Stack principal — destacado por defecto, no solo en hover */
.skill-card.featured {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.skill-card.featured i { color: var(--accent-2); }
.skill-card.featured span { color: var(--text); font-weight: 600; }
.skill-card.featured::after {
  content: '';
  position: absolute;
  top: 10px;
  right: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-2);
}

/* =========================================================
   Projects
========================================================= */
.projects { padding: 120px 0; }

.projects-subhead {
  font-size: 1.1rem;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  margin: 48px 0 24px;
}
.projects-subhead:first-of-type { margin-top: 0; }

.project-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  perspective: 1400px;
}

.project-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transform-style: preserve-3d;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.project-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-glow);
}
/* Fallback translateY hover for devices without JS tilt (e.g. reduced motion, no fine pointer) */
.no-tilt .project-card:hover {
  transform: translateY(-6px);
}

/* Entrada escalonada con leve profundidad — se suma al .reveal existente */
.project-card.reveal { transform: translateY(24px) rotateX(6deg); }
.project-card.reveal.is-visible { transform: translateY(0) rotateX(0); }
.project-cards .project-card:nth-child(1) { transition-delay: 0s; }
.project-cards .project-card:nth-child(2) { transition-delay: 0.08s; }
.project-cards .project-card:nth-child(3) { transition-delay: 0.16s; }
.project-cards .project-card:nth-child(4) { transition-delay: 0.24s; }
.project-cards .project-card:nth-child(5) { transition-delay: 0.32s; }

/* Brillo que sigue el cursor, activado por JS (tilt.js) via clase is-tilting */
.card-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 30%), var(--accent-soft), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 2;
}
.project-card.is-tilting .card-glow { opacity: 1; }

.project-image { aspect-ratio: 16/9; overflow: hidden; background: var(--surface-2); transform: translateZ(24px); }
.project-image img {
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0;
  filter: blur(16px);
  transform: scale(1.06);
  transition: opacity 0.5s ease, filter 0.6s ease, transform 0.6s ease;
}
.project-image.loaded img { opacity: 1; filter: blur(0); transform: scale(1); }
.project-card:hover .project-image.loaded img { transform: scale(1.04); }
.project-body { transform: translateZ(36px); }

.project-image-placeholder {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--surface-2), var(--surface));
}
.project-image-placeholder i { font-size: 2.6rem; color: var(--accent-2); opacity: 0.6; }

.project-body { padding: 26px; }
.project-body h4 { font-size: 1.2rem; margin-bottom: 10px; }
.project-body p { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 18px; }

.project-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.project-tags span {
  font-size: 0.76rem;
  font-weight: 600;
  padding: 4px 11px;
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-faint);
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent-2);
  transition: gap 0.2s ease;
}
.project-link:hover { gap: 12px; }

.project-grid-small {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.mini-project {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: border-color 0.25s ease, transform 0.25s ease;
}
.mini-project:hover { border-color: var(--border-hover); transform: translateY(-3px); }
.mini-project-icon {
  width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent-2);
  margin-bottom: 16px;
  font-size: 1.1rem;
}
.mini-project h5 { font-size: 1rem; margin-bottom: 8px; }
.mini-project p { font-size: 0.86rem; color: var(--text-faint); margin-bottom: 16px; min-height: 40px; }
.mini-link { font-size: 0.85rem; font-weight: 600; color: var(--accent-2); display: inline-flex; align-items: center; gap: 6px; }

@media (max-width: 880px) {
  /* Carrusel swipeable tipo Stories, en vez de columna apilada */
  .project-cards {
    display: flex;
    grid-template-columns: none;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scroll-padding-inline: 8%;
    padding-inline: 8%;
    padding-bottom: 4px;
    gap: 16px;
    perspective: none; /* el tilt de mouse no aplica en mobile */
  }
  .project-cards::-webkit-scrollbar { display: none; }
  .project-cards { scrollbar-width: none; -ms-overflow-style: none; }

  .project-cards .project-card {
    flex: 0 0 84%;
    scroll-snap-align: center;
  }

  .carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 18px;
  }
  .carousel-dots button {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--border-hover);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: background 0.25s ease, width 0.25s ease;
  }
  .carousel-dots button.active {
    background: var(--accent-2);
    width: 20px;
    border-radius: var(--radius-pill);
  }

  .project-grid-small { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 881px) {
  .carousel-dots { display: none; }
}
@media (max-width: 560px) {
  .project-grid-small { grid-template-columns: 1fr; }
}

/* =========================================================
   Contact
========================================================= */
.contact { padding: 120px 0; background: var(--bg-alt); }

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

.contact-text { color: var(--text-muted); margin-top: 16px; margin-bottom: 36px; max-width: 440px; }

.contact-methods { display: flex; flex-direction: column; gap: 14px; margin-bottom: 32px; }
.contact-method {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  color: var(--text);
  transition: border-color 0.25s ease, transform 0.25s ease;
}
a.contact-method:hover { border-color: var(--accent); transform: translateX(4px); }
.contact-method i { color: var(--accent-2); font-size: 1.05rem; width: 22px; text-align: center; }

.contact-method-email { justify-content: space-between; gap: 10px; }
.contact-method-email:hover { border-color: var(--accent); }
.contact-method-link {
  display: flex;
  align-items: center;
  gap: 14px;
  color: inherit;
  text-decoration: none;
  min-width: 0;
  flex: 1;
}
.contact-method-link span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.copy-email-btn {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.85rem;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}
.copy-email-btn:hover { border-color: var(--accent); color: var(--accent-2); background: var(--accent-soft); }
.copy-email-btn.copied { color: var(--accent-2); border-color: var(--accent); }

.contact-socials { display: flex; gap: 14px; }
.contact-socials a {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 1.1rem;
  transition: border-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}
.contact-socials a:hover { border-color: var(--accent); color: var(--accent-2); transform: translateY(-3px); }

.contact-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-flash {
  background: var(--accent-soft);
  border: 1px solid rgba(124,108,246,0.35);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 0.9rem;
  color: var(--accent-2);
}

.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-group label { font-size: 0.85rem; font-weight: 600; color: var(--text-muted); }
.form-group input,
.form-group textarea {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  font-family: var(--font-body);
  font-size: 0.96rem;
  color: var(--text);
  resize: vertical;
  transition: border-color 0.25s ease;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.field-error {
  display: none;
  font-size: 0.82rem;
  color: #f87171;
  margin-top: -2px;
}
.form-group.invalid input,
.form-group.invalid textarea {
  border-color: #f87171;
}
.form-group.invalid .field-error {
  display: block;
}

@media (max-width: 880px) {
  .contact-grid { grid-template-columns: 1fr; gap: 48px; }
}

/* =========================================================
   Footer
========================================================= */
.footer { padding: 40px 0; border-top: 1px solid var(--border); }
.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
}
.footer-socials { display: flex; gap: 18px; }
.footer-socials a { color: var(--text-faint); font-size: 1.2rem; transition: color 0.2s ease; }
.footer-socials a:hover { color: var(--accent-2); }
.copyright { font-size: 0.85rem; color: var(--text-faint); }

/* =========================================================
   WhatsApp float
========================================================= */
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  background: var(--accent-gradient);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  box-shadow: 0 6px 24px rgba(124, 108, 246, 0.5), 0 0 0 0 rgba(124, 108, 246, 0.4);
  z-index: 900;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  animation: wppPulse 2.8s ease-in-out infinite;
}
.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 30px rgba(124, 108, 246, 0.65), 0 0 0 0 rgba(124, 108, 246, 0);
  animation: none;
}
@keyframes wppPulse {
  0%   { box-shadow: 0 6px 24px rgba(124,108,246,0.5), 0 0 0 0 rgba(124,108,246,0.4); }
  60%  { box-shadow: 0 6px 24px rgba(124,108,246,0.5), 0 0 0 14px rgba(124,108,246,0); }
  100% { box-shadow: 0 6px 24px rgba(124,108,246,0.5), 0 0 0 0 rgba(124,108,246,0); }
}

/* =========================================================
   Responsive base
========================================================= */
@media (max-width: 540px) {
  .section-inner { padding: 0 20px; }
  .hero { padding: 120px 20px 70px; }
  .hero-stats { gap: 28px; }
  .about, .experience, .skills, .projects, .contact { padding: 80px 0; }
  .contact-form { padding: 24px; }
  .timeline { padding-left: 24px; }
  .timeline-dot { left: -33px; }
}

/* =========================================================
   Anillo animado en la foto de perfil
========================================================= */
.about-image-ring {
  position: relative;
  z-index: 1;
  border-radius: var(--radius-lg);
  padding: 4px;
  background: linear-gradient(var(--bg-alt), var(--bg-alt)) padding-box,
              linear-gradient(135deg, #7c6cf6, #c084fc, #7c6cf6, #c084fc) border-box;
  background-size: 300% 300%;
  border: 3px solid transparent;
  animation: ringRotate 4s linear infinite;
}
@keyframes ringRotate {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.about-image-ring .about-image {
  border: none;
  display: block;
}

/* =========================================================
   Botón volver arriba
========================================================= */
#back-to-top {
  position: fixed;
  bottom: 90px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 900;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease, background 0.2s ease, border-color 0.2s ease;
}
#back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
#back-to-top:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-2);
}

/* =========================================================
   Toast de confirmación
========================================================= */
#toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #15151f;
  border: 1px solid #22c55e;
  color: #4ade80;
  padding: 14px 24px;
  border-radius: var(--radius-pill);
  font-size: 0.92rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 3000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s ease;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4), 0 0 0 1px rgba(34,197,94,0.2);
  white-space: nowrap;
}
#toast.toast-error {
  border-color: #ef4444;
  color: #f87171;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4), 0 0 0 1px rgba(239,68,68,0.2);
}
#toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

/* =========================================================
   Mejoras mobile
========================================================= */

/* Fix: separar WhatsApp y botón volver arriba */
.whatsapp-float { bottom: 24px; right: 24px; }
#back-to-top    { bottom: 88px; right: 24px; }

/* Botón llamar — solo en mobile */
.mobile-only { display: none; }
@media (max-width: 768px) {
  .mobile-only { display: flex; }
}

/* Skills: 3 columnas compactas en mobile */
@media (max-width: 600px) {
  .skills-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }
  .skill-card {
    padding: 16px 8px;
    gap: 8px;
  }
  .skill-card i  { font-size: 1.4rem; }
  .skill-card span { font-size: 0.75rem; }
}

/* =========================================================
   Overlay menú mobile
========================================================= */
#nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(4px);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
}
#nav-overlay.active {
  display: block;
  opacity: 1;
}

/* Menú mobile con fondo sólido y animación en cascada */
@media (max-width: 880px) {
  .nav-links {
    background: #0d0d14 !important;
    border-bottom: 1px solid var(--border);
    z-index: 1001;
  }
  .nav-links li {
    opacity: 0;
    transform: translateX(-12px);
    transition: opacity 0.25s ease, transform 0.25s ease;
  }
  .nav-links.active li { opacity: 1; transform: translateX(0); }
  .nav-links.active li:nth-child(1) { transition-delay: 0.05s; }
  .nav-links.active li:nth-child(2) { transition-delay: 0.1s;  }
  .nav-links.active li:nth-child(3) { transition-delay: 0.15s; }
  .nav-links.active li:nth-child(4) { transition-delay: 0.2s;  }
  .nav-links.active li:nth-child(5) { transition-delay: 0.25s; }
  .nav-links.active li:nth-child(6) { transition-delay: 0.3s;  }

  /* Ícono hamburguesa → X al abrir */
  .menu-toggle.open .fa-bars::before { content: "\f00d"; }
}

/* =========================================================
   Barra CTA fija mobile
========================================================= */
#mobile-cta {
  display: none;
}
@media (max-width: 768px) {
  #mobile-cta {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 890;
    background: #0d0d14;
    border-top: 1px solid var(--border);
    padding: 10px 16px 14px;
    gap: 10px;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.22,1,0.36,1);
  }
  #mobile-cta.visible {
    transform: translateY(0);
  }
  .mobile-cta-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 10px 6px;
    border-radius: var(--radius-md);
    font-size: 0.72rem;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }
  .mobile-cta-btn:active { transform: scale(0.95); opacity: 0.8; }
  .mobile-cta-btn i { font-size: 1.1rem; }
  .mobile-cta-call {
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--text-muted);
  }
  .mobile-cta-wpp {
    background: linear-gradient(135deg, #7c6cf6, #c084fc);
    color: #fff;
    box-shadow: 0 4px 14px rgba(124,108,246,0.4);
  }
  .mobile-cta-contact {
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--text-muted);
  }

  /* Espacio extra abajo para que la barra CTA no tape contenido */
  body { padding-bottom: 80px; }

  /* WhatsApp float y back-to-top suben cuando la barra CTA está visible */
  .whatsapp-float { bottom: 96px; }
  #back-to-top    { bottom: 160px; }
}

/* Botón llamar — acento verde teléfono */
.contact-call {
  border-color: rgba(74, 222, 128, 0.3) !important;
  color: #4ade80 !important;
}
.contact-call i { color: #4ade80; }
.contact-call:hover {
  border-color: #4ade80 !important;
  background: rgba(74, 222, 128, 0.08) !important;
  transform: translateX(4px);
}

/* =========================================================
   Sección ¿Por qué yo?
========================================================= */
.why-me { padding: 120px 0; background: var(--bg); }

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

.why-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}
.why-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--accent-gradient);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.why-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}
.why-card:hover::before { opacity: 1; }

.why-card-featured {
  border-color: rgba(124,108,246,0.3);
  background: linear-gradient(135deg, var(--surface) 0%, rgba(124,108,246,0.06) 100%);
}
.why-card-featured::before { opacity: 0.6; }

.why-icon {
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent-2);
  font-size: 1.2rem;
  margin-bottom: 20px;
}
.why-card-featured .why-icon {
  background: var(--accent-gradient);
  color: #fff;
}

.why-card h3 {
  font-size: 1.1rem;
  margin-bottom: 12px;
  color: var(--text);
}
.why-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.65;
}

@media (max-width: 768px) {
  .why-grid { grid-template-columns: 1fr; gap: 16px; }
  .why-me { padding: 80px 0; }
  .why-card { padding: 24px; }
}

/* =========================================================
   Skill badge de especialidad
========================================================= */
.skill-card { position: relative; }

.skill-featured {
  border-color: rgba(124,108,246,0.4) !important;
  background: linear-gradient(135deg, var(--surface) 0%, rgba(124,108,246,0.08) 100%) !important;
}
.skill-featured i { color: var(--accent-2); }

.skill-badge {
  position: absolute;
  top: -1px; right: -1px;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 3px 7px;
  background: var(--accent-gradient);
  color: #fff;
  border-radius: 0 var(--radius-md) 0 var(--radius-sm);
  text-transform: uppercase;
}

/* Fix: why-grid con 3 cards → 3 columnas */
.why-grid { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .why-grid { grid-template-columns: 1fr; } }

/* En mobile: ocultar WhatsApp flotante y botón arriba (ya están en la barra CTA) */
@media (max-width: 768px) {
  .whatsapp-float { display: none; }
  #back-to-top { display: none; }
}

/* Ocultar iconos de redes sociales en contacto en mobile (solo se ven en el footer) */
@media (max-width: 768px) {
  .contact-socials { display: none; }
}

/* Barra CTA con 2 botones: que ocupen el ancho bien */
@media (max-width: 768px) {
  #mobile-cta { gap: 12px; }
  .mobile-cta-wpp { flex: 1.5; }
  .mobile-cta-contact { flex: 1; }
}

/* =========================================================
   Modal de detalle de proyecto
   ========================================================= */

.project-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.project-detail-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 9px 18px;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease, gap 0.2s ease;
}
.project-detail-btn:hover {
  border-color: var(--accent);
  color: var(--accent-2);
  background: var(--accent-soft);
  gap: 11px;
}

.project-modal {
  position: fixed;
  inset: 0;
  z-index: 1500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.project-modal.is-open { opacity: 1; pointer-events: auto; }

.project-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 8, 12, 0.72);
  backdrop-filter: blur(4px);
}

.project-modal-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 640px;
  max-height: 88vh;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transform: translateY(24px) scale(0.98);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.16, 0.8, 0.3, 1), opacity 0.3s ease;
}
.project-modal.is-open .project-modal-panel {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.project-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(6, 8, 12, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}
.project-modal-close:hover { background: rgba(6, 8, 12, 0.8); transform: rotate(90deg); }

.project-modal-media { aspect-ratio: 16/9; overflow: hidden; background: var(--surface-2); }
.project-modal-media img { width: 100%; height: 100%; object-fit: cover; display: block; }

.project-modal-body { padding: 28px 32px 32px; }
.project-modal-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.project-modal-tags span {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.project-modal-body h3 { font-size: 1.5rem; margin-bottom: 20px; }

.project-modal-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 6px;
}
.project-modal-text {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 22px;
}

.project-modal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 0;
  margin-bottom: 18px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.project-modal-nav-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 2px;
  transition: color 0.2s ease, gap 0.2s ease;
}
.project-modal-nav-btn:hover { color: var(--accent-2); gap: 10px; }
.project-modal-nav-btn:disabled {
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
}
.project-modal-counter {
  font-family: var(--font-body);
  font-size: 0.78rem;
  color: var(--text-faint);
  white-space: nowrap;
}

.project-modal-body .btn { margin-top: 4px; }

@media (max-width: 600px) {
  .project-modal { padding: 0; align-items: flex-end; }
  .project-modal-panel {
    max-width: none;
    max-height: 92vh;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    transform: translateY(100%);
  }
  .project-modal.is-open .project-modal-panel { transform: translateY(0); }
  .project-modal-body { padding: 24px 20px 28px; }
}

@media (prefers-reduced-motion: reduce) {
  .project-modal, .project-modal-panel { transition: none !important; }
}

/* =========================================================
   Títulos con palabra acentuada (cursiva serif + degradado)
========================================================= */
h2 em {
  font-family: 'Instrument Serif', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: 1.12em;
  letter-spacing: 0;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  padding-right: 0.06em; /* evita que se corte la cola de la cursiva */
}
.live-demo-text h3 em { font-family: 'Instrument Serif', Georgia, serif; font-style: italic; font-weight: 400; font-size: 1.12em;
  background: var(--accent-gradient); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent; padding-right: 0.06em; }

/* =========================================================
   Números 01 / 02 / 03 + brillo de cursor en "¿Por qué yo?"
========================================================= */
.why-num {
  position: absolute;
  top: 14px; right: 22px;
  font-family: var(--font-display);
  font-size: 3.4rem;
  font-weight: 800;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(167, 139, 250, 0.28);
  pointer-events: none;
  transition: -webkit-text-stroke-color 0.3s ease, transform 0.3s ease;
}
.why-card:hover .why-num { -webkit-text-stroke-color: rgba(167, 139, 250, 0.6); transform: translateY(-2px); }
.why-card::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(320px circle at var(--mx, 50%) var(--my, 30%), var(--accent-soft), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.why-card:hover::after { opacity: 1; }

/* =========================================================
   Bloque "Así funciona" con chat animado
========================================================= */
.live-demo {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
  padding: 40px;
  margin-bottom: 64px;
  background: linear-gradient(135deg, var(--surface) 0%, rgba(124,108,246,0.07) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.live-badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent-2);
  padding: 6px 12px;
  border: 1px solid rgba(124,108,246,0.3);
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  margin-bottom: 18px;
}
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: #25d366; box-shadow: 0 0 0 0 rgba(37,211,102,.6); animation: livePulse 1.8s infinite; }
@keyframes livePulse { 70% { box-shadow: 0 0 0 8px rgba(37,211,102,0); } 100% { box-shadow: 0 0 0 0 rgba(37,211,102,0); } }
.live-demo-text h3 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin-bottom: 14px; }
.live-demo-text p { color: var(--text-muted); line-height: 1.7; }
.live-steps { margin-top: 20px; display: grid; gap: 10px; }

@media (prefers-reduced-motion: reduce) {
  .live-dot { animation: none !important; }
}

/* Mobile */
@media (max-width: 860px) {
  .live-demo { grid-template-columns: 1fr; gap: 32px; padding: 28px 22px; margin-bottom: 48px; }
}
@media (max-width: 480px) {
  .live-demo { padding: 24px 16px; border-radius: 18px; }
  .why-num { font-size: 2.6rem; top: 12px; right: 16px; }
  .why-card { padding-top: 28px; }
  h2 em { font-size: 1.08em; }
}

/* =========================================================
   Recorrido animado: ventana de navegador + 4 escenas
========================================================= */
.live-demo { grid-template-columns: 0.85fr 1.15fr; }
.live-steps { list-style: none; margin-top: 22px; display: grid; gap: 6px; }
.flow-step {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 10px 12px; text-align: left;
  font: inherit; font-size: 0.95rem; color: var(--text-muted);
  background: transparent; border: 1px solid transparent; border-radius: 12px;
  cursor: pointer; transition: background .25s, border-color .25s, color .25s;
}
.flow-step b {
  width: 26px; height: 26px; flex: none;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; font-size: 0.75rem; font-weight: 700;
  border: 1px solid var(--border-hover); color: var(--text-muted);
  transition: background .25s, color .25s, border-color .25s;
}
.flow-step:hover { color: var(--text); }
.flow-step.active { background: var(--accent-soft); border-color: rgba(124,108,246,.35); color: var(--text); }
.flow-step.active b { background: var(--accent-gradient); border-color: transparent; color: #fff; }

.flow-wrap { width: 100%; max-width: 600px; justify-self: center; }
.flow-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  overflow: hidden; box-shadow: var(--shadow-soft), var(--shadow-glow);
}
.browser-bar { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.browser-dots { display: flex; gap: 6px; }
.browser-dots i { width: 9px; height: 9px; border-radius: 50%; background: #3a3a4d; }
.browser-dots i:nth-child(1) { background: #ff5f57; } .browser-dots i:nth-child(2) { background: #febc2e; } .browser-dots i:nth-child(3) { background: #28c840; }
.browser-url { flex: 1; text-align: center; font-size: 0.75rem; color: var(--text-muted); background: var(--bg-alt); border-radius: 999px; padding: 4px 12px; }
.browser-url i { font-size: 0.65rem; margin-right: 4px; color: #28c840; }

.flow-stage { position: relative; height: 300px; overflow: hidden; background: #fdf6f4; }
.scene { position: absolute; inset: 0; display: none; padding: 18px 20px; color: #3a2a30; font-family: var(--font-body); }
.scene.active { display: block; animation: sceneIn .4s ease both; }
@keyframes sceneIn { from { opacity: 0; } to { opacity: 1; } }
.sc-title { font-family: Georgia, 'Times New Roman', serif; font-size: 1.25rem; font-weight: 600; margin-bottom: 14px; color: #3a2a30; }

/* Escena 1: captura real */
.scene-1 { padding: 0; }
.shot { position: relative; height: 100%; aspect-ratio: 1906 / 914; }
.shot img { width: 100%; height: 100%; display: block; }
.cursor { position: absolute; z-index: 5; pointer-events: none; margin: -2px 0 0 -4px; filter: drop-shadow(0 2px 3px rgba(0,0,0,.3)); }
.scene-1 .cursor { left: 25.5%; top: 70%; }
.scene-1.active .cursor { animation: cur1 2.4s cubic-bezier(.4,0,.2,1) both; }
@keyframes cur1 { 0% { left: 80%; top: 105%; opacity: 0; } 12% { opacity: 1; } 100% { left: 25.5%; top: 70%; opacity: 1; } }
.btn-ring { position: absolute; left: 25.5%; top: 70%; width: 30px; height: 30px; margin: -15px 0 0 -15px; border-radius: 50%; border: 2px solid #b8456b; opacity: 0; z-index: 4; }
.scene-1.active .btn-ring { animation: ring .9s 2.4s ease-out both; }
@keyframes ring { 0% { opacity: .9; transform: scale(.3); } 100% { opacity: 0; transform: scale(2.6); } }

/* Escena 2: planes */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.plan { position: relative; padding: 16px 8px; text-align: center; background: #fff; border: 1.5px solid #eadbd7; border-radius: 12px; }
.plan b { display: block; font-size: 0.9rem; }
.plan small { color: #8a7379; font-size: 0.75rem; }
.plan-sel { border-color: #b8456b; background: #fbeaf0; box-shadow: 0 6px 18px rgba(184,69,107,.18); }
.plan-sel i { position: absolute; top: 7px; right: 8px; color: #b8456b; font-size: 0.9rem; }
.scene-2.active .plan-sel { animation: selIn .35s 1.5s both; }
.scene-2.active .plan-sel i { animation: popIn .3s 1.6s both; }
@keyframes selIn { from { border-color: #eadbd7; background: #fff; box-shadow: none; } }
@keyframes popIn { from { opacity: 0; transform: scale(0); } }
.sc-btn { margin: 16px auto 0; width: 60%; padding: 11px; text-align: center; font-weight: 600; font-size: 0.9rem; color: #fff; background: #b8456b; border-radius: 999px; }
.scene-2.active .sc-btn { animation: fadeUp .4s .6s both, press .3s 3.3s; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } }
@keyframes press { 50% { transform: scale(.93); } }
.c2 { left: 50%; top: 56%; }
.scene-2.active .c2 { animation: cur2 4s cubic-bezier(.4,0,.2,1) both; }
@keyframes cur2 { 0% { left: 90%; top: 105%; opacity: 0; } 8% { opacity: 1; } 30%, 50% { left: 50%; top: 56%; } 72%, 100% { left: 55%; top: 84%; opacity: 1; } }

/* Escena 3: pago */
.pay-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pay { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 8px; font-size: 0.85rem; font-weight: 600; background: #fff; border: 1.5px solid #eadbd7; border-radius: 12px; }
.pay i { font-size: 1.15rem; color: #b8456b; }
.pay-mp { border-color: #009ee3; }
.scene-3.active .pay-mp { animation: press .3s 1.5s; }
.pay-status { display: grid; place-items: center; height: 60px; margin-top: 18px; font-weight: 600; font-size: 0.95rem; }
.pay-status > span { grid-area: 1 / 1; display: inline-flex; align-items: center; gap: 8px; }
.pay-status em { font-style: normal; }
.proc { color: #6b5a60; opacity: 0; }
.ok { color: #1f9d55; }
.scene-3.active .proc { animation: proc 1.5s 1.8s both; }
.scene-3.active .ok { animation: fadeUp .5s 3.4s both; }
@keyframes proc { 0% { opacity: 0; } 12%, 85% { opacity: 1; } 100% { opacity: 0; } }
.c3 { left: 27%; top: 44%; }
.scene-3.active .c3 { animation: cur3 2s cubic-bezier(.4,0,.2,1) both; }
@keyframes cur3 { 0% { left: 90%; top: 105%; opacity: 0; } 12% { opacity: 1; } 100% { left: 27%; top: 44%; opacity: 1; } }

/* Escena 4: portal */
.portal-head { display: flex; justify-content: space-between; align-items: center; padding-bottom: 10px; margin-bottom: 12px; border-bottom: 1px solid #eadbd7; font-family: Georgia, serif; font-weight: 600; }
.portal-av { width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: #b8456b; color: #fff; font-size: 0.7rem; }
.routine { list-style: none; display: grid; gap: 8px; }
.routine li { display: flex; align-items: center; gap: 10px; padding: 9px 12px; font-size: 0.85rem; background: #fff; border: 1px solid #eadbd7; border-radius: 10px; }
.routine li i { width: 20px; height: 20px; flex: none; display: flex; align-items: center; justify-content: center; border-radius: 50%; font-size: 0.6rem; background: #b8456b; color: #fff; }
.scene-4.active .routine li i { animation: popIn .3s both; }
.scene-4.active .routine li:nth-child(1) i { animation-delay: 1.2s; }
.scene-4.active .routine li:nth-child(2) i { animation-delay: 2s; }
.scene-4.active .routine li:nth-child(3) i { animation-delay: 2.9s; }
.prog { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.prog-bar { flex: 1; height: 7px; background: #eadbd7; border-radius: 99px; overflow: hidden; }
.prog-bar i { display: block; height: 100%; background: #b8456b; border-radius: 99px; }
.scene-4.active .prog-bar i { animation: fillBar 2.6s .5s linear both; }
@keyframes fillBar { from { width: 0; } }
.prog small { font-size: 0.72rem; color: #8a7379; }

.flow-bar { display: flex; gap: 4px; padding: 10px 14px; background: var(--surface-2); border-top: 1px solid var(--border); }
.flow-bar i { position: relative; flex: 1; height: 3px; border-radius: 3px; background: var(--border-hover); overflow: hidden; }
.flow-bar i::after { content: ''; position: absolute; inset: 0; background: var(--accent-gradient); transform: scaleX(0); transform-origin: left; }
.flow-bar i.done::after { transform: scaleX(1); }
.flow-bar i.run::after { animation: barRun var(--scene-ms, 5s) linear forwards; }
@keyframes barRun { to { transform: scaleX(1); } }
.flow-caption { margin-top: 12px; text-align: center; font-size: 0.78rem; color: var(--text-faint); }

@media (prefers-reduced-motion: reduce) {
  .scene, .scene * { animation: none !important; }
  .flow-bar i.run::after { animation: none; transform: scaleX(1); }
}

@media (max-width: 860px) {
  .live-demo { grid-template-columns: 1fr; }
  .flow-wrap { max-width: 100%; }
}
@media (max-width: 480px) {
  .flow-stage { height: 288px; }
  .scene { padding: 14px 14px; }
  .sc-title { font-size: 1.1rem; margin-bottom: 10px; }
  .plan { padding: 12px 4px; } .plan b { font-size: 0.8rem; }
  .pay { padding: 12px 6px; font-size: 0.78rem; }
  .pay-status { margin-top: 12px; height: 50px; }
  .routine { gap: 6px; } .routine li { padding: 7px 10px; font-size: 0.8rem; }
  .portal-head { margin-bottom: 8px; padding-bottom: 8px; }
  .browser-bar { padding: 8px 10px; gap: 8px; }
}

/* =========================================================
   Intro de bienvenida (contador + cortina)
========================================================= */
.intro { display: none; }
.is-loading .intro, .intro.out { display: block; }
.intro { position: fixed; inset: 0; z-index: 10000; }
.is-loading body { overflow: hidden; }
.is-loading .hero-anim { animation-play-state: paused; }

.intro-panel { position: absolute; left: 0; right: 0; height: 50.2%; background: var(--bg); transition: transform 0.9s cubic-bezier(.76,0,.24,1) 0.3s; }
.intro-panel.top { top: 0; }
.intro-panel.bottom { bottom: 0; }
.intro.out .intro-panel.top { transform: translateY(-100%); }
.intro.out .intro-panel.bottom { transform: translateY(100%); }

.intro-center {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.intro.out .intro-center { opacity: 0; transform: scale(.94); }
.intro-center::before {
  content: ''; position: absolute; left: 50%; top: 50%; width: min(900px, 140vw); height: 520px; transform: translate(-50%, -50%);
  background: radial-gradient(ellipse at center, rgba(124,108,246,.28), transparent 65%); pointer-events: none; z-index: -1;
}
.intro-mark {
  font-family: var(--font-display); font-weight: 800; font-size: clamp(2.4rem, 10vw, 4.8rem); letter-spacing: -0.025em; line-height: 1.1; text-align: center; padding: 0 16px;
  background: var(--accent-gradient); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  animation: introMark 1.2s cubic-bezier(.22,1,.36,1) both;
}
@keyframes introMark { from { opacity: 0; transform: translateY(24px) scale(.9); filter: blur(8px); } }
.intro-count { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.4rem, 5vw, 2rem); color: var(--text); font-variant-numeric: tabular-nums; }
.intro-count small { color: var(--text-faint); font-size: .6em; margin-left: 2px; }
.intro-bar { width: min(220px, 55vw); height: 2px; background: var(--border); border-radius: 2px; overflow: hidden; }
.intro-bar i { display: block; height: 100%; background: var(--accent-gradient); transform: scaleX(0); transform-origin: left; }
.intro-sub { margin: 4px 0 18px; font-size: clamp(.95rem, 3.4vw, 1.1rem); color: var(--text-muted); text-align: center; padding: 0 24px; animation: introSub .9s .5s ease both; }
@keyframes introSub { from { opacity: 0; transform: translateY(10px); } }

/* =========================================================
   Título grande con revelado en máscara
========================================================= */
.hero-content { max-width: 940px; }
.hero h1 { font-size: clamp(2.2rem, 7.4vw, 5rem); line-height: 1.04; letter-spacing: -0.025em; }
.hero-greeting { display: block; overflow: hidden; padding-bottom: .08em; color: var(--text); }
.hero-greeting-in { display: inline-block; animation: maskUp 1s cubic-bezier(.22,1,.36,1) .25s both; }
.is-loading .hero-greeting-in { animation-play-state: paused; }
@keyframes maskUp { from { transform: translateY(105%); } }
.hero .hero-role { font-size: clamp(1.15rem, 2.8vw, 1.6rem); }

@media (prefers-reduced-motion: reduce) {
  .intro { display: none !important; }
  .hero-greeting-in { animation: none !important; }
}