/* =====================================================================
   HOJA DE VIDA — Jehanpier Antonio Estrada Cabarcas
   styles.css  ·  Estética DARK + acento DORADO
   ---------------------------------------------------------------------
   Para personalizar colores: edita las variables en :root (más abajo).
   Para cambiar tipografías: revisa la carga de Google Fonts en index.html.
   ===================================================================== */

/* ----------------------------------------------------------------------
   1) VARIABLES DE COLOR Y TOKENS DE DISEÑO
   ---------------------------------------------------------------------- */
:root {
  /* Fondos */
  --bg:        #0e0f12;   /* fondo principal (grafito muy oscuro)      */
  --panel:     #16181d;   /* tarjetas / paneles                        */
  --panel-2:   #0a0b0e;   /* paneles más profundos                     */

  /* Dorados (acento de marca) */
  --gold:      #d4af37;   /* dorado principal                          */
  --gold-soft: #e8c969;   /* dorado suave para hover / brillos         */
  --gold-deep: #9a7d27;   /* dorado apagado para sombras de borde      */

  /* Texto */
  --text:      #e7e8ea;   /* texto principal claro                     */
  --text-2:    #a9adb5;   /* texto secundario / gris                   */
  --text-3:    #7c8089;   /* texto tenue                               */

  /* Líneas y bordes */
  --line:      #2a2d34;   /* bordes sutiles                            */
  --line-soft: #1d2026;   /* divisiones aún más sutiles                */

  /* Tipografías */
  --font-display: "Sora", system-ui, sans-serif;          /* títulos   */
  --font-body:    "Hanken Grotesk", system-ui, sans-serif;/* cuerpo    */
  --font-mono:    "JetBrains Mono", ui-monospace, monospace; /* datos   */

  /* Medidas */
  --maxw: 1140px;         /* ancho máximo del contenido                */
  --gutter: clamp(20px, 5vw, 48px); /* margen lateral responsivo       */
  --radius: 14px;         /* radio de tarjetas                         */
  --radius-sm: 9px;
  --ring: rgba(212, 175, 55, .35); /* halo dorado de foco              */

  /* Sombras */
  --shadow:    0 24px 60px -28px rgba(0,0,0,.85);
  --shadow-sm: 0 14px 34px -22px rgba(0,0,0,.8);

  --header-h: 70px;       /* alto del header fijo                      */
  --ease: cubic-bezier(.22, 1, .36, 1);
}

/* ----------------------------------------------------------------------
   2) RESET Y BASE
   ---------------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

* { margin: 0; }

html {
  scroll-behavior: smooth;
  /* compensa el header fijo al saltar a una sección con #ancla */
  scroll-padding-top: calc(var(--header-h) + 18px);
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  /* respeta las zonas seguras en móviles con notch */
  padding-bottom: env(safe-area-inset-bottom);
}

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

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  background: none;
  border: none;
}

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

::selection { background: rgba(212,175,55,.28); color: #fff; }

/* Barra de scroll personalizada (navegadores webkit) */
::-webkit-scrollbar { width: 11px; }
::-webkit-scrollbar-track { background: var(--panel-2); }
::-webkit-scrollbar-thumb {
  background: #2f333b;
  border-radius: 8px;
  border: 2px solid var(--panel-2);
}
::-webkit-scrollbar-thumb:hover { background: var(--gold-deep); }

/* ----------------------------------------------------------------------
   3) UTILIDADES DE LAYOUT
   ---------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: clamp(72px, 11vh, 128px); position: relative; }
.section--tight { padding-block: clamp(56px, 8vh, 92px); }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* Rombo dorado: la firma visual que se repite en toda la página */
.rombo {
  display: inline-block;
  width: 8px; height: 8px;
  background: var(--gold);
  transform: rotate(45deg);
  box-shadow: 0 0 12px rgba(212,175,55,.6);
  flex: none;
}

/* Encabezado de sección (eyebrow + título) */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-family: var(--font-mono);
  font-size: .76rem;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin-bottom: 18px;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.7rem, 1rem + 2.6vw, 2.6rem);
  letter-spacing: .01em;
  line-height: 1.12;
  color: var(--text);
}

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

.section-intro {
  color: var(--text-2);
  max-width: 62ch;
  margin-top: 16px;
  font-size: 1.02rem;
}

/* ----------------------------------------------------------------------
   4) BOTONES
   ---------------------------------------------------------------------- */
