:root {
  --bg: #050505;
  --fg: #f2f0eb;
  --muted: rgba(242, 240, 235, 0.62);
  --faint: rgba(242, 240, 235, 0.14);
  --serif: "Instrument Serif", "Bodoni 72", "Didot", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(16px, 2.2vw, 32px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
em { font-family: var(--serif); font-style: italic; font-weight: 400; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 20;
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px var(--gutter);
  mix-blend-mode: difference;
  font-size: 13px;
}
.nav__logo { font-size: 26px; letter-spacing: 0.02em; }
.nav__links { display: flex; gap: clamp(14px, 2.5vw, 32px); }
.nav__links a { opacity: 0.8; transition: opacity .2s; }
.nav__links a:hover { opacity: 1; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  height: 100vh; height: 100svh;
  min-height: 560px;
  overflow: hidden;
}
.hero__canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block;
  will-change: transform, opacity;
}
.hero__meta {
  position: absolute; top: 72px; right: var(--gutter);
  font-size: 11px; letter-spacing: 0.04em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.hero__bottom {
  position: absolute;
  left: var(--gutter); right: var(--gutter);
  bottom: calc(clamp(100px, 20.5vw, 340px) + 10px);
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 24px;
  pointer-events: none;
}
.hero__intro {
  max-width: 300px;
  font-size: 12.5px; line-height: 1.5;
  color: rgba(242, 240, 235, 0.9);
  text-shadow: 0 0 12px #050505, 0 0 4px #050505, 0 0 2px #050505;
  opacity: 0; transform: translateY(10px);
  animation: rise 1s 1.4s cubic-bezier(.2,.7,.2,1) forwards;
}
.pill {
  pointer-events: auto;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 7px 7px 7px 14px;
  border: 1px solid rgba(242, 240, 235, 0.35);
  border-radius: 999px;
  font-size: 12px;
  background: rgba(5, 5, 5, 0.4);
  backdrop-filter: blur(6px);
  transition: background .25s, color .25s, border-color .25s;
  opacity: 0; transform: translateY(10px);
  animation: rise 1s 1.6s cubic-bezier(.2,.7,.2,1) forwards;
  white-space: nowrap;
}
.pill__icon {
  display: grid; place-items: center;
  width: 24px; height: 24px; border-radius: 50%;
  border: 1px solid rgba(242, 240, 235, 0.35);
}
.pill:hover { background: var(--fg); color: var(--bg); }
.pill:hover .pill__icon { border-color: rgba(5,5,5,.3); }

.hero__name {
  position: absolute; left: 0; right: 0; bottom: 0.02em;
  display: flex; justify-content: center; gap: 0.18em;
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: clamp(76px, 19.5vw, 340px);
  line-height: 1;
  letter-spacing: -0.02em;
  white-space: nowrap;
  pointer-events: none;
  will-change: transform;
}
.hero__word {
  display: inline-block;
  opacity: 0;
  transform: translateY(40%);
  filter: blur(8px);
  animation: name-in 1.4s cubic-bezier(.2,.7,.1,1) forwards;
}
.hero__word:nth-child(1) { animation-delay: .25s; }
.hero__word:nth-child(2) { animation-delay: .45s; }

@keyframes name-in { to { opacity: 1; transform: none; filter: blur(0); } }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ---------- Secciones ---------- */
.section { padding: clamp(96px, 14vw, 180px) var(--gutter) 40px; }
.eyebrow {
  display: block;
  font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 28px;
}
.section__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: 48px; }
.section__head .eyebrow { margin: 0; }
.section__title {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(40px, 6.4vw, 104px); line-height: 0.95;
  letter-spacing: -0.02em;
}

/* ---------- Proyectos (compartido) ---------- */
:root { --accent: #4ade80; }
.frame {
  border: 1px solid rgba(242,240,235,.12);
  border-radius: 10px; overflow: hidden;
  background: #0b0b0c;
  box-shadow: 0 30px 80px -30px rgba(0,0,0,.9);
}
.frame__bar {
  display: flex; align-items: center; gap: 6px;
  height: 30px; padding: 0 12px;
  background: #121214; border-bottom: 1px solid rgba(242,240,235,.08);
}
.frame__bar i { width: 9px; height: 9px; border-radius: 50%; background: #3a3a3e; }
.frame__bar i:nth-child(1) { background: #ff5f57; }
.frame__bar i:nth-child(2) { background: #febc2e; }
.frame__bar i:nth-child(3) { background: #28c840; }
.frame__bar span {
  margin-left: 10px; font-size: 11px; color: var(--muted);
  padding: 3px 10px; border-radius: 6px; background: rgba(242,240,235,.05);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.frame__video, .frame img { display: block; width: 100%; height: auto; aspect-ratio: 1242 / 656; object-fit: cover; background: #000; }

.tag { display: inline-block; font-size: 11px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--faint); color: var(--muted); }
.label { font-weight: 400; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 28px 0 12px; }
.checks { list-style: none; display: grid; gap: 9px; }
.checks li { position: relative; padding-left: 24px; font-size: 14px; line-height: 1.45; color: rgba(242,240,235,.88); }
.checks li::before {
  content: ""; position: absolute; left: 2px; top: 4px; width: 11px; height: 6px;
  border-left: 1.6px solid var(--accent); border-bottom: 1.6px solid var(--accent);
  transform: rotate(-45deg);
}
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 7px; }
.chips li { font-size: 12px; padding: 5px 11px; border-radius: 999px; background: rgba(242,240,235,.06); border: 1px solid rgba(242,240,235,.1); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: 999px;
  border: 1px solid rgba(242,240,235,.25);
  font-size: 13px; font-weight: 500;
  transition: background .25s, color .25s, border-color .25s, transform .25s;
}
.btn:hover { background: var(--fg); color: var(--bg); transform: translateY(-1px); }
.btn--accent { background: linear-gradient(90deg, #4ade80, #22d3ee); color: #04140b; border-color: transparent; }
.btn--accent:hover { background: linear-gradient(90deg, #86efac, #67e8f9); color: #04140b; }

.feature {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(28px, 4.5vw, 72px); align-items: center;
  padding: clamp(36px, 5vw, 64px) 0;
  border-top: 1px solid var(--faint);
}
.feature { align-items: start; }
.feature__media, .gal { position: sticky; top: 90px; }
.feature--rev .feature__media { order: 2; }
.feature__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.feature__num { font-size: 11px; color: var(--muted); }
.feature__title { font-family: var(--serif); font-weight: 400; font-size: clamp(40px, 4.6vw, 72px); line-height: .95; letter-spacing: -0.01em; }
.feature__sub { margin-top: 14px; color: var(--accent); font-size: 15px; font-weight: 400; line-height: 1.4; }
.feature__desc { margin-top: 14px; font-size: 14.5px; line-height: 1.65; color: rgba(242,240,235,.78); max-width: 56ch; }

.more {
  display: block; margin-top: clamp(24px, 4vw, 48px);
  padding: clamp(28px, 4vw, 48px) 0;
  border-top: 1px solid var(--faint); border-bottom: 1px solid var(--faint);
}
.more .eyebrow { margin-bottom: 10px; }
.more__title { display: block; font-size: clamp(48px, 8vw, 132px); line-height: .95; letter-spacing: -0.02em; }
.more__title span { display: inline-block; font-family: var(--sans); font-weight: 300; font-size: .45em; transition: transform .35s cubic-bezier(.2,.7,.1,1); }
.more:hover .more__title span { transform: translateX(14px); }
.more__list { display: block; margin-top: 14px; font-size: 13px; color: var(--muted); }

/* ---------- Página: Otros proyectos ---------- */
.op-wrap { padding: clamp(32px, 5vw, 64px) var(--gutter) 0; }
.op-grid { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2vw, 28px); }
.op-card__btn {
  all: unset; box-sizing: border-box; cursor: pointer; display: flex; flex-direction: column; width: 100%; height: 100%;
  border-radius: 14px; padding: 10px; border: 1px solid var(--faint);
  background: rgba(242,240,235,.02);
  transition: border-color .3s, background .3s, transform .4s cubic-bezier(.2,.7,.1,1);
}
.op-card__btn:hover { border-color: rgba(242,240,235,.3); background: rgba(242,240,235,.04); transform: translateY(-4px); }
.op-card__btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.op-card__media { position: relative; display: block; box-shadow: none; }
.op-card__media .frame__bar { height: 24px; }
.op-card__media .frame__bar i { width: 7px; height: 7px; }
.op-card__media img { display: block; width: 100%; aspect-ratio: 416 / 258; object-fit: cover; object-position: top; transition: transform .8s cubic-bezier(.2,.7,.1,1); }
.op-card__btn:hover .op-card__media img { transform: scale(1.04); }
.op-card__count {
  position: absolute; right: 10px; bottom: 10px; font-size: 11px; padding: 4px 9px; border-radius: 999px;
  background: rgba(5,5,5,.75); border: 1px solid rgba(242,240,235,.18); backdrop-filter: blur(6px);
}
.op-card__body { display: flex; flex-direction: column; gap: 8px; padding: 16px 6px 6px; flex: 1; }
.op-card__top { display: flex; justify-content: space-between; align-items: center; }
.op-card__title { font-family: var(--serif); font-size: clamp(24px, 2.1vw, 32px); line-height: 1.05; }
.op-card__sub { font-size: 13px; line-height: 1.45; color: var(--muted); }
.op-card__more { margin-top: auto; padding-top: 10px; font-size: 12.5px; color: var(--accent); }
.op-card__more span { display: inline-block; transition: transform .3s; }
.op-card__btn:hover .op-card__more span { transform: translateX(5px); }

.op-modal {
  width: min(1180px, calc(100vw - 32px)); max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px);
  margin: auto; padding: clamp(20px, 3vw, 40px);
  color: var(--fg); background: #0c0c0e;
  border: 1px solid rgba(242,240,235,.14); border-radius: 18px;
  overflow-y: auto; overscroll-behavior: contain;
}
.op-modal::backdrop { background: rgba(0,0,0,.72); backdrop-filter: blur(6px); }
.op-modal[open] { animation: modal-in .45s cubic-bezier(.2,.7,.1,1); }
@keyframes modal-in { from { opacity: 0; transform: translateY(18px) scale(.98); } }
.op-modal .op { border-top: 0; padding: 0; align-items: start; }
.op-modal .gal { position: static; }
.op-modal .feature__top { margin-right: 48px; }
.op-modal__close {
  all: unset; cursor: pointer; position: sticky; top: 0; float: right; z-index: 3;
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid rgba(242,240,235,.25); background: rgba(12,12,14,.85);
  margin: -6px -6px 0 12px; transition: background .2s, color .2s;
}
.op-modal__close:hover { background: var(--fg); color: var(--bg); }
.op-modal__close:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
body.no-scroll { overflow: hidden; }
.op {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(28px, 4.5vw, 72px); align-items: start;
  padding: clamp(36px, 5vw, 64px) 0; border-top: 1px solid var(--faint);
}
.gal__modes { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; border: 1px solid var(--faint); margin-bottom: 16px; }
.gal__mode { all: unset; cursor: pointer; font-size: 12px; padding: 6px 14px; border-radius: 999px; color: var(--muted); transition: background .25s, color .25s; }
.gal__mode[aria-pressed="true"] { background: linear-gradient(90deg, #4ade80, #22d3ee); color: #04140b; font-weight: 500; }
.gal__mode:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.gal__stage { position: relative; display: grid; place-items: center; min-height: 200px; }
.gal__stage .frame { width: 100%; }
.gal__stage .frame img { aspect-ratio: 416 / 258; object-fit: cover; object-position: top; }
.phone {
  width: min(240px, 62%); padding: 9px; border-radius: 30px;
  background: #18181b; border: 1px solid rgba(242,240,235,.14);
  box-shadow: 0 30px 80px -30px rgba(0,0,0,.9);
}
.phone img { display: block; width: 100%; height: auto; aspect-ratio: 780 / 1328; object-fit: cover; object-position: top; border-radius: 22px; }
.gal__img { transition: opacity .3s ease; }
.gal__img.is-fading { opacity: 0; }
.gal__nav {
  all: unset; cursor: pointer; position: absolute; top: 50%; transform: translateY(-50%);
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(5,5,5,.7); border: 1px solid rgba(242,240,235,.25); backdrop-filter: blur(6px);
  transition: background .2s, color .2s;
}
.gal__nav:hover { background: var(--fg); color: var(--bg); }
.gal__nav:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.gal__nav--prev { left: -14px; } .gal__nav--next { right: -14px; }
.gal__cap { margin-top: 14px; font-size: 13px; color: var(--muted); text-align: center; }
.gal__cap b { color: var(--accent); font-weight: 500; margin-right: 6px; }
.gal__thumbs { display: flex; gap: 8px; margin-top: 14px; overflow-x: auto; padding-bottom: 6px; justify-content: center; }
.gal__thumb { all: unset; cursor: pointer; flex: none; border-radius: 6px; overflow: hidden; border: 1.5px solid transparent; opacity: .55; transition: opacity .2s, border-color .2s; }
.gal__thumb img { display: block; height: 46px; width: auto; }
.gal__thumb[aria-current="true"] { opacity: 1; border-color: var(--accent); }
.gal__thumb:hover { opacity: .9; }
.gal__thumb:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.about__lead {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(30px, 4.4vw, 68px); line-height: 1.08;
  max-width: 18ch; letter-spacing: -0.01em;
}
.about__lead em { color: #fff; }
.about__cols {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px;
  margin-top: clamp(48px, 7vw, 96px);
  border-top: 1px solid var(--faint); padding-top: 24px;
}
.about__cols h4 { font-weight: 400; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.about__cols p { font-size: 15px; line-height: 1.55; max-width: 34ch; }

.footer { padding: clamp(80px, 10vw, 140px) var(--gutter) 24px; }
.footer__inner {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 80px); align-items: end;
  padding-top: clamp(28px, 4vw, 48px);
  border-top: 1px solid var(--faint);
}
.footer__title {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(28px, 3.2vw, 46px); line-height: 1.08; letter-spacing: -0.01em;
  max-width: 16ch;
}
.contact { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.contact a {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 12px;
  border: 1px solid var(--faint);
  transition: background .25s, border-color .25s;
}
.contact a:hover { background: rgba(242,240,235,.05); border-color: rgba(242,240,235,.3); }
.contact__icon {
  flex: none; display: grid; place-items: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(242,240,235,.07);
  transition: background .25s, color .25s;
}
.contact a:hover .contact__icon { background: var(--fg); color: var(--bg); }
.contact__text { min-width: 0; font-size: 13.5px; line-height: 1.3; overflow-wrap: anywhere; }
.contact__text small { display: block; font-size: 10.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
.contact li:first-child { grid-column: 1 / -1; }
.contact li:first-child .contact__text { font-size: 15px; }
.footer__row {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin-top: clamp(40px, 6vw, 72px); padding-top: 18px;
  border-top: 1px solid var(--faint);
  font-size: 12px; color: var(--muted);
}
.footer__top { transition: color .2s; }
.footer__top:hover { color: var(--fg); }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity 1s cubic-bezier(.2,.7,.1,1), transform 1s cubic-bezier(.2,.7,.1,1); }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- Página: Sobre mí ---------- */
.nav__links a[aria-current="page"] { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }
.am-hero { padding: clamp(110px, 14vw, 170px) var(--gutter) 0; }
.am-back {
  display: inline-flex; gap: 8px; font-size: 12px; color: var(--muted);
  margin-bottom: clamp(24px, 4vw, 48px); transition: color .2s;
}
.am-back:hover { color: var(--fg); }
.am-title {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(84px, 17vw, 280px); line-height: .9; letter-spacing: -0.03em;
}
.am-title__word { display: inline-block; opacity: 0; transform: translateY(35%); filter: blur(8px); animation: name-in 1.3s cubic-bezier(.2,.7,.1,1) forwards; }
.am-title__word:nth-child(2) { animation-delay: .15s; }

.am-body {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(28px, 5vw, 88px);
  padding: clamp(40px, 6vw, 80px) var(--gutter) 0;
  align-items: start;
}
.am-photo { position: sticky; top: 90px; }
.am-photo img {
  display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 30%;
  border-radius: 6px;
}
.am-photo figcaption { margin-top: 12px; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

.am-lead {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(28px, 3vw, 48px); line-height: 1.1; letter-spacing: -0.01em;
  max-width: 24ch;
}
.am-copy { margin-top: clamp(32px, 4vw, 56px); max-width: 56ch; }
.am-copy p { font-size: clamp(15px, 1.2vw, 18px); line-height: 1.7; color: rgba(242,240,235,.82); }
.am-copy p + p { margin-top: 1.1em; }
.am-copy strong { font-weight: 500; color: var(--fg); }
.am-facts { margin-top: clamp(40px, 5vw, 72px); border-top: 1px solid var(--faint); }
.am-facts > div {
  display: grid; grid-template-columns: 130px 1fr; gap: 16px;
  padding: 16px 0; border-bottom: 1px solid var(--faint);
}
.am-facts dt { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding-top: 3px; }
.am-facts dd { font-size: 15px; line-height: 1.5; }

/* ---------- Página: Trayectoria ---------- */
.am-text .actions { margin-top: clamp(28px, 3vw, 40px); }
.tr-hero__row { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.tr-hero__row .btn { margin-bottom: 1.4vw; }
.tr-hero .am-title { white-space: nowrap; }

.cv { padding: clamp(48px, 6vw, 88px) var(--gutter) 0; }
.cv__row {
  display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: clamp(16px, 4vw, 64px);
  padding: clamp(24px, 3vw, 36px) 0; border-top: 1px solid var(--faint);
}
.cv__label { font-family: var(--serif); font-weight: 400; font-size: clamp(26px, 2.6vw, 38px); line-height: 1.05; }
.cv__body { display: grid; gap: 18px; }
.cv__item { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; }
.cv__item h3 { font-weight: 500; font-size: 16px; line-height: 1.4; }
.cv__item p { margin-top: 3px; font-size: 14px; line-height: 1.5; color: var(--muted); }
.cv__date { flex: none; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.cv__skills { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 32px; }
.cv__skills h3 { font-weight: 500; font-size: 15px; margin-bottom: 10px; }
.cv__langs { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.cv__langs h3 { font-weight: 500; font-size: 16px; }
.cv__langs p { margin-top: 3px; font-size: 14px; color: var(--muted); }

/* ---------- Proyectos: bloque de matemática ---------- */
.math { list-style: none; position: relative; display: grid; gap: 12px; padding-left: 22px; }
.math::before { content: ""; position: absolute; left: 4px; top: 8px; bottom: 8px; width: 1px; background: linear-gradient(var(--accent), rgba(74,222,128,.1)); }
.math li { position: relative; }
.math li::before {
  content: ""; position: absolute; left: -22px; top: 5px; width: 9px; height: 9px; border-radius: 50%;
  background: var(--bg); border: 1.5px solid var(--accent);
}
.math__n { display: block; font-size: 10.5px; letter-spacing: .09em; text-transform: uppercase; color: var(--accent); }
.math h5 { margin-top: 3px; font-weight: 500; font-size: 15px; line-height: 1.35; }
.math p { margin-top: 5px; font-size: 13.5px; line-height: 1.6; color: rgba(242,240,235,.75); }
.math__f {
  display: inline-block; margin-top: 9px; padding: 6px 11px; border-radius: 8px;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 12px; line-height: 1.5;
  color: rgba(242,240,235,.92); background: rgba(242,240,235,.05); border: 1px solid rgba(242,240,235,.1);
}
.math__f sub { font-size: .75em; }
.math__flow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 9px; font-size: 12px; }
.math__flow span { padding: 5px 10px; border-radius: 999px; border: 1px solid rgba(74,222,128,.35); background: rgba(74,222,128,.06); }
.math__flow i { font-style: normal; color: var(--muted); }

/* ---------- Página: Contacto ---------- */
.ct {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(28px, 5vw, 80px);
  align-items: start; padding: clamp(40px, 5vw, 72px) var(--gutter) 0;
}
.ct__form {
  padding: clamp(20px, 3vw, 36px); border-radius: 20px;
  border: 1px solid rgba(242,240,235,.14); background: rgba(242,240,235,.025);
}
.ct__lead { font-family: var(--serif); font-size: clamp(24px, 2.4vw, 34px); line-height: 1.15; max-width: 26ch; margin-bottom: 28px; }
.ct__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.field label { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.field input, .field textarea {
  width: 100%; padding: 13px 14px; border-radius: 10px;
  font: inherit; font-size: 15px; font-weight: 400; color: var(--fg);
  background: rgba(5,5,5,.6); border: 1px solid rgba(242,240,235,.16);
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.field textarea { resize: vertical; min-height: 160px; line-height: 1.55; }
.field input::placeholder, .field textarea::placeholder { color: rgba(242,240,235,.32); }
.field input:hover, .field textarea:hover { border-color: rgba(242,240,235,.3); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(74,222,128,.18); background: rgba(5,5,5,.85); }
.field [aria-invalid="true"] { border-color: #f87171; }
.field__err { font-size: 12px; color: #fca5a5; }
.ct__actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 6px; }
.ct__actions .btn { cursor: pointer; font-family: inherit; }
.ct__status { font-size: 13px; line-height: 1.5; color: var(--muted); }
.ct__status.is-ok { color: var(--accent); }
.ct__status.is-err { color: #fca5a5; }
.ct__aside .label:first-child { margin-top: 0; }
.ct__mail {
  all: unset; box-sizing: border-box; cursor: pointer; width: 100%;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 16px 18px; border-radius: 12px; border: 1px solid rgba(74,222,128,.35); background: rgba(74,222,128,.05);
  font-size: 15px; overflow-wrap: anywhere; transition: background .2s;
}
.ct__mail:hover { background: rgba(74,222,128,.1); }
.ct__mail:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ct__mail small { flex: none; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.contact--stack { grid-template-columns: 1fr; }
.contact--stack li:first-child .contact__text { font-size: 13.5px; }
.footer--slim { padding-top: clamp(64px, 8vw, 110px); }
.footer--slim .footer__row { margin-top: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) and (min-width: 761px) {
  .op-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .feature, .op { grid-template-columns: 1fr; }
  .op-grid { grid-template-columns: 1fr; }
  .op-modal { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); padding: 16px; }
  .feature__media, .gal { position: static; }
  .footer__inner { grid-template-columns: 1fr; }
  .contact { grid-template-columns: 1fr; }
  .cv__row { grid-template-columns: 1fr; gap: 14px; }
  .ct, .ct__grid { grid-template-columns: 1fr; }
  .cv__skills, .cv__langs { grid-template-columns: 1fr; }
  .cv__item { flex-direction: column; gap: 2px; }
  .tr-hero .am-title { font-size: 19vw; }
  .contact li:not(:first-child) a { flex-direction: row; align-items: center; }
  .feature--rev .feature__media { order: 0; }
  .gal__nav--prev { left: 6px; } .gal__nav--next { right: 6px; }
  .gal__thumbs { justify-content: flex-start; }
  .about__cols { grid-template-columns: 1fr; }
  .hero__bottom { flex-direction: column; align-items: flex-start; bottom: calc(24vw + 14px); }
  .hero__intro { max-width: 260px; }
  .hero__name { font-size: 19vw; gap: 0.14em; }
  .hero__meta { top: 64px; }
  .am-body { grid-template-columns: 1fr; }
  .am-photo { position: static; max-width: 420px; }
  .am-facts > div { grid-template-columns: 1fr; gap: 4px; }
}

@media (max-width: 440px) {
  .nav { font-size: 12px; }
  .nav__links { gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__word, .hero__intro, .pill, .am-title__word { animation: none; opacity: 1; transform: none; filter: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

.footer__go { margin-top: 22px; }

/* ---------- Capturas bajo el video + visor ---------- */
.shots { display: flex; gap: 8px; margin-top: 12px; overflow-x: auto; padding-bottom: 4px; }
.shot {
  all: unset; box-sizing: border-box; cursor: zoom-in; flex: none; height: 64px;
  border-radius: 8px; overflow: hidden; border: 1px solid rgba(242,240,235,.16);
  opacity: .8; transition: opacity .2s, border-color .2s, transform .2s;
}
.shot img { display: block; height: 100%; width: auto; }
.shot:hover { opacity: 1; border-color: var(--accent); transform: translateY(-2px); }
.shot:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.lb {
  width: min(1320px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); margin: auto; padding: 0;
  background: transparent; border: 0; overflow: visible; color: var(--fg);
}
.lb::backdrop { background: rgba(0,0,0,.86); backdrop-filter: blur(6px); }
.lb[open] { animation: modal-in .35s cubic-bezier(.2,.7,.1,1); }
.lb__fig { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.lb__img {
  display: block; max-width: 100%; max-height: calc(100dvh - 110px); width: auto; height: auto;
  border-radius: 10px; border: 1px solid rgba(242,240,235,.14); background: #000;
}
.lb__img.is-cel { border-radius: 22px; }
.lb__cap { font-size: 13px; color: var(--muted); text-align: center; }
.lb__cap b { color: var(--accent); font-weight: 500; margin-right: 6px; }
.lb__close {
  all: unset; cursor: pointer; position: absolute; top: -6px; right: -6px; z-index: 2;
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(12,12,14,.9); border: 1px solid rgba(242,240,235,.3);
}
.lb__close:hover { background: var(--fg); color: var(--bg); }
.lb__close:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.lb .gal__nav--prev { left: 8px; } .lb .gal__nav--next { right: 8px; }
.lb .gal__nav { top: calc(50% - 20px); }
.lb .gal__nav[hidden] { display: none; }
