/* ═══════════════════════════════════════════════════════════
   MATÍAS RODRÍGUEZ · PORTFOLIO CSS - v5.0
   Mejoras: Animaciones profesionales y diseño premium
   Fuentes: Syne (display) + DM Sans (body)
   Sistema: CSS Variables + Dark Mode + Animaciones
═══════════════════════════════════════════════════════════ */

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

:root {
  --bg:           #FAFAF9;
  --bg-2:         #F0EFEB;
  --bg-card:      #FFFFFF;
  --text:         #1C1917;
  --text-muted:   #78716C;
  --border:       rgba(28, 25, 23, 0.08);
  --accent:       #0D9488;
  --accent-2:     #0F766E;
  --accent-light: rgba(13, 148, 136, 0.1);
  --gradient-1:   linear-gradient(135deg, #0D9488 0%, #14B8A6 100%);
  --gradient-2:   linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
  --gradient-3:   linear-gradient(135deg, #F59E0B 0%, #FBBF24 100%);
  --shadow-sm:    0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:    0 4px 20px rgba(0,0,0,0.08);
  --shadow-lg:    0 20px 40px rgba(0,0,0,0.12);
  --shadow-glow:   0 0 40px rgba(13, 148, 136, 0.15);
  --shadow-glow-2: 0 0 40px rgba(99, 102, 241, 0.15);
  --nav-bg:       rgba(250, 250, 249, 0.85);
  --nav-bg-scrolled: rgba(250, 250, 249, 0.95);

  --font-display: 'Syne', sans-serif;
  --font-body:    'DM Sans', sans-serif;
  --radius:       20px;
  --radius-sm:    10px;
  --radius-xs:    6px;
  --transition:   0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme="dark"] {
  --bg:           #0C0A09;
  --bg-2:         #1C1917;
  --bg-card:      #292524;
  --text:         #FAFAF9;
  --text-muted:   #A8A29E;
  --border:       rgba(250, 250, 249, 0.08);
  --accent:       #2DD4BF;
  --accent-2:     #5EEAD4;
  --accent-light: rgba(45, 212, 191, 0.12);
  --shadow-sm:    0 1px 2px rgba(0,0,0,0.3);
  --shadow-md:    0 4px 20px rgba(0,0,0,0.4);
  --shadow-lg:    0 20px 40px rgba(0,0,0,0.5);
  --shadow-glow:  0 0 40px rgba(45, 212, 191, 0.15);
  --shadow-glow-2: 0 0 40px rgba(139, 92, 246, 0.15);
  --nav-bg:       rgba(12, 10, 9, 0.85);
  --nav-bg-scrolled: rgba(12, 10, 9, 0.95);
}

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.7;
  transition: background var(--transition), color var(--transition);
  overflow-x: hidden;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  top: -25%;
  left: -25%;
  width: 150%;
  height: 150%;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(42% 48% at 22% 12%,  rgba(13, 148, 136, 0.16) 0%, transparent 70%),
    radial-gradient(36% 42% at 86% 28%,  rgba(99, 102, 241, 0.14) 0%, transparent 70%),
    radial-gradient(38% 42% at 72% 90%,  rgba(245, 158, 11, 0.10) 0%, transparent 70%),
    radial-gradient(34% 40% at 18% 82%,  rgba(14, 118, 129, 0.12) 0%, transparent 70%),
    linear-gradient(180deg, rgba(255,255,255,0.00) 0%, rgba(0,0,0,0.045) 100%);
  animation: bg-shift 26s ease-in-out infinite;
  will-change: transform;
}

[data-theme="dark"] body::before {
  background:
    radial-gradient(42% 48% at 22% 12%,  rgba(45, 212, 191, 0.10) 0%, transparent 70%),
    radial-gradient(36% 42% at 86% 28%,  rgba(139, 92, 246, 0.10) 0%, transparent 70%),
    radial-gradient(38% 42% at 72% 90%,  rgba(245, 158, 11, 0.07) 0%, transparent 70%),
    radial-gradient(34% 40% at 18% 82%,  rgba(45, 212, 191, 0.06) 0%, transparent 70%),
    linear-gradient(180deg, rgba(0,0,0,0.00) 0%, rgba(0,0,0,0.25) 100%);
}

@keyframes bg-shift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(30px, -24px) scale(1.05); }
  66%      { transform: translate(-26px, 18px) scale(0.97); }
}

img { max-width: 100%; display: block; }
a  { color: inherit; text-decoration: none; }
ul { list-style: none; }
strong { font-weight: 600; }