.btn {
  --pad-y: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;             /* área táctil cómoda */
  padding: var(--pad-y) 26px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .94rem;
  letter-spacing: .02em;
  transition: transform .25s var(--ease),
              box-shadow .25s var(--ease),
              background .25s var(--ease),
              color .25s var(--ease),
              border-color .25s var(--ease);
  will-change: transform;
}

.btn svg { width: 18px; height: 18px; }

/* Botón sólido dorado */
.btn--gold {
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  color: #1a1407;
  box-shadow: 0 12px 30px -14px rgba(212,175,55,.7),
              inset 0 1px 0 rgba(255,255,255,.4);
}

/* Botón contorno dorado */
.btn--ghost {
  background: rgba(212,175,55,.04);
  color: var(--text);
  border: 1px solid var(--line);
}

@media (hover: hover) {
  .btn--gold:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 42px -16px rgba(212,175,55,.85),
                inset 0 1px 0 rgba(255,255,255,.5);
  }
  .btn--ghost:hover {
    border-color: var(--gold);
    color: var(--gold-soft);
    background: rgba(212,175,55,.08);
    transform: translateY(-3px);
  }
}

.btn:active { transform: translateY(-1px); }

/* ----------------------------------------------------------------------
   5) HEADER / NAVEGACIÓN FIJA
   ---------------------------------------------------------------------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(14,15,18,.55);
  border-bottom: 1px solid transparent;
  transition: background .35s var(--ease), border-color .35s var(--ease);
  padding-top: env(safe-area-inset-top);
}

/* Estado al hacer scroll (se activa por JS añadiendo .is-scrolled) */
.site-header.is-scrolled {
  background: rgba(11,12,14,.86);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--line);
}

.header-inner {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Marca / monograma */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
}

.brand__mark {
  width: 40px; height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--gold);
  border-radius: 9px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .92rem;
  letter-spacing: .04em;
  color: var(--gold);
  background:
    linear-gradient(135deg, rgba(212,175,55,.16), rgba(212,175,55,0));
  box-shadow: inset 0 0 14px rgba(212,175,55,.12);
}

.brand__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .96rem;
  letter-spacing: .02em;
  color: var(--text);
}
.brand__name b { color: var(--gold); font-weight: 600; }

/* Navegación escritorio */
.nav { display: flex; align-items: center; gap: 4px; }

.nav__link {
  position: relative;
  padding: 9px 14px;
  font-size: .9rem;
  font-weight: 500;
  color: var(--text-2);
  border-radius: 8px;
  transition: color .25s var(--ease);
}

.nav__link::after {
  content: "";
  position: absolute;
  left: 14px; right: 14px; bottom: 4px;
  height: 1.5px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s var(--ease);
}

@media (hover: hover) {
  .nav__link:hover { color: var(--text); }
  .nav__link:hover::after { transform: scaleX(1); }
}

.nav__link.is-active { color: var(--gold-soft); }
.nav__link.is-active::after { transform: scaleX(1); }

/* Botón hamburguesa (oculto en escritorio) */
.nav-toggle {
  display: none;
  width: 46px; height: 46px;
  border: 1px solid var(--line);
  border-radius: 10px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  transition: border-color .25s var(--ease);
}
.nav-toggle:hover { border-color: var(--gold); }

.nav-toggle span {
  display: block;
  width: 20px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .3s var(--ease), opacity .2s var(--ease);
}

/* Animación a "X" cuando el menú está abierto */
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ----------------------------------------------------------------------
   6) HERO / PORTADA
   ---------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: calc(var(--header-h) + 30px);
  padding-bottom: 60px;
  overflow: hidden;
}

/* Brillo dorado sutil de fondo */
.hero::before {
  content: "";
  position: absolute;
  top: -18%; right: -8%;
  width: 60vw; height: 60vw;
  max-width: 760px; max-height: 760px;
  background: radial-gradient(circle at center,
              rgba(212,175,55,.18), rgba(212,175,55,.05) 42%, transparent 68%);
  filter: blur(8px);
  pointer-events: none;
  z-index: 0;
}
/* Textura de rejilla muy tenue */
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(circle at 60% 40%, #000 0%, transparent 72%);
  -webkit-mask-image: radial-gradient(circle at 60% 40%, #000 0%, transparent 72%);
  pointer-events: none;
  z-index: 0;
}

.hero__grid {
  position: relative;
  z-index: 1;
  width: 100%;
  display: grid;
  grid-template-columns: 1.25fr .9fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.hero__status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: .74rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--text-2);
  margin-bottom: 24px;
}
.hero__dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #46d17f;
  box-shadow: 0 0 0 0 rgba(70,209,127,.6);
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(70,209,127,.55); }
  70%  { box-shadow: 0 0 0 9px rgba(70,209,127,0); }
  100% { box-shadow: 0 0 0 0 rgba(70,209,127,0); }
}
@media (prefers-reduced-motion: reduce) { .hero__dot { animation: none; } }

