/* =========================================================
   Ángel A. Colón Negrón — Página personal
   Tema principal: oscuro. Modo claro opcional (botón en el header).
   Azul de Angel Tech Solutions como acento.
   ========================================================= */

:root {
  /* ---- Modo oscuro (predeterminado) ---- */
  --bg: #070707;
  --surface: rgba(255, 255, 255, .04);
  --surface-2: rgba(255, 255, 255, .07);
  --surface-solid: #111111;
  --ink: #F5F5F5;
  --ink-soft: #BDBDBD;
  --muted: #8C8C8C;
  --line: rgba(255, 255, 255, .10);
  --line-strong: rgba(255, 255, 255, .22);
  --accent: #EF4444;          /* rojo Angel Tech Solutions */
  --accent-rgb: 239, 68, 68;
  --link: #5B9BFF;            /* azul solo para enlaces */
  --link-hover: #8DB8FF;
  --ats: var(--link);
  --ats-hover: var(--link-hover);
  --on-accent: #fff;
  --header-bg: rgba(7, 7, 7, .72);
  --blob-a: rgba(239, 68, 68, .26);
  --blob-b: rgba(153, 27, 27, .30);
  --blob-c: rgba(239, 68, 68, .12);
  --grid: rgba(255, 255, 255, .035);
  --shadow: 0 20px 50px -20px rgba(0, 0, 0, .8);
  --ok: #4ADE80;
  --err: #F87171;

  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --wrap: 1100px;
  --gutter: 24px;
  --radius: 14px;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #F6F6F6;
  --surface: rgba(255, 255, 255, .75);
  --surface-2: rgba(255, 255, 255, .95);
  --surface-solid: #FFFFFF;
  --ink: #111111;
  --ink-soft: #444444;
  --muted: #6B6B6B;
  --line: rgba(0, 0, 0, .10);
  --line-strong: rgba(0, 0, 0, .22);
  --accent: #DC2626;
  --accent-rgb: 220, 38, 38;
  --link: #1D5FE0;
  --link-hover: #1446AD;
  --header-bg: rgba(246, 246, 246, .8);
  --blob-a: rgba(239, 68, 68, .16);
  --blob-b: rgba(220, 38, 38, .10);
  --blob-c: rgba(0, 0, 0, .05);
  --grid: rgba(0, 0, 0, .045);
  --shadow: 0 20px 50px -24px rgba(0, 0, 0, .22);
  --ok: #15803D;
  --err: #B91C1C;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background-color .4s ease, color .4s ease;
}

img { max-width: 100%; display: block; }

a {
  color: inherit;
  text-decoration: none;
  transition: color .2s ease, border-color .2s ease, opacity .2s ease, background-color .2s ease, transform .2s ease;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip {
  position: absolute; left: -999px; top: 8px;
  background: var(--accent); color: #fff; padding: 8px 14px; z-index: 100; border-radius: 8px;
}
.skip:focus { left: 8px; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

::selection { background: var(--accent); color: #fff; }

/* ---------- Fondo: auroras rojas + rejilla + red de partículas ---------- */

.fx {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background: var(--bg);
  transition: background-color .4s ease;
}

/* Rejilla tecnológica que se desvanece hacia abajo */
.fx::before {
  content: "";
  position: absolute;
  inset: -2px;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 80%);
  animation: grid-pan 40s linear infinite;
}
@keyframes grid-pan { to { background-position: 56px 56px, 56px 56px; } }

/* Viñeta para dar profundidad */
.fx::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, .35) 100%);
}
:root[data-theme="light"] .fx::after { background: none; }

/* Auroras: manchas de luz roja que flotan lentamente */
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  will-change: transform;
}
.blob.b1 {
  width: 46vmax; height: 46vmax;
  top: -18vmax; left: -12vmax;
  background: radial-gradient(circle, var(--blob-a), transparent 65%);
  animation: drift1 26s ease-in-out infinite alternate;
}
.blob.b2 {
  width: 40vmax; height: 40vmax;
  bottom: -20vmax; right: -14vmax;
  background: radial-gradient(circle, var(--blob-b), transparent 65%);
  animation: drift2 32s ease-in-out infinite alternate;
}
.blob.b3 {
  width: 30vmax; height: 30vmax;
  top: 35%; left: 45%;
  background: radial-gradient(circle, var(--blob-c), transparent 65%);
  animation: drift3 22s ease-in-out infinite alternate;
}
@keyframes drift1 { to { transform: translate(18vw, 14vh) scale(1.15); } }
@keyframes drift2 { to { transform: translate(-16vw, -18vh) scale(1.1); } }
@keyframes drift3 { 0% { transform: translate(-20vw, -10vh) scale(.9); } 100% { transform: translate(10vw, 12vh) scale(1.2); } }