/* ─── KEYFRAME ANIMATIONS ─────────────────────────────────────────── */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(13, 148, 136, 0.4); }
  50% { box-shadow: 0 0 20px 10px rgba(13, 148, 136, 0); }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes wave {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

@keyframes bounce-subtle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

@keyframes scale-in {
  0% { transform: scale(0.8); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes slide-up-elastic {
  0% { transform: translateY(30px); opacity: 0; }
  60% { transform: translateY(-5px); }
  100% { transform: translateY(0); opacity: 1; }
}

@keyframes rotate-glow {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

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

/* ─── SCROLLBAR, PROGRESS & SELECTION ──────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-2); }
::-webkit-scrollbar-thumb { background: var(--text-muted); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

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

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  background: var(--gradient-1);
  z-index: 1001;
  width: 0%;
  transition: width 0.15s ease-out;
  box-shadow: 0 0 10px var(--accent-light);
  box-shadow: 0 0 15px var(--accent);
}

.scroll-progress::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 50px;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4));
  animation: shimmer 2s infinite;
}

/* ─── CONTAINER ─────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ─── SECTION BASE ──────────────────────────────────────── */
.section { padding: 110px 0; }

.section__header {
  display: flex;
  align-items: baseline;
  gap: 20px;
  margin-bottom: 56px;
  position: relative;
}

.section__number {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--accent);
  opacity: 0.7;
}

.section__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  line-height: 1.1;
  position: relative;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--text) 0%, var(--text-muted) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

[data-theme="dark"] .section__title {
  background: linear-gradient(135deg, var(--text) 0%, var(--bg-card) 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.section__title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 60px;
  height: 4px;
  background: var(--gradient-1);
  border-radius: 99px;
  transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 0 12px var(--accent-light);
}

.section__title:hover::after { width: 120px; }

/* ─── BUTTONS ───────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(255,255,255,0.1), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.btn:hover::before { opacity: 1; }

.btn--sm { padding: 10px 18px; font-size: 0.85rem; }

.btn--primary {
  background: var(--gradient-1);
  color: #fff;
  border-color: transparent;
  position: relative;
}
.btn--primary::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: var(--radius-sm);
  background: var(--gradient-1);
  opacity: 0;
  z-index: -1;
  filter: blur(12px);
  transition: opacity 0.4s ease;
}
.btn--primary:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 12px 30px rgba(13, 148, 136, 0.35);
}
.btn--primary:hover::after {
  opacity: 0.4;
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
  transform: translateY(-2px);
}

.btn--full { width: 100%; }

/* ─── NAV ───────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}
.nav.hidden-up { transform: translateY(-100%); }
.nav.scrolled {
  box-shadow: var(--shadow-md);
  background: var(--nav-bg-scrolled);
  border-bottom-color: transparent;
}

.nav__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  transition: all 0.3s ease;
  cursor: pointer;
}
.nav__logo:hover { 
  transform: scale(1.05) rotate(-2deg);
  text-shadow: 0 0 20px var(--accent-light);
}
.nav__logo .dot { color: var(--accent); }

.nav__links {
  display: flex;
  gap: 32px;
}

.nav__links a {
  position: relative;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition);
  padding: 8px 0;
  cursor: pointer;
}

.nav__links a::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: var(--accent-light);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.4s ease;
  z-index: -1;
}

.nav__links a:hover::before {
  width: 120%;
  height: 150%;
}

.nav__links a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 50%;
  background: var(--accent);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateX(-50%);
}
.nav__links a:hover { 
  color: var(--accent); 
}
.nav__links a:hover::after { 
  width: 100%; 
}

.nav__links a.active {
  color: var(--accent);
  font-weight: 700;
}
.nav__links a.active::after {
  width: 100%;
  height: 3px;
  box-shadow: 0 0 10px var(--accent);
}

.nav__actions { display: flex; align-items: center; gap: 8px; }

.nav__cv-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--gradient-1);
  color: #fff;
  border-radius: 99px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  transition: all var(--transition);
  white-space: nowrap;
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.nav__cv-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(255,255,255,0.15), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.nav__cv-btn:hover::before { opacity: 1; }
.nav__cv-btn:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 20px rgba(13, 148, 136, 0.35);
}
.nav__cv-btn:active {
  transform: scale(0.95);
}
.nav__cv-btn i { font-size: 0.9rem; }

/* ─── LANGUAGE TOGGLE ────────────────────────────────────── */
.lang-toggle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-card);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all 0.4s ease;
  font-size: 0.8rem;
  font-weight: 700;
  font-family: var(--font-display);
  letter-spacing: 0.05em;
  position: relative;
  overflow: hidden;
}
.lang-toggle::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-1);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.lang-toggle:hover::before {
  opacity: 0.1;
}
.lang-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: scale(1.05) translateY(-3px);
  box-shadow: var(--shadow-glow);
}
.lang-toggle:active {
  transform: scale(0.95);
}

.theme-toggle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-card);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all 0.4s ease;
  font-size: 1rem;
  position: relative;
  overflow: hidden;
}

.theme-toggle::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-1);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.theme-toggle:hover::before {
  opacity: 0.1;
}

.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: rotate(15deg) scale(1.05) translateY(-3px);
  box-shadow: var(--shadow-glow);
}

.theme-toggle:active {
  transform: scale(0.95);
}

.theme-toggle__icon { transition: all 0.3s ease; }
.theme-toggle__icon.moon { position: absolute; opacity: 0; transform: scale(0.5); }

[data-theme="dark"] .theme-toggle__icon.sun  { opacity: 0; transform: scale(0.5); }
[data-theme="dark"] .theme-toggle__icon.moon { opacity: 1; transform: scale(1); }

.nav__burger {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  position: relative;
}

.nav__burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all var(--transition);
  position: relative;
}

.nav__burger:hover span:nth-child(1) { transform: translateY(-2px); }
.nav__burger:hover span:nth-child(3) { transform: translateY(2px); }

.nav__burger.open span:nth-child(1) { 
  transform: rotate(45deg) translate(5px,5px); 
  background: var(--accent);
}
.nav__burger.open span:nth-child(2) { 
  opacity: 0; 
  transform: translateX(-10px); 
}
.nav__burger.open span:nth-child(3) { 
  transform: rotate(-45deg) translate(5px,-5px); 
  background: var(--accent);
}

.nav__mobile {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 20px 24px 32px;
  box-shadow: var(--shadow-lg);
}
.nav__mobile.open { 
  display: block; 
  animation: slideDown 0.3s ease; 
}
.nav__mobile ul { display: flex; flex-direction: column; gap: 8px; }
.nav__mobile a {
  display: block;
  padding: 14px 16px;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  border-radius: var(--radius-xs);
  transition: all 0.2s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.nav__mobile a::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 3px;
  background: var(--accent);
  transform: scaleY(0);
  transition: transform 0.3s ease;
}

.nav__mobile a:hover { 
  color: var(--accent); 
  background: var(--accent-light);
  padding-left: 24px;
}

.nav__mobile a:hover::before {
  transform: scaleY(1);
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

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

.hero__bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
  z-index: -1;
  opacity: 0.15;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black 20%, transparent 70%);
}

