/* =========================================
   PORTAFOLIO: Mobile-first, vanilla CSS
   Estética: editor de código / dev moderno
   Fondo midnight + acento cian/teal
   ========================================= */

/* ---------- FUENTES SELF-HOSTED ---------- */
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/fraunces-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/jetbrainsmono-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* Paleta: modo oscuro tipo editor */
  --bg: #0a0f1c;          /* midnight base */
  --bg-deep: #131b2e;     /* tarjetas */
  --bg-elev: #1a2440;     /* hover / elevación */
  --ink: #e8edf5;         /* texto principal */
  --ink-soft: #94a3b8;    /* texto secundario (slate-400) */
  --ink-mute: #64748b;    /* aún más sutil (slate-500) */
  --accent: #e8963e;      /* naranja Benny: cálido, propio */
  --accent-2: #38bdf8;    /* sky-400: secundario */
  --accent-3: #c084fc;    /* purple-400: para proyecto 2 */
  --accent-glow: rgba(232, 150, 62, 0.18);
  --accent-glow-soft: rgba(232, 150, 62, 0.08);
  --line: #1f2940;        /* divisores oscuros */
  --line-bright: #2d3a5f; /* línea más visible (hover) */

  /* Tipografía */
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI",
          "Helvetica Neue", Arial, sans-serif;

  /* Espaciado fluido */
  --gap-xs: 0.5rem;
  --gap-s:  1rem;
  --gap-m:  1.75rem;
  --gap-l:  3rem;
  --gap-xl: 5rem;

  /* Radio */
  --r: 6px;

  /* Movimiento: curvas con carácter, no las débiles de CSS */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-io: cubic-bezier(0.77, 0, 0.175, 1);

  /* Benny */
  --benny: #e8963e;
}

/* Reset base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  /* Atmósfera: gradientes radiales sutiles para crear profundidad */
  background-image:
    radial-gradient(ellipse 80% 50% at 15% 0%, rgba(232, 150, 62, 0.09), transparent 60%),
    radial-gradient(ellipse 70% 50% at 85% 100%, rgba(56, 189, 248, 0.07), transparent 60%),
    radial-gradient(ellipse 60% 40% at 50% 50%, rgba(192, 132, 252, 0.04), transparent 70%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; height: auto; }
a { color: inherit; text-decoration: none; overflow-wrap: break-word; -webkit-tap-highlight-color: transparent; }
ul { list-style: none; }
button { font: inherit; background: none; border: none; cursor: pointer; color: inherit; -webkit-tap-highlight-color: transparent; }
h1, h2, h3, p { overflow-wrap: break-word; }

::selection { background: var(--accent); color: var(--bg); }

/* ---------- ACCESIBILIDAD ---------- */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 100;
  background: var(--bg);
  color: var(--accent);
  padding: 0.75rem 1rem;
  border: 1px solid var(--accent);
  border-radius: var(--r);
  font-family: var(--mono);
  font-size: 0.85rem;
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 1rem;
}

/* ---------- NAV ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.5rem;
  background: rgba(10, 15, 28, 0.78);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.nav__brand {
  font-family: var(--mono);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--ink);
}
.nav__cursor {
  color: var(--accent);
  margin-left: 1px;
  animation: blink 1.1s steps(2) infinite;
}
@keyframes blink {
  0%, 50%   { opacity: 1; }
  51%, 100% { opacity: 0; }
}

.nav__toggle {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 6px;
  /* Touch target mínimo iOS HIG */
  min-width: 44px;
  min-height: 44px;
}
.nav__toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.3s ease, opacity 0.2s ease;
}
.nav__toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(3.25px) rotate(45deg);
}
.nav__toggle[aria-expanded="true"] span:nth-child(2) {
  transform: translateY(-3.25px) rotate(-45deg);
}

.nav__menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: rgba(10, 15, 28, 0.96);
  backdrop-filter: blur(14px);
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  transform: translateY(-110%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.35s ease, opacity 0.25s ease;
}
.nav__menu.is-open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.nav__menu a {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-style: italic;
  font-weight: 400;
  color: var(--ink);
  transition: color 0.2s ease;
}
.nav__menu a:hover { color: var(--accent); }

/* ---------- LAYOUT WRAP ---------- */
main { padding: 0 1.5rem; }
section { padding: var(--gap-xl) 0; border-bottom: 1px solid var(--line); }
section[id] { scroll-margin-top: 80px; }
section:last-child { border-bottom: none; }

