/* ================================================================
   ELÍAS RICO PORTFOLIO — GLOBAL STYLES
   Dark glassmorphism · Reflect-inspired · Bento Grid
   Palette: #0B0F1A base · #EC4899 magenta · #6D28D9 purple · #A855F7 violet
   Fonts: Montserrat (titles) · Lato (body) · JetBrains Mono (labels)
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&family=Lato:wght@400;700&family=JetBrains+Mono:wght@400;500&display=swap');

/* ── RESET & BASE ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; overflow-x: hidden; max-width: 100%; }

body {
  background: #0B0F1A;
  color: #F8F8FF;
  font-family: 'Lato', sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  max-width: 100%;
}

/* ── CSS VARIABLES ───────────────────────────────────────────── */
:root {
  --base:         #0B0F1A;
  --base-2:       #0f1525;
  --purple:       #6D28D9;
  --violet:       #A855F7;
  --magenta:      #EC4899;
  --yellow:       #FBBF24;
  --gray-light:   #E5E7EB;
  --white:        #FFFFFF;
  --grad:         linear-gradient(135deg, #EC4899, #A855F7, #6D28D9);
  --grad-h:       linear-gradient(90deg, #EC4899, #6D28D9);
  --glass-bg:     rgba(255,255,255,0.04);
  --glass-bg-2:   rgba(255,255,255,0.07);
  --glass-border: rgba(255,255,255,0.10);
  --glass-top:    rgba(255,255,255,0.15);
  --blur:         blur(20px);
  --blur-sm:      blur(10px);
  --radius:       20px;
  --radius-sm:    12px;
  --shadow-z:     0 8px 40px rgba(0,0,0,0.5), 0 2px 8px rgba(0,0,0,0.3);
  --shadow-glow:  0 0 40px rgba(109,40,217,0.25);
  --transition:   all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── TYPOGRAPHY UTILITIES ────────────────────────────────────── */
.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.mono-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(168,85,247,0.7);
}

.eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #EC4899;
  margin-bottom: 12px;
  overflow-wrap: break-word;
  word-break: break-word;
}

.section-title {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 800;
  line-height: 1.15;
  color: #fff;
  margin-bottom: 16px;
  text-wrap: pretty;
}

.section-sub {
  font-size: clamp(15px, 1.8vw, 18px);
  line-height: 1.7;
  color: rgba(229,231,235,0.7);
  max-width: 680px;
  text-wrap: pretty;
}

/* ── GLASS CARDS ─────────────────────────────────────────────── */
.glass-card {
  background: var(--glass-bg-2);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--glass-border);
  border-top-color: var(--glass-top);
  border-radius: var(--radius);
  box-shadow: var(--shadow-z), var(--shadow-glow);
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

.glass-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(255,255,255,0.04) 0%, transparent 60%);
  pointer-events: none;
}

.glass-card:hover {
  border-color: rgba(168,85,247,0.3);
  box-shadow: var(--shadow-z), 0 0 60px rgba(109,40,217,0.4);
  transform: translateY(-2px);
}

.glass-card-subtle {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-top-color: rgba(255,255,255,0.10);
  border-radius: var(--radius-sm);
  backdrop-filter: var(--blur-sm);
  -webkit-backdrop-filter: var(--blur-sm);
}