.hero__name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.2rem, 1rem + 6vw, 4.3rem);
  line-height: 1.02;
  letter-spacing: -.01em;
  text-transform: uppercase;
}
.hero__name .gold {
  color: var(--gold);
  /* sutil reflejo metálico en el apellido */
  background: linear-gradient(180deg, var(--gold-soft), var(--gold) 55%, var(--gold-deep));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero__role {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 26px;
  padding: 9px 18px;
  border: 1px solid var(--gold-deep);
  border-radius: 999px;
  background: rgba(212,175,55,.06);
  font-family: var(--font-mono);
  font-size: .82rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold-soft);
}

.hero__desc {
  margin-top: 24px;
  color: var(--text-2);
  font-size: 1.06rem;
  max-width: 48ch;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  margin-top: 34px;
  padding-top: 26px;
  border-top: 1px solid var(--line-soft);
}
.hero__meta-item {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: .9rem;
  color: var(--text-2);
}
.hero__meta-item svg { width: 16px; height: 16px; color: var(--gold); flex: none; }

/* --- Marco de la foto (rectangular vertical, NO circular) --- */
.hero__photo-wrap {
  justify-self: center;
  position: relative;
  width: min(330px, 78vw);
}

.photo-frame {
  position: relative;
  aspect-ratio: 3 / 4;            /* retrato vertical */
  border-radius: var(--radius);
  padding: 10px;                  /* deja ver el doble marco dorado */
  background:
    linear-gradient(160deg, rgba(212,175,55,.5), rgba(212,175,55,.08) 45%, rgba(212,175,55,.32));
  box-shadow: var(--shadow);
}
.photo-frame::before {
  /* línea dorada interior */
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(212,175,55,.55);
  border-radius: calc(var(--radius) - 4px);
  z-index: 2;
  pointer-events: none;
}
.photo-frame__img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: calc(var(--radius) - 4px);
  background: var(--panel);
  filter: saturate(1.02) contrast(1.02);
}

/* Esquinas doradas tipo "corchete" — detalle de firma */
.corner {
  position: absolute;
  width: 26px; height: 26px;
  border: 2px solid var(--gold);
  z-index: 3;
}
.corner--tl { top: -2px; left: -2px;  border-right: 0; border-bottom: 0; border-top-left-radius: 6px; }
.corner--tr { top: -2px; right: -2px; border-left: 0;  border-bottom: 0; border-top-right-radius: 6px; }
.corner--bl { bottom: -2px; left: -2px;  border-right: 0; border-top: 0; border-bottom-left-radius: 6px; }
.corner--br { bottom: -2px; right: -2px; border-left: 0;  border-top: 0; border-bottom-right-radius: 6px; }

/* Placa con el cargo, anclada bajo la foto */
.photo-badge {
  position: absolute;
  left: 50%;
  bottom: -22px;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text);
  white-space: nowrap;
  z-index: 4;
}

/* Indicador de scroll */
.scroll-cue {
  position: absolute;
  left: 50%; bottom: 22px;
  transform: translateX(-50%);
  z-index: 1;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: .64rem;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--text-3);
}
.scroll-cue__line {
  width: 1px; height: 38px;
  background: linear-gradient(var(--gold), transparent);
  animation: cue 2.2s var(--ease) infinite;
}
@keyframes cue {
  0%,100% { opacity: .3; transform: scaleY(.6); transform-origin: top; }
  50%     { opacity: 1;  transform: scaleY(1);  transform-origin: top; }
}
@media (prefers-reduced-motion: reduce) { .scroll-cue__line { animation: none; } }

/* ----------------------------------------------------------------------
   7) SOBRE MÍ
   ---------------------------------------------------------------------- */
.about__grid {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}

.about__lead {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.15rem, .9rem + 1vw, 1.5rem);
  line-height: 1.45;
  color: var(--text);
}
.about__lead .gold { color: var(--gold); }

.about__text p { color: var(--text-2); margin-bottom: 16px; font-size: 1.04rem; }
.about__text p:last-child { margin-bottom: 0; }

