/* ============================================================
   PORTAFOLIO — Iván Taid Ruiz Alcaraz
   Sistema de Diseño: CSS Puro | Liquid Glass | Mesh Gradient
   ============================================================ */

/* ─── GOOGLE FONTS ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@1,900&family=Raleway:wght@400;500;600;700;800;900&family=Inter:wght@300;400;600;700&family=Geist+Mono:wght@400;600;700&display=swap');

/* ─── GOTHAM (licencia propia — coloca los .woff2 en /assets/fonts/) ───
   Nombres esperados (ajústalos si tu export usa otro nombre):
   Gotham-Book.woff2 (400), Gotham-Bold.woff2 (700), Gotham-Black.woff2 (900)
   Si no hay archivos, el navegador usará el fallback (Raleway). */
@font-face {
  font-family: 'Gotham';
  src: url('../assets/fonts/Gotham-Book.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Gotham';
  src: url('../assets/fonts/Gotham-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Gotham';
  src: url('../assets/fonts/Gotham-Black.woff2') format('woff2');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

/* ─── VARIABLES CSS (Design Tokens) ────────────────────────── */
:root {
  /* Paleta de colores */
  --color-primary:          #337bff;
  --color-primary-alt:      #3c5dff;
  --color-accent:           #3aa6ff;
  --color-accent-bright:    #00c8ff;

  --color-bg-dark:          #0b0b0b;
  --color-bg-dark2:         #111111;
  --color-dark:             #262626;
  --color-white:            #ffffff;

  --color-text:             #ffffff;
  --color-text-muted:       #c4c7c8;
  --color-text-dim:         #dddddd;
  --color-text-dark:        #262626;

  --color-badge-experto:    #3aa6ff;
  --color-badge-avanzado:   #ff5b56;
  --color-badge-intermedio: #f3915c;
  --color-badge-basico:     #999999;

  /* Mesh Gradient — degradados */
  --gradient-hero-text:   linear-gradient(to right, #ffffff 0%, #3aa6ff 100%);
  --gradient-card-info:   linear-gradient(129deg, rgba(255,255,255,0.116) 14.8%, rgba(137,137,137,0.251) 88.9%);
  --gradient-btn-square:  linear-gradient(to bottom, #f4f4f4 0%, #86abfb 100%);
  --gradient-academic-1:  linear-gradient(137.5deg, rgba(54,173,224,0.2) 0%, rgb(36,45,85) 50%, rgba(36,45,85,0) 100%);
  --gradient-academic-2:  linear-gradient(137.5deg, rgba(241,111,99,0.2) 0%, rgba(240,129,0,0.1) 50%, rgba(240,129,0,0) 100%);

  /* Liquid Glass — valores exactos extraídos de Figma */
  --glass-nav-bg:           rgba(255, 255, 255, 0.10);
  --glass-nav-border:       1px solid #efefef78;
  --glass-btn-nav-bg:       rgba(170, 170, 170, 0.18);
  --glass-btn-nav-border:   1px solid #efefef6c;
  --glass-hero-barra:       rgba(45, 45, 45, 0.30);
  --glass-hero-btn:         rgba(39, 39, 39, 0.55);
  --glass-dark-card:        rgba(19, 19, 19, 0.50);
  --glass-card-overlay:     rgba(255, 255, 255, 0.05);
  --glass-skill-card:       rgba(15, 15, 18, 0.10);
  --glass-badge-bg:         rgba(15, 15, 18, 0.07);
  --solid-dark-card:        rgb(34, 34, 34);

  --blur-xs:  blur(4px);
  --blur-sm:  blur(8px);
  --blur-md:  blur(16px);
  --blur-lg:  blur(20px);
  --blur-xl:  blur(24px);

  /* Bordes translúcidos 1px */
  --border-glass:       1px solid rgba(255, 255, 255, 0.44);
  --border-glass-sm:    1px solid rgba(255, 255, 255, 0.10);
  --border-glass-white: 1px solid rgba(255, 255, 255, 0.6);
  --border-efefef:      1px solid #efefef;

  /* Sombras */
  --shadow-nav:         0 6px 10.1px rgba(0, 0, 0, 0.25);
  --shadow-card:        0 4px 4px  rgba(0, 0, 0, 0.25);
  --shadow-btn:         0 3px 5px  rgba(0, 0, 0, 0.25);
  --shadow-academic:    0 20px 40px rgba(0, 0, 0, 0.40);
  --shadow-sq-btn:      0 7px 7.5px rgba(66, 130, 213, 0.30);

  /* Border radius */
  --radius-pill:    35px;
  --radius-nav:     69px;
  --radius-btn-nav: 15px;
  --radius-card:    12px;
  --radius-card-lg: 16px;
  --radius-sm:       8px;
  --radius-xs:       3px;

  /* Tipografía */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-gotham:  'Gotham', 'Raleway', system-ui, sans-serif;
  --font-title:   'Raleway', sans-serif;
  --font-body:    'Inter', system-ui, sans-serif;
  --font-mono:    'Geist Mono', 'Courier New', monospace;
  --font-geist:   'Geist', system-ui, sans-serif;

  /* Espaciado de sección */
  --section-px: clamp(24px, 8vw, 120px);
  --section-py: clamp(48px, 6vw, 84px);
  --content-max: 1196px;
}

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

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

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

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

/* ─── UTILIDADES LIQUID GLASS ───────────────────────────────── */

/* Base glass: fondo rgba + backdrop-filter + borde translúcido */
.glass {
  background: var(--glass-nav-bg);
  backdrop-filter: var(--blur-md);
  -webkit-backdrop-filter: var(--blur-md);
  border: var(--border-glass);
  position: relative;
}

/* Glass con efecto color-dodge (gradient overlay) */
.glass::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(to top,
    rgba(255,255,255,0)    0%,
    rgba(255,255,255,0)   78.846%,
    rgba(255,255,255,0.2) 100%);
  mix-blend-mode: color-dodge;
  pointer-events: none;
}

/* Glass oscuro para cards sobre fondos oscuros */
.glass-dark {
  background: var(--glass-dark-card);
  backdrop-filter: var(--blur-xl);
  -webkit-backdrop-filter: var(--blur-xl);
  border: 1px solid rgba(255, 255, 255, 0.34);
  position: relative;
}

/* Glass card info (sobre mí) */
.glass-card-info {
  background: var(--gradient-card-info);
  backdrop-filter: var(--blur-lg);
  -webkit-backdrop-filter: var(--blur-lg);
  border: var(--border-glass);
}

/* Glass para skill cards (habilidades) */
.glass-skill {
  background: var(--glass-skill-card);
  backdrop-filter: var(--blur-md);
  -webkit-backdrop-filter: var(--blur-md);
  border: var(--border-glass-white);
}

/* ─── UTILIDADES LAYOUT ─────────────────────────────────────── */
.container {
  width: 100%;
  max-width: calc(var(--content-max) + var(--section-px) * 2);
  margin-inline: auto;
  padding-inline: var(--section-px);
}

.flex-center   { display: flex; align-items: center; justify-content: center; }
.flex-between  { display: flex; align-items: center; justify-content: space-between; }
.flex-col      { display: flex; flex-direction: column; }
.flex-gap-sm   { gap: 10px; }
.flex-gap-md   { gap: 20px; }
.flex-gap-lg   { gap: 33px; }

/* ─── TIPOGRAFÍA ────────────────────────────────────────────── */
.pretitle {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 21px;
  color: var(--color-primary-alt);
}

.section-title {
  font-family: var(--font-gotham);
  font-weight: 700;
  font-size: 52px;
  line-height: 1.1;
  color: var(--color-text);
}

.section-title--dark { color: var(--color-dark); }

.section-subtitle {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: clamp(18px, 2vw, 24px);
  color: var(--color-primary-alt);
  text-align: center;
}

.section-desc {
  font-family: var(--font-title);
  font-weight: 500;
  font-size: 18px;
  line-height: 1.6;
  color: var(--color-text);
}

/* ─── BADGES / NIVEL ────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 18px;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 12px;
  backdrop-filter: var(--blur-md);
  -webkit-backdrop-filter: var(--blur-md);
  background: var(--glass-badge-bg);
  border: var(--border-glass-sm);
  white-space: nowrap;
}

.badge--experto    { color: var(--color-badge-experto); }
.badge--avanzado   { color: var(--color-badge-avanzado); }
.badge--intermedio { color: var(--color-badge-intermedio); }
.badge--basico     { color: var(--color-badge-basico); }
.badge--white      { color: var(--color-white); }

/* ─── NAVEGACIÓN ─────────────────────────────────────────────── */
.nav-wrapper {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  width: 100%;
  max-width: min(1120px, calc(100vw - 24px));
  box-sizing: border-box;
}

.nav {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(14px, 2.8vw, 40px);
  padding: 10px clamp(14px, 2.2vw, 22px);
  border-radius: var(--radius-nav);
  border: var(--glass-nav-border);
  background: var(--glass-nav-bg);
  backdrop-filter: var(--blur-md);
  -webkit-backdrop-filter: var(--blur-md);
  box-shadow: var(--shadow-nav);
  /* visible: evita recortar Contáctame + idioma; el degradado sigue contenido por el radio del propio .nav */
  overflow: visible;
  min-width: 0;
}

.nav::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-nav);
  background: linear-gradient(to top,
    rgba(255,255,255,0)    0%,
    rgba(255,255,255,0)   78.846%,
    rgba(255,255,255,0.2) 100%);
  mix-blend-mode: color-dodge;
  pointer-events: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(6px, 1vw, 10px);
  flex: 1 1 auto;
  min-width: 0;
  justify-content: flex-start;
  flex-wrap: nowrap;
}

.btn-nav {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 13px;
  border-radius: var(--radius-btn-nav);
  border: var(--glass-btn-nav-border);
  background: var(--glass-btn-nav-bg);
  backdrop-filter: var(--blur-sm);
  -webkit-backdrop-filter: var(--blur-sm);
  box-shadow: var(--shadow-card);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 18px;
  color: rgba(255,255,255,0.7);
  white-space: nowrap;
  transition: all 0.25s ease;
}

.btn-nav:hover,
.btn-nav.active {
  background: rgba(170, 170, 170, 0.35);
  color: var(--color-white);
  opacity: 1;
}

.btn-nav svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  opacity: 0.7;
}

.btn-main {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px clamp(12px, 1.8vw, 16px);
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-accent-bright);
  background: var(--color-primary);
  color: var(--color-white);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: clamp(14px, 1.1vw, 16px);
  box-shadow: 0 3px 2.5px rgba(0,0,0,0.25);
  transition: all 0.25s ease;
  white-space: nowrap;
  flex-shrink: 0;
  max-width: 100%;
}