/* ── BUTTONS ─────────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: linear-gradient(135deg, #EC4899, #6D28D9);
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 15px;
  border-radius: 999px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.btn-primary::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 999px;
  background: linear-gradient(135deg, #EC4899, #6D28D9);
  opacity: 0;
  filter: blur(12px);
  transition: opacity 0.3s;
  z-index: -1;
}

.btn-primary:hover::after { opacity: 0.8; }
.btn-primary:hover { transform: translateY(-1px); filter: brightness(1.1); }

.btn-halo {
  box-shadow: 0 0 24px rgba(236,72,153,0.4), 0 0 48px rgba(109,40,217,0.2);
}
.btn-halo:hover {
  box-shadow: 0 0 36px rgba(236,72,153,0.6), 0 0 72px rgba(109,40,217,0.4);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 27px;
  background: transparent;
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 15px;
  border-radius: 999px;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,0.2);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.btn-secondary:hover {
  border-color: rgba(168,85,247,0.6);
  background: rgba(168,85,247,0.08);
  transform: translateY(-1px);
}

.btn-sm { padding: 9px 18px; font-size: 13px; }
.btn-lg { padding: 16px 36px; font-size: 16px; }

/* ── NAV ─────────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  transition: var(--transition);
  padding: 0 24px;
}

.nav-scrolled {
  background: rgba(11,15,26,0.85);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 4px 30px rgba(0,0,0,0.4);
}

.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 24px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.nav-name {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 16px;
  color: #fff;
  letter-spacing: -0.01em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-link {
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
  font-size: 14px;
  color: rgba(229,231,235,0.7);
  text-decoration: none;
  transition: color 0.2s;
}
.nav-link:hover { color: #fff; }

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

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  padding: 6px 14px;
  cursor: pointer;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: rgba(229,231,235,0.5);
  transition: var(--transition);
}
.lang-toggle:hover { border-color: rgba(168,85,247,0.4); }
.lang-active { color: #A855F7; font-weight: 500; }
.lang-divider { color: rgba(255,255,255,0.2); }

/* ── HERO ─────────────────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  padding: 120px 24px 80px;
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-glow-container {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.35;
}

.glow-magenta {
  width: 600px; height: 600px;
  background: radial-gradient(circle, #EC4899 0%, transparent 70%);
  top: -100px; right: -100px;
  animation: glow-pulse-mg 6s ease-in-out infinite alternate;
}

.glow-purple {
  width: 500px; height: 500px;
  background: radial-gradient(circle, #6D28D9 0%, transparent 70%);
  bottom: -100px; left: -50px;
  animation: glow-pulse-pu 8s ease-in-out infinite alternate;
}

.glow-violet {
  width: 400px; height: 400px;
  background: radial-gradient(circle, #A855F7 0%, transparent 70%);
  top: 50%; left: 40%;
  animation: glow-pulse-vi 5s ease-in-out infinite alternate;
}

@keyframes glow-pulse-mg { from { opacity: 0.25; transform: scale(1); } to { opacity: 0.45; transform: scale(1.1); } }
@keyframes glow-pulse-pu { from { opacity: 0.20; transform: scale(1); } to { opacity: 0.40; transform: scale(1.15); } }
@keyframes glow-pulse-vi { from { opacity: 0.15; transform: scale(0.9); } to { opacity: 0.30; transform: scale(1.1); } }

.hero-grid {
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  position: relative;
  z-index: 1;
}

/* Prevent grid/flex children from overflowing their tracks */
.hero-grid > * { min-width: 0; }

.hero-content { display: flex; flex-direction: column; gap: 24px; min-width: 0; }

.hero-h1 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: clamp(32px, 4.5vw, 58px);
  line-height: 1.12;
  color: #fff;
  text-wrap: pretty;
}

.hero-h1-sub {
  font-size: clamp(20px, 2.5vw, 32px);
  font-weight: 600;
  color: rgba(229,231,235,0.85);
  line-height: 1.3;
}

.hero-sub {
  font-size: clamp(15px, 1.5vw, 17px);
  line-height: 1.75;
  color: rgba(229,231,235,0.65);
  max-width: 520px;
  text-wrap: pretty;
}

.hero-bullets {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hero-bullet {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
  color: rgba(229,231,235,0.8);
}

.bullet-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--grad);
  flex-shrink: 0;
  margin-top: 6px;
}

.bullet-highlight {
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
}

.hero-ctas { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }

.hero-visual {
  position: relative;
  width: 100%;
  height: clamp(640px, 68vw, 780px);
  min-width: 0;
}

.hero-photo-wrap {
  position: absolute;
  top: 0;
  right: 0;
  width: 80%;
  height: 96%;
  overflow: hidden;
  z-index: 1;
}

.hero-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  border-radius: var(--radius);
  border: 2px solid rgba(168,85,247,0.3);
  filter: drop-shadow(0 0 24px rgba(109,40,217,0.4));
}

.hero-photo-glow {
  position: absolute;
  inset: -20px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(109,40,217,0.3) 0%, transparent 70%);
  animation: glow-pulse-pu 4s ease-in-out infinite alternate;
  pointer-events: none;
}

