/* ---------- Tokens ---------- */
:root {
  --black: #0e0c0d;
  --ink: #161314;
  --cream: #f5efdc;
  --cream-2: #ebe3cb;
  --muted: #7d7568;
  --pink: #e8a5b6;
  --pink-deep: #c86f88;
  --line: rgba(22, 19, 20, .22);

  --f-wide: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;

  --gutter: clamp(12px, 2.4vw, 32px);
  --ease: cubic-bezier(.2, .9, .25, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--black);
  color: var(--ink);
  font-family: var(--f-wide);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 1.5px solid var(--pink); outline-offset: 4px; }

.wide { font-stretch: 125%; font-weight: 300; letter-spacing: -.02em; text-transform: uppercase; }
.micro { font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; font-weight: 500; }
.mono { font-family: var(--f-mono); font-size: 11px; letter-spacing: .02em; }

/* ---------- Landing hero ---------- */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  margin: var(--gutter);
  height: calc(100svh - 2 * var(--gutter)); min-height: 620px;
  background: #1d1a1b;
  color: var(--cream);
}

.hero .photo {
  position: absolute; top: 0; right: 0; bottom: 0; width: 64%; z-index: -3;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 32%);
          mask-image: linear-gradient(90deg, transparent 0, #000 32%);
}
.hero .photo img {
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 26%;
  filter: grayscale(1) contrast(1.35) brightness(.72);
  transform: scale(1.05);
  animation: drift 18s ease-in-out infinite alternate;
}
/* halftone dots over the portrait */
.hero .photo::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle, rgba(10,8,9,.6) 1.1px, transparent 1.6px) 0 0 / 5px 5px;
  -webkit-mask-image: radial-gradient(ellipse 60% 70% at 40% 30%, #000 10%, transparent 75%);
          mask-image: radial-gradient(ellipse 60% 70% at 40% 30%, #000 10%, transparent 75%);
}
@keyframes drift { to { transform: scale(1.1) translate(-1%, 1%); } }

.hero .petals { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; pointer-events: none; }
.hero .grain { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 5; pointer-events: none; opacity: .32; mix-blend-mode: overlay; }
.hero .shade {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, transparent 50%, rgba(14,12,13,.75) 100%);
}

.hero-top {
  position: absolute; top: 0; left: 0; right: 0; z-index: 6;
  display: flex; justify-content: space-between; padding: 18px clamp(16px, 3vw, 36px);
}

.hero-name {
  position: absolute; left: clamp(16px, 3vw, 36px); right: clamp(16px, 3vw, 36px); bottom: 64px; z-index: 6;
  margin: 0; line-height: .86; white-space: nowrap;
  font-size: clamp(44px, 9.1vw, 176px);
  display: flex; justify-content: space-between;
}
.hero-name span { display: inline-block; animation: rise 1.1s var(--ease) both; }
.hero-name span + span { animation-delay: .12s; }
@keyframes rise { from { transform: translateY(40%); opacity: 0; } }

