/* ========== RESET ========== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

/* ========== THEME VARIABLES ========== */
:root {
  --bg: #fbfbfd; --bg-rgb: 251,251,253; --bg2: #ffffff; --bg3: #f5f5f7; --bg-nav: rgba(251,251,253,0.72);
  --accent: #4a7cff; --accent-rgb: 74,124,255; --accent2: #a855f7;
  --text: #1d1d1f; --text-muted: #86868b; --border: #d2d2d7;
  --card-shadow: 0 2px 12px rgba(0,0,0,0.04);
  --glow-opacity: 0.05;
  --transition-theme: background 0.5s ease, color 0.5s ease, border-color 0.5s ease, box-shadow 0.5s ease;
}
[data-theme="dark"] {
  --bg: #0d0d0d; --bg-rgb: 13,13,13; --bg2: #141414; --bg3: #1c1c1c; --bg-nav: rgba(13,13,13,0.85);
  --accent: #6b9fff; --accent-rgb: 107,159,255; --accent2: #c084fc;
  --text: #f0ede6; --text-muted: #888; --border: #2a2a2a;
  --card-shadow: 0 2px 20px rgba(0,0,0,0.3);
  --glow-opacity: 0.06;
}

/* ========== BASE ========== */
body { background: var(--bg); color: var(--text); font-family: 'DM Sans', sans-serif; font-size: 16px; line-height: 1.6; overflow-x: hidden; transition: var(--transition-theme); }

/* ========== SCROLL PROGRESS BAR ========== */
.progress-bar { position: fixed; top: 0; left: 0; height: 3px; background: linear-gradient(90deg, var(--accent), var(--accent2)); z-index: 200; width: 0%; transition: width 0.1s linear; }

/* ========== CURSOR GLOW ========== */
.cursor-glow { position: fixed; width: 600px; height: 600px; border-radius: 50%; background: radial-gradient(circle, rgba(var(--accent-rgb), var(--glow-opacity)) 0%, transparent 70%); pointer-events: none; z-index: 0; transform: translate(-50%, -50%); transition: opacity 0.3s; opacity: 0; }
.cursor-glow.active { opacity: 1; }

/* ========== NAV ========== */
nav { position: fixed; top: 0; left: 0; right: 0; z-index: 9999; padding: 16px 48px; display: flex; align-items: center; justify-content: space-between; background: var(--bg-nav); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-bottom: 1px solid var(--border); transition: var(--transition-theme), padding 0.3s ease; }
nav.scrolled { padding: 10px 48px; }
.nav-logo { font-family: 'DM Serif Display', serif; font-size: 1.1rem; color: var(--text); text-decoration: none; transition: color 0.5s; }
.nav-links { display: flex; gap: 8px; list-style: none; align-items: center; background: transparent; border: none; border-radius: 100px; padding: 4px; transition: var(--transition-theme); }
.nav-links a { color: var(--text-muted); text-decoration: none; font-size: 0.8rem; font-weight: 500; letter-spacing: 0.03em; transition: color 0.3s, background 0.3s; padding: 8px 16px; border-radius: 100px; position: relative; }
.nav-links a::after { display: none; }
.nav-links a:hover { color: var(--text); background: var(--bg2); }

/* Theme toggle switch */
.theme-toggle { background: none; border: none; cursor: pointer; padding: 0; display: flex; align-items: center; gap: 10px; }
.theme-switch { position: relative; width: 44px; height: 24px; background: var(--bg3); border: 1px solid var(--border); border-radius: 100px; transition: background 0.3s, border-color 0.3s; flex-shrink: 0; }
.theme-switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; background: var(--text-muted); border-radius: 50%; transition: transform 0.3s, background 0.3s; }
[data-theme="light"] .theme-switch::after { transform: translateX(20px); background: var(--accent); }
.theme-icon-moon, .theme-icon-sun { font-size: 1rem; transition: opacity 0.3s; }
[data-theme="dark"] .theme-icon-moon { opacity: 1; }
[data-theme="dark"] .theme-icon-sun { opacity: 0.3; }
[data-theme="light"] .theme-icon-moon { opacity: 0.3; }
[data-theme="light"] .theme-icon-sun { opacity: 1; }