.hero__blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.4;
  pointer-events: none;
  z-index: 0;
  transition: transform 0.3s ease;
}
.blob-1 {
  width: 720px; height: 720px;
  background: linear-gradient(135deg, #0D9488, #14B8A6);
  top: -260px; right: -260px;
  animation: blobFloat 18s ease-in-out infinite;
}
.blob-2 {
  width: 520px; height: 520px;
  background: #6366F1;
  bottom: -160px; left: -200px;
  animation: blobFloat 22s ease-in-out infinite reverse;
  opacity: 0.35;
}
.blob-3 {
  width: 320px; height: 320px;
  background: #F59E0B;
  top: 42%; left: 26%;
  animation: blobFloat 26s ease-in-out infinite;
  opacity: 0.2;
}

@keyframes blobFloat {
  0%, 100% { transform: translate(0,0) scale(1); }
  33%       { transform: translate(40px,-50px) scale(1.08); }
  66%       { transform: translate(-30px,30px) scale(0.96); }
}

.hero__content {
  position: relative;
  z-index: 1;
  flex: 1;
  max-width: 620px;
}

.hero__tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  background: var(--accent-light);
  border: 1px solid rgba(13, 148, 136, 0.2);
  border-radius: 99px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 24px;
  letter-spacing: 0.02em;
  animation: slide-up-elastic 0.8s var(--transition-smooth) forwards;
  opacity: 0;
  transition: all 0.3s ease;
}
.hero__tag:hover {
  border-color: var(--accent);
  box-shadow: 0 0 20px var(--accent-light);
  transform: scale(1.03);
}

.status-dot {
  width: 8px; height: 8px;
  background: #22C55E;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
  animation: pulse-glow 2s infinite;
}

.hero__name {
  font-family: var(--font-display);
  font-size: clamp(3rem, 9vw, 5.5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
  animation: slide-up-elastic 0.8s var(--transition-smooth) 0.1s forwards;
  opacity: 0;
}

.outline-text {
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% 200%;
  animation: gradient-shift 4s ease infinite;
}

.hero__role {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 28px;
  min-height: 1.5em;
  letter-spacing: -0.01em;
  animation: slide-up-elastic 0.8s var(--transition-smooth) 0.2s forwards;
  opacity: 0;
}
.typed-wrapper { position: relative; display: inline-block; }
#typed { color: var(--accent); font-weight: 600; }
.cursor-blink {
  animation: blink 0.8s step-end infinite;
  color: var(--accent);
  display: inline-block;
  font-size: 1.2em;
  font-weight: 300;
  line-height: 1;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }

.hero__desc {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 520px;
  margin-bottom: 36px;
  line-height: 1.75;
  animation: slide-up-elastic 0.8s var(--transition-smooth) 0.3s forwards;
  opacity: 0;
}

.hero__desc strong {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.01em;
}

.hero__ctas {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 50px;
  animation: slide-up-elastic 0.8s var(--transition-smooth) 0.4s forwards;
  opacity: 0;
}

/* Hero visual - Mejorado con animaciones premium */
.hero__visual {
  position: relative;
  flex-shrink: 0;
  width: 400px;
  height: 480px;
  margin-left: 80px;
  perspective: 1000px;
  animation: scale-in 1s var(--transition-smooth) 0.5s forwards;
  opacity: 0;
}

.hero__card {
  position: absolute;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-md);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  overflow: hidden;
}

.hero__card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  transition: left 0.6s ease;
}

.hero__card:hover::before {
  left: 100%;
}

.card-float { animation: cardFloat 6s ease-in-out infinite; }

@keyframes cardFloat {
  0%, 100% { transform: translateY(0) rotateY(-5deg); }
  50%       { transform: translateY(-15px) rotateY(5deg); }
}

.hero__card:nth-child(1) {
  top: 0;
  left: 0;
  width: 240px;
  animation-delay: 0s;
  z-index: 3;
}
.hero__card:nth-child(1):hover { 
  transform: translateY(-15px) rotateY(-10deg) scale(1.03); 
  box-shadow: var(--shadow-lg), 0 0 30px rgba(13, 148, 136, 0.2);
}

.hero__card:nth-child(2) {
  top: 160px;
  right: 0;
  width: 180px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation-delay: 2s;
  z-index: 2;
}
.hero__card:nth-child(2):hover { 
  transform: translateY(-15px) rotateY(10deg) scale(1.03); 
  box-shadow: var(--shadow-lg), 0 0 30px rgba(99, 102, 241, 0.2);
}

.hero__card:nth-child(3) {
  top: 320px;
  left: 30px;
  width: 240px;
  animation-delay: 1s;
  z-index: 1;
}
.hero__card:nth-child(3):hover { 
  transform: translateY(-15px) rotateY(-8deg) scale(1.03); 
  box-shadow: var(--shadow-lg), 0 0 30px rgba(245, 158, 11, 0.2);
}

.card-chip {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-chip::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--gradient-1);
  border-radius: 50%;
  animation: pulse-glow 2s infinite;
}

.card-content {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.card-bar {
  height: 6px;
  background: var(--bg-2);
  border-radius: 99px;
  overflow: hidden;
  margin-top: 12px;
  position: relative;
}

.card-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transform: translateX(-100%);
  animation: shimmer 2s infinite;
}

.card-bar__fill {
  height: 100%;
  background: var(--gradient-1);
  border-radius: 99px;
  width: 0;
  transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1) 0.3s;
}
.card-bar__fill.animated { width: var(--w, 75%); }

/* ─── ABOUT ─────────────────────────────────────────────── */
.about { background: transparent; }

.about__grid {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 80px;
  align-items: center;
}

.about__lead {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 20px;
  color: var(--text);
}

.about__lead strong,
.about__text p strong {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.01em;
}

.about__text p {
  color: var(--text-muted);
  margin-bottom: 18px;
}

.about__stats {
  display: flex;
  gap: 48px;
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}
.stat-item { display: flex; flex-direction: column; gap: 4px; }
.stat-num {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  letter-spacing: -0.02em;
}
.stat-num::after { content: '+'; font-size: 1.5rem; opacity: 0.6; }
.stat-label { font-size: 0.82rem; color: var(--text-muted); font-weight: 500; }

.about__image-wrap { position: relative; }

.about__image-frame {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.about__image-frame::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--gradient-1);
}

.about__image-frame::after {
  content: '';
  position: absolute;
  bottom: 0; right: 0;
  width: 150px;
  height: 150px;
  background: var(--accent-light);
  border-radius: 50%;
  filter: blur(40px);
  z-index: 0;
}

.about__avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--gradient-1);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  box-shadow: 0 0 0 4px var(--bg-card), 0 0 30px var(--accent-light);
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.about__avatar:hover {
  transform: scale(1.08);
}