/* Red de partículas (dibujada por js/main.js) */
.fx-net { position: absolute; inset: 0; width: 100%; height: 100%; }

/* ---------- Aparición al hacer scroll ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1);
}
.js .reveal.in { opacity: 1; transform: none; }
.js .reveal.d1 { transition-delay: .08s; }
.js .reveal.d2 { transition-delay: .16s; }
.js .reveal.d3 { transition-delay: .24s; }

/* ---------- Angel Tech Solutions (siempre azul y enlazado) ---------- */

.ats {
  color: var(--ats);
  font-weight: 600;
  border-bottom: 1px solid transparent;
}
a.ats:hover, a:hover > .ats { color: var(--ats-hover); border-bottom-color: currentColor; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  gap: 20px;
}

.brand { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }

.brand-name {
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 500;
  letter-spacing: -.01em;
}

.brand-founder {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-size: .72rem;
  color: var(--muted);
  letter-spacing: .02em;
  white-space: nowrap;
}
.brand-founder img { width: 15px; height: 15px; border-radius: 3px; }

.nav ul {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  gap: 26px;
}

.nav a {
  position: relative;
  font-size: .92rem;
  color: var(--ink-soft);
  padding: 4px 0;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s ease;
}
.nav a:hover { color: var(--ink); }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav a[aria-current="page"] { color: var(--ink); }

.controls { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.ctl {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 38px;
  min-width: 38px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font: 600 .75rem/1 var(--sans);
  letter-spacing: .06em;
  cursor: pointer;
  transition: border-color .2s ease, background-color .2s ease, transform .2s ease;
}
.ctl:hover { border-color: var(--accent); transform: translateY(-1px); }
.ctl svg { width: 17px; height: 17px; }

.lang-toggle span { color: var(--muted); transition: color .2s ease; }
.lang-toggle .slash { opacity: .5; }
html[lang="es"] .lang-toggle [data-l="es"],
html[lang="en"] .lang-toggle [data-l="en"] { color: var(--accent); }

.theme-toggle { padding: 0; width: 38px; }
.theme-toggle .i-moon { display: none; }
:root[data-theme="light"] .theme-toggle .i-sun { display: none; }
:root[data-theme="light"] .theme-toggle .i-moon { display: block; }

.menu-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 10px;
  margin-right: -10px;
  cursor: pointer;
  color: var(--ink);
}
.menu-toggle span {
  display: block; width: 22px; height: 1.5px; background: currentColor;
  transition: transform .25s ease, opacity .2s ease;
}
.menu-toggle span + span { margin-top: 6px; }
.menu-open .menu-toggle span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.menu-open .menu-toggle span:nth-child(2) { opacity: 0; }
.menu-open .menu-toggle span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ---------- Main / page ---------- */

main { flex: 1; }

.page { padding: 88px 0 140px; }

.eyebrow {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .16em;
  color: var(--accent);
  font-weight: 600;
  margin: 0 0 14px;
}

.page-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  line-height: 1.08;
  letter-spacing: -.02em;
  margin: 0;
}
.page-title::after {
  content: "";
  display: block;
  width: 48px;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--accent), transparent);
  margin-top: 22px;
}

.lead {
  font-size: 1.1rem;
  color: var(--ink-soft);
  max-width: 60ch;
}

.prose { max-width: 64ch; }
.prose p { margin: 0 0 1.25em; color: var(--ink-soft); }
.prose p:first-child { color: var(--ink); font-size: 1.12rem; }
.prose strong { color: var(--ink); font-weight: 600; }

.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  color: var(--ink);
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 3px;
}
.arrow-link .arr { color: var(--accent); transition: transform .2s ease; }
.arrow-link:hover { border-bottom-color: var(--accent); }
.arrow-link:hover .arr { transform: translateX(4px); }

