@font-face { font-family: "Schibsted"; src: url("/fonts/SchibstedGrotesk-ExtraBold.ttf") format("truetype"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Atkinson"; src: url("/fonts/AtkinsonHyperlegibleNext-Variable.ttf") format("truetype"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "JBMono"; src: url("/fonts/jetbrains-mono-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "JBMono"; src: url("/fonts/jetbrains-mono-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --bg: #0B0C0D;
  --surface: #131517;
  --surface-2: #1A1D20;
  --line: #2A2E33;
  --text: #F2F2EE;
  --muted: #9C9F9A;
  --lime: #D4FF3A;
  --lime-ink: #0B0C0D;
  --display: "Schibsted", "Helvetica Neue", Arial, sans-serif;
  --body: "Atkinson", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JBMono", ui-monospace, "SF Mono", Menlo, monospace;
  --pad: clamp(16px, 4vw, 56px);
  --max: 1280px;
  --radius: 10px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--body); font-size: 17px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
::selection { background: var(--lime); color: var(--lime-ink); }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; border-radius: 4px; }

.mono { font-family: var(--mono); font-size: 13px; letter-spacing: .02em; }
.dim { color: var(--muted); }
.small { font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 400; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--lime); color: var(--lime-ink); padding: 8px 12px; }

/* ---------- Cabecera ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px var(--pad);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { font-family: var(--mono); font-size: 14px; text-decoration: none; display: flex; align-items: center; gap: 10px; }
.sq { width: 9px; height: 9px; background: var(--lime); display: inline-block; }
.top nav { display: flex; gap: 22px; align-items: center; }
.top nav a { text-decoration: none; font-size: 15px; color: var(--muted); transition: color .2s; }
.top nav a:hover { color: var(--text); }
.top nav .nav-cta { color: var(--lime-ink); background: var(--lime); padding: 7px 14px; border-radius: 99px; font-weight: 600; }
.top nav .nav-cta:hover { color: var(--lime-ink); }
@media (max-width: 760px) { .top nav a:not(.nav-cta) { display: none; } }

main > section { padding: clamp(64px, 9vw, 120px) var(--pad); max-width: var(--max); margin: 0 auto; }

/* ---------- Portada ---------- */
.hero {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 5vw, 72px);
  align-items: center; min-height: calc(100svh - 60px);
  padding-top: clamp(40px, 6vw, 72px) !important;
}
.tag { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); margin: 0 0 20px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 12px var(--lime); }
h1 {
  font-family: var(--display); font-weight: 800; letter-spacing: -.035em; line-height: .92;
  font-size: clamp(56px, 8.4vw, 124px); margin: 0;
}
.caret { display: inline-block; width: .09em; height: .78em; background: var(--lime); margin-left: .08em; vertical-align: -.02em; animation: blink 1.1s steps(1) infinite; }
.small-caret { width: 7px; height: 13px; vertical-align: -2px; margin-left: 4px; }
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .caret { animation: none; } }
.role {
  font-family: var(--display); font-weight: 800; color: var(--lime);
  font-size: clamp(20px, 2.2vw, 30px); letter-spacing: -.01em; margin: 18px 0 0;
}
.lede { font-size: clamp(19px, 1.7vw, 23px); line-height: 1.45; max-width: 30ch; margin: 22px 0 0; }
.where { color: var(--muted); margin: 18px 0 0; }
.actions { display: flex; gap: 12px; margin-top: 32px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px; border-radius: 99px; border: 1px solid var(--line);
  background: transparent; text-decoration: none; font-weight: 600; font-size: 16px; cursor: pointer;
  transition: border-color .2s, background .2s, transform .2s;
}
.btn:hover { border-color: var(--text); }
.btn-main { background: var(--lime); color: var(--lime-ink); border-color: var(--lime); }
.btn-main:hover { background: #E2FF72; border-color: #E2FF72; }
.btn:active { transform: scale(.98); }

.reel { margin: 0; }
.frame {
  position: relative; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  background: var(--surface); aspect-ratio: 16 / 9;
}
.frame.vert { aspect-ratio: 9 / 16; max-height: 72svh; margin: 0 auto; }
.frame video { width: 100%; height: 100%; object-fit: cover; }
.corner { position: absolute; width: 14px; height: 14px; z-index: 2; pointer-events: none; }
.corner::before, .corner::after { content: ""; position: absolute; background: var(--lime); }
.corner::before { width: 14px; height: 1.5px; top: 6px; left: 0; }
.corner::after { width: 1.5px; height: 14px; left: 6px; top: 0; }
.tl { top: 8px; left: 8px; } .tr { top: 8px; right: 8px; } .bl { bottom: 8px; left: 8px; } .br { bottom: 8px; right: 8px; }
.reel-sound {
  position: absolute; left: 16px; bottom: 16px; z-index: 3;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 16px 10px 12px; border-radius: 99px; border: 0; cursor: pointer;
  background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: blur(8px);
  font-weight: 600; font-size: 15px; transition: background .2s;
}
.reel-sound:hover { background: var(--lime); color: var(--lime-ink); }
.reel-sound:hover .dim { color: var(--lime-ink); }
.reel-sound .play { width: 26px; height: 26px; }
.reel figcaption { margin-top: 10px; }

.play {
  display: inline-block; width: 44px; height: 44px; border-radius: 50%; background: var(--lime); position: relative; flex: none;
}
.play::after {
  content: ""; position: absolute; left: 54%; top: 50%; transform: translate(-50%, -50%);
  border-style: solid; border-width: .3em 0 .3em .5em; border-color: transparent transparent transparent var(--lime-ink);
  font-size: 22px;
}
.reel-sound .play::after { font-size: 13px; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .reel { order: 2; }
}

/* ---------- Sectores ---------- */
.sectors { padding-top: 24px !important; padding-bottom: 24px !important; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); max-width: none !important; }
.sectors > * { max-width: calc(var(--max) - 2 * var(--pad)); margin-left: auto; margin-right: auto; }
.sectors p { margin: 0 auto 12px; }
.ticker, .brands { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 10px; margin-top: 0; margin-bottom: 0; }
.ticker li { font-family: var(--display); font-weight: 800; font-size: clamp(20px, 2.4vw, 30px); letter-spacing: -.01em; }
.ticker li:not(:last-child)::after { content: "·"; color: var(--lime); margin-left: 10px; }
.brands { margin-top: 14px; }
.brands li { font-family: var(--mono); font-size: 13px; color: var(--muted); border: 1px solid var(--line); border-radius: 99px; padding: 4px 12px; }