.hero-meta {
  position: absolute; left: clamp(16px, 3vw, 36px); right: clamp(16px, 3vw, 36px); bottom: 24px; z-index: 6;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.hero-meta a:hover { color: var(--pink); }

/* ---------- The three interactive scraps ---------- */
.scraps {
  position: absolute; z-index: 7; left: clamp(16px, 3vw, 36px); top: 70px;
  width: min(54%, 680px); height: calc(100% - 70px - 64px - 11vw);
}
.scrap {
  position: absolute; width: clamp(140px, 13.5vw, 196px);
  transform: rotate(var(--r));
  transition: transform .6s var(--ease), opacity .4s, filter .4s;
  animation: drop .9s var(--ease) both; animation-delay: var(--d, 0s);
}
@keyframes drop { from { opacity: 0; transform: translateY(-30px) rotate(calc(var(--r) * 3)); } }
.scrap:nth-child(1) { left: 0;   top: 4%;  --r: -5deg; --d: .35s; }
.scrap:nth-child(2) { left: 25%; top: 16%; --r: 4deg;  --d: .5s; }
.scrap:nth-child(3) { left: 50%; top: 2%;  --r: -2deg; --d: .65s; }
.scrap:nth-child(4) { left: 75%; top: 14%; --r: 5deg;  --d: .8s; }

.scraps:hover .scrap:not(:hover), .scraps:focus-within .scrap:not(:focus-visible):not(:hover) { opacity: .45; filter: grayscale(1); }
.scrap:hover, .scrap:focus-visible { transform: translateY(-12px) rotate(0deg) scale(1.07); z-index: 2; }

.scrap .paper {
  position: relative; z-index: 0; aspect-ratio: 4 / 5; padding: 14px 14px 12px;
  display: flex; flex-direction: column; justify-content: space-between;
  color: var(--ink);
}
/* torn-paper background lives on its own layer so the filter doesn't warp the text */
.scrap .paper::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--paper-bg, var(--cream));
  filter: url(#torn) drop-shadow(0 14px 18px rgba(0,0,0,.45));
}
.scrap .num {
  width: 22px; height: 22px; border-radius: 50%; border: 1px solid currentColor;
  display: grid; place-items: center; font-size: 10px;
}
.scrap .row { display: flex; justify-content: space-between; align-items: center; }
.scrap .title { display: block; font-size: clamp(16px, 1.6vw, 24px); line-height: .92; margin: 0; }
.s-an .title { font-size: clamp(14px, 1.35vw, 20px); }
.scrap .open {
  display: inline-flex; gap: 6px; align-items: center;
  opacity: 0; transform: translateX(-8px); transition: opacity .3s, transform .3s var(--ease);
}
.scrap:hover .open, .scrap:focus-visible .open { opacity: 1; transform: none; }

/* scrap 1: CV sheet */
.s-cv { --paper-bg: var(--cream); }
.s-cv .lines { display: grid; gap: 7px; margin-top: 10px; }
.s-cv .lines i {
  display: grid; grid-template-columns: 12px 1fr 28px; gap: 6px; align-items: center; font-style: normal;
}
.s-cv .lines i::before { content: ""; width: 10px; height: 10px; border: 1px solid var(--ink); border-radius: 50%; }
.s-cv .lines i b { height: 3px; background: var(--ink); width: var(--w); }
.s-cv .lines i s { height: 2px; background: var(--muted); }

/* scrap 2: analytics */
.s-an {
  --paper-bg:
    radial-gradient(rgba(22,19,20,.28) 1px, transparent 1.4px) 0 0 / 5px 5px,
    var(--pink);
}
.s-an .big { font-size: clamp(20px, 2vw, 30px); line-height: .9; margin: 6px 0 0; }
.s-an svg { width: 100%; height: auto; overflow: visible; }
.s-an .curve { stroke-dasharray: 260; stroke-dashoffset: 260; transition: stroke-dashoffset 1.2s var(--ease); }
.scrap:hover .s-an .curve, .scrap:focus-visible .s-an .curve { stroke-dashoffset: 0; }

/* scrap 3: profile cut-out */
.s-pr { --paper-bg: var(--cream-2); }
/* scrap 4: projects, a cut-out of the campaign cover */
.s-pj { --paper-bg: var(--cream); }
.s-pj .cut img { object-position: 14% 50%; }
.s-pr .cut {
  flex: 1; margin: 8px 0; overflow: hidden; position: relative;
  clip-path: polygon(2% 4%, 30% 0, 62% 3%, 98% 0, 100% 40%, 96% 72%, 100% 100%, 58% 97%, 24% 100%, 0 96%, 3% 60%, 0 30%);
}
.s-pr .cut img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 28%;
  filter: grayscale(1) contrast(1.3); transition: filter .5s, transform .6s var(--ease);
}
.s-pr .cut::after {
  content: ""; position: absolute; inset: 0; mix-blend-mode: multiply;
  background: radial-gradient(circle, rgba(10,8,9,.45) 1px, transparent 1.4px) 0 0 / 4px 4px, var(--pink);
  opacity: .55; transition: opacity .5s;
}
.scrap:hover .s-pr .cut img, .scrap:focus-visible .s-pr .cut img { filter: grayscale(.2) contrast(1.05); transform: scale(1.08); }
.scrap:hover .s-pr .cut::after, .scrap:focus-visible .s-pr .cut::after { opacity: 0; }