/* Hamburger */
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; z-index: 1001; background: none; border: none; padding: 8px; }
.hamburger span { display: block; width: 22px; height: 1.5px; background: var(--text); transition: transform 0.3s, opacity 0.3s; }
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }
.hamburger.active { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; padding: 4px; }
.hamburger.active span { width: 18px; }

/* ========== HERO ========== */
#hero { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative; padding: 140px 48px 80px; }
.hero-inner { display: grid; grid-template-columns: 1fr 380px; gap: 60px; align-items: center; max-width: 1200px; width: 100%; position: relative; z-index: 1; }
.hero-bg-mesh { display: none; }
.hero-content, .hero-stats { position: relative; z-index: 1; }

.hero-badge { display: inline-flex; align-items: center; gap: 8px; background: var(--bg3); border: 1px solid var(--border); border-radius: 100px; padding: 6px 16px; font-size: 0.78rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 32px; transition: var(--transition-theme); opacity: 0; transform: translateY(20px); }
.hero-badge.revealed { opacity: 1; transform: translateY(0); transition: opacity 0.6s ease 0.2s, transform 0.6s ease 0.2s, background 0.5s, color 0.5s, border-color 0.5s; }
.hero-badge span { width: 6px; height: 6px; background: var(--accent); border-radius: 50%; animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.5; transform: scale(0.8); } }