/* ── HERO CHAT WIDGET ────────────────────────────────────────── */
.hero-chat-widget {
  position: absolute;
  bottom: 0;
  left: 0;
  z-index: 2;
  width: 100%;
  max-width: 380px;
  padding: 0;
  overflow: hidden;
}

.chat-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.chat-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
}
.chat-dot-green {
  background: #34D399;
  box-shadow: 0 0 8px rgba(52,211,153,0.6);
  animation: pulse-green 2s ease-in-out infinite;
}
@keyframes pulse-green {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.chat-title { flex: 1; color: rgba(255,255,255,0.7); }

.chat-pulse {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #A855F7;
  animation: pulse-violet 1.5s ease-in-out infinite;
}
@keyframes pulse-violet {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.3); }
}

.chat-messages {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 160px;
}

.chat-msg {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.chat-msg-visible {
  opacity: 1;
  transform: translateY(0);
}

.chat-msg-user { flex-direction: row-reverse; }

.chat-avatar {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: rgba(168,85,247,0.12);
  border: 1px solid rgba(168,85,247,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.chat-bubble {
  max-width: 80%;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 12px;
  line-height: 1.5;
  text-wrap: pretty;
}

.chat-msg-ai .chat-bubble {
  background: rgba(109,40,217,0.2);
  border: 1px solid rgba(109,40,217,0.3);
  color: rgba(229,231,235,0.9);
  border-top-left-radius: 2px;
}

.chat-msg-user .chat-bubble {
  background: rgba(236,72,153,0.15);
  border: 1px solid rgba(236,72,153,0.2);
  color: rgba(229,231,235,0.9);
  border-top-right-radius: 2px;
}

.chat-input-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.chat-input-fake {
  flex: 1;
  color: rgba(255,255,255,0.2);
  font-size: 11px;
}

.chat-send-btn {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #EC4899, #6D28D9);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  cursor: pointer;
  flex-shrink: 0;
}

/* ── SECTIONS COMMON ─────────────────────────────────────────── */
.section {
  padding: 100px 24px;
  position: relative;
}

.section-inner {
  max-width: 1280px;
  margin: 0 auto;
  min-width: 0;
  overflow-wrap: break-word;
  word-break: break-word;
}

/* alternating subtle bg */
.ecosistema, .propuesta, .para-quien { background: rgba(15,21,37,0.5); }

/* ── LOGO GRID (ECOSISTEMA) ──────────────────────────────────── */
.marquee-wrapper {
  margin-top: 48px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow: hidden;
  /* Fade edges */
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
}

.marquee-track {
  overflow: hidden;
  width: 100%;
}

.marquee-inner {
  display: flex;
  gap: 16px;
  width: max-content;
}

/* Row 1 scrolls left */
.marquee-left .marquee-inner {
  animation: marquee-left 28s linear infinite;
}

/* Row 2 scrolls right */
.marquee-right .marquee-inner {
  animation: marquee-right 32s linear infinite;
}

@keyframes marquee-left {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-33.333%); }
}

@keyframes marquee-right {
  0%   { transform: translateX(-33.333%); }
  100% { transform: translateX(0); }
}

/* Pause on hover */
.marquee-track:hover .marquee-inner {
  animation-play-state: paused;
}

.logo-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 20px 28px;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
  min-width: 140px;
}

.logo-chip:hover { border-color: rgba(168,85,247,0.4); }

.logo-abbr {
  font-size: 16px;
  font-weight: 500;
  color: rgba(168,85,247,0.5);
  transition: color 0.3s;
}

.logo-chip:hover .logo-abbr { color: #A855F7; }

.logo-name {
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: rgba(229,231,235,0.4);
  text-align: center;
  transition: color 0.3s;
}

.logo-chip:hover .logo-name { color: rgba(229,231,235,0.8); }

/* ── BENTO GRID (PROPUESTA) ──────────────────────────────────── */
.bento-grid { margin-top: 52px; }

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

.bento-card {
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  min-height: 220px;
}

.bento-ai {
  border-color: rgba(168,85,247,0.2);
}

.bento-ai::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  background: radial-gradient(ellipse at top left, rgba(168,85,247,0.08) 0%, transparent 60%);
  pointer-events: none;
}

