:root {
  --bg: #1546e8;
  --ink: #fff;
  --mute: rgba(255,255,255,.62);
  --line: rgba(255,255,255,.28);
  --dot: #f6a623;
  --serif: "Instrument Serif", "Times New Roman", serif;
  --sans: "EB Garamond", Georgia, serif;
  --pad: clamp(20px, 4vw, 56px);
  --ease: cubic-bezier(.2, .7, .1, 1);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 18px/1.5 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
em { font-style: italic; }
::selection { background: #fff; color: var(--bg); }
:focus-visible { outline: 1px solid var(--ink); outline-offset: 4px; }

/* Cabecera */
.top { position: fixed; inset: 0 0 auto; z-index: 20; display: flex; justify-content: space-between; align-items: baseline; padding: 20px var(--pad); background: linear-gradient(var(--bg) 82%, transparent); }
.mark { font: 400 1.7rem/1 var(--serif); }
.mark i, .dot { display: inline-block; width: .32em; height: .32em; border-radius: 50%; background: var(--dot); margin-left: .08em; }
.top nav { display: flex; gap: clamp(14px, 2.4vw, 32px); font-size: 1rem; }
.top nav a { position: relative; }
.top nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .4s var(--ease); }
.top nav a:hover::after { transform: scaleX(1); transform-origin: left; }

/* Portada */
.hero { min-height: 100svh; padding: 96px var(--pad) 28px; display: grid; grid-template-rows: auto 1fr auto; grid-template-columns: 1fr auto; gap: 24px; }
.meta { grid-column: 1 / -1; display: flex; gap: 28px; margin: 0; font-size: .88rem; color: var(--mute); text-transform: uppercase; letter-spacing: .12em; }
.meta span:last-child { margin-left: auto; font-variant-numeric: tabular-nums; }
h1 { grid-column: 1 / -1; align-self: center; margin: 0; font: 400 clamp(3.1rem, 13.5vw, 13rem)/.9 var(--serif); letter-spacing: -.035em; }
h1 .line { display: block; overflow: hidden; padding-bottom: .08em; }
h1 .line > span { display: inline-block; transform: translateY(105%); transition: transform 1.1s var(--ease); }
h1 .line:nth-child(2) > span { transition-delay: .09s; }
h1 .line:nth-child(3) > span { transition-delay: .18s; }
.ready h1 .line > span { transform: none; }
h1 s { text-decoration: none; color: rgba(255,255,255,.5); background: linear-gradient(var(--ink), var(--ink)) no-repeat left 56% / 0 .045em; transition: background-size .9s var(--ease) 1s; }
.ready h1 s { background-size: 100% .045em; }
h1 .dot { width: .15em; height: .15em; margin-left: .04em; transform: scale(0); transition: transform .6s var(--ease) 1.2s; }
.ready h1 .dot { transform: scale(1); }
.arrows { align-self: end; width: min(100%, 640px); height: auto; color: var(--ink); }
.star { width: 1.5em; height: 1.5em; flex: none; animation: spin 18s linear infinite; }
.traits { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin: 40px 0 0; font-size: 1.25rem; }
.orange { float: right; width: clamp(64px, 9vw, 110px); margin: -10px 0 0 20px; transform: rotate(12deg); transition: transform .8s var(--ease); }
.orange:hover { transform: rotate(-14deg) scale(1.08); }
.scroll { align-self: end; font-size: 1rem; }
.scroll span { display: inline-block; animation: bob 1.8s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(5px); } }

/* Secciones */
.row { display: grid; grid-template-columns: minmax(110px, 1fr) 5fr; gap: 24px; padding: clamp(64px, 11vw, 150px) var(--pad); border-top: 1px solid var(--line); }
.idx { margin: 0; font-size: .88rem; text-transform: uppercase; letter-spacing: .12em; color: var(--mute); position: sticky; top: 76px; align-self: start; }
.idx span { display: block; color: var(--ink); }
.big { margin: 0 0 1em; font: 400 clamp(1.6rem, 3.3vw, 2.9rem)/1.16 var(--serif); letter-spacing: -.01em; max-width: 24ch; }
.big em { color: var(--dot); }
.small { margin: 0; max-width: 46ch; color: var(--mute); font-size: 1.15rem; }
.bio .small { color: var(--ink); font-size: clamp(1.2rem, 2vw, 1.5rem); max-width: 30ch; }
.small a { border-bottom: 1px solid var(--line); }
.small a:hover { color: var(--ink); border-color: var(--ink); }