.about__avatar-initials {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.05em;
}

.about__tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--bg-2);
  border-radius: 99px;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
  position: relative;
  z-index: 1;
}

/* ─── SKILLS ────────────────────────────────────────────── */
.skills { background: transparent; position: relative; }

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

.skill-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
  overflow: hidden;
  cursor: default;
}

.skill-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-1);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.skill-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--accent-light) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.skill-card:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  border-color: var(--accent);
}

.skill-card:hover::before { transform: scaleX(1); }
.skill-card:hover::after { opacity: 1; }

.skill-card__icon {
  width: 52px; height: 52px;
  background: var(--accent-light);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--accent);
  margin-bottom: 18px;
  transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
}

.skill-card__icon::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--accent);
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.4s ease;
}

.skill-card:hover .skill-card__icon {
  transform: scale(1.15) rotate(8deg);
  background: var(--accent);
  color: #fff;
}

.skill-card:hover .skill-card__icon::after {
  opacity: 0.4;
  transform: scale(1);
}

.skill-card h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
  transition: color 0.3s ease;
}
.skill-card:hover h3 { color: var(--accent); }

.skill-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 20px;
}

.skill-bar {
  height: 5px;
  background: var(--bg-2);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 10px;
  position: relative;
}

.skill-bar::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transform: translateX(-100%);
  animation: shimmer 3s infinite;
}

.skill-bar__fill {
  height: 100%;
  background: var(--gradient-1);
  border-radius: 99px;
  width: 0;
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  box-shadow: 0 0 12px var(--accent-light);
}

.skill-bar__fill::after {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 30%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3));
  border-radius: 99px;
}

.skill-level {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: all 0.3s ease;
}
.skill-card:hover .skill-level {
  transform: translateX(4px);
}

/* ─── EXPERIENCE / TIMELINE ─────────────────────────────── */
.experience { background: transparent; }

.timeline { display: flex; flex-direction: column; gap: 0; }

.timeline__item {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 28px;
  position: relative;
}

.timeline__marker { display: flex; flex-direction: column; align-items: center; }

.timeline__dot {
  width: 16px; height: 16px;
  background: var(--gradient-1);
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  box-shadow: 0 0 0 4px var(--bg), 0 0 20px var(--accent-light);
  animation: timelinePulse 3s infinite ease-out;
}

@keyframes timelinePulse {
  0% { box-shadow: 0 0 0 0 rgba(13, 148, 136, 0.4); }
  70% { box-shadow: 0 0 0 12px rgba(13, 148, 136, 0); }
  100% { box-shadow: 0 0 0 0 rgba(13, 148, 136, 0); }
}

.timeline__line {
  width: 2px;
  flex: 1;
  background: linear-gradient(to bottom, var(--accent), var(--border));
  margin-top: 8px;
  min-height: 80px;
}

.timeline__content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 40px;
  box-shadow: var(--shadow-sm);
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.timeline__content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--gradient-1);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.timeline__content:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
}

.timeline__content:hover::before { opacity: 1; }

.timeline__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.timeline__content--bg {
  position: relative;
  isolation: isolate;
}
.timeline__content--bg::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  background: url('../assets/media/fotocmpc.jpeg') center 70% / cover no-repeat;
  opacity: 0.09;
  z-index: -1;
  transition: opacity 0.5s ease;
}
.timeline__content--bg:hover::after {
  opacity: 0.15;
}

.timeline__photo-top {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
  aspect-ratio: 1280 / 459;
  opacity: 0.35;
  mask-image: linear-gradient(to bottom, #000 70%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, #000 70%, transparent 100%);
  border-radius: var(--radius) var(--radius) 0 0;
  z-index: -1;
  pointer-events: none;
}

.timeline__role {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.timeline__company {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.88rem;
  color: var(--text-muted);
  font-weight: 500;
}

.timeline__date {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
  padding: 6px 14px;
  background: var(--accent-light);
  border-radius: 99px;
  white-space: nowrap;
}

.timeline__list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; padding-left: 18px; }
.timeline__list li {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.6;
  position: relative;
}

.timeline__list li strong {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.01em;
}
.timeline__list li::before {
  content: '→';
  position: absolute;
  left: -18px;
  color: var(--accent);
  font-weight: 600;
}

.timeline__tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 6px 14px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 99px;
  color: var(--text-muted);
  transition: all 0.3s ease;
}
.tag:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
  transform: translateY(-2px);
}

/* ─── PROJECTS ─────────────────── */
.projects { background: transparent; position: relative; }

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

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
  cursor: pointer;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, transparent 0%, var(--accent-light) 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 0;
}

.project-card:hover {
  transform: translateY(-14px) scale(1.02);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  border-color: var(--accent);
}

.project-card:hover::before { opacity: 1; }

.project-card__media {
  position: relative;
  width: 100%;
  height: 220px;
  background: var(--bg-2);
  overflow: hidden;
  z-index: 1;
}

.project-media__img,
.project-media__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.project-media__video {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.project-card:hover .project-media__img { 
  transform: scale(1.12); 
}

.project-card:hover .project-media__video { 
  opacity: 1; 
}

.project-card__media::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, transparent 50%, rgba(0,0,0,0.3) 100%);
  pointer-events: none;
}

.project-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(12, 10, 9, 0.9) 0%, rgba(12, 10, 9, 0.4) 50%, transparent 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  opacity: 0;
  transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 3;
  padding: 20px;
}

.project-card:hover .project-card__overlay {
  opacity: 1;
}

.project-card__overlay .btn {
  transform: translateY(30px) scale(0.85);
  opacity: 0;
  transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.project-card:hover .project-card__overlay .btn {
  transform: translateY(0) scale(1);
  opacity: 1;
}
.project-card:hover .project-card__overlay .btn:nth-child(2) { transition-delay: 0.1s; }

.project-card__body {
  padding: 28px;
  display: flex;
  flex-direction: column;
  flex: 1;
  position: relative;
  z-index: 1;
}

.project-card__header { margin-bottom: 16px; }

.project-card__icon {
  width: 52px; height: 52px;
  background: var(--accent-light);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: var(--accent);
  transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
}

.project-card__icon::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: var(--radius-sm);
  border: 2px dashed var(--accent);
  opacity: 0;
  transform: rotate(0deg);
  transition: all 0.5s ease;
}

