:root {
  color-scheme: light;
  --paper: #fff;
  --ink: #201d26;
  --muted: #595361;
  --purple: #5135a2;
  --display: 1.5rem;
  --header-measure: 80ch;
  --title-top-space: 16px;
  --section-title: 1.125rem;
  --project-title: 1.0625rem;
  --body: 1rem;
  --small: .875rem;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-synthesis: none;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); }
strong, b { font-weight: 500; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: .24em; }
a:hover { color: var(--purple); }
:focus-visible { outline: 2px solid var(--purple); outline-offset: 5px; }
p { font-size: var(--body); line-height: 1.56; margin: 0; }
h1, h2, h3 {
  margin: 0;
  line-height: 1.08;
  font-weight: 500;
  letter-spacing: -.018em;
  text-wrap: balance;
}

.wrap { width: min(calc(100% - clamp(44px, 9vw, 116px)), 900px); margin-inline: auto; }
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 58px;
}
.top a { text-decoration: none; }
.wordmark { font-size: .9375rem; font-weight: 500; letter-spacing: -.015em; }
.top nav, .links { display: flex; flex-wrap: wrap; align-items: center; gap: clamp(12px, 2vw, 22px); font-size: var(--small); }
.top [aria-current="true"], .top [aria-current="page"] { color: var(--purple); text-decoration: underline; }

.eyebrow, .project-category {
  font-size: var(--small);
  line-height: 1.35;
  color: var(--muted);
}
.hero-compact { padding: clamp(30px, 4.8vw, 58px) 0 clamp(26px, 3.6vw, 42px); }
.page-title { padding: var(--title-top-space) 0 24px; }
.hero-compact h1, .about-introduction h1, .page-title h1 { font-size: var(--display); font-weight: 500; }
.hero-compact h1 { max-width: none; white-space: nowrap; }
.page-title .eyebrow { margin-bottom: 8px; }
.intro { color: var(--muted); max-width: 53ch; margin-top: 8px; }
.detail .page-title h1 { max-width: var(--header-measure); text-wrap: balance; }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}
.section-head h2 { font-size: var(--small); color: var(--muted); font-weight: 500; letter-spacing: 0; }
.section-head a { font-size: var(--small); white-space: nowrap; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px 20px; }
.card { min-width: 0; }
.card a { display: block; text-decoration: none; }
.card figure { margin: 0; background: transparent; aspect-ratio: 1.85; overflow: hidden; }
.card img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.card img.contain { object-fit: contain; padding: 6%; }
.card img.crop { object-fit: contain; padding: 5%; }
.card a:hover img { transform: scale(1.015); }
.card .project-title { font-weight: 500; font-size: var(--project-title); margin: 9px 0 3px; text-wrap: balance; }
.card .project-summary { color: var(--muted); font-size: 1rem; max-width: 55ch; }
.card .project-category { display: block; margin-top: 5px; }

.services { margin-top: 40px; }
.columns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.columns h3 { font-size: 1rem; margin-bottom: 5px; }
.columns p { color: var(--muted); max-width: 35ch; }
.bottom { display: flex; justify-content: space-between; align-items: center; gap: 14px; min-height: 62px; margin-top: clamp(35px, 6vw, 64px); font-size: var(--small); color: var(--muted); }

.detail-hero { width: 100%; max-height: 460px; object-fit: contain; background: transparent; }
.case-role {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, max-content));
  gap: 10px 30px;
  margin: 16px 0 0;
  font-size: var(--small);
  line-height: 1.4;
}
.case-role dt { color: var(--muted); }
.case-role dd { margin: 3px 0 0; }
.detail-copy { max-width: 66ch; margin: clamp(25px, 4vw, 42px) auto; }
.detail-copy section { margin-bottom: 22px; }
.detail-copy h2 { font-weight: 500; font-size: var(--section-title); margin-bottom: 9px; text-wrap: balance; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 145px), 1fr)); gap: 14px 22px; padding: 0; margin: 0 0 32px; }
.education-stats, .email-stats { display: flex; flex-wrap: wrap; align-items: baseline; gap: 14px clamp(24px, 7vw, 70px); }
.stats strong { display: block; font-size: clamp(1.25rem, 2.5vw, 1.625rem); font-weight: 500; line-height: 1.2; letter-spacing: -.018em; color: var(--ink); }
.stats span { font-size: var(--small); color: var(--muted); }
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.gallery figure { margin: 0; background: transparent; }
.gallery img { margin: auto; width: 100%; max-height: 950px; object-fit: contain; }
.gallery .wide { grid-column: 1 / -1; }
.gallery figcaption, .campaign-grid figcaption { font-size: var(--small); line-height: 1.4; color: var(--muted); }
.gallery figcaption { padding: 8px 0; background: var(--paper); }
.videos { max-width: 930px; display: grid; gap: 24px; margin: 30px auto; }
.videos iframe, .campaign-motion iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; background: #211a28; }
.videos p, .campaign-motion p { margin: 8px 0; font-size: var(--small); }
.campaign-grid { display: grid; grid-template-columns: 1.3fr .7fr; gap: 18px; align-items: start; }
.campaign-grid figure { margin: 0; }
.campaign-grid figure img { width: 100%; height: clamp(190px, 28vw, 390px); object-fit: contain; background: transparent; }
.campaign-grid figcaption { margin-top: 8px; }
.campaign-motion { grid-column: 1 / -1; max-width: 680px; width: 100%; }
.details-nav { display: flex; justify-content: space-between; gap: 16px; margin-top: 48px; }

