:root {
  --paper: #eeede8;
  --paper-2: #e6e5df;
  --ink: #151515;
  --mute: #76756f;
  --rule: #c9c7c0;
  --blue: #2438d0;
  --gut: clamp(16px, 3.5vw, 44px);
  --max: 1180px;                                /* content width cap */
  --side: max(var(--gut), calc((100% - var(--max)) / 2));
  --ease: cubic-bezier(.2, .7, .1, 1);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  background: var(--paper);
  color: var(--ink);
  font: 14px/1.45 "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
::selection { background: var(--blue); color: var(--paper); }

.s { font-size: 11px; line-height: 1.5; letter-spacing: .01em; }
.mute { color: var(--mute); }
.blue { color: var(--blue); }
.arrow { display: inline-block; transition: transform .35s var(--ease); }

.wrap { padding: 0 var(--gut); max-width: calc(var(--max) + 2 * var(--gut)); margin-inline: auto; }
.grid { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: clamp(12px, 2vw, 28px); }

/* ---------- header ---------- */
header {
  position: sticky; top: 0; z-index: 10;
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px var(--side);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(8px);
}
.mark { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.mark b {
  display: grid; place-items: center;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--ink); color: var(--paper);
  font-size: 12px; font-weight: 700; letter-spacing: -.04em;
}
nav { display: flex; gap: clamp(14px, 2.4vw, 32px); }
nav a { position: relative; }
nav a sup { font-size: 8px; color: var(--mute); margin-left: 1px; }
nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: left;
  transition: transform .35s var(--ease);
}
nav a:hover::after { transform: scaleX(1); }

/* ---------- hero ---------- */
.hero { padding-top: clamp(40px, 9vh, 96px); align-items: end; }
.hero-type { grid-column: 1 / 8; }
h1 {
  font-weight: 500;
  font-size: clamp(52px, 9vw, 132px);
  line-height: .84;
  letter-spacing: -.055em;
  margin-left: -.04em;
}
.hero hr { border: 0; border-top: 1px solid var(--ink); margin: clamp(14px, 2vw, 22px) 0 10px; }
.role { font-size: clamp(18px, 1.7vw, 23px); letter-spacing: -.02em; line-height: 1.1; }
.hero .meta { margin-top: 14px; }

.reel { grid-column: 9 / 13; position: relative; }
.reel-frame { position: relative; aspect-ratio: 4 / 3; background: var(--paper-2); border-radius: 4px; overflow: hidden; cursor: pointer; }
.reel .slide {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block;
  opacity: 0; scale: 1.06;
  transition: opacity 1.1s var(--ease), scale 6s linear;   /* slow zoom-out while a slide is showing */
}
.reel .slide.on { opacity: 1; scale: 1; }
.reel figcaption a:hover { color: var(--blue); }
.reel figcaption { display: flex; justify-content: space-between; align-items: baseline; margin-top: 10px; }
.bar { height: 1px; background: var(--rule); margin-top: 8px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--ink); transform-origin: left; transform: scaleX(0); }
.bar i.run { animation: fill var(--dur, 4s) linear forwards; }
.reel:hover .bar i.run { animation-play-state: paused; }
@keyframes fill { to { transform: scaleX(1); } }