.hint { position: absolute; left: 0; bottom: 0; color: var(--cream); opacity: .7; }

/* ---------- Page wipe transition ---------- */
.wipe {
  position: fixed; inset: 0; z-index: 100; background: var(--cream); pointer-events: none;
  clip-path: circle(0 at var(--x, 50%) var(--y, 50%));
  transition: clip-path .6s cubic-bezier(.7, 0, .3, 1);
}
.wipe.on { clip-path: circle(150% at var(--x, 50%) var(--y, 50%)); }
.page-enter { animation: enter .7s var(--ease) both; }
@keyframes enter { from { opacity: 0; transform: translateY(24px); } }

/* ---------- Inner pages: cream "sheets" on black ---------- */
.sheet {
  position: relative; background: var(--cream); color: var(--ink);
  margin: var(--gutter); padding: clamp(18px, 3vw, 36px);
  min-height: calc(100svh - 2 * var(--gutter));
  display: flex; flex-direction: column;
}
.sheet + .sheet { margin-top: 0; }
.sheet-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.sheet-bar nav { display: flex; gap: clamp(10px, 2vw, 28px); flex-wrap: wrap; }
.sheet-bar nav a { position: relative; }
.sheet-bar nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease);
}
.sheet-bar nav a:hover::after, .sheet-bar nav a[aria-current="page"]::after { transform: scaleX(1); }
.sheet-body { flex: 1; padding: clamp(28px, 5vw, 64px) 0 24px; }
.sheet-word {
  margin: 0; line-height: .82;
  font-size: clamp(56px, 13vw, 210px);
}
.sheet-word.sm { font-size: clamp(40px, 9vw, 150px); }
.lead { max-width: 640px; font-size: 13px; text-transform: uppercase; letter-spacing: .01em; line-height: 1.5; margin: 0 0 28px; }

/* numbered rows, as in the reference CV */
.rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.rows > li { border-bottom: 1px solid var(--line); }
.rows details > summary, .rows .row-link {
  list-style: none; cursor: pointer;
  display: grid; grid-template-columns: 40px minmax(0, 1.4fr) minmax(0, 1fr) 170px; gap: 20px; align-items: center;
  padding: 14px 0; transition: background .25s, padding .25s var(--ease);
}
.rows details > summary::-webkit-details-marker { display: none; }
.rows details > summary:hover, .rows .row-link:hover { background: rgba(232,165,182,.25); padding-left: 10px; }
.rows .n {
  width: 24px; height: 24px; border: 1px solid var(--ink); border-radius: 50%;
  display: grid; place-items: center; font-size: 10px;
}
.rows details[open] .n { background: var(--ink); color: var(--cream); }
.rows .org { font-size: clamp(16px, 1.8vw, 22px); line-height: 1.05; }
.rows .org small { display: block; margin-top: 3px; }
.rows .when { white-space: nowrap; text-align: right; }
/* employment type under the job title (permanent position / charity work) */
.rows .role small { display: block; margin-top: 9px; color: var(--muted); font-weight: 400; line-height: 1.3; }
.rows .detail {
  padding: 2px 0 20px 56px; max-width: 780px;
  font-family: var(--f-mono); font-size: 12.5px; line-height: 1.65; letter-spacing: .01em;
}
.rows .detail ul { margin: 0; padding: 0; list-style: none; }
.rows .detail li { position: relative; padding-left: 22px; }
.rows .detail li::before { content: "—"; position: absolute; left: 0; color: var(--pink-deep); }
.rows .detail li + li { margin-top: 8px; }

.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: clamp(20px, 3vw, 40px); }
.block h3 { margin: 0 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--ink); }
.block p, .block ul { margin: 0; font-size: 14px; }
.block ul { list-style: none; padding: 0; }
.block li { padding: 8px 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; }