.btn-main:hover {
  background: var(--color-primary-alt);
  transform: translateY(-1px);
  box-shadow: 0 6px 12px rgba(51,123,255,0.4);
}

.btn-main svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

/*
 * .btn-metal — efecto “metal / cromático” en CSS (preset chromatic aproximado).
 * npm metal-fx (JakubAntalik) es React + WebGL (MetalFx); no trae hoja CSS para HTML estático.
 * Demo: https://metal.jakubantalik.com
 */
.btn-main.btn-metal {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid transparent;
  background:
    linear-gradient(
      168deg,
      rgba(28, 38, 58, 0.96) 0%,
      rgba(15, 23, 42, 0.98) 52%,
      rgba(36, 28, 72, 0.92) 100%
    ) padding-box,
    conic-gradient(
      from 125deg,
      rgba(0, 200, 255, 0.95),
      rgba(124, 58, 237, 0.9),
      rgba(236, 72, 153, 0.95),
      rgba(34, 211, 238, 0.9),
      rgba(51, 123, 255, 0.95),
      rgba(0, 200, 255, 0.95)
    ) border-box;
  background-origin: border-box;
  background-clip: padding-box, border-box;
  box-shadow:
    0 0 28px rgba(51, 123, 255, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
  transition:
    box-shadow 0.45s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    filter 0.4s ease,
    background 0.55s ease;
}

.btn-main.btn-metal::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    108deg,
    transparent 0%,
    transparent 40%,
    rgba(255, 255, 255, 0.26) 50%,
    transparent 60%,
    transparent 100%
  );
  background-size: 240% 100%;
  animation: btn-metal-shine 2.85s ease-in-out infinite;
  pointer-events: none;
  transition: opacity 0.35s ease, filter 0.35s ease;
}