.inline-link { color: var(--link); border-bottom: 1px solid transparent; }
.inline-link:hover { color: var(--link-hover); border-bottom-color: currentColor; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* ---------- Redes sociales ---------- */

.social { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; margin: 0; padding: 0; }
.social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  transition: transform .25s ease, border-color .25s ease, color .25s ease, background-color .25s ease, box-shadow .25s ease;
}
.social a:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 10px 24px -10px var(--accent);
}
.social svg { width: 19px; height: 19px; }
.social img { width: 22px; height: 22px; border-radius: 5px; }

/* ---------- Inicio ---------- */

.intro {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 72px;
  align-items: center;
}

.portrait { margin: 0; position: relative; }
.portrait img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center top;
  border-radius: var(--radius);
  background: var(--surface-2);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.portrait::before {
  /* halo azul */
  content: "";
  position: absolute;
  inset: -18px;
  z-index: -1;
  border-radius: 30px;
  background: radial-gradient(closest-side, rgba(var(--accent-rgb), .35), transparent);
  filter: blur(24px);
  animation: glow 6s ease-in-out infinite alternate;
}
.portrait::after {
  content: "";
  position: absolute;
  left: -14px; bottom: -14px;
  width: 64px; height: 64px;
  border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  pointer-events: none;
}
@keyframes glow { from { opacity: .55; transform: scale(.96); } to { opacity: 1; transform: scale(1.03); } }

.hello {
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .16em;
  color: var(--accent);
  font-weight: 600;
  margin: 0 0 18px;
}

.intro h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.6rem, 5.4vw, 4.2rem);
  line-height: 1.04;
  letter-spacing: -.025em;
  margin: 0 0 20px;
}

.roles {
  font-size: .95rem;
  color: var(--ink-soft);
  margin: 0 0 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
}
.roles .sep { color: var(--accent); }

.intro .lead { margin: 0 0 32px; }

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 32px;
  margin-bottom: 36px;
}

.intro .social { margin-bottom: 40px; }

.founder-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  font-size: .85rem;
  color: var(--muted);
  border-radius: 12px;
  transition: transform .25s ease, border-color .25s ease;
}
.founder-badge:hover { transform: translateY(-2px); border-color: var(--accent); }
.founder-badge img { width: 34px; height: 34px; border-radius: 8px; }
.founder-badge .ats { display: block; font-size: .95rem; }

/* ---------- Sobre mí ---------- */

.about {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 72px;
  margin-top: 56px;
  align-items: start;
}
.about .portrait img { aspect-ratio: 3 / 4; }

/* ---------- Proyectos ---------- */

.projects {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.project {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform .35s ease, border-color .35s ease, box-shadow .35s ease;
}
.project:hover { transform: translateY(-4px); border-color: var(--line-strong); box-shadow: var(--shadow); }

.shot {
  display: block;
  position: relative;
  border-bottom: 1px solid var(--line);
  background: var(--surface-solid);
  overflow: hidden;
}
.shot-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}
.shot-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); }
.shot-url {
  margin-left: 10px;
  font-size: .7rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.shot-img { overflow: hidden; aspect-ratio: 16 / 10; }
.shot-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: top;
  transition: transform .8s cubic-bezier(.2, .7, .2, 1);
}
.project:hover .shot-img img { transform: scale(1.045); }

.project-body { padding: 24px 26px 28px; display: flex; flex-direction: column; gap: 10px; flex: 1; }

.project-tag {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--accent);
  font-weight: 600;
  margin: 0;
}

.project h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.6rem;
  line-height: 1.2;
  margin: 0;
}

.project p.desc { margin: 0 0 8px; color: var(--ink-soft); font-size: .97rem; flex: 1; }
.project .arrow-link { align-self: flex-start; white-space: nowrap; }

/* ---------- Preparación ---------- */

.timeline {
  list-style: none;
  margin: 56px 0 0;
  padding: 0;
  max-width: 780px;
  display: grid;
  gap: 16px;
}

.timeline li {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 32px;
  padding: 28px 30px;
}

.timeline .when { font-size: .85rem; color: var(--muted); padding-top: 6px; }
.timeline .when.now { color: var(--accent); font-weight: 600; }

.timeline h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.5rem;
  line-height: 1.25;
  margin: 0 0 6px;
}
.timeline p { margin: 0; color: var(--ink-soft); }

.areas { margin-top: 64px; max-width: 780px; }
.areas h3 {
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--muted);
  font-weight: 500;
  margin: 0 0 18px;
}
.areas ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.areas li {
  font-size: .92rem;
  padding: 7px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  transition: border-color .2s ease, color .2s ease, transform .2s ease;
}
.areas li:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

