:root{
  --paper:#fff;
  --page-gutter:clamp(16px,3vw,38.4px);
  --outer-space:5vw;
  --grid-gap-x:3%;
  --grid-gap-y:20px;
}

/* Shared global header: 1280 desktop, 768 tablet, and 390 mobile references. */
.site-header{--header-mark-size:109px;height:109px;padding:5px var(--page-gutter);align-items:start}
.site-header .mark-link{align-self:center;width:var(--header-mark-size);height:var(--header-mark-size);transform:scale(.92)}
.site-header .nav-link{align-self:center}
main{padding-inline:var(--page-gutter)}

/* The centred mark scales with the viewport, so its desktop header grows with
   it. At 1280px the header remains the specified 109px. */
@media(min-width:1001px){
  .site-header{--header-mark-size:max(109px,7.734375vw);height:var(--header-mark-size)}
}

/* Project pages: top grid, then a consistent 20px vertical rhythm. */
.case-study{padding:var(--outer-space) var(--page-gutter) var(--outer-space)}
.case-intro{column-gap:var(--grid-gap-x)}
.case-media{column-gap:var(--grid-gap-x);row-gap:var(--grid-gap-y);margin-top:var(--grid-gap-y)}
.case-media figure:only-child{max-width:calc((100% - var(--grid-gap-x))/2)}
.case-media img{height:auto;aspect-ratio:auto;object-fit:contain;background:transparent}
.case-footnote,.case-flex,.case-video,.case-links{margin-top:var(--grid-gap-y)}

/* Shared project-intro type scale from the Wix design. */
.case-intro h1{font-size:40px}
.case-intro dd,.case-description{font-size:22px}
.case-description.is-poem{white-space:pre-line}
.case-footnote,.case-footnote.is-full,.case-links a{font-size:22px}
.case-footnote.is-full{max-width:none;width:100%}
.case-links.is-centered-stack{display:flex;flex-direction:column;align-items:center;width:max-content;max-width:100%;margin:0 auto;padding-block:5%;row-gap:0;text-align:center}
.case-links.is-centered-stack a{font-family:"Open Sans Condensed","Arial Narrow",Arial,sans-serif;font-weight:300;text-align:center}
.case-video:has(.external-video){max-width:none}
.case-video.is-full{max-width:none}
.case-video.is-full figcaption{display:none}
.external-video{position:relative;display:block;color:inherit;text-decoration:none}
.video-launch{width:100%;padding:0;border:0;background:transparent;cursor:pointer}
.external-video img{display:block;width:100%;height:auto}
.external-video::before{content:"";position:absolute;top:50%;left:50%;width:clamp(58px,6vw,96px);aspect-ratio:1;transform:translate(-50%,-50%);border-radius:50%;background:linear-gradient(145deg,rgb(255 255 255 / .55),rgb(255 255 255 / .16));border:1px solid rgb(255 255 255 / .55);box-shadow:inset 0 1px 1px rgb(255 255 255 / .65),0 12px 30px rgb(0 0 0 / .22);backdrop-filter:blur(14px) saturate(145%);-webkit-backdrop-filter:blur(14px) saturate(145%);transition:transform .2s ease,background .2s ease}
.external-video::after{content:"";position:absolute;top:50%;left:50%;transform:translate(-38%,-50%);border-top:clamp(10px,1.1vw,17px) solid transparent;border-bottom:clamp(10px,1.1vw,17px) solid transparent;border-left:clamp(14px,1.5vw,23px) solid rgb(28 28 28 / .88);filter:drop-shadow(0 1px 1px rgb(255 255 255 / .4))}
.external-video span{display:none}
.external-video strong{font-family:var(--title-font);font-weight:400}
.external-video em{font-style:normal;text-decoration:underline;text-underline-offset:3px}
.external-video:hover::before,.external-video:focus-visible::before{transform:translate(-50%,-50%) scale(1.08);background:linear-gradient(145deg,rgb(255 255 255 / .7),rgb(255 255 255 / .25))}
.external-video:hover em,.external-video:focus-visible em{text-decoration-thickness:2px}