.btn {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 28px;
  padding: 12px 20px; border: 1px solid var(--ink); border-radius: 999px;
  transition: background .25s, color .25s;
}
.btn:hover { background: var(--ink); color: var(--cream); }

/* analytics */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--ink); }
.kpi { padding: 18px 16px 22px 0; border-right: 1px solid var(--line); }
.kpi + .kpi { padding-left: 16px; }
.kpi:last-child { border-right: 0; }
.kpi .v { font-size: clamp(40px, 6vw, 92px); line-height: .9; }
.kpi p { margin: 10px 0 0; }

.growth { margin-top: 8px; }
.growth .track { position: relative; height: 10px; background: var(--cream-2); border: 1px solid var(--ink); }
.growth .fill { position: absolute; inset: 0; background: var(--ink); transform-origin: left; transform: scaleX(0); transition: transform 2s var(--ease); }
.growth.go .fill { transform: scaleX(1); }
.growth .ends { display: flex; justify-content: space-between; margin-top: 8px; }

/* profile */
.profile-grid { display: grid; grid-template-columns: minmax(220px, 1fr) 1.5fr; gap: clamp(24px, 4vw, 64px); align-items: start; }
.portrait { position: relative; overflow: hidden; aspect-ratio: 3 / 4; }
.portrait img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; filter: grayscale(1) contrast(1.2); transition: filter .6s; }
.portrait::after {
  content: ""; position: absolute; inset: 0; mix-blend-mode: multiply; transition: opacity .6s;
  background: radial-gradient(circle, rgba(10,8,9,.4) 1px, transparent 1.4px) 0 0 / 4px 4px, var(--pink);
  opacity: .6;
}
.portrait:hover img { filter: none; }
.portrait:hover::after { opacity: 0; }
.statement { font-size: clamp(20px, 2.4vw, 32px); line-height: 1.2; margin: 0 0 28px; font-weight: 300; }
.tag {
  display: inline-block; padding: 6px 12px; border: 1px solid var(--ink); border-radius: 999px; margin: 0 6px 8px 0;
  font-size: 12px; transition: background .2s, color .2s;
}
.tag:hover { background: var(--ink); color: var(--cream); }

.foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: var(--cream); padding: 6px var(--gutter) var(--gutter); }
.foot a:hover { color: var(--pink); }

/* ---------- EN / FR ---------- */
html[data-lang="en"] [data-l="fr"],
html[data-lang="fr"] [data-l="en"] { display: none !important; }

.lang-switch { display: inline-flex; align-items: center; gap: 4px; }
.lang-switch button {
  font: inherit; color: inherit; background: none; border: 0; padding: 2px 3px; cursor: pointer; opacity: .55;
  border-bottom: 1px solid transparent; transition: opacity .2s;
}
.lang-switch button:hover { opacity: 1; }
.lang-switch button[aria-pressed="true"] { opacity: 1; border-bottom-color: currentColor; }
.hero-top .right { display: inline-flex; gap: 18px; align-items: center; }
.sheet-bar .right { display: inline-flex; gap: clamp(14px, 2.4vw, 32px); align-items: center; flex-wrap: wrap; justify-content: flex-end; }

/* ---------- Analytics: real figures ---------- */
.kpi .delta { display: block; margin-top: 6px; color: var(--pink-deep); }
.source { margin-top: 20px; color: var(--muted); }
.source a { border-bottom: 1px solid currentColor; }