.hero-title { font-family: 'DM Serif Display', serif; font-size: clamp(2.5rem, 5.5vw, 4.5rem); line-height: 1.08; font-weight: 400; margin-bottom: 28px; }
.hero-title .line { display: block; overflow: hidden; }
.hero-title .line-inner { display: block; transform: translateY(110%); transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1); }
.hero-title .line-inner.revealed { transform: translateY(0); }
.hero-title em { font-style: italic; background: linear-gradient(135deg, var(--accent), var(--accent2)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

.hero-desc { font-size: 1.1rem; color: var(--text-muted); max-width: 520px; margin-bottom: 48px; line-height: 1.8; opacity: 0; transform: translateY(20px); transition: var(--transition-theme); }
.hero-desc.revealed { opacity: 1; transform: translateY(0); transition: opacity 0.7s ease 0.7s, transform 0.7s ease 0.7s, color 0.5s; }

.hero-ctas { display: flex; gap: 16px; flex-wrap: wrap; opacity: 0; transform: translateY(20px); }
.hero-ctas.revealed { opacity: 1; transform: translateY(0); transition: opacity 0.6s ease 0.9s, transform 0.6s ease 0.9s; }

.btn-primary { display: inline-flex; align-items: center; gap: 8px; background: transparent; color: #fff; border: 2px solid #fff; font-weight: 600; font-size: 0.9rem; padding: 14px 28px; border-radius: 100px; text-decoration: none; transition: transform 0.2s, box-shadow 0.2s, background 0.3s, border-color 0.3s, color 0.3s; position: relative; overflow: hidden; }
.btn-primary:hover { background: rgba(255,255,255,0.05); border-color: #fff; color: #fff; box-shadow: 0 8px 30px rgba(255,255,255,0.1); }
.btn-primary .ripple { position: absolute; border-radius: 50%; background: rgba(255,255,255,0.4); transform: scale(0); animation: ripple 0.6s linear; pointer-events: none; }
@keyframes ripple { to { transform: scale(4); opacity: 0; } }

.btn-secondary { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--border); color: var(--text-muted); font-size: 0.9rem; padding: 14px 28px; border-radius: 100px; text-decoration: none; transition: border-color 0.3s, color 0.3s, transform 0.2s; }
.btn-secondary:hover { border-color: var(--accent); color: var(--text); }

.hero-stats { background: var(--bg2); border: 1px solid var(--border); border-radius: 24px; padding: 40px 36px; display: flex; flex-direction: column; gap: 32px; transition: var(--transition-theme); opacity: 0; transform: translateX(40px); }
.hero-stats.revealed { opacity: 1; transform: translateX(0); transition: opacity 0.8s ease 0.4s, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.4s, background 0.5s, border-color 0.5s; }
.stat-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); margin-bottom: 6px; }
.stat-number { font-family: 'DM Serif Display', serif; font-size: 2.8rem; line-height: 1; color: var(--text); }
.stat-number.stat-text { font-size: 1.5rem; line-height: 1.3; }
.stat-number sup { font-size: 1.2rem; }
.stat-desc { font-size: 0.85rem; color: var(--text-muted); margin-top: 4px; }
.stat-divider { height: 1px; background: var(--border); transition: background 0.5s; }

.scroll-hint { position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--text-muted); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; z-index: 1; }
.scroll-hint::after { content: ''; display: block; width: 1px; height: 48px; background: linear-gradient(to bottom, var(--text-muted), transparent); animation: scrollLine 1.5s ease-in-out infinite; }
@keyframes scrollLine { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform: scaleY(1); transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* ========== SECTIONS ========== */
section { padding: 120px 48px; transition: var(--transition-theme); max-width: 1100px; margin: 0 auto; }
#conoceme, #cafe { max-width: none; }
#conoceme > *, #cafe > * { max-width: 1100px; margin-left: auto; margin-right: auto; }
.section-label { font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); display: flex; align-items: center; gap: 12px; margin-bottom: 48px; }
.section-label::before { content: ''; display: block; width: 40px; height: 1px; background: var(--text-muted); }
.section-title { font-family: 'DM Serif Display', serif; font-size: clamp(1.6rem, 4vw, 3.2rem); line-height: 1.15; font-weight: 400; max-width: 700px; margin-bottom: 24px; }
.section-title em { font-style: italic; background: linear-gradient(135deg, var(--accent), var(--accent2)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

/* ========== SCROLL ANIMATIONS ========== */
.anim { opacity: 0; transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.16, 1, 0.3, 1); }
.anim-up { transform: translateY(40px); }
.anim-left { transform: translateX(-40px); }
.anim-right { transform: translateX(40px); }
.anim-scale { transform: scale(0.92); }
.anim.visible { opacity: 1; transform: translate(0,0) scale(1); }
@media (prefers-reduced-motion: reduce) {
  .anim, .hero-title .line-inner, .hero-badge, .hero-desc, .hero-ctas, .hero-stats { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* ========== CONOCEME ========== */
#conoceme { background: var(--bg); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.conoceme-grid { display: grid; grid-template-columns: 340px 1fr; gap: 60px 60px; align-items: start; margin-top: 60px; }
.conoceme-grid > * { min-width: 0; }
.conoceme-text p { color: var(--text-muted); line-height: 1.9; font-size: 1.05rem; margin-bottom: 20px; transition: color 0.5s; word-wrap: break-word; overflow-wrap: break-word; }
.conoceme-text p strong { color: var(--text); font-weight: 500; transition: color 0.5s; }
.conoceme-photo { position: relative; width: 340px; max-width: 340px; padding: 3px; background: linear-gradient(135deg, var(--accent), var(--accent2)); border-radius: 24px; align-self: stretch; }
.conoceme-photo img { width: 100%; height: 100%; object-fit: cover; object-position: top center; border-radius: 22px; display: block; transition: filter 0.5s, transform 0.5s; }
.conoceme-photo:hover img { transform: scale(1.02); }
.conoceme-photo::after { display: none; }
.pillars-wrapper { grid-column: 1 / -1; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 32px; }
.tag { background: var(--bg3); border: 1px solid var(--border); border-radius: 100px; padding: 6px 16px; font-size: 0.82rem; color: var(--text-muted); transition: var(--transition-theme), transform 0.2s; opacity: 0; transform: translateY(10px) scale(0.9); }
.tag.visible { opacity: 1; transform: translateY(0) scale(1); }
.tag:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px) scale(1.05); }

.pillars { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.pillar { background: var(--bg3); border: 1px solid var(--border); border-radius: 16px; padding: 28px 32px; transition: var(--transition-theme), transform 0.3s; position: relative; overflow: hidden; }
.pillar:hover { border-color: var(--accent); transform: translateY(-4px); }
.pillar-icon { font-size: 1.5rem; margin-bottom: 12px; position: relative; }
.pillar-title { font-weight: 600; font-size: 1rem; margin-bottom: 8px; position: relative; }
.pillar-desc { color: var(--text-muted); font-size: 0.88rem; line-height: 1.7; position: relative; }

/* ========== TRAYECTORIA ========== */
#trayectoria { background: var(--bg); border-bottom: 1px solid var(--border); }
.timeline { position: relative; padding-left: 40px; margin-bottom: 48px; }
.timeline::before { content: ''; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(to bottom, var(--accent), var(--accent2), var(--border)); }
.timeline-item { position: relative; padding: 0 0 24px 0; transition: var(--transition-theme); }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before { content: ''; position: absolute; left: -40px; top: 6px; width: 16px; height: 16px; border-radius: 50%; background: var(--bg); border: 2px solid var(--accent); transition: background 0.3s, border-color 0.3s, box-shadow 0.3s; z-index: 1; }
.timeline-item:first-child::before { background: var(--accent); box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.4); }
.timeline-item:hover::before { background: var(--accent); box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.4); }
.timeline-year { font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); margin-bottom: 2px; font-weight: 500; }
.timeline-role { font-weight: 600; font-size: 0.95rem; margin-bottom: 2px; }
.timeline-company { color: var(--text-muted); font-size: 0.82rem; }