.section__label {
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-bottom: var(--gap-m);
  font-weight: 500;
}
.section__label::before {
  content: "~/";
  color: var(--ink-mute);
}

/* ---------- HERO ---------- */
.hero { padding-top: var(--gap-l); position: relative; }

.hero__eyebrow {
  font-family: var(--mono);
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  color: var(--ink-mute);
  margin-bottom: var(--gap-m);
}
.hero__prompt { color: var(--accent); }
.hero__cmd { color: var(--ink); }
.hero__caret {
  display: inline-block;
  width: 0.6em;
  color: var(--accent);
  animation: blink 1.1s steps(2) infinite;
}

/* ---------- TERMINAL DEL HERO ---------- */
.hero__term {
  margin-top: var(--gap-l);
  background: #0b1120;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 24px 60px -30px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(232, 150, 62, 0.05);
  overflow: hidden;
}
.term__bar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.65rem 0.9rem;
  border-bottom: 1px solid var(--line);
}
.term__bar span { width: 10px; height: 10px; border-radius: 50%; }
.term__bar span:nth-child(1) { background: rgba(248, 113, 113, 0.65); }
.term__bar span:nth-child(2) { background: rgba(251, 191, 36, 0.65); }
.term__bar span:nth-child(3) { background: rgba(52, 211, 153, 0.65); }
.term__bar p {
  position: absolute;
  left: 0; right: 0;
  text-align: center;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--ink-mute);
  pointer-events: none;
}
.term__body {
  padding: 1rem 1.1rem 1.2rem;
  font-family: var(--mono);
  font-size: 0.83rem;
  line-height: 1.9;
}
.t-line { margin: 0; }
.t-cmd { color: var(--ink); }
.t-out { color: var(--ink-soft); }
.t-dim { color: var(--ink-mute); }
.t-prompt { color: var(--accent); }
.t-ls { display: flex; flex-wrap: wrap; gap: 0.3rem 1.1rem; }
.t-ls a {
  color: var(--accent-2);
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease;
}
.t-ls a:hover { border-color: var(--accent-2); }
.t-ls a:active { opacity: 0.7; }

/* Repetición línea a línea (solo con JS; sin JS todo visible) */
.js .t-line {
  opacity: 0;
  transition: opacity 0.18s ease;
}
.js .t-line.is-shown,
.js .term__body.is-static .t-line { opacity: 1; }

/* Secuencia de entrada del hero (solo con JS activo) */
.js .hero [data-rise] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
  transition-delay: var(--rise, 0ms);
}
.js.is-loaded .hero [data-rise] {
  opacity: 1;
  transform: translateY(0);
}
.hero__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.9rem, 6.2vw, 2.9rem);
  line-height: 1.18;
  letter-spacing: -0.022em;
  margin-bottom: var(--gap-m);
  color: var(--ink);
  max-width: 22ch;
  text-wrap: balance;
}
.hero__title em {
  font-style: italic;
  font-weight: 500;
  color: var(--accent-2);
  text-shadow: 0 0 24px rgba(56, 189, 248, 0.28);
}
.hero__title .accent {
  color: var(--accent);
  font-style: italic;
  text-shadow: 0 0 24px var(--accent-glow);
}
.hero__lead {
  font-size: 1.05rem;
  color: var(--ink-soft);
  max-width: 38ch;
  margin-bottom: var(--gap-m);
}
.hero__cta {
  display: inline-flex;
  align-items: center;
  font-family: var(--mono);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: var(--r);
  padding: 0.85rem 1.4rem;
  background: var(--accent-glow-soft);
  box-shadow: 0 0 0 0 var(--accent-glow);
  transition: background 0.25s ease, box-shadow 0.3s ease, transform 0.16s var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .hero__cta:hover {
    background: var(--accent-glow);
    box-shadow: 0 0 24px 0 var(--accent-glow);
    transform: translateY(-1px);
  }
  .hero__cta:hover .hero__cta-arrow { transform: translateX(3px); }
}
.hero__cta:active { transform: scale(0.97); }
.hero__cta-arrow {
  display: inline-block;
  margin-left: 0.45rem;
  transition: transform 0.2s var(--ease-out);
}