@keyframes btn-metal-shine {
  0%,
  100% {
    background-position: 160% 0;
  }

  50% {
    background-position: -60% 0;
  }
}

.btn-main.btn-metal:hover {
  transform: translateY(-1px);
  background:
    linear-gradient(
      168deg,
      rgba(34, 48, 72, 0.98) 0%,
      rgba(22, 32, 52, 0.99) 52%,
      rgba(44, 34, 88, 0.95) 100%
    ) padding-box,
    conic-gradient(
      from 200deg,
      rgba(58, 166, 255, 0.98),
      rgba(167, 139, 250, 0.95),
      rgba(244, 114, 182, 0.98),
      rgba(34, 211, 238, 0.95),
      rgba(60, 93, 255, 0.98),
      rgba(58, 166, 255, 0.98)
    ) border-box;
  background-origin: border-box;
  background-clip: padding-box, border-box;
  box-shadow:
    0 0 36px rgba(58, 166, 255, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  filter: brightness(1.04);
}

.btn-main.btn-metal:active {
  transform: translateY(0) scale(0.985);
  filter: brightness(1.28) saturate(1.22);
  box-shadow:
    0 0 52px rgba(58, 166, 255, 0.62),
    0 0 96px rgba(236, 72, 153, 0.32),
    0 0 72px rgba(34, 211, 238, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.42),
    inset 0 0 48px rgba(255, 255, 255, 0.12);
  transition-duration: 0.12s;
  transition-timing-function: ease-out;
}

.btn-main.btn-metal:active::after {
  opacity: 1;
  filter: brightness(1.55);
  animation-duration: 0.95s;
}

@media (prefers-reduced-motion: reduce) {
  .btn-main.btn-metal {
    transition-duration: 0.2s;
  }

  .btn-main.btn-metal::after {
    animation: none;
    opacity: 0.12;
  }

  .btn-main.btn-metal:active {
    filter: brightness(1.12);
    box-shadow:
      0 0 32px rgba(58, 166, 255, 0.45),
      inset 0 1px 0 rgba(255, 255, 255, 0.22);
  }

  .btn-main.btn-metal:active::after {
    opacity: 0.35;
    filter: none;
    animation: none;
  }
}

.nav__actions {
  display: inline-flex;
  align-items: center;
  gap: clamp(6px, 1vw, 10px);
  flex-shrink: 0;
  min-width: 0;
}

.btn-lang {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45em;
  padding: 7px clamp(10px, 1.4vw, 14px);
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.08);
  color: var(--color-white);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: clamp(12px, 1vw, 14px);
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-lang:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-1px);
}

.btn-lang:focus-visible {
  outline: 2px solid var(--color-accent-bright);
  outline-offset: 2px;
}

.btn-lang__icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  opacity: 0.9;
}

/* ─── SECCIÓN HERO ──────────────────────────────────────────── */
.hero {
  position: relative;
  width: 100%;
  min-height: 842px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 154px clamp(24px, 16vw, 242px);
  text-align: center;
  overflow: hidden;
}

.hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  display: block;
  /* El canvas es interactivo por defecto — añadir pointer-events: none
     si quieres que solo sea decorativo y no capture clics */
}

.hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.7) 70%, rgba(0, 0, 0, 0) 100%);
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  width: 100%;
  max-width: 960px;
}

.hero__pretitle {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 21px;
  color: var(--color-white);
  margin-bottom: 4px;
}

.hero__name {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 900;
  font-size: clamp(40px, 5vw, 72px);
  line-height: 1.1;
  padding: 8px 30px;

  /* Gradiente extendido para que haya "recorrido" suficiente al desplazarse */
  background: linear-gradient(
    90deg,
    #ffffff  0%,
    #3aa6ff  25%,
    #ffffff  50%,
    #3aa6ff  75%,
    #ffffff  100%
  );
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: none;
  filter: drop-shadow(0 4px 4px rgba(0,0,0,0.25));

  animation: gradient-shift 4s ease infinite;
}

.hero__role {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: clamp(16px, 2vw, 24px);
  color: var(--color-white);
  letter-spacing: 3.84px;
  padding: 22px 0;
}

.hero__barra {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 21px;
  border-radius: var(--radius-pill);
  border: var(--border-efefef);
  position: relative;
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.hero__barra::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--glass-hero-barra);
}

.hero__barra::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(to top,
    rgba(255,255,255,0)    0%,
    rgba(255,255,255,0)   78.846%,
    rgba(255,255,255,0.2) 100%);
  backdrop-filter: var(--blur-md);
  -webkit-backdrop-filter: var(--blur-md);
  mix-blend-mode: color-dodge;
}

.hero__barra span {
  position: relative;
  z-index: 1;
  font-family: var(--font-title);
  font-size: 18px;
  color: var(--color-white);
}

.hero__barra strong { font-weight: 700; }
.hero__barra em     { font-weight: 500; font-style: normal; }