/* Home project rhythm: image → text block → next image row. */
.project-grid{row-gap:20px}
.project-copy{padding-top:20px}

/* The filters keep the same 20px rhythm as the project grid. */
.filters{padding:20px 0}
@media(min-width:450px) and (max-width:1000px){
  .filters{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;flex-wrap:nowrap}
  .filter,.filter:nth-child(3),.filter:nth-child(4){width:max-content;min-width:137px;height:auto;padding:10px 9px 8px;font-size:17px;white-space:nowrap}
  .filter:nth-child(2){justify-self:start}
  .filter:nth-child(3){justify-self:center}
  .filter:nth-child(4){justify-self:end}
}
@media(max-width:449px){
  .filters{display:flex;flex-direction:column;align-items:center;gap:20px;flex-wrap:nowrap}
  .filter,.filter:nth-child(3),.filter:nth-child(4){display:flex;align-items:center;justify-content:center;width:137px;height:42px;min-width:137px;padding:0;font-size:17px;white-space:nowrap}
}

/* Home only: a sticky, translucent liquid-glass header. */
.home-header{
  --home-header-height:max(109px,7.734375vw);
  position:sticky;
  top:0;
  z-index:20;
  isolation:isolate;
  height:var(--home-header-height);
  align-items:center;
  padding-block:0;
  border:0;
  background:linear-gradient(120deg,rgb(255 255 255 / .12),rgb(246 249 255 / .04));
  box-shadow:none;
  backdrop-filter:blur(5px) saturate(128%) contrast(106%);
  -webkit-backdrop-filter:blur(5px) saturate(128%) contrast(106%);
}
.home-header .nav-link{position:relative;z-index:1}

/* The intentional project-intro composition: title top-left; details and text bottom. */
@media(min-width:751px){
  .case-left{align-self:stretch;justify-content:space-between}
  .case-intro dl{margin:0}
  .case-description{align-self:end}
}

@media(min-width:751px) and (max-width:1000px){
  /* Wix's tablet section uses a visibly wider 5% inset than the desktop
     layout, while the title and description remain in two columns. */
  :root{--page-gutter:5vw}
  .site-header{--header-mark-size:100px;height:var(--header-mark-size);padding-block:10px}
  .mark-link{width:100px;height:100px}
  .home-header{--home-header-height:100px;height:var(--home-header-height);padding-block:0}
  .case-intro{column-gap:20px}
  /* Keep the textual intro in two columns, but give documentation imagery
     its full width in a vertical sequence at tablet sizes. */
  .case-media{grid-template-columns:1fr}
}

@media(max-width:750px){
  .site-header{--header-mark-size:97px;height:var(--header-mark-size);padding-block:18px}
  .home-header{--home-header-height:97px;height:var(--home-header-height);padding-block:0}
  .case-study{padding:var(--outer-space) var(--page-gutter)}
  .case-intro dl{margin-bottom:20px}
  .case-description{margin-bottom:0}
  .case-media{gap:var(--grid-gap-y);margin-top:var(--grid-gap-y)}
  .case-media figure:only-child{max-width:none}
  .case-footnote,.case-flex,.case-video,.case-links{margin-top:var(--grid-gap-y)}
  .external-video span{align-items:flex-start;flex-direction:column;font-size:17px}
}