/* placeholder "renders" for projects without images yet */
.ph {
  position: relative; overflow: hidden;
  background:
    radial-gradient(120% 80% at 30% 20%, rgba(255,255,255,.55), transparent 60%),
    var(--tint, #d9d6cd);
}
.ph::before {                               /* soft floor shadow, like a studio sweep */
  content: ""; position: absolute; left: 22%; right: 22%; bottom: 18%; height: 9%;
  background: radial-gradient(closest-side, rgba(0,0,0,.16), transparent);
  filter: blur(4px);
}
.ph::after {                                /* the "object" */
  content: ""; position: absolute; left: 50%; bottom: 23%;
  width: var(--w, 34%); aspect-ratio: var(--ar, 1 / 1.25);
  transform: translateX(-50%);
  border-radius: var(--r, 40% 40% 18% 18%);
  background: linear-gradient(140deg, rgba(255,255,255,.7), rgba(255,255,255,.12) 55%, rgba(0,0,0,.06));
  box-shadow: inset -6px -10px 24px rgba(0,0,0,.06);
}
.ph span { position: absolute; left: 12px; bottom: 10px; z-index: 1; color: rgba(0,0,0,.45); }

/* ---------- intro ---------- */
.intro { margin-top: clamp(64px, 11vh, 120px); align-items: start; }
.intro .jp { grid-column: 1 / 4; }
.intro .statement { grid-column: 7 / 13; text-align: right; font-size: clamp(14px, 1.1vw, 16px); line-height: 1.35; }
.jump { margin-top: clamp(48px, 8vh, 96px); }
.jump ul { grid-column: 5 / 13; list-style: none; display: flex; gap: clamp(24px, 5vw, 80px); }
.jump a { display: flex; gap: 10px; font-size: clamp(16px, 1.4vw, 19px); line-height: 1.05; letter-spacing: -.01em; }
.jump a .arrow { font-size: .7em; padding-top: .1em; }
.jump a:hover { color: var(--blue); }
.jump a:hover .arrow { transform: translate(2px, 2px); }

/* ---------- works ---------- */
.works { margin-top: clamp(88px, 14vh, 150px); }
.sec-head { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 12px; border-bottom: 1px solid var(--rule); }
.sec-head h2 { font-weight: 400; font-size: clamp(19px, 1.7vw, 24px); letter-spacing: -.02em; }

.work > .grid { padding: clamp(24px, 3.5vw, 44px) 0; align-items: start; }
.work .cover { grid-column: 1 / 7; border-radius: 4px; overflow: hidden; }
.work .cover .ph, .work .cover > img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; transition: scale .9s var(--ease); }
.work .desc { max-width: 34ch; margin-top: 18px; font-size: 12px; line-height: 1.5; }
.work .index { list-style: none; width: 100%; max-width: 40ch; }
.work .index li { border-top: 1px solid var(--rule); }
.work .index li a { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; }
.work .index li a > span:first-child { white-space: nowrap; }
.work .index li a > span:last-child { text-align: right; }
.work:nth-child(even) .index li a > span:last-child { text-align: left; }
.work .index li a:hover, .work .index li a:hover .mute { color: var(--blue); }
.work:nth-child(even) .index li a { flex-direction: row-reverse; }
.work .text { grid-column: 8 / 13; display: flex; flex-direction: column; height: 100%; }
.work:nth-child(even) .cover { grid-column: 7 / 13; grid-row: 1; }
.work:nth-child(even) .text { grid-column: 1 / 6; grid-row: 1; text-align: right; align-items: flex-end; }
.work .top { display: flex; gap: 14px; }
.work:nth-child(even) .top { flex-direction: row-reverse; }
.work h3 {
  font-weight: 500; font-size: clamp(26px, 3.6vw, 52px);
  line-height: .92; letter-spacing: -.045em; margin-top: 6px;
  transition: color .3s;
}
.work .cat { font-size: clamp(14px, 1.15vw, 16px); margin-top: 6px; letter-spacing: -.01em; }
.work .more { margin-top: auto; padding-top: 24px; }
.work a:hover h3 { color: var(--blue); }
.work a:hover .cover .ph, .work a:hover .cover > img { scale: 1.025; }
.work a:hover .more .arrow { transform: translate(2px, 2px); }

.quad { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; aspect-ratio: 16 / 10; }
.work .quad { border-radius: 4px; }
.work .quad > a { display: block; min-height: 0; overflow: hidden; border-radius: 3px; }
.work .quad img { display: block; width: 100%; height: 100%; object-fit: cover; transition: scale .9s var(--ease); }
.work .quad > a:hover img { scale: 1.04; }

/* ---------- about ---------- */
.about { margin-top: clamp(88px, 14vh, 150px); align-items: start; }
.about .label { grid-column: 1 / 4; }
.about .body { grid-column: 5 / 13; }
.about .lede { font-size: clamp(19px, 1.9vw, 27px); line-height: 1.12; letter-spacing: -.025em; }
.about .cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-top: clamp(40px, 6vw, 72px); padding-top: 14px; border-top: 1px solid var(--rule); }
.about .cols p + p { margin-top: 2px; }
.about .cols .mute { margin-bottom: 8px; }
.xp dt { margin-top: 8px; }
.xp dt:first-child { margin-top: 0; }
.xp dd { color: var(--mute); }