/* Mini-estadísticas / datos rápidos */
.about__facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
  margin-top: 32px;
}
.fact {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 18px 16px;
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
}
.fact__num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--gold);
  line-height: 1;
}
.fact__label {
  margin-top: 7px;
  font-size: .82rem;
  color: var(--text-3);
  letter-spacing: .02em;
}

/* ----------------------------------------------------------------------
   8) EXPERIENCIA — LÍNEA DE TIEMPO
   ---------------------------------------------------------------------- */
.timeline {
  position: relative;
  margin-top: 8px;
  padding-left: 34px;
}
/* línea vertical dorada */
.timeline::before {
  content: "";
  position: absolute;
  left: 7px; top: 6px; bottom: 6px;
  width: 1.5px;
  background: linear-gradient(var(--gold), var(--gold-deep) 60%, transparent);
}

.tl-item { position: relative; padding-bottom: 6px; }

/* punto/rombo dorado sobre la línea */
.tl-item::before {
  content: "";
  position: absolute;
  left: -34px; top: 6px;
  width: 16px; height: 16px;
  transform: translateX(.5px) rotate(45deg);
  background: var(--bg);
  border: 2px solid var(--gold);
  box-shadow: 0 0 0 4px var(--bg), 0 0 16px rgba(212,175,55,.5);
}

.tl-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  padding: clamp(20px, 3vw, 30px);
  box-shadow: var(--shadow-sm);
  transition: border-color .3s var(--ease), transform .3s var(--ease);
}
@media (hover: hover) {
  .tl-card:hover { border-color: var(--gold-deep); transform: translateX(4px); }
}

.tl-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px 20px;
  margin-bottom: 6px;
}
.tl-role {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--text);
}
.tl-company { color: var(--gold-soft); font-weight: 600; }
.tl-date {
  font-family: var(--font-mono);
  font-size: .78rem;
  letter-spacing: .08em;
  color: var(--text-3);
  white-space: nowrap;
}

.tl-list { margin-top: 14px; display: grid; gap: 10px; }
.tl-list li {
  position: relative;
  padding-left: 22px;
  color: var(--text-2);
  font-size: .98rem;
}
.tl-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 9px;
  width: 7px; height: 7px;
  background: var(--gold);
  transform: rotate(45deg);
}

/* ----------------------------------------------------------------------
   9) TARJETAS GENÉRICAS (educación, cursos, referencias)
   ---------------------------------------------------------------------- */
.grid-cards {
  display: grid;
  gap: 18px;
  margin-top: 8px;
}
.grid-cards--2 { grid-template-columns: repeat(2, 1fr); }
.grid-cards--3 { grid-template-columns: repeat(3, 1fr); }
.grid-cards--auto { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }

.card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  padding: clamp(20px, 2.6vw, 26px);
  box-shadow: var(--shadow-sm);
  transition: border-color .3s var(--ease), transform .3s var(--ease);
  overflow: hidden;
}
/* línea dorada superior que crece en hover */
.card::after {
  content: "";
  position: absolute;
  left: 0; top: 0;
  height: 2px; width: 100%;
  background: linear-gradient(90deg, var(--gold), transparent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .4s var(--ease);
}
@media (hover: hover) {
  .card:hover { border-color: var(--gold-deep); transform: translateY(-4px); }
  .card:hover::after { transform: scaleX(1); }
}

.card__icon {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 11px;
  margin-bottom: 16px;
  color: var(--gold);
  background: rgba(212,175,55,.08);
  border: 1px solid rgba(212,175,55,.25);
}
.card__icon svg { width: 22px; height: 22px; }

.card__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  line-height: 1.3;
}
.card__sub { margin-top: 7px; color: var(--text-2); font-size: .95rem; }
.card__meta {
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: .74rem;
  letter-spacing: .08em;
  color: var(--gold-soft);
}

/* Tarjeta de curso (más compacta) */
.course .card__title { font-size: 1rem; }

/* Tarjeta de referencia */
.ref__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.04rem;
  color: var(--text);
}
.ref__role { color: var(--text-3); font-size: .88rem; margin-top: 3px; }
.ref__phone {
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: .9rem;
  color: var(--gold-soft);
  transition: color .25s var(--ease);
}
.ref__phone svg { width: 15px; height: 15px; }
@media (hover: hover) { .ref__phone:hover { color: var(--gold); } }

/* ----------------------------------------------------------------------
   10) HABILIDADES Y CUALIDADES
   ---------------------------------------------------------------------- */