/* Complete local case studies and process documentation. */
.case-media.is-full{grid-template-columns:1fr}
.case-media.is-full figure:only-child{max-width:none}
.process-section{margin-top:64px}
.process-section h2{font-size:32px;line-height:1.2;margin:0 0 24px}
.process-section p{font-size:22px;line-height:1.6;margin:0 0 20px;max-width:1000px}
.process-gallery{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px;margin-top:24px;align-items:start}
.process-gallery img{display:block;width:100%;height:auto;min-width:0}
.process-gallery img:only-child{grid-column:1/-1}
.process-gallery.wireframes{grid-template-columns:repeat(6,minmax(0,1fr))}
.process-section video,.case-video video{display:block;width:100%;height:auto;background:#111}
.process-section .portrait-video{width:min(100%,400px);margin-inline:auto;background:transparent}
.case-video:has(video){max-width:none}
.case-intro h1{line-height:1.15;letter-spacing:0}
.case-title{margin-bottom:20px}
.case-description{letter-spacing:0}
.project-copy strong,.project-copy span{line-height:1.35}
.filters{padding-bottom:20px}
.filter{font-family:"Open Sans Condensed","Arial Narrow",Arial,sans-serif}
.section-heading h1{letter-spacing:0}
.portrait{border-radius:40% 0 40% 0;max-height:none}
.statement{font-size:22px;line-height:1.6}
.statement-note{font-size:18px}
@media(min-width:1001px){
 .about-layout{grid-template-columns:30% 13% minmax(0,1fr);column-gap:6%;align-items:start}
 .contact{font-size:22px}
 .project img{aspect-ratio:1.73}
 :root{--grid-gap-x:4.16%}
}
@media(max-width:750px){
 .process-section{margin-top:40px}
 .process-section h2{font-size:28px}
 .process-gallery{grid-template-columns:1fr}
 .process-gallery.wireframes{grid-template-columns:repeat(2,minmax(0,1fr))}
 .process-section p{font-size:20px}
 .case-intro h1{overflow-wrap:anywhere}
 .about-layout{padding-top:24px}
 .portrait{width:100%;max-width:400px}
 .filters{padding-bottom:20px}
}
@font-face{font-family:"DIN Condensed Local";src:url("assets/fonts/din-condensed.woff2") format("woff2");font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:"Open Sans Condensed";src:url("assets/fonts/open-sans-condensed-light.woff2") format("woff2");font-weight:300;font-style:normal;font-display:swap}
@font-face{font-family:"Glow Sans SC Condensed";src:url("assets/fonts/glow-sans-sc-condensed-light.otf") format("opentype");font-weight:300;font-style:normal;font-display:swap}
@font-face{font-family:"Glow Sans SC Condensed";src:url("assets/fonts/glow-sans-sc-condensed-bold.otf") format("opentype");font-weight:700;font-style:normal;font-display:swap}
:root{--title-font:"DIN Condensed Local","Oswald","Arial Narrow",sans-serif}
.language-switch{justify-self:start;align-self:center;display:inline-flex;align-items:center;gap:4px;font-family:var(--title-font);font-size:18px;line-height:1;white-space:nowrap}
.language-switch button{appearance:none;border:0;padding:0;background:transparent;color:inherit;font:inherit;cursor:pointer;opacity:.45}
.language-switch button.is-active{opacity:1;text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:4px}
.language-switch span{opacity:.35}
html[lang="zh-CN"] body,html[lang="zh-CN"] .filter,html[lang="zh-CN"] .project-copy,html[lang="zh-CN"] .case-intro,html[lang="zh-CN"] .case-footnote,html[lang="zh-CN"] .statement,html[lang="zh-CN"] .section-heading h1{font-family:"Glow Sans SC Condensed","PingFang SC","Microsoft YaHei",sans-serif;font-stretch:normal}
html[lang="zh-CN"] .about .section-heading h1{font-weight:700!important}
html[lang="zh-CN"] h1,html[lang="zh-CN"] h2,html[lang="zh-CN"] h3,html[lang="zh-CN"] .project-copy strong{font-family:var(--title-font),"Glow Sans SC Condensed","PingFang SC","Microsoft YaHei",sans-serif}
html[lang="zh-CN"] .nav-link,html[lang="zh-CN"] .project-copy span,html[lang="zh-CN"] .case-links a{font-family:"Glow Sans SC Condensed","PingFang SC","Microsoft YaHei",sans-serif}
html[lang="zh-CN"] .nav-link{font-size:18px;font-weight:700!important}
html[lang="zh-CN"] .language-switch button{font-family:"Glow Sans SC Condensed","PingFang SC","Microsoft YaHei",sans-serif}
html[lang="zh-CN"] .language-switch [data-language="en"]{font-family:var(--title-font)}
html[lang="zh-CN"] #work-heading,html[lang="zh-CN"] .project-copy span{font-weight:700!important}
html[lang="zh-CN"] .project-copy span{font-size:18px}
html[lang="zh-CN"] .project-copy span .latin-3d{font-family:var(--title-font);font-size:20px;font-weight:400}
html[lang="zh-CN"] .latin-content{font-family:"Open Sans Condensed","Arial Narrow",Arial,sans-serif;font-weight:300}
.case-description,.case-intro dd,.case-footnote{font-weight:300}
.project-link:focus-visible,.filter:focus-visible,.mark-link:focus-visible,a:focus-visible{outline:2px solid #625980;outline-offset:5px}
.case-media.is-full figure:only-child{max-width:none;width:100%}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}.project img{transition:none}}
.project-link{display:block;text-decoration:none}
#project-sections{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:4.16%;align-items:start}
.process-section{grid-column:1/-1;margin-top:20px}
.process-research{grid-column:auto}
.process-persona{display:grid;grid-template-columns:40% 57%;column-gap:3%;position:relative}
.process-persona h2,.process-persona p{grid-column:1}
.process-persona .process-gallery{grid-column:2;grid-row:1/span 5;margin-top:0;display:block}
.process-persona .process-gallery img:nth-child(-n+2){display:none}
.process-persona::after{content:"";display:block;grid-column:1;grid-row:2;width:70%;aspect-ratio:1;background:url('assets/projects/diancy/11.png.webp.webp') center/contain no-repeat;margin:20px auto}
.process-persona p{margin:0 0 20px}
.process-wireframes{display:grid;grid-template-columns:40% 57%;gap:20px 3%;align-items:start}
.process-wireframes h2{grid-column:1;grid-row:1}
.wireframe-diagrams{grid-column:1;grid-row:2;display:grid;gap:20px}
.wireframe-diagrams img{width:100%;height:auto;display:block}
.process-wireframes .wireframes{grid-column:2;grid-row:1/span 2;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px 10px;margin-top:0}
body[data-project="diancy"] #project-media img{aspect-ratio:2017/1162;object-fit:cover}
body[data-project="3d-demo"] #project-media{grid-template-columns:repeat(2,minmax(0,1fr))}
body[data-project="3d-demo"] #project-media figure{grid-column:auto}
body[data-project="museumofgarbage"] #project-media{align-items:stretch}
body[data-project="museumofgarbage"] #project-media figure:first-child{grid-row:span 2}
body[data-project="museumofgarbage"] #project-media img{height:100%;object-fit:cover}
/* At intermediate desktop widths, contact follows the portrait instead of
   competing with the statement for a narrow centre column. */
@media(min-width:761px) and (max-width:1200px){
 .about-layout{grid-template-columns:minmax(220px,.65fr) minmax(0,1fr);grid-template-areas:"portrait statement" "contact statement";column-gap:44px;row-gap:28px;align-items:start}
 .about-layout .portrait{grid-area:portrait}
 .about-layout .contact{grid-area:contact;justify-self:start;align-self:start}
 .about-layout .statement{grid-area:statement}
}
@media(max-width:750px){
 #project-sections{display:block}
 .process-section{margin-top:30px}
 .process-persona,.process-wireframes{display:block}
 .process-persona::after{display:none}
 .process-persona .process-gallery img:first-child{display:block;width:65%;margin:0 auto 20px}
 .process-wireframes .wireframes{margin-top:20px}
 body[data-project="museumofgarbage"] #project-media figure:first-child{grid-row:auto}
}
@media(max-width:760px){.about-layout .portrait{margin-inline:auto}}