/* ---------- Contacto ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 48px;
  margin-top: 48px;
  align-items: start;
}

.contact-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.contact-list li {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 20px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.contact-list .label { font-size: .85rem; color: var(--muted); }
.contact-list a:not(.ats) { color: var(--link); border-bottom: 1px solid transparent; word-break: break-word; }
.contact-list a:not(.ats):hover { border-bottom-color: currentColor; color: var(--link-hover); }

.contact-side h2, .form-card h2 {
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--muted);
  font-weight: 500;
  margin: 0 0 18px;
}
.contact-side .social { margin-top: 28px; }

.form-card { padding: 32px; box-shadow: var(--shadow); }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.field label { font-size: .85rem; font-weight: 500; color: var(--ink-soft); }
.field input, .field textarea {
  width: 100%;
  padding: 12px 14px;
  font: inherit;
  font-size: .97rem;
  color: var(--ink);
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(var(--accent-rgb), .18);
}
.field input::placeholder, .field textarea::placeholder { color: var(--muted); }

/* Campos obligatorios y errores */
.req { color: var(--accent); font-weight: 700; margin-left: 2px; }
.req-note { margin: -8px 0 20px; font-size: .8rem; color: var(--muted); }

.field-error {
  margin: 0;
  font-size: .82rem;
  line-height: 1.4;
  color: var(--err);
  min-height: 0;
}
.field-error:empty { display: none; }
.field-error:not(:empty)::before { content: "! "; font-weight: 700; }

.field.invalid label,
.field.invalid .captcha-label { color: var(--err); }
.field.invalid input:not([type="checkbox"]),
.field.invalid textarea {
  border-color: var(--err);
  background: rgba(239, 68, 68, .06);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, .15);
}
.field.invalid input:focus, .field.invalid textarea:focus { box-shadow: 0 0 0 4px rgba(239, 68, 68, .22); }
.field.invalid .consent { color: var(--err); }
.field.invalid .consent input { outline: 2px solid var(--err); outline-offset: 2px; border-radius: 3px; }
.field.invalid .captcha-box { border-color: var(--err); box-shadow: 0 0 0 3px rgba(239, 68, 68, .15); }
.field.invalid { animation: shake .35s ease; }
@keyframes shake {
  20%, 60% { transform: translateX(-4px); }
  40%, 80% { transform: translateX(4px); }
}

.field-check { margin-bottom: 14px; }
.field-check .consent { margin: 0; }

.captcha-label { font-size: .85rem; font-weight: 500; color: var(--ink-soft); }
.captcha-box {
  align-self: flex-start;
  min-height: 78px;
  min-width: 302px;
  max-width: 100%;
  border: 1px solid transparent;
  border-radius: 6px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.field-captcha { margin-bottom: 22px; }

.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

.consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: .85rem;
  color: var(--ink-soft);
  margin: 4px 0 22px;
  line-height: 1.5;
}
.consent input { margin-top: 3px; accent-color: var(--accent); width: 16px; height: 16px; flex-shrink: 0; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 22px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #B91C1C, #EF4444);
  color: #fff;
  font: 600 .97rem/1 var(--sans);
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
  box-shadow: 0 12px 28px -12px rgba(239, 68, 68, .75);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 16px 32px -12px rgba(239, 68, 68, .95); }
.btn[disabled] { opacity: .65; cursor: progress; transform: none; }

.form-status { margin: 16px 0 0; font-size: .9rem; min-height: 1.4em; }
.form-status.ok { color: var(--ok); }
.form-status.err { color: var(--err); }

.note { margin-top: 32px; font-size: .92rem; color: var(--muted); max-width: 62ch; }

/* ---------- Política de privacidad ---------- */

.legal { max-width: 780px; margin-top: 40px; }
.legal .updated { font-size: .88rem; color: var(--muted); margin: 0 0 32px; }
.legal h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.45rem;
  line-height: 1.25;
  margin: 44px 0 12px;
  scroll-margin-top: 100px;
}
.legal h3 { font-size: 1rem; font-weight: 600; margin: 24px 0 8px; }
.legal p, .legal li { color: var(--ink-soft); }
.legal ul { padding-left: 1.2em; }
.legal li { margin-bottom: 6px; }
.legal strong { color: var(--ink); font-weight: 600; }
.legal a:not(.ats) { color: var(--link); border-bottom: 1px solid transparent; }
.legal a:not(.ats):hover { color: var(--link-hover); border-bottom-color: currentColor; }
.toc { padding: 22px 26px; margin-bottom: 8px; }
.toc p { margin: 0 0 10px; font-size: .78rem; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); }
.toc ol { margin: 0; padding-left: 1.3em; columns: 2; column-gap: 32px; font-size: .92rem; }
.toc li { margin-bottom: 4px; break-inside: avoid; }

