
@font-face {
  font-family: "Bricolage";
  src: url("../fonts/bricolage.woff2") format("woff2");
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-display: swap;
}

:root {
  --peach: #F4DCCD;
  --petal: #FBEDE4;
  --rose: #D98A90;
  --rose-soft: #EBB9B2;
  --mauve: #7A4A4C;
  --cocoa: #2E1719;

  --bg: var(--peach);
  --fg: var(--cocoa);
  --muted: var(--mauve);
  --line: color-mix(in srgb, var(--fg) 22%, transparent);

  --pad: clamp(20px, 4vw, 56px);
  --ease: cubic-bezier(.22, 1, .36, 1);
}
body.dark, body.viewing {
  --bg: var(--cocoa);
  --fg: var(--petal);
  --muted: var(--rose-soft);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html.lock { overflow: hidden; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Bricolage", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.55;
  overflow-x: hidden;
  transition: background-color .9s var(--ease), color .9s var(--ease);
}

/* soft paper grain, sits over everything but never blocks clicks */
body::after {
  content: "";
  position: fixed; inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: .09;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: left; }
h1, h2, h3, p, ul { margin: 0; padding: 0; }
ul { list-style: none; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; border-radius: 4px; }

/* ---------- load curtain (one orchestrated moment) ---------- */
.curtain { display: none; }
.js .curtain {
  display: block;
  position: fixed; inset: 0; z-index: 200;
  background: var(--cocoa);
  pointer-events: none;
  transition: transform 1.1s var(--ease);
}
.js.ready .curtain { transform: translateY(-101%); }

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 40;
  display: flex; justify-content: space-between; align-items: center;
  padding: 22px var(--pad);
  color: var(--fg);
  transition: color .9s var(--ease);
  pointer-events: none;
}
.nav > * { pointer-events: auto; }
.nav { isolation: isolate; }
.nav::before {
  content: ""; position: absolute; inset: 0 0 -26px; z-index: -1;
  background: var(--bg);
  -webkit-mask-image: linear-gradient(#000 55%, transparent);
  mask-image: linear-gradient(#000 55%, transparent);
  transition: background-color .9s var(--ease);
}
.nav-home { font-weight: 700; text-decoration: none; letter-spacing: -.01em; }
.nav-links { display: flex; gap: clamp(18px, 3vw, 36px); }
.nav a, .links a {
  text-decoration: none;
  padding-bottom: 3px;
  background: linear-gradient(currentColor, currentColor) left bottom / 0 1.5px no-repeat;
  transition: background-size .45s var(--ease);
}
.nav a:hover, .links a:hover { background-size: 100% 1.5px; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  padding: 120px var(--pad) clamp(28px, 5vw, 56px);
  display: flex; flex-direction: column; justify-content: flex-end;
  gap: clamp(28px, 5vw, 64px);
}
.name {
  font-size: clamp(4rem, 20vw, 21rem);
  line-height: .8;
  letter-spacing: -.03em;
  font-weight: 500;
  font-variation-settings: "wght" 420, "wdth" 86;
}
.name .line { display: block; overflow: hidden; padding: .07em 0; margin: -.07em 0; white-space: nowrap; }
.name .line + .line { margin-left: clamp(1.25rem, 10vw, 12rem); }
.ch { display: inline-block; will-change: font-variation-settings; }
.js .ch { transform: translateY(108%); transition: transform 1.2s var(--ease); transition-delay: calc(var(--i) * 60ms + 450ms); }
.js.ready .ch { transform: none; }

.hero-foot {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 46ch);
  gap: 32px clamp(24px, 6vw, 96px);
  align-items: end;
}
.roles {
  height: 1.25em; overflow: hidden;
  font-size: clamp(1.4rem, 2.6vw, 2.2rem);
  font-weight: 600; letter-spacing: -.02em; line-height: 1.25;
}
.roles-track { display: block; transition: transform .7s var(--ease); }
.roles-track span { display: block; height: 1.25em; white-space: nowrap; }
.summary { color: var(--muted); font-size: 1.125rem; text-wrap: pretty; }


/* ---------- hero art: floating screenshot cards ---------- */
.art {
  position: absolute; right: var(--pad); top: 96px;
  width: min(42vw, 600px); height: min(58svh, 530px);
  pointer-events: none;
}
.card {
  position: absolute; margin: 0; padding: 7px;
  background: var(--petal);
  border-radius: 22px;
  box-shadow: 0 30px 60px -24px rgba(46, 23, 25, .5);
  translate: var(--px, 0px) var(--py, 0px);
  rotate: var(--r);
}
.card img { display: block; width: 100%; height: auto; border-radius: 16px; }
.c1 { --r: 5deg;  --k: 0; right: 3%; top: 0; width: 38%; }
.c2 { --r: -6deg; --k: 1; left: 0; top: 32%; width: 62%; }
.c3 { --r: 3deg;  --k: 2; left: 24%; bottom: 0; width: 58%; }
.js .card { opacity: 0; scale: .8; transition: opacity .9s var(--ease), scale 1.2s var(--ease); transition-delay: calc(var(--k) * 150ms + 1000ms); }
.js.ready .card { opacity: 1; scale: 1; animation: bob 6s ease-in-out infinite; animation-delay: calc(var(--k) * -2s); }
@keyframes bob { 50% { transform: translateY(-10px); } }
@media (max-width: 900px) { .art { display: none; } }

/* ---------- rose band ---------- */
.band { overflow: hidden; padding: 34px 0; }
.marquee {
  background: var(--rose); color: var(--cocoa);
  transform: rotate(-1.6deg) scale(1.04);
  padding: 16px 0; overflow: hidden;
}
.marquee-track {
  display: flex; align-items: center; gap: 36px; width: max-content;
  font-size: clamp(1.8rem, 4.2vw, 3.6rem);
  font-weight: 700; letter-spacing: -.03em; line-height: 1.1; white-space: nowrap;
  will-change: transform;
}
.marquee-track i { width: .3em; height: .3em; border-radius: 50%; background: var(--cocoa); flex: none; }

/* ---------- screenshot fan under each project title ---------- */
.piece-main { min-width: 0; }
.fan { display: flex; margin-top: 26px; padding-left: 6px; }
.fan img {
  width: 62px; height: 82px; object-fit: cover; object-position: top;
  border-radius: 12px; border: 3px solid var(--petal); background: var(--petal);
  margin-left: -20px;
  rotate: calc((var(--i) - 2) * 4deg);
  transition: margin .6s var(--ease), translate .6s var(--ease), rotate .6s var(--ease);
}
.fan img:first-child { margin-left: 0; }
.piece:hover .fan img, .piece:focus-within .fan img { margin-left: 10px; rotate: 0deg; translate: 0 calc(var(--i) * -3px); }
.piece:hover .fan img:first-child, .piece:focus-within .fan img:first-child { margin-left: 0; }

/* ---------- shared section bits ---------- */
.sec { padding: clamp(64px, 9vw, 130px) var(--pad); }
.sec-title {
  font-size: clamp(1.5rem, 2.4vw, 2.1rem);
  font-weight: 600; letter-spacing: -.02em;
  margin-bottom: clamp(28px, 4vw, 56px);
}

/* ---------- work ---------- */
.work-list { border-bottom: 1px solid var(--line); }
.piece {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 28px clamp(24px, 4vw, 64px);
  align-items: end;
  padding: clamp(28px, 4vw, 52px) 0;
  border-top: 1px solid var(--line);
  transition: opacity .5s var(--ease);
}
.piece[data-has-shots="true"] { cursor: pointer; }
.work-list:has(.piece:hover) .piece:not(:hover),
.work-list:has(.piece:focus-within) .piece:not(:focus-within) { opacity: .28; }

.piece-title {
  font-size: clamp(2.2rem, 8vw, 8rem);
  line-height: .95;
  letter-spacing: -.03em;
  font-weight: 450;
  font-stretch: 82%;
  transition: font-weight .6s var(--ease), transform .6s var(--ease);
}
.piece:hover .piece-title, .piece:focus-within .piece-title { font-weight: 800; transform: translateX(.12em); }
.piece-open { display: block; width: 100%; font: inherit; letter-spacing: inherit; }
.tl { display: block; }

.piece-desc { color: var(--muted); margin-bottom: 18px; max-width: 46ch; text-wrap: pretty; }
.piece-tech { display: flex; flex-wrap: wrap; gap: 4px 16px; font-weight: 600; margin-bottom: 18px; }
.piece-links { display: flex; flex-wrap: wrap; gap: 6px 22px; align-items: center; }
.piece-count { color: var(--muted); }

/* floating screenshot that trails the cursor */
.peek {
  position: fixed; left: 0; top: 0; z-index: 30;
  pointer-events: none;
  opacity: 0;
  transition: opacity .3s var(--ease);
}
.peek.on { opacity: 1; }
.peek-in { transform: scale(.7); transition: transform .5s var(--ease); transform-origin: 0 50%; }
.peek.on .peek-in { transform: scale(1); }
.peek img {
  display: block;
  max-width: 280px; max-height: 340px; width: auto; height: auto;
  border-radius: 14px;
  box-shadow: 0 24px 50px -18px rgba(46, 23, 25, .45);
  background: var(--petal);
}

/* cursor follower */
.follow { position: fixed; left: 0; top: 0; z-index: 300; pointer-events: none; opacity: 0; transition: opacity .3s; }
.follow.on { opacity: 1; }
.follow-in {
  width: 14px; height: 14px; margin: -7px 0 0 -7px;
  border-radius: 50%;
  background: var(--fg);
  display: grid; place-items: center;
  color: var(--bg); font-size: .9rem; font-weight: 600;
  transition: width .45s var(--ease), height .45s var(--ease), margin .45s var(--ease), background-color .9s var(--ease);
}
.follow-in span { opacity: 0; transition: opacity .2s; }
.follow.big .follow-in { width: 84px; height: 84px; margin: -42px 0 0 -42px; background: var(--rose); color: var(--cocoa); }
.follow.big .follow-in span { opacity: 1; transition-delay: .15s; }
@media (hover: none), (pointer: coarse) { .follow, .peek { display: none; } }

/* ---------- skills ---------- */
.hint { color: var(--muted); margin: -36px 0 28px; }
.board {
  position: relative;
  display: flex; flex-wrap: wrap; align-content: flex-start; gap: 24px;
  padding: clamp(20px, 3vw, 40px) clamp(20px, 3vw, 40px) 130px;
  min-height: 0;
  border-radius: 32px;
  background: color-mix(in srgb, var(--rose-soft) 45%, transparent);
}
.sticker {
  --x: 0px; --y: 0px; --rot: 0deg;
  translate: var(--x) var(--y);
  rotate: var(--rot);
  flex: 1 1 280px; max-width: 400px;
  padding: 30px 34px 34px;
  user-select: none; -webkit-user-select: none;
  touch-action: pan-y;
  transition: rotate .5s var(--ease), scale .35s var(--ease);
}
.sticker h3 { font-size: 1.5rem; line-height: 1.1; letter-spacing: -.02em; font-weight: 700; margin-bottom: 8px; }
.sticker p { font-size: .98rem; opacity: .8; }
.sticker:hover { scale: 1.04; }
.board.can-drag .sticker { cursor: grab; touch-action: none; }
.sticker.grab { cursor: grabbing; scale: 1.06; transition: scale .35s var(--ease); }

.st1 { background: var(--petal); color: var(--cocoa); border-radius: 44px; }
.st2 { background: var(--cocoa); color: var(--petal); border-radius: 56% 44% 48% 52% / 50% 54% 46% 50%; padding: 40px 42px; }
.st3 { background: var(--rose); color: var(--cocoa); border-radius: 24px; }
.st4 { background: var(--petal); color: var(--cocoa); border-radius: 46% 54% 52% 48% / 56% 46% 54% 44%; padding: 40px 42px; }
.st5 { background: var(--rose-soft); color: var(--cocoa); border-radius: 44px; }
.st6 { background: var(--cocoa); color: var(--petal); border-radius: 24px; }

/* ---------- contact ---------- */
.contact { padding-bottom: 36px; }
.mail {
  display: inline-block; position: relative;
  font-size: clamp(1.2rem, 5.6vw, 6rem);
  font-weight: 650; font-stretch: 88%;
  letter-spacing: -.035em; line-height: 1.05;
  text-decoration: none;
  overflow-wrap: anywhere;
  margin-bottom: clamp(28px, 4vw, 48px);
}
@media (min-width: 700px) {
  .mail { color: color-mix(in srgb, var(--fg) 30%, transparent); transition: color .9s var(--ease); }
  .mail::before {
    content: attr(data-text);
    position: absolute; inset: 0;
    color: var(--fg);
    clip-path: inset(0 100% 0 0);
    transition: clip-path .8s var(--ease);
  }
  .mail:hover::before, .mail:focus-visible::before { clip-path: inset(0); }
}
.links { display: flex; flex-wrap: wrap; gap: 10px 32px; font-weight: 600; font-size: 1.125rem; }
.links button {
  padding-bottom: 3px;
  background: linear-gradient(currentColor, currentColor) left bottom / 0 1.5px no-repeat;
  transition: background-size .45s var(--ease);
  font-weight: 600;
}
.links button:hover { background-size: 100% 1.5px; }
.foot { margin-top: clamp(80px, 12vw, 160px); color: var(--muted); font-size: .95rem; }

/* ---------- viewer ---------- */
.viewer {
  position: fixed; inset: 0; z-index: 150;
  background: var(--cocoa); color: var(--petal);
  display: flex; flex-direction: column;
  clip-path: inset(100% 0 0 0);
  visibility: hidden;
  transition: clip-path .8s var(--ease), visibility 0s linear .8s;
}
.viewer.open { clip-path: inset(0); visibility: visible; transition-delay: 0s; }
.v-head {
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  padding: 20px var(--pad);
}
.v-head h2 { font-size: clamp(1.4rem, 2.4vw, 2rem); letter-spacing: -.02em; font-weight: 700; }
.v-close, .v-nav button {
  border: 1.5px solid currentColor; border-radius: 999px;
  padding: 9px 22px; font-weight: 600;
  background: linear-gradient(var(--petal), var(--petal)) left / 0 100% no-repeat;
  transition: background-size .45s var(--ease), color .45s var(--ease);
}
.v-close:hover, .v-nav button:hover { background-size: 100% 100%; color: var(--cocoa); }
.v-body {
  flex: 1; min-height: 0;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
  gap: clamp(20px, 4vw, 56px);
  padding: 0 var(--pad);
}
.v-stage { position: relative; min-height: 0; overflow: hidden; border-radius: 16px; touch-action: pan-y; }
.v-stage img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain;
  transition: clip-path .9s var(--ease), transform .9s var(--ease);
}
.v-side { display: flex; flex-direction: column; justify-content: flex-end; gap: 18px; min-height: 0; padding-bottom: 8px; }
.v-count { color: var(--rose-soft); font-weight: 600; }
.v-desc { font-size: 1.1rem; line-height: 1.6; max-width: 46ch; overflow-y: auto; transition: opacity .3s, transform .3s var(--ease); text-wrap: pretty; }
.v-desc.swap { opacity: 0; transform: translateY(8px); }
.v-nav { display: flex; gap: 12px; }
.v-thumbs { display: flex; gap: 10px; padding: 18px var(--pad) 22px; overflow-x: auto; scrollbar-width: none; }
.v-thumbs::-webkit-scrollbar { display: none; }
.v-thumbs button {
  flex: 0 0 auto; width: 52px; height: 52px; border-radius: 10px; overflow: hidden;
  opacity: .4; transition: opacity .3s, outline-offset .3s var(--ease);
  outline: 2px solid transparent; outline-offset: 0;
}
.v-thumbs button:hover { opacity: .8; }
.v-thumbs button.on { opacity: 1; outline-color: var(--petal); outline-offset: 3px; }
.v-thumbs img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }

/* ---------- responsive ---------- */
@media (max-width: 800px) {
  .name { font-size: clamp(4rem, 26vw, 12rem); }
  .name .line + .line { margin-left: 6vw; }
  .hero-foot { grid-template-columns: 1fr; }
  .piece { grid-template-columns: 1fr; }
  .piece-title { font-size: clamp(2.3rem, 11vw, 3.6rem); }
  .tl { display: inline; }
  .board { min-height: 0; padding-bottom: clamp(20px, 3vw, 40px); }
  .sticker { flex: 1 1 100%; max-width: none; }
  .v-body { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; gap: 16px; }
  .v-side { max-height: 36svh; }
  .v-thumbs button { width: 44px; height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; transition-delay: 0s !important; animation: none !important; }
  .js .curtain { display: none; }
}