.skills__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 8px;
}
.skill {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  padding: 20px 22px;
  transition: border-color .3s var(--ease), transform .3s var(--ease);
}
@media (hover: hover) {
  .skill:hover { border-color: var(--gold-deep); transform: translateY(-3px); }
}
.skill__mark {
  margin-top: 7px;
  width: 10px; height: 10px;
  background: var(--gold);
  transform: rotate(45deg);
  box-shadow: 0 0 12px rgba(212,175,55,.5);
  flex: none;
}
.skill__text strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--text);
  font-size: 1rem;
  margin-bottom: 2px;
}
.skill__text span { color: var(--text-2); font-size: .92rem; }

/* Chips de cualidades / etiquetas doradas */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
  margin-top: 30px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 17px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(212,175,55,.04);
  font-size: .9rem;
  color: var(--text);
  transition: border-color .25s var(--ease), color .25s var(--ease), background .25s var(--ease);
}
.chip::before {
  content: "";
  width: 7px; height: 7px;
  background: var(--gold);
  transform: rotate(45deg);
  flex: none;
}
@media (hover: hover) {
  .chip:hover { border-color: var(--gold); color: var(--gold-soft); background: rgba(212,175,55,.09); }
}

/* Subtítulo dentro de una sección */
.subhead {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 44px;
  margin-bottom: 4px;
  font-family: var(--font-mono);
  font-size: .8rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--text-2);
}
.subhead::after {
  content: "";
  height: 1px; flex: 1;
  background: var(--line);
}

/* ----------------------------------------------------------------------
   11) IDIOMAS — BARRAS DE NIVEL
   ---------------------------------------------------------------------- */
.langs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 26px 48px;
  margin-top: 8px;
}
.lang__top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 12px;
}
.lang__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text);
}
.lang__level {
  font-family: var(--font-mono);
  font-size: .8rem;
  letter-spacing: .06em;
  color: var(--gold-soft);
}
.bar {
  height: 8px;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--line);
  overflow: hidden;
}
.bar__fill {
  height: 100%;
  width: 0;                       /* se anima por JS al entrar en pantalla */
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold) 60%, var(--gold-soft));
  box-shadow: 0 0 14px rgba(212,175,55,.5);
  transition: width 1.3s var(--ease);
}

/* ----------------------------------------------------------------------
   12) CONTACTO + FORMULARIO
   ---------------------------------------------------------------------- */
.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(28px, 5vw, 60px);
  align-items: start;
}

.contact__list { display: grid; gap: 14px; margin-top: 8px; }
.contact-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  transition: border-color .3s var(--ease), transform .3s var(--ease);
}
@media (hover: hover) {
  a.contact-item:hover { border-color: var(--gold-deep); transform: translateX(4px); }
}
.contact-item__icon {
  width: 44px; height: 44px; flex: none;
  display: grid; place-items: center;
  border-radius: 11px;
  color: var(--gold);
  background: rgba(212,175,55,.08);
  border: 1px solid rgba(212,175,55,.25);
}
.contact-item__icon svg { width: 21px; height: 21px; }
.contact-item__label {
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text-3);
}
.contact-item__value { color: var(--text); font-size: .98rem; margin-top: 2px; word-break: break-word; }