.hero__desc {
  font-family: var(--font-title);
  font-weight: 400;
  font-size: 18px;
  color: var(--color-white);
  line-height: 1.6;
  max-width: 780px;
  padding-top: 54px;
}

.hero__cta-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 20px 33px;
  padding: 71px 0;
}

.btn-hero {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  border: var(--border-glass-white);
  background: var(--glass-hero-btn);
  backdrop-filter: var(--blur-xs);
  -webkit-backdrop-filter: var(--blur-xs);
  box-shadow: var(--shadow-btn);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 16px;
  color: rgba(255,255,255,0.9);
  white-space: nowrap;
  transition: all 0.25s ease;
}

.btn-hero img, .btn-hero svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.btn-hero:hover {
  background: rgba(60, 60, 60, 0.75);
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.4);
}

/* ─── SECCIÓN SOBRE MÍ ──────────────────────────────────────── */
.sobremi {
  background: var(--color-bg-dark);
  padding: var(--section-py) var(--section-px);
}

.sobremi__row {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  max-width: var(--content-max);
  margin-inline: auto;
  padding-block: 22px;
}

.sobremi__info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}

.sobremi__title {
  font-family: var(--font-gotham);
  font-weight: 700;
  font-size: clamp(32px, 4vw, 60px);
  color: var(--color-white);
  line-height: 1.1;
  padding-block: 8px;
}

.sobremi__desc {
  font-family: var(--font-title);
  font-weight: 400;
  font-size: 18px;
  color: var(--color-white);
  line-height: 1.6;
  margin: 0;
}

/* Primer párrafo del bloque (clase explícita — evita depender de h2 + p si hay comentarios HTML entre medias) */
.sobremi__desc--lead {
  padding: 54px 0 0.85rem;
}

/* Segundo (o más) .sobremi__desc consecutivo: sin padding-top extra; cierre del bloque con el padding inferior original */
.sobremi__desc + .sobremi__desc {
  padding: 0 0 34px;
}

.sobremi__barra {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 21px;
  border-radius: var(--radius-pill);
  border: var(--border-efefef);
  background: rgba(255,255,255,0.1);
  backdrop-filter: var(--blur-md);
  -webkit-backdrop-filter: var(--blur-md);
  box-shadow: var(--shadow-card);
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 18px;
  color: var(--color-white);
  position: relative;
  overflow: hidden;
}

.sobremi__social {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px 20px;
  padding: 36px 0;
}

.btn-square {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 35px;
  height: 35px;
  border-radius: var(--radius-xs);
  border: var(--border-glass-white);
  background: var(--gradient-btn-square);
  box-shadow: var(--shadow-sq-btn);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  /*
   * Iconos en negro:
   * En el HTML los <svg> usan fill="currentColor". Ese valor toma la propiedad CSS `color`
   * computada del propio <svg> (heredada del enlace .btn-square). Por eso basta con fijar
   * `color` aquí: no hace falta tocar cada path en el HTML.
   */
  color: #0b0b0b;
}

.btn-square:hover {
  transform: translateY(-2px) scale(1.1);
  box-shadow: 0 10px 20px rgba(66,130,213,0.4);
}

.btn-square img,
.btn-square svg {
  width: 15px;
  height: 15px;
  object-fit: contain;
  /* Refuerzo: el fill currentColor del SVG usa el color heredado del .btn-square */
  color: inherit;
}

.sobremi__photo-col {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  min-width: 0;
}

.sobremi__photo {
  width: 323px;
  height: 431px;
  object-fit: cover;
  border-radius: 8px;
  /* ⚠️ Reemplazar con: assets/persona.png al guardar localmente */
}

/* ─── CARDS INFO (Sobre mí) ─────────────────────────────────── */
.info-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 35px 0;
  justify-content: space-between;
  max-width: var(--content-max);
  margin-inline: auto;
  margin-top: 0;
}

.info-card {
  width: 246px;
  min-height: 229px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 28px 22px;
  border-radius: var(--radius-card);
  background: var(--gradient-card-info);
  backdrop-filter: var(--blur-lg);
  -webkit-backdrop-filter: var(--blur-lg);
  border: var(--border-glass);
  text-align: center;
}

/* Cuerpo de texto: ancho completo + contenido centrado en horizontal */
.info-card > div:not(.info-card__icon) {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  text-align: center;
}

.info-card__icon {
  width: 25px;
  height: 25px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.info-card__title {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 16px;
  color: var(--color-white);
  text-align: center;
}

.info-card__desc {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 14px;
  color: var(--color-white);
  text-align: center;
  line-height: 1.5;
}

/* ─── EDUCACIÓN ─────────────────────────────────────────────── */
.educacion {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
  padding-top: 41px;
  max-width: var(--content-max);
  margin-inline: auto;
  width: 100%;
}

.educacion__heading {
  width: 100%;
  text-align: center;
}

.educacion__titulo {
  font-family: var(--font-gotham);
  font-weight: 400;
  font-size: 36px;
  color: var(--color-white);
  text-align: center;
  padding: 8px 30px;
  text-shadow: 0 4px 4px rgba(0,0,0,0.25);
}

.educacion__cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
  width: 100%;
}

.card-academic {
  width: min(733px, 100%);
  display: flex;
  align-items: stretch;
  border-radius: var(--radius-card-lg);
  overflow: hidden;
  background: var(--glass-dark-card);
  backdrop-filter: var(--blur-xl);
  -webkit-backdrop-filter: var(--blur-xl);
  border: 1px solid rgba(255,255,255,0.34);
  box-shadow: var(--shadow-academic);
}

.card-academic__img-col {
  width: 212px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  border-right: 1px solid rgba(255,255,255,0.1);
}

.card-academic--blue .card-academic__img-col  { background: var(--gradient-academic-1); }
.card-academic--orange .card-academic__img-col { background: var(--gradient-academic-2); }

