/* Yiwei Chen — portfolio. Helvetica, white, the work up front. */

:root {
  --bg: #fff;
  --text: #111;
  --muted: #6e6e6e;
  --rule: #e4e4e4;
  --mat: #f3f3f2;
  --font: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --side: clamp(220px, 20vw, 300px);
  --pad: clamp(20px, 3vw, 48px);
  --gap: clamp(16px, 2vw, 32px);
  --t-big: clamp(1.75rem, 2.2vw, 2.25rem);
  --t-side: clamp(1rem, 1.15vw, 1.1875rem);
  --t-h1: clamp(2.5rem, 5vw, 5rem);
  --t-small: 0.8125rem;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 1rem; line-height: 1.5; -webkit-font-smoothing: antialiased; }
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: 1rem; top: -4rem; z-index: 100; background: var(--text); color: #fff; padding: .5rem .8rem; }
.skip:focus { top: 1rem; }
.muted { color: var(--muted); }

/* ---------- sidebar ---------- */
.side {
  position: fixed; inset: 0 auto 0 0; width: var(--side); z-index: 40;
  display: flex; flex-direction: column; padding: var(--pad); padding-right: 0;
}
.name { font-size: var(--t-side); font-weight: 500; letter-spacing: -0.01em; line-height: 1.1; text-transform: uppercase; }
.nav ul { list-style: none; margin: clamp(2rem, 6vh, 3.5rem) 0 0; padding: 0; }
.nav a { display: inline-block; font-size: var(--t-side); line-height: 1.45; text-transform: uppercase; letter-spacing: -0.01em; }
.nav a:hover, .nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .18em; }
.side-note { margin: auto 0 0; font-size: var(--t-small); line-height: 1.45; color: var(--muted); min-height: 3em; }
.side-note .wip { color: var(--text); }
.menu-btn { display: none; }
main { margin-left: var(--side); min-height: 100vh; }

.foot { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; padding: 3rem var(--pad) 2rem; font-size: var(--t-small); color: var(--muted); }
.foot a:hover { color: var(--text); text-decoration: underline; }
.home .foot { display: none; }