/* ---------- Encabezados de sección ---------- */
.sec-head { margin-bottom: 40px; }
.path { color: var(--lime); margin: 0 0 10px; }
h2 { font-family: var(--display); font-weight: 800; letter-spacing: -.03em; line-height: 1; font-size: clamp(40px, 5.4vw, 72px); margin: 0; }
.sec-sub { color: var(--muted); font-size: 18px; max-width: 60ch; margin: 16px 0 0; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.chips a {
  text-decoration: none; font-size: 15px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 99px;
  transition: border-color .2s, color .2s;
}
.chips a:hover { border-color: var(--lime); color: var(--lime); }

/* ---------- Trabajos ---------- */
.cat { padding-top: 40px; border-top: 1px solid var(--line); margin-top: 48px; }
.cat:first-child { margin-top: 0; }
.cat-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 22px; }
.cat-head .num { color: var(--lime); }
.cat-head h3 { font-family: var(--display); font-weight: 800; font-size: clamp(26px, 2.8vw, 36px); letter-spacing: -.02em; margin: 0; }
.cat-head .goal { color: var(--muted); margin: 0; flex-basis: 100%; padding-left: calc(2ch + 14px); }

.row { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 28px 18px; }
.card { min-width: 0; }
.card.h { grid-column: span 6; }
.card.v { grid-column: span 2; }
.row.compact .card.h { grid-column: span 4; }
.card.h .thumb { aspect-ratio: 16 / 9; }
.card.v .thumb { aspect-ratio: 9 / 16; }
@media (max-width: 1100px) and (min-width: 761px) {
  .card.v { grid-column: span 3; }
  .row.compact .card.h { grid-column: span 6; }
}
.card-btn { all: unset; cursor: pointer; display: block; width: 100%; }
.thumb {
  position: relative; display: block; border-radius: var(--radius); overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); transition: border-color .25s;
}
.thumb img, .thumb .preview { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.thumb img { transition: transform .5s cubic-bezier(.2,.7,.2,1), opacity .3s; }
.thumb .preview { opacity: 0; transition: opacity .3s; }
.thumb.playing .preview { opacity: 1; }
.thumb .play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(.85); opacity: 0; transition: opacity .25s, transform .25s; }
.card-btn:hover .thumb, .card-btn:focus-visible .thumb { border-color: var(--lime); }
.card-btn:hover .thumb img { transform: scale(1.03); }
.card-btn:hover .play, .card-btn:focus-visible .play { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.card-btn:focus-visible { outline: none; }
.dur, .badge {
  position: absolute; bottom: 10px; right: 10px; z-index: 2; padding: 3px 8px; border-radius: 6px;
  background: color-mix(in srgb, var(--bg) 80%, transparent); font-size: 12px;
}
.badge { right: auto; left: 10px; top: 10px; bottom: auto; }
.meta { display: block; padding: 12px 2px 0; }
.brand-l { display: block; color: var(--muted); font-size: 12px; }
.title { display: block; font-weight: 600; font-size: 17px; line-height: 1.3; margin-top: 3px; }

@media (max-width: 760px) {
  .row { display: flex; flex-wrap: nowrap; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 calc(-1 * var(--pad)); padding: 0 var(--pad) 8px; scroll-padding-inline: var(--pad); scrollbar-width: none; --h: 300px; }
  .row::after { content: ""; flex: none; width: 1px; }
  .ticker li { font-size: 19px; }
  .row::-webkit-scrollbar { display: none; }
  .card { scroll-snap-align: start; flex: none; }
  .card.v { width: calc(var(--h) * 9 / 16); }
  .card.h { width: min(84vw, calc(var(--h) * 16 / 9)); }
  .cat-head .goal { padding-left: 0; }
}

/* ---------- IA ---------- */
.ai { border-top: 1px solid var(--line); }
.pipeline { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.pipeline li { background: var(--surface); padding: 28px 24px 26px; position: relative; }
.pipeline li:not(:last-child)::after {
  content: "→"; position: absolute; right: -9px; top: 26px; z-index: 2; color: var(--lime); font-family: var(--mono);
  background: var(--surface); line-height: 1; padding: 2px 0;
}
.step { color: var(--lime); }
.pipeline h3 { font-family: var(--display); font-weight: 800; font-size: 26px; letter-spacing: -.02em; margin: 14px 0 6px; }
.pipeline p { margin: 0; color: var(--muted); }
.pipeline .tools { margin-top: 18px; color: var(--text); }
@media (max-width: 900px) {
  .pipeline { grid-template-columns: 1fr 1fr; }
  .pipeline li::after { display: none; }
}
@media (max-width: 520px) { .pipeline { grid-template-columns: 1fr; } }

/* ---------- Sobre mí ---------- */
.about { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); gap: clamp(32px, 5vw, 80px); align-items: start; border-top: 1px solid var(--line); }
.photo { position: relative; }
.photo img { width: 100%; height: auto; border-radius: var(--radius); filter: grayscale(.15) contrast(1.02); }
.photo::after { content: ""; position: absolute; left: -10px; bottom: -10px; width: 64px; height: 64px; border-left: 2px solid var(--lime); border-bottom: 2px solid var(--lime); }
.about-text p { font-size: 18px; max-width: 58ch; }
.about-text h2 { margin-bottom: 24px; }
.about-text h3 { margin: 32px 0 12px; }
.skills { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.skills li { padding: 7px 13px; border-radius: 99px; background: var(--surface-2); font-size: 15px; }
.tools-list li { font-family: var(--mono); font-size: 13px; background: transparent; border: 1px solid var(--line); }
.personal { color: var(--muted); margin-top: 32px !important; font-size: 14px !important; }
@media (max-width: 900px) {
  .about { grid-template-columns: 1fr; }
  .photo { max-width: 420px; }
}

/* ---------- Experiencia ---------- */
.exp { border-top: 1px solid var(--line); }
.exp-grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 4fr); gap: clamp(32px, 5vw, 80px); }
.timeline { list-style: none; padding: 0; margin: 0; border-left: 1px solid var(--line); }
.timeline li { position: relative; padding: 0 0 36px 28px; }
.timeline li::before { content: ""; position: absolute; left: -5px; top: 6px; width: 9px; height: 9px; background: var(--bg); border: 1.5px solid var(--lime); }
.timeline li:first-child::before { background: var(--lime); }
.when { color: var(--muted); margin: 0; }
.timeline h3 { font-family: var(--display); font-weight: 800; font-size: 28px; letter-spacing: -.02em; margin: 4px 0 2px; }
.what { margin: 0; color: var(--lime); font-weight: 600; }
.timeline li p:last-child:not(.what) { color: var(--muted); max-width: 56ch; margin-top: 10px; }
.edu ul { list-style: none; padding: 0; margin: 0; }
.edu li { padding: 16px 0; border-top: 1px solid var(--line); }
.edu p { margin: 0; }
.edu .t { font-weight: 600; margin-top: 4px; }
.edu h3 { margin: 0 0 12px; }
@media (max-width: 900px) { .exp-grid { grid-template-columns: 1fr; } }