.credentials { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.credential { display: flex; align-items: center; gap: 16px; background: var(--bg2); border: 1px solid var(--border); border-radius: 16px; padding: 20px 24px; transition: var(--transition-theme), transform 0.3s; }
.credential:hover { border-color: var(--accent); transform: translateY(-2px); }
.credential-icon { font-size: 1.5rem; flex-shrink: 0; }
.credential strong { display: block; font-size: 0.9rem; margin-bottom: 4px; }
.credential-meta { font-size: 0.8rem; color: var(--text-muted); display: block; }

/* ========== PROYECTOS ========== */
#proyectos { background: var(--bg); }
.proyectos-intro { color: var(--text-muted); font-size: 1.05rem; max-width: 600px; line-height: 1.8; margin-bottom: 64px; }
.proyectos-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.proyecto-card { background: var(--bg2); border: 1px solid var(--border); border-radius: 20px; padding: 36px 32px; transition: var(--transition-theme), transform 0.3s; position: relative; overflow: hidden; }
.card-glow { position: absolute; width: 350px; height: 350px; border-radius: 50%; background: radial-gradient(circle, rgba(var(--accent-rgb), 0.25), transparent 70%); pointer-events: none; opacity: 0; transition: opacity 0.3s; transform: translate(-50%, -50%); z-index: 0; }
.pillar:hover .card-glow, .timeline-item:hover .card-glow, .credential:hover .card-glow { opacity: 1; }
.proyecto-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--accent), var(--accent2)); transform: scaleX(0); transition: transform 0.4s ease; transform-origin: left; }
.proyecto-card:hover { border-color: var(--accent); transform: translateY(-6px); }
.proyecto-card:hover::before { transform: scaleX(1); }
.proyecto-industry { font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); margin-bottom: 16px; font-weight: 500; position: relative; }
.proyecto-name { font-family: 'DM Serif Display', serif; font-size: 1.5rem; margin-bottom: 12px; line-height: 1.2; position: relative; }
.proyecto-desc { color: var(--text-muted); font-size: 0.875rem; line-height: 1.7; margin-bottom: 24px; position: relative; }
.proyecto-tags { display: flex; flex-wrap: wrap; gap: 6px; position: relative; }
.proyecto-tag { background: var(--bg3); border-radius: 100px; padding: 4px 12px; font-size: 0.75rem; color: var(--text-muted); transition: var(--transition-theme); }