/* ---------- footer ---------- */
footer { margin-top: clamp(88px, 14vh, 150px); background: var(--paper-2); border-top: 1px solid var(--rule); padding: clamp(40px, 6vw, 72px) var(--side) 24px; position: relative; }
.contact { row-gap: 22px; }
.contact dt { grid-column: 3 / 5; font-size: clamp(17px, 1.5vw, 21px); }
.contact dd { grid-column: 5 / 13; font-size: clamp(17px, 1.5vw, 21px); letter-spacing: -.02em; line-height: 1.2; }
.contact a { color: var(--blue); }
.contact a:hover .arrow { transform: translate(2px, 2px); }
.up { position: absolute; right: var(--side); top: 28px; font-size: 22px; }
.up:hover { color: var(--blue); }
.legal { display: flex; justify-content: space-between; margin-top: clamp(48px, 7vw, 88px); }


/* ---------- project page ---------- */
.proj-head { padding-top: clamp(32px, 7vh, 80px); }
.back { display: inline-block; margin-bottom: clamp(32px, 6vh, 64px); }
.back:hover { color: var(--blue); }
.proj-title { font-weight: 500; font-size: clamp(44px, 7vw, 104px); line-height: .86; letter-spacing: -.05em; margin-left: -.04em; }
.proj-meta { margin-top: 18px; padding-top: 10px; border-top: 1px solid var(--ink); }
.proj-meta span:nth-child(1) { grid-column: 1 / 4; }
.proj-meta span:nth-child(2) { grid-column: 4 / 10; }
.proj-meta span:nth-child(3) { grid-column: 10 / 13; text-align: right; }
.proj-question { margin-top: clamp(28px, 5vh, 56px); font-size: clamp(18px, 1.8vw, 24px); line-height: 1.2; letter-spacing: -.02em; max-width: 30ch; }
.proj-text { margin-top: clamp(40px, 7vh, 80px); align-items: start; }
.proj-lede { grid-column: 1 / 7; font-size: clamp(18px, 1.7vw, 23px); line-height: 1.16; letter-spacing: -.02em; }
.proj-body { grid-column: 8 / 13; font-size: 13.5px; line-height: 1.55; }
.proj-body p + p { margin-top: 1em; }
.gallery { margin: clamp(48px, 8vh, 96px) auto 0; max-width: 940px; display: grid; gap: clamp(8px, 1.2vw, 16px); }
.gallery figure { position: relative; border-radius: 4px; overflow: hidden; background: var(--paper-2); }
.gallery .ph { aspect-ratio: 16 / 10; }
.gallery img { display: block; width: 100%; height: auto; }
.gallery figcaption { position: absolute; right: 12px; bottom: 10px; color: #fff; mix-blend-mode: difference; }
.next { display: block; margin-top: clamp(72px, 12vh, 136px); padding-top: 14px; border-top: 1px solid var(--rule); }
.next .proj-title { margin-top: 10px; transition: color .3s; }
.next:hover .proj-title { color: var(--blue); }
.next:hover .arrow { transform: translate(3px, 3px); }
.empty { padding: 120px 0; }


/* ---------- currently ---------- */
.currently { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.currently .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--blue); animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .3; } }

/* ---------- project blocks: spec sheet, process, compare, 3d ---------- */
.block { margin-top: clamp(48px, 8vh, 96px); align-items: start; }
.block-label { grid-column: 1 / 4; padding-top: 12px; border-top: 1px solid var(--ink); }
.block-body { grid-column: 4 / 13; padding-top: 12px; border-top: 1px solid var(--rule); min-width: 0; }
.block.wide .block-label { grid-column: 1 / -1; }
.block.wide .block-body { grid-column: 1 / -1; border-top: 0; padding-top: 14px; }