/* ---------- BENNY ---------- */
.hero__ground {
  position: relative;
  height: 76px;
  margin-top: var(--gap-l);
}
.hero__ground::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 12px;
  height: 2px;
  background: var(--accent);
  opacity: 0.5;
}
.hero__ground::before {
  content: "";
  position: absolute;
  left: 6px; right: 8%;
  bottom: 5px;
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--accent) 0 7px, transparent 7px 54px);
  opacity: 0.22;
}
.benny-box {
  position: absolute;
  bottom: 14px;
  left: 0;
  width: 64px;
  height: 56px;
  cursor: pointer;
  will-change: transform;
}
.benny-box canvas {
  position: absolute;
  bottom: 0; left: 4px;
  width: 56px; height: 40px;
  image-rendering: pixelated;
}
.benny-tip {
  position: absolute;
  bottom: calc(100% + 4px);
  left: 50%;
  transform: translate(-50%, 4px);
  white-space: nowrap;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--benny);
  border-bottom: 1px dashed var(--benny);
  padding-bottom: 1px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s var(--ease-out), transform 0.25s var(--ease-out);
}
.benny-tip.is-on {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}

/* ---------- ABOUT ---------- */
.about__avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: var(--gap-m);
  border: 1px solid var(--accent);
  padding: 4px;
  background: var(--bg-deep);
  box-shadow: 0 0 0 1px var(--line), 0 10px 30px -10px var(--accent-glow);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.about__avatar:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 0 1px var(--accent), 0 14px 40px -8px var(--accent-glow);
}

.about__text p { margin-bottom: var(--gap-s); font-size: 1.05rem; color: var(--ink-soft); }
.about__text strong { color: var(--accent); font-weight: 600; }

.about__skills {
  margin-top: var(--gap-m);
  border-top: 1px solid var(--line);
}
.about__skills li {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--serif);
  font-size: 1.15rem;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: color 0.2s ease;
}
.about__skills li::before {
  content: "→";
  color: var(--accent);
  font-family: var(--mono);
  font-style: normal;
}
.about__skills li:hover { color: var(--accent); }

/* ---------- CERTIFICACIONES ---------- */
.certs__lead {
  color: var(--ink-soft);
  max-width: 50ch;
  margin-bottom: var(--gap-m);
  font-size: 1rem;
}
.certs__grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}
.cert {
  --cert-accent: var(--accent);
  --cert-glow: var(--accent-glow);
  position: relative;
  padding: 1.4rem;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--bg-deep);
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.22s var(--ease-out), border-color 0.25s ease,
              background 0.25s ease, box-shadow 0.35s ease;
}
.cert::before {
  /* Línea de acento lateral por emisor */
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--cert-accent);
  opacity: 0.55;
  transition: opacity 0.3s ease, width 0.3s ease;
}
.cert::after {
  /* Número decorativo gigante de fondo */
  content: attr(data-num);
  position: absolute;
  right: -0.4rem;
  bottom: -2.6rem;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: 8.5rem;
  line-height: 1;
  color: var(--cert-accent);
  opacity: 0.07;
  pointer-events: none;
  z-index: 0;
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.cert:hover {
  transform: translateY(-3px);
  border-color: var(--line-bright);
  background: var(--bg-elev);
  box-shadow: 0 14px 38px -14px var(--cert-glow);
}
.cert:hover::before {
  opacity: 1;
  width: 4px;
}
.cert:hover::after {
  opacity: 0.16;
  transform: translateY(-6px);
}
.cert:active { transform: scale(0.985); }

.cert__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
  position: relative;
  z-index: 1;
}
.cert__num {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  color: var(--ink-mute);
  font-weight: 500;
}
.cert__num::before {
  content: "#";
  color: var(--ink-mute);
}
.cert__year {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--cert-accent);
  background: color-mix(in srgb, var(--cert-accent) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--cert-accent) 35%, transparent);
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
}
.cert__title {
  position: relative;
  z-index: 1;
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.25;
  margin-bottom: 0.45rem;
  color: var(--ink);
}
.cert__issuer {
  position: relative;
  z-index: 1;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--ink-soft);
  letter-spacing: 0.02em;
}