.project-card:hover .project-card__icon {
  background: var(--accent);
  color: #fff;
  transform: scale(1.15) rotate(5deg);
}

.project-card:hover .project-card__icon::before {
  opacity: 0.3;
  transform: rotate(180deg);
}

.project-card__title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
  transition: color 0.3s ease;
}

.project-card:hover .project-card__title {
  color: var(--accent);
}

.status-dev {
  display: inline-block;
  color: #F59E0B;
  font-weight: 700;
  font-size: 0.7rem;
  background: rgba(245, 158, 11, 0.12);
  padding: 2px 10px;
  border-radius: 99px;
  animation: text-pulse 2s ease-in-out infinite;
  letter-spacing: 0.02em;
  white-space: nowrap;
  vertical-align: middle;
}
.status-done {
  display: inline-block;
  color: #22C55E;
  font-weight: 700;
  font-size: 0.7rem;
  background: rgba(34, 197, 94, 0.08);
  padding: 2px 10px;
  border-radius: 99px;
  letter-spacing: 0.02em;
  white-space: nowrap;
  vertical-align: middle;
}

@keyframes text-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.project-card__desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 20px;
  flex: 1;
  transition: color 0.3s ease;
}

.project-card:hover .project-card__desc {
  color: var(--text);
}

.project-card__highlights {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}
.highlight-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--text-muted);
  transition: all 0.3s ease;
}
.highlight-item i { 
  color: #22C55E; 
  font-size: 0.8rem; 
  transition: transform 0.3s ease;
}

.project-card:hover .highlight-item {
  transform: translateX(6px);
}
.project-card:hover .highlight-item i {
  transform: scale(1.2);
}

.project-card__tech { 
  display: flex; 
  flex-wrap: wrap; 
  gap: 8px; 
  margin-top: auto; 
}
.tech-tag {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 6px 14px;
  background: var(--bg-2);
  color: var(--text-muted);
  border-radius: 99px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.tech-tag:hover {
  background: var(--accent-light);
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-2px);
}

.project-card:hover .tech-tag {
  background: var(--accent-light);
  color: var(--accent);
}

.project-card--cta {
  background: linear-gradient(135deg, var(--accent-light) 0%, rgba(99, 102, 241, 0.1) 100%);
  border-color: var(--accent);
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 40px;
  cursor: pointer;
}
.project-cta__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
.project-cta__icon {
  font-size: 3.5rem;
  color: var(--accent);
  opacity: 0.6;
  transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.project-card--cta:hover .project-cta__icon {
  opacity: 1;
  transform: scale(1.15) translateY(-8px);
  animation: bounce-subtle 1s infinite;
}
.project-cta__inner h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  transition: color 0.3s ease;
}
.project-card--cta:hover h3 { color: var(--accent); }
.project-cta__inner p { font-size: 0.9rem; color: var(--text-muted); }

/* ─── CERTIFICATIONS ──────────────────────────────────────── */
.certifications { background: transparent; position: relative; }

.cert__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  max-width: 900px;
  margin: 0 auto;
}

.cert-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
  cursor: default;
  display: flex;
  flex-direction: column;
}

.cert-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 0%, var(--accent-light) 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 1;
}

.cert-card:hover {
  transform: translateY(-14px) scale(1.02);
  box-shadow: var(--shadow-lg), var(--shadow-glow-2);
  border-color: var(--accent);
}

.cert-card:hover::before { opacity: 1; }

.cert-card__media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--bg-card);
  overflow: hidden;
  z-index: 1;
}

.cert-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(var(--zoom, 1));
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.cert-card:hover .cert-card__media img {
  transform: scale(calc(var(--zoom, 1) * 1.08));
}

.cert-card__media-shimmer {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
  transform: translateX(-100%);
  animation: shimmer 3s infinite;
  pointer-events: none;
}

.cert-card__media::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60%;
  background: linear-gradient(to top, rgba(0,0,0,0.4) 0%, transparent 100%);
  pointer-events: none;
}

.cert-card__body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
  position: relative;
  z-index: 2;
}

.cert-card__header { margin-bottom: 14px; }

.cert-card__icon {
  width: 44px;
  height: 44px;
  background: var(--accent-light);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--accent);
  transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
}

.cert-card:hover .cert-card__icon {
  background: var(--accent);
  color: #fff;
  transform: scale(1.12) rotate(5deg);
}

.cert-card__title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
  line-height: 1.3;
  transition: color 0.3s ease;
}

.cert-card:hover .cert-card__title { color: var(--accent); }

.cert-card__issuer {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 6px;
}
.cert-card__issuer i { font-size: 0.75rem; color: var(--accent); }

.cert-card__date {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent);
  padding: 4px 10px;
  background: var(--accent-light);
  border-radius: 99px;
  align-self: flex-start;
  margin-bottom: 14px;
  letter-spacing: 0.05em;
}

.cert-card__desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 20px;
  flex: 1;
  transition: color 0.3s ease;
}

.cert-card:hover .cert-card__desc { color: var(--text); }

.cert-card__btn {
  align-self: flex-start;
  margin-top: auto;
}