/* Formulario */
.form {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  padding: clamp(22px, 3vw, 32px);
  box-shadow: var(--shadow);
}
.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-2);
  margin-bottom: 9px;
}
.field input,
.field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 16px;               /* evita el zoom automático en iOS */
  color: var(--text);
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 13px 15px;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.field textarea { resize: vertical; min-height: 130px; }
.field input::placeholder,
.field textarea::placeholder { color: var(--text-3); }
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--ring);
}
/* estado de error de validación */
.field.has-error input,
.field.has-error textarea { border-color: #e0564f; box-shadow: 0 0 0 3px rgba(224,86,79,.18); }
.field__error {
  display: none;
  margin-top: 7px;
  font-size: .8rem;
  color: #f08079;
}
.field.has-error .field__error { display: block; }

.form__submit { width: 100%; margin-top: 6px; }

/* aviso de éxito tras "enviar" */
.form__note {
  display: none;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding: 13px 16px;
  border: 1px solid rgba(70,209,127,.4);
  border-radius: 10px;
  background: rgba(70,209,127,.08);
  color: #8ee5b3;
  font-size: .9rem;
}
.form__note.is-visible { display: flex; }
.form__note svg { width: 18px; height: 18px; flex: none; }

/* ----------------------------------------------------------------------
   13) FOOTER
   ---------------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--panel-2);
  padding-block: 44px;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 13px;
}
.footer-brand .brand__mark { width: 36px; height: 36px; }
.footer-name {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--text);
  font-size: .96rem;
}
.footer-copy { color: var(--text-3); font-size: .82rem; margin-top: 2px; }

.footer-nav { display: flex; flex-wrap: wrap; gap: 6px 4px; }
.footer-nav a {
  padding: 7px 13px;
  font-size: .86rem;
  color: var(--text-2);
  border-radius: 8px;
  transition: color .25s var(--ease), background .25s var(--ease);
}
@media (hover: hover) {
  .footer-nav a:hover { color: var(--gold-soft); background: rgba(212,175,55,.06); }
}

/* Botón volver arriba */
.to-top {
  position: fixed;
  right: clamp(16px, 4vw, 32px);
  bottom: clamp(16px, 4vw, 32px);
  width: 50px; height: 50px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  color: #1a1407;
  box-shadow: 0 14px 30px -12px rgba(212,175,55,.7);
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  transition: opacity .3s var(--ease), transform .3s var(--ease), visibility .3s;
  z-index: 90;
  margin-bottom: env(safe-area-inset-bottom);
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top svg { width: 22px; height: 22px; }
@media (hover: hover) {
  .to-top:hover { transform: translateY(-3px); }
}

/* ----------------------------------------------------------------------
   14) ANIMACIONES DE APARICIÓN AL HACER SCROLL
       (la clase .reveal se activa cuando el elemento entra en pantalla)
   ---------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* retrasos escalonados para grupos de tarjetas */
.reveal.d1 { transition-delay: .07s; }
.reveal.d2 { transition-delay: .14s; }
.reveal.d3 { transition-delay: .21s; }
.reveal.d4 { transition-delay: .28s; }
.reveal.d5 { transition-delay: .35s; }

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

/* ----------------------------------------------------------------------
   15) RESPONSIVE
   ---------------------------------------------------------------------- */

/* ── Pantallas grandes (≥ 1280px): más aire y espacio ────────────────── */
@media (min-width: 1280px) {
  .hero__grid    { gap: 84px; }
  .about__grid   { gap: 76px; }
  .contact__grid { gap: 76px; }
}

/* ── Escritorio medio (≤ 1100px): ajuste suave del hero ──────────────── */
@media (max-width: 1100px) {
  .hero__grid { grid-template-columns: 1.1fr 1fr; gap: 40px; }
}

/* ── Tablet (≤ 980px): columna única ────────────────────────────────── */
@media (max-width: 980px) {
  .hero__grid {
    grid-template-columns: 1fr;
    gap: 64px;
  }
  .hero__photo-wrap {
    order: -1;
    width: min(260px, 62vw);
    margin-inline: auto;
    /* compensa el photo-badge absoluto (bottom:-22px + alto ~36px) */
    padding-bottom: 50px;
  }
  .hero__text { text-align: left; }
  .hero__desc { max-width: 56ch; }

  /* Forzamos 3 columnas en facts para evitar el 2+1 asimétrico */
  .about__facts  { grid-template-columns: repeat(3, 1fr); }
  .about__grid   { grid-template-columns: 1fr; }
  .contact__grid { grid-template-columns: 1fr; }
  .grid-cards--3 { grid-template-columns: repeat(2, 1fr); }
}

/* ── Tablet pequeña / móvil grande (≤ 760px): menú hamburguesa ───────── */
@media (max-width: 760px) {
  .nav-toggle { display: flex; }

  /* Panel desplegable con altura máxima y scroll interno */
  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px var(--gutter) calc(20px + env(safe-area-inset-bottom));
    background: rgba(10,11,13,.98);
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
    overscroll-behavior: contain;
    transform: translateY(-16px);
    opacity: 0;
    visibility: hidden;
    transition: transform .35s var(--ease), opacity .35s var(--ease), visibility .35s;
  }
  .nav.is-open { transform: translateY(0); opacity: 1; visibility: visible; }

  .nav__link {
    padding: 15px 12px;
    font-size: 1rem;
    min-height: 52px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--line-soft);
    border-radius: 0;
    transition: background .2s var(--ease), color .2s var(--ease);
  }
  .nav__link:last-child        { border-bottom: none; }
  .nav__link::after            { display: none; }
  .nav__link.is-active {
    background: rgba(212,175,55,.08);
    border-radius: 8px;
    color: var(--gold-soft);
    border-bottom-color: transparent;
  }

  .brand__name { display: none; }

  /* Hero ajustado */
  .hero__photo-wrap { width: min(230px, 58vw); padding-bottom: 48px; }

  /* Skills y langs colapsan a 1 columna */
  .skills__grid { grid-template-columns: 1fr; }
  .langs        { grid-template-columns: 1fr; gap: 24px; }
}