/* Acentos por emisor */
.cert[data-issuer="cisco"]   { --cert-accent: var(--accent);    --cert-glow: rgba(232, 150, 62, 0.28); }
.cert[data-issuer="uk"]      { --cert-accent: var(--accent-3);  --cert-glow: rgba(192, 132, 252, 0.25); }
.cert[data-issuer="funadeh"] { --cert-accent: var(--accent-2);  --cert-glow: rgba(56, 189, 248, 0.25); }
.cert[data-issuer="oracle"]  { --cert-accent: #2dd4bf;          --cert-glow: rgba(45, 212, 191, 0.25); }
.cert[data-issuer="infop"]   { --cert-accent: #f472b6;          --cert-glow: rgba(244, 114, 182, 0.25); }

/* ---------- PROYECTOS ---------- */
.project { margin-bottom: var(--gap-l); }
.project:last-of-type { margin-bottom: 0; }

.project__visual {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: var(--r);
  margin-bottom: var(--gap-s);
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  transition: transform 0.4s ease, border-color 0.3s ease, box-shadow 0.4s ease;
  /* Centrado para mostrar logos */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

/* Capa 1: gradiente atmosférico */
/* Bisory: azul-violeta con neón rosa, a juego con su ícono de VR */
.project__visual[data-color="indigo"] {
  background:
    radial-gradient(circle at 30% 20%, rgba(129, 140, 248, 0.50), transparent 55%),
    radial-gradient(circle at 80% 80%, rgba(244, 114, 182, 0.38), transparent 55%),
    linear-gradient(135deg, #131329 0%, #181534 100%);
}
.project__visual[data-color="violet"] {
  background:
    radial-gradient(circle at 30% 20%, rgba(192, 132, 252, 0.50), transparent 55%),
    radial-gradient(circle at 80% 80%, rgba(244, 114, 182, 0.35), transparent 55%),
    linear-gradient(135deg, #1a0f29 0%, #1f1530 100%);
}
.project__visual[data-color="coral"] {
  background:
    radial-gradient(circle at 30% 20%, rgba(251, 146, 60, 0.55), transparent 55%),
    radial-gradient(circle at 80% 80%, rgba(244, 114, 182, 0.40), transparent 55%),
    linear-gradient(135deg, #29150d 0%, #2e1b13 100%);
}
/* SubFlow: crema/café de la insignia con eco cian del botón de play */
.project__visual[data-color="sand"] {
  background:
    radial-gradient(circle at 30% 20%, rgba(242, 227, 196, 0.32), transparent 55%),
    radial-gradient(circle at 80% 80%, rgba(62, 198, 224, 0.38), transparent 55%),
    linear-gradient(135deg, #251b11 0%, #2b2114 100%);
}
/* Sunly es un ícono de app: bordes redondeados estilo iOS */
.project__visual[data-color="coral"] img {
  border-radius: 22%;
}

/* <picture> transparente al layout: img queda como hijo flex directo */
.project__visual picture { display: contents; }

/* Imagen del proyecto: logo centrado con respiración */
.project__visual img {
  position: relative;
  max-width: 65%;
  max-height: 65%;
  width: auto;
  height: auto;
  object-fit: contain;
  z-index: 0;
  filter: drop-shadow(0 6px 20px rgba(0,0,0,0.35));
  transition: transform 0.35s var(--ease-out);
}

/* Capa 2: brillo en esquina superior */
.project__visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 0% 0%, rgba(255,255,255,0.08), transparent 40%);
  pointer-events: none;
  z-index: 2;
}

@media (hover: hover) and (pointer: fine) {
  .project:hover .project__visual {
    transform: translateY(-3px);
    border-color: var(--accent);
    box-shadow: 0 16px 44px -14px var(--accent-glow);
  }
  .project:hover .project__visual img { transform: scale(1.03); }
}
.project__visual:active { transform: scale(0.995); }

.project__meta {
  font-family: var(--mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 0.5rem;
}
.project__title {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 5vw, 1.9rem);
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.15;
  margin-bottom: 0.6rem;
  color: var(--ink);
}
.project__desc {
  color: var(--ink-soft);
  margin-bottom: 0.9rem;
  max-width: 52ch;
}
.project__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  align-items: baseline;
}
.project__link {
  font-family: var(--mono);
  font-size: 0.9rem;
  color: var(--accent);
  border-bottom: 1px solid var(--accent);
  padding-bottom: 1px;
  transition: color 0.2s ease, border-color 0.2s ease, letter-spacing 0.25s ease;
}
.project__link:hover { letter-spacing: 0.04em; }
.project__link--code {
  color: var(--ink-soft);
  border-bottom-color: var(--line-bright);
}
.project__link--code:hover { color: var(--accent); border-bottom-color: var(--accent); }

.work__note {
  margin-top: var(--gap-l);
  padding: 1.1rem 1.3rem;
  border: 1px dashed var(--line-bright);
  border-radius: var(--r);
  font-size: 0.95rem;
  color: var(--ink-soft);
  background: var(--bg-deep);
}
.work__note span {
  font-family: var(--mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  font-weight: 500;
  margin-right: 0.5rem;
}

/* ---------- CONTACTO ---------- */
.contact__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2rem, 7vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: var(--gap-s);
  color: var(--ink);
}
.contact__lead {
  color: var(--ink-soft);
  max-width: 40ch;
  margin-bottom: var(--gap-m);
}
.contact__email {
  display: inline-block;
  font-family: var(--serif);
  font-size: clamp(1.4rem, 5vw, 2rem);
  font-style: italic;
  color: var(--accent);
  border-bottom: 1px solid var(--accent);
  padding-bottom: 4px;
  margin-bottom: var(--gap-m);
  text-shadow: 0 0 20px var(--accent-glow);
  transition: opacity 0.2s ease, transform 0.16s var(--ease-out);
}
.contact__email:hover { opacity: 0.75; }
.contact__email:active { transform: scale(0.98); }

.contact__social {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  font-size: 0.9rem;
}
.contact__social a {
  font-family: var(--mono);
  color: var(--ink-soft);
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.contact__social a:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- FOOTER ---------- */
.footer {
  padding: 2rem 1.5rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--ink-mute);
  border-top: 1px solid var(--line);
  font-family: var(--mono);
}
.footer__code { color: var(--accent); }

/* ---------- ANIMACIÓN DE ENTRADA ---------- */
.fade-in {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
  transition-delay: var(--d, 0ms);
}
.fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================
   BREAKPOINT: TABLET (≥ 720px)
   ========================================= */
@media (min-width: 720px) {
  main { padding: 0 3rem; }
  .nav { padding: 1.4rem 3rem; }

  .nav__toggle { display: none; }
  .nav__menu {
    position: static;
    flex-direction: row;
    background: transparent;
    backdrop-filter: none;
    padding: 0;
    gap: 2rem;
    border: none;
    transform: none;
    opacity: 1;
    pointer-events: auto;
  }
  .nav__menu a {
    font-family: var(--mono);
    font-size: 0.85rem;
    font-style: normal;
    color: var(--ink-soft);
    border-bottom: 1px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
  }
  .nav__menu a:hover { color: var(--accent); border-color: var(--accent); }

  .hero {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.9fr);
    gap: clamp(2.5rem, 6vw, 5rem);
    align-items: center;
  }
  .hero__term { margin-top: 0; }
  .hero__ground { grid-column: 1 / -1; margin-top: var(--gap-m); }
  .hero__title { font-size: clamp(2rem, 3.4vw, 2.75rem); }
  .hero__title em { white-space: nowrap; }

  .about__grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: var(--gap-l);
    align-items: start;
  }
  .about__skills { margin-top: 0; }

  .certs__grid { grid-template-columns: repeat(2, 1fr); }

  .project {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--gap-l);
    align-items: center;
    margin-bottom: var(--gap-xl);
  }
  .project:nth-child(even) .project__visual { order: 2; }
  .project__visual { margin-bottom: 0; aspect-ratio: 5 / 4; }
}

/* =========================================
   BREAKPOINT: DESKTOP (≥ 1100px)
   ========================================= */
@media (min-width: 1100px) {
  main { max-width: 1180px; margin: 0 auto; padding: 0 4rem; }
  .nav { padding: 1.6rem 4rem; }
  section { padding: 7rem 0; }
  .hero { padding-top: 5rem; padding-bottom: 8rem; }
  .hero__title { font-size: 2.75rem; max-width: 22ch; line-height: 1.16; }
  .hero__lead { font-size: 1.15rem; }

  .certs__grid { grid-template-columns: repeat(3, 1fr); gap: 1rem; }
}

/* =========================================
   PREFERENCIAS DE MOVIMIENTO
   ========================================= */
/* En pantallas táctiles no hay hover real: sin levitaciones fantasma */
@media (hover: none) {
  .cert:hover { transform: none; background: var(--bg-deep); box-shadow: none; border-color: var(--line); }
  .cert:hover::before { opacity: 0.55; width: 3px; }
  .cert:hover::after { opacity: 0.07; transform: none; }
  .about__avatar:hover { transform: none; box-shadow: 0 0 0 1px var(--line), 0 10px 30px -10px var(--accent-glow); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .nav__cursor, .hero__caret { animation: none; }
}