.bento-ai:hover {
  box-shadow: var(--shadow-z), 0 0 60px rgba(168,85,247,0.35);
}

.bento-icon {
  font-size: 20px;
  color: rgba(168,85,247,0.6);
  letter-spacing: 0;
}

.bento-label { margin-bottom: 4px; }

.bento-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.3;
  color: #fff;
  text-wrap: pretty;
}

.bento-desc {
  font-size: 13px;
  line-height: 1.65;
  color: rgba(229,231,235,0.6);
  text-wrap: pretty;
  flex: 1;
}

.ai-halo-badge {
  align-self: flex-start;
  padding: 3px 10px;
  border: 1px solid rgba(168,85,247,0.4);
  border-radius: 999px;
  color: #A855F7;
  font-size: 10px;
  background: rgba(168,85,247,0.08);
}

/* ── PROJECTS ─────────────────────────────────────────────────── */
.carousel-label {
  margin-top: 48px;
  margin-bottom: 24px;
  color: rgba(168,85,247,0.6);
}

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

.project-card {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
}

.project-chart {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 48px;
}

.anim-bar {
  flex: 1;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(to top, #6D28D9, #A855F7);
  transition: height 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0.7;
  min-height: 8px;
}

.project-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.project-cat { color: rgba(168,85,247,0.7); }

.project-metric {
  font-family: 'JetBrains Mono', monospace;
  font-size: 18px;
  font-weight: 700;
}

.project-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.4;
  color: #fff;
  text-wrap: pretty;
}

.project-desc {
  font-size: 13px;
  line-height: 1.65;
  color: rgba(229,231,235,0.6);
  flex: 1;
  text-wrap: pretty;
}

/* ── LHIIS BLOCK ─────────────────────────────────────────────── */
.lhiis-block {
  margin-top: 32px;
  padding: 40px 48px;
  display: flex;
  align-items: center;
  gap: 48px;
  justify-content: space-between;
}

.lhiis-gradient-border {
  /* intentionally empty — glass-card handles border */
}

.lhiis-content { flex: 1; display: flex; flex-direction: column; gap: 16px; }

.lhiis-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 28px;
  line-height: 1.2;
  color: #fff;
  text-wrap: pretty;
}

.lhiis-desc {
  font-size: 15px;
  line-height: 1.7;
  color: rgba(229,231,235,0.65);
  max-width: 520px;
}

.lhiis-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}

.lhiis-logo-wrap {
  width: 140px; height: 140px;
  border-radius: 24px;
  background: rgba(255,255,255,0.95);
  border: 1px solid rgba(168,85,247,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: pulse-lhiis 3s ease-in-out infinite;
}
@keyframes pulse-lhiis {
  0%, 100% { box-shadow: 0 0 20px rgba(109,40,217,0.3); }
  50% { box-shadow: 0 0 50px rgba(109,40,217,0.6); }
}

/* ── BLOG ─────────────────────────────────────────────────────── */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 48px;
}

.blog-card {
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 0 0 20px 0;
  overflow: hidden;
}

.blog-img-ph {
  width: 100%;
  height: 160px;
  background: linear-gradient(135deg, rgba(109,40,217,0.15), rgba(236,72,153,0.1));
  border-bottom: 1px solid rgba(255,255,255,0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.blog-img-stripe {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 6px,
    rgba(168,85,247,0.04) 6px,
    rgba(168,85,247,0.04) 12px
  );
}

.blog-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}

.blog-cat { color: rgba(236,72,153,0.8); }
.blog-date { color: rgba(229,231,235,0.3); }

.blog-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.45;
  color: #fff;
  padding: 0 20px;
  flex: 1;
  text-wrap: pretty;
}

.blog-read {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  padding: 0 20px;
}

/* ── SOBRE MÍ ─────────────────────────────────────────────────── */
.sobre-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 60px;
  align-items: start;
}

.sobre-photo-col { display: flex; flex-direction: column; gap: 16px; }

.sobre-photo-wrap {
  padding: 0;
  overflow: hidden;
  border-radius: var(--radius);
}

.sobre-photo {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  display: block;
  border-radius: var(--radius);
}

.sobre-pixel-wrap {
  padding: 0;
  overflow: hidden;
  border-radius: var(--radius-sm);
}