/* ========== CAFE ========== */
#cafe { background: var(--bg); border-top: 1px solid var(--border); }
.cafe-container { max-width: 680px; margin: 0 auto; text-align: center; }
.cafe-container .section-label { justify-content: flex-start; }
.cafe-title { font-family: 'DM Serif Display', serif; font-size: clamp(2.2rem, 5vw, 3.5rem); line-height: 1.1; margin-bottom: 24px; }
.cafe-title em { font-style: italic; background: linear-gradient(135deg, var(--accent), var(--accent2)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.cafe-desc { color: var(--text-muted); font-size: 1.05rem; line-height: 1.8; margin-bottom: 48px; }
.cafe-form { display: flex; flex-direction: column; gap: 16px; text-align: left; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 8px; }
label { font-size: 0.8rem; font-weight: 500; letter-spacing: 0.05em; color: var(--text-muted); text-transform: uppercase; }
input, textarea, select { background: var(--bg3); border: 1px solid var(--border); border-radius: 12px; padding: 14px 18px; color: var(--text); font-family: 'DM Sans', sans-serif; font-size: 0.95rem; transition: border-color 0.3s, background 0.5s, color 0.5s, box-shadow 0.3s; outline: none; width: 100%; }
input::placeholder, textarea::placeholder { color: var(--text-muted); }
input:focus, textarea:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.12); }
select option { background: var(--bg3); }
textarea { resize: vertical; min-height: 120px; }
.btn-cafe { display: inline-flex; align-items: center; justify-content: center; gap: 10px; background: var(--text); color: var(--bg); font-weight: 700; font-size: 1rem; padding: 16px 40px; border-radius: 100px; border: none; width: 100%; margin-top: 8px; cursor: pointer; transition: transform 0.2s, box-shadow 0.2s, background 0.5s, color 0.5s; position: relative; overflow: hidden; }
.btn-cafe:hover { box-shadow: 0 8px 30px rgba(var(--accent-rgb), 0.25); background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff; }
.cafe-note { text-align: center; font-size: 0.82rem; color: var(--text-muted); margin-top: 16px; }

