/* Marcus Andrey, portfolio v3: studio black, studio grey, azulejo cobalt */

@font-face { font-family: "Funnel Display"; src: url("fonts/funnel-display-latin.woff2") format("woff2"); font-weight: 300 800; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Funnel Display"; src: url("fonts/funnel-display-latin-ext.woff2") format("woff2"); font-weight: 300 800; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Funnel Sans"; src: url("fonts/funnel-sans-latin.woff2") format("woff2"); font-weight: 300 800; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Funnel Sans"; src: url("fonts/funnel-sans-latin-ext.woff2") format("woff2"); font-weight: 300 800; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  /* dark: studio black */
  --ground: #0a0a0b;
  --surface: #151517;
  --surface-2: #1f1f22;
  --ink: #f1f0ec;
  --ink-soft: #b4b3ae;
  --line-2: color-mix(in srgb, var(--ink) 22%, transparent);   /* hairlines (Study tables, quotes) */
  --field-line: color-mix(in srgb, var(--ink) 38%, transparent);   /* field borders: 3.3:1 on surface, 3.6:1 on ground (WCAG 1.4.11) */
  --attn: #e8a317;   /* the one status tone: attention amber */
  --accent: #7d96ff;        /* cobalt as text on black */
  --accent-fill: #2547d0;   /* azulejo cobalt, the field and the button */
  --on-accent: #ffffff;
  --veil: rgba(10, 10, 11, .78);
  --inspect: #6b88ff;        /* Inspect frame, handles, tags, padding band */
  --on-inspect: #0a0a0b;     /* text on an Inspect tag: 6.6:1 on #6b88ff */

  --display: "Funnel Display", "Helvetica Neue", Arial, sans-serif;
  --text: "Funnel Sans", "Helvetica Neue", Arial, sans-serif;

  --t-name: clamp(5.5rem, 21.5vw, 24rem);
  --t-xl: clamp(3rem, 8vw, 8.5rem);
  --t-h2: clamp(2.5rem, 5.4vw, 5.25rem);
  --t-h3: clamp(1.75rem, 2.8vw, 2.75rem);
  --t-body: clamp(1.0625rem, 1vw + .7rem, 1.25rem);
  --t-small: 0.9375rem;

  --margin: clamp(1.25rem, 3.2vw, 3rem);
  --gap: clamp(1rem, 2vw, 2rem);
  --section: clamp(7.5rem, 14vw, 13rem);
  --bar-h: 4.25rem;

  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --round: 999px;
  color-scheme: dark;
}
:root[data-mode="light"] {
  --field-line: color-mix(in srgb, var(--ink) 50%, transparent);   /* 3.35:1 on surface, 3.7:1 on ground */
  --attn: #7a4f00;
  /* light: the pale grey of the studio backdrop */
  --ground: #e6e6e6;
  --surface: #dbdbdb;
  --surface-2: #cecece;
  --ink: #0e0e10;
  --ink-soft: #46464a;
  --accent: #1f3fb4;
  --accent-fill: #1f3fb4;
  --veil: rgba(230, 230, 230, .82);
  --inspect: #1f3fb4;
  --on-inspect: #fff;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--bar-h) + 4.5rem); }
body { overflow-x: clip; margin: 0; background: var(--ground); color: var(--ink); font: 400 var(--t-body)/1.55 var(--text); font-feature-settings: "ss01"; -webkit-font-smoothing: antialiased; transition: background-color .4s var(--ease-out), color .4s var(--ease-out); }   /* clip: a ScrollTrigger refresh can measure the career pin at innerWidth (scrollbar included) and leave 15px of sideways scroll; clip, unlike hidden, keeps sticky working */
img, video { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
h1, h2, h3, p, ul, ol, dl, dd, blockquote { margin: 0; }
ul[role="list"], ol { list-style: none; padding: 0; }
a { color: inherit; text-decoration-thickness: .08em; text-underline-offset: .22em; }
button { font: inherit; color: inherit; }
::selection { background: var(--accent-fill); color: var(--on-accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
html { scrollbar-color: var(--surface-2) var(--ground); }
kbd { font: 600 .85em var(--text); padding: .1em .45em; border-radius: .3em; background: var(--surface-2); }
em { font-style: normal; color: var(--accent); }

.frame { padding-inline: var(--margin); max-width: 1680px; margin-inline: auto; }
.sr-only, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { position: fixed; z-index: 60; top: .75rem; left: .75rem; padding: .7rem 1rem; background: var(--accent-fill); color: var(--on-accent); }

/* ---------- top bar ---------- */
.bar { position: fixed; inset: 0 0 auto; z-index: 40; height: var(--bar-h); color: #f1f0ec; transition: background-color .35s var(--ease-out), color .35s var(--ease-out); }
.bar.is-solid { background: var(--veil); color: var(--ink); -webkit-backdrop-filter: saturate(1.2) blur(14px); backdrop-filter: saturate(1.2) blur(14px); }
.bar__in { height: 100%; display: flex; align-items: center; gap: 2rem; }
.bar__mark { font: 700 1.125rem/1 var(--display); letter-spacing: -.02em; text-decoration: none; margin-right: auto; }
.bar__nav { display: flex; gap: 1.75rem; }
.bar__nav a { position: relative; font-size: var(--t-small); font-weight: 500; text-decoration: none; padding-block: .5rem; }
.bar__nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: .2rem; height: 2px; background: currentColor; transform: scaleX(0); transform-origin: 0 50%; transition: transform .35s var(--ease-out); }
.bar__nav a:hover::after, .bar__nav a[aria-current="true"]::after { transform: scaleX(1); }
.bar__tools { display: flex; gap: .5rem; }
.bar .bar__menu { display: none; }
.switch { display: inline-flex; align-items: center; gap: .45rem; padding: .5rem .85rem; border: 0; border-radius: var(--round); background: color-mix(in srgb, currentColor 12%, transparent); font-size: var(--t-small); font-weight: 500; cursor: pointer; transition: background-color .25s, color .25s, transform .2s var(--ease-out); }
.switch:hover { background: color-mix(in srgb, currentColor 20%, transparent); }
.switch:active { transform: scale(.96); }
.switch[aria-pressed="true"][data-inspect-toggle] { background: var(--accent-fill); color: var(--on-accent); }
.switch__icon { width: 1.05rem; height: 1.05rem; fill: currentColor; }
.switch--lang { text-decoration: none; font-weight: 600; letter-spacing: .02em; min-width: 2.6rem; justify-content: center; }
html:not(.js) .bar__tools { display: none; }

/* ---------- buttons and links ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 3.25rem; padding: .85rem 1.6rem; border-radius: var(--round); font-weight: 600; font-size: 1.0625rem; text-decoration: none; transition: transform .25s var(--ease-out), background-color .25s, color .25s; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.97); }
.btn--primary { background: var(--accent-fill); color: var(--on-accent); }
.btn--primary:hover { background: color-mix(in srgb, var(--accent-fill) 82%, #fff); }
.btn--quiet { background: rgba(241, 240, 236, .14); color: #f1f0ec; }
.btn--quiet:hover { background: rgba(241, 240, 236, .24); }
.link-arrow { display: inline-flex; gap: .5rem; align-items: center; font-weight: 600; color: var(--accent); text-decoration: none; }
.link-arrow::after { content: ""; width: .9em; height: .9em; background: currentColor; mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M3 7h7.6L7.3 3.7 8.7 2.3 14.4 8l-5.7 5.7-1.4-1.4L10.6 9H3z"/></svg>') center / contain no-repeat; transition: transform .3s var(--ease-out); }
.link-arrow:hover::after { transform: translateX(4px); }
.link-arrow:hover { text-decoration: underline; }
a:hover .link-arrow::after, button:hover .link-arrow::after { transform: translateX(4px); }   /* the arrow also answers a whole-card link around it */
a:hover .link-arrow { text-decoration: underline; }

/* ---------- shared controls (Create CV, Study, the portfolio tabs): one rule each, area files add only layout ---------- */
.text-btn { background: none; border: 0; padding: 0; border-radius: 4px; color: var(--accent); font: inherit; font-weight: 600; text-underline-offset: .22em; cursor: pointer; }
.text-btn:hover { text-decoration: underline; }
.text-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.text-btn--quiet { color: var(--ink-soft); font-weight: 500; }
.text-btn--quiet:hover { color: var(--ink); }
.input { width: 100%; min-height: 2.75rem; padding: .6rem .8rem; border: 1px solid var(--field-line); border-radius: 10px; background: var(--surface); color: var(--ink); font: 400 1rem/1.45 var(--text); }
textarea.input { min-height: 6.5rem; line-height: 1.6; resize: vertical; }
.input::placeholder { color: var(--ink-soft); opacity: 1; }
.input:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.input[aria-invalid="true"] { border-color: var(--attn); box-shadow: inset 0 0 0 1px var(--attn); }   /* needs a look: amber, never the focus cobalt */
/* Selectable pills share one shape. Selected = ink when the pill filters or navigates;
   .pill--choice selected = cobalt when the choice changes the result (Create CV typeface). */
.pill, .fx-live__chip { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 2.25rem; padding: .4rem .9rem; border: 0; border-radius: var(--round); background: color-mix(in srgb, var(--ink) 8%, transparent); color: var(--ink); font: 600 var(--t-small)/1.2 var(--text); text-decoration: none; cursor: pointer; transition: background-color .25s var(--ease-out), color .25s var(--ease-out); }
.pill:hover, .fx-live__chip:hover { background: color-mix(in srgb, var(--ink) 14%, transparent); }
.pill > input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.pill--plain { background: none; color: var(--ink-soft); }
.pill--plain:hover { background: var(--surface-2); color: var(--ink); }
.pill[aria-pressed="true"], .pill[aria-current="true"], .pill[aria-selected="true"], .pill:has(input:checked), .fx-live__chip:has(:checked) { background: var(--ink); color: var(--ground); }
.pill--choice:has(input:checked), .pill--choice[aria-pressed="true"] { background: var(--accent-fill); color: var(--on-accent); }
.pill:has(input:focus-visible), .fx-live__chip:has(:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (pointer: coarse) { .pill, .fx-live__chip { min-height: 2.75rem; } .text-btn { min-height: 2.75rem; display: inline-flex; align-items: center; } }

/* ---------- hero ---------- */
.hero { position: relative; height: 100svh; min-height: 640px; overflow: hidden; color: #f1f0ec; background: #0a0a0b; isolation: isolate; }
.hero__photo, .hero__photo img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__photo { transform-origin: 50% 40%; will-change: transform; }
.hero__photo img { object-fit: cover; object-position: 38% 30%; }
.hero::after { /* taste-skill-ignore: neutral scrim under text on a photo */ content: ""; position: absolute; inset: auto 0 0; height: 46%; background: linear-gradient(to top, rgba(10,10,11,.82), rgba(10,10,11,0)); z-index: 0; pointer-events: none; }
.hero__name-wrap { position: absolute; inset: 0; display: flex; align-items: center; z-index: 1; pointer-events: none; }
.hero__name { font: 700 var(--t-name)/.82 var(--display); letter-spacing: -.04em; white-space: nowrap; padding-left: calc(var(--margin) - .04em); color: #f1f0ec; will-change: transform; pointer-events: auto; }
.hero__name span { display: inline-block; }
.hero__foot { position: absolute; inset: auto 0 0; z-index: 2; display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; padding-bottom: clamp(1.5rem, 4vh, 3rem); max-width: none; }
.hero__lead { max-width: 30rem; }
.hero__lead p:first-child { font: 500 clamp(1.25rem, 1.6vw, 1.6rem)/1.3 var(--display); letter-spacing: -.01em; }
.hero__time { margin-top: .75rem; font-size: var(--t-small); color: rgba(241,240,236,.82); font-variant-numeric: tabular-nums; }
.hero__actions { display: flex; gap: .75rem; flex-wrap: wrap; }

/* ---------- intro: photos rising around the statement ---------- */
.intro { position: relative; padding-block: var(--section); overflow: clip; }
.intro__grid { position: relative; display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gap); min-height: 104vh; align-items: center; }
.intro__text { grid-column: 4 / span 6; position: relative; z-index: 2; text-align: left; }
.intro__head { font: 600 var(--t-h2)/.98 var(--display); letter-spacing: -.035em; text-wrap: balance; }
.intro__body { margin-top: 2.25rem; max-width: 40rem; font-size: clamp(1.125rem, 1.3vw, 1.375rem); }
.intro__photo { position: absolute; z-index: 1; will-change: transform; }
.intro__photo img { width: 100%; }
.intro__photo--a { width: 22%; top: 2%; left: 0; }
.intro__photo--b { width: 15%; top: -2%; right: 0; }
.intro__photo--c { width: 20%; bottom: -4%; left: 6%; }
.intro__photo--d { width: 19%; bottom: -10%; right: 4%; }

/* ---------- section heads ---------- */
.section-head { font: 600 var(--t-h2)/.98 var(--display); letter-spacing: -.035em; text-wrap: balance; }

/* ---------- services ---------- */
.services { padding-block: var(--section); background: var(--surface); }
.services__top { display: grid; grid-template-columns: 7fr 5fr; gap: var(--gap); align-items: end; margin-bottom: clamp(3rem, 6vw, 5.5rem); }
.services__note { color: var(--ink-soft); max-width: 30rem; justify-self: end; }
.services__list { display: grid; }
.service { display: grid; grid-template-columns: 5fr 4fr 3fr; gap: var(--gap); padding-block: clamp(1.75rem, 3vw, 2.75rem); align-items: start; border-top: 2px solid var(--surface-2); transition: background-color .3s; }
.service:last-child { border-bottom: 2px solid var(--surface-2); }
.service__name { font: 400 var(--t-h3)/1.05 var(--display); letter-spacing: -.03em; transition: translate .45s var(--ease-out), color .3s; }
.service:hover .service__name { translate: .5rem 0; color: var(--accent); }
.service__text { max-width: 34rem; }
.chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.chips li { padding: .35rem .8rem; border-radius: var(--round); background: var(--surface-2); font-size: var(--t-small); font-weight: 500; }
.services__cta { margin-top: clamp(2.5rem, 4vw, 3.5rem); }

/* ---------- work ---------- */
.work { padding-top: calc(var(--section) * .55); }
#work { scroll-margin-top: calc(var(--bar-h) + 1rem - var(--section) * .55 - (var(--bar-h) + 4.5rem)); }
.work__top { display: grid; grid-template-columns: 7fr 5fr; gap: var(--gap); align-items: end; margin-bottom: 2.5rem; }
.work__note { color: var(--ink-soft); justify-self: end; max-width: 30rem; }
.work__tabs { position: sticky; top: var(--bar-h); z-index: 20; background: var(--ground); }
.work__tabs-in { display: flex; gap: .4rem; padding-block: .75rem; overflow-x: auto; scrollbar-width: none; }
.work__tabs a { flex: none; }   /* .pill .pill--plain */
.work__list { display: grid; gap: clamp(1.25rem, 2.5vw, 2rem); padding-block: 2rem var(--section); }
.project { display: grid; grid-template-columns: 7fr 5fr; background: var(--surface); min-height: min(86vh, 860px); overflow: hidden; scroll-margin-top: calc(var(--bar-h) + 4.5rem); }
.project__media { position: relative; overflow: hidden; background: var(--surface-2); min-height: 26rem; }
.project__text { padding: clamp(1.75rem, 3.5vw, 3.5rem); display: flex; flex-direction: column; gap: 1.25rem; align-items: flex-start; }
.project__meta { font-size: var(--t-small); color: var(--ink-soft); }
.project__text .project__meta { margin-top: -.25rem; }
.project__title { font: 600 var(--t-h3)/1 var(--display); letter-spacing: -.03em; font-size: clamp(2.25rem, 3.6vw, 3.6rem); }
.project__lead { font-size: clamp(1.125rem, 1.25vw, 1.3rem); max-width: 34rem; }
.project__points { padding-left: 1.1rem; display: grid; gap: .6rem; max-width: 34rem; color: var(--ink-soft); }
.project__points li::marker { color: var(--accent); }
.project .chips { margin-top: auto; padding-top: 1rem; }
.project .chips + .link-arrow { margin-top: .5rem; }

.collage > * { position: absolute; width: 62%; padding: clamp(5px, .5vw, 9px); background: var(--ground); transform: rotate(var(--r, -7deg)); will-change: transform; }
.collage__a { --r: -6deg; top: 12%; left: 6%; z-index: 2; }
.collage__b { --r: 5deg; top: 34%; left: 40%; width: 48%; z-index: 3; }
.collage__c { --r: -3deg; top: 58%; left: 8%; width: 42%; z-index: 1; }
.collage--two .collage__a { width: 70%; top: 14%; left: 4%; }
.collage--two .collage__b { width: 54%; top: 46%; left: 40%; }
#p-gestores .collage__b { width: 32%; top: 30%; left: 62%; }


/* ---------- locked (NDA) band ---------- */
.locked { display: grid; grid-template-columns: 1fr 1fr; }
.locked__item { background: var(--accent-fill); color: var(--on-accent); padding: clamp(1.5rem, 2.6vw, 2.25rem); display: flex; flex-direction: column; gap: .75rem; align-items: flex-start; }
.locked__item--alt { background: var(--ink); color: var(--ground); }
.locked__icon { width: 1.6rem; height: 1.6rem; fill: currentColor; }
.locked__item .project__title { font-size: clamp(2rem, 3vw, 3rem); }
.locked__item .project__lead { font-size: var(--t-body); }
.locked__item .project__meta, .locked__item .project__points { color: inherit; opacity: .86; }
.locked__item .project__points li::marker { color: currentColor; }
.locked__item .link-arrow { color: inherit; margin-top: auto; }

/* ---------- marquee ---------- */
.marquee { overflow: hidden; padding-block: clamp(2rem, 5vw, 4rem); }
.marquee__track { display: flex; width: max-content; will-change: transform; }
.marquee span { font: 800 clamp(4.5rem, 12vw, 12rem)/.9 var(--display); letter-spacing: -.04em; padding-right: .45em; white-space: nowrap; }
.marquee span:nth-child(3n+2) { color: var(--accent); }
.marquee span:nth-child(3n) { -webkit-text-stroke: 2px var(--ink); color: transparent; }

/* ---------- lead through practice ---------- */
.lead { padding-block: calc(var(--section) * .6) var(--section); }
.lead__fields { display: grid; grid-template-columns: 1.5fr 1fr 1fr; margin-top: clamp(2.5rem, 5vw, 4.5rem); }
.field { padding: clamp(1.75rem, 3vw, 3rem); min-height: 30rem; display: flex; flex-direction: column; justify-content: space-between; gap: 2rem; }
.field__head { font: 600 clamp(2rem, 3.3vw, 3.4rem)/.98 var(--display); letter-spacing: -.035em; }
.field p { max-width: 26rem; }
.field--accent { background: var(--accent-fill); color: var(--on-accent); }
.field--accent .field__head { font-size: clamp(2.6rem, 4.6vw, 4.8rem); }
.field--light { background: #e6e6e6; color: #0e0e10; }
.field--deep { background: var(--surface-2); }
:root[data-mode="light"] .field--light { background: #f4f4f4; }

/* ---------- career ---------- */
.pin-spacer:has(> .career), .pin-spacer > .career { max-width: 100% !important; }   /* GSAP writes the measured width (and max-width) inline; never wider than the page, see body */
.career { padding-top: var(--section); background: var(--surface); overflow: hidden; }
.career__top { display: grid; grid-template-columns: 7fr 5fr; gap: var(--gap); align-items: end; }
.career__note { color: var(--ink-soft); justify-self: end; max-width: 30rem; }
.career__viewport { position: relative; clip-path: inset(0 var(--margin)); padding-block: clamp(3rem, 6vw, 5rem) clamp(4rem, 8vw, 7rem); }
.career__track { --cgap: calc(var(--margin) + 2rem); display: flex; gap: var(--cgap); padding-inline: var(--margin); width: max-content; will-change: transform; }
.stop { width: calc((100vw - 2 * var(--margin) - 3 * var(--cgap)) / 4); flex: none; display: grid; gap: .6rem; align-content: start; }
.stop__year { font: 700 clamp(4.5rem, 9vw, 9rem)/.85 var(--display); letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.stop__place { font: 600 1.5rem/1.15 var(--display); letter-spacing: -.02em; margin-top: .6rem; }
.stop__text { color: var(--ink-soft); max-width: 22rem; }
.stop--turn .stop__year, .stop--now .stop__year { color: var(--accent); }
.career__bar { margin: clamp(2.5rem, 5vw, 4rem) var(--margin) 0; height: 4px; background: var(--surface-2); border-radius: var(--round); overflow: hidden; }
.career__bar span { display: block; height: 100%; width: 100%; background: var(--accent-fill); transform-origin: 0 50%; transform: scaleX(0); }
html:not(.js) .career__bar, .career--static .career__bar { display: none; }
.career--static .career__viewport { clip-path: none; }
.career--static .career__track { width: auto; flex-wrap: wrap; row-gap: clamp(2.5rem, 5vw, 4rem); }

/* ---------- about ---------- */
.about { padding-block: var(--section) calc(var(--section) * .55); }
.about__grid { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(2rem, 5vw, 6rem); align-items: start; }
.about__photo { position: sticky; top: calc(var(--bar-h) + 2rem); overflow: hidden; }
.about__photo img { width: 100%; transform-origin: 50% 40%; }
.about__text { display: grid; gap: 2rem; align-content: start; padding-top: 1rem; }
.about__lead { font: 400 clamp(1.4rem, 2vw, 2rem)/1.3 var(--display); letter-spacing: -.015em; max-width: 38rem; }
.facts { display: grid; }
.facts > div { display: grid; grid-template-columns: 10rem 1fr; gap: 1.5rem; padding-block: 1.15rem; border-top: 2px solid var(--surface-2); }
.facts dt { font-weight: 600; }
.facts dd { color: var(--ink-soft); }

/* ---------- words ---------- */
.words { padding-block: calc(var(--section) * .7) var(--section); background: var(--surface); }
.words__row { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); margin-top: clamp(2.5rem, 5vw, 4rem); }
.quote { background: var(--surface-2); padding: clamp(1.5rem, 2.5vw, 2.5rem); display: flex; flex-direction: column; justify-content: space-between; gap: 2.5rem; min-height: 20rem; }
.quote p { font: 400 clamp(1.25rem, 1.6vw, 1.6rem)/1.35 var(--display); letter-spacing: -.01em; }
.quote footer { display: grid; gap: .2rem; }
.quote__name { font-weight: 600; }
.quote__role { color: var(--ink-soft); font-size: var(--t-small); }
.quote--placeholder { outline: 2px dashed color-mix(in srgb, var(--accent) 70%, transparent); outline-offset: -2px; }
.quote--placeholder p { color: var(--accent); }

/* ---------- contact ---------- */
.contact { padding-block: var(--section) calc(var(--section) * .6); }
.contact__grid { display: grid; grid-template-columns: 8fr 4fr; gap: clamp(2rem, 5vw, 5rem); align-items: end; }
.contact__head { font: 700 var(--t-xl)/.88 var(--display); letter-spacing: -.04em; text-wrap: balance; }
.contact__pt { margin-top: 1.25rem; color: var(--ink-soft); }
.contact__mail { display: inline-block; margin-top: clamp(2.5rem, 5vw, 4rem); font: 500 clamp(1.75rem, 4.2vw, 4.25rem)/1 var(--display); letter-spacing: -.035em; color: var(--accent); text-decoration: none; position: relative; padding-bottom: .12em; word-break: break-word; }
.contact__mail::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: currentColor; transform: scaleX(0); transform-origin: 0 50%; transition: transform .5s var(--ease-out); }
.contact__mail:hover::after, .contact__mail:focus-visible::after { transform: scaleX(1); }
.contact__links { display: flex; flex-wrap: wrap; gap: .5rem 1.75rem; margin-top: 2rem; }
.contact__links a { font-weight: 500; }
.contact { overflow-x: clip; }
.contact__photo { position: relative; }
.contact__photo > img:first-child { width: 100%; }
/* an old print slid across the table, landing crooked over the portrait */
.contact__kid {
  position: absolute; z-index: 2; left: 16%; bottom: -9%; width: 78%;
  padding: .55rem .55rem 1.75rem; background: #f3f1ea;
  transform: rotate(-7deg); transform-origin: 60% 80%;
  cursor: grab; touch-action: none; -webkit-user-drag: none; user-select: none;
}
.contact__kid.is-dragging { cursor: grabbing; }
.contact__kid:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }

/* Portuguese runs a little longer: same layout as English (photo beside the text), slightly smaller on phones */
@media (max-width: 699px) { :lang(pt) .contact__head, :lang(pt) .contact--case .contact__head { font-size: clamp(1.85rem, 8.2vw, 2.3rem); line-height: .95; } }

/* ---------- footer ---------- */
.foot { padding-bottom: 1.5rem; overflow: hidden; }
.foot__name { font: 800 clamp(4rem, 15.5vw, 17rem)/.8 var(--display); letter-spacing: -.04em; white-space: nowrap; margin-left: -.04em; color: color-mix(in srgb, var(--ink) 42%, var(--ground)); }
.foot__row { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: 1.5rem; font-size: var(--t-small); color: var(--ink-soft); }

/* ---------- inspect layer ---------- */
.inspect { position: fixed; inset: 0; z-index: 50; pointer-events: none; }
.inspect__box { position: absolute; outline: 2px solid var(--inspect); outline-offset: 0; transition: left .14s var(--ease-out), top .14s var(--ease-out), width .14s var(--ease-out), height .14s var(--ease-out); }
.inspect__box .h { position: absolute; width: 8px; height: 8px; background: #fff; outline: 2px solid var(--inspect); }
.inspect__box .h1 { left: -5px; top: -5px; } .inspect__box .h2 { right: -5px; top: -5px; }
.inspect__box .h3 { left: -5px; bottom: -5px; } .inspect__box .h4 { right: -5px; bottom: -5px; }
.inspect__box .h5 { left: calc(50% - 4px); top: -5px; } .inspect__box .h6 { left: calc(50% - 4px); bottom: -5px; } .inspect__box .h7 { left: -5px; top: calc(50% - 4px); } .inspect__box .h8 { right: -5px; top: calc(50% - 4px); }
.inspect__pad { position: absolute; border-style: solid; border-color: color-mix(in srgb, var(--inspect) 34%, transparent); mix-blend-mode: normal; transition: left .14s var(--ease-out), top .14s var(--ease-out), width .14s var(--ease-out), height .14s var(--ease-out), border-width .14s var(--ease-out); }
.inspect__card { /* taste-skill-ignore: a floating overlay, like a menu */ position: absolute; min-width: 15rem; max-width: 19rem; padding: .85rem 1rem; background: #111216; color: #f1f0ec; border-radius: 10px; outline: 1px solid rgba(255, 255, 255, .12); outline-offset: -1px; box-shadow: 0 18px 40px -12px rgba(0,0,0,.6); font: 400 .8125rem/1.45 var(--text); font-variant-numeric: tabular-nums; transition: transform .14s var(--ease-out), opacity .14s; }
.inspect__card b { display: block; font: 600 .9375rem/1.2 var(--display); margin-bottom: .45rem; }
.inspect__card dl { display: grid; grid-template-columns: auto 1fr; gap: .15rem .9rem; }
.inspect__card dt { color: #9c9ba6; }
.inspect__fact { margin: .75rem -.35rem 0; padding: .55rem .6rem; border-radius: 6px; background: rgba(255, 255, 255, .07); color: #f1f0ec; }
.inspect__fact span { display: block; margin-bottom: .2rem; color: #9fb2ff; font-weight: 600; }
.inspect__card .sw { display: inline-block; width: .8em; height: .8em; border-radius: 2px; margin-right: .35em; vertical-align: -.05em; outline: 1px solid rgba(255,255,255,.25); outline-offset: -1px; }
.is-inspecting, .is-inspecting * { cursor: crosshair !important; }
.is-inspecting .hero__name { pointer-events: auto; }
.intro-select { position: absolute; z-index: 3; pointer-events: none; }
/* the line is a border, drawn inside a box 2px bigger than the target: it sits where an outline would, and a clip-path at 0 never cuts it */
.intro-select__frame { position: absolute; inset: -2px; border: 2px solid var(--inspect); }
.intro-select .h { position: absolute; width: 10px; height: 10px; background: #fff; outline: 2px solid var(--inspect); }
.intro-select .h1 { left: -6px; top: -6px; } .intro-select .h2 { right: -6px; top: -6px; } .intro-select .h3 { left: -6px; bottom: -6px; } .intro-select .h4 { right: -6px; bottom: -6px; }
.intro-select .h5 { left: calc(50% - 5px); top: -6px; } .intro-select .h6 { left: calc(50% - 5px); bottom: -6px; } .intro-select .h7 { left: -6px; top: calc(50% - 5px); } .intro-select .h8 { right: -6px; top: calc(50% - 5px); }
.intro-select__tag { position: absolute; left: -2px; top: calc(100% + 8px); padding: .3rem .6rem; background: var(--inspect); color: var(--on-inspect); font: 600 .8125rem/1.2 var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; border-radius: 4px; }

/* ---------- travel: progress line and arrival selection ---------- */
.travel { position: fixed; z-index: 41; top: var(--bar-h); left: 0; right: 0; height: 3px; background: var(--accent-fill); transform: scaleX(0); transform-origin: 0 50%; opacity: 0; pointer-events: none; }
.flash-select { position: absolute; z-index: 45; }
[tabindex="-1"]:focus { outline: none; }

/* ---------- page transitions (cross-document view transitions) ---------- */
@view-transition { navigation: auto; }
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }
::view-transition-old(root) { animation: vt-leave .45s cubic-bezier(.7, 0, .84, 0) both; }
::view-transition-new(root) { animation: vt-enter .9s cubic-bezier(.16, 1, .3, 1) .18s both; }
::view-transition-group(case-title), ::view-transition-group(case-cover) { animation-duration: .95s; animation-timing-function: cubic-bezier(.16, 1, .3, 1); z-index: 2; }
::view-transition-old(case-title), ::view-transition-new(case-title) { height: 100%; object-fit: contain; object-position: left top; }
::view-transition-old(case-cover), ::view-transition-new(case-cover) { height: 100%; object-fit: cover; }
/* a language switch is the same page in another language: a quick crossfade, not a new page */
html:active-view-transition-type(lang)::view-transition-old(root) { animation: vt-fade-out .28s ease both; }
html:active-view-transition-type(lang)::view-transition-new(root) { animation: vt-fade-in .4s ease .08s both; }
@keyframes vt-fade-out { to { opacity: 0; } }
@keyframes vt-fade-in { from { opacity: 0; } }
@keyframes vt-leave { to { opacity: 0; transform: translateY(-3vh) scale(.985); } }
@keyframes vt-enter { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0 0 0 0); } }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .stop { width: calc((100vw - 2 * var(--margin) - 2 * var(--cgap)) / 3); }
  .bar__nav { gap: 1.1rem; }
  .service { grid-template-columns: 1fr 1fr; grid-template-rows: auto 1fr; }
  .service__text { grid-column: 2; grid-row: 1 / span 2; }
  .service .chips { grid-column: 1; grid-row: 2; align-self: start; }
}
@media (max-width: 899px) {
  .bar .bar__menu { display: inline-flex; order: 2; }
  .bar__mark { margin-right: auto; }
  .bar__nav { display: none; position: absolute; top: var(--bar-h); left: 0; right: 0; flex-direction: column; gap: 0; padding: .5rem var(--margin) 1.5rem; background: var(--ground); color: var(--ink); }
  .bar.is-open { background: var(--ground); color: var(--ink); }
  .bar.is-open .bar__nav { display: flex; }
  .bar__nav a { font: 600 2rem/1.1 var(--display); letter-spacing: -.02em; padding-block: .6rem; }
  .bar__nav a::after { display: none; }
  .bar__tools { order: 3; }
  .locked { grid-template-columns: 1fr; }
  .services__top, .work__top, .career__top { grid-template-columns: 1fr; }
  .services__note, .work__note, .career__note { justify-self: start; }
  .service { grid-template-columns: 1fr; grid-template-rows: none; gap: 1rem; }
  .service__text, .service .chips { grid-column: auto; grid-row: auto; }
  .service .chips { order: 1; }
  .service__text { order: 2; }
  .project { grid-template-columns: 1fr; min-height: 0; }
  .project__media { min-height: 0; aspect-ratio: 4 / 3.4; }
  .lead__fields { grid-template-columns: 1fr; }
  .field { min-height: 0; gap: 3rem; }
  .about__grid, .contact__grid { grid-template-columns: 1fr; }
  .about__photo { position: relative; top: 0; }
  .contact__photo { max-width: 26rem; }
  .words__row { grid-template-columns: 1fr; }
  .intro__grid { min-height: 0; display: block; }
  .intro__text { padding-block: 0 2rem; }
  .intro__photo { position: relative; inset: auto; width: auto; display: inline-block; }
}
@media (max-width: 699px) {
  :root { --bar-h: 3.75rem; }
  .bar__in { gap: .75rem; }
  .switch span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .switch { padding: .6rem; }
  .hero { min-height: 560px; }
  .hero__photo img { object-position: 50% 20%; }
  .hero { display: flex; flex-direction: column; justify-content: flex-end; }
  .hero__name-wrap { position: relative; inset: auto; padding-bottom: 1.25rem; }
  .hero__name { font-size: 25vw; line-height: .8; white-space: normal; width: 100%; }
  .hero__name span { display: block; }
  .hero__foot { position: relative; inset: auto; flex-direction: column; align-items: flex-start; }
  .intro__grid { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
  .intro__text { grid-column: 1 / -1; order: -1; }
  .intro__photo--b, .intro__photo--d { margin-top: 2.5rem; }
  .facts > div { grid-template-columns: 1fr; gap: .3rem; }
  .foot__row p:nth-child(2) { display: none; }
  .stop { width: 100%; }
  .work__tabs { position: static; }
  .work__tabs-in { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* =========================================================
   Case-study pages (v3/cases/*.html)
   ========================================================= */
.case-hero { padding-top: calc(var(--bar-h) + clamp(3rem, 8vw, 7rem)); display: grid; grid-template-columns: 7fr 5fr; gap: var(--gap) clamp(2rem, 5vw, 5rem); align-items: end; }
.case-hero__title { grid-column: 1 / -1; font: 700 var(--t-xl)/.88 var(--display); letter-spacing: -.04em; text-wrap: balance; }
.case-hero__intro { display: grid; gap: 2rem; align-content: end; }
.case-hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem 1.75rem; }
.case-hero__lead { font: 400 clamp(1.35rem, 2vw, 2rem)/1.3 var(--display); letter-spacing: -.015em; max-width: 44rem; }
.case-facts { display: grid; align-self: end; }
.case-facts > div { display: grid; grid-template-columns: 8.5rem 1fr; gap: 1rem; padding-block: .8rem; border-top: 2px solid var(--surface-2); }
.case-facts dt { font-weight: 600; }
.case-facts dd { color: var(--ink-soft); }

.case-cover { margin-top: clamp(2.5rem, 5vw, 4.5rem); }
.case-cover__fig img, .case-cover__fig video { width: 100%; }
.case-cover--nda { display: grid; grid-template-columns: 7fr 5fr; }
.case-cover__field { background: var(--accent-fill); color: var(--on-accent); padding: clamp(2rem, 4vw, 4rem); display: flex; flex-direction: column; justify-content: flex-end; gap: 1rem; min-height: 32rem; }
.case-cover__field svg { width: 2.25rem; height: 2.25rem; fill: currentColor; }
.case-cover__big { font: 700 clamp(3.5rem, 8vw, 8rem)/.88 var(--display); letter-spacing: -.04em; }
.case-cover__photo { overflow: hidden; }
.case-cover__photo img { width: 100%; height: 100%; object-fit: cover; }

.case-block { padding-top: clamp(5rem, 10vw, 9rem); display: grid; grid-template-columns: repeat(2, 1fr); column-gap: var(--gap); }
.case-block__grid { grid-column: 1 / -1; display: grid; grid-template-columns: 4fr 1fr 7fr; }
.case-block__head { grid-column: 1; font-size: clamp(2rem, 3.6vw, 3.6rem); align-self: start; }
.case-block__body { grid-column: 3; display: grid; gap: 1.5rem; max-width: 46rem; }
.case-block__lead { font: 400 clamp(1.35rem, 1.9vw, 1.9rem)/1.3 var(--display); letter-spacing: -.015em; }
.case-fig { margin: 0; }
.case-fig img, .case-fig video { width: 100%; }
.case-fig figcaption { margin-top: .75rem; font-size: var(--t-small); color: var(--ink-soft); }
.case-fig--wide { grid-column: 1 / -1; margin-top: clamp(2.5rem, 5vw, 4rem); }
.case-fig--portrait { grid-column: auto; }
.case-fig--portrait img { aspect-ratio: 4 / 5; object-fit: cover; }
.case-list { padding-left: 1.1rem; display: grid; gap: .6rem; }
.case-list li::marker { color: var(--accent); }

.case-steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px; background: var(--surface-2); counter-reset: none; }
.case-steps > li { background: var(--surface); padding: 1.25rem; display: grid; gap: .75rem; align-content: start; }
.case-steps h3 { font: 600 1.5rem/1.1 var(--display); letter-spacing: -.02em; color: var(--accent); }
.case-steps ul { display: grid; gap: .4rem; font-size: var(--t-small); color: var(--ink-soft); }
.case-block:has(.case-steps) .case-block__body { max-width: none; }

.case-groups { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
.case-groups > div { background: var(--surface); padding: clamp(1.25rem, 2vw, 1.75rem); display: grid; gap: .6rem; align-content: start; }
.case-groups h3 { font: 600 1.6rem/1.1 var(--display); letter-spacing: -.02em; }
.case-groups p { color: var(--ink-soft); }
.case-groups__goal { color: var(--ink) !important; }
.case-groups__goal span { font-weight: 600; color: var(--accent); margin-right: .35rem; }

.case-numbers { margin-top: clamp(5rem, 10vw, 9rem); background: var(--accent-fill); color: var(--on-accent); padding-block: clamp(3rem, 6vw, 5.5rem); }
.case-numbers__in { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: var(--gap); }
.case-num__value { font: 700 clamp(4rem, 9vw, 9rem)/.85 var(--display); letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.case-num__label { margin-top: .75rem; max-width: 16rem; }

.case-next { padding-block: clamp(6rem, 12vw, 11rem) 0; display: grid; gap: 2rem; justify-items: start; }
.case-next__link { display: grid; grid-template-columns: 1fr minmax(14rem, 32%); align-items: end; gap: var(--gap); width: 100%; text-decoration: none; padding-top: 2rem; border-top: 2px solid var(--surface-2); overflow: clip; }
.case-next__title { grid-column: 1; min-width: 0; font: 700 clamp(3rem, 8.5vw, 9rem)/.86 var(--display); letter-spacing: -.04em; overflow-wrap: anywhere; transition: color .3s var(--ease-out); }
.case-next__fig { grid-column: 2; grid-row: 1 / span 2; overflow: hidden; }
.case-next__fig img { width: 100%; transition: transform .8s var(--ease-out); }
.case-next__link:hover .case-next__title, .case-next__link:focus-visible .case-next__title { color: var(--accent); }
.case-next__link:hover .case-next__fig img { transform: scale(1.04); }

.contact--case { padding-top: clamp(6rem, 12vw, 10rem); }
.contact--case .contact__head { font-size: clamp(2.75rem, 6vw, 6rem); }

@media (max-width: 899px) {
  .case-hero, .case-cover--nda { grid-template-columns: 1fr; }
  .case-cover__field { min-height: 20rem; }
  .case-block { grid-template-columns: 1fr; }
  .case-block__grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .case-block__body { grid-column: 1; }
  .case-next__title { font-size: 12vw; }
  .case-steps { grid-template-columns: 1fr 1fr; }
  .case-groups { grid-template-columns: 1fr; }
  .case-next__link { grid-template-columns: 1fr; }
  .case-next { padding-top: 10rem; }
  .case-next__fig { grid-column: 1; grid-row: auto; }
}
@media (max-width: 699px) {
  .case-fig--diagram { overflow-x: auto; scrollbar-width: thin; }
  .case-fig--diagram img { width: 720px; max-width: none; }
  .case-fig--diagram figcaption { position: sticky; left: 0; }
  .case-hero .case-facts { grid-template-columns: 1fr 1fr; column-gap: 1rem; }
  .case-hero .case-facts > div { padding-block: .55rem; font-size: var(--t-small); }
  .case-hero .case-facts > div:nth-child(n+3) { grid-column: 1 / -1; }
  .case-steps { grid-template-columns: 1fr; }
  .case-facts > div { grid-template-columns: 1fr; gap: .25rem; }
}

/* =========================================================
   CV page (v3/cv.html): two A4 sheets in the site's identity
   ========================================================= */
.cv-page { padding: calc(var(--bar-h) + clamp(1.5rem, 4vw, 3rem)) 0 clamp(4rem, 8vw, 7rem); }
.cv-tools { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem 2rem; margin-bottom: clamp(1.5rem, 3vw, 2.5rem); }
.cv-tools__note { color: var(--ink-soft); }
.cv-tools__actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.5rem; }
.cv-tools__print { border: 0; cursor: pointer; font: inherit; font-weight: 600; background: color-mix(in srgb, var(--ink) 12%, transparent); color: var(--ink); }
.cv-tools__print:hover { background: color-mix(in srgb, var(--ink) 20%, transparent); }
.cv { display: grid; justify-content: center; gap: clamp(1.5rem, 3vw, 2.5rem); padding-inline: var(--margin); }

.sheet {
  --paper: #ffffff; --paper-ink: #0e0e10; --paper-soft: #4a4a4e; --paper-rule: #dcdcdc; --paper-accent: #1f3fb4;
  --cv: 9.7pt;
  width: 210mm; height: 297mm; padding: 14mm 15mm 11mm; position: relative; overflow: hidden;
  background: var(--paper); color: var(--paper-ink);
  font: 400 var(--cv)/1.42 var(--text); font-feature-settings: "ss01";
  display: flex; flex-direction: column; gap: 6mm;
  print-color-adjust: exact; -webkit-print-color-adjust: exact;
}
.sheet a { color: inherit; text-decoration: none; }
.sheet a:hover { color: var(--paper-accent); text-decoration: underline; }
.sheet ::selection { background: var(--paper-accent); color: #fff; }

.cv-head { display: grid; grid-template-columns: 1fr 34mm; gap: 8mm; align-items: end; padding-bottom: 5mm; border-bottom: 2px solid var(--paper-ink); }
.cv-name { font: 700 3.9em/.9 var(--display); letter-spacing: -.04em; }
.cv-surname { font: 500 1.64em/1.1 var(--display); letter-spacing: -.02em; margin-top: .35em; color: var(--paper-soft); }
.cv-role { margin-top: 3.2mm; font: 600 1.25em/1.2 var(--display); letter-spacing: -.01em; color: var(--paper-accent); }
.cv-contact { display: flex; flex-wrap: wrap; gap: .3em 1.4em; margin-top: 2.6mm; color: var(--paper-soft); }
.cv-photo { width: 34mm; height: 34mm; object-fit: cover; }

.cv-row { display: grid; grid-template-columns: 30mm 1fr; gap: 6mm; padding-top: 4.4mm; border-top: 2px solid var(--paper-rule); }
.cv-row--first, .cv-head + .cv-row { border-top: 0; padding-top: 0; }
.cv-row h2 { font: 600 1.18em/1.15 var(--display); letter-spacing: -.01em; }
.cv-lead { font: 500 1.28em/1.3 var(--display); letter-spacing: -.012em; margin-bottom: 1.6mm; }
.cv-entries { display: grid; gap: 4.6mm; }
.cv-entry__top { display: flex; justify-content: space-between; align-items: baseline; gap: 4mm; }
.cv-entry h3 { font: 600 1.1em/1.2 var(--display); letter-spacing: -.01em; }
.cv-entry h3 span { font-weight: 500; color: var(--paper-accent); margin-left: .35em; }
.cv-when { flex: none; color: var(--paper-soft); font-variant-numeric: tabular-nums; }
.cv-entry ul { margin-top: 1.4mm; padding-left: 1.1em; display: grid; gap: .9mm; }
.cv-entry li::marker { color: var(--paper-accent); }
.cv-certs { display: grid; grid-template-columns: 1fr 1fr; gap: 2.4mm 6mm; }
.cv-certs b { display: block; font-weight: 600; }
.cv-certs li { color: var(--paper-soft); }
.cv-certs li b { color: var(--paper-ink); }
.cv-tags { display: flex; flex-wrap: wrap; gap: 1.4mm; }
.cv-tags li { padding: .25em .75em; border-radius: 999px; background: #ececec; }
.cv-folio { margin-top: auto; font-size: .86em; color: var(--paper-soft); }
.foot--cv { padding-top: 1rem; }
/* on big screens the sheet is shown larger than print size, so it reads like a page, not a thumbnail */
@media screen and (min-width: 1200px) { .sheet { zoom: 1.3; } .cv { gap: 3rem; } }
@media screen and (max-width: 899px) { .cv-page { display: flex; flex-direction: column; } .cv-tools { order: 2; margin: 2rem 0 0; } }

@media screen and (max-width: 899px) {
  .cv { padding-inline: var(--margin); justify-content: stretch; }
  .sheet { --cv: 15px; width: 100%; height: auto; padding: 7vw 6vw; gap: 1.6rem; }
  .cv-head { grid-template-columns: 1fr 6.5rem; gap: 1rem; padding-bottom: 1.2rem; }
  .cv-photo { width: 6.5rem; height: 6.5rem; }
  .cv-name { font-size: 2.6em; }
  .cv-row { grid-template-columns: 1fr; gap: .6rem; padding-top: 1rem; }
  .cv-entry__top { flex-direction: column; gap: .15rem; }
  .cv-certs { grid-template-columns: 1fr; }
  .cv-folio { display: none; }
}

@page { size: A4; margin: 0; }
@media print {
  .bar, .cv-tools, .foot, .inspect, .skip, .travel, .flash-select, [data-inspect-live] { display: none !important; }
  .cv-page { padding: 0; }
  .cv { display: block; padding: 0; }
  .sheet { height: 296mm; break-after: page; page-break-after: always; margin: 0; }
  .sheet:last-child { break-after: auto; page-break-after: auto; }
  .sheet a:hover { text-decoration: none; }
}

/* hero on WebGL (hero-gl.js): the canvas replaces the photo only once it has drawn */
.hero__gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
.hero__photo.has-gl img { opacity: 0; }
.hero:has(.has-gl) { background: none; }   /* the curved corners show the page behind */
.hero:has(.has-gl)::after { display: none; }   /* the shader draws the scrim, bent with the photo */

/* photos in depth (main.js): a soft shadow that moves against the tilt */
.is-3d { box-shadow: var(--sx, 0) var(--sy, 18px) var(--sb, 44px) -14px rgb(0 0 0 / calc(var(--sa, .4) * 1.6)); }
:root[data-mode="light"] .is-3d { box-shadow: var(--sx, 0) var(--sy, 18px) var(--sb, 44px) -14px rgb(0 0 0 / var(--sa, .3)); }

/* Hairline figures (tools/hairline): line drawings that answer the pointer, in the colours of the surface they sit on */
.hl { display: block; width: 100%; }
.locked__item { position: relative; }
.locked__hl { --hairline-plate: var(--accent-fill); --hairline-hi: var(--on-accent); --hairline-edge: color-mix(in srgb, var(--on-accent) 72%, var(--accent-fill)); --hairline-mid: color-mix(in srgb, var(--on-accent) 45%, var(--accent-fill)); --hairline-lo: color-mix(in srgb, var(--on-accent) 24%, var(--accent-fill)); --hairline-stroke: 1; display: block; width: 11rem; margin: -.75rem 0 -.5rem -.75rem; }
.locked__item--alt .locked__hl { --hairline-plate: var(--ink); --hairline-hi: var(--ground); --hairline-edge: color-mix(in srgb, var(--ground) 70%, var(--ink)); --hairline-mid: color-mix(in srgb, var(--ground) 42%, var(--ink)); --hairline-lo: color-mix(in srgb, var(--ground) 22%, var(--ink)); }
@media (min-width: 900px) {
  .locked__item { padding-right: clamp(10rem, 14vw, 13rem); }
  .locked__hl { position: absolute; right: .5rem; bottom: 1rem; width: clamp(11rem, 15vw, 14rem); margin: 0; }
}
.nf__hl { --hairline-plate: var(--ground); --hairline-hi: var(--ink); --hairline-edge: color-mix(in srgb, var(--ink) 55%, var(--ground)); --hairline-mid: color-mix(in srgb, var(--ink) 30%, var(--ground)); --hairline-lo: color-mix(in srgb, var(--ink) 15%, var(--ground)); --hairline-stroke: 1; display: block; }
.nf__hl { width: min(20rem, 70vw); margin: 0 0 -1rem -1rem; }

/* ---------- support box (tools/pix.py writes it; study track ends, the support page, Create CV) ---------- */
.sup { display: grid; grid-template-columns: 1fr auto; gap: 1.5rem 2.5rem; align-items: center; margin-top: 1.5rem; padding: 1.75rem 2rem; border-radius: 18px; background: var(--ink); color: var(--ground); max-width: 46rem; }
.sup--en { grid-template-columns: 1fr; }
.sup__txt { display: grid; gap: .75rem; }
.sup__h { font: 600 1.6rem/1.15 var(--display); letter-spacing: -.02em; }
.sup p { max-width: 52ch; }
.sup__amts { display: flex; flex-wrap: wrap; gap: .4rem; }
.sup__amts[hidden], .sup__go[hidden] { display: none; }
.sup__amt { font: inherit; font-weight: 600; padding: .45rem .8rem; border-radius: 999px; border: 1.5px solid color-mix(in srgb, var(--ground) 45%, transparent); background: none; color: inherit; cursor: pointer; }
.sup__amt[aria-pressed="true"] { background: var(--ground); color: var(--ink); border-color: var(--ground); }
.sup__amt:focus-visible, .sup .btn:focus-visible, .sup a:focus-visible { outline: 2px solid var(--ground); outline-offset: 3px; }
.sup__go { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; }
.sup .btn--primary { background: var(--ground); color: var(--ink); }
.sup__status, .sup__how, .sup__alt { font-size: var(--t-small); color: color-mix(in srgb, var(--ground) 82%, transparent); }
.sup a:not(.btn) { color: inherit; font-weight: 600; text-underline-offset: .18em; }
.sup code { user-select: all; overflow-wrap: anywhere; color: var(--ground); }
.sup__qr { display: grid; justify-items: center; gap: .5rem; margin: 0; }
.sup__qr img { width: 180px; height: 180px; border-radius: 12px; background: #fff; }
.sup__qr figcaption { font-size: var(--t-small); color: color-mix(in srgb, var(--ground) 82%, transparent); }
@media (max-width: 720px) { .sup { grid-template-columns: 1fr; padding: 1.5rem; } .sup__qr { display: none; } }   /* on the phone the code is the way; you cannot scan your own screen */
@media print { .sup { display: none; } }