.sobre-pixel {
  width: 100%;
  display: block;
  border-radius: var(--radius-sm);
}

.sobre-text-col { display: flex; flex-direction: column; gap: 16px; }

.sobre-quote {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(18px, 2.2vw, 26px);
  font-weight: 700;
  line-height: 1.35;
  text-wrap: pretty;
  margin-bottom: 8px;
}

.sobre-p {
  font-size: 15px;
  line-height: 1.75;
  color: rgba(229,231,235,0.7);
  text-wrap: pretty;
}

.sobre-section-label {
  margin-top: 4px;
  color: rgba(236,72,153,0.7);
}

.interest-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }

.interest-chip {
  padding: 6px 14px;
  background: rgba(168,85,247,0.08);
  border: 1px solid rgba(168,85,247,0.2);
  border-radius: 999px;
  font-size: 12px;
  color: rgba(229,231,235,0.8);
  font-family: 'Lato', sans-serif;
  transition: var(--transition);
  cursor: default;
}
.interest-chip:hover {
  background: rgba(168,85,247,0.15);
  border-color: rgba(168,85,247,0.4);
}

.stack-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

.stack-chip {
  padding: 4px 10px;
  background: rgba(109,40,217,0.12);
  border: 1px solid rgba(109,40,217,0.25);
  border-radius: 4px;
  color: rgba(168,85,247,0.8);
  font-size: 10px;
  transition: var(--transition);
}
.stack-chip:hover { background: rgba(109,40,217,0.2); color: #A855F7; }

.sobre-closing {
  margin-top: 8px;
  color: rgba(229,231,235,0.3);
  font-size: 11px;
  letter-spacing: 0.1em;
}

/* ── PARA QUIÉN CTA ANIMADO ──────────────────────────────────── */
.pq-cta-wrap {
  margin-top: 52px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 580px;
  position: relative;
}

/* Floating orbs behind the text */
.pq-glow-art {
  position: absolute;
  inset: -40px -60px;
  pointer-events: none;
  z-index: 0;
  overflow: visible;
}

.pq-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(50px);
  opacity: 0;
  animation: pq-orb-float 6s ease-in-out infinite;
}