.card-academic__img-col img {
  width: 150px;
  height: 150px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.card-academic__body {
  flex: 1;
  padding: 21px 37px;
  background: var(--glass-card-overlay);
  backdrop-filter: blur(12.5px);
  -webkit-backdrop-filter: blur(12.5px);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.card-academic__name {
  font-family: var(--font-geist);
  font-weight: 600;
  font-size: 24px;
  color: var(--color-white);
  letter-spacing: -0.24px;
  line-height: 1.33;
}

.card-academic__period {
  font-family: var(--font-geist);
  font-weight: 500;
  font-size: 16px;
  color: var(--color-white);
  line-height: 1.5;
}

.card-academic__list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 4px;
}

.card-academic__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border-radius: var(--radius-sm);
  font-family: var(--font-inter);
  font-weight: 400;
  font-size: 16px;
  color: var(--color-text-muted);
}

.card-academic__item-icon {
  color: var(--color-text-muted);
  font-size: 12px;
}

/* ─── SECCIÓN HABILIDADES ───────────────────────────────────── */
.habilidades {
  position: relative;
  padding: 38px var(--section-px) 99px;
  overflow: hidden;
}

.habilidades::before {
  content: '';
  position: absolute;
  inset: 0;
  background: #ffffff;
  z-index: 0;
}

.habilidades__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-image: url('../assets/degradado.png');
  background-size: cover;
  background-position: center bottom;
  background-repeat: no-repeat;
  z-index: 1;

  /* Oculta por defecto: desplazada hacia abajo (solo se ve el blanco de ::before).
     El JS mueve translateY de 100% → 0% según el scroll. */
  transform: translate3d(0, 100%, 0);
  will-change: transform;
}

.habilidades__content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  max-width: var(--content-max);
  margin-inline: auto;
}

.habilidades__header {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-inline: clamp(0px, 8vw, 158px);
  width: 100%;
}

.habilidades__main-title {
  font-family: var(--font-gotham);
  font-weight: 700;
  font-size: 52px;
  color: var(--color-dark);
  text-align: center;
  text-shadow: 0 4px 4px rgba(0,0,0,0.25);
  padding: 8px 30px;
}

.habilidades__desc {
  font-family: var(--font-title);
  font-weight: 500;
  font-size: 18px;
  color: var(--color-dark);
  text-align: center;
  line-height: 1.6;
  padding: 27px 0;
}

.skill-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 15px 45px;
  justify-content: center;
  align-items: stretch;
  width: 100%;
  margin-top: 20px;
}

.skill-card {
  width: 257px;
  min-height: 411px;
  display: flex;
  flex-direction: column;
  gap: 13px;
  padding: 25px;
  border-radius: var(--radius-card);
  background: var(--glass-skill-card);
  backdrop-filter: var(--blur-md);
  -webkit-backdrop-filter: var(--blur-md);
  border: var(--border-glass-white);
  box-shadow: var(--shadow-card);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.skill-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.35);
}

