@font-face {
  font-family: 'Neue Gstaad';
  src: url('fonts/PPNeueGstaad-Light.otf') format('opentype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

:root {
  --orange: #ff4d00;
  --ink: #101010;
  --line: #dedbd8;
  --grid-step: 56px;
  --grid-ink: #fff1e9;
  --snap: cubic-bezier(.18,.76,.26,1);
  font: 300 100%/1.4 'Neue Gstaad', 'Helvetica Neue', Arial, sans-serif;
  font-synthesis: none;
  color: var(--ink);
  background: white;
  scroll-behavior: smooth;
}

*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  background:
    linear-gradient(90deg, var(--grid-ink) 1px, transparent 1px),
    linear-gradient(var(--grid-ink) 1px, transparent 1px),
    white;
  background-size: var(--grid-step) var(--grid-step);
  background-position: 0 0, 0 var(--grid-shift, 0px);
}
body:has(dialog[open]) { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, h1, h2, h3, b { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; }
button:focus-visible, a:focus-visible, canvas:focus-visible { outline: 2px solid currentColor; outline-offset: 5px; }
[hidden] { display: none !important; }
.shell { width: min(1440px, calc(100% - clamp(34px, 8.6vw, 136px))); margin: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.masthead { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 18px; min-height: 72px; border-bottom: 1px solid var(--line); }
.mark { justify-self: start; font-size: 2rem; line-height: 1; letter-spacing: -.075em; }
.mark span, h1 b { color: var(--orange); }
.site-nav { display: flex; align-items: center; gap: clamp(14px, 4vw, 58px); white-space: nowrap; }
.site-nav a, .sound-toggle { padding-block: 8px; }
.site-nav a:hover, .hero-link:hover, footer a:hover, .case-link:hover { text-decoration: underline; text-underline-offset: .23em; }
.sound-toggle, .motion-toggle { padding-inline: 0; border: 0; background: transparent; }
.sound-toggle { justify-self: end; white-space: nowrap; }
.sound-toggle[aria-pressed=true] { color: #b03408; }

.hero { min-height: calc(100svh - 72px); display: flex; flex-direction: column; }
.stage { position: relative; flex: 1; display: grid; align-items: center; min-height: clamp(435px, calc(100svh - 120px), 740px); isolation: isolate; }
.copy { position: relative; pointer-events: none; padding-block: 28px; }
h1 { font-size: clamp(4rem, 12.1vw, 12rem); line-height: .81; letter-spacing: -.085em; margin-left: -.065em; }
h1 > span { display: block; overflow: hidden; padding: 0 .1em .30em .06em; margin-bottom: -.26em; }
h1 > span span { display: block; }
.text-baseline { display: inline-block; width: 0; height: 0; vertical-align: baseline; }
.byline { position: relative; z-index: 2; margin-top: clamp(19px, 2.5vw, 34px); font-size: clamp(1rem, 1.65vw, 1.4rem); letter-spacing: -.023em; }
.hero-link { position: relative; z-index: 2; display: inline-flex; align-items: center; gap: 8px; pointer-events: auto; margin-top: clamp(17px, 2.6vw, 32px); }
.hero-link span { color: #b03408; }
.object { position: absolute; z-index: 1; inset: 0; }
.object canvas { width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
.object canvas[data-dragging] { cursor: grabbing; }
.controls { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 20px; padding: 12px 0 18px; border-top: 1px solid var(--line); font-size: .88rem; color: #695a52; }
.motion-toggle { text-decoration: underline; text-underline-offset: .25em; }

.works { background: var(--orange); color: #15100e; min-height: 100svh; display: grid; align-content: center; padding-block: clamp(46px, 8vw, 115px); }
.section-title { font-size: clamp(4rem, 11vw, 10rem); line-height: .85; letter-spacing: -.087em; margin-left: -.065em; }
.projects { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: clamp(12px, 1.65vw, 27px); margin-top: clamp(30px, 6.2vw, 94px); }
.project { display: grid; grid-template-rows: auto auto 1fr; text-align: left; padding: 0 0 12px; border: 0; border-bottom: 1px solid #18100e72; background: transparent; min-width: 0; }
.project-image { display: block; aspect-ratio: 16 / 10; background: #1a100a; overflow: hidden; }
.project-image img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 410ms var(--snap); }
.project-info { display: flex; align-items: start; justify-content: space-between; gap: 5px; margin-top: 10px; }
.project-name { font-size: clamp(1.32rem, 3.15vw, 3.2rem); line-height: 1.05; letter-spacing: -.068em; }
.project-arrow { display: grid; flex: 0 0 auto; place-items: center; width: 32px; height: 32px; border: 1px solid currentColor; border-radius: 50%; transition: transform 220ms var(--snap), color 160ms, background 160ms; }
.project-role { font-size: .86rem; margin-top: 6px; align-self: end; }
.project:is(:hover,:focus-visible) img { transform: scale(1.06); }
.project:is(:hover,:focus-visible) .project-arrow { background: var(--ink); border-color: var(--ink); color: #fff; transform: rotate(12deg); }

.clients { background: white; padding-block: clamp(24px, 4vw, 56px) clamp(24px, 4.5vw, 64px); }
.client-belt { overflow: hidden; }
.clients:focus-visible { outline-offset: -4px; }
.client-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); list-style: none; padding: 0; margin: 0; }
.client-row li { display: grid; place-items: center; min-height: clamp(62px, 7vw, 96px); }
.client-row img { display: block; width: auto; height: auto; max-width: min(66%, 138px); max-height: 35px; object-fit: contain; filter: brightness(0); opacity: .85; }
.client-row img[src$="ifood.png"] { max-height: 30px; }
.clients[data-running] .client-track { display: flex; width: max-content; animation: client-scroll 38s linear infinite; }
.clients[data-running] .client-row { display: flex; flex: none; min-width: 100vw; }
.clients[data-running] .client-row li { flex: 1; min-width: clamp(128px, 15vw, 210px); }
.clients:is(:hover, :focus-visible) .client-track { animation-play-state: paused; }
@keyframes client-scroll { to { transform: translateX(-50%); } }

.resume { position: relative; isolation: isolate; background: var(--ink); color: white; padding-block: clamp(55px, 9vw, 126px) 22px; }
.resume-texture { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; fill: #eee; opacity: .025; overflow: hidden; }
.resume-texture rect { transform-box: fill-box; transform-origin: center; }
.resume-heading, footer { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 10px 24px; }
.resume-heading p { font-size: .94rem; }
.resume-columns { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(30px, 9vw, 144px); margin-block: clamp(40px, 7.5vw, 110px) clamp(54px, 9vw, 125px); }
.bio-lead { max-width: 19ch; font-size: clamp(1.65rem, 3.3vw, 3.1rem); line-height: 1.05; letter-spacing: -.047em; }
.bio p + p { max-width: 43ch; margin-top: 19px; }
.print-cv { margin-top: 20px; padding: 8px 13px; border: 1px solid #a2a2a2; background: transparent; }
.print-cv:is(:hover,:focus-visible) { background: white; color: var(--ink); }
.print-cv:focus-visible { outline-color: white; }
.experience h3 { border-bottom: 1px solid #aeaeae; padding-bottom: 8px; }
.experience h3:not(:first-child) { margin-top: 26px; }
.resume-row { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; padding: 8px 0; border-bottom: 1px solid #555; }
.resume-row p, .resume-row span { font-size: .86rem; color: #d1d1d1; }
.resume-row span { text-align: right; flex-shrink: 0; }
footer { border-top: 1px solid #737373; padding-top: 17px; }

.case-dialog { position: fixed; width: min(760px, calc(100% - 32px)); max-height: calc(100% - 32px); padding: 0; border: 0; color: var(--ink); background: white; }
.case-dialog::backdrop { background: #100c09b5; }
.case-dialog video { display: block; background: var(--ink); width: 100%; max-height: 56vh; }
.dialog-close { position: absolute; top: 10px; right: 10px; width: 44px; height: 44px; border: 1px solid var(--ink); border-radius: 50%; background: white; color: var(--ink); font-size: 1.7rem; line-height: 1; }
.case-copy { padding: 17px 22px 24px; }
.case-copy h2 { font-size: clamp(2rem, 5.5vw, 4rem); line-height: 1; letter-spacing: -.06em; margin-bottom: 9px; }
.case-link { display: inline-block; margin-top: 12px; }

.opening { position: fixed; z-index: 20; inset: 0; display: grid; place-items: center; pointer-events: none; color: white; }
.opening-columns { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); }
.opening-columns i { background: #080808; box-shadow: 1px 0 #080808; }
.opening-line { position: relative; min-width: 13ch; font-size: clamp(2.1rem, 7.5vw, 7rem); line-height: 1; letter-spacing: -.07em; }
.opening-caret { display: inline-block; margin-left: .065em; width: .065em; height: .75em; background: var(--orange); vertical-align: -.01em; }
.opening[data-blink] .opening-caret { animation: blink 180ms step-end; }
.opening[data-exit] .opening-columns i { animation: opening-column 400ms cubic-bezier(.73,.02,.2,1) calc(var(--order) * 32ms) both; }
.opening[data-exit] .opening-line { opacity: 0; transition: opacity 110ms; }
@keyframes blink { 50% { opacity: 0; } }
@keyframes opening-column { to { transform: translateY(-101%); } }
.has-intro h1 > span span { transform: translateY(120%); }
.has-intro .byline, .has-intro .hero-link { opacity: 0; transform: translateY(10px); }
.has-intro.title-in h1 > span span { transform: none; transition: transform 570ms var(--snap); }
.has-intro.title-in h1 > span:nth-child(2) span { transition-delay: 76ms; }
.has-intro.title-in :is(.byline,.hero-link) { opacity: 1; transform: none; transition: opacity 450ms 230ms, transform 550ms 190ms var(--snap); }
.reveal-ready [data-reveal]:not(.is-visible, :focus-within) { opacity: 0; transform: translateY(17px); }
.reveal-ready [data-reveal].is-visible { transition: opacity 550ms, transform 620ms var(--snap); }
.reveal-ready .project:nth-child(2) { --entry-delay: 65ms; }
.reveal-ready .project:nth-child(3) { --entry-delay: 130ms; }
.reveal-ready .project:nth-child(4) { --entry-delay: 195ms; }
.reveal-ready .project.is-visible:not(:focus-within) { transition: opacity 420ms var(--entry-delay, 0ms), transform 580ms var(--snap) var(--entry-delay, 0ms); }
.reveal-ready .project:not(.is-visible, :focus-within) .project-image { clip-path: inset(0 0 100% 0); }
.reveal-ready .project.is-visible:not(:focus-within) .project-image { clip-path: inset(0); transition: clip-path 540ms var(--snap) var(--entry-delay, 0ms); }
.works[data-parallax] .project-image img { translate: 0 var(--case-shift, 0px); scale: 1.14; }

.site-cursor { display: none; position: fixed; top: 0; left: 0; z-index: 18; width: 8px; height: 8px; border: 1px solid currentColor; border-radius: 50%; color: #bf3505; background: var(--orange); pointer-events: none; translate: -50% -50%; transition: width 185ms var(--snap), height 185ms var(--snap), background 100ms; place-items: center; white-space: nowrap; font-size: .72rem; line-height: 1; }
.site-cursor.is-visible { display: grid; }
.site-cursor.is-ring { width: 47px; height: 47px; border: 0; color: var(--orange); background: transparent; box-shadow: inset 0 0 0 1.5px var(--ring-ink, currentColor); }
.site-cursor.is-glass { --ring-ink: var(--orange); width: 67px; height: 67px; color: #4b200e; }
.site-cursor.is-on-orange { color: var(--ink); }
.site-cursor.is-on-black { color: white; }
.site-cursor.is-on-black.is-inverted { mix-blend-mode: difference; }
.site-cursor.is-on-orange:not(.is-ring) { background: var(--ink); }
.site-cursor.is-on-black:not(.is-ring) { background: white; }
@media (pointer: fine) {
  html[data-custom-cursor], html[data-custom-cursor] :is(a,button,canvas) { cursor: none !important; }
}

@media (max-width: 940px) {
  .reveal-ready .project:nth-child(3) { --entry-delay: 0ms; }
  .reveal-ready .project:nth-child(4) { --entry-delay: 65ms; }
  .projects { grid-template-columns: repeat(2,minmax(0,1fr)); row-gap: 24px; }
  .project-image { aspect-ratio: 16 / 9; }
}
@media (max-width: 700px) {
  .masthead { min-height: 60px; gap: 10px; font-size: .85rem; }
  .site-nav { gap: clamp(10px, 2.5vw, 18px); }
  .hero { min-height: calc(100svh - 60px); }
  .stage { display: flex; flex-direction: column; align-items: stretch; justify-content: center; min-height: 0; padding-top: 29px; }
  .copy { padding-block: 14px 0; }
  h1 { font-size: clamp(3.8rem, 15vw, 6.3rem); }
  .object { position: relative; width: 100%; height: clamp(225px, 74vw, 450px); margin-top: 0; }
  .resume-columns { grid-template-columns: 1fr; }
}
@media (max-width: 390px) {
  .masthead { gap: 6px; font-size: .78rem; }
  .mark { font-size: 1.55rem; }
  .project-arrow { width: 24px; height: 24px; }
  .project-role { font-size: .75rem; }
}
@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0s !important; transition-duration: 0s !important; }
  .has-intro h1 > span span, .has-intro .byline, .has-intro .hero-link, .reveal-ready [data-reveal]:not(.is-visible) { opacity: 1; transform: none; }
  .reveal-ready .project:not(.is-visible) .project-image { clip-path: none; }
  .works[data-parallax] .project-image img { translate: none; scale: none; }
  body { background-position: 0 0; }
}
@media print {
  body { background: white; }
  .masthead, .hero, .works, .clients, .print-cv, footer a[href="#inicio"], .site-cursor, .opening, dialog { display: none !important; }
  .resume { padding: 0; background: white; color: black; }
  .resume-texture { display: none; }
  .resume .shell { width: 100%; }
  .resume-columns { display: block; margin: 20px 0; }
  .section-title { font-size: 30pt; }
  .experience { margin-top: 16pt; }
  .resume-row { break-inside: avoid; }
  .resume-row p, .resume-row span { color: #222; }
}