.pq-orb-1 {
  width: 200px; height: 200px;
  background: radial-gradient(circle, #EC4899 0%, transparent 70%);
  top: -20px; left: -40px;
  animation-delay: 0s;
  animation-duration: 7s;
}

.pq-orb-2 {
  width: 160px; height: 160px;
  background: radial-gradient(circle, #6D28D9 0%, transparent 70%);
  bottom: 0px; left: 120px;
  animation-delay: 2s;
  animation-duration: 9s;
}

.pq-orb-3 {
  width: 120px; height: 120px;
  background: radial-gradient(circle, #A855F7 0%, transparent 70%);
  top: 20px; left: 280px;
  animation-delay: 4s;
  animation-duration: 6s;
}

@keyframes pq-orb-float {
  0%   { opacity: 0;    transform: scale(0.8) translateY(0); }
  30%  { opacity: 0.35; transform: scale(1.05) translateY(-10px); }
  60%  { opacity: 0.25; transform: scale(0.95) translateY(5px); }
  100% { opacity: 0;    transform: scale(0.8) translateY(0); }
}

/* Sparkle icons */
.pq-sparkle {
  position: absolute;
  animation: pq-sparkle-twinkle 3s ease-in-out infinite;
}

.pq-sparkle-1 {
  top: -24px; left: -10px;
  animation-delay: 0s;
}

.pq-sparkle-2 {
  top: 8px; left: 260px;
  animation-delay: 1.2s;
}

.pq-sparkle-3 {
  bottom: 10px; left: 80px;
  animation-delay: 2.1s;
}

@keyframes pq-sparkle-twinkle {
  0%, 100% { opacity: 0.2; transform: scale(0.8) rotate(0deg); }
  50%       { opacity: 1;   transform: scale(1.2) rotate(20deg); }
}

.pq-closing {
  margin: 0;
  max-width: 100%;
  position: relative;
  z-index: 1;
}

.pq-btn {
  align-self: flex-start;
  gap: 10px;
  position: relative;
  z-index: 1;
  animation: pq-btn-pulse 2.5s ease-in-out infinite;
}

@keyframes pq-btn-pulse {
  0%, 100% { box-shadow: 0 0 24px rgba(236,72,153,0.4), 0 0 48px rgba(109,40,217,0.2); }
  50%       { box-shadow: 0 0 44px rgba(236,72,153,0.75), 0 0 88px rgba(109,40,217,0.5); }
}

/* ── PARA QUIÉN ──────────────────────────────────────────────── */
.stages-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 48px;
}

.stage-card {
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
}

.stage-card-1 { border-top: 2px solid #EC4899; }
.stage-card-2 { border-top: 2px solid #A855F7; }
.stage-card-3 { border-top: 2px solid #6D28D9; }

.stage-num {
  font-size: 32px;
  font-weight: 800;
  font-family: 'Montserrat', sans-serif;
  line-height: 1;
  -webkit-text-fill-color: transparent;
}

.stage-tag {
  color: rgba(168,85,247,0.7);
  margin-bottom: 4px;
}

.stage-pain {
  font-size: 14px;
  line-height: 1.7;
  color: rgba(229,231,235,0.65);
  text-wrap: pretty;
}

.para-quien-closing { text-align: left; margin-top: 52px; }

/* ── FAQ ──────────────────────────────────────────────────────── */
.faq-inner { max-width: 800px; }

.faq-list { display: flex; flex-direction: column; gap: 12px; margin-top: 48px; }

.faq-item {
  padding: 20px 24px;
  cursor: pointer;
  transition: var(--transition);
}

.faq-item:hover { border-color: rgba(168,85,247,0.3); }
.faq-open { border-color: rgba(168,85,247,0.3) !important; }

.faq-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 15px;
  color: #fff;
}

.faq-icon {
  font-size: 18px;
  color: #A855F7;
  flex-shrink: 0;
  letter-spacing: 0;
}

.faq-a {
  margin-top: 14px;
  font-size: 14px;
  line-height: 1.75;
  color: rgba(229,231,235,0.65);
  text-wrap: pretty;
  padding-right: 32px;
}

/* ── CTA FINAL ────────────────────────────────────────────────── */
.cta-final {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 120px 24px;
}

.cta-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(109,40,217,0.25) 0%, rgba(236,72,153,0.1) 40%, transparent 70%);
  pointer-events: none;
}

.cta-inner { max-width: 700px; }

.cta-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.2;
  margin-bottom: 16px;
  text-wrap: pretty;
}

.cta-sub {
  font-size: 18px;
  color: rgba(229,231,235,0.6);
  margin-bottom: 48px;
}

.cta-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
}

.cta-option { display: flex; flex-direction: column; align-items: center; gap: 10px; }

.cta-desc { color: rgba(229,231,235,0.4); margin-top: 2px; }

.cta-divider {
  color: rgba(255,255,255,0.2);
  font-size: 20px;
  align-self: flex-start;
  padding-top: 17px;
}

/* ── FOOTER ──────────────────────────────────────────────────── */
.footer {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 48px 24px;
  background: rgba(8,11,20,0.8);
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-name {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 16px;
  color: #fff;
}

.footer-links { display: flex; gap: 24px; flex-wrap: wrap; justify-content: center; }

.footer-link {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(229,231,235,0.4);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-link:hover { color: #A855F7; }

.footer-tagline { color: rgba(229,231,235,0.3); margin-top: 4px; }
.footer-copy { color: rgba(229,231,235,0.2); }

/* ── SCROLL ANIMATIONS (Intersection Observer) ──────────────── */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── AVATAR FLIP CARD ────────────────────────────────────────── */
.sobre-photo-col {
  flex-shrink: 0;
}

.avatar-flip-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  cursor: pointer;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.10);
  border-top-color: rgba(255,255,255,0.18);
  box-shadow: var(--shadow-z), var(--shadow-glow);
}

/* Base: pixel art always visible */
.avatar-pixel {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: var(--radius);
  z-index: 1;
}

/* Real photo layer — sits on top of pixel art */
.avatar-real-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: var(--radius);
  overflow: hidden;
  /* Default: hidden (opacity 0) */
  opacity: 0;
  transition: opacity 0.4s ease;
}