/* ---------- home: sliding reel ---------- */
.reel-sticky { height: 100vh; display: flex; flex-direction: column; justify-content: center; overflow: hidden; }
.track {
  list-style: none; margin: 0; padding: 0 var(--pad) 0 clamp(24px, 4vw, 72px);
  display: flex; align-items: flex-end; gap: clamp(48px, 7vw, 140px);
  overflow-x: auto; scrollbar-width: none; will-change: transform;
}
.track::-webkit-scrollbar { display: none; }
.track::after { content: ""; flex: none; width: clamp(24px, 3vw, 48px); }
.js .reel.is-linked .track { overflow: visible; }
.t-item { flex: none; }
.t-item a { display: block; }
.t-media { display: block; height: var(--h, 52vh); }
.t-media img, .t-media video { height: 100%; width: auto; max-width: none; transition: transform .6s var(--ease); }
.t-media .media, .t-media .device { height: 100%; }
.t-land { --h: 50vh; }
.t-port { --h: 60vh; }
.t-square { --h: 44vh; }
.t-phone { --h: 56vh; }
.t-lab { --h: 38vh; }
.t-lab.t-port { --h: 46vh; }
.t-phone .device { width: auto; aspect-ratio: auto; padding: 8px; background: #111; border-radius: 34px; }
.t-phone .device video { border-radius: 27px; height: 100%; width: auto; }
.t-item a:hover .t-media img, .t-item a:focus-visible .t-media img { transform: scale(1.025); }
.t-cap { display: block; margin-top: .9rem; font-size: var(--t-small); }
.t-num { color: var(--muted); margin-right: .4em; }
.t-item a:hover .t-cap, .t-item a:focus-visible .t-cap { text-decoration: underline; }
.reel-bar { position: absolute; left: clamp(24px, 4vw, 72px); right: var(--pad); bottom: var(--pad); height: 1px; background: var(--rule); }
.reel-bar span { display: block; height: 100%; width: 0; background: var(--text); }
.reel-sticky { position: sticky; top: 0; }

/* ---------- inner pages ---------- */
.page-head, .cs-head { padding: var(--pad); padding-top: clamp(1.75rem, 6vh, 3.5rem); padding-bottom: 2rem; }
.h1 { margin: 0; font-size: var(--t-h1); font-weight: 500; line-height: 1; letter-spacing: -0.03em; }
.h2 { margin: 0; font-size: var(--t-big); font-weight: 500; line-height: 1.15; }
.h3 { margin: 0; font-size: 1rem; font-weight: 700; line-height: 1.3; }
.h4 { margin: 2rem 0 .4rem; font-size: var(--t-small); font-weight: 400; color: var(--muted); }
.label { margin: 0 0 .75rem; font-size: var(--t-small); color: var(--muted); }
.lede { font-size: clamp(1.25rem, 1.8vw, 1.625rem); line-height: 1.3; margin: 0 0 1rem; max-width: 32em; }
.page-head .lede { margin-top: 1rem; color: var(--muted); }
.wrap { padding-inline: var(--pad); }
.prose p { margin: 0 0 1em; max-width: 66ch; }
.caption, figcaption { margin-top: .5rem; font-size: var(--t-small); color: var(--muted); }
.btn { min-height: 34px; padding: .3rem .8rem; border: 1px solid var(--text); background: transparent; cursor: pointer; font-size: var(--t-small); }
.btn:hover, .btn[aria-pressed="true"] { background: var(--text); color: #fff; }
.controls { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: .75rem; }
.count { font-size: var(--t-small); color: var(--muted); font-variant-numeric: tabular-nums; }
.status, .status-note { font-size: var(--t-small); color: var(--muted); }
.status { margin-left: .5em; }
.status::before, .status-note::before { content: "● "; color: #8bc8c5; }
.todo { margin: 2rem var(--pad); padding: .9rem 1.1rem; border: 1px dashed #c0392b; color: #8a2a1f; font-size: var(--t-small); max-width: 72ch; }
.arrow { display: inline-block; margin-left: .3em; transition: transform .25s var(--ease); }
a:hover .arrow { transform: translateX(3px); }

/* work list */
.work-list { list-style: none; margin: 0 var(--pad) 4rem; padding: 0; border-top: 1px solid var(--text); }
.work-row a { display: grid; grid-template-columns: 7rem 1.2fr 1.4fr 1fr 3.5rem; gap: var(--gap); align-items: center; padding: .9rem 0; border-bottom: 1px solid var(--rule); }
.w-thumb { aspect-ratio: 4 / 3; overflow: hidden; background: var(--mat); }
.w-thumb img { width: 100%; height: 100%; object-fit: cover; }
.w-title { font-size: 1.25rem; font-weight: 500; }
.w-cat, .w-type, .w-year { font-size: var(--t-small); color: var(--muted); }
.w-year { text-align: right; }
.work-row a:hover .w-title { text-decoration: underline; }

/* case study */
.cs-hero { margin: 0 0 3rem; }
.cs-hero.mat { background: var(--mat); padding-block: clamp(2rem, 6vw, 5rem); }
.cs-hero.paper { background: var(--mat); }
.cs-hero .media video, .cs-hero .wrap > img { margin-inline: auto; }
.cs-hero.narrow .wrap > img { width: min(100%, 640px); }
.cs-hero .controls { justify-content: center; }
.cs-hero .caption { text-align: center; }
.cs-intro { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); margin-bottom: 5rem; }
.cs-meta { grid-column: 1 / span 4; margin: 0; font-size: var(--t-small); }
.cs-meta div { display: grid; grid-template-columns: 5.5rem 1fr; gap: .75rem; padding: .45rem 0; border-top: 1px solid var(--rule); }
.cs-meta dt { color: var(--muted); }
.cs-meta dd { margin: 0; }
.cs-overview { grid-column: 6 / span 7; }
.cs-overview p:not(.lede):not(.status-note) { max-width: 66ch; margin: 0 0 1rem; }
.cs-text, .cs-facts { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); margin-bottom: 2rem; }
.cs-text .h3, .cs-facts .h3 { grid-column: 1 / span 4; }
.cs-text .prose { grid-column: 6 / span 7; }
.cs-facts .facts { grid-column: 1 / -1; }
.facts { list-style: none; margin: 1.25rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); }
.facts li { border-top: 1px solid var(--text); padding-top: .7rem; }
.facts h3 { margin: 0 0 .3rem; font-size: 1rem; font-weight: 700; }
.facts p { margin: 0; font-size: .9375rem; color: var(--muted); }
.cs-quote { margin-block: 4rem; }
.cs-quote p { margin: 0; font-size: var(--t-h1); font-weight: 500; line-height: 1.02; letter-spacing: -0.03em; max-width: 14em; }
.cs-note { margin-block: 2rem 4rem; }
.cs-media { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); margin-bottom: clamp(2.5rem, 7vh, 5rem); align-items: start; }
.cs-media figure { margin: 0; min-width: 0; }
.cs-media > .swatches { grid-column: 1 / -1; }
.l-full > * { grid-column: 1 / -1; }
.l-wide > * { grid-column: 1 / span 11; }
.l-mid > * { grid-column: 3 / span 7; }
.l-halves > * { grid-column: span 6; }
.l-thirds > * { grid-column: span 4; }
.l-fifths { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.l-fifths > * { grid-column: auto; }
.mat { background: var(--mat); }
.mat.paper { background: var(--mat); }
figure > .mat { padding: clamp(1.5rem, 5vw, 4rem); }
figure > .mat img { margin-inline: auto; width: 70%; max-height: 60vh; object-fit: contain; }
.swatches { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr)); gap: var(--gap); font-size: var(--t-small); }
.swatches li { display: grid; gap: .1rem; }
.chip { display: block; aspect-ratio: 1; margin-bottom: .4rem; box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); }
.next-project { margin: 5rem var(--pad) 0; }
.next-project a { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); align-items: end; border-top: 1px solid var(--text); padding-top: 1rem; }
.next-project .label { grid-column: 1 / -1; margin: 0; }
.np-title { grid-column: 1 / span 6; font-size: var(--t-h1); font-weight: 500; line-height: 1; letter-spacing: -0.03em; }
.np-img { grid-column: 8 / span 5; aspect-ratio: 16 / 10; overflow: hidden; background: var(--mat); }
.np-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.next-project a:hover .np-img img { transform: scale(1.02); }
.device { width: min(100%, 340px); margin-inline: auto; padding: 9px; background: #111; border-radius: 40px; }
.device video { border-radius: 31px; width: 100%; }
.browser { background: #fff; border: 1px solid var(--rule); }
.browser::before { content: ""; display: block; height: 22px; border-bottom: 1px solid var(--rule); }
.switcher .stage { position: relative; background: var(--mat); }
.switcher .stage > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity .2s; }
.switcher .stage > img.is-active { opacity: 1; }
.toggle .stage { display: grid; }
.toggle .stage > figure { grid-area: 1 / 1; margin: 0; }
.toggle .stage > figure[hidden] { display: block; visibility: hidden; }

/* lab */
.lab-list { padding-bottom: 3rem; }
.lab-entry { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); padding-block: 2.5rem; border-top: 1px solid var(--rule); }
.lab-entry header { grid-column: 1 / span 4; }
.lab-entry header p { margin: .4rem 0 0; max-width: 40ch; }
.lab-cover, .lab-switch, .lab-thumbs { grid-column: 6 / span 7; margin: 0; }
.lab-thumbs { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: var(--gap); align-items: start; }
.lab-thumb { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.lab-thumbs .lab-thumb img { width: 100%; height: auto; }
.lab-cover .lab-thumb img { max-height: 75vh; width: auto; }
.lightbox { max-width: min(92vw, 1400px); max-height: 92vh; padding: 1rem; border: 0; background: #fff; }
.lightbox::backdrop { background: rgba(255, 255, 255, .94); }
.lightbox img { max-height: 80vh; width: auto; margin-inline: auto; }
.lb-close { float: right; background: #fff; }

/* about / contact */
.about { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); padding: 0 var(--pad) 3rem; }
.about-bio { grid-column: 1 / span 7; font-size: clamp(1.125rem, 1.4vw, 1.3125rem); }
.about-side { grid-column: 9 / span 4; font-size: .9375rem; }
.about-side .h4:first-child { margin-top: 0; }
.plain { list-style: none; margin: 0; padding: 0; }
.contact { padding: 0 var(--pad) 3rem; }
.contact .cs-meta { max-width: 34rem; font-size: 1rem; }
.contact a, .about a, .cs-overview a { text-decoration: underline; text-underline-offset: .15em; }

/* reveals: content is always visible without JS */
.js [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity .6s ease-out, transform .6s var(--ease); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- tablet ---------- */
@media (max-width: 1099px) {
  .work-row a { grid-template-columns: 6rem 1.4fr 1fr 3.5rem; }
  .w-type { display: none; }
}

/* ---------- mobile ---------- */
@media (max-width: 767px) {
  .side { position: sticky; inset: auto; top: 0; width: auto; height: auto; flex-direction: row; align-items: center; justify-content: space-between; padding: 14px 20px; background: #fff; border-bottom: 1px solid var(--rule); }
  .name { font-size: 1.125rem; }
  .menu-btn { display: inline-block; padding: .35rem .8rem; border: 1px solid var(--text); background: none; font-size: var(--t-small); }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--rule); padding: .5rem 20px 1.25rem; }
  .nav.is-open { display: block; }
  .nav ul { margin: 0; }
  .nav a { font-size: 1.75rem; padding: .2rem 0; }
  .no-js .nav { display: block; position: static; }
  .no-js .menu-btn { display: none; }
  .side-note { display: none; }
  main { margin-left: 0; }
  .home .foot { display: flex; }

  .reel { height: auto !important; }
  .reel-sticky { position: static; height: auto; overflow: visible; padding-block: 1.5rem 0; }
  .track { flex-direction: column; align-items: stretch; gap: 3rem; padding: 0 20px; overflow: visible; transform: none !important; }
  .t-media { height: auto; }
  .t-media img, .t-media video { width: 100%; height: auto; }
  .t-phone .t-media { width: 62%; }
  .t-port .t-media, .t-lab .t-media { width: 72%; }
  .t-phone .device { padding: 6px; border-radius: 28px; }
  .t-phone .device video { width: 100%; height: auto; border-radius: 22px; }
  .reel-bar { display: none; }

  .work-list { margin-inline: 20px; }
  .work-row a { grid-template-columns: 5rem 1fr; }
  .w-cat, .w-year { display: none; }
  .cs-intro, .cs-text, .cs-facts, .about, .lab-entry, .cs-media { grid-template-columns: 1fr; }
  .cs-intro > *, .cs-text > *, .cs-facts > *, .about > *, .lab-entry > *, .cs-media > * { grid-column: 1 !important; }
  .facts { grid-template-columns: 1fr 1fr; }
  .l-fifths { grid-template-columns: 1fr 1fr; }
  .next-project a { grid-template-columns: 1fr; }
  .np-title, .np-img { grid-column: 1; }
  .np-title { font-size: 2.25rem; }
  .cs-quote p { font-size: 2rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
}

/* ---------- home: one project at a time ---------- */
.clock { display: block; margin-top: .6rem; font-size: var(--t-side); line-height: 1; color: var(--text); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.show { height: calc(var(--n) * 55vh + 100vh); }
.show-pin { position: sticky; top: 0; height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(200px, 20vw); gap: var(--gap); padding: var(--pad); }
.stage { list-style: none; margin: 0; padding: 0; position: relative; }
.slide { position: absolute; inset: 0; display: grid; place-items: center; visibility: hidden; }
.slide a { position: relative; display: grid; place-items: center; width: min(100%, 62vw); height: min(100%, 72vh); }
.slide-img { position: absolute; inset: 0; transition: filter .45s var(--ease), opacity .45s; }
.slide-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.s-logo .slide-img { inset: 18% 14%; }
.slide { opacity: 0; transform: translateY(48px); transition: opacity .7s var(--ease), transform .9s var(--ease), visibility 0s .9s; }
.slide.is-before { transform: translateY(-48px); }
.slide.is-active { opacity: 1; transform: none; visibility: visible; transition: opacity .7s var(--ease) .1s, transform .9s var(--ease), visibility 0s; }
.slide-hover { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; transition: opacity .35s; font-size: var(--t-small); }
.slide-hover span { padding: .45rem .9rem; border: 1px solid var(--text); background: #fff; }
.slide a:hover .slide-img { filter: blur(10px); opacity: .5; }
.slide a:hover .slide-hover { opacity: 1; }

.slide-cap { display: none; }
.index { align-self: end; }
.index ol { list-style: none; margin: 0; padding: 0; }
.index li a { display: grid; grid-template-columns: 2rem 1fr; column-gap: .25rem; padding: .2rem 0; color: #b4b4b4; transition: color .3s; }
.index li a:hover, .index li a:focus-visible { color: var(--text); }
.index li.is-active a { color: var(--text); }
.n-num { font-size: var(--t-small); font-variant-numeric: tabular-nums; padding-top: .15em; }
.n-title { font-size: 1rem; line-height: 1.3; }
.n-meta { grid-column: 2; font-size: var(--t-small); color: var(--muted); max-height: 0; overflow: hidden; transition: max-height .45s var(--ease); }
.index li.is-active .n-meta { max-height: 2em; }
.progress { position: absolute; left: var(--pad); right: calc(var(--pad) + 20vw + var(--gap)); bottom: var(--pad); height: 1px; background: var(--rule); }
.progress span { display: block; height: 100%; width: 0; background: var(--text); transition: width .3s linear; }

@media (max-width: 767px) {
  .clock { display: none; }
  .show { height: auto; }
  .show-pin { position: static; height: auto; display: block; padding: 1rem 20px 0; }
  .stage { display: grid; gap: 2.5rem; }
  .slide, .slide.is-before { position: static; opacity: 1; transform: none; visibility: visible; }
  .slide a { width: 100%; height: auto; aspect-ratio: 4 / 3; }
  .index, .progress { display: none; }
  .slide { display: block; }
  .slide-cap { display: grid !important; width: 100%; justify-self: stretch; text-align: left; margin: .6rem 0 0; font-size: .9375rem; }
  .s-logo .slide-img { inset: 10% 8%; }
  .slide a { border-bottom: 1px solid var(--rule); }
  .slide-cap .muted { font-size: var(--t-small); }
}
@media (prefers-reduced-motion: reduce) { .slide, .slide.is-active { transition: none; transform: none; } }


/* ================= v7 ================= */
.h-page { margin: 0; font-size: clamp(1.75rem, 2.8vw, 2.75rem); font-weight: 500; line-height: 1.1; letter-spacing: .025em; }
.page-head .sub { margin: .6rem 0 0; font-size: var(--t-small); color: var(--muted); }
.about-bio { font-size: clamp(1.0625rem, 1.2vw, 1.1875rem); }

/* buttons: soft round chips; icons drawn in CSS */
.btn, .tbtn, .ibtn { -webkit-appearance: none; appearance: none; border: 0; cursor: pointer; font: inherit; color: var(--text); background: #efefed; transition: background .25s var(--ease), color .25s var(--ease), transform .25s var(--ease); }
.btn:hover, .tbtn:hover, .ibtn:hover { background: var(--text); color: #fff; }
.btn:active, .tbtn:active, .ibtn:active { transform: scale(.94); }
.ibtn { width: 40px; height: 40px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 1rem; line-height: 1; padding: 0; }
.tbtn { height: 40px; border-radius: 20px; padding: 0 1rem 0 .8rem; display: inline-flex; align-items: center; gap: .5rem; font-size: var(--t-small); }
.tbtn[aria-pressed="true"] { background: var(--text); color: #fff; }
.tbtn .lbl { display: inline-block; }
.btn { min-height: 40px; border-radius: 20px; padding: 0 1rem; }
.btn[aria-pressed="true"] { background: var(--text); color: #fff; }
.i-play { width: 0; height: 0; margin-left: 3px; border-left: 11px solid currentColor; border-top: 7px solid transparent; border-bottom: 7px solid transparent; }
.is-playing .i-play { width: 10px; height: 12px; margin: 0; border: 0; background: linear-gradient(90deg, currentColor 0 35%, transparent 35% 65%, currentColor 65%); }
.i-pause { width: 10px; height: 12px; background: linear-gradient(90deg, currentColor 0 35%, transparent 35% 65%, currentColor 65%); }
.is-paused .i-pause { width: 0; height: 0; margin-left: 3px; background: none; border-left: 11px solid currentColor; border-top: 7px solid transparent; border-bottom: 7px solid transparent; }
.eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.eq i { width: 2px; height: 4px; background: currentColor; border-radius: 1px; }
.tbtn[aria-pressed="true"] .eq i { animation: eq .9s ease-in-out infinite; }
.tbtn[aria-pressed="true"] .eq i:nth-child(2) { animation-delay: .15s; } .tbtn[aria-pressed="true"] .eq i:nth-child(3) { animation-delay: .3s; }
@keyframes eq { 0%, 100% { height: 3px; } 50% { height: 12px; } }
.controls { gap: .5rem; margin-top: .9rem; }
.count { min-width: 3.2em; text-align: center; }

/* spacing between media blocks */
.cs-media { margin-bottom: clamp(3.5rem, 10vh, 7rem); column-gap: clamp(20px, 2.6vw, 40px); row-gap: clamp(20px, 2.6vw, 40px); }
.on-grey { background: #ebebe9; padding: clamp(1.25rem, 4vw, 4rem); }
.cs-hero.narrow .wrap > img { width: min(100%, 560px); margin-inline: auto; }
.device video { width: 100%; height: auto; }
img, video { object-fit: contain; }

/* cursor label */
.cursor { position: fixed; left: 0; top: 0; z-index: 90; pointer-events: none; display: none; }
.cursor.is-on { display: block; }
.cursor span { position: absolute; left: 0; top: 0; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; background: var(--text); color: #fff;
  display: grid; place-items: center; overflow: hidden; white-space: nowrap; font-size: 0; letter-spacing: .01em;
  transition: width .35s var(--ease), height .35s var(--ease), margin .35s var(--ease), font-size .2s; }
.cursor.is-big span { width: 96px; height: 96px; margin: -48px 0 0 -48px; font-size: 12px; }
@media (hover: hover) and (pointer: fine) { [data-cursor] { cursor: none; } }

/* home: no blur; the image eases forward under the cursor */
.slide a:hover .slide-img { filter: none; opacity: 1; transform: scale(1.025); }
.slide-img { transition: transform .8s var(--ease); }

/* work panels */
.panels { list-style: none; margin: 0 0 4rem; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(28px, 4vw, 64px) clamp(16px, 2.4vw, 36px); }
.panel a { display: block; position: relative; }
.p-num { display: block; font-size: var(--t-small); color: var(--muted); margin-bottom: .5rem; font-variant-numeric: tabular-nums; }
.p-frame { position: relative; display: block; aspect-ratio: 4 / 5; background: #fff; box-shadow: inset 0 0 0 1px var(--rule); overflow: hidden; }
.p-a, .p-b { position: absolute; inset: 0; display: block; transition: transform .7s var(--ease), opacity .5s; }
.p-a img, .p-b img { position: absolute; inset: 10%; width: 80%; height: 80%; object-fit: contain; }
.p-b { transform: translateY(100%); }
.panel a:hover .p-a, .panel a:focus-visible .p-a { transform: translateY(-100%); }
.panel a:hover .p-b, .panel a:focus-visible .p-b { transform: none; }
.p-cap { display: flex; justify-content: space-between; gap: 1rem; padding-top: .7rem; margin-top: .7rem; border-top: 1px solid var(--rule); transition: border-color .4s; }
.panel a:hover .p-cap { border-top-color: var(--text); }
.p-title { font-size: 1rem; }
.p-meta { font-size: var(--t-small); color: var(--muted); text-align: right; }
.np-img { background: #fff; box-shadow: inset 0 0 0 1px var(--rule); }
.np-img img { object-fit: contain; padding: 10%; }
@media (max-width: 1099px) { .panels { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 767px) {
  .nav a { font-size: 1.25rem; }
  .name { font-size: 1rem; }
  .panels { grid-template-columns: 1fr 1fr; gap: 1.5rem .9rem; }
  .p-cap { flex-direction: column; gap: .1rem; } .p-meta { text-align: left; }
}
@media (prefers-reduced-motion: reduce) { .p-b { display: none; } .panel a:hover .p-a { transform: none; } }

/* only the Weingart magazine pages sit on grey; everything else stays on white */
.mat, .mat.paper, .cs-hero.mat, .cs-hero.paper, figure > .mat, .switcher .stage, .w-thumb, .np-img { background: transparent !important; }
.cs-hero.mat { padding-block: 0; }
figure > .mat { padding: 0; }

/* v9 */
.p-frame { box-shadow: none !important; background: #fff; }
.np-img { box-shadow: none !important; }
.cursor span { transition: width .35s var(--ease), height .35s var(--ease), margin .35s var(--ease), font-size .2s, background .3s, color .3s; }
.cursor.is-big span { width: 64px; height: 64px; margin: -32px 0 0 -32px; font-size: 11px; }
.l-stack > * { grid-column: 3 / span 8; }
.l-stack { row-gap: clamp(2.5rem, 7vh, 5rem); }
/* footer sits at the bottom, on the same line as the clock */
main { display: flex; flex-direction: column; }
.foot { margin-top: auto; padding: 4rem var(--pad) var(--pad); align-items: flex-end; line-height: 1; }
.foot > * { line-height: 1; }
@media (max-width: 767px) { .l-stack > * { grid-column: 1 / -1; } .foot { padding-bottom: 2rem; } }

/* journey map */
.cs-journey { margin-bottom: clamp(3.5rem, 10vh, 7rem); }
.journey { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--gap); position: relative; }
.journey::before { content: ""; position: absolute; left: 0; right: 0; top: .55rem; height: 1px; background: var(--text); }
.journey li { position: relative; padding-top: 1.6rem; }
.journey li::before { content: ""; position: absolute; left: 0; top: .3rem; width: .55rem; height: .55rem; border-radius: 50%; background: var(--text); }
.j-n { display: block; font-size: var(--t-small); color: var(--muted); margin-bottom: .3rem; }
.journey h3 { margin: 0 0 .35rem; font-size: 1rem; font-weight: 500; line-height: 1.25; }
.journey p { margin: 0; font-size: var(--t-small); color: var(--muted); }
.l-mailing > :first-child { grid-column: 2 / span 3; align-self: center; }
.l-mailing > :last-child { grid-column: 6 / span 7; }
@media (max-width: 900px) { .journey { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 2rem; } }
@media (max-width: 767px) { .journey { grid-template-columns: 1fr 1fr; } .l-mailing > :first-child { width: 55%; } }

.ai-tag { display: inline-block; margin-right: .5em; padding: .05em .45em; border: 1px solid currentColor; border-radius: 3px; font-size: 11px; letter-spacing: .04em; line-height: 1.4; vertical-align: .1em; }
.ai-note { max-width: 66ch; font-size: var(--t-small); color: var(--muted); }
.p-meta .ai-tag { margin: 0 0 0 .4em; }