.skill-card__icon-area {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  border: var(--border-glass-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.skill-card__icon-area img,
.skill-card__icon-area svg {
  width: 15px;
  height: 15px;
  opacity: 0.9;
}

.skill-card__title {
  font-family: var(--font-geist);
  font-weight: 600;
  font-size: 24px;
  color: var(--color-white);
  letter-spacing: -0.24px;
  line-height: 1.33;
}

.skill-card__desc {
  font-family: var(--font-inter);
  font-weight: 400;
  font-size: 14px;
  color: var(--color-text-dim);
  line-height: 1.86;
  flex: 1;
}

/* ─── SECCIÓN TECNOLOGÍAS ───────────────────────────────────── */
.tecnologias {
  background: var(--color-bg-dark);
  padding: var(--section-py) var(--section-px);
}

.tecnologias__header {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: clamp(0px, 10vw, 158px);
  gap: 8px;
  margin-bottom: 40px;
}

.tech-table {
  max-width: var(--content-max);
  margin-inline: auto;
  width: 100%;
  border-radius: var(--radius-card-lg);
  overflow: hidden;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
}

.tech-category {
  padding: 0 33px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.tech-category:last-child { border-bottom: none; }

.tech-category__title {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 1.5px;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
  padding: 20px 0 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.tech-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.tech-row:last-child { border-bottom: none; }

.tech-row__name {
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: var(--font-inter);
  font-weight: 300;
  font-size: 18px;
  color: var(--color-white);
}

.tech-row__name svg,
.tech-row__name img {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  object-fit: contain;
  opacity: 0.85;
}

.tech-row__meta {
  display: flex;
  align-items: center;
  gap: 16px;
}

.tech-row__years {
  font-family: var(--font-inter); 
  font-weight: 300;
  font-size: 16px;
  color: rgba(255,255,255,0.5);
  white-space: nowrap;
}

/* ─── SECCIÓN PROYECTOS ─────────────────────────────────────── */
.proyectos {
  background: var(--color-bg-dark);
  padding: var(--section-py) var(--section-px);
  border-top: 1px solid rgba(255,255,255,0.05);
}

.proyectos__header {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: clamp(0px, 10vw, 158px);
  gap: 8px;
  margin-bottom: 32px;
}

.proyectos__body {
  display: flex;
  align-items: flex-start;
  gap: 60px;
  max-width: var(--content-max);
  margin-inline: auto;
  padding-top: 70px;
}

.proyectos__desc-col {
  flex: 0 0 418px;
  max-width: 418px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.proyectos__mi-trabajo {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: clamp(24px, 3vw, 38px);
  color: var(--color-white);
  padding: 10px 0;
}

.proyectos__text {
  font-family: var(--font-title);
  font-weight: 300;
  font-size: 18px;
  color: rgba(255,255,255,0.8);
  line-height: 1.6;
  padding-top: 27px;
}

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

/* ─── TARJETA DE PROYECTO ───────────────────────────────────── */
.card-project {
  position: relative;
  width: 100%;
  max-width: 663px;
  min-height: 280px;
  max-height: 458px;
  border-radius: 15px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 22px;
  box-sizing: border-box;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: top;
  background-color: #1a1a2e;
  box-shadow: 0 19px 22.2px rgba(0, 0, 0, 0.25);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-project:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5);
}

/* Velo negro 40% sobre la imagen de fondo */
.card-project::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.592);
  border-radius: inherit;
  pointer-events: none;
  z-index: 0;
}

/* El contenido queda encima del velo */
.card-project .informacion {
  position: relative;
  z-index: 1;
}

/* Columna de información superpuesta sobre la imagen */
.card-project .informacion {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 539px;
  width: 100%;
  gap: 11px;
  text-align: left;
  color: var(--color-white);
  font-family: var(--font-body);
  font-size: 15px;
  flex: 1;
  justify-content: flex-end;
}

/* Bloque: tipo + nombre + tags */
.card-project .titulo {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  align-self: stretch;
  gap: 8px;
}

/* Etiqueta de tipo (Académico, Profesional…) */
.card-project .proyecto-tipo {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--color-accent);
  line-height: 1;
}

/* Nombre del proyecto */
.card-project .nombre-proyecto {
  margin: 0;
  font-size: 36px;
  font-weight: 700;
  font-family: var(--font-gotham);
  align-self: stretch;
  letter-spacing: -0.5px;
  line-height: 1;
  color: var(--color-white);
}

/* Contenedor de tags — reutiliza .tag existente */
.card-project .tecnologas {
  align-self: stretch;
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 8px;
}

/* Descripción */
.card-project .description {
  align-self: stretch;
  font-size: 14px;
  font-family: var(--font-title); 
  font-weight: 300;
  line-height: 1.5;
  color: var(--color-white);
  padding: 4px 0;
}

/* Fila de botones de acción */
.card-project .actions {
  align-self: stretch;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

/* Botón principal (CTA azul con borde gradiente) */
.button-main {
  cursor: pointer;
  padding: 8px 16px;
  border: 1px solid rgba(255, 255, 255, 0.697);
  background: linear-gradient(0deg, #00c8ff, #41d6ff);
  box-shadow: var(--shadow-btn);
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 16px;
  font-family: var(--font-body);
  font-weight: 700;
  color: var(--color-white);
  text-decoration: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.button-main:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

.button-main svg,
.button-main img {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

/* Botón secundario (glass blanco) */
.button-white {
  cursor: pointer;
  padding: 8px 16px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: linear-gradient(180deg,
    rgba(255, 255, 255, 0.04),
    rgba(255, 255, 255, 0.34));
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: var(--shadow-btn);
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 300;
  font-family: var(--font-body);
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease;
}

.button-white:hover {
  background: linear-gradient(180deg,
    rgba(255, 255, 255, 0.1),
    rgba(255, 255, 255, 0.42));
  transform: translateY(-1px);
}

.button-white svg,
.button-white img {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  opacity: 0.9;
}

/* .tag se mantiene igual (reutilizado dentro de .tecnologas) */
.tag {
  padding: 6px 15px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  font-size: 12px;
  backdrop-filter: var(--blur-xs);
  -webkit-backdrop-filter: var(--blur-xs);
  font-family: var(--font-body);
  color: var(--color-white);
  font-weight: 300;
}

/* ─── SECCIÓN EXPERIENCIA (3D Card Stack) ───────────────────── */
.experiencia {
  background: var(--color-bg-dark);
  padding: var(--section-py) var(--section-px);
  border-top: 1px solid rgba(255,255,255,0.05);
}

.experiencia__header {
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: clamp(0px, 10vw, 158px);
  margin-bottom: 40px;
}

.experiencia__desc {
  font-family: var(--font-title);
  font-weight: 500;
  font-size: 18px;
  color: rgba(255,255,255,0.7);
  line-height: 1.6;
  padding-top: 27px;
  max-width: 878px;
}

/* Contenedor del stack */
.card-stack-wrapper {
  max-width: var(--content-max);
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

.card-stack {
  position: relative;
  width: 100%;
  max-width: 520px;
  height: 500px;
  margin-inline: auto;
}

.carta-experiencia {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: var(--radius-card-lg);
  background: var(--solid-dark-card);
  backdrop-filter: var(--blur-xl);
  -webkit-backdrop-filter: var(--blur-xl);
  border: var(--border-glass);
  box-shadow: var(--shadow-academic);
  padding: 36px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition:
    transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    opacity  0.4s cubic-bezier(0.4, 0, 0.2, 1),
    z-index  0s linear 0.2s;
  will-change: transform, opacity;
}

/* Estados del stack */
.carta-experiencia.card--front {
  z-index: 10;
  transform: translateX(0) scale(1);
  opacity: 1;
}

.carta-experiencia.card--next {
  z-index: 9;
  transform: translateX(60px) scale(0.95);
  opacity: 0.7;
}

.carta-experiencia.card--prev {
  z-index: 9;
  transform: translateX(-60px) scale(0.95);
  opacity: 0.7;
}

.carta-experiencia.card--back {
  z-index: 1;
  transform: translateX(0) scale(0.85);
  opacity: 0.35;
}

/* Animaciones de salida */
.carta-experiencia.card--exit-left {
  transform: translateX(-120%) scale(0.8) !important;
  opacity: 0 !important;
}

.carta-experiencia.card--exit-right {
  transform: translateX(120%) scale(0.8) !important;
  opacity: 0 !important;
}

.carta-exp__badge {
  align-self: flex-start;
}

.carta-exp__header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.carta-exp__logo {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.08);
  border: var(--border-glass-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 24px;
}

.carta-exp__meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.carta-exp__empresa {
  font-family: var(--font-geist);
  font-weight: 500;
  font-size: 22px;
  color: var(--color-white);
  letter-spacing: -0.2px;
}

.carta-exp__cargo {
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 16px;
  color: var(--color-accent);
}

.carta-exp__periodo {
  font-family: var(--font-body);
  font-size: 14px;
  color: rgba(255,255,255,0.5);
}

.carta-exp__divider {
  width: 100%;
  height: 1px;
  background: rgba(255,255,255,0.08);
}

.carta-exp__desc {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--color-text-dim);
  line-height: 1.65;
  flex: 1;
}

.carta-exp__skills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* Controles del stack */
.stack-controls {
  display: flex;
  align-items: center;
  gap: 20px;
}

.btn-stack {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: var(--border-glass);
  background: rgba(255,255,255,0.06);
  backdrop-filter: var(--blur-md);
  -webkit-backdrop-filter: var(--blur-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--color-white);
  font-size: 18px;
  transition: all 0.25s ease;
}

.btn-stack:hover {
  background: var(--color-primary);
  border-color: var(--color-accent);
  transform: scale(1.1);
}

.stack-counter {
  font-family: var(--font-mono);
  font-size: 14px;
  color: rgba(255,255,255,0.5);
  min-width: 40px;
  text-align: center;
}

/* ─── SECCIÓN CONTACTO ──────────────────────────────────────── */
.contacto {
  background: var(--color-bg-dark);
  padding: var(--section-py) var(--section-px);
  border-top: 1px solid rgba(255,255,255,0.05);
}

.contacto__header {
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: clamp(0px, 10vw, 158px);
  margin-bottom: 39px;
}

.contacto__desc {
  font-family: var(--font-title);
  font-weight: 500;
  font-size: 18px;
  color: rgba(255,255,255,0.7);
  line-height: 1.6;
  padding-top: 27px;
  max-width: 880px;
}

.contacto__body {
  display: flex;
  align-items: flex-start;
  gap: 32px;
  max-width: var(--content-max);
  margin-inline: auto;
}

/* Card talk (info de contacto) */
.card-talk {
  width: 486px;
  min-height: 521px;
  flex-shrink: 0;
  border-radius: var(--radius-card-lg);
  background: var(--glass-dark-card);
  backdrop-filter: var(--blur-xl);
  -webkit-backdrop-filter: var(--blur-xl);
  border: var(--border-glass);
  padding: 40px 36px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-shadow: var(--shadow-academic);
}

.card-talk__title {
  font-family: var(--font-title);
  font-weight: 900;
  font-size: 28px;
  color: var(--color-white);
}

.card-talk__subtitle {
  font-family: var(--font-title);
  font-weight: 500;
  font-size: 16px;
  color: rgba(255,255,255,0.6);
  line-height: 1.5;
}

.card-talk__info-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}

.card-talk__info-item {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--color-text-dim);
}

.card-talk__info-item svg,
.card-talk__info-item span.icon {
  width: 20px;
  height: 20px;
  color: var(--color-primary);
  flex-shrink: 0;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-talk__social {
  display: flex;
  gap: 12px;
  margin-top: auto;
  padding-top: 16px;
}

/* Formulario de contacto */
.form-mail {
  flex: 1;
  min-width: 0;
  max-width: 690px;
  border-radius: var(--radius-card-lg);
  background: var(--glass-dark-card);
  backdrop-filter: var(--blur-xl);
  -webkit-backdrop-filter: var(--blur-xl);
  border: var(--border-glass);
  padding: 40px 36px;
  box-shadow: var(--shadow-academic);
}

.form-mail__title {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 24px;
  color: var(--color-white);
  margin-bottom: 28px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 20px;
}

.form-group label {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.form-hint {
  display: block;
  margin-top: 6px;
  font-family: var(--font-body);
  font-size: 12px;
  line-height: 1.45;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.42);
}

.form-group__label-captcha {
  display: block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.form-group--captcha {
  margin-bottom: 12px;
}

.form-group--captcha .h-captcha {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
}

.form-group--captcha .h-captcha iframe {
  max-width: 100%;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-btn-nav);
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.05);
  color: var(--color-white);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  outline: none;
  transition: border-color 0.25s ease, background 0.25s ease;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(255,255,255,0.25);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--color-primary);
  background: rgba(51,123,255,0.06);
}

.form-group textarea {
  resize: vertical;
  min-height: 140px;
  border-radius: var(--radius-sm);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.btn-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 24px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-accent-bright);
  background: var(--color-primary);
  color: var(--color-white);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.25s ease;
  margin-top: 8px;
}

.btn-submit:hover {
  background: var(--color-primary-alt);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(51,123,255,0.4);
}

.form-send-feedback {
  margin-top: 14px;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.85);
}

