@import url('https://fonts.googleapis.com/css2?family=Bai+Jamjuree:wght@400;500;600&display=swap');
:root {
  --bg: #ffffff;
  --muted: #b481a9;
  --cream: #fefef2;
  --plum: #7a0060;
  --sage: #d6deb4;
  --grey: #888;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
button, input, select, textarea { letter-spacing: inherit; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  font-family: 'Urbanist', 'Quicksand', sans-serif;
  letter-spacing: .04em;
  color: var(--plum);
  overflow-x: hidden;
}

/* Fixed-size design canvas, scaled to viewport by script */
.stage { position: relative; width: 100%; overflow: hidden; }
.canvas {
  position: absolute;
  top: 0;
  left: 50%;
  width: 1440px;
  height: 2486px;
  transform: translateX(-50%) scale(var(--s, 1));
  transform-origin: top center;
  overflow: hidden;
  background: var(--bg);
}

.canvas > * { position: absolute; }
.canvas img { display: block; max-width: none; }

.cover { object-fit: cover; }

.rot { display: flex; align-items: center; justify-content: center; }
.rot img { flex: none; object-fit: cover; }

.crop { overflow: hidden; }
.crop img { position: absolute; }

.shelf { background: var(--sage); }

.masked { -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; mask-mode: alpha; }

.title img { display: block; }

.intro {
  width: 601px;
  font-weight: 500;
  font-size: 16px;
  line-height: normal;
}

.tag {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 12px;
  color: #8a8a8a;
}

.btn-label {
  font-size: 16px;
  color: #fff;
  text-align: center;
  pointer-events: none;
}

.small { font-size: 12px; color: var(--grey); white-space: nowrap; }
.back-top { text-decoration: none; }
.back-top:hover { color: var(--plum); }

.viewall-label {
  width: 93px;
  font-size: 20px;
  line-height: normal;
  pointer-events: none;
}

.anchor { left: 0; width: 1px; height: 1px; }

/* Transparent clickable areas over the artwork */
.hit {
  display: block;
  border-radius: 24px;
  transition: background-color .2s;
}
.hit:hover { background-color: rgba(122, 0, 96, .06); }
.hit:focus-visible { outline: 3px solid var(--plum); outline-offset: 4px; }

/* Text helpers for inner pages */
.t { font-weight: 400; color: var(--plum); line-height: normal; white-space: nowrap; }
.olive { color: #bdaf1b; }
.b { font-weight: 700; }
.m { font-weight: 500; }
.para { white-space: normal; width: 400px; font-size: 14px; line-height: 1.55; }
.title60 { font-size: 60px; font-weight: 700; line-height: 1; }
.right { text-align: right; }
@font-face { font-family: 'Torsilp Banyai'; src: url(assets/fonts/torsilp-banyai.ttf) format('truetype'); font-display: swap; }
.thai { font-family: 'IBM Plex Sans Thai', sans-serif; }
/* Layer After Layer sets its Thai in Torsilp Banyai */
.canvas:has(.la-mark) .thai { font-family: 'Torsilp Banyai', 'IBM Plex Sans Thai', sans-serif; letter-spacing: 0; }
a.t { text-decoration: none; }
a.t:hover { text-decoration: underline; text-underline-offset: 3px; }
.label { font-size: 17px; font-weight: 500; }
.pc { border-radius: 4px; box-shadow: 0 10px 4.1px -8px rgba(26, 26, 51, .22); }
.masked .fill { position: absolute; inset: 0; overflow: hidden; }
.masked .fill img { position: absolute; }

/* All Work: project boxes */
.proj { transition: left .7s cubic-bezier(.22,1,.36,1), top .7s cubic-bezier(.22,1,.36,1), opacity .45s ease, transform .45s ease; }
.proj > * { position: absolute; }
.proj .masked, .proj .crop, .proj .rot, .proj > img { pointer-events: none; }
.proj .hit { inset: 0; }
.proj.is-hidden { opacity: 0; transform: scale(.96); pointer-events: none; }
.proj.is-hidden .hit { pointer-events: none; }

/* All Work: pinned sidebar (scaled to match the page by work.js) */
.side {
  position: fixed;
  top: 0;
  left: 0;
  width: 450px;
  transform-origin: 0 0;
  pointer-events: none;
  z-index: 5;
}
.side > * { position: absolute; }
.side img { display: block; max-width: none; }
.side button {
  pointer-events: auto;
  background: none;
  border: 0;
  padding: 0;
  font-family: inherit;
  letter-spacing: inherit;
  font-size: 16px;
  cursor: pointer;
  text-align: left;
}
/* All Work: one hover system — bold + underline (sidebar, title and project names) */
.side .cat:hover, .side .cat:focus-visible, .side .cat[aria-pressed="true"], .side .cat-title:hover, .side .cat-title:focus-visible {
  font-weight: 700; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1.5px;
}
.side button:focus-visible { outline: 2px solid var(--plum); outline-offset: 3px; border-radius: 3px; }
.side-icon { transition: transform .2s; }
.side-icon.pop { animation: pop .5s ease-out; }
@keyframes pop { 0% { transform: none; } 35% { transform: translateY(-5px) scale(1.12) rotate(-4deg); } 70% { transform: translateY(1px) scale(.97); } 100% { transform: none; } }
#pile { left: 0; top: 0; pointer-events: none; }

/* About page CV columns */
.cv { display: flex; flex-direction: column; gap: 20px; align-items: flex-start; }
.cv h2 { font-size: 30px; font-weight: 700; color: var(--plum); line-height: normal; }
.cv .item { display: flex; flex-direction: column; gap: 4px; }
.cv .yr { font-size: 14px; font-weight: 700; color: #bdaf1b; }
.cv .name { font-size: 19px; font-weight: 700; line-height: 1.3; }
.cv .d { font-size: 15px; line-height: 1.5; }
.cv .bar { width: 48px; height: 4px; border-radius: 2px; background: #bdaf1b; }
.cv ul { list-style: none; display: flex; flex-direction: column; gap: 8px; font-size: 17px; line-height: 1.4; }

/* Header: fixed to the window, scaled by site.js */
.header {
  position: fixed;
  left: 0;
  top: 0;
  width: 1440px;
  height: 76px;
  background: var(--bg);
  transform-origin: 0 0;
  z-index: 20;
}
.logo { position: absolute; left: 37px; top: 17px; width: 86px; height: 42.6px; transition: transform .25s; }
.logo img { display: block; width: 100%; height: 100%; }
.logo:hover { transform: rotate(-3deg) scale(1.04); }
.nav-item { position: absolute; top: 23.9px; }
.nav-link {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 83.2px;
  height: 28.2px;
  font-weight: 500;
  font-size: 16px;
  color: var(--plum);
  text-decoration: none;
  white-space: nowrap;
}
.nav-link span { position: relative; transition: color .2s; }
.nav-link .pill {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transform: scale(.85);
  transition: opacity .2s, transform .25s cubic-bezier(.3,1.5,.5,1);
}
.nav-link:hover .pill, .nav-link:focus-visible .pill, .nav-link.active .pill,
.has-menu:hover .nav-link .pill, .has-menu:focus-within .nav-link .pill { opacity: 1; transform: none; }
.nav-link:hover span, .nav-link:focus-visible span, .nav-link.active span,
.has-menu:hover .nav-link span, .has-menu:focus-within .nav-link span { color: #f5ffcc; }
.nav-link:focus-visible { outline: none; }

/* Work menu */
.menu {
  position: absolute;
  left: -52px;
  top: 28px;
  width: 300px;
  padding-top: 10px; /* invisible bridge so the pointer can travel from the pill */
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .18s, transform .2s, visibility 0s .2s;
}
.menu::before { /* the card */
  content: '';
  position: absolute;
  inset: 10px 0 0 0;
  background: #fff;
  border-radius: 11px;
  box-shadow: 0 10px 22px rgba(60, 40, 60, .14);
}
.menu::after { /* hand-drawn outline */
  content: '';
  position: absolute;
  inset: 10px 0 0 0;
  border: 1.5px solid #cfcfcf;
  border-radius: 11px;
  filter: url(#rough);
  pointer-events: none;
}
.has-menu:hover .menu, .has-menu:focus-within .menu { opacity: 1; visibility: visible; transform: none; transition: opacity .18s, transform .2s; }
.has-menu.closed .menu { opacity: 0; visibility: hidden; }
.has-menu.closed .nav-link:not(.active) .pill { opacity: 0; }
.has-menu.closed .nav-link:not(.active) span { color: var(--plum); }
.menu a {
  position: relative;
  display: block;
  padding: 8px 15px 9px;
  font-size: 18.5px;
  color: var(--plum);
  text-decoration: none;
  white-space: nowrap;
}
.menu a + a::before { /* hand-drawn divider */
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: -.75px;
  border-top: 1.5px solid #cfcfcf;
  filter: url(#rough);
}
.menu a:hover { background: rgba(214, 222, 180, .35); }
.menu a:first-child:hover { border-radius: 11px 11px 0 0; }
.menu a:last-child:hover { border-radius: 0 0 11px 11px; }
.menu a.current { font-weight: 700; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1.5px; }
.menu a:focus-visible { outline: 2px solid var(--plum); outline-offset: -3px; border-radius: 6px; }

/* All Work footer: kept above the falling symbols */
.foot {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 1440px;
  height: 100px;
  transform-origin: 0 100%;
  z-index: 6;
  pointer-events: none;
}
.foot > * { position: absolute; bottom: 46px; padding: 2px 8px; margin-left: -8px; border-radius: 10px; background: var(--bg); }
.foot a { pointer-events: auto; }

/* ===================== Project pages: one grid for every project =====================
   Content column 69 → 1371 (1302 px, Figma "Rectangle 59"). Text block: left column + description at 653. */
.pj { left: 0; top: 160px; width: 1440px; color: var(--plum); }
.pj-top { display: grid; grid-template-columns: 584px 620px; padding-left: 69px; }
.pj-title { font-size: 44px; font-weight: 600; line-height: 1.08; letter-spacing: .03em; max-width: 540px; }
.pj-sub { margin-top: 12px; font-size: 15px; font-weight: 500; line-height: 1.35; color: var(--muted); }
.pj-kicker { margin-top: 6px; font-size: 15px; color: var(--muted); }
.pj-team { margin-top: 20px; font-size: 14px; font-weight: 500; line-height: 1.5; }
.pj-meta { display: flex; margin-top: 44px; }
.pj-meta div { width: 150px; }
.pj-meta dt { font-size: 14px; font-weight: 700; line-height: 1.4; }
.pj-meta dd { font-size: 15px; font-weight: 500; line-height: 1.4; color: var(--muted); }
.pj-desc p { text-wrap: pretty; font-size: 15px; font-weight: 500; line-height: 1.6; }
.pj-desc p + p { margin-top: 1em; }
/* Spacing system: --sec between the text block and every section, --lab between a section title and its images, --gut between images */
.pj { --sec: 104px; --lab: 20px; --gut: 24px; }
.pj-sec { width: 1302px; margin: var(--sec) 0 0 69px; }
.pj-label { font-size: 16px; font-weight: 600; line-height: 1.3; }
.pj-label span { display: block; margin-top: 2px; font-size: 15px; font-weight: 500; color: var(--muted); }
.pj-media { margin-top: var(--lab); }
.pj-media img, .pj-media video { display: block; width: 100%; height: auto; }
/* Motion: the film has black bars at the sides, cropped away here */
.motion { position: relative; aspect-ratio: 1528 / 1080; overflow: hidden; background: #0b1020; }
.motion video { position: absolute; top: 0; left: -12.827%; width: 125.654% !important; height: 100% !important; }
/* Two images side by side, equal height */
.pj-pair { display: flex; gap: var(--gut); }
.pj-pair > * { min-width: 0; }
/* Postcards flip where they are */
.pc-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--gut); }
.postcard { display: block; width: 418px; padding: 0; border: 0; background: none; cursor: pointer; perspective: 1600px; transition: transform .3s cubic-bezier(.3,1.4,.5,1); }
.postcard:hover { transform: translateY(-5px); }
.pc-inner { position: relative; display: block; aspect-ratio: 1600 / 1075; transform-style: preserve-3d; transition: transform .75s cubic-bezier(.3,.8,.25,1); }
.postcard.flipped .pc-inner { transform: rotateY(180deg); }
.pc-inner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; backface-visibility: hidden; -webkit-backface-visibility: hidden; box-shadow: 0 12px 10px -10px rgba(26, 26, 51, .3); }
.pc-inner .pc-back { transform: rotateY(180deg); }
.postcard:focus-visible { outline: 3px solid var(--plum); outline-offset: 5px; }
.pj-film video { display: block; width: 100%; height: auto; background: #111; }
.pj-foot { position: relative; height: 150px; margin-top: var(--sec); font-size: 16px; }
.pj-foot a { position: absolute; color: var(--plum); text-decoration: none; font-weight: 500; }
.pj-foot a:hover { text-decoration: underline; text-underline-offset: 3px; }
.pj-foot .small { position: absolute; font-size: 14px; color: var(--muted); }

/* Layer After Layer: letters made of green onions, on black */
.la-panel { position: relative; height: 680px; color: var(--plum); }
.la-panel > * { position: absolute; }
.la-panel img { display: block; }
.la-ex { left: 48px; top: 44px; display: flex; gap: 14px; align-items: flex-end; }
.la-ex img { height: 190px; width: auto; }
.la-ex-label { left: 48px; top: 246px; font-size: 14px; font-weight: 500; }
.la-mark { font-size: 23px; font-weight: 400; font-family: 'Torsilp Banyai', 'Urbanist', sans-serif; letter-spacing: 0; }
.la-piece { transform-origin: 50% 50%; }
/* Process sheet: small images in rows, like a contact sheet */
.la-sheet { display: grid; grid-template-columns: repeat(8, 1fr); gap: 22px 18px; }
.ps { position: relative; margin: 0; text-align: center; }
.ps button { display: block; width: 100%; height: 124px; padding: 0; border: 0; background: none; cursor: zoom-in; }
.ps img { display: block; width: 100%; height: 100%; object-fit: contain; object-position: 50% 100%; transform-origin: 50% 85%; transition: transform .3s cubic-bezier(.3,1.3,.5,1), filter .3s; }
.ps.jpg img { filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .12)); }
.ps:hover, .ps:focus-within { z-index: 5; }
.ps:hover img, .ps button:focus-visible img { transform: scale(1.9); }
.ps.jpg:hover img { filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .28)); }
.ps button:focus-visible { outline: none; }
.ps figcaption { margin-top: 9px; font-size: 10px; font-weight: 500; line-height: 1.35; color: #2b2b2b; }

/* Anything that opens full screen */
.zoomable { cursor: zoom-in; }
img.zoomable, video.zoomable { transition: filter .25s; }
img.zoomable:hover, video.zoomable:hover { filter: brightness(1.04) saturate(1.04); }
.zoomable:focus-visible { outline: 3px solid var(--plum); outline-offset: 4px; }

/* Carousels (What Rests Within: By Day / By Night) */
.car { position: relative; width: 1302px; }
.car-track { display: flex; gap: var(--gut); height: 580px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none; }
.car-track::-webkit-scrollbar { display: none; }
.car-slide { flex: none; height: 100%; margin: 0; scroll-snap-align: start; }
.car-slide img { display: block; height: 100%; width: auto; }
.car-btn {
  position: absolute; top: 290px; translate: 0 -50%;
  width: 36px; height: 52px; padding: 0; border: 0; background: none; color: var(--plum);
  display: flex; align-items: center; justify-content: center; cursor: pointer; transition: opacity .2s;
}
.car-btn svg { width: 11px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; transition: stroke-width .15s; }
.car-btn:hover svg, .car-btn:focus-visible svg { stroke-width: 2.6; }
.car-btn.prev { left: -48px; }
.car-btn.next { right: -48px; }
.car-btn:disabled { opacity: 0; pointer-events: none; }
.car-btn:focus-visible { outline: 2px solid var(--plum); outline-offset: 2px; border-radius: 3px; }
.car-count { position: absolute; right: 0; top: calc(-1 * var(--lab) - 20px); margin: 0; font-size: 14px; font-weight: 500; color: var(--muted); }

/* Full-screen viewer */
html.lb-lock, html.lb-lock body { overflow: hidden; }
.lb {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(28, 6, 24, .9); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  opacity: 0; visibility: hidden; transition: opacity .25s, visibility 0s .25s;
  font-family: 'Urbanist', sans-serif;
}
.lb.open { opacity: 1; visibility: visible; transition: opacity .25s; }
.lb-stage { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; padding: 64px 92px 60px; transform: scale(.97); transition: transform .35s cubic-bezier(.2,.9,.3,1); }
.lb.open .lb-stage { transform: none; }
.lb-stage > img, .lb-stage > video { max-width: 100%; max-height: 100%; object-fit: contain; box-shadow: 0 20px 60px rgba(0, 0, 0, .35); }
.lb-close, .lb-nav {
  position: fixed; width: 48px; height: 48px; border-radius: 50%;
  border: 0; background: rgba(255, 255, 255, .14); color: #fff;
  font: 400 30px/1 'Urbanist', sans-serif; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: background .2s;
}
.lb-close:hover, .lb-nav:hover { background: rgba(255, 255, 255, .28); }
.lb-close:focus-visible, .lb-nav:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.lb-close { top: 18px; right: 20px; background: none !important; font-weight: 300; transition: font-weight .15s; }
.lb-close:hover, .lb-close:focus-visible { font-weight: 600; }
.lb-nav { top: 50%; translate: 0 -50%; display: none; background: none !important; }
.lb-nav svg { width: 14px; height: 26px; fill: none; stroke: #fff; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; transition: stroke-width .15s; }
.lb-nav:hover svg, .lb-nav:focus-visible svg { stroke-width: 2.6; }
.lb.multi .lb-nav { display: flex; }
.lb-prev { left: 22px; }
.lb-next { right: 22px; }
.lb-note { position: fixed; left: 0; right: 0; bottom: 20px; text-align: center; font-size: 13px; letter-spacing: .03em; color: rgba(255, 255, 255, .72); pointer-events: none; }
.lb-card { position: relative; width: min(80vw, calc((100vh - 150px) * 1.49)); aspect-ratio: 1173 / 789; padding: 0; border: 0; background: none; cursor: pointer; perspective: 1800px; }
.lb-face { position: absolute; inset: 0; border-radius: 5px; overflow: hidden; backface-visibility: hidden; -webkit-backface-visibility: hidden; box-shadow: 0 24px 60px rgba(0, 0, 0, .4); transition: transform .75s cubic-bezier(.3,.8,.25,1); }
.lb-face img { display: block; width: 100%; height: 100%; object-fit: cover; }
.lb-face.back { transform: rotateY(180deg); }
.lb-card.flipped .front { transform: rotateY(-180deg); }
.lb-card.flipped .back { transform: rotateY(0deg); }
.lb-card:focus-visible { outline: 2px solid #fff; outline-offset: 6px; }

/* Viewer: cropped motion film */
.lb-crop { position: relative; overflow: hidden; width: min(100%, calc((100vh - 124px) * 1.4148)); aspect-ratio: 1528 / 1080; box-shadow: 0 20px 60px rgba(0, 0, 0, .35); }
.lb-crop video { position: absolute; top: 0; left: -12.827%; width: 125.654%; height: 100%; }

/* Overgrown: one photo at a time */
.car.single .car-track { height: 760px; }
.car.single .car-slide { flex: 0 0 100%; display: flex; justify-content: center; }
.car.single .car-btn { top: 380px; }

/* PLAY BKK: stamps drift away from the pointer, then settle back */
.pb-cluster { position: relative; height: 740px; }
.pb-cluster img { position: absolute; display: block; }
.pb-stamp { will-change: transform; pointer-events: none; }

/* All Work: no box on hover, the project name gets bolder; year sits at the far edge */
.proj .hit:hover { background-color: transparent; }
.proj .label { transition: font-weight .2s; }
.proj:hover .label:not(.proj-year), .proj:focus-within .label:not(.proj-year) { font-weight: 700; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1.5px; }
.proj .proj-year { left: auto; color: var(--muted); }

/* PAISARN: stop-motion GIF beside a one-at-a-time photo carousel, equal height */
.ps-pair { display: flex; gap: var(--gut); height: 640px; }
.ps-turn { flex: none; height: 100% !important; width: auto !important; }
.ps-pair .car { flex: 1; min-width: 0; width: auto; }
.ps-pair .car.single .car-track { height: 640px; }
.ps-pair .car-slide { overflow: hidden; }
.ps-pair .car-slide img { width: 100%; height: 100%; object-fit: cover; }
.ps-pair .car.single .car-btn { top: 320px; }
.ps-pair .car-btn.prev { left: 6px; }
.ps-pair .car-btn.next { right: -48px; }

/* Magazine flipbook (ENTWINED): pages turn around the spine */
.book { position: relative; width: 1302px; height: 780px; perspective: 2800px; user-select: none; }
.book-stage { position: absolute; top: 10px; left: 651px; width: 523px; height: 740px; transform-style: preserve-3d; transition: transform .8s cubic-bezier(.3,.7,.2,1); }
.book.at-start .book-stage { transform: translateX(-261.5px); }
.book.at-end .book-stage { transform: translateX(261.5px); }
.leaf { position: absolute; inset: 0; transform-origin: 0 50%; transform-style: preserve-3d; transition: transform .9s cubic-bezier(.35,.65,.2,1); cursor: pointer; }
.leaf { transform: translateZ(var(--z, 0px)); }
.leaf.flipped { transform: translateZ(var(--z, 0px)) rotateY(-180deg); }
.face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; overflow: hidden; background: #eee; box-shadow: 0 18px 30px -14px rgba(40, 30, 20, .35); }
.face img { display: block; width: 100% !important; height: 100% !important; object-fit: cover; }
.face.back { transform: rotateY(180deg); }
/* soft shading at the spine */
.face::after { content: ''; position: absolute; top: 0; bottom: 0; width: 46px; pointer-events: none; }
.face.front::after { left: 0; background: linear-gradient(90deg, rgba(0,0,0,.16), rgba(0,0,0,0)); }
.face.back::after { right: 0; background: linear-gradient(270deg, rgba(0,0,0,.16), rgba(0,0,0,0)); }
.book .car-btn { top: 380px; }
.book .car-count { top: calc(-1 * var(--lab) - 20px); }

/* ---- Kwan Phayao brand guideline ---- */
.kg-logo { width: 720px; margin: 8px auto 72px; }
.kg-vars { display: flex; gap: var(--gut); align-items: flex-end; }
.kg-vars img { flex: 1; min-width: 0; cursor: zoom-in; }
.kg-text { max-width: 860px; margin-top: 32px; text-wrap: pretty; font-size: 15px; font-weight: 500; line-height: 1.6; }
.kg-fonts { display: flex; gap: 120px; }
.kg-font { width: 330px; }
.pj-media .kg-font img:nth-of-type(1) { width: 190px; margin-top: 16px; }
.pj-media .kg-font img:nth-of-type(2) { width: 330px; margin-top: 18px; }
.kg-sub { font-size: 15px; font-weight: 600; }
.kg-name { margin-top: 8px; font-size: 14px; font-weight: 500; color: var(--muted); }
.kg-colors { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--gut); }
.kg-sw { height: 170px; padding: 18px 20px; display: flex; flex-direction: column; justify-content: flex-end; font-size: 15px; line-height: 1.35; }
.kg-sw b { font-weight: 600; }
.kg-sw span { font-weight: 500; text-transform: uppercase; opacity: .85; }
.kg-sw[style*="#ffffff;"] { box-shadow: inset 0 0 0 1px #d9cfd6; }
.kg-ve { display: grid; grid-template-columns: 560px 1fr; gap: 64px; align-items: start; }
.kg-ve .kg-text { margin-top: 28px; }
.kg-rows { display: flex; flex-direction: column; gap: var(--gut); }
.kg-row { display: grid; grid-template-columns: 330px 170px 1fr; gap: var(--gut); align-items: center; }
.pj-media .kg-row > img { width: 330px; cursor: zoom-in; }
.kg-motif { display: flex; flex-direction: column; align-items: center; gap: 28px; }
.pj-media .kg-motif img { width: auto; max-width: 170px; max-height: 190px; }
.kg-labs { display: flex; flex-direction: column; gap: 46px; font-size: 15px; font-weight: 600; line-height: 1.35; }
.kg-labs span { display: block; font-size: 14px; font-weight: 500; color: var(--muted); }

/* ---- Build Your Mug Friends: drag-and-drop postcards ---- */
@font-face { font-family: 'TH Mali Grade6'; src: url(assets/fonts/th-mali-grade6.ttf) format('truetype'); font-display: swap; }
.mug { --ink: #4a68ee; user-select: none; -webkit-user-select: none; }
.mug-cards { display: flex; justify-content: center; gap: 56px; padding: 18px 0 8px; }
.mug-card { position: relative; width: 330px; aspect-ratio: 780 / 1100; transform: rotate(var(--r)); transition: transform .25s ease;
  box-shadow: 0 1px 2px rgba(60, 40, 40, .08), 0 8px 16px -8px rgba(60, 40, 40, .22); }
.pj-media .mug-card .mug-paper { position: absolute; inset: 0; width: 100%; height: 100%; }
/* A light paper grain on top of the card */
.mug-card::after { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .28; mix-blend-mode: multiply;
  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 .55 0 0 0 0 .5 0 0 0 0 .45 0 0 0 .22 0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)'/%3E%3C/svg%3E"); }
.mug-card.over { transform: rotate(var(--r)) scale(1.03); }
.mug-slot { position: absolute; left: 12%; right: 12%; top: 14%; height: 64%; padding: 0; border: 0; background: none; cursor: grab; display: flex; align-items: center; justify-content: center; }
.mug-slot[hidden] { display: none; }
.pj-media .mug-slot img { width: auto; height: auto; max-width: 100%; max-height: 100%; }
.mug-slot.bounce img { animation: mug-in .62s cubic-bezier(.3,.7,.3,1) both; }
@keyframes mug-in {
  0% { transform: translateY(-26px) scale(.45); opacity: 0; }
  35% { transform: translateY(6px) scale(1.12, .9); opacity: 1; }
  58% { transform: translateY(-8px) scale(.96, 1.05); }
  78% { transform: translateY(2px) scale(1.02, .98); }
  100% { transform: none; }
}
.mug-name { position: absolute; left: 47%; width: 31.5%; bottom: 13.4%; text-align: center; font: 400 36px/1 'TH Mali Grade6', sans-serif; letter-spacing: 0; color: var(--ink); white-space: nowrap; }
.mug-name.pop { animation: name-in .4s .18s cubic-bezier(.3,1.6,.5,1) both; }
@keyframes name-in { from { transform: scale(.3); opacity: 0; } to { transform: none; opacity: 1; } }
.mug-tray { display: flex; justify-content: center; align-items: flex-end; gap: 18px; margin-top: 56px; }
.mug-ch { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 0; border: 0; background: none; cursor: grab; touch-action: none; transition: opacity .2s, transform .2s cubic-bezier(.3,1.5,.5,1); }
.pj-media .mug-ch img { width: auto; height: 118px; max-width: 128px; object-fit: contain; }
.mug-ch span { font: 400 26px/1 'TH Mali Grade6', sans-serif; letter-spacing: 0; color: var(--plum); }
.mug-ch:hover { transform: translateY(-5px) rotate(-3deg); }
.mug-ch.used { opacity: 0; visibility: hidden; transform: scale(.6); transition: opacity .2s, visibility 0s .2s, transform .2s; }
.mug-ch:focus-visible, .mug-slot:focus-visible { outline: 2px solid var(--plum); outline-offset: 4px; }
.mug-ghost { position: fixed; z-index: 100; pointer-events: none; transform: translate(-50%, -50%) rotate(-4deg); filter: drop-shadow(0 10px 10px rgba(60, 40, 40, .25)); }
.mug-ghost.back { transition: left .3s ease, top .3s ease, opacity .3s ease; opacity: 0; }
.mug-photos { align-items: flex-end; }

/* ---- Sud Soi Bangkok Noi ---- */
@keyframes wiggle { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-2.2deg); } 75% { transform: rotate(2.2deg); } }
.wiggle { transition: transform .2s; }
.wiggle:hover { animation: wiggle .38s ease-in-out infinite; position: relative; z-index: 2; }
/* Hero: the title swaps colours under the pointer, every drawing wiggles */
.ss-hero-sec { margin-top: 48px; }
.ss-hero { position: relative; height: 760px; }
.ss-hero > img, .ss-title span { position: absolute; display: block; rotate: var(--rot, 0deg); }
.ss-hero > img.wiggle:hover { position: absolute; }
.ss-title span { background: var(--c); -webkit-mask-size: 100% 100%; mask-size: 100% 100%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; transition: background-color .25s; }
.ss-title span.wiggle:hover { position: absolute; }
.ss-title-a { --c: #683127; }
.ss-title-b { --c: #ea6d4f; }
.ss-title-a:hover { --c: #ea6d4f; }
.ss-title-b:hover { --c: #683127; }
.ss-il { position: relative; height: 372px; }
.pj-media .ss-il img { position: absolute; object-fit: contain; }
.pj-media .ss-il img.wiggle:hover { position: absolute; }
/* Field research: a scrolling strip of photo collages, like the What Rests Within carousel */
.ss-strip .car-track { height: 760px; gap: 8px; }
.ss-block { display: flex; flex-direction: column; gap: 8px; height: 760px; }
.ss-row { display: flex; gap: 8px; }
.ss-row figure { margin: 0; min-width: 0; height: 100%; overflow: hidden; }
.pj-media .ss-row img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.ss-strip .car-btn { top: 380px; }
/* MacBook mock-up around the website walkthrough */
.ss-mac { width: 980px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; filter: drop-shadow(0 30px 30px rgba(40, 30, 30, .18)); }
.mb-lid { position: relative; width: 860px; padding: 16px 16px 26px; background: #0d0d0e; border-radius: 26px 26px 6px 6px;
  box-shadow: inset 0 0 0 2px #2c2c2e, 0 0 0 1.5px #a7a9ad; }
.mb-screen { position: relative; overflow: hidden; border-radius: 6px; background: #000; }
.pj-media .mb-screen video { display: block; width: 100%; aspect-ratio: 1.46; height: auto; object-fit: cover; }
.mb-notch { position: absolute; left: 50%; top: 0; width: 120px; height: 18px; margin-left: -60px; background: #0d0d0e; border-radius: 0 0 9px 9px; }
.mb-notch::after { content: ''; position: absolute; left: 50%; top: 6px; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: #1f2a33; }
.mb-base { position: relative; width: 980px; height: 22px; margin-top: -1px;
  background: linear-gradient(#f1f1f3 0, #d9dadd 30%, #c3c4c8 70%, #9fa0a5 100%); border-radius: 3px 3px 60px 60px / 3px 3px 18px 18px;
  box-shadow: inset 0 1px 0 #fff, inset 0 -2px 3px rgba(0,0,0,.15); }
.mb-lip { position: absolute; left: 50%; top: 0; width: 150px; height: 9px; margin-left: -75px; border-radius: 0 0 10px 10px; background: linear-gradient(#b5b6ba, #d3d4d7); box-shadow: inset 0 2px 3px rgba(0,0,0,.18); }
.ss-play { position: absolute; left: 50%; top: 50%; width: 84px; height: 84px; margin: -42px 0 0 -42px; border: 0; border-radius: 50%; background: rgba(255,255,255,.92); cursor: pointer; display: grid; place-items: center; box-shadow: 0 6px 20px rgba(0,0,0,.25); transition: transform .2s; }
.ss-play:hover { transform: scale(1.08); }
.ss-play svg { width: 36px; height: 36px; margin-left: 5px; fill: var(--plum); }
.ss-mac.playing .ss-play { display: none; }
.ss-link { margin-top: 36px; text-align: center; font-size: 17px; font-weight: 500; }
.ss-link a { color: var(--plum); text-decoration: underline; text-underline-offset: 4px; }
.ss-link a:hover { font-weight: 700; }

/* ---- Poofy People ---- */
.pp-rows { display: flex; flex-direction: column; gap: 22px; }
.pp-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) 716px; align-items: center; gap: 24px; }
.pp-name { align-self: start; margin-top: 4px; font-size: 40px; font-weight: 600; line-height: 1.05; letter-spacing: .02em; justify-self: start; cursor: default; transition: color .25s, font-size .25s; }
.pp-puffy .pp-name { color: #d4618b; }
.pp-oily .pp-name { color: #a8822a; }
.pp-fluffy .pp-name { color: #7b9a2c; }
.pp-row:hover .pp-name { font-size: 46px; }
.pp-sketch { justify-self: center; width: auto; height: 430px; max-width: 100%; object-fit: contain; cursor: zoom-in; }
.pp-render { display: block; width: 716px; height: auto; cursor: zoom-in; }

/* ---- Odeonstore ---- */
.canvas:has(.od-graphic) .thai { font-family: 'Bai Jamjuree', 'IBM Plex Sans Thai', sans-serif; letter-spacing: 0; }
.od-photos { align-items: stretch; }
.pj-media .od-photos img { min-width: 0; height: 460px; object-fit: cover; }
.pj-media .od-graphic { display: block; width: 100%; height: auto; cursor: zoom-in; }

/* ---- Oddly Typed ---- */
.ot-az { display: grid; grid-template-columns: repeat(7, 1fr); gap: 14px; }
.ot-letter { padding: 0; border: 0; background: #fff; cursor: zoom-in; aspect-ratio: 1; }
.pj-media .ot-letter img { width: 100%; height: 100%; object-fit: contain; }
.ot-letter:focus-visible { outline: 2px solid var(--plum); outline-offset: 3px; }
/* A small sketchbook with rounded paper */
.book.sb { height: 560px; perspective: 2200px; }
.book.sb .book-stage { top: 20px; left: 651px; width: 360px; height: 510px; }
.book.sb.at-start .book-stage { transform: translateX(-180px); }
.book.sb.at-end .book-stage { transform: translateX(180px); }
.book.sb .face { background: #fbfaf7; border-radius: 0 16px 16px 0; box-shadow: 0 14px 26px -14px rgba(40, 30, 20, .35); }
.book.sb .face.back { border-radius: 16px 0 0 16px; }
.book.sb .face::after { width: 30px; }
.book.sb .car-btn { top: 275px; }
.sb-cover { position: absolute; inset: 0; background: linear-gradient(135deg, #c79d3e, #a97f26); display: flex; flex-direction: column; justify-content: flex-end; padding: 34px 30px; color: #fff8e6; }
.sb-cover span { font-size: 26px; font-weight: 600; letter-spacing: .02em; }
.sb-cover small { margin-top: 4px; font-size: 15px; font-weight: 500; opacity: .85; }
/* Sketchbook pages: show the whole page, never crop the letters */
.book.sb .face img { object-fit: contain; background: #fdfdfd; }
.book.sb .face img.sb-cover-img { object-fit: cover; }
.sb-cover { background: #dcb339; }
.sb-blank { position: absolute; inset: 0; background: #fdfdfd; }
/* Posters on paper: a faint grain and a soft edge so they lift off the white page */
.ot-paper { position: relative; flex: 1; min-width: 0; box-shadow: 0 1px 2px rgba(60, 40, 40, .08), 0 10px 22px -12px rgba(60, 40, 40, .25); }
.ot-paper img { display: block; width: 100%; height: auto; }
.ot-paper::after { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .32; mix-blend-mode: multiply;
  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 .55 0 0 0 0 .5 0 0 0 0 .45 0 0 0 .22 0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)'/%3E%3C/svg%3E"); }

/* ---- Silver Shoes: shoes walking forward under the video ---- */
.sv-spec { margin-top: 12px; font-size: 14px; font-weight: 500; color: var(--muted); }
.sv-parade { position: relative; margin-top: 40px; height: 120px; overflow: hidden; }
.sv-walk { position: absolute; left: 0; bottom: 8px; display: flex; gap: 36px; padding-right: 36px; width: max-content; animation: sv-forward 26s linear infinite; }
.sv-shoe { display: block; width: 150px; animation: sv-step .9s ease-in-out infinite; }
.sv-shoe img { display: block; width: 100%; height: auto; }
.sv-silver img { transform: scaleX(-1); }          /* toe forward, like the blue one */
.sv-shoe:nth-child(even) { animation-delay: -.45s; } /* left, right, left, right */
@keyframes sv-forward { from { transform: translateX(-50%); } to { transform: translateX(0); } }
@keyframes sv-step { 0%, 100% { transform: translateY(0) rotate(0); } 25% { transform: translateY(-9px) rotate(-4deg); } 50% { transform: translateY(0) rotate(0); } }
@media (prefers-reduced-motion: reduce) { .sv-walk, .sv-shoe { animation: none; } }

/* ---- HomHom Market: every letter has its own little dance; a torn-paper edge around each ---- */
.hh-logo-sec { margin-top: 64px; }
.hh-stage { position: relative; height: 700px; background: #ed8ec6; display: grid; place-items: center; overflow: hidden; }
.hh-logo { position: relative; width: 736px; height: 580px; }
.hh-logo img { position: absolute; display: block; transition: translate .45s cubic-bezier(.3,1.8,.5,1), rotate .45s cubic-bezier(.3,1.8,.5,1), scale .45s cubic-bezier(.3,1.8,.5,1); }
/* hover: a springy hop that adds to the dance instead of restarting it, so nothing blinks out */
.hh-logo img:hover { translate: 0 -30px; rotate: -8deg; scale: 1.06; }
.hh-p { transform-origin: 50% 100%; animation: hh-drop .8s calc(var(--i) * .12s) cubic-bezier(.3,1.6,.5,1) both, var(--dance) var(--t, 2.6s) calc(1.4s + var(--i) * .23s) ease-in-out infinite; }
.hh-h1 { --dance: hh-hop; --t: 2.2s; }
.hh-h2 { --dance: hh-tilt; --t: 2.6s; }
/* the onions and the Ms stay joined and move as one piece */
.hh-group { position: absolute; inset: 0; transform-origin: 70% 75%; animation: hh-drop .8s .15s cubic-bezier(.3,1.6,.5,1) both, hh-sway 4.2s 1.6s ease-in-out infinite; }
.hh-logo .hh-group img:hover { translate: none; rotate: none; scale: none; }
@keyframes hh-sway { 0%, 100% { transform: rotate(0); } 30% { transform: rotate(-1.4deg) translateY(-4px); } 70% { transform: rotate(1.2deg); } }
.hh-m { top: 437px; height: 142px; transform-origin: 50% 100%; animation: hh-pop .6s calc(.9s + var(--i) * .09s) cubic-bezier(.3,1.7,.5,1) both, hh-bob 3.2s calc(2s + var(--i) * .16s) ease-in-out infinite; }
@keyframes hh-drop { from { transform: translateY(-260px) rotate(-14deg); opacity: 0; } 50% { opacity: 1; } to { transform: none; } }
@keyframes hh-hop { 0%, 55%, 100% { transform: none; } 68% { transform: translateY(-26px) rotate(-5deg); } 80% { transform: translateY(3px) scale(1.04, .95); } 90% { transform: translateY(-6px); } }
@keyframes hh-squish { 0%, 50%, 100% { transform: none; } 62% { transform: scale(1.1, .86); } 74% { transform: scale(.94, 1.1) translateY(-14px); } 86% { transform: scale(1.03, .97); } }
@keyframes hh-tilt { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-6deg); } 50% { transform: rotate(0); } 75% { transform: rotate(5deg); } }
@keyframes hh-pop { from { transform: translateY(60px) scale(.3); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes hh-bob { 0%, 70%, 100% { transform: none; } 80% { transform: translateY(-10px); } 90% { transform: translateY(2px); } }
@keyframes hh-jump { 40% { transform: translateY(-40px) rotate(-10deg) scale(1.08); } }
@media (prefers-reduced-motion: reduce) { .hh-p, .hh-m { animation: none; } }
.hh-wall { display: block; width: 100%; height: auto; margin-top: var(--gut); cursor: zoom-in; }
.pj-media .hh-box { display: block; width: 100%; height: auto; cursor: zoom-in; }

/* ---- About me (Figma) ---- */

.ab-photo { position: absolute; display: block; }
.ab-name h1 { font-size: 42px; font-weight: 700; line-height: 1.12; color: var(--plum); }
.ab-name p { margin-top: 4px; font-size: 18px; font-weight: 500; color: #ff9ec1; }
.ab-hello { position: absolute; font-size: 26px; font-weight: 500; line-height: 1.32; color: var(--plum); letter-spacing: 0; }
.ab-hello p + p { margin-top: 1.32em; }
.ab-hello .w { font-style: normal; transition: font-weight .18s; }
.ab-hello .w:hover { font-weight: 700; font-style: italic; }

/* ---- About: CV (Urbanist) ---- */
.ab-pic { position: absolute; }
.ab-pic.wiggle:hover { position: absolute; }
.ab-cv { position: absolute; display: grid; grid-template-columns: 1fr 380px; column-gap: 80px; color: #8e1b7b; }
.ab-col { display: flex; flex-direction: column; gap: 64px; }
.ab-h { font-size: 30px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; color: var(--plum); margin-bottom: 22px; cursor: default; transition: font-weight .2s; }
.ab-h:hover { font-weight: 900; }
.ab-row { display: grid; grid-template-columns: 170px 1fr; column-gap: 20px; margin-bottom: 24px; }
.ab-yr { font-size: 16px; font-weight: 700; line-height: 1.35; color: var(--plum); }
.ab-entries { display: flex; flex-direction: column; gap: 22px; }
.ab-entry p { font-size: 19px; font-weight: 400; line-height: 1.3; }
.ab-entry .b { font-weight: 600; }
.ab-list { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.ab-list li { position: relative; padding-left: 40px; font-size: 19px; font-weight: 400; line-height: 1.3; }
.ab-list li::before { content: '·'; position: absolute; left: 6px; font-weight: 700; }
.ab-lang li { display: grid; grid-template-columns: 110px auto; }
.ab-lang b { font-weight: 600; }