/* ─── PROJECT AUTO-PLAY ON MOBILE ────────────────────────── */
@media (max-width: 600px) {
  .project-card--active {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--shadow-lg), var(--shadow-glow) !important;
    border-color: var(--accent) !important;
  }

  .project-card--active::before { opacity: 1 !important; }

  .project-card--active .project-media__img {
    transform: scale(1.1);
  }

  .project-card--active .project-media__video {
    opacity: 1 !important;
  }

  .project-card--active .project-card__overlay {
    opacity: 1 !important;
  }

  .project-card--active .project-card__overlay .btn {
    transform: translateY(0) scale(1) !important;
    opacity: 1 !important;
  }

  .project-card--active .project-card__icon {
    background: var(--accent) !important;
    color: #fff !important;
    transform: scale(1.1) rotate(5deg) !important;
  }

  .project-card--active .project-card__title {
    color: var(--accent) !important;
  }

  .project-card--active .project-card__desc {
    color: var(--text) !important;
  }

  .project-card--active .highlight-item {
    transform: translateX(4px) !important;
  }

  .project-card--active .tech-tag {
    background: var(--accent-light) !important;
    color: var(--accent) !important;
  }

  /* Skills auto-activate */
  .skill-card--active {
    transform: translateY(-8px) scale(1.02) !important;
    box-shadow: var(--shadow-lg), var(--shadow-glow) !important;
    border-color: var(--accent) !important;
  }

  .skill-card--active::before { transform: scaleX(1) !important; }

  .skill-card--active .skill-card__icon {
    transform: scale(1.1) rotate(5deg) !important;
    background: var(--accent) !important;
    color: #fff !important;
  }

  .skill-card--active h3 { color: var(--accent) !important; }

  .skill-card--active .skill-level { transform: translateX(4px) !important; }

  /* Experience auto-activate */
  .timeline__content--active {
    transform: translateY(-4px) !important;
    box-shadow: var(--shadow-md) !important;
    border-color: var(--accent) !important;
  }

  .timeline__content--active::before { opacity: 1 !important; }

  /* About card auto-activate */
  .about__image-frame--active {
    transform: scale(1.02) !important;
    box-shadow: var(--shadow-lg), var(--shadow-glow) !important;
  }

  .about__image-frame--active::after {
    opacity: 0.5 !important;
  }

  /* Contact auto-activate */
  .contact-link--active {
    border-color: var(--accent) !important;
    transform: translateX(8px) !important;
    box-shadow: var(--shadow-md), var(--shadow-glow) !important;
  }

  .contact-link--active::before {
    transform: scaleY(1) !important;
  }

  .contact-link--active .contact-link__icon {
    background: var(--accent) !important;
    color: #fff !important;
    transform: scale(1.1) rotate(5deg) !important;
    box-shadow: 0 0 20px var(--accent-light) !important;
  }

  .contact-link--active .contact-link__value {
    color: var(--accent) !important;
  }

  /* Certifications auto-activate */
  .cert-card--active {
    transform: translateY(-8px) scale(1.02) !important;
    box-shadow: var(--shadow-lg), var(--shadow-glow-2) !important;
    border-color: var(--accent) !important;
  }

  .cert-card--active::before { opacity: 1 !important; }

  .cert-card--active .cert-card__media img {
    transform: scale(1.08) !important;
  }

  .cert-card--active .cert-card__icon {
    background: var(--accent) !important;
    color: #fff !important;
    transform: scale(1.12) rotate(5deg) !important;
  }

  .cert-card--active .cert-card__title {
    color: var(--accent) !important;
  }

  .cert-card--active .cert-card__desc {
    color: var(--text) !important;
  }
}

/* ─── CONTACT ───────────────────────────────────────────── */
.contact { background: transparent; }

.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 80px;
  align-items: start;
}

.contact__lead {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  line-height: 1.5;
  margin-bottom: 36px;
}

.contact__links { display: flex; flex-direction: column; gap: 14px; }

.contact-link {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.contact-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--accent);
  transform: scaleY(0);
  transition: transform 0.3s ease;
}

.contact-link:hover {
  border-color: var(--accent);
  transform: translateX(12px);
  box-shadow: var(--shadow-md), var(--shadow-glow);
}

.contact-link:hover::before {
  transform: scaleY(1);
}

.contact-link:hover .contact-link__icon {
  background: var(--accent);
  color: #fff;
  transform: scale(1.15) rotate(5deg);
  box-shadow: 0 0 20px var(--accent-light);
}

.contact-link:active {
  transform: translateX(8px) scale(0.98);
}

.contact-link__icon {
  width: 48px; height: 48px;
  background: var(--accent-light);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--accent);
  flex-shrink: 0;
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
}

.contact-link > div { display: flex; flex-direction: column; gap: 2px; }
.contact-link__label { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.12em; font-weight: 600; }
.contact-link__value { font-size: 0.95rem; font-weight: 600; color: var(--text); transition: color 0.3s ease; }
.contact-link:hover .contact-link__value { color: var(--accent); }

.contact__form { display: flex; flex-direction: column; gap: 22px; }

.form-group { display: flex; flex-direction: column; gap: 8px; position: relative; }

.form-group label {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-group label::after {
  content: '*';
  color: var(--accent);
}

.form-group input,
.form-group textarea {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text);
  resize: vertical;
  outline: none;
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
}

.form-group input::placeholder,
.form-group textarea::placeholder { 
  color: var(--text-muted); 
  opacity: 0.4;
  transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-light), var(--shadow-md);
  transform: translateY(-3px);
}

.form-group input:focus::placeholder,
.form-group textarea:focus::placeholder {
  opacity: 0.3;
}

.form-group input:hover,
.form-group textarea:hover {
  border-color: var(--text-muted);
}

.form-group input.error,
.form-group textarea.error { 
  border-color: #EF4444; 
  animation: shake 0.5s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-5px); }
  40%, 80% { transform: translateX(5px); }
}

.form-error { 
  font-size: 0.78rem; 
  color: #EF4444; 
  min-height: 1.2em;
}

.form-success {
  display: none;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid #22C55E;
  border-radius: var(--radius-sm);
  color: #22C55E;
  font-weight: 600;
  font-size: 0.9rem;
}
.form-success.show { 
  display: flex; 
  animation: slide-up-elastic 0.5s ease; 
}

.form-success::before {
  content: '✓';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: #22C55E;
  color: #fff;
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 700;
  animation: scale-in 0.3s ease;
}

/* ─── BACK TO TOP ────────────────────────────────────────── */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--gradient-1);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: 0 4px 20px rgba(13, 148, 136, 0.35);
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 999;
  opacity: 0;
  transform: translateY(20px) scale(0.8);
  pointer-events: none;
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.back-to-top:hover {
  transform: translateY(-4px) scale(1.08);
  box-shadow: 0 8px 30px rgba(13, 148, 136, 0.5);
}

.back-to-top:active {
  transform: scale(0.92);
}