.specs { display: grid; grid-template-columns: minmax(90px, 1fr) 3fr; }
.specs dt, .specs dd { padding: 9px 0; border-bottom: 1px solid var(--rule); }
.specs dt { padding-top: 12px; }
.specs dd { font-size: 14px; letter-spacing: -.01em; }
.swatches { list-style: none; display: flex; flex-wrap: wrap; gap: 14px 28px; margin-top: 24px; }
.swatches li { display: grid; grid-template-columns: auto minmax(0, 1fr); min-width: 0; column-gap: 10px; align-items: center; }
.swatches .chip { grid-row: span 2; width: 32px; height: 32px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.swatches .s { line-height: 1.2; }

.strip { display: flex; gap: clamp(8px, 1.2vw, 16px); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 14px; scrollbar-width: thin; scrollbar-color: var(--rule) transparent; outline: none; }
.strip figure { flex: 0 0 auto; scroll-snap-align: start; }
.strip img { display: block; height: clamp(160px, 16vw, 230px); width: auto; border-radius: 4px; background: var(--paper-2); }
.strip figcaption { display: flex; gap: 10px; margin-top: 8px; }
.strip figcaption span:first-child { color: var(--mute); }
.strip-hint { margin-top: 4px; }

.compare { max-width: 940px; position: relative; border-radius: 4px; overflow: hidden; background: var(--paper-2); user-select: none; touch-action: pan-y; }
.compare img { display: block; width: 100%; height: auto; }
.compare .before { position: absolute; inset: 0; height: 100%; object-fit: cover; clip-path: inset(0 calc(100% - var(--x)) 0 0); }
.compare .handle { position: absolute; top: 0; bottom: 0; left: var(--x); width: 2px; margin-left: -1px; background: var(--paper); box-shadow: 0 0 0 1px rgba(0,0,0,.12); pointer-events: none; }
.compare .handle::after { content: "↔"; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--paper); color: var(--ink); font-size: 14px; box-shadow: 0 2px 10px rgba(0,0,0,.18); }
.compare .tag { position: absolute; top: 12px; padding: 3px 8px; border-radius: 999px; background: color-mix(in srgb, var(--paper) 85%, transparent); pointer-events: none; }
.compare .tag.l { left: 12px; } .compare .tag.r { right: 12px; }
.compare input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; }
.compare:has(input:focus-visible) .handle::after { outline: 2px solid var(--blue); outline-offset: 2px; }

model-viewer { display: block; width: 100%; max-width: 940px; height: clamp(280px, 38vw, 480px); background: var(--paper-2); border-radius: 4px; --poster-color: transparent; }
.block-body > .s.mute { margin-top: 8px; }

/* ---------- hover preview on lists ---------- */
.peek { position: fixed; left: 0; top: 0; z-index: 30; width: 260px; aspect-ratio: 16 / 10; border-radius: 4px; overflow: hidden; pointer-events: none; opacity: 0; scale: .92; transition: opacity .25s, scale .35s var(--ease); box-shadow: 0 18px 40px rgba(0,0,0,.14); }
.peek.on { opacity: 1; scale: 1; }
.peek img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- contact form ---------- */
.msg { display: grid; gap: 14px; max-width: 640px; font-size: 15px; letter-spacing: 0; }
.msg-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.msg label { display: flex; flex-direction: column; gap: 4px; }
.msg input, .msg textarea { font: inherit; font-size: 15px; color: var(--ink); background: transparent; border: 0; border-bottom: 1px solid var(--rule); padding: 6px 0; outline: none; resize: vertical; border-radius: 0; transition: border-color .2s; }
.msg input:focus, .msg textarea:focus { border-color: var(--blue); }
.msg .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.msg-foot { display: flex; align-items: center; gap: 18px; }
.msg button { font: inherit; font-size: clamp(17px, 1.5vw, 21px); letter-spacing: -.02em; color: var(--blue); background: none; border: 0; cursor: pointer; padding: 0; }
.msg button:hover .arrow { transform: translate(2px, 2px); }
.msg.busy button { opacity: .4; pointer-events: none; }
.msg-status { color: var(--mute); }
.msg-status a { text-decoration: underline; }