.form-send-feedback--error {
  color: #ff8a80;
}

/* ─── FOOTER ─────────────────────────────────────────────────── */
.footer {
  background: #050505;
  border-top: 1px solid rgba(255,255,255,0.06);
  min-height: 116px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer__body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  padding: 32px 24px;
}

.footer__copy {
  font-family: var(--font-body);
  font-size: 14px;
  color: rgba(255,255,255,0.45);
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 14px;
  color: rgba(255,255,255,0.3);
}

.footer__brand svg {
  width: 13px;
  height: 8px;
  opacity: 0.5;
}

/* ─── ANIMACIONES ────────────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

/* Degradado del nombre — recorre el gradiente de izquierda a derecha en loop */
@keyframes gradient-shift {
  0%   { background-position: 0%   50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0%   50%; }
}

/* ─── Reveal (Intersection Observer + micro-interacción) ───── */
.reveal-base {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease-out;
}

.reveal-base.reveal-active {
  opacity: 1;
  transform: translateY(0);
}

/* Retrasos en cascada (stagger) — combinar con .reveal-base */
.delay-100 { transition-delay: 0.1s; }
.delay-200 { transition-delay: 0.2s; }
.delay-300 { transition-delay: 0.3s; }
.delay-400 { transition-delay: 0.4s; }
.delay-500 { transition-delay: 0.5s; }
.delay-600 { transition-delay: 0.6s; }
.delay-700 { transition-delay: 0.7s; }
.delay-800 { transition-delay: 0.8s; }