/* ─── FOOTER ────────────────────────────────────────────── */
.footer {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  padding: 40px 0;
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.footer__logo {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text);
}
.footer__logo .dot { color: var(--accent); }

.footer__copy { font-size: 0.85rem; color: var(--text-muted); }

.footer__socials { display: flex; gap: 10px; }
.footer__socials a {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: all 0.3s ease;
}
.footer__socials a:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
  transform: translateY(-4px) rotate(8deg);
}

/* ─── ANIMATIONS & REVEALS ────────────────────────────────────────── */
.fade-up {
  opacity: 1;
  transform: none;
  animation: none;
}
@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

.delay-1 { animation-delay: 0.15s; }
.delay-2 { animation-delay: 0.3s; }
.delay-3 { animation-delay: 0.45s; }
.delay-4 { animation-delay: 0.6s; }
.delay-5 { animation-delay: 0.8s; }

.reveal {
  opacity: 1;
  transform: none;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}
.reveal.delay-1 { transition-delay: 0.1s; }
.reveal.delay-2 { transition-delay: 0.2s; }
.reveal.delay-3 { transition-delay: 0.3s; }

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

/* Tablet Grande - 1100px */
@media (max-width: 1100px) {
  .container { max-width: 900px; }
  .hero { flex-direction: column; text-align: center; padding: 130px 24px 60px; }
  .hero__content { max-width: 100%; }
  .hero__desc { max-width: 100%; margin: 0 auto 36px; }
  .hero__ctas { justify-content: center; }
  .hero__visual { margin: 50px auto 0; width: 100%; max-width: 380px; }
  
  .skills__grid { grid-template-columns: repeat(2, 1fr); }
  .projects__grid { grid-template-columns: repeat(2, 1fr); }
  .cert__grid { grid-template-columns: repeat(2, 1fr); }
  .about__grid { gap: 50px; }
  .contact__grid { gap: 50px; }
}

/* Tablet - 900px */
@media (max-width: 900px) {
  .container { max-width: 700px; }
  
  .nav__inner { height: 64px; }
  .nav__links { gap: 20px; }
  
  .hero { padding: 110px 20px 50px; }
  .hero__visual { max-width: 340px; height: 420px; }
  .hero__card:nth-child(1) { width: 200px; }
  .hero__card:nth-child(2) { width: 160px; top: 140px; }
  .hero__card:nth-child(3) { width: 200px; top: 280px; left: 20px; }
  
  .skills__grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .skill-card { padding: 22px; }
  .skill-card__icon { width: 44px; height: 44px; font-size: 1.2rem; }
  
  .projects__grid { grid-template-columns: 1fr 1fr; gap: 20px; }
  .project-card__media { height: 200px; }
  .project-card__body { padding: 22px; }
  
  .about__grid { grid-template-columns: 1fr; gap: 40px; }
  .about__image-wrap { order: -1; max-width: 320px; margin: 0 auto; }
  .about__stats { gap: 32px; }
  
  .contact__grid { grid-template-columns: 1fr; gap: 40px; }
  .timeline__item { grid-template-columns: 40px 1fr; gap: 20px; }
}

/* Tablet Chico / iPad - 768px */
@media (max-width: 768px) {
  .container { max-width: 100%; padding: 0 20px; }

  .hero__visual { max-width: 280px; height: 360px; }
  .hero__card:nth-child(1) { width: 170px; }
  .hero__card:nth-child(2) { width: 140px; top: 120px; }
  .hero__card:nth-child(3) { width: 170px; top: 240px; left: 15px; }

  .about__grid { grid-template-columns: 1fr; gap: 40px; }
  .about__image-wrap { order: -1; max-width: 280px; margin: 0 auto; }

  .contact__grid { grid-template-columns: 1fr; gap: 40px; }
}