/* ---------- Projects / case study ---------- */
.rows .row-link { color: inherit; }
.case { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.shot { display: block; border: 1px solid var(--ink); background: #fff; overflow: hidden; cursor: zoom-in; }
.shot img { width: 100%; transition: transform .6s var(--ease); }
.shot:hover img { transform: scale(1.025); }
.case-title { margin: 0; font-size: clamp(30px, 3.6vw, 54px); line-height: .95; }
.case-sub { margin: 12px 0 22px; color: var(--muted); }
.case-text { margin: 0 0 26px; max-width: 560px; }
.facts { margin: 0; display: grid; grid-template-columns: auto 1fr; border-top: 1px solid var(--ink); }
.facts dt, .facts dd { margin: 0; padding: 10px 0; border-bottom: 1px solid var(--line); }
.facts dt { padding-right: 24px; color: var(--muted); }
.facts dd { font-size: 14px; }

.keymsg { margin: 0 0 clamp(28px, 4vw, 48px); max-width: 1000px; font-size: clamp(24px, 3.2vw, 46px); line-height: 1.05; }

.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 32px); }
.gallery figure { margin: 0; }
.gallery figcaption { display: flex; justify-content: space-between; gap: 12px; margin-top: 10px; color: var(--muted); }

.funnel { list-style: none; margin: clamp(32px, 5vw, 56px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid var(--ink); }
.funnel li { display: flex; flex-direction: column; gap: 10px; padding: 16px 16px 22px 0; font-size: 13px; border-right: 1px solid var(--line); }
.funnel li + li { padding-left: 16px; }
.funnel li:last-child { border-right: 0; }
.funnel .mono { color: var(--pink-deep); }
.funnel strong { font-size: clamp(15px, 1.4vw, 19px); line-height: 1.05; }

.lightbox { padding: 0; border: 0; background: transparent; max-width: 94vw; max-height: 94vh; overflow: visible; }
.lightbox::backdrop { background: rgba(14, 12, 13, .9); }
.lightbox img { display: block; max-width: 94vw; max-height: 88vh; width: auto; height: auto; }
.lightbox button {
  position: absolute; top: -40px; right: 0; font: inherit; color: var(--cream);
  background: none; border: 1px solid var(--cream); border-radius: 999px; padding: 4px 14px; cursor: pointer;
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero { height: auto; min-height: calc(100svh - 2 * var(--gutter)); display: flex; flex-direction: column; justify-content: flex-end; padding: 70px 16px 20px; }
  .hero .photo { width: 100%; -webkit-mask-image: linear-gradient(180deg, #000 40%, transparent 85%); mask-image: linear-gradient(180deg, #000 40%, transparent 85%); }
  .hero-top { padding: 16px; }
  .scraps { position: relative; inset: auto; width: 100%; height: auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 30vh 0 24px; }
  .scrap { position: relative; width: auto; left: auto !important; top: auto !important; }
  .scrap .paper { padding: 9px; }
  .scrap .title { font-size: 13px; }
  .s-an .title { font-size: 9px; }
  .scrap .row .micro, .scrap .row > span:last-child { font-size: 8px; }
  .scrap .num { width: 16px; height: 16px; font-size: 8px; }
  .scrap .open { display: none; }
  .s-cv .lines { gap: 5px; margin-top: 6px; }
  .s-cv .lines i:nth-child(n+4) { display: none; }
  .hero .petals .p1 { transform: translate(-260px, -150px); }
  .s-an .big { font-size: 13px; }
  .hint { display: none; }
  .hero-name { position: static; font-size: 14.6vw; flex-direction: column; margin-bottom: 16px; }
  .hero-meta { position: static; display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .rows details > summary, .rows .row-link { grid-template-columns: 34px 1fr; }
  .case, .gallery { grid-template-columns: 1fr; }
  .keymsg { font-size: 6.2vw; }
  .funnel { grid-template-columns: 1fr; }
  .funnel li, .funnel li + li { padding: 14px 0 18px; border-right: 0; border-bottom: 1px solid var(--line); }
  .rows .role, .rows .when { grid-column: 2; text-align: left; }
  .rows .detail { padding-left: 50px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi .v { font-size: 8.2vw; }
  .sheet-word.sm { font-size: 8vw; }
  .kpi:nth-child(2) { border-right: 0; }
  .kpi:nth-child(3) { padding-left: 0; border-top: 1px solid var(--line); }
  .kpi:nth-child(4) { border-top: 1px solid var(--line); }
  .profile-grid { grid-template-columns: 1fr; }
  .hero-top .right { gap: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
}