@media (prefers-reduced-motion: reduce) {
  .reveal-base {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Scroll-scrub: opacidad/transform los controla JS (sin transición CSS) */
.js-scroll-scrub {
  will-change: opacity, transform;
}

.animate-in {
  animation: fadeInUp 0.6s ease forwards;
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ade80;
  animation: pulse-dot 2s ease infinite;
  margin-right: 6px;
}

/* ─── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .proyectos__body  { flex-direction: column; align-items: center; }
  .proyectos__desc-col { max-width: 100%; flex: unset; }
  .contacto__body   { flex-direction: column; align-items: center; }
  .card-talk        { width: 100%; max-width: 600px; }
}

@media (max-width: 900px) {
  .sobremi__row     { flex-direction: column; align-items: center; }
  .sobremi__photo   { width: 260px; height: 350px; }
  .info-cards       { justify-content: center; gap: 20px; }
  .info-card        { width: 220px; }
  .card-academic    { width: 100%; }
  .card-academic__img-col { width: 160px; }
  .tech-category    { padding: 0 16px; }
  .experiencia__header { padding-inline: 0; }
}

/* Nav: más aire antes de pasar solo a íconos (libera texto Contáctame + EN) */
@media (max-width: 1180px) {
  .nav              { gap: 14px; padding-inline: 12px; }
  .btn-nav          { font-size: 16px; padding: 5px 11px; }
}

@media (max-width: 1040px) {
  .btn-nav span     { display: none; }
  .btn-nav          { padding: 6px 10px; }
  .nav-links        { flex: 0 1 auto; }
}

@media (max-width: 700px) {
  .nav-wrapper      { top: 8px; max-width: calc(100vw - 16px); }
  .nav              { gap: 12px; padding: 8px 14px; flex-wrap: wrap; justify-content: center; }
  .btn-nav span     { display: none; }
  .nav-links        { gap: 4px; flex: 1 1 100%; justify-content: center; }
  .nav__actions      { width: 100%; justify-content: center; flex-wrap: nowrap; }
  .btn-lang          { font-size: 13px; padding: 6px 12px; }
  .hero__name       { font-size: 36px; padding-inline: 8px; }
  .hero__role       { font-size: 14px; letter-spacing: 2px; }
  .hero__cta-group  { gap: 12px 20px; padding-top: 40px; padding-bottom: 40px; }
  .info-card        { width: 100%; max-width: 300px; }
  .skill-cards      { gap: 20px; }
  .skill-card       { width: 100%; max-width: 320px; }
  .card-stack       { height: 560px; }
  .form-row         { grid-template-columns: 1fr; }
}

/* ════════════════════════════════════════════════════════
   TERMINAL INTRO — Overlay de bienvenida
   ════════════════════════════════════════════════════════ */

#terminal-intro {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  background: rgba(5, 5, 7, 0.97);
  padding: 24px;
}

/* Ventana */
.ti-window {
  width: min(640px, 92vw);
  border-radius: 10px;
  background: #0d0e12;
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow:
    0 48px 120px rgba(0, 0, 0, 0.9),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  overflow: hidden;
  animation: ti-window-in 0.38s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes ti-window-in {
  from { opacity: 0; transform: scale(0.96) translateY(12px); }
  to   { opacity: 1; transform: scale(1)    translateY(0);    }
}

/* Barra de título (estilo macOS) */
.ti-bar {
  height: 36px;
  background: #161820;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  align-items: center;
  padding: 0 14px;
  gap: 7px;
}

.ti-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}
.ti-dot--r { background: #ff5f57; }
.ti-dot--y { background: #ffbd2e; }
.ti-dot--g { background: #28c840; }

.ti-bar__label {
  margin-left: auto;
  margin-right: auto;
  transform: translateX(-20px);
  font-family: var(--font-mono);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.3);
  letter-spacing: 0.03em;
  user-select: none;
}

/* Cuerpo de texto */
.ti-body {
  padding: 20px 26px 28px;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.78;
  min-height: 210px;
}

.ti-prompt  { margin: 0; color: #e8e8ec; }
.ti-blank   { margin: 0; height: 0.5em;  }
.ti-title   { margin: 0; color: #58a6ff; font-weight: 600; }
.ti-check   { margin: 0; transition: color 0.12s ease; }

.ti-check--pending { color: rgba(255, 255, 255, 0.28); }
.ti-check--done    { color: rgba(255, 255, 255, 0.72); }

.ti-tick  { color: #4ade80; }

.ti-ready {
  margin: 0;
  color: #a78bfa;
  font-weight: 600;
}

/* Cursor parpadeante */
.ti-cursor {
  display: inline-block;
  color: #58a6ff;
  line-height: 1;
  animation: ti-blink 0.9s step-end infinite;
}

@keyframes ti-blink {
  0%,  49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

/* Texto "para omitir" */
.ti-skip-hint {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.22);
  letter-spacing: 0.04em;
  user-select: none;
  animation: ti-hint-in 0.5s 1.5s ease both;
}

@keyframes ti-hint-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Salida — fade + ligero scale down */
.ti-exit {
  animation: ti-exit-anim 0.62s cubic-bezier(0.4, 0, 1, 1) forwards;
}

@keyframes ti-exit-anim {
  0%   { opacity: 1; }
  18%  { opacity: 1; }
  100% { opacity: 0; }
}