.quote {
  margin: 72px 0 0; padding: clamp(28px, 4vw, 48px); border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); position: relative;
}
.quote::before { content: "“"; position: absolute; top: -22px; left: 28px; font-family: var(--display); font-size: 96px; line-height: 1; color: var(--lime); }
.quote p { font-size: clamp(20px, 2.1vw, 27px); line-height: 1.4; margin: 0; max-width: 46ch; }
.quote footer { margin-top: 24px; display: flex; flex-direction: column; gap: 2px; }
.who { font-weight: 700; }
.letter { display: inline-block; margin-top: 22px; color: var(--muted); text-decoration: none; font-size: 15px; border-bottom: 1px solid var(--line); padding-bottom: 2px; transition: color .2s, border-color .2s; }
.letter strong { color: var(--lime); }
.letter:hover { color: var(--text); border-color: var(--lime); }

/* ---------- Contacto ---------- */
.contact { border-top: 1px solid var(--line); text-align: left; }
.contact h2 { font-size: clamp(56px, 9vw, 132px); }
.contact-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.btn.big { font-size: clamp(16px, 1.6vw, 20px); padding: 16px 26px; overflow-wrap: anywhere; }

.foot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 28px var(--pad); border-top: 1px solid var(--line); max-width: none; }

/* ---------- Reproductor ---------- */
dialog#player {
  border: 0; padding: 0; background: transparent; color: var(--text);
  max-width: none; max-height: none; width: 100vw; height: 100dvh; margin: 0;
}
dialog#player::backdrop { background: rgba(5, 6, 7, .9); backdrop-filter: blur(6px); }
.player-inner { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 16px; gap: 12px; }
.player-bar { width: min(100%, 1200px); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.player-bar p { margin: 0; color: var(--muted); }
.close { background: var(--surface-2); border: 1px solid var(--line); width: 40px; height: 40px; border-radius: 50%; cursor: pointer; font-size: 16px; flex: none; }
.close:hover { border-color: var(--lime); color: var(--lime); }
.player-media { background: #000; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.player-media.h { width: min(100%, 1200px, calc((100dvh - 150px) * 16 / 9)); aspect-ratio: 16 / 9; }
.player-media.v { height: min(calc(100dvh - 150px), calc((100vw - 32px) * 16 / 9)); aspect-ratio: 9 / 16; }
.player-media video, .player-media iframe { width: 100%; height: 100%; border: 0; display: block; }
.player-desc { width: min(100%, 1200px); margin: 0; color: var(--muted); font-size: 15px; text-align: center; }

/* ---------- Aparición ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Enlace a todos los cursos ---------- */
.more {
  display: inline-flex; flex-direction: column; gap: 2px; margin-top: 22px; text-decoration: none;
  padding: 14px 20px; border: 1px dashed var(--line); border-radius: var(--radius); transition: border-color .2s;
}
.more-t { font-weight: 700; color: var(--lime); }
.more-n { color: var(--muted); font-size: 15px; }
.more:hover { border-color: var(--lime); border-style: solid; }

/* ---------- Experiencia: tareas ---------- */
.tasks { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; max-width: 62ch; }
.tasks li { color: var(--muted); padding-left: 18px; position: relative; font-size: 16px; }
.tasks li::before { content: ""; position: absolute; left: 0; top: .7em; width: 7px; height: 1.5px; background: var(--lime); }
.tasks strong { color: var(--text); font-weight: 600; }
.brands-label { margin-top: 18px !important; }

/* ---------- Cursor: visor de cámara ---------- */
.cursor { display: none; }
.has-cursor, .has-cursor a, .has-cursor button, .has-cursor .card-btn { cursor: none; }
.has-cursor.player-open, .has-cursor.player-open * { cursor: auto; }
.has-cursor .reel .frame { cursor: none; }
.has-cursor .cursor {
  display: block; position: fixed; left: 0; top: 0; z-index: 1000; pointer-events: none;
  width: 0; height: 0; opacity: 0; transition: opacity .2s; mix-blend-mode: normal;
}
.has-cursor .cursor.on { opacity: 1; }
.has-cursor.player-open .cursor { opacity: 0; }
.cursor { --s: 26px; --k: 8px; }
.cursor .c {
  position: absolute; width: var(--k); height: var(--k); border: 0 solid var(--lime);
  transition: transform .25s cubic-bezier(.2,.8,.2,1), width .25s, height .25s;
}
.cursor .tl { border-width: 2px 0 0 2px; transform: translate(calc(var(--s) / -2), calc(var(--s) / -2)); }
.cursor .tr { border-width: 2px 2px 0 0; transform: translate(calc(var(--s) / 2 - var(--k)), calc(var(--s) / -2)); }
.cursor .bl { border-width: 0 0 2px 2px; transform: translate(calc(var(--s) / -2), calc(var(--s) / 2 - var(--k))); }
.cursor .br { border-width: 0 2px 2px 0; transform: translate(calc(var(--s) / 2 - var(--k)), calc(var(--s) / 2 - var(--k))); }
.cursor-dot {
  position: absolute; width: 5px; height: 5px; background: var(--lime); border-radius: 50%;
  transform: translate(-50%, -50%); transition: transform .2s, opacity .2s;
}
.cursor-label {
  position: absolute; transform: translate(-50%, -50%) scale(.6); opacity: 0;
  font-size: 11px; text-transform: uppercase; letter-spacing: .14em; color: var(--lime-ink);
  background: var(--lime); padding: 4px 8px; border-radius: 4px; white-space: nowrap;
  transition: opacity .2s, transform .25s cubic-bezier(.2,.8,.2,1);
}
.cursor.is-link { --s: 40px; }
.cursor.is-play { --s: 92px; --k: 16px; }
.cursor.is-play .cursor-dot { opacity: 0; }
.cursor.is-play .cursor-label { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.cursor.down { --s: 18px; }
.cursor.is-play.down { --s: 70px; }