.avatar-real-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  /* Default: very blurred (glass effect) */
  filter: blur(16px) brightness(0.7);
  transition: filter 0.5s ease;
  transform: scale(1.05); /* prevent blur edge artifacts */
}

/* Hover: show real layer with heavy blur (through glass) */
.avatar-flip-wrap:hover .avatar-real-layer {
  opacity: 1;
}

/* Click (revealed): clear photo, no blur */
.avatar-flip-wrap.avatar-revealed .avatar-real-layer {
  opacity: 1;
}
.avatar-flip-wrap.avatar-revealed .avatar-real-img {
  filter: blur(0px) brightness(1);
  transform: scale(1);
}

/* Hint label */
.avatar-hint {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  color: rgba(255,255,255,0.75);
  font-size: 10px;
  letter-spacing: 0.14em;
  background: rgba(11,15,26,0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 4px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.avatar-flip-wrap:hover .avatar-hint {
  opacity: 1;
}

/* ── NAV MOBILE (hamburger + drawer) ─────────────────────────── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  flex-shrink: 0;
}
.nav-hamburger:hover { background: var(--glass-bg); }

.ham-bar {
  width: 22px;
  height: 2px;
  background: rgba(229,231,235,0.8);
  border-radius: 2px;
  display: block;
}

.nav-drawer {
  position: fixed;
  inset: 0;
  z-index: 200;
}

.nav-drawer-overlay {
  position: absolute;
  inset: 0;
  background: rgba(11,15,26,0.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.nav-drawer-panel {
  position: absolute;
  top: 0; right: 0;
  width: min(300px, 88vw);
  height: 100%;
  background: rgba(11,15,26,0.98);
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);
  border-left: 1px solid rgba(255,255,255,0.07);
  box-shadow: -8px 0 40px rgba(0,0,0,0.6);
  padding: 20px 24px 36px;
  display: flex;
  flex-direction: column;
}

.drawer-close {
  align-self: flex-end;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: rgba(229,231,235,0.6);
  font-size: 18px;
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  margin-bottom: 32px;
}
.drawer-close:hover { color: #fff; border-color: rgba(168,85,247,0.4); }

.drawer-links {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.drawer-link {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 17px;
  color: rgba(229,231,235,0.7);
  text-decoration: none;
  padding: 16px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: color 0.2s;
}
.drawer-link:hover { color: #fff; }
.drawer-link::after { content: '→'; opacity: 0.3; font-size: 13px; transition: opacity 0.2s; }
.drawer-link:hover::after { opacity: 1; }

.drawer-footer {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.drawer-lang {
  display: flex;
  gap: 8px;
}

.drawer-lang-btn {
  flex: 1;
  padding: 10px;
  text-align: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  background: transparent;
  color: rgba(229,231,235,0.5);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: var(--transition);
}
.drawer-lang-btn.active {
  border-color: rgba(168,85,247,0.5);
  background: rgba(168,85,247,0.1);
  color: #A855F7;
}
.drawer-lang-btn:hover:not(.active) {
  border-color: rgba(255,255,255,0.15);
  color: rgba(229,231,235,0.8);
}

.drawer-cta {
  width: 100%;
  justify-content: center;
}

/* ── RESPONSIVE ──────────────────────────────────────────────── */

/* Tablet landscape · ≤ 1024px */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .hero-visual { height: 680px; max-width: 600px; margin: 0 auto; }
  .hero-photo-wrap { width: 80%; height: 90%; }
  .hero-chat-widget { max-width: 340px; }
  .bento-3col { grid-template-columns: repeat(2, 1fr); }
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
  .sobre-grid { grid-template-columns: 1fr; }
  .sobre-photo-col { width: 100%; max-width: 380px; margin: 0 auto; }
  .stages-grid { grid-template-columns: 1fr; }
  .lhiis-block { flex-direction: column; align-items: center; gap: 28px; text-align: center; }
  .lhiis-content { align-items: center; }
  .lhiis-desc { text-align: center; }
}

/* Tablet portrait · ≤ 768px */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-cta { display: none; }
  .nav-hamburger { display: flex; }

  .section { padding: 72px 20px; }

  .hero { padding: 96px 20px 64px; }
  .hero-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    height: auto;
    max-width: none;
    margin: 0;
  }
  .hero-photo-wrap {
    position: relative;
    top: auto; right: auto;
    width: 200px; height: 220px;
    overflow: hidden;
  }
  .hero-photo { border-radius: var(--radius); }
  .hero-chat-widget {
    position: relative;
    bottom: auto; left: auto;
    max-width: 100%;
    max-height: none;
    width: 100%;
  }

  .bento-3col { grid-template-columns: 1fr; }
  .bento-card { min-height: auto; padding: 22px; }
  .projects-grid { grid-template-columns: 1fr; }
  .blog-grid { grid-template-columns: 1fr; }
  .stages-grid { grid-template-columns: 1fr; }

  .sobre-photo-col { width: 100%; max-width: 340px; margin: 0 auto; }

  .lhiis-block { padding: 28px 24px; }
  .lhiis-title { font-size: 22px; }

  .cta-buttons { gap: 20px; }
  .cta-sub { font-size: 16px; margin-bottom: 36px; }
}

