/* ============================================================
   Berta Rodó Casals — portafoli
   Estètica: Caliu Estudi (paleta, Helvetica i la flor)
   ============================================================ */
:root {
  --cream: #FBF5EF;
  --paper: #FFFDFA;
  --blush: #FBD2CB;
  --red: #FD3939;
  --orange: #F35F37;
  --olive: #D1C161;
  --wine: #612837;
  --peri: #8C9DF5;
  --ink: #2B1519;
  --muted: #8A6F70;
  --line: rgba(97, 40, 55, .18);

  --sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "DM Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --hand: "Caveat", "Bradley Hand", cursive;

  --pad: clamp(16px, 4vw, 56px);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --shadow: 0 1px 2px rgba(60,20,25,.08), 0 14px 30px -14px rgba(60,20,25,.35);
  --dots: radial-gradient(rgba(43,21,25,.13) .8px, transparent 1.1px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0; background: var(--cream); color: var(--ink);
  font-family: var(--sans); font-size: 17px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; overflow-x: clip;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
::selection { background: var(--red); color: var(--cream); }
.mono { font-family: var(--mono); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; }
.hand { font-family: var(--hand); font-weight: 500; }

.grain {
  position: fixed; inset: 0; z-index: 100; pointer-events: none; opacity: .14;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.2  0 0 0 0 0.08  0 0 0 0 0.1  0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- cursor ---------- */
.cursor {
  position: fixed; left: 0; top: 0; z-index: 200; pointer-events: none;
  width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--red);
  display: grid; place-items: center; opacity: 0;
  transition: width .3s var(--ease), height .3s var(--ease), margin .3s var(--ease), background .3s;
}
.cursor.is-visible { opacity: 1; }
.cursor-label { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--cream); opacity: 0; transition: opacity .2s; white-space: nowrap; }
.cursor.is-big { width: 76px; height: 76px; margin: -38px 0 0 -38px; }
.cursor.is-big .cursor-label { opacity: 1; }
@media (hover: hover) and (pointer: fine) {
  body.has-cursor, body.has-cursor a, body.has-cursor button, body.has-cursor .draggable { cursor: none; }
}

/* ---------- header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px var(--pad); font-size: 13px;
  transition: background .4s, color .4s;
}
.site-header.is-solid { background: rgba(251,245,239,.86); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.logo { font-weight: 700; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; letter-spacing: -.01em; }
.logo-flower { width: 20px; height: 20px; color: var(--red); transition: transform .6s var(--spring); }
.logo:hover .logo-flower { transform: rotate(120deg); }
.nav { display: flex; gap: clamp(12px, 2.2vw, 30px); }
.nav a { text-decoration: none; position: relative; padding: 4px 0; }
.nav a::before {
  content: ""; position: absolute; left: 50%; top: -10px; width: 9px; height: 9px; margin-left: -4.5px; border-radius: 50%;
  background: var(--red); transform: scale(0); transition: transform .35s var(--spring);
}
.nav a:hover::before, .nav a.is-active::before { transform: scale(1); }
.header-right { display: flex; align-items: center; gap: 18px; }
.clock { color: var(--muted); font-variant-numeric: tabular-nums; }
.lang { display: flex; gap: 4px; color: var(--muted); }
.lang button { font: inherit; letter-spacing: inherit; }
.lang button[aria-pressed="true"] { color: var(--red); font-weight: 500; }

/* ============================================================
   1. PORTADA
   ============================================================ */
.hero { position: relative; height: 100svh; min-height: 640px; overflow: hidden; display: grid; place-items: center; }
.hero-phrase {
  margin: 0; position: relative; z-index: 2; display: flex; flex-direction: column; align-items: flex-start;
  font-size: clamp(54px, 10.5vw, 178px); font-weight: 700; letter-spacing: -.055em; line-height: .9;
  pointer-events: none;
}
.hp { display: block; }
.hp > span {
  display: inline-block; padding: .04em .2em .1em .16em; position: relative;
  background-image: var(--dots); background-size: 5px 5px;
  opacity: 0; transform: translateY(40px) rotate(var(--r)); animation: rise .9s var(--ease) forwards;
}
.hp1 > span { --r: -2deg; background-color: var(--blush); color: var(--red); }
.hp2 > span { --r: 1.5deg; background-color: var(--wine); color: var(--blush); margin-left: 9vw; animation-delay: .12s; }
.hp3 > span { --r: -1deg; background-color: var(--red); color: var(--cream); margin-left: 3vw; animation-delay: .24s; }
@keyframes rise { to { opacity: 1; transform: translateY(0) rotate(var(--r)); } }

.flowers { position: absolute; inset: 0; z-index: 3; }
.fl {
  position: absolute; left: var(--x); top: var(--y); width: var(--s); height: var(--s);
  color: var(--c); text-decoration: none; display: block;
  transform: translate(-50%, -50%) translate(var(--px, 0px), var(--py, 0px));
  transition: transform .5s var(--ease);
}
.fl-in { display: block; width: 100%; height: 100%; animation: pop .9s var(--spring) both; animation-delay: var(--d, .3s); }
.fl-float { display: block; width: 100%; height: 100%; animation: float 7s ease-in-out infinite; animation-delay: calc(var(--d, .3s) * -6); }
.fl svg { width: 100%; height: 100%; display: block; transform: rotate(var(--r, 0deg)); transition: transform .7s var(--spring); filter: drop-shadow(0 8px 14px rgba(97,40,55,.15)); }
.fl:hover svg, .fl:focus-visible svg { transform: rotate(calc(var(--r, 0deg) + 72deg)) scale(1.12); }
.fl-label {
  position: absolute; left: 50%; top: 100%; transform: translate(-50%, 4px) rotate(-3deg) scale(.9);
  white-space: nowrap; padding: 8px 14px; border: 2px dotted var(--wine); border-radius: 50%;
  background: var(--cream); color: var(--wine);
  opacity: 0; transition: opacity .3s, transform .45s var(--spring); pointer-events: none;
}
.fl:hover .fl-label, .fl:focus-visible .fl-label { opacity: 1; transform: translate(-50%, 10px) rotate(-3deg) scale(1); }
.fl:focus-visible { outline: none; }
.fl.is-feat .fl-label { border-style: dashed; border-color: var(--red); color: var(--red); }
@keyframes pop { from { transform: scale(0) rotate(-120deg); } to { transform: scale(1) rotate(0); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

.hero-kicker { position: absolute; left: var(--pad); bottom: 26px; margin: 0; z-index: 4; color: var(--wine); }
.hero-hint { position: absolute; right: var(--pad); top: 76px; margin: 0; font-size: 26px; color: var(--red); transform: rotate(4deg); z-index: 4; }
.hero-scroll { position: absolute; right: var(--pad); bottom: 26px; z-index: 4; text-decoration: none; color: var(--wine); }
.hero-scroll:hover { color: var(--red); }

/* ============================================================
   2. PROJECTES — arxivador horitzontal
   ============================================================ */
.section-title { margin: 0; font-size: clamp(48px, 8.5vw, 132px); letter-spacing: -.055em; line-height: .88; font-weight: 700; }
.section-title sup { font-family: var(--mono); font-size: .17em; letter-spacing: 0; vertical-align: top; font-weight: 400; color: var(--red); margin-left: 6px; }

.shelf { position: relative; background: var(--cream); }
.shelf-sticky { position: sticky; top: 0; height: 100svh; overflow: hidden; display: flex; flex-direction: column; padding: 84px 0 26px; }
.shelf-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 0 var(--pad); }
.shelf-hint { margin: 0; font-size: 26px; color: var(--red); transform: rotate(-2deg); }
.shelf-track {
  flex: 1; display: flex; align-items: center; gap: clamp(22px, 2.6vw, 40px);
  padding: 90px var(--pad) 70px; width: max-content; will-change: transform;
}
.shelf-progress { display: flex; align-items: center; gap: 14px; padding: 0 var(--pad); color: var(--wine); }
.shelf-progress .bar { flex: 1; height: 2px; background: var(--line); position: relative; overflow: hidden; }
.shelf-progress .bar i { position: absolute; inset: 0; background: var(--red); transform-origin: left; transform: scaleX(0); }

.folder {
  --c: var(--red); --k: var(--cream);
  position: relative; flex: none; width: clamp(230px, 21vw, 300px); aspect-ratio: 1 / .86;
  perspective: 900px; text-align: left; z-index: 1;
  transition: transform .55s var(--spring), opacity .4s;
}
.f-back {
  position: absolute; inset: 22px 0 0 0; background: var(--c); border-radius: 4px 14px 14px 14px;
  filter: brightness(.86) saturate(1.05);
}
.f-tab {
  position: absolute; left: 0; top: 0; height: 30px; width: 44%; padding: 7px 14px 0; border-radius: 12px 12px 0 0;
  background: var(--c); filter: brightness(.86) saturate(1.05); color: var(--k);
}
.f-tab::after { content: ""; position: absolute; right: -16px; bottom: 0; width: 18px; height: 22px; background: inherit; clip-path: polygon(0 0, 0 100%, 100% 100%); border-top-right-radius: 8px; }
.f-paper {
  position: absolute; left: 7%; right: 7%; top: 12%; height: 74%; background: var(--paper); padding: 6px; box-shadow: var(--shadow);
  transform: translateY(8px) rotate(-1deg); transition: transform .6s var(--spring);
}
.f-paper img { width: 100%; height: 100%; object-fit: cover; }
.f-paper.second { transform: translateY(14px) rotate(3deg); left: 12%; right: 4%; }
.f-front {
  position: absolute; left: 0; right: 0; bottom: 0; height: 60%; background-color: var(--c); color: var(--k);
  border-radius: 6px 6px 14px 14px; padding: 14px 16px; display: flex; flex-direction: column; justify-content: space-between;
  transform-origin: bottom center; transition: transform .6s var(--spring);
  box-shadow: 0 -1px 0 rgba(255,255,255,.25) inset, 0 10px 24px -14px rgba(60,20,25,.45);
  background-image: var(--dots); background-size: 5px 5px;
}
.f-front .f-top { display: flex; justify-content: space-between; align-items: flex-start; }
.f-num { font-family: var(--sans); font-weight: 700; font-size: 22px; letter-spacing: -.03em; line-height: 1; }
.f-front svg { width: 28px; height: 28px; transition: transform .7s var(--spring); }
.f-type { opacity: .9; }
.f-name {
  position: absolute; left: 50%; top: calc(100% + 18px); transform: translate(-50%, -6px) rotate(-1.5deg); width: max-content; max-width: 130%;
  text-align: center; opacity: 0; transition: opacity .3s, transform .45s var(--spring); pointer-events: none;
}
.f-name b { display: inline-block; font-size: 15px; letter-spacing: -.01em; line-height: 1.1; background: var(--ink); color: var(--cream); padding: 5px 10px 6px; }
.f-name small { display: block; margin-top: 5px; font-size: 10px; color: var(--wine); }
.f-star { position: absolute; right: -14px; top: 6px; z-index: 3; width: 58px; height: 58px; color: var(--red); animation: spin 14s linear infinite; }
.f-star-txt { position: absolute; right: -2px; top: 24px; z-index: 4; font-family: var(--hand); font-weight: 700; font-size: 17px; color: var(--cream); transform: rotate(14deg); pointer-events: none; }

.shelf-track:has(.folder:hover) .folder:not(:hover) { opacity: .55; }
.folder:hover, .folder:focus-visible { transform: translateY(-14px) scale(1.14); z-index: 5; outline: none; }
.folder:hover .f-paper, .folder:focus-visible .f-paper { transform: translateY(-34%) rotate(-3deg); }
.folder:hover .f-paper.second, .folder:focus-visible .f-paper.second { transform: translateY(-22%) rotate(5deg); }
.folder:hover .f-front, .folder:focus-visible .f-front { transform: rotateX(-24deg); }
.folder:hover .f-front svg { transform: rotate(144deg); }
.folder:hover .f-name, .folder:focus-visible .f-name { opacity: 1; transform: translate(-50%, 0) rotate(-1.5deg); }

/* ============================================================
   generic section
   ============================================================ */
.section { padding: clamp(90px, 11vw, 160px) var(--pad); position: relative; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: clamp(30px, 4vw, 60px); }
.reveal { opacity: 0; transform: translateY(40px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
.spin { animation: spin 22s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   3. SOBRE MI + MEMORY BOX
   ============================================================ */
.about { background: var(--blush); }
.about .section-title { color: var(--red); }
.about-intro { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(30px, 6vw, 100px); align-items: start; }
.lead { font-size: clamp(22px, 2.3vw, 32px); line-height: 1.22; letter-spacing: -.02em; margin-top: 0; color: var(--wine); }
.about-text p:not(.lead):not(.five-label) { max-width: 100ch; }
.five { margin-top: 36px; }
.five-label { font-size: 28px; color: var(--red); margin: 0 0 10px; transform: rotate(-2deg); display: inline-block; }
.five-words { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.five-words li {
  font-size: clamp(19px, 2vw, 28px); font-weight: 700; letter-spacing: -.03em; padding: 5px 16px 8px;
  transform: rotate(var(--r)); transition: transform .4s var(--spring);
  background-image: var(--dots); background-size: 5px 5px;
}
.five-words li:hover { transform: rotate(0) scale(1.08); }

.draggable { touch-action: none; user-select: none; -webkit-user-select: none; }
.draggable img { pointer-events: none; -webkit-user-drag: none; }
.tape { position: absolute; width: 80px; height: 24px; background: rgba(251,210,203,.8); box-shadow: 0 1px 2px rgba(0,0,0,.08); z-index: 2; clip-path: polygon(3% 0, 97% 5%, 100% 100%, 0 94%); top: -10px; left: 50%; transform: translateX(-50%) rotate(-4deg); }

/* ============================================================
   4. TRAJECTÒRIA
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none; padding: 13px 22px; border-radius: 999px;
  background: var(--red); color: var(--cream); font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .05em;
  transition: background .3s, transform .4s var(--spring);
}
.btn:hover { background: var(--wine); transform: rotate(-3deg) scale(1.04); }
.exp-grid { display: grid; grid-template-columns: 7fr 5fr; gap: clamp(40px, 6vw, 100px); }
.label { color: var(--muted); font-weight: 400; margin: 0 0 18px; }
.exp-side .label:not(:first-child) { margin-top: 44px; }
.jobs, .edu { list-style: none; margin: 0; padding: 0; }
.job { border-top: 2px solid var(--wine); padding: 26px 0 32px; display: grid; grid-template-columns: 170px 1fr; gap: 20px; }
.job-when { font-family: var(--mono); font-size: 12px; text-transform: uppercase; color: var(--muted); padding-top: 8px; }
.job-where { font-size: clamp(28px, 3.4vw, 46px); font-weight: 700; letter-spacing: -.045em; line-height: 1; margin: 0; }
.job-role { display: inline-block; margin: 12px 0 16px; padding: 4px 12px 5px; font-size: 14px; color: var(--cream); transform: rotate(-1.5deg); background-image: var(--dots); background-size: 5px 5px; }
.job ul { margin: 0; padding: 0; list-style: none; }
.job li { margin-bottom: 8px; padding-left: 24px; position: relative; }
.job li::before { content: ""; position: absolute; left: 0; top: .32em; width: 13px; height: 13px; background: var(--red); -webkit-mask: url(../img/icones/flower.svg) center / contain no-repeat; mask: url(../img/icones/flower.svg) center / contain no-repeat; }
.edu li { border-top: 1px solid var(--line); padding: 14px 0; }
.edu-when { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.edu-what { font-weight: 700; margin: 2px 0; }
.edu-where { font-size: 15px; color: var(--muted); }
.tags { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { border: 1.5px dotted var(--wine); border-radius: 50%; padding: 5px 14px; font-size: 14px; color: var(--wine); }

/* ============================================================
   5. RECULL FOTOGRÀFIC — àlbum de fotos amb pinces
   ============================================================ */
.photos { background: var(--paper); color: var(--ink); padding: clamp(80px, 10vw, 140px) 0 clamp(60px, 8vw, 110px); overflow: hidden; }
/* capçalera igual que a Projectes */
.photos-head { padding: 0 var(--pad); display: flex; flex-direction: column; align-items: flex-start; gap: 24px; margin-bottom: clamp(40px, 5vw, 70px); }
.photos .section-title { font-size: clamp(36px, 5vw, 76px); }
.photos-sub { margin: 0; max-width: 92ch; font-size: 14px; line-height: 1.45; color: var(--wine); }

.album {
  display: grid; grid-auto-flow: column; grid-auto-columns: clamp(230px, 21vw, 300px); column-gap: clamp(22px, 2.6vw, 40px);
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 var(--pad); padding: 0 var(--pad) 10px;
  scrollbar-width: none; cursor: grab; user-select: none; -webkit-user-select: none;
}
.album::-webkit-scrollbar { display: none; }
.album.is-dragging { cursor: grabbing; scroll-snap-type: none; }
.album.is-dragging .snap { pointer-events: none; }
.snap { margin: 0; scroll-snap-align: start; }
.snap-img { aspect-ratio: 4 / 5; overflow: hidden; background: var(--blush); cursor: zoom-in; }
.snap-img img { width: 100%; height: 100%; object-fit: cover; transition: filter .4s; }
.snap:hover .snap-img img { filter: brightness(1.05); }
.snap-word { padding-top: 14px; font-family: var(--sans); font-size: 14px; color: var(--ink); }
.snap-word::first-letter { text-transform: uppercase; }

.album-foot { padding: clamp(30px, 4vw, 50px) var(--pad) 0; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.album-seal { font-family: var(--sans); font-size: 14px; color: var(--ink); padding: 8px 22px; border: 1.5px solid var(--ink); border-radius: 50%; }
.album-nav { display: flex; align-items: center; gap: 16px; color: var(--muted); }
.album-count { color: var(--ink); }
.album-nav button { width: 42px; height: 42px; border-radius: 50%; border: 1.5px solid var(--ink); color: var(--ink); font-size: 16px; transition: background .25s, color .25s, border-color .25s; }
.album-nav button:hover { background: var(--red); border-color: var(--red); color: var(--cream); }
@media (max-width: 760px) {
  .album { grid-auto-columns: 72vw; }
  .album-hint { display: none; }
}

/* ============================================================
   6. CONTACTE
   ============================================================ */
.contact { background: var(--red); color: var(--cream); padding-top: clamp(56px, 6vw, 90px); padding-bottom: clamp(56px, 6vw, 90px); overflow: hidden; }
.contact-title { font-size: clamp(30px, 4vw, 60px); line-height: .95; letter-spacing: -.06em; margin: 0; max-width: none; text-wrap: balance; position: relative; z-index: 1; }
.contact-sub { font-size: 14px; line-height: 1.45; max-width: 92ch; margin: 10px 0 22px; position: relative; z-index: 1; }
.contact-mail {
  font-size: clamp(22px, 3.6vw, 54px); font-weight: 700; letter-spacing: -.045em; text-decoration: none; display: inline-block;
  border-bottom: 4px solid currentColor; line-height: 1.05; word-break: break-all; position: relative; z-index: 1; transition: color .3s;
}
.contact-mail:hover { color: var(--wine); }
.contact-icons { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; position: relative; z-index: 1; }
.contact-icons a { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; line-height: 1.3; text-decoration: none; color: var(--cream); transition: color .3s, transform .45s var(--spring); }
.contact-icons a:hover { color: var(--wine); transform: translateX(3px); }
.contact-icons svg { width: 14px; height: 14px; flex: none; }
.contact-links { list-style: none; padding: 0; margin: 36px 0 0; display: flex; gap: 12px; flex-wrap: wrap; position: relative; z-index: 1; }
.contact-links a { display: inline-block; text-decoration: none; padding: 11px 20px; border: 1.5px solid currentColor; border-radius: 999px; transition: background .3s, color .3s; }
.contact-links a:hover { background: var(--cream); color: var(--red); }
/* mitja flor que omple la meitat esquerra */
.contact-flower { position: absolute; left: 0; top: 0; height: 100%; width: auto; aspect-ratio: 1; translate: -32% 0; color: var(--blush); pointer-events: none; }
.contact-inner { position: relative; z-index: 1; margin-left: 50%; max-width: 620px; }

@media (max-width: 760px) {
  .contact-inner { margin-left: 0; }
  .contact-flower { left: auto; right: 0; top: 24px; height: 180px; translate: 24% 0; }
  .contact-title, .contact-sub { max-width: 62%; }
}

.site-footer { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 22px var(--pad); background: var(--cream); color: var(--ink); }
.site-footer a { text-decoration: none; }

.float-contact {
  position: fixed; right: 20px; bottom: 20px; z-index: 60; display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px 10px 12px; border-radius: 999px; background: var(--red); color: var(--cream); text-decoration: none;
  font-weight: 700; letter-spacing: -.01em; box-shadow: 0 10px 30px -10px rgba(253,57,57,.7);
  transform: translateY(120px); transition: transform .5s var(--spring), background .3s;
}
.float-contact.is-visible { transform: none; }
.float-contact svg { width: 22px; height: 22px; color: var(--blush); transition: transform .7s var(--spring); }
.float-contact:hover { background: var(--wine); }
.float-contact:hover svg { transform: rotate(144deg); }

/* ============================================================
   PROJECT OVERLAY
   ============================================================ */
.project {
  --c: var(--red); --k: var(--cream);
  position: fixed; inset: 0; z-index: 80; background: var(--cream); overflow-y: auto; overscroll-behavior: contain;
  transform: translateY(100%); transition: transform .7s var(--ease); visibility: hidden;
}
.project.is-open { transform: none; visibility: visible; }
.project-bar { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px var(--pad); background: var(--c); color: var(--k); }
.project-close { display: inline-flex; gap: 8px; align-items: center; font: inherit; letter-spacing: inherit; text-transform: inherit; }
.project-close:hover { text-decoration: underline; }
.project-arrows { display: flex; gap: 8px; }
.project-arrows button { width: 36px; height: 36px; border-radius: 50%; border: 1.5px solid currentColor; transition: background .25s, color .25s; }
.project-arrows button:hover { background: var(--k); color: var(--c); }
.p-hero { background-color: var(--c); color: var(--k); padding: clamp(30px, 5vw, 70px) var(--pad) clamp(60px, 8vw, 110px); position: relative; overflow: hidden; background-image: var(--dots); background-size: 5px 5px; }
.p-sub { margin: 0 0 16px; }
.p-title { font-size: clamp(48px, 9.5vw, 160px); letter-spacing: -.06em; line-height: .86; margin: 0; max-width: 13ch; font-weight: 700; position: relative; z-index: 1; }
.p-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: clamp(30px, 5vw, 70px); border-top: 1.5px solid currentColor; padding-top: 16px; max-width: 980px; position: relative; z-index: 1; }
.p-meta dt { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; opacity: .8; }
.p-meta dd { margin: 4px 0 0; font-size: 16px; }
.p-flower { position: absolute; right: -50px; bottom: -70px; width: clamp(180px, 24vw, 360px); color: var(--k); opacity: .9; }
.p-cover { padding: 0 var(--pad); margin-top: calc(-1 * clamp(26px, 4vw, 56px)); position: relative; }
.p-cover img { width: 100%; border-radius: 6px; box-shadow: var(--shadow); cursor: zoom-in; }
.p-text { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 4vw, 60px); padding: clamp(50px, 7vw, 100px) var(--pad); }
.p-text h3 { font-family: var(--hand); font-weight: 700; font-size: 34px; color: var(--red); margin: 0 0 8px; line-height: 1; }
.p-text h3 span { display: inline-block; font-family: var(--mono); font-size: 12px; color: var(--muted); margin-right: 8px; font-weight: 400; vertical-align: middle; }
.p-text p { margin: 0; font-size: 18px; line-height: 1.5; }
.p-words { padding: 0 var(--pad) clamp(40px, 6vw, 80px); display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.p-words .hand { font-size: 28px; margin-right: 10px; color: var(--wine); }
.p-words span.w { background-color: var(--c); color: var(--k); padding: 6px 16px 8px; font-weight: 700; font-size: 18px; transform: rotate(var(--r)); background-image: var(--dots); background-size: 5px 5px; }
.p-gallery { padding: 0 var(--pad) clamp(60px, 8vw, 120px); display: grid; grid-template-columns: 1fr 1fr; gap: clamp(12px, 1.6vw, 22px); }
.p-gallery figure { margin: 0; overflow: hidden; border-radius: 6px; background: var(--blush); cursor: zoom-in; }
.p-gallery figure:nth-child(3n+1) { grid-column: 1 / -1; }
.p-gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.p-gallery figure:hover img { transform: scale(1.025); }
.p-next { display: block; width: 100%; text-align: left; padding: clamp(40px, 6vw, 90px) var(--pad); background: var(--nc); color: var(--nk); transition: padding .5s var(--ease); }
.p-next strong { display: block; font-size: clamp(40px, 7vw, 110px); letter-spacing: -.055em; line-height: .9; margin-top: 10px; }
.p-next:hover { padding-left: calc(var(--pad) + 30px); }

.lightbox { position: fixed; inset: 0; z-index: 120; background: rgba(43,21,25,.94); display: grid; place-items: center; padding: 24px; opacity: 0; visibility: hidden; transition: opacity .3s; cursor: zoom-out; }
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 4px; }
body.no-scroll { overflow: hidden; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (hover: none) {
  .fl-label { opacity: 1; transform: translate(-50%, 6px) rotate(-3deg) scale(.85); padding: 5px 10px; }
  .f-name { opacity: 1; transform: translate(-50%, 0) rotate(-1.5deg); }
}
@media (max-width: 900px) {
  .nav, .clock { display: none; }
  .hero { min-height: 700px; }
  .hp2 > span { margin-left: 6vw; }
  .hero-kicker { display: none; }
  .site-header { grid-template-columns: 1fr auto; }
  .shelf { height: auto !important; }
  .shelf-sticky { position: relative; height: auto; padding: 90px 0 40px; }
  .shelf-track { width: auto; overflow-x: auto; scroll-snap-type: x mandatory; padding: 90px var(--pad) 110px; transform: none !important; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .shelf-track::-webkit-scrollbar { display: none; }
  .folder { scroll-snap-align: center; width: 230px; }
  .shelf-track:has(.folder:hover) .folder:not(:hover) { opacity: 1; }
  .about-intro, .exp-grid { grid-template-columns: 1fr; }
  .p-text { grid-template-columns: 1fr; }
  .p-meta { grid-template-columns: 1fr 1fr; }
  .p-gallery { grid-template-columns: 1fr; }
  .job { grid-template-columns: 1fr; gap: 6px; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .p-meta { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ============================================================
   v5 — portada "Portafoli", capçalera, sobre mi, moodboard, CV
   ============================================================ */
.site-header { display: grid; grid-template-columns: 1fr auto 1fr; }
.site-header .header-right { justify-self: end; }

.hero-text { position: relative; z-index: 2; text-align: center; padding: 0 var(--pad); pointer-events: none; }
.hero-title {
  margin: 0; color: var(--red); font-weight: 700; letter-spacing: -.07em; line-height: .8;
  font-size: clamp(84px, 19vw, 330px); margin-left: -.04em;
  opacity: 0; transform: translateY(40px); animation: rise .9s var(--ease) forwards; --r: 0deg;
}
.hero-sub {
  margin: clamp(18px, 2.4vw, 34px) auto 0; max-width: 40ch; font-size: clamp(16px, 1.45vw, 21px); line-height: 1.4; color: var(--wine);
  opacity: 0; animation: rise .9s var(--ease) .25s forwards;
}

.shelf .section-title { font-size: clamp(36px, 5vw, 76px); }
.shelf-head { margin-bottom: 0; }

/* sobre mi */
.about .section-title { margin-bottom: clamp(30px, 4vw, 60px); }
.about-grid { display: grid; grid-template-columns: minmax(240px, 4fr) 7fr; gap: clamp(30px, 6vw, 100px); align-items: start; }
.about-photo { margin: 0; position: relative; max-width: 420px; }
.about-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: center 25%; background: var(--paper); padding: 10px; box-shadow: var(--shadow); transform: rotate(-2deg); }
.about-flower { position: absolute; right: -34px; top: -34px; width: 92px; color: var(--red); }
.about-text p, .about-text li { font-size: 18px; line-height: 1.55; }
.about-text p { margin: 0 0 1em; max-width: 60ch; }
.about-text .five-label { font-family: var(--sans); font-weight: 700; color: var(--red); margin: 28px 0 10px; transform: none; display: block; }
.five-words li { font-size: 18px; letter-spacing: 0; padding: 4px 12px 5px; }

/* moodboard */
.mood { margin-top: clamp(80px, 10vw, 140px); }
.mood-head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; flex-wrap: wrap; border-bottom: 2px solid var(--wine); padding-bottom: 12px; margin-bottom: 34px; }
.mood-title { margin: 0; font-size: clamp(40px, 6vw, 90px); letter-spacing: -.055em; line-height: .9; color: var(--wine); }
.mood-head .mono { margin: 0; color: var(--wine); }
.mood-grid {
  display: grid; gap: 22px; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-rows: 64px;
  grid-template-areas:
    "a a a a b b b b c c c c"
    "a a a a b b b b c c c c"
    "a a a a d d e e c c c c"
    "a a a a d d e e f f f f"
    "g g g g d d e e f f f f"
    "g g g g d d e e f f f f"
    "g g g g d d h h h i i i"
    "g g g g d d h h h i i i"
    "g g g g . . h h h i i i";
}
.mood-item { margin: 0; position: relative; transform: rotate(var(--r)); transition: transform .45s var(--spring); min-height: 0; }
.mood-item:hover { transform: rotate(0) scale(1.03); z-index: 3; }
.mood-label { position: absolute; left: 0; bottom: -19px; color: var(--wine); font-size: 11px; white-space: nowrap; }
.mood-label::after { content: " ↗"; color: var(--red); }
.m-photo img { width: 100%; height: 100%; object-fit: cover; box-shadow: var(--shadow); border-radius: 2px; }
.m-photo .tape { top: -12px; }
.m-strip .strip { height: 100%; background: var(--paper); padding: 8px 8px 20px; box-shadow: var(--shadow); display: grid; grid-template-rows: repeat(4, 1fr); gap: 6px; }
.m-strip img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.15); min-height: 0; }
.m-palette .swatches { height: 100%; display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; align-items: center; }
.m-palette .swatches span { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.m-palette .swatches i { width: 100%; aspect-ratio: 1; border-radius: 50%; background: var(--sw); box-shadow: 0 6px 14px -8px rgba(60,20,25,.5); transition: transform .4s var(--spring); }
.m-palette .swatches span:hover i { transform: scale(1.12) translateY(-4px); }
.m-palette .swatches small { font-family: var(--mono); font-size: 10px; color: var(--wine); }
.m-flower { display: grid; place-items: center; }
.m-flower .big-flower { width: auto; height: 100%; aspect-ratio: 1; color: var(--red); animation: spin 30s linear infinite; filter: drop-shadow(0 12px 20px rgba(253,57,57,.25)); }
.m-book .book { height: 100%; background: var(--peri); color: var(--wine); padding: 22px 18px 18px 30px; box-shadow: var(--shadow); position: relative; display: flex; flex-direction: column; justify-content: space-between; border-radius: 2px 6px 6px 2px;
  background-image: var(--dots); background-size: 5px 5px; }
.m-book .book-spine { position: absolute; left: 0; top: 0; bottom: 0; width: 12px; background: rgba(43,21,25,.18); }
.m-book .book b { font-size: clamp(20px, 2vw, 30px); letter-spacing: -.04em; line-height: 1; }
.m-book .book small svg { width: 34px; height: 34px; color: var(--red); }
.m-book .book-img { width: 100%; height: 100%; object-fit: cover; box-shadow: var(--shadow); }
.m-stickers .stickers { height: 100%; position: relative; }
.m-stickers .stickers span { position: absolute; height: 64%; aspect-ratio: 1; display: grid; place-items: center; background: var(--bg); color: var(--fg); border-radius: 46% 54% 50% 50% / 54% 46% 54% 46%; box-shadow: 0 0 0 5px var(--paper), var(--shadow); }
.m-stickers .stickers span svg { width: 70%; height: 70%; }
.m-stickers .stickers span:nth-child(1) { left: 6%; top: 0; transform: rotate(-8deg); }
.m-stickers .stickers span:nth-child(2) { right: 6%; top: 8%; height: 52%; transform: rotate(12deg); }
.m-stickers .stickers span:nth-child(3) { left: 38%; bottom: 0; height: 46%; transform: rotate(4deg); }

/* experiència (com el CV) */
.exp-grid > div > .label:not(:first-child) { margin-top: 50px; }
.profile { font-size: 18px; line-height: 1.55; margin: 0; max-width: 62ch; }
.job-role { font-size: 13px; }
.edu-where { font-size: 14px; }
.tags li { font-size: 13px; }

@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-photo { max-width: 300px; margin: 0 auto 10px; }
  .mood-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 70px; gap: 30px 18px;
    grid-template-areas: "a a" "a a" "a a" "b b" "c d" "c d" "e d" "e d" "e f" "e f" "g g" "g g" "h i" "h i" "h i";
  }
}

/* interessos */
.interests { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 10px; }
.interests li { display: inline-flex; align-items: center; gap: 7px; padding: 5px 14px 6px 8px; border: 1.5px solid var(--wine); border-radius: 999px; color: var(--wine); background: rgba(255,253,250,.5); transition: transform .4s var(--spring), background .3s; }
.interests li:hover { transform: translateY(-3px) rotate(-2deg); background: var(--paper); }
.interests li svg { width: 18px; height: 18px; color: var(--ic); transition: transform .7s var(--spring); }
.interests li:hover svg { transform: rotate(144deg); }
.about-text .interests-note { margin: 14px 0 0; }
.about-text .tfg-note { margin-top: 22px; padding-left: 16px; border-left: 3px solid var(--red); font-size: 16px; color: var(--wine); max-width: 56ch; }

/* v13 — intro projectes + nom de carpeta net */
.shelf-intro { margin: 0; max-width: 46ch; font-size: 15px; line-height: 1.45; color: var(--wine); }
.f-name, .folder:hover .f-name, .folder:focus-visible .f-name { transform: translate(-50%, 0); }
.f-name { transform: translate(-50%, -6px); }
.f-name b { background: none; color: var(--ink); padding: 0; font-size: 14px; font-weight: 700; letter-spacing: -.01em; }
.f-name small { margin-top: 3px; }

/* v16 — text de projectes sota el títol, alineat a l'esquerra */
.shelf-head { flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 14px; }

/* v17 — text de projectes més horitzontal i carpetes més a prop */
.shelf-head { gap: 24px; }
.shelf-intro { max-width: 92ch; font-size: 14px; }
@media (min-width: 901px) {
  .shelf-track { align-items: flex-start; padding-top: clamp(70px, 9vh, 110px); }
}

/* v18 — sobre mi: text més petit, foto sense marc, 5 paraules rectes */
.about-text p, .about-text li { font-size: 15px; line-height: 1.6; }
.about-text .tfg-note { font-size: 14px; }
.about-photo img { padding: 0; background: none; box-shadow: none; transform: none; border-radius: 2px; }
.five-words li, .five-words li:hover { transform: none; font-size: 15px; }

/* v19 — foto de sobre mi més petita */
.about-grid { grid-template-columns: 260px 1fr; gap: clamp(30px, 5vw, 80px); }
.about-photo { max-width: 260px; }
.about-flower { width: 64px; right: -24px; top: -24px; }
@media (max-width: 900px) { .about-grid { grid-template-columns: 1fr; } .about-photo { max-width: 220px; margin: 0 0 10px; } }

/* v20 — text de sobre mi més ample */
.about-text p { max-width: 100ch; }
.about-text .tfg-note { max-width: 100ch; }

/* v22 — peu de foto */
.about-cap { margin-top: 12px; font-size: 13px; line-height: 1.4; color: var(--wine); }
.about-cap b { display: block; font-size: 14px; color: var(--ink); }

/* v24 — frase d'entrada al moodboard */
.mood-title { font-size: clamp(20px, 2.1vw, 30px); letter-spacing: -.02em; line-height: 1.25; font-weight: 700; max-width: 52ch; }
.mood-head { border-bottom: 0; padding-bottom: 0; }

/* v25 — moodboard estil Memory Box */
.mood-board { position: relative; height: 800px; background: var(--paper); border-radius: 4px; box-shadow: var(--shadow); margin-top: 10px; }
.mood-item { position: absolute; width: var(--w); transform: rotate(var(--r)); transition: transform .45s var(--spring); }
.mood-item:hover, .mood-item.is-hot { transform: rotate(0) scale(1.06); z-index: 40; }
.mood-item.is-dragging { transform: rotate(0) scale(1.1); transition: none; z-index: 50; }
.mood-item > img { width: 100%; height: auto; filter: drop-shadow(0 10px 14px rgba(60,20,25,.22)); }
.mood-num { position: absolute; left: -24px; top: -4px; font-size: 13px; color: var(--ink); }
.m-strip .strip { background: var(--paper); padding: 7px 7px 26px; display: grid; gap: 6px; box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 14px 24px -12px rgba(60,20,25,.4); }
.m-strip .strip img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.mood-legend { text-align: center; margin-top: 26px; }
.mood-legend-title { display: flex; align-items: center; justify-content: center; gap: 14px; font-size: 14px; color: var(--ink); margin: 0 0 12px; }
.mood-legend-title i { width: 90px; height: 1.5px; background: var(--ink); }
.mood-list { list-style: none; margin: 0 auto; padding: 0; max-width: 900px; display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 18px; font-size: 15px; color: var(--ink); }
.mood-list li:nth-child(even) { font-style: italic; }
.mood-list li { transition: color .2s; }
.mood-list li.is-hot { color: var(--red); }
@media (max-width: 900px) {
}
.m-strip .strip { height: auto; grid-template-rows: none; }
.m-strip .strip img { filter: none; height: auto; min-height: 0; }

/* v28 — moodboard amb jerarquia + bougainvillea penjant */
.mood-title { font-size: 16px; font-weight: 500; letter-spacing: 0; line-height: 1.5; max-width: 70ch; color: var(--wine); }
.mood-head { margin-bottom: 18px; }
.mood-board { height: 760px; overflow: visible; }
.mood-hang { position: absolute; top: -36px; right: -26px; width: clamp(260px, 30vw, 440px); pointer-events: none; z-index: 30; filter: drop-shadow(0 10px 12px rgba(60,20,25,.18)); }
@media (max-width: 900px) { .mood-hang { position: relative; top: auto; right: auto; width: 70%; order: -1; margin: -40px 0 0 auto; } }

/* v29 — mides equilibrades + llibre */
.mood-board { height: 640px; }
.mood-hang { width: clamp(200px, 22vw, 320px); top: -30px; right: -20px; }
.mbook { aspect-ratio: 2 / 3; background: var(--blush); color: var(--wine); padding: 16px 14px; display: flex; flex-direction: column; justify-content: space-between; box-shadow: 4px 6px 0 -1px var(--paper), 4px 6px 0 0 var(--line), 0 14px 24px -12px rgba(60,20,25,.4); border-radius: 2px 4px 4px 2px; }
.mbook b { font-size: 19px; line-height: 1.05; letter-spacing: -.03em; }
.mbook span { font-size: 12px; }

/* v31 — moodboard segons l'esborrany (tauler 16:9 escalable) */
.mood-scroll { overflow: visible; }
.mood-board { height: auto; aspect-ratio: 16 / 9; background: #fff; overflow: hidden; }
.mood-item { width: auto; transform: rotate(var(--r)); }
.mood-item > img { width: 100%; height: auto; display: block; filter: none; }
.mood-item:hover { transform: rotate(var(--r)) scale(1.04); z-index: 60 !important; }
.mood-item.is-dragging { transform: rotate(var(--r)) scale(1.06); z-index: 70 !important; }
.mood-hang { display: none; }
@media (max-width: 900px) {
  .mood-scroll { overflow-x: auto; margin: 0 calc(-1 * var(--pad)); padding: 0 var(--pad) 10px; -webkit-overflow-scrolling: touch; }
  .mood-board { display: block; min-width: 820px; height: auto; padding: 0; }
  .mood-item { position: absolute; touch-action: none; }
}

/* ============================================================
   v33 — MOODBOARD editorial
   ============================================================ */
.mood-board {
  position: relative; aspect-ratio: 16 / 10; height: auto; overflow: visible; border-radius: 3px;
  background-color: #FBF8F3;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45  0 0 0 0 .35  0 0 0 0 .3  0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23p)'/%3E%3C/svg%3E"),
    radial-gradient(120% 90% at 50% 40%, rgba(255,255,255,.7), rgba(240,230,220,.35));
  box-shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 30px 60px -40px rgba(97,40,55,.45);
}
.mi { position: absolute; transform: rotate(var(--r)); transform-origin: center; }
.mi img { display: block; width: 100%; height: auto; }
.mi-print img { background: #fff; padding: 5%; padding-bottom: 7%; box-sizing: border-box; }
.mi-print img, .mi-card img {
  box-shadow: 0 1px 1px rgba(43,21,25,.08), 0 6px 12px -6px rgba(43,21,25,.22), 0 22px 36px -22px rgba(43,21,25,.35);
}
.mi-cut img { filter: drop-shadow(0 2px 2px rgba(43,21,25,.10)) drop-shadow(0 14px 16px rgba(43,21,25,.18)); }
.washi { position: absolute; z-index: 2; width: 42%; height: 16px; background: rgba(251,210,203,.78);
  background-image: repeating-linear-gradient(90deg, rgba(255,255,255,.18) 0 6px, transparent 6px 12px);
  box-shadow: 0 1px 2px rgba(43,21,25,.08); clip-path: polygon(2% 0, 98% 6%, 100% 50%, 98% 94%, 2% 100%, 0 50%); }
.washi-t { top: -8px; left: 29%; transform: rotate(-3deg); }
.washi-tl { top: -4px; left: -10%; transform: rotate(-38deg); width: 34%; }
.washi-tr { top: -4px; right: -10%; transform: rotate(36deg); width: 34%; background-color: rgba(209,193,97,.7); }

/* entrada: els objectes "cauen" sobre la taula */
.mi { opacity: 0; transform: translateY(-18px) rotate(calc(var(--r) + 5deg)) scale(1.04);
  transition: opacity .6s var(--ease), transform .8s var(--spring), filter .3s; transition-delay: calc(var(--i) * 45ms); }
.mood-board.is-in .mi { opacity: 1; transform: rotate(var(--r)); }
.mood-board.is-in .mi:hover { transform: rotate(calc(var(--r) * .4)) translateY(-6px) scale(1.04); transition-delay: 0s; z-index: 80 !important; }
.mood-board.is-in .mi.is-dragging { transform: rotate(0) scale(1.07); transition: none; z-index: 90 !important; }
.mood-board .mood-item { display: none; }
@media (max-width: 900px) {
  .mood-board { min-width: 820px; }
  .washi { height: 11px; }
}
@media (prefers-reduced-motion: reduce) { .mi { opacity: 1; transform: rotate(var(--r)); } }
.mood-board { aspect-ratio: 16 / 9.4; margin-top: 46px; }

/* v35 — moodboard a tot l'ample, fons blanc, sense requadre */
.mood { background: #fff; margin: clamp(70px, 9vw, 130px) calc(-1 * var(--pad)) calc(-1 * clamp(90px, 11vw, 160px)); padding: clamp(40px, 5vw, 70px) var(--pad) clamp(50px, 6vw, 90px); }
.mood-board { background: none; box-shadow: none; border-radius: 0; margin-top: 24px; }
.mi-fade img { -webkit-mask-image: linear-gradient(to right, transparent 0, #000 14%), linear-gradient(to bottom, transparent 0, #000 12%); -webkit-mask-composite: source-in; mask-image: linear-gradient(to right, transparent 0, #000 14%), linear-gradient(to bottom, transparent 0, #000 12%); mask-composite: intersect; }
.mi-text { aspect-ratio: 324 / 180; display: flex; align-items: center; padding: 0 9%; font-weight: 700; letter-spacing: -.045em; line-height: .92; font-size: clamp(20px, 2.9vw, 44px);
  box-shadow: 0 1px 1px rgba(43,21,25,.08), 0 6px 12px -6px rgba(43,21,25,.22), 0 22px 36px -22px rgba(43,21,25,.35); }
@media (max-width: 900px) { .mi-text { font-size: 24px; } }

/* v39 — paper amb relleu + frase sense fons */
.mood {
  background-color: #F4EEE6;
  background-image: linear-gradient(180deg, rgba(255,255,255,.35), rgba(255,255,255,0) 30%, rgba(97,40,55,.04)), url(../img/paper.jpg);
  background-size: 100% 100%, cover; background-position: center;
}
.mood-board { container-type: inline-size; }
.mi-word { font-weight: 900; font-size: 5.2cqw; line-height: .86; letter-spacing: -.05em; text-shadow: 0 1px 0 rgba(255,255,255,.4); }

/* v40 — més gran + fons a triar */
.mood { padding-left: clamp(12px, 2vw, 28px); padding-right: clamp(12px, 2vw, 28px); }
.mood-head { padding: 0 calc(var(--pad) - clamp(12px, 2vw, 28px)); }
.mood-board { aspect-ratio: 16 / 10.4; }
.mi-word { font-size: 6.2cqw; }
.mood[data-bg="estrelles"] { background-image: linear-gradient(rgba(255,255,255,.12), rgba(255,255,255,.12)), url(../img/paper-estrelles.jpg); background-size: 100% 100%, 736px auto; background-repeat: no-repeat, repeat; }
.mood[data-bg="puntes"] { background-image: linear-gradient(rgba(250,246,240,.55), rgba(250,246,240,.55)), url(../img/paper-puntes.jpg); background-size: 100% 100%, 520px auto; background-repeat: no-repeat, repeat; }
.mood[data-bg="llis"] { background-image: none; background-color: #fff; }
.mood-board { aspect-ratio: 16 / 8.85; }
.mood[data-bg="puntes"] { background-size: 100% 100%, cover; background-repeat: no-repeat; }

/* v42 — fons blanc */
.mood, .mood[data-bg] { background: #fff; }
.mi-word { font-size: 7.2cqw; }
.mi-word { font-size: 6.2cqw; }
.mood-board { aspect-ratio: 16 / 7.9; }
.mood-title { font-size: 14px; font-weight: 400; line-height: 1.55; color: var(--wine); max-width: 70ch; }
.mood-title { font-size: 13px; line-height: 1.4; max-width: 95ch; }

/* v53 — moodboard amb menys elements: retrat protagonista i frase d'entrada */
.mood-title { font-size: clamp(19px, 2vw, 28px); font-weight: 500; line-height: 1.3; letter-spacing: -.015em; max-width: 46ch; color: var(--wine); }

/* ============================================================
   v56 — STARTER PACK (estil "memory box")
   ============================================================ */
.starter { background: var(--paper); padding: clamp(70px, 9vw, 130px) var(--pad) clamp(60px, 8vw, 110px); }
.starter-kicker { text-align: center; margin: 0 0 clamp(24px, 4vw, 50px); font-size: 14px; letter-spacing: .12em; color: var(--ink); }
.starter-board { position: relative; max-width: 1180px; margin: 0 auto; aspect-ratio: 16 / 9.6; container-type: inline-size; }
.si { position: absolute; margin: 0; transform: rotate(var(--r)); cursor: pointer;
  opacity: 0; translate: 0 -16px; transition: opacity .6s var(--ease), translate .8s var(--spring), transform .45s var(--spring); transition-delay: calc(var(--i) * 60ms); }
.starter-board.is-in .si { opacity: 1; translate: 0 0; }
.starter-board.is-in .si.is-hot { transform: rotate(calc(var(--r) * .3)) scale(1.05); z-index: 10; transition-delay: 0s; }
.si img { width: 100%; height: auto; filter: drop-shadow(0 2px 2px rgba(43,21,25,.10)) drop-shadow(0 14px 16px rgba(43,21,25,.16)); }
.si-strip img, .si-card img { filter: none; box-shadow: 0 1px 2px rgba(43,21,25,.08), 0 16px 26px -14px rgba(43,21,25,.4); }
.si-num { position: absolute; left: -1.6cqw; top: -.4cqw; font-family: var(--sans); font-size: max(11px, .95cqw); color: var(--ink); transform: rotate(calc(var(--r) * -1)); }

.starter-legend { text-align: center; margin-top: clamp(30px, 4vw, 56px); }
.starter-legend-title { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 0 0 10px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.starter-legend-title i { width: 90px; height: 1.5px; background: var(--ink); }
.starter-list { list-style: none; margin: 0 auto; padding: 0; max-width: 760px; display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 14px; font-family: var(--sans); font-size: 13px; }
.starter-list li { cursor: default; transition: color .2s; }
.starter-list li.is-hot { color: var(--red); }

@media (max-width: 760px) {
  .starter-board { aspect-ratio: auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px 14px; align-items: center; }
  .si { position: relative; left: auto !important; top: auto !important; right: auto; width: auto !important; }
  .si img { max-height: 92px; width: auto; max-width: 86%; margin: 0 auto; }
  .si-strip { grid-row: span 2; }
  .si-strip img, .si-card img { max-height: 200px; }
  .si-card img { max-height: 130px; }
  .si-num { left: 0; top: 0; font-size: 10px; }
  .starter-list { font-size: 12px; gap: 2px 10px; }
}
@media (prefers-reduced-motion: reduce) { .si { opacity: 1; translate: 0 0; } }

/* v71 — experiència unificada amb "sobre mi" */
.profile { font-size: 15px; line-height: 1.6; max-width: 100ch; }
.job li { font-size: 14px; line-height: 1.55; margin-bottom: 6px; }
.job li::before { top: .3em; width: 11px; height: 11px; }
.job-role { transform: none; }
.edu-what { font-size: 15px; }
.exp-extra { display: grid; grid-template-columns: 7fr 5fr; gap: clamp(40px, 6vw, 100px); margin-top: clamp(50px, 6vw, 80px); padding-top: 30px; border-top: 2px solid var(--wine); }
@media (max-width: 900px) { .exp-extra { grid-template-columns: 1fr; gap: 36px; } }

/* v73 — perfil en dos paràgrafs + formació, experiència a tot l'ample, i a sota idiomes / competències / eines */
.profile-wrap .profile + .profile { margin-top: 1em; }
.exp-work { margin-top: clamp(80px, 9vw, 130px); }
.exp-work .job { grid-template-columns: 1fr; }
.job-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 16px; margin: 12px 0 16px; }
.job-meta .job-role { margin: 0; }
.job-meta .job-when { padding: 0; }
.exp-extra { grid-template-columns: 1fr 2fr 1.5fr; border-top: 0; padding-top: 0; margin-top: clamp(70px, 8vw, 110px); }
@media (max-width: 900px) { .exp-extra { grid-template-columns: 1fr; } }
@media (min-width: 901px) { .exp-grid { grid-template-columns: 1fr 1fr; } }
.profile-wrap .profile + .profile { margin-top: 1.2em; }
/* v76 — punts en dues columnes (cap punt es parteix entre columnes) */
.exp-work .job ul { display: grid; grid-template-columns: 1fr 1fr; gap: 6px clamp(30px, 4vw, 60px); }
.exp-work .job li { margin: 0; }
@media (max-width: 900px) { .exp-work .job ul { grid-template-columns: 1fr; } }

/* v78 — títols amb més aire entre lletres (la "r" ja no es menja la "i") */
.hero-title { letter-spacing: -.03em; }
.hero-title .kern-r { margin-right: .05em; }
.section-title, .contact-title, .p-title, .p-next strong { letter-spacing: -.035em; }
.job-where { letter-spacing: -.025em; }

/* competències i eines: text editorial separat per barres; idiomes amb barra de nivell */
.exp-extra { margin-top: clamp(40px, 4vw, 56px); }
@media (min-width: 901px) { .exp-extra { grid-template-columns: minmax(0, 1fr) minmax(0, 2.2fr); row-gap: 40px; } }
.exp-extra > div:nth-child(3) { grid-column: 1 / -1; }
.exp-extra .tags { display: block; font-size: 15px; line-height: 1.6; color: var(--ink); }
.exp-extra .tags li { display: inline; border: 0; border-radius: 0; padding: 0; font-size: inherit; color: inherit; }
.exp-extra .tags li:not(:last-child)::after { content: "\00a0/ "; color: var(--red); white-space: normal; }
#langs li { display: grid; grid-template-columns: 80px minmax(0, 180px); align-items: center; gap: 14px; }
#langs li::after { content: none; }
#langs li + li { margin-top: 10px; }
.lang-bar { display: block; height: 10px; background: var(--line); }
.lang-bar b { display: block; height: 100%; background: var(--wine); }
/* v87 — data a sota de l'etiqueta del càrrec */
.job-meta { flex-direction: column; align-items: flex-start; gap: 8px; }

/* v120 — mini frase de les 5 paraules */
.five-words li.has-note { cursor: help; outline: none; }
.five-words li.has-note:focus-visible { box-shadow: 0 0 0 2px var(--cream), 0 0 0 4px var(--wine); }
.about-text .five-note { margin: 16px 0 0; min-height: 1.45em; font-size: 13px; line-height: 1.45; color: var(--wine); font-style: italic;
  opacity: 0; translate: 0 4px; transition: opacity .3s, translate .4s var(--ease); }
.five-note.is-on { opacity: 1; translate: 0 0; }

/* v128 — projecte en format pòster: capçalera compacta, responsabilitats | descripció, i els pòsters a sota en files */
.pp-hero { background-image: none; padding: clamp(28px, 4vw, 50px) var(--pad) clamp(30px, 4vw, 50px); }
.pp-hero .p-sub { font-size: 11px; margin-bottom: 12px; }
.pp-hero .p-title { font-size: clamp(34px, 4.6vw, 68px); max-width: none; line-height: .95; }
.pp-hero .p-meta { margin-top: clamp(22px, 3vw, 36px); padding-top: 12px; }
.pp-hero .p-meta dd { font-size: 14px; }

.pp { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(30px, 6vw, 100px); padding: clamp(40px, 6vw, 80px) var(--pad) clamp(40px, 5vw, 70px); align-items: start; }
.pp-intro { margin: 0; font-size: 15px; line-height: 1.6; }
.pp-did { font-family: var(--sans); font-weight: 700; font-size: 15px; letter-spacing: -.01em; color: var(--c); margin: 0 0 10px; line-height: 1.2; }
.pp-tasks { list-style: none; margin: 0; padding: 0; border-top: 1.5px solid var(--ink); }
.pp-tasks li { position: relative; padding: 10px 0 10px 16px; border-bottom: 1px solid var(--line); font-size: 14px; line-height: 1.4; }
.pp-tasks li::before { content: ""; position: absolute; left: 0; top: calc(10px + .7em - 2.5px); width: 5px; height: 5px; border-radius: 50%; background: var(--c); }

/* pila de cartells: la secció és alta i la pila es queda fixa mentre baixes */
.pile { height: calc((var(--n) - 1) * 65vh + 100vh); position: relative; }
.pile-sticky { position: sticky; top: 64px; height: calc(100vh - 64px); display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: center; gap: clamp(20px, 4vw, 60px); padding: 0 var(--pad); overflow: hidden; }
.pile-stack { position: relative; height: 100%; }
.pile-card { position: absolute; left: 50%; top: 50%; margin: 0; cursor: zoom-in; will-change: transform; transform: translate(-50%, -50%); }
.pile-card img { display: block; height: min(calc(100vh - 160px), 760px); width: auto; max-width: none; box-shadow: 0 2px 4px rgba(60,20,25,.1), 0 24px 50px -20px rgba(60,20,25,.45); background: #fff; }
.pile-info { max-width: 380px; }
.pile-info.is-swap > :not(.pile-bar):not(.pile-hint) { animation: pileIn .5s var(--ease); }
@keyframes pileIn { from { opacity: 0; translate: 0 10px; } to { opacity: 1; translate: 0 0; } }
.pile-count { margin: 0 0 14px; font-size: 12px; color: var(--muted); letter-spacing: .06em; }
.pile-count b { color: var(--c); font-weight: 500; }
.pile-title { margin: 0; font-size: clamp(22px, 2.2vw, 30px); line-height: 1.1; letter-spacing: -.02em; font-weight: 700; }
.pile-sub { margin: 10px 0 0; font-size: 15px; line-height: 1.5; color: var(--muted); min-height: 3em; }
.pile-bar { display: block; height: 2px; background: var(--line); margin-top: 26px; overflow: hidden; }
.pile-bar i { display: block; height: 100%; background: var(--c); transform-origin: left; transform: scaleX(0); }
.pile-hint { margin: 12px 0 0; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }

@media (max-width: 900px) {
  .pp { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .pile-sticky { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; align-items: stretch; padding-bottom: 24px; }
  .pile-card img { height: min(calc(100vh - 330px), 620px); }
  .pile-info { max-width: none; }
  .pile-sub { min-height: 0; }
}