/* ── Móvil (≤ 560px) ────────────────────────────────────────────────── */
@media (max-width: 560px) {
  .grid-cards--2,
  .grid-cards--3   { grid-template-columns: 1fr; }

  .hero__photo-wrap    { width: min(210px, 64vw); padding-bottom: 46px; }
  .hero__actions       { flex-direction: column; align-items: stretch; }
  .hero__actions .btn  { width: 100%; }
  .photo-badge         { font-size: .66rem; padding: 8px 14px; }

  /* Facts: 3 columnas compactas */
  .about__facts { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .fact         { padding: 14px 10px; }
  .fact__num    { font-size: 1.28rem; }
  .fact__label  { font-size: .76rem; }

  /* Timeline compacto */
  .timeline        { padding-left: 26px; }
  .tl-item::before { left: -26px; width: 13px; height: 13px; top: 8px; }

  /* Chips */
  .chips { gap: 8px; }
  .chip  { padding: 8px 14px; font-size: .85rem; }

  /* Contacto */
  .contact-item       { padding: 13px 14px; }
  .contact-item__icon { width: 40px; height: 40px; }
  .contact-item__icon svg { width: 18px; height: 18px; }

  .footer-inner { flex-direction: column; align-items: flex-start; }
}

/* ── Móvil muy pequeño (≤ 380px) — iPhone SE, Galaxy A, Moto E ──────── */
@media (max-width: 380px) {
  :root { --gutter: 16px; }

  .hero__photo-wrap { width: min(180px, 70vw); padding-bottom: 44px; }
  .hero__meta       { gap: 8px 14px; }
  .hero__meta-item  { font-size: .84rem; }

  .about__facts { gap: 8px; }
  .fact         { padding: 12px 7px; }
  .fact__num    { font-size: 1.1rem; }
  .fact__label  { font-size: .7rem; }

  .skill  { padding: 16px 14px; gap: 12px; }
  .chips  { gap: 7px; }
  .chip   { padding: 7px 12px; font-size: .82rem; }

  .contact-item__label { letter-spacing: .1em; }
  .contact-item__value { font-size: .92rem; }
}

/* ── Orientación horizontal en móvil (landscape) ────────────────────── */
@media (max-height: 500px) and (orientation: landscape) {
  .hero {
    min-height: auto;
    padding-top:    calc(var(--header-h) + 20px);
    padding-bottom: 44px;
  }
  .hero__grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    align-items: center;
  }
  .hero__photo-wrap {
    order: 0;
    width: min(160px, 30vw);
    padding-bottom: 36px;
    margin-inline: auto;
  }
}

/* ----------------------------------------------------------------------
   16) MODAL — Confirmación de descarga del CV
   ---------------------------------------------------------------------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: var(--gutter);
  background: rgba(0,0,0,.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s var(--ease), visibility .3s;
}
.modal-overlay.is-open { opacity: 1; visibility: visible; }

.modal {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: linear-gradient(160deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow:
    0 48px 96px -24px rgba(0,0,0,.9),
    0 0 0 1px rgba(212,175,55,.1),
    inset 0 1px 0 rgba(255,255,255,.04);
  padding: clamp(28px, 5vw, 42px);
  text-align: center;
  transform: translateY(24px) scale(.96);
  transition: transform .38s var(--ease);
}
.modal-overlay.is-open .modal { transform: translateY(0) scale(1); }

.modal__close {
  position: absolute;
  top: 14px; right: 14px;
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border-radius: 8px;
  color: var(--text-3);
  transition: color .2s var(--ease), background .2s var(--ease);
}
@media (hover: hover) {
  .modal__close:hover { color: var(--text); background: rgba(255,255,255,.06); }
}
.modal__close svg { width: 18px; height: 18px; }

.modal__icon {
  width: 68px; height: 68px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(212,175,55,.08);
  border: 1px solid rgba(212,175,55,.3);
  color: var(--gold);
  margin-inline: auto;
  margin-bottom: 22px;
  box-shadow: 0 0 28px rgba(212,175,55,.15);
}
.modal__icon svg { width: 30px; height: 30px; }

.modal__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.28rem;
  color: var(--text);
  margin-bottom: 10px;
}

.modal__desc {
  color: var(--text-2);
  font-size: .97rem;
  line-height: 1.6;
  margin-bottom: 30px;
  max-width: 32ch;
  margin-inline: auto;
}
.modal__desc strong { color: var(--gold-soft); font-weight: 600; }

.modal__actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
.modal__actions .btn {
  flex: 1;
  min-width: 130px;
  padding: 11px 22px;
  font-size: .9rem;
  white-space: nowrap;
}

/* ----------------------------------------------------------------------
   17) MODAL DE ENVÍO — spinner + estados éxito / error
   ---------------------------------------------------------------------- */