.anim .row > :not(.idx) { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.anim .row.in > :not(.idx) { opacity: 1; transform: none; }

/* Bio */
.bio { display: grid; grid-template-columns: minmax(160px, 260px) 1fr; gap: clamp(24px, 5vw, 72px); align-items: start; }
.bio .big { max-width: 26ch; }
.photo { margin: 0; position: relative; aspect-ratio: 4 / 5; background: #0d34bd; border-radius: 999px 999px 0 0; overflow: hidden; display: grid; place-items: center; }
.photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.05); transition: filter .6s, transform 1.2s var(--ease); }
.photo:hover img { filter: none; transform: scale(1.04); }
.photo figcaption { color: #fff; font: italic 400 6rem/1 var(--serif); }
.facts { display: flex; gap: clamp(24px, 5vw, 64px); margin: 44px 0 0; }
.facts dt { font-size: .85rem; text-transform: uppercase; letter-spacing: .12em; color: var(--mute); }
.facts dd { margin: 2px 0 0; font: 400 clamp(1.6rem, 3vw, 2.4rem)/1.1 var(--serif); }

/* Restaurante */
.feature { position: relative; }
.feature h2 { margin: 0 0 .25em; font: 400 clamp(3.4rem, 11vw, 10rem)/.9 var(--serif); letter-spacing: -.03em; }
.plate { position: absolute; right: 0; top: 0; width: clamp(84px, 15vw, 210px); aspect-ratio: 1; border-radius: 50%; border: 1px solid var(--ink); display: grid; place-items: center; animation: spin 26s linear infinite; }
.plate::before { content: ""; position: absolute; inset: 14%; border-radius: 50%; border: 1px solid var(--line); }
.plate i { width: 22%; aspect-ratio: 1; border-radius: 50%; background: var(--dot); transform: translate(38%, -22%); }
@keyframes spin { to { transform: rotate(360deg); } }
.did { list-style: none; counter-reset: d; margin: 44px 0 0; padding: 0; max-width: 640px; }
.did li { counter-increment: d; display: grid; grid-template-columns: 44px 1fr; padding: 14px 0; border-top: 1px solid var(--line); }
.did li:last-child { border-bottom: 1px solid var(--line); }
.did li::before { content: counter(d, decimal-leading-zero); color: var(--mute); font-size: .88rem; padding-top: 2px; }
.numbers { list-style: none; margin: clamp(48px, 7vw, 90px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.numbers strong { display: block; font: 400 clamp(2.6rem, 7vw, 6.4rem)/1 var(--serif); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.numbers span { color: var(--mute); font-size: .88rem; }

/* Ejemplos */
.works { list-style: none; margin: 0; padding: 0; }
.works li { position: relative; display: grid; grid-template-columns: 44px 1fr auto; grid-template-areas: "n h r" ". k r"; align-items: baseline; column-gap: 12px; padding: clamp(16px, 2.2vw, 28px) 0; border-bottom: 1px solid var(--line); transition: padding .5s var(--ease), color .3s; }
.works li:first-child { border-top: 1px solid var(--line); }
.works .n { grid-area: n; font-size: .88rem; color: var(--mute); }
.works h3 { grid-area: h; margin: 0; font: 400 clamp(1.9rem, 5vw, 4.4rem)/1 var(--serif); letter-spacing: -.02em; }
.works .k { grid-area: k; font-size: 1rem; color: var(--mute); margin-top: 6px; }
.works .r { grid-area: r; align-self: center; font-size: .88rem; text-align: right; }
@media (hover: hover) {
  .works:hover li { color: var(--mute); }
  .works li:hover { color: var(--ink); padding-left: 20px; }
  .works li:hover h3 { font-style: italic; }
}

/* Contacto */
.contact { padding-bottom: clamp(60px, 9vw, 120px); }
.mail { display: inline-block; font: 400 clamp(4rem, 16vw, 15rem)/.9 var(--serif); letter-spacing: -.035em; transition: font-style .2s, letter-spacing .5s var(--ease); }
.mail:hover { font-style: italic; letter-spacing: -.02em; }
.mail .dot { width: .15em; height: .15em; }
.contact .small { margin-top: 28px; }

footer { display: flex; justify-content: space-between; gap: 16px; padding: 20px var(--pad); border-top: 1px solid var(--line); font-size: .88rem; color: var(--mute); }
.sample { text-transform: uppercase; letter-spacing: .12em; }

/* Cursor y vista previa */
.cursor, .peek { position: fixed; left: 0; top: 0; pointer-events: none; border-radius: 50%; opacity: 0; z-index: 30; }
.cursor { width: 10px; height: 10px; margin: -5px 0 0 -5px; background: var(--dot); transition: width .3s var(--ease), height .3s var(--ease), margin .3s var(--ease), opacity .3s; }
.has-cursor .cursor { opacity: 1; }
.cursor.on { width: 44px; height: 44px; margin: -22px 0 0 -22px; opacity: .55; }
.peek { width: 190px; height: 190px; margin: -95px 0 0 30px; z-index: 5; scale: .2; transition: opacity .35s, scale .5s var(--ease), background .3s; }
.peek.on { opacity: .9; scale: 1; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  h1 .line > span, h1 .dot { transform: none; transition: none; }
  .plate, .scroll span, .star { animation: none; }
}

@media (max-width: 760px) {
  .top nav a:not(:last-child) { display: none; }
  .row { grid-template-columns: 1fr; }
  .idx { position: static; display: flex; gap: 10px; }
  .bio { grid-template-columns: 1fr; }
  .photo { max-width: 200px; }
  .numbers { grid-template-columns: 1fr; gap: 28px; }
  .works li { grid-template-columns: 32px 1fr; grid-template-areas: "n h" ". k" ". r"; }
  .works .r { text-align: left; margin-top: 4px; }
  .plate { top: -6px; }
  .meta span:nth-child(2) { display: none; }
}

.links { margin-top: 40px; color: var(--ink); }
.burst { position: absolute; right: 0; top: 0; width: clamp(84px, 15vw, 210px); animation: spin 40s linear infinite; }
.feature .works { margin-top: 44px; }
.feature .works h3 { font-size: clamp(1.7rem, 4vw, 3.4rem); }
@media (prefers-reduced-motion: reduce) { .burst { animation: none; } }

/* Trabajos extendidos */
.project { border-top: 1px solid var(--line); padding: clamp(20px, 3vw, 36px) 0 clamp(56px, 9vw, 120px); scroll-margin-top: 70px; }
.project:last-child { padding-bottom: 0; }
.phead { position: relative; display: grid; grid-template-columns: 44px 1fr; grid-template-areas: "n h" ". k"; align-items: baseline; column-gap: 12px; padding-right: clamp(96px, 17vw, 230px); min-height: clamp(96px, 16vw, 220px); align-content: start; }
.phead .n { grid-area: n; font-size: .88rem; color: var(--mute); }
.phead h2 { grid-area: h; margin: 0; font: 400 clamp(3rem, 9.5vw, 9rem)/.9 var(--serif); letter-spacing: -.03em; }
.phead .k { grid-area: k; margin-top: 12px; color: var(--mute); font-size: 1rem; }
.pbody { padding-left: 56px; margin-top: clamp(28px, 4vw, 56px); }
.pbody .works h3 { font-size: clamp(1.7rem, 4vw, 3.4rem); }
.pbody .works, .pbody .did { margin-top: 36px; }
@media (max-width: 760px) {
  .phead { grid-template-columns: 28px 1fr; }
  .pbody { padding-left: 0; }
}

.role { margin: 36px 0 0; font-size: .88rem; text-transform: uppercase; letter-spacing: .12em; color: var(--dot); }
.pbody .role + .did { margin-top: 14px; }
.pbody > .role:first-child { margin-top: 0; }
.idx.sub { position: static; margin: clamp(48px, 7vw, 90px) 0 18px; }
.tools { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.tools li { border: 1px solid var(--line); border-radius: 999px; padding: 6px 18px; font-size: 1.05rem; transition: background .3s, color .3s; }
.tools li:hover { background: #fff; color: var(--bg); }
#education .works h3 { font-size: clamp(1.7rem, 4vw, 3.4rem); }

/* Ficha secundaria: más discreta */
#hotel .phead { min-height: 0; padding-right: clamp(60px, 9vw, 110px); }
#hotel .phead h2 { font-size: clamp(1.9rem, 4vw, 3.2rem); letter-spacing: -.015em; line-height: 1; }
#hotel .phead .k { margin-top: 6px; }
#hotel .burst { width: clamp(44px, 6vw, 72px); opacity: .7; }
#hotel .pbody { margin-top: 24px; }

/* Marca personal */
.wordmark { margin: 0 0 .3em; font: 400 clamp(3.4rem, 13vw, 12rem)/.9 var(--serif); letter-spacing: .12em; white-space: nowrap; }
.kit { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); margin-top: clamp(36px, 5vw, 64px); }
.cell { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: clamp(18px, 2.6vw, 34px); min-height: 200px; }
.lbl { margin: 0 0 22px; font-size: .88rem; text-transform: uppercase; letter-spacing: .12em; color: var(--mute); }
.swatches { list-style: none; margin: 0; padding: 0; display: flex; gap: clamp(12px, 2vw, 28px); }
.swatches i { display: block; width: clamp(44px, 6vw, 76px); aspect-ratio: 1; border-radius: 50%; margin-bottom: 10px; transition: transform .5s var(--ease); }
.swatches li:hover i { transform: scale(1.12); }
.swatches span { font-size: .85rem; line-height: 1.3; display: block; color: var(--mute); }
.aa { margin: 0; font: 400 clamp(3rem, 7vw, 6rem)/1 var(--serif); display: flex; gap: .25em; }
.aa em { font-family: var(--sans); }
.note { margin: 14px 0 0; color: var(--mute); font-size: .95rem; max-width: 26ch; }
.voice { margin: 0; font: 400 clamp(1.6rem, 3.2vw, 2.8rem)/1.1 var(--serif); }
@media (max-width: 560px) { .kit { grid-template-columns: 1fr; } .cell { min-height: 0; } }