/* ---------- reveal ---------- */
.rv { opacity: 0; transform: translateY(14px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.rv.in { opacity: 1; transform: none; }

/* ---------- motion ---------- */
/* hero: name rises line by line, rule draws in, the rest fades up after */
.rise { display: block; overflow: hidden; padding-bottom: .08em; margin-bottom: -.08em; }
.rise > span { display: block; translate: 0 105%; transition: translate 1.1s var(--ease); transition-delay: var(--d, 0ms); }
.ready .rise > span { translate: 0 0; }
.hero hr { transform-origin: left; scale: 0 1; transition: scale 1.3s var(--ease) .35s; }
.ready .hero hr { scale: 1 1; }
.hero .after { opacity: 0; translate: 0 8px; transition: opacity .9s var(--ease) .65s, translate .9s var(--ease) .65s; }
.ready .hero .after { opacity: 1; translate: 0 0; }
.reel { clip-path: inset(100% 0 0 0); transition: clip-path 1.3s var(--ease) .3s; }
.ready .reel { clip-path: inset(0 0 0 0); }

/* project rows: the cover wipes up, the title slides up, the divider draws across */
.work.rv { opacity: 1; transform: none; }
.work::after { content: ""; display: block; height: 1px; background: var(--rule); transform-origin: left; scale: 0 1; transition: scale 1.2s var(--ease) .1s; }
.work.in::after { scale: 1 1; }
.work .cover { clip-path: inset(100% 0 0 0); transition: clip-path 1.2s var(--ease); }
.work.in .cover { clip-path: inset(0 0 0 0); }
.work .cover > img { scale: 1.08; translate: 0 var(--py, 0px); }   /* slight parallax, set from scroll */
.work a:hover .cover > img { scale: 1.11; }
.work h3 { overflow: hidden; padding-bottom: .08em; margin-bottom: -.08em; }
.work h3 > span { display: inline-block; translate: 0 105%; transition: translate 1s var(--ease) .15s; }
.work.in h3 > span { translate: 0 0; }
.work .top, .work .cat, .work .desc, .work .more, .work .index { opacity: 0; transition: opacity .8s var(--ease) .35s; }
.work.in .top, .work.in .cat, .work.in .desc, .work.in .more, .work.in .index { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rv { opacity: 1; transform: none; transition: none; }
  .reel .slide { transition: none; scale: 1; }
  .currently .dot { animation: none; }
  .rise > span, .work h3 > span { translate: 0 0; transition: none; }
  .hero hr, .work::after { scale: 1 1; transition: none; }
  .hero .after, .work .top, .work .cat, .work .desc, .work .more, .work .index { opacity: 1; translate: 0 0; transition: none; }
  .reel, .work .cover { clip-path: none; transition: none; }
  .work .cover > img { translate: 0 0; scale: 1; }
}

/* ---------- small screens: follows the phone sketch ---------- */
@media (max-width: 1080px) {
  .about .cols { grid-template-columns: repeat(2, 1fr); row-gap: 32px; }
}

@media (max-width: 760px) {
  .block-label, .block-body { grid-column: 1 / -1 !important; }
  .block-label { border-top: 1px solid var(--ink); }
  .block-body { border-top: 0; padding-top: 6px; }
  .msg-row { grid-template-columns: 1fr; }
  .strip img { height: 190px; }
  .proj-lede, .proj-body { grid-column: 1 / -1; }
  .proj-body { margin-top: 28px; }
  .proj-meta span:nth-child(1) { grid-column: 1 / 7; }
  .proj-meta span:nth-child(2) { grid-column: 7 / 10; }
  .proj-meta span:nth-child(3) { grid-column: 10 / 13; }
  .hero { row-gap: 32px; }
  .hero-type, .reel { grid-column: 1 / -1; }
  .reel-frame { aspect-ratio: 4 / 3; }
  .intro .jp { display: none; }
  .intro .statement { grid-column: 1 / -1; text-align: left; }
  .jump ul { grid-column: 1 / -1; flex-wrap: wrap; gap: 20px 28px; }
  .work .cover { grid-column: 1 / 8 !important; }
  .work .text { grid-column: 8 / 13 !important; text-align: left !important; align-items: flex-start !important; }
  .work:nth-child(even) .cover { grid-column: 6 / 13 !important; }
  .work:nth-child(even) .text { grid-column: 1 / 6 !important; text-align: right !important; align-items: flex-end !important; }
  .work .top { gap: 8px; }
  .work .more, .work .desc { display: none; }
  .work h3 { font-size: clamp(21px, 6vw, 30px); }
  .work .cat { font-size: 13px; }
  .about .label, .about .body { grid-column: 1 / -1; }
  .about .label { margin-bottom: 16px; }
  .about .cols { grid-template-columns: 1fr; gap: 14px; }
  .contact dt { grid-column: 1 / 3; }
  .contact dd { grid-column: 3 / -1; }
  .legal { flex-direction: column; gap: 4px; }
}