/* Spinner dorado giratorio */
.spinner {
  width: 64px; height: 64px;
  color: var(--gold);
  animation: spin 1.1s linear infinite;
  margin-inline: auto;
  margin-bottom: 18px;
}
.spinner svg { width: 100%; height: 100%; display: block; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }

/* Contenedor centrado del modal de envío */
.submit-modal {
  text-align: center;
  padding: clamp(32px, 6vw, 48px);
}

/* Cada estado del modal (loading / success / error) */
.smodal-state          { display: none; flex-direction: column; align-items: center; }
.smodal-state.is-active { display: flex; }

/* Texto bajo el spinner */
.smodal-label {
  font-family: var(--font-mono);
  font-size: .82rem;
  letter-spacing: .1em;
  color: var(--text-3);
}

/* Icono circular (check o X) */
.smodal-icon {
  width: 72px; height: 72px;
  display: grid; place-items: center;
  border-radius: 50%;
  margin-inline: auto;
  margin-bottom: 20px;
  animation: popIn .5s var(--ease) both;
}
.smodal-icon svg { width: 32px; height: 32px; }

.smodal-icon--ok {
  background: rgba(212,175,55,.1);
  border: 2px solid rgba(212,175,55,.45);
  color: var(--gold);
  box-shadow: 0 0 28px rgba(212,175,55,.2);
}
.smodal-icon--err {
  background: rgba(224,86,79,.1);
  border: 2px solid rgba(224,86,79,.45);
  color: #e0564f;
  box-shadow: 0 0 28px rgba(224,86,79,.15);
}

@keyframes popIn {
  0%   { transform: scale(.5); opacity: 0; }
  70%  { transform: scale(1.08); }
  100% { transform: scale(1);   opacity: 1; }
}

.smodal-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--text);
  margin-bottom: 10px;
}

.smodal-desc {
  color: var(--text-2);
  font-size: .97rem;
  line-height: 1.6;
  margin-bottom: 28px;
  max-width: 28ch;
}

.smodal-btn { width: 100%; }

/* ----------------------------------------------------------------------
   18) ESTILOS DE IMPRESIÓN
   ---------------------------------------------------------------------- */
@media print {
  :root {
    --bg: #ffffff; --panel: #ffffff; --panel-2: #ffffff;
    --text: #14161a; --text-2: #3a3f47; --text-3: #5d636c;
    --line: #d7d9dd; --line-soft: #e6e8ea;
    --gold: #9a7d27; --gold-soft: #9a7d27; --gold-deep: #9a7d27;
  }
  @page { margin: 14mm; }

  body { background: #fff; color: #14161a; font-size: 11pt; line-height: 1.4; }

  /* Ocultar lo que no aplica en papel */
  .site-header, .nav-toggle, .scroll-cue, .to-top,
  .hero__actions, .hero__status, .hero__dot,
  .form, .footer-nav, .photo-badge, .subhead::after { display: none !important; }

  .hero, .section { padding-block: 10px !important; min-height: 0 !important; }
  .hero::before, .hero::after, .card::after, .nav__link::after { display: none !important; }

  .hero { page-break-after: avoid; }
  .hero__grid { grid-template-columns: 1.4fr .8fr; gap: 24px; }
  .hero__name { font-size: 26pt; }
  .hero__photo-wrap { width: 150px; }
  .photo-frame { box-shadow: none; background: #fff; padding: 4px; border: 1px solid #c8b56a; }
  .corner { display: none; }

  .section { break-inside: avoid; }
  .reveal { opacity: 1 !important; transform: none !important; }

  .card, .tl-card, .skill, .chip, .fact, .contact-item, .form, .bar {
    box-shadow: none !important;
    border: 1px solid #d7d9dd !important;
    background: #fff !important;
  }
  .bar__fill { box-shadow: none !important; }

  a { color: #14161a; }
  .grid-cards--3 { grid-template-columns: repeat(3, 1fr); }
}