.about-grid { display: grid; grid-template-columns: 1fr 1.8fr; gap: clamp(25px, 6vw, 65px); }
.about-grid .portrait { width: 100%; aspect-ratio: 1.12; object-fit: cover; object-position: center bottom; background: transparent; }
.about-grid aside p { margin-top: 14px; }
.experience h2 { font-weight: 500; font-size: var(--section-title); margin-bottom: 16px; }
.experience details { margin-top: 22px; }
.experience summary { cursor: pointer; font-size: var(--body); font-weight: 500; }
.experience details p { margin-top: 8px; max-width: 64ch; }
.experience time { display: block; color: var(--muted); margin: 6px 0; font-size: var(--small); }
.personal { margin-top: 30px; }
.skip { position: absolute; left: 8px; top: 8px; padding: 10px; background: white; transform: translateY(-150%); z-index: 1; }
.skip:focus { transform: none; }

@media (max-width: 620px) {
  .hero-compact h1 {
    line-height: 1.15;
    white-space: normal;
    text-wrap: balance;
  }

  .top { min-height: 62px; }
  .grid, .about-grid, .columns, .campaign-grid, .case-role { grid-template-columns: minmax(0, 1fr); }
  .grid { gap: 29px; }
  .columns { gap: 20px; }
  .gallery { gap: 10px; }
  .about-grid .portrait { max-width: 320px; }
}
@media (max-width: 370px) {
  .wordmark { font-size: .9375rem; }
  .top nav { font-size: var(--small); gap: 8px; }
  .top { gap: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  .card img { transition: none; }
}
.experience > .intro { margin: -8px 0 16px; }
.all-work { margin-top: 24px; font-size: var(--small); }
.gallery.single { grid-template-columns: 1fr; }
.detail .gallery + .gallery { margin-top: 18px; }
@media (min-width: 621px) {
  .gallery.concepts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .gallery.devices { grid-template-columns: minmax(0, 3fr) minmax(0, 1fr); }
}
@media (max-width: 620px) {
  .gallery.concepts { grid-template-columns: 1fr; }
}

.gallery .screen-preview { background: var(--paper); }
.screen-preview > a { display: block; }
.gallery .screen-preview img { aspect-ratio: 1.6; object-fit: cover; object-position: top; }
.gallery.single .screen-preview { width: min(100%, 680px); margin-inline: auto; }
.gallery.concepts .screen-preview img { aspect-ratio: 1; }
.gallery.devices .screen-preview img { height: clamp(280px, 32vw, 440px); aspect-ratio: auto; }
@media (max-width: 620px) {
  .gallery.devices { grid-template-columns: minmax(0, 1fr); }
  .gallery.devices .screen-preview:last-child { max-width: 246px; }
}

.card .home-cover { aspect-ratio: 2 / 1; }
.home-cover.education-resource-center img { object-fit: contain; }
.home-cover.daring-labs img { object-fit: cover; object-position: center 55%; }
.card .workflow-cover { background: #fff; }
.home-cover.workflow-cover img { object-fit: contain; }
.videos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.videos h3 { font-size: 1rem; margin-bottom: 8px; }
.videos iframe { display: block; }
@media (max-width: 700px) {
  .videos { grid-template-columns: minmax(0, 1fr); }
}
.project-outcomes { max-width: 680px; }
.project-outcomes .stats { margin-bottom: 26px; }
.gallery.single .before-courses { width: min(100%, 530px); margin-inline: auto; }
.before-courses img { height: auto; }
.campaign-sequence { margin: 24px auto; }
.campaign-sequence h3 { font-size: 1rem; font-weight: 500; margin-bottom: 10px; }
.campaign-sequence ol { display: flex; gap: 6px; padding: 0 0 6px; margin: 0; overflow-x: auto; list-style: none; scroll-snap-type: x proximity; }
.campaign-sequence li { flex: 1 0 0; min-width: 0; scroll-snap-align: start; }
.campaign-sequence img { width: 100%; height: auto; }
@media (max-width: 800px) {
  .campaign-sequence li { flex: 0 0 clamp(160px, 52vw, 235px); }
}
.workflow-films { max-width: 760px; margin: clamp(32px, 5vw, 56px) auto; }
.workflow-films h2 { margin-bottom: 16px; font-size: var(--section-title); font-weight: 500; }
.film-lineup { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 24px 14px; }
.motion-films { grid-template-columns: repeat(2,minmax(0,1fr)); }
.film-lineup figure { margin: 0; }
.film-lineup figure:first-child { grid-column: 1 / -1; }
.film-lineup iframe { display: block; border: 0; width: 100%; aspect-ratio: 16/9; }
.film-lineup figcaption { margin-top: 6px; font-size: var(--small); }
.film-lineup a { text-decoration: none; }
.film-lineup a:hover { text-decoration: underline; }
@media (max-width: 700px) {
  .film-lineup { grid-template-columns: 1fr; gap: 20px; }
}
.gallery.single .priority-preview { width: 100%; }
.priority-preview img { height: auto; }
.image-viewer { position: fixed; inset: 0; width: min(100%, 1100px); max-width: 100%; height: 92dvh; max-height: 100%; margin: auto; border: 0; padding: 0 16px 16px; overflow: auto; overscroll-behavior: contain; }
.image-viewer::backdrop { background: rgb(0 0 0 / 65%); }
.image-viewer form { position: sticky; top: 0; display: flex; justify-content: flex-end; margin: 0; padding: 8px 0; background: white; }
.image-viewer button { cursor: pointer; color: inherit; background: white; font: inherit; border: 0; padding: 0; width: 44px; height: 44px; display: grid; place-items: center; }
.image-viewer img { margin: auto; height: auto; }

.top { min-height: 0; padding-top: 20px; }
.home .hero-compact { padding-block: var(--title-top-space) calc(clamp(40px, 6vw, 72px) + 64px); }
.home .section-head { margin-bottom: 20px; }
.home .grid { gap: clamp(38px, 5vw, 58px) clamp(24px, 4vw, 42px); }
.home .project-title { margin-block: 14px 5px; }
.home .all-work { margin-top: 36px; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.work-index .grid { padding-top: clamp(20px, 3vw, 36px); }
.work-index .grid { gap: clamp(40px, 5vw, 60px) clamp(24px, 4vw, 44px); }
.work-index .project-title { margin-block: 14px 5px; }

.about-page { --about-columns: minmax(0, 1fr) minmax(160px, 230px); --about-gap: clamp(28px, 7vw, 88px); }
.about-introduction { display: grid; grid-template-columns: var(--about-columns); align-items: start; gap: var(--about-gap); padding-block: var(--title-top-space) clamp(38px, 6vw, 70px); }
.about-introduction p { max-width: var(--header-measure); margin-top: 14px; }
.about-introduction p + p { color: var(--muted); }
.about-introduction .portrait { width: 100%; height: auto; }

.about-page h2 { font-size: var(--small); font-weight: 400; color: var(--muted); margin-bottom: 16px; }
.about-history section { margin-bottom: 30px; }
.about-history section header { display: grid; grid-template-columns: var(--about-columns); align-items: baseline; gap: 4px var(--about-gap); }
.about-history h3 { font-size: var(--body); font-weight: 500; }
.about-history time { color: var(--muted); font-size: var(--small); }
.about-history p { max-width: 68ch; margin-top: 6px; }
.about-education { margin-top: 38px; }
@media (max-width: 620px) {
  .about-page { --about-columns: 1fr; }
  .about-introduction .portrait { max-width: 180px; }
}

.daring-labs .detail-hero,
.daring-labs .gallery img {
  width: 100%;
  height: auto;
  max-height: none;
}
.project-outcomes .award-credit { margin: -10px 0 26px; font-size: var(--small); font-weight: 500; }

/* Balance short blocks and give longer paragraphs a fuller last line. */
p { text-wrap: pretty; }
.intro, .project-summary, figcaption, .stats span, .details-nav a {
  text-wrap: balance;
}

.home .hero-compact .intro {
  max-width: var(--header-measure);
  margin-top: 6px;
  line-height: 1.45;
  text-wrap: pretty;
}


.project-outcomes .stats strong { color: var(--purple); }
::selection { background: #e7dff6; color: var(--ink); }

@media (prefers-reduced-motion: no-preference) {
  a { transition: color 160ms ease; }
  :is(.hero-compact, .page-title, .section-head, .card, .project-outcomes, .detail-hero, .about-introduction > *) { animation: page-arrival 540ms cubic-bezier(.42, 0, .35, 1) var(--entry-delay, 0ms) backwards; }
  :is(.section-head, .project-outcomes, .about-introduction .portrait) { --entry-delay: 65ms; }
  .card, .detail-hero { --entry-delay: 130ms; }
  .card:nth-child(even) { --entry-delay: 195ms; }
  @keyframes page-arrival {
    from { opacity: .45; transform: translateY(3px); }
    to { opacity: 1; transform: translateY(0); }
  }
  .image-viewer[open] { animation: intro-arrival 180ms ease-out both; }
}
@keyframes intro-arrival {
  from { opacity: .65; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .card a:hover img { transform: none; }
}

/* Homepage palette */
.home ::selection { background: #4cc9f0; color: var(--ink); }
.discipline-brand, .discipline-web, .discipline-product {
  color: var(--ink);
  text-decoration-line: underline;
  text-decoration-thickness: 3px;
  text-underline-offset: .13em;
}
.discipline-brand { text-decoration-color: #ff2448; }
.discipline-web { text-decoration-color: #007aff; }
.discipline-product { text-decoration-color: #ffbd00; }

@media (prefers-reduced-motion: no-preference) {
  .reveal-pending { opacity: 0; }
  .scroll-arrival { animation: scroll-arrival 950ms ease-in-out backwards; }
  .reveal-pending:focus-within { opacity: 1; }
  @keyframes scroll-arrival {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
  }
}
.page-title .intro { max-width: var(--header-measure); text-wrap: pretty; }

.current-role { position: relative; }
.current-role::before {
  content: "";
  position: absolute;
  inset-inline-start: -14px;
  top: 0.5lh;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #258447;
}

@media (min-width: 720px) {
  :is(.project-page, .home, .about, .work-index) .wrap { width: min(88%, 820px); }
}

.detail .detail-copy {
  max-width: none;
  margin-block: clamp(48px, 7vw, 90px);
}
.detail .detail-copy section { margin: 0; }
.detail .detail-copy h2,
.detail .workflow-films h2 {
  max-width: none;
  font-size: var(--body);
  font-weight: 500;
  line-height: 1.3;
  margin: 0 0 10px;
}
.detail .detail-copy p {
  max-width: none;
  line-height: 1.55;
}
.detail .detail-copy p + p { margin-top: 1.25em; }

.study-panels small { color: var(--muted); font-size: var(--small); }
.study-panels { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 20px; margin-top: 24px; }
.study-panels figure, .study-panels dd { margin: 0; }
.study-panels figcaption { font-weight: 500; }
.study-panels dl { margin: 16px 0 8px; font-size: var(--small); font-variant-numeric: tabular-nums; }
.study-panels dl > div { display: grid; grid-template-columns: 7ch 1fr; align-items: center; gap: 8px; padding-block: 5px; }
.study-panels dd { display: grid; grid-template-columns: 1fr 1ch; align-items: center; gap: 10px; }
.study-track { background: #e6e5e4; height: 5px; }
.study-track i { display: block; height: 100%; background: var(--bar-color); }
@media (max-width: 800px) {
  .study-panels { grid-template-columns: 1fr; gap: 24px; }
}

.detail .detail-hero + .detail-copy { margin-top: clamp(42px, 6vw, 72px); }

.concept-comparison {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  row-gap: 24px;
}
@media (max-width: 600px) {
  .concept-comparison { grid-template-columns: 1fr; }
}

@media (any-hover: hover) and (any-pointer: fine) {
  a[href], a[href] * { cursor: url("/media/mochi-cursor.png") 16 19, pointer; }
}

.mochi-cursor {
  position: fixed;
  inset: 0 auto auto 0;
  z-index: 2147483647;
  pointer-events: none;
}
.mochi-cursor img { transform-origin: 16px 19px; }
.mochi-cursor span {
  position: absolute;
  white-space: nowrap;
  background: var(--ink);
  color: white;
  border-radius: 1rem;
  padding: 3px 9px;
  font-size: .8125rem;
}
.mochi-active a[href], .mochi-active a[href] * { cursor: none; }
@media (prefers-reduced-motion: no-preference) {
  .mochi-cursor img { animation: mochi-wiggle 1.8s ease-in-out infinite; }
  @keyframes mochi-wiggle {
    0%, 56%, 100% { transform: rotate(0); }
    16% { transform: rotate(-9deg); }
    36% { transform: rotate(8deg); }
  }
}