/* ---------- Páginas de estado: Gracias y 404 ---------- */

.status-page { display: flex; align-items: center; min-height: calc(100vh - 76px - 160px); }
.status-wrap { text-align: center; max-width: 720px; }
.status-wrap .lead { margin: 0 auto 12px; }
.status-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: 1.1;
  letter-spacing: -.02em;
  margin: 0 0 20px;
}
.status-small { font-size: .9rem; color: var(--muted); margin: 0 0 36px; }
.status-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 28px; }
.status-actions .btn { width: auto; min-width: 200px; text-decoration: none; }
.status-social { margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--line); }
.status-social p { margin: 0 0 14px; font-size: .9rem; color: var(--muted); }
.status-social .social { justify-content: center; }

/* Check animado */
.status-icon { width: 96px; height: 96px; margin: 0 auto 28px; position: relative; }
.status-icon::before {
  content: "";
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(var(--accent-rgb), .35), transparent);
  filter: blur(12px);
  animation: glow 3s ease-in-out infinite alternate;
}
.status-icon svg { position: relative; width: 100%; height: 100%; }
.status-icon .ring {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.5;
  stroke-dasharray: 151;
  stroke-dashoffset: 151;
  animation: draw .8s ease forwards .2s;
}
.status-icon .tick {
  fill: none;
  stroke: var(--accent);
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 40;
  stroke-dashoffset: 40;
  animation: draw .5s ease forwards .9s;
}
@keyframes draw { to { stroke-dashoffset: 0; } }

/* 404 con efecto glitch */
.code-404 {
  position: relative;
  display: inline-block;
  margin: 0 0 8px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: clamp(6rem, 22vw, 11rem);
  line-height: 1;
  letter-spacing: -.04em;
  color: transparent;
  -webkit-text-stroke: 2px var(--accent);
  text-shadow: 0 0 40px rgba(var(--accent-rgb), .35);
}
.code-404::before,
.code-404::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  -webkit-text-stroke: 0;
  text-shadow: none;
}
.code-404::before { color: rgba(var(--accent-rgb), .85); clip-path: inset(0 0 60% 0); animation: glitch-a 3s infinite steps(1); }
.code-404::after  { color: var(--ink); opacity: .9; clip-path: inset(62% 0 0 0); animation: glitch-b 3s infinite steps(1); }
@keyframes glitch-a {
  0%, 86%, 100% { transform: none; clip-path: inset(0 0 100% 0); }
  88% { transform: translate(-6px, -2px); clip-path: inset(10% 0 55% 0); }
  92% { transform: translate(5px, 1px);  clip-path: inset(40% 0 30% 0); }
  96% { transform: translate(-3px, 0);   clip-path: inset(70% 0 5% 0); }
}
@keyframes glitch-b {
  0%, 86%, 100% { transform: none; clip-path: inset(100% 0 0 0); }
  89% { transform: translate(6px, 2px);  clip-path: inset(60% 0 10% 0); }
  93% { transform: translate(-5px, -1px); clip-path: inset(20% 0 60% 0); }
  97% { transform: translate(3px, 0);    clip-path: inset(5% 0 80% 0); }
}

@media (max-width: 560px) {
  .status-actions .btn { width: 100%; min-width: 0; }
}

/* ---------- Ventana emergente ---------- */