/* Mobile large · ≤ 480px (iPhone Plus, Pixel, Galaxy) */
@media (max-width: 480px) {
  .nav { padding: 0 16px; }
  .eyebrow { letter-spacing: 0.08em; white-space: normal; overflow-wrap: break-word; }

  .section { padding: 60px 16px; }
  .hero { padding: 88px 16px 56px; }
  .hero-photo-wrap { position: relative; top: auto; right: auto; width: 180px; height: 200px; }
  .hero-photo { border-radius: var(--radius); }

  .hero-ctas { flex-direction: column; gap: 10px; }
  .hero-ctas .btn-primary,
  .hero-ctas .btn-secondary { width: 100%; justify-content: center; }

  .lhiis-block { padding: 24px 16px; }
  .lhiis-title { font-size: 20px; }

  .cta-final { padding: 80px 16px; }
  .cta-title { font-size: clamp(22px, 6vw, 34px) !important; }
  .cta-buttons { flex-direction: column; align-items: stretch; gap: 12px; }
  .cta-divider { display: none; }
  .cta-option { width: 100%; }
  .cta-option .btn-primary,
  .cta-option .btn-secondary { width: 100%; justify-content: center; }
  .btn-lg { padding: 14px 24px; font-size: 15px; }

  .faq-q { font-size: 14px; gap: 12px; }
  .faq-item { padding: 16px 18px; }

  .bento-card { padding: 20px 16px; }
  .project-card { padding: 20px 16px; }
  .stage-card { padding: 22px 18px; }

  .footer { padding: 36px 16px; }
  .footer-links { gap: 16px; }
}

/* Mobile medium · ≤ 390px (iPhone 14/15 estándar) */
@media (max-width: 390px) {
  .nav-name { font-size: 14px; }

  .section { padding: 56px 16px; }
  .hero { padding: 84px 16px 52px; }
  .hero-photo-wrap { position: relative; top: auto; right: auto; width: 160px; height: 180px; }
  .hero-photo { border-radius: var(--radius); }
  .hero-h1 { font-size: 25px !important; }
  .hero-h1-sub { font-size: 15px !important; }
  .hero-bullets { padding: 14px 16px; }

  .section-title { font-size: 22px; }
  .section-sub { font-size: 14px; }

  .sobre-photo-col { width: 100%; max-width: 300px; }
  .lhiis-title { font-size: 18px; }

  .interest-chip { font-size: 11px; padding: 5px 10px; }
  .stack-chip { font-size: 9px; }
}

/* Mobile small · ≤ 340px (iPhone SE 1ª gen, teléfonos pequeños) */
@media (max-width: 340px) {
  .nav-inner { height: 60px; }

  .section { padding: 52px 12px; }
  .hero { padding: 76px 12px 48px; }
  .hero-h1 { font-size: 22px !important; line-height: 1.2; }
  .hero-photo-wrap { position: relative; top: auto; right: auto; width: 140px; height: 160px; }
  .hero-photo { border-radius: var(--radius); }

  .section-title { font-size: 20px; }

  .btn-primary,
  .btn-secondary { font-size: 13px; padding: 11px 18px; }

  .bento-card { padding: 16px 14px; }
  .project-card { padding: 16px 14px; }
  .stage-card { padding: 18px 14px; }
}