/* Mobile Grande - 600px */
@media (max-width: 600px) {
  .container { max-width: 100%; padding: 0 16px; }
  
  .section { padding: 70px 0; }
  .section__header { margin-bottom: 40px; flex-direction: column; gap: 8px; }
  .section__title { font-size: 1.8rem; }
  .section__number { font-size: 0.7rem; }
  
  .nav { 
    background: var(--nav-bg);
    backdrop-filter: blur(16px);
  }
  .nav__inner { height: 60px; padding: 0 16px; }
  .nav__logo { font-size: 1.4rem; }
  .nav__links { display: none; }
  .nav__burger { display: flex; padding: 10px; }
  .nav__mobile {
    left: 0; right: 0;
    padding: 16px 16px 24px;
  }
  .nav__mobile a { padding: 14px 16px; font-size: 0.95rem; }
  .theme-toggle { width: 40px; height: 40px; }
  .lang-toggle { width: 40px; height: 40px; font-size: 0.7rem; }
  
  .hero { 
    min-height: auto; 
    padding: 100px 16px 50px;
    display: flex;
    flex-direction: column;
  }
  .hero__tag {
    padding: 8px 14px;
    font-size: 0.7rem;
    margin-bottom: 20px;
  }
  .hero__name {
    font-size: clamp(2.2rem, 12vw, 3rem);
    line-height: 1.1;
    margin-bottom: 12px;
  }
  .hero__role {
    font-size: 1rem;
    margin-bottom: 20px;
  }
  .hero__desc {
    font-size: 0.95rem;
    margin-bottom: 28px;
  }
  .hero__ctas {
    flex-direction: column;
    gap: 12px;
    margin-bottom: 30px;
  }
  .hero__ctas .btn {
    width: 100%;
    justify-content: center;
  }
  .hero__visual { display: none; }
  
  .hero__bg-grid {
    background-size: 40px 40px;
    opacity: 0.3;
  }
  .blob-1 { width: 250px; height: 250px; top: -80px; right: -80px; }
  .blob-2 { width: 180px; height: 180px; left: -60px; bottom: -60px; }
  
  .about__lead { font-size: 1.25rem; }
  .about__text p { font-size: 0.9rem; }
  .about__stats {
    flex-direction: row;
    justify-content: center;
    gap: 24px;
    padding-top: 24px;
  }
  .stat-num { font-size: 2rem; }
  .stat-label { font-size: 0.7rem; text-align: center; }
  .about__avatar { width: 100px; height: 100px; }
  .about__avatar-initials { font-size: 1.8rem; }
  .about__image-frame { padding: 28px; }
  .about__tag-chip { font-size: 0.8rem; padding: 8px 14px; }
  
  .skills__grid { 
    grid-template-columns: 1fr; 
    gap: 14px;
  }
  .skill-card {
    padding: 20px;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 16px;
    align-items: start;
  }
  .skill-card__icon {
    width: 40px; height: 40px;
    font-size: 1.1rem;
    margin-bottom: 0;
  }
  .skill-card h3 { margin-bottom: 6px; }
  .skill-card p {
    font-size: 0.8rem;
    margin-bottom: 12px;
    grid-column: 2;
  }
  .skill-bar { 
    grid-column: 2;
    margin-bottom: 0;
  }
  .skill-level { 
    grid-column: 2;
    font-size: 0.65rem;
  }
  
  .timeline { gap: 0; }
  .timeline__item {
    grid-template-columns: 32px 1fr;
    gap: 14px;
  }
  .timeline__dot { width: 12px; height: 12px; }
  .timeline__line { min-height: 50px; }
  .timeline__content {
    padding: 20px;
    margin-bottom: 24px;
  }
  .timeline__header {
    flex-direction: column;
    gap: 8px;
  }
  .timeline__role { font-size: 1rem; }
  .timeline__company { font-size: 0.8rem; }
  .timeline__date { 
    font-size: 0.7rem; 
    align-self: flex-start;
  }
  .timeline__list { padding-left: 16px; }
  .timeline__list li { font-size: 0.85rem; }
  .timeline__tags { gap: 6px; }
  .tag { font-size: 0.65rem; padding: 4px 10px; }
  .timeline__content--bg::after { display: none; }
  .timeline__photo-top { display: block; }
  .timeline__content--bg .timeline__header { padding-top: 90px; }
  
  .projects__grid,
  .cert__grid { 
    grid-template-columns: 1fr; 
    gap: 24px;
  }
  .project-card__media { height: 200px; }
  .project-card__body { padding: 20px; }
  .project-card__title { font-size: 1.05rem; }
  .project-card__desc { font-size: 0.85rem; }
  .project-card__tech { gap: 6px; }
  .tech-tag { font-size: 0.65rem; padding: 4px 10px; }
  .project-card__overlay { gap: 8px; }
  .project-card__overlay .btn { padding: 10px 16px; font-size: 0.8rem; }
  .project-cta__inner { padding: 20px 0; }
  .project-cta__icon { font-size: 2.2rem; }
  .project-cta__inner h3 { font-size: 1.1rem; }

  .cert-card__media { aspect-ratio: 16 / 9; }
  .cert-card__body { padding: 18px; }
  .cert-card__title { font-size: 0.95rem; }
  .cert-card__desc { font-size: 0.8rem; }
  .cert-card__icon { width: 38px; height: 38px; font-size: 1rem; }
  
  .contact__lead { 
    font-size: 1.15rem; 
    margin-bottom: 24px;
  }
  .contact__links { gap: 12px; }
  .contact-link {
    padding: 14px 16px;
    gap: 12px;
  }
  .contact-link__icon { 
    width: 40px; height: 40px; 
    font-size: 0.95rem; 
  }
  .contact-link__label { font-size: 0.65rem; }
  .contact-link__value { font-size: 0.85rem; }
  
  .contact__form { gap: 16px; }
  .form-group input,
  .form-group textarea {
    padding: 14px 16px;
    font-size: 0.9rem;
  }
  .form-group label { font-size: 0.72rem; }
  .btn { 
    padding: 14px 24px; 
    font-size: 0.9rem; 
  }
  
  .footer { padding: 28px 0; }
  .footer__inner { 
    flex-direction: column; 
    gap: 16px; 
    text-align: center;
  }
  .footer__logo { font-size: 1.1rem; }
  .footer__copy { font-size: 0.75rem; }
  .footer__socials a { 
    width: 36px; height: 36px; 
    font-size: 0.85rem; 
  }
  
  .scroll-progress { height: 2px; }
  
  ::-webkit-scrollbar { width: 4px; }
}

/* Mobile Pequeño - 380px */
@media (max-width: 380px) {
  .container { padding: 0 12px; }
  
  .section { padding: 50px 0; }
  
  .nav__logo { font-size: 1.2rem; }
  .theme-toggle { width: 34px; height: 34px; }
  .lang-toggle { width: 34px; height: 34px; font-size: 0.65rem; }
  
  .hero__name { font-size: 2rem; }
  .hero__desc { font-size: 0.88rem; }
  
  .about__stats { gap: 12px; }
  .stat-num { font-size: 1.4rem; }
  .stat-label { font-size: 0.6rem; }
  
  .skill-card h3 { font-size: 0.95rem; }
  .skill-card p { font-size: 0.75rem; }
  
  .timeline__content { padding: 16px; }
  .timeline__role { font-size: 0.9rem; }
  
  .project-card__media { height: 180px; }
  
  .contact-link__value { font-size: 0.8rem; }
  .btn { padding: 12px 18px; font-size: 0.85rem; }
  
  .back-to-top { bottom: 16px; right: 16px; width: 40px; height: 40px; font-size: 0.95rem; }
}

/* Orientación Landscape en móviles */
@media (max-height: 500px) and (orientation: landscape) {
  .hero {
    min-height: auto;
    padding: 90px 24px 40px;
  }
  .hero__content { max-width: 60%; }
  .hero__visual { 
    display: block;
    width: 250px;
    height: 300px;
    margin-left: 30px;
  }
  .hero__name { font-size: clamp(1.8rem, 6vw, 2.5rem); }
  .hero__tag { margin-bottom: 12px; }
  .hero__desc { font-size: 0.85rem; margin-bottom: 20px; }
  .hero__ctas { gap: 10px; margin-bottom: 0; }
}

/* Dispositivos de alta densidad (Retina) */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .hero__bg-grid {
    background-size: 25px 25px;
  }
}

/* Prefers Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .reveal { 
    opacity: 1; 
    transform: none; 
  }
  .fade-up {
    opacity: 1;
    transform: none;
  }
}