.modal {
  width: min(820px, calc(100vw - 32px));
  max-height: min(86vh, 900px);
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: var(--surface-solid);
  color: var(--ink);
  box-shadow: 0 40px 100px -20px rgba(0, 0, 0, .7);
  overflow: hidden;
}
.modal[open] { display: flex; flex-direction: column; animation: modal-in .3s cubic-bezier(.2, .7, .2, 1); }
.modal::backdrop { background: rgba(0, 0, 0, .65); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
@keyframes modal-in { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
}
.modal-head h2 { font-family: var(--serif); font-weight: 500; font-size: 1.5rem; margin: 0; }
.modal-head h2::after { content: ""; display: block; width: 32px; height: 2px; background: var(--accent); margin-top: 6px; border-radius: 2px; }
.modal-close {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; flex-shrink: 0;
  border: 1px solid var(--line-strong); border-radius: 50%;
  background: var(--surface); color: var(--ink); cursor: pointer;
  transition: border-color .2s ease, color .2s ease, transform .2s ease;
}
.modal-close:hover { border-color: var(--accent); color: var(--accent); transform: rotate(90deg); }
.modal-close svg { width: 18px; height: 18px; }

.modal-body { overflow-y: auto; padding: 4px 24px 24px; overscroll-behavior: contain; }
.modal-body .legal { margin-top: 20px; max-width: none; }
.modal-body .legal h2 { scroll-margin-top: 16px; }

.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid var(--line);
}
.modal-foot .btn { width: auto; }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line-strong);
  box-shadow: none;
}
.btn-ghost:hover { border-color: var(--accent); box-shadow: none; }

@media (max-width: 560px) {
  .modal { width: calc(100vw - 16px); max-height: 92vh; }
  .modal-head, .modal-body, .modal-foot { padding-left: 16px; padding-right: 16px; }
  .modal-foot .btn { flex: 1; padding: 13px 12px; }
}

/* Bloques de contenido largo por idioma */
html[lang="en"] [data-only="es"],
html[lang="es"] [data-only="en"] { display: none !important; }

/* ---------- Footer ---------- */

.site-footer {
  position: relative;
  border-top: 1px solid var(--line);
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-size: .85rem;
  color: var(--muted);
}
.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding-top: 36px;
  padding-bottom: 24px;
}
.footer-ats { display: inline-flex; align-items: center; gap: 12px; color: var(--muted); }
.footer-ats img { width: 30px; height: 30px; border-radius: 7px; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding-top: 18px;
  padding-bottom: 30px;
  border-top: 1px solid var(--line);
}
.footer-bottom a { color: var(--link); }
.footer-bottom a:hover { color: var(--link-hover); }
.footer-legal { display: flex; flex-wrap: wrap; gap: 8px 20px; }

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .nav ul { gap: 18px; }
  .intro { grid-template-columns: 290px 1fr; gap: 48px; }
  .about { grid-template-columns: 1fr 240px; gap: 48px; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .site-header .wrap { min-height: 68px; gap: 12px; }

  .menu-toggle { display: block; }
  .nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--surface-solid);
    border-bottom: 1px solid var(--line);
    max-height: 0;
    overflow: hidden;
    transition: max-height .35s ease;
  }
  .menu-open .nav { max-height: 360px; }
  .nav ul { flex-direction: column; gap: 0; padding: 8px 16px 16px; }
  .nav a { display: block; padding: 12px 0; font-size: 1rem; border-bottom: 1px solid var(--line); }
  .nav a::after { display: none; }
  .nav li:last-child a { border-bottom: 0; }
  .nav a[aria-current="page"] { color: var(--accent); }

  .projects { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .page { padding: 48px 0 120px; }

  /* Foto centrada y redonda en celular */
  .intro { grid-template-columns: 1fr; gap: 36px; text-align: center; }
  .intro .portrait,
  .about .portrait { width: 200px; max-width: 60vw; margin: 0 auto; }
  .portrait img,
  .about .portrait img {
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    border: 3px solid var(--accent);
    object-position: center 15%;
  }
  .portrait::before { border-radius: 50%; inset: -16px; }
  .portrait::after { display: none; }

  .intro .roles, .intro .links, .intro .social { justify-content: center; }
  .intro .roles { flex-direction: column; gap: 2px; }
  .intro .roles .sep { display: none; }
  .intro .lead { margin-left: auto; margin-right: auto; }

  .about { grid-template-columns: 1fr; gap: 36px; margin-top: 36px; }
  .about .portrait { order: -1; }

  .timeline li { grid-template-columns: 1fr; gap: 6px; padding: 22px; }
  .timeline .when { padding-top: 0; }

  .contact-list li { grid-template-columns: 1fr; gap: 2px; padding: 14px 0; }
  .form-card { padding: 24px 20px; }
  .toc ol { columns: 1; }

  .footer-top { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 420px) {
  .brand-name { font-size: 1.2rem; }
  .brand-founder { font-size: .66rem; }
  .ctl { height: 34px; min-width: 34px; padding: 0 8px; }
  .theme-toggle { width: 34px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
}