/* ========== FOOTER ========== */
footer { padding: 48px; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; transition: var(--transition-theme); position: relative; overflow: hidden; }
footer::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--accent), transparent); }
.linkedin-card { display: flex; align-items: center; gap: 20px; padding: 20px 28px; border-radius: 16px; border: 1px solid rgba(10,102,194,0.35); background: rgba(10,102,194,0.1); text-decoration: none; transition: all 0.2s ease; position: relative; overflow: hidden; }
.linkedin-card:hover { border-color: rgba(10,102,194,0.55); background: rgba(10,102,194,0.15); }
.linkedin-card .card-glow { background: radial-gradient(300px circle, rgba(10,102,194,0.25), transparent 70%) !important; }
.linkedin-icon { width: 48px; height: 48px; border-radius: 12px; background: rgba(10,102,194,0.18); border: 1px solid rgba(10,102,194,0.35); display: flex; align-items: center; justify-content: center; color: #0A66C2; transition: all 0.2s; flex-shrink: 0; }
.linkedin-card:hover .linkedin-icon { background: rgba(10,102,194,0.28); }
.linkedin-info { flex: 1; min-width: 0; text-align: left; display: flex; flex-direction: column; justify-content: center; }
.linkedin-handle { display: block; color: var(--text-muted); font-size: 0.875rem; line-height: 1.2; }
.linkedin-name { display: block; font-weight: 700; color: var(--text); font-size: 1rem; line-height: 1.2; margin-top: 4px; }
.linkedin-arrow { color: rgba(255,255,255,0.25); flex-shrink: 0; transition: color 0.2s; }
.linkedin-card:hover .linkedin-arrow { color: rgba(255,255,255,0.5); }
[data-theme="light"] .linkedin-arrow { color: rgba(0,0,0,0.2); }
[data-theme="light"] .linkedin-card:hover .linkedin-arrow { color: rgba(0,0,0,0.4); }
.cafe-cards { display: flex; justify-content: center; gap: 16px; margin-top: 32px; flex-wrap: wrap; }
.cafe-cards .linkedin-card, .cafe-cards .email-card { flex: 1; min-width: 260px; max-width: 340px; }
.email-card { display: flex; align-items: center; gap: 20px; padding: 20px 28px; border-radius: 16px; border: 1px solid rgba(217,119,6,0.35); background: rgba(217,119,6,0.1); text-decoration: none; transition: all 0.2s ease; position: relative; overflow: hidden; }
.email-card:hover { border-color: rgba(217,119,6,0.55); background: rgba(217,119,6,0.15); }
.email-icon { width: 48px; height: 48px; border-radius: 12px; background: rgba(217,119,6,0.18); border: 1px solid rgba(217,119,6,0.35); display: flex; align-items: center; justify-content: center; color: #D97706; transition: all 0.2s; flex-shrink: 0; }
.email-card:hover .email-icon { background: rgba(217,119,6,0.28); }
.email-card:hover .linkedin-arrow { color: rgba(255,255,255,0.5); }
[data-theme="light"] .email-card:hover .linkedin-arrow { color: rgba(0,0,0,0.4); }
.footer-logo { font-family: 'DM Serif Display', serif; font-size: 1rem; color: var(--text-muted); }
.footer-right { font-size: 0.82rem; color: var(--text-muted); }
.footer-right a { color: var(--accent); text-decoration: none; transition: opacity 0.2s; }
.footer-right a:hover { opacity: 0.8; }

/* ========== NOISE OVERLAY ========== */
body::after { content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 50; opacity: 0.018; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

/* ========== 3D TILT CARDS ========== */
.proyecto-card { transform-style: preserve-3d; perspective: 800px; }
.proyecto-card .card-inner { transition: transform 0.1s ease; }

/* ========== MAGNETIC BUTTONS ========== */
.magnetic { transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1); }

/* ========== MARQUEE TAGS ========== */
.marquee-wrapper { overflow: hidden; mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent); margin-top: 32px; }
.marquee-track { display: flex; gap: 12px; width: max-content; animation: marquee 30s linear infinite; }
.marquee-track:hover { animation-play-state: paused; }
@keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
.marquee-track .tag { opacity: 1; transform: none; flex-shrink: 0; }

/* ========== TEXT SPLIT REVEAL ========== */
.split-title .char { display: inline-block; opacity: 0; transform: translateY(40px) rotate(5deg); transition: opacity 0.4s ease, transform 0.5s cubic-bezier(0.16, 1, 0.3, 1); }
.split-title .char.space { width: 0.3em; }
.split-title.revealed .char { opacity: 1; transform: translateY(0) rotate(0); }
.split-title em .char { background: linear-gradient(135deg, var(--accent), var(--accent2)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

/* ========== CUSTOM HEART CURSOR ========== */
#pasiones { cursor: url('data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmlld0JveD0iMCAwIDEwMCAxMDAiIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+CiAgPHBhdGggZmlsbD0iI2UxMDYxMyIgZD0iTTUwIDg1IEMyNSA3MCwgNSA1NSwgNSA0MCBDNSAyNSwgMTUgMTUsIDI1IDE1IEMzNSAxNSwgNDUgMjUsIDUwIDM1IEM1NSAyNSwgNjUgMTUsIDc1IDE1IEM4NSAxNSwgOTUgMjUsIDk1IDQwIEM5NSA1NSwgNzUgNzAsIDUwIDg1IFoiLz4KPC9zdmc+Cg==') 8 8, auto; }

/* ========== PHOTO CURTAIN REVEAL ========== */
.photo-reveal { position: relative; overflow: hidden; }
.photo-reveal::before { content: ''; position: absolute; inset: 0; background: var(--accent); z-index: 2; transform: scaleX(1); transform-origin: right; transition: transform 0.8s cubic-bezier(0.77, 0, 0.175, 1); }
.photo-reveal.revealed::before { transform: scaleX(0); }

/* ========== FLOATING PARTICLES ========== */
.particles { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.particle { position: absolute; width: 4px; height: 4px; background: var(--accent); border-radius: 50%; opacity: 0.15; animation: particleFloat linear infinite; }
@keyframes particleFloat { 0% { transform: translateY(100vh) rotate(0deg); opacity: 0; } 10% { opacity: 0.15; } 90% { opacity: 0.15; } 100% { transform: translateY(-100px) rotate(720deg); opacity: 0; } }

/* ========== SECTION DIVIDER ANIMATED ========== */
.section-divider { height: 1px; background: linear-gradient(90deg, transparent, var(--accent), transparent); transform: scaleX(0); transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1); }
.section-divider.visible { transform: scaleX(1); }

/* ========== COUNTER EASING ========== */
.stat-number span { display: inline-block; }

/* ========== MOBILE ========== */
@media (max-width: 900px) {
  nav { padding: 14px 20px; }
  nav.scrolled { padding: 10px 20px; }
  .hamburger { display: flex; z-index: 1001; }
  .hamburger.active span { width: 16px; }
  .nav-links { position: fixed; top: 0; left: 0; right: 0; bottom: 0; width: 100vw; height: 100vh; height: 100dvh; flex-direction: column; justify-content: flex-end; align-items: flex-end; gap: 2px; z-index: 1000; padding: 80px 32px 60px; border: none; border-radius: 0; overflow: hidden; background: rgba(var(--bg-rgb), 0.96); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); opacity: 0; visibility: hidden; transition: opacity 0.4s ease, visibility 0.4s ease; display: flex !important; pointer-events: none; }
  .nav-links.open { opacity: 1; visibility: visible; pointer-events: auto; }
  .nav-links a { font-size: 1.6rem; font-family: 'DM Serif Display', serif; font-weight: 400; padding: 10px 0; border-radius: 0; letter-spacing: -0.01em; text-transform: none; color: var(--text-muted); transition: color 0.3s; text-align: right; }
  .nav-links a:hover { background: none; color: var(--text); }
  .nav-links li { opacity: 0; transform: translateX(20px); transition: opacity 0.4s ease, transform 0.4s ease; }
  .nav-links.open li { opacity: 1; transform: translateX(0); }
  .nav-links.open li:nth-child(1) { transition-delay: 0.08s; }
  .nav-links.open li:nth-child(2) { transition-delay: 0.14s; }
  .nav-links.open li:nth-child(3) { transition-delay: 0.2s; }
  .nav-links.open li:nth-child(4) { transition-delay: 0.26s; }
  .nav-links.open li:nth-child(5) { transition-delay: 0.32s; }
  .nav-links.open li:nth-child(6) { transition-delay: 0.38s; }
  .nav-links li:last-child { margin-top: 20px; }
  #hero { padding: 64px 24px 60px; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-badge { font-size: 0.65rem; padding: 5px 12px; margin-bottom: 20px; letter-spacing: 0.05em; }
  .hero-stats { display: none; }
  section { padding: 80px 24px; }
  .conoceme-grid { grid-template-columns: 1fr; gap: 24px; }
  .conoceme-photo { width: 200px; max-width: 200px; margin: 0 auto 16px; border-radius: 24px; padding: 3px; background: linear-gradient(135deg, var(--accent), var(--accent2)); }
  .conoceme-photo img { border-radius: 22px; aspect-ratio: 1/1; width: 100%; }
  .conoceme-photo::after { display: none; }
  .anim-right, .anim-left { transform: translateY(40px); }
  .conoceme-text, .conoceme-photo { min-width: 0; max-width: 100%; overflow: hidden; }
  .proyectos-grid { grid-template-columns: 1fr; }
  .credentials { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  footer { flex-direction: column; gap: 16px; text-align: center; }
  .timeline-item { flex: 1 1 100%; }
  .pillars { grid-template-columns: 1fr; }
  .cursor-glow { display: none; }
}
@media (max-width: 768px) {
  .conoceme-grid { grid-template-columns: 1fr !important; }
}
