/*
  Studio system v6
  Image-first editorial portfolio system inspired by MOUTHWASH's principles:
  one neutral canvas, expressive scale, project-led pacing, direct navigation,
  and typography that supports rather than frames the work.
*/
:root {
  --background: #ffffff;
  --surface: #ffffff;
  --foreground: #111111;
  --text-secondary: #3d3d3d;
  --text-muted: #5f5f5f;
  --text-tertiary: #6b6b6b;
  --border: rgba(17, 17, 17, 0.22);
  --border-soft: rgba(17, 17, 17, 0.12);
  --disabled: #a3a3a3;
  --ai-accent: #111111;
  --media-surface: #f4f4f2;
  --media-line: rgba(17, 17, 17, 0.12);
  --font-sans: "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  --font-cjk: "PingFang SC", "Noto Sans SC", "Source Han Sans SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  --max-width: 1500px;
  --page-pad: clamp(18px, 3vw, 48px);
  --section-gap: clamp(112px, 12vw, 190px);
  --header-height: 60px;
  --radius: 14px;
  --hairline: 0 0 0 1px rgba(17, 17, 17, 0.14);
}

html { scroll-padding-top: calc(var(--header-height) + 24px); }
body {
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-cjk);
  font-size: 16px;
  line-height: 1.55;
  letter-spacing: -0.006em;
}
::selection { background: var(--foreground); color: var(--background); }
:focus-visible { outline: 1px solid var(--foreground); outline-offset: 5px; }
.shell, .page-shell, .site-nav, .footer-grid {
  width: min(calc(100% - (var(--page-pad) * 2)), var(--max-width));
}

/* Navigation — direct, flat and typographic */
.site-header {
  height: var(--header-height);
  border-bottom: 1px solid transparent;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.site-header[data-scrolled="true"] {
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.985);
}
.site-nav { gap: 32px; }
.brand { gap: 9px; }
.brand-mark {
  display: inline-flex;
  width: auto;
  height: auto;
  border: 0;
  border-radius: 0;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.01em;
}
.brand-mark::after {
  margin-left: 9px;
  color: var(--text-tertiary);
  font-weight: 400;
  content: "/";
}
.brand-name, .brand-zh {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.015em;
}
.nav-links { gap: clamp(20px, 2.2vw, 38px); }
.nav-links > a, .nav-dd-trigger {
  min-height: 42px;
  color: var(--foreground);
  font-size: 13px;
  letter-spacing: -0.012em;
}
.nav-links > a::after {
  position: absolute;
  right: 0;
  bottom: 5px;
  left: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 190ms ease;
  content: "";
}
.nav-links > a:hover::after,
.nav-links > a:focus-visible::after,
.nav-links > a[aria-current="true"]::after {
  transform: scaleX(1);
  transform-origin: left;
}
.nav-resume { padding-left: 0; border-left: 0; }

/* Small labels no longer carry a product-system mono aesthetic */
.eyebrow, .kicker, .cs-eyebrow, .case-meta .cm-k, .proc-k, .tf-k,
.kj-k, .cue-label, .scope-label, .sg-label, .asset-code, .asset-status,
.exp-period, .project-tag, .col-tag {
  color: var(--text-tertiary);
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.text-link {
  position: relative;
  gap: 8px;
  min-height: 42px;
  color: var(--foreground);
  font-size: 13px;
}
.text-link::after {
  position: absolute;
  right: 0;
  bottom: 5px;
  left: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 190ms ease;
  content: "";
}
.text-link:hover { text-decoration: none; }
.text-link:hover::after, .text-link:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}
.primary-button, .secondary-button, .pill, .pcta-link {
  border-radius: 0;
  box-shadow: none;
}

/* Hero — statement first, interface detail second */
.home-hero {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: start;
  gap: 0 20px;
  min-height: 0;
  padding-top: clamp(74px, 8vw, 122px);
  padding-bottom: clamp(96px, 10vw, 152px);
}
.hero-identity { grid-column: 1 / 4; }
.hero-copy { grid-column: 4 / 13; }
.home-hero h1 {
  margin-top: clamp(42px, 7vw, 92px);
  font-size: clamp(48px, 5.4vw, 78px);
  font-weight: 560;
  line-height: 0.98;
  letter-spacing: -0.055em;
}
.hero-role {
  max-width: 980px;
  margin-top: 0;
  font-size: clamp(48px, 6.1vw, 92px);
  font-weight: 590;
  line-height: 0.97;
  letter-spacing: -0.058em;
  text-wrap: balance;
}
.hero-tagline-home {
  margin-top: 28px;
  color: var(--foreground);
  font-size: clamp(15px, 1.2vw, 18px);
  line-height: 1.55;
}
.hero-intro {
  max-width: 850px;
  margin-top: 38px;
  color: var(--text-secondary);
  font-size: clamp(15px, 1.2vw, 17px);
  line-height: 1.8;
}
.hero-skills {
  gap: 7px 0;
  margin-top: 36px;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 10px;
  letter-spacing: 0.045em;
}
.hero-skills li { display: inline-flex; align-items: center; }
.hero-skills li + li::before {
  margin-inline: 14px;
  color: var(--text-tertiary);
  content: "/";
}
.hero-meta {
  gap: 4px 24px;
  margin-top: 30px;
  color: var(--foreground);
  font-size: 13px;
}
.status i {
  width: 6px;
  height: 6px;
  background: var(--foreground);
  box-shadow: none;
}
.workflow-status {
  grid-column: 4 / 13;
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  align-items: start;
  gap: 0 24px;
  margin-top: clamp(72px, 8vw, 116px);
  padding: 0;
  border-top: 1px solid var(--foreground);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font-family: var(--font-sans);
}
.workflow-head {
  display: block;
  padding: 14px 0 0;
  border: 0;
  color: var(--foreground);
  font-size: 10px;
  line-height: 1.5;
}
.workflow-head span { display: block; }
.workflow-head span:last-child { margin-top: 4px; color: var(--foreground); }
.workflow-status ol {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  list-style: none;
}
.workflow-status li {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 18px 8px;
  min-height: 0;
  padding: 14px 12px 18px 0;
  border-bottom: 1px solid var(--border-soft);
  color: var(--text-tertiary);
  font-size: 10px;
  letter-spacing: 0.04em;
}
.workflow-status li + li { padding-left: 12px; border-left: 1px solid var(--border-soft); }
.workflow-status li span { grid-column: 1; color: inherit; }
.workflow-status li b { grid-column: 1; grid-row: 2; font-weight: 500; }
.workflow-status li i {
  grid-column: 2;
  grid-row: 1;
  width: 6px;
  height: 6px;
  border-color: var(--text-tertiary);
}
.workflow-status li[data-state="done"] i { border-color: var(--foreground); background: var(--foreground); }
.workflow-status li[data-state="active"] i { border-color: var(--foreground); box-shadow: 0 0 0 2px var(--background), 0 0 0 3px var(--foreground); }
.workflow-status > p {
  grid-column: 2;
  margin-top: 10px;
  padding: 0;
  border: 0;
  color: var(--text-tertiary);
  font-size: 10px;
}

/* Sections — black rules and large editorial hierarchy */
.section {
  padding-block: var(--section-gap);
  border-top: 1px solid var(--foreground);
}
.section-heading {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: start;
  gap: 20px;
  margin-bottom: clamp(68px, 8vw, 120px);
}
.section-heading > .eyebrow { grid-column: 1 / 4; padding-top: 10px; }
.section-heading h2 {
  grid-column: 4 / 10;
  max-width: none;
  font-size: clamp(50px, 6vw, 88px);
  font-weight: 590;
  line-height: 0.95;
  letter-spacing: -0.06em;
}
.section-heading > .text-link,
.section-heading > .section-copy {
  grid-column: 10 / 13;
  max-width: none;
}
.section-copy {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.7;
}

/* Selected work — native image ratios and art-directed cadence */
.selected-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 0 20px;
  align-items: start;
}
.selected-card { min-width: 0; }
.selected-card > a { display: block; }
.selected-card.layout-lead { grid-column: 1 / 13; }
.selected-card.layout-lead > a {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: end;
  gap: 20px;
}
.selected-card.layout-lead .selected-media { grid-column: 1 / 9; max-width: none; }
.selected-card.layout-lead .selected-meta { grid-column: 9 / 13; max-width: none; padding: 0 0 2px; }
.selected-card.layout-portrait { grid-column: 1 / 6; margin-top: clamp(120px, 14vw, 220px); }
.selected-card.layout-landscape-offset { grid-column: 7 / 13; margin-top: clamp(220px, 26vw, 400px); }
.selected-card.layout-panorama { grid-column: 1 / 13; margin-top: clamp(150px, 18vw, 270px); }
.selected-card.layout-left { grid-column: 1 / 7; margin-top: clamp(150px, 18vw, 260px); }
.selected-card.layout-right { grid-column: 7 / 13; margin-top: clamp(250px, 28vw, 430px); }
.selected-card.layout-left-wide { grid-column: 1 / 8; margin-top: clamp(150px, 18vw, 270px); }
.selected-card.layout-right-narrow { grid-column: 9 / 13; margin-top: clamp(300px, 32vw, 480px); }
.selected-media {
  position: relative;
  display: block;
  overflow: hidden;
  border: 0;
  background: transparent;
}
.selected-media::after { display: none; }
.selected-media img {
  position: static;
  width: 100%;
  height: auto;
  max-width: none;
  object-fit: initial;
  transform-origin: center;
  transition: transform 350ms cubic-bezier(.2,.7,.2,1), opacity 220ms ease;
}
.selected-card:hover .selected-media img,
.selected-card:focus-within .selected-media img { transform: scale(1.006); }
.selected-meta {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 0 18px;
  padding-top: 18px;
  border-top: 1px solid var(--foreground);
}
.selected-meta > p:first-child {
  grid-column: 1;
  grid-row: 1 / span 4;
  display: block;
  color: var(--text-tertiary);
  font-family: var(--font-sans);
  font-size: 10px;
  line-height: 1.45;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.selected-meta > p:first-child span { display: block; margin-bottom: 5px; color: var(--foreground); }
.selected-meta h3,
.selected-card.layout-lead .selected-meta h3 {
  grid-column: 2;
  display: flex;
  align-items: flex-start;
  margin: 0;
  font-size: clamp(24px, 2.55vw, 39px);
  font-weight: 560;
  line-height: 1.08;
  letter-spacing: -0.042em;
}
.selected-card.layout-lead .selected-meta h3 { font-size: clamp(36px, 4.2vw, 62px); }
.selected-meta h3 i { margin-top: 0.12em; font-size: .58em; }
.selected-type {
  grid-column: 2;
  margin-top: 12px;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.55;
}
.selected-tags {
  grid-column: 2;
  display: flex;
  gap: 0;
  margin-top: 14px;
  color: var(--text-tertiary);
  font-family: var(--font-sans);
  font-size: 10px;
  letter-spacing: 0.03em;
  text-transform: none;
  opacity: 1;
}
.selected-tags span + span::before { margin-inline: 9px; content: "/"; }

/* Archive — visual catalogue, never a miniature dashboard */
.all-work-section { padding-bottom: var(--section-gap); }
.work-toolbar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: end;
  margin-bottom: clamp(56px, 7vw, 94px);
  padding-top: 18px;
  border-top: 1px solid var(--foreground);
}
.filter-scroll { display: flex; flex-wrap: wrap; gap: 0 24px; }
.chip {
  position: relative;
  min-height: 42px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 12px;
  letter-spacing: -0.005em;
}
.chip::after {
  position: absolute;
  right: 0;
  bottom: 6px;
  left: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 180ms ease;
  content: "";
}
.chip:hover { color: var(--foreground); }
.chip[aria-pressed="true"] { border: 0; background: transparent; color: var(--foreground); }
.chip[aria-pressed="true"]::after { transform: scaleX(1); }
.chip span, .chip[aria-pressed="true"] span { margin-left: 5px; color: inherit; font-size: 9px; vertical-align: super; }
.work-count {
  color: var(--text-tertiary);
  font-family: var(--font-sans);
  font-size: 10px;
  letter-spacing: .05em;
}
.project-index {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(110px, 12vw, 190px) 20px;
  align-items: start;
  border-top: 0;
}
.index-card { min-width: 0; }
.index-card:nth-child(4n + 2), .index-card:nth-child(4n + 4) { margin-top: clamp(50px, 7vw, 110px); }
.index-card > a { display: block; }
.index-media {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  overflow: hidden;
  border: 0;
  background: var(--media-surface);
}
.index-media.media-landscape { aspect-ratio: 16 / 10; }
.index-media.media-square { aspect-ratio: 1 / 1; }
.index-media.media-portrait { aspect-ratio: 3 / 4; }
.index-media.media-page { aspect-ratio: 4 / 3; }
.index-media img {
  position: static;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 320ms cubic-bezier(.2,.7,.2,1);
}
.index-media.media-square img,
.index-media.media-portrait img { width: 100%; height: 100%; max-width: none; padding: 0; transform: none; }
.index-media.media-page img { object-fit: cover; object-position: center top; }
.index-card:hover .index-media img,
.index-card:focus-within .index-media img { transform: scale(1.006); }
.index-meta {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 0 16px;
  padding-top: 17px;
  border-top: 1px solid var(--foreground);
}
.index-number {
  grid-column: 1;
  grid-row: 1 / span 4;
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 10px;
}
.index-meta h3 {
  grid-column: 2;
  margin: 0;
  font-size: clamp(22px, 2.35vw, 35px);
  font-weight: 560;
  line-height: 1.08;
  letter-spacing: -0.04em;
}
.index-type {
  grid-column: 2;
  margin-top: 10px;
  color: var(--text-secondary);
  font-size: 13px;
}
.index-description {
  grid-column: 2;
  max-width: 620px;
  margin-top: 14px;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.7;
}

/* About, capabilities and contact retain the same words but use a studio rhythm */
.about-section {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 20px;
}
.section-aside { grid-column: 1 / 4; }
.section-aside h2 {
  margin-top: 22px;
  font-size: clamp(48px, 5vw, 76px);
  font-weight: 590;
  line-height: .96;
  letter-spacing: -.055em;
}
.about-copy { grid-column: 4 / 13; max-width: none; }
.about-copy > p {
  max-width: 1050px;
  color: var(--foreground);
  font-size: clamp(25px, 2.8vw, 42px);
  font-weight: 520;
  line-height: 1.35;
  letter-spacing: -.035em;
}
.about-pillars {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: clamp(72px, 8vw, 116px);
}
.about-pillars article { padding-top: 14px; border-top: 1px solid var(--foreground); }
.about-pillars h3 { font-size: 16px; font-weight: 560; }
.about-pillars p { margin-top: 20px; color: var(--text-secondary); font-size: 13px; line-height: 1.72; }
.profile-meta {
  gap: 20px;
  margin-top: 70px;
  padding-top: 16px;
  border-top-color: var(--foreground);
}
.profile-meta dt { font-family: var(--font-sans); }
.profile-meta dd { color: var(--foreground); }
.capability-list { border-top: 1px solid var(--foreground); }
.capability-list li {
  grid-template-columns: 54px minmax(280px, .85fr) minmax(320px, 1.15fr);
  gap: 20px;
  padding-block: clamp(30px, 4vw, 52px);
  border-bottom: 1px solid var(--border);
  transition: none;
}
.capability-list li:hover { padding-left: 0; }
.capability-list li > span { font-family: var(--font-sans); }
.capability-list h3 {
  font-size: clamp(28px, 3.4vw, 50px);
  font-weight: 570;
  line-height: 1.02;
  letter-spacing: -.05em;
}
.capability-list h3 small {
  margin-top: 10px;
  font-family: var(--font-sans);
  font-size: 10px;
  letter-spacing: .055em;
}
.capability-list p { max-width: 670px; color: var(--text-secondary); font-size: 14px; line-height: 1.75; }
.contact-section {
  padding-block: clamp(112px, 13vw, 200px);
  border-top: 1px solid var(--foreground);
  background: var(--foreground);
  color: var(--background);
}
.contact-section .eyebrow, .contact-section .contact-inner > p { color: rgba(255,255,255,.72); }
.contact-inner h2 {
  margin-top: 34px;
  font-size: clamp(68px, 10vw, 148px);
  font-weight: 590;
  letter-spacing: -.065em;
}
.contact-inner > p:not(.eyebrow) { max-width: 860px; font-size: 15px; line-height: 1.7; }
.contact-details { margin-top: 70px; border-top-color: var(--background); }
.contact-details > div { border-bottom-color: rgba(255,255,255,.28); }
.contact-details span { color: rgba(255,255,255,.58); font-family: var(--font-sans); }
.contact-details a, .contact-details b { color: var(--background); }
.contact-section .text-link { color: var(--background); }
.site-footer { border-top: 0; background: var(--foreground); }
.footer-grid, .foot-grid { color: rgba(255,255,255,.62); }
.footer-grid p:first-child { color: var(--background); }
.footer-grid p:first-child span { color: rgba(255,255,255,.55); font-family: var(--font-sans); }

/* Project detail — image opens the story and is never squeezed into a card */
.page-shell { max-width: var(--max-width); }
.page-hero {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 20px;
  padding: clamp(88px, 10vw, 150px) 0 clamp(94px, 11vw, 170px);
}
.crumb { grid-column: 1 / 4; align-self: start; padding-top: 10px; font-family: var(--font-sans); }
.page-title {
  grid-column: 4 / 13;
  max-width: none;
  margin: 0;
  font-size: clamp(52px, 7.2vw, 108px);
  font-weight: 590;
  line-height: .94;
  letter-spacing: -.064em;
}
.pt-en {
  display: block;
  margin-top: 22px;
  color: var(--text-tertiary);
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.page-lede {
  grid-column: 4 / 10;
  max-width: none;
  margin-top: 40px;
  color: var(--text-secondary);
  font-size: clamp(18px, 1.7vw, 25px);
  line-height: 1.6;
  letter-spacing: -.018em;
}
.case-section {
  padding-block: clamp(92px, 10vw, 154px);
  border-top: 1px solid var(--foreground);
  border-bottom: 0;
}
.cs-eyebrow { margin-bottom: clamp(38px, 5vw, 68px); color: var(--foreground); }
.cs-title {
  max-width: 1060px;
  font-size: clamp(43px, 5.8vw, 82px);
  font-weight: 580;
  line-height: 1.01;
  letter-spacing: -.055em;
}
.cs-text { max-width: 860px; margin-top: 32px; color: var(--text-secondary); font-size: 15px; line-height: 1.82; }
.case-overview { display: block; margin-top: 0; }
.co-hero {
  display: block;
  width: 100%;
  max-width: none;
  aspect-ratio: auto;
  overflow: hidden;
  border: 0;
  background: transparent;
}
.co-hero img, .co-hero video {
  position: static;
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: initial;
}
.co-hero.media-square { width: min(100%, 1040px); max-width: 1040px; margin-inline: auto; aspect-ratio: auto; }
.co-hero.media-portrait { width: min(100%, 760px); max-width: 760px; margin-inline: auto; aspect-ratio: auto; }
.co-hero.media-landscape { aspect-ratio: auto; }
.co-hero.media-page {
  aspect-ratio: 16 / 10;
  background: var(--media-surface);
}
.co-hero.media-page img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.case-overview-side {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 20px;
  margin-top: clamp(62px, 8vw, 112px);
  padding-top: 18px;
  border-top: 1px solid var(--foreground);
}
.case-meta { grid-column: 1 / 6; }
.case-overview-side > .cs-text { grid-column: 7 / 13; max-width: none; margin-top: 0; font-size: 15px; }
.cm-item { grid-template-columns: 130px minmax(0, 1fr); border-bottom-color: var(--border); }
.cm-k { font-family: var(--font-sans); }
.keyjudge, .transfer, .reuse {
  max-width: 920px;
  margin-top: 50px;
  padding: 22px 0 0;
  border-top: 1px solid var(--foreground);
  border-left: 0;
}
.keyjudge .kj-k { color: var(--foreground); }
.flowline {
  display: grid;
  grid-template-columns: repeat(9, auto);
  justify-content: start;
  gap: 0;
  margin-top: 48px;
  border-top: 1px solid var(--foreground);
}
.flowstep {
  padding: 14px 16px 14px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 10px;
}
.flowstep.key { border: 0; color: var(--foreground); text-decoration: underline; text-underline-offset: 4px; }
.flow-sep { padding: 14px 16px 0 0; color: var(--text-tertiary); }
.proc-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 70px;
  border: 0;
  background: transparent;
}
.proc-card {
  min-height: 0;
  padding: 16px 0 0;
  border-top: 1px solid var(--foreground);
  background: transparent;
}
.proc-v { margin-top: 32px; font-size: 14px; line-height: 1.75; }
.media-grid, .pg-grid, .pages, .collection {
  gap: clamp(88px, 9vw, 142px) 20px;
  margin-top: clamp(70px, 8vw, 120px);
}
.media-grid.cols-3, .pg-grid.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.shot, .pg-item, .page-full, .page-sec, .feature, .scale-item { color: inherit; }
.shot-fig, .pg-thumb {
  display: block;
  overflow: hidden;
  border: 0;
  background: var(--media-surface);
}
.shot-fig.media-landscape, .pg-thumb.media-landscape { aspect-ratio: auto; }
.shot-fig.media-square, .pg-thumb.media-square { aspect-ratio: 1 / 1; }
.shot-fig.media-portrait, .pg-thumb.media-portrait { aspect-ratio: auto; }
.shot-fig.media-page, .pg-thumb.media-page { aspect-ratio: 4 / 5; }
.shot-fig img, .pg-thumb img {
  position: static;
  width: 100%;
  height: auto;
  object-fit: initial;
  transition: transform 320ms cubic-bezier(.2,.7,.2,1);
}
.shot-fig.media-square img { width: 100%; height: 100%; object-fit: contain; }
.shot-fig.media-page img, .pg-thumb.media-page img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.shot:hover img, .pg-item:hover img, .shot:focus-visible img, .pg-item:focus-visible img { transform: scale(1.006); }
.shot-cap, .pg-cap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--foreground);
}
.shot-cap b, .pg-cap b { font-size: 13px; font-weight: 560; }
.shot-cap span, .pg-cap span { margin-top: 0; font-size: 11px; text-align: right; }
.shot-zoom, .pg-zoom {
  right: 12px;
  bottom: 12px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--foreground);
  border-radius: 50%;
  background: var(--background);
  color: var(--foreground);
}
.deliver-list { gap: 0; margin-top: 42px; border-top: 1px solid var(--foreground); }
.deliver-list li {
  flex: 1 1 33.333%;
  padding: 14px 18px 14px 0;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 11px;
}
.next-nav {
  gap: 20px;
  padding-block: clamp(72px, 8vw, 118px);
  border-top: 1px solid var(--foreground);
}
.nn-link, .nn-all {
  padding: 18px 0 0;
  border: 0;
  border-top: 1px solid var(--foreground);
  border-radius: 0;
  background: transparent;
}
.nn-dir { color: var(--foreground); font-family: var(--font-sans); }
.nn-name { margin-top: 30px; font-size: clamp(18px, 1.7vw, 24px); font-weight: 550; line-height: 1.2; }
.nn-all { border-top-color: var(--border); }

/* Lightbox */
.lightbox { background: rgba(17,17,17,.96); }
.lb-stage { border-radius: 0; background: var(--background); }
.lb-btn { border-radius: 50%; }

/* Resume inherits the same neutral system without changing its factual copy */
body.resume-page .layout-grid,
body.resume-page .resume-section,
body.resume-page .portfolio-cta { border-color: var(--foreground); }
body.resume-page .hero-name,
body.resume-page .section-title,
body.resume-page .project-title-zh { font-weight: 570; }
body.resume-page .summary-pillar,
body.resume-page .competency-card,
body.resume-page .asset-card { border-radius: 0; background: transparent; box-shadow: none; }

@media (max-width: 1080px) {
  .hero-identity { grid-column: 1 / 4; }
  .hero-copy { grid-column: 4 / 13; }
  .workflow-status { grid-column: 4 / 13; }
  .selected-card.layout-portrait { grid-column: 1 / 6; }
  .selected-card.layout-landscape-offset { grid-column: 6 / 13; }
  .selected-card.layout-right-narrow { grid-column: 8 / 13; }
}

@media (max-width: 900px) {
  :root { --section-gap: clamp(92px, 14vw, 132px); }
  .home-hero { row-gap: 0; }
  .hero-identity { grid-column: 1 / 13; }
  .hero-copy { grid-column: 1 / 13; margin-top: 60px; }
  .home-hero h1 { margin-top: 26px; }
  .workflow-status { grid-column: 1 / 13; margin-top: 76px; }
  .section-heading > .eyebrow { grid-column: 1 / 4; }
  .section-heading h2 { grid-column: 4 / 10; }
  .section-heading > .text-link, .section-heading > .section-copy { grid-column: 10 / 13; }
  .selected-card.layout-lead .selected-media { grid-column: 1 / 9; }
  .selected-card.layout-lead .selected-meta { grid-column: 9 / 13; }
  .project-index { grid-template-columns: repeat(2, minmax(0, 1fr)); gap-row: 110px; }
  .about-copy > p { font-size: clamp(24px, 4vw, 36px); }
  .page-title { grid-column: 3 / 13; }
  .page-lede { grid-column: 3 / 11; }
  .crumb { grid-column: 1 / 3; }
}

@media (max-width: 760px) {
  :root { --page-pad: 18px; --header-height: 56px; }
  .site-header { height: var(--header-height); }
  .nav-links {
    background: var(--background);
    border-bottom-color: var(--foreground);
  }
  .home-hero { display: block; padding-top: 64px; padding-bottom: 96px; }
  .hero-copy { margin-top: 52px; }
  .home-hero h1 { font-size: clamp(48px, 15vw, 66px); }
  .hero-role { font-size: clamp(42px, 12.4vw, 58px); line-height: 1; }
  .hero-tagline-home { margin-top: 24px; font-size: 15px; }
  .hero-intro { margin-top: 30px; font-size: 15px; line-height: 1.78; }
  .hero-skills { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 18px; }
  .hero-skills li + li::before { display: none; }
  .workflow-status { display: block; margin-top: 66px; }
  .workflow-head { display: flex; justify-content: space-between; padding-bottom: 12px; }
  .workflow-head span:last-child { margin-top: 0; }
  .workflow-status ol { grid-template-columns: 1fr; border-top: 1px solid var(--border-soft); }
  .workflow-status li { grid-template-columns: 32px 1fr auto; grid-template-rows: 1fr; gap: 10px; padding: 13px 0; }
  .workflow-status li + li { padding-left: 0; border-left: 0; }
  .workflow-status li span { grid-column: 1; grid-row: 1; }
  .workflow-status li b { grid-column: 2; grid-row: 1; }
  .workflow-status li i { grid-column: 3; grid-row: 1; }
  .workflow-status > p { margin-top: 12px; }
  .section-heading { display: block; margin-bottom: 58px; }
  .section-heading h2 { margin-top: 22px; font-size: clamp(46px, 14vw, 66px); }
  .section-heading > .text-link, .section-heading > .section-copy { margin-top: 26px; }
  .selected-grid { display: block; }
  .selected-card,
  .selected-card.layout-lead,
  .selected-card.layout-portrait,
  .selected-card.layout-landscape-offset,
  .selected-card.layout-panorama,
  .selected-card.layout-left,
  .selected-card.layout-right,
  .selected-card.layout-left-wide,
  .selected-card.layout-right-narrow {
    width: 100%;
    margin-top: 0;
  }
  .selected-card + .selected-card { margin-top: 94px; }
  .selected-card.layout-lead > a { display: block; }
  .selected-card.layout-lead .selected-meta { padding-top: 17px; }
  .selected-meta, .selected-card.layout-lead .selected-meta {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 0 12px;
    padding-top: 14px;
  }
  .selected-meta h3, .selected-card.layout-lead .selected-meta h3 { font-size: clamp(24px, 7.6vw, 31px); }
  .selected-type { font-size: 12px; }
  .selected-tags { flex-wrap: wrap; }
  .work-toolbar { display: block; margin-bottom: 62px; }
  .filter-scroll {
    gap: 0 22px;
    margin-inline: calc(var(--page-pad) * -1);
    padding-inline: var(--page-pad);
  }
  .chip { flex: 0 0 auto; }
  .work-count { margin-top: 12px; }
  .project-index { grid-template-columns: 1fr; gap: 96px; }
  .index-card:nth-child(n) { margin-top: 0; }
  .index-meta h3 { font-size: clamp(24px, 7vw, 30px); }
  .about-section { display: block; }
  .about-copy { margin-top: 56px; }
  .about-copy > p { font-size: clamp(23px, 7.2vw, 31px); line-height: 1.42; }
  .about-pillars, .profile-meta { grid-template-columns: 1fr; gap: 42px; }
  .capability-list li { grid-template-columns: 36px minmax(0, 1fr); gap: 0 12px; }
  .capability-list h3 { grid-column: 2; font-size: 30px; }
  .capability-list p { grid-column: 2; margin-top: 26px; }
  .contact-inner h2 { font-size: clamp(62px, 18vw, 88px); }
  .contact-details { grid-template-columns: 1fr 1fr; }
  .page-hero { display: block; padding-top: 74px; padding-bottom: 100px; }
  .page-title { margin-top: 50px; font-size: clamp(48px, 14vw, 68px); line-height: 1; }
  .page-lede { margin-top: 34px; font-size: 18px; }
  .case-section { padding-block: 92px; }
  .cs-title { font-size: clamp(40px, 12vw, 58px); }
  .co-hero.media-square, .co-hero.media-portrait { width: 100%; max-width: none; }
  .case-overview-side { display: block; margin-top: 56px; }
  .case-overview-side > .cs-text { margin-top: 46px; }
  .flowline { display: flex; border-top: 1px solid var(--foreground); }
  .proc-grid { grid-template-columns: 1fr; gap: 50px; }
  .media-grid, .pg-grid, .pages, .collection,
  .media-grid.cols-3, .pg-grid.cols-3,
  .media-grid.duo, .pg-grid.duo { grid-template-columns: 1fr; gap: 86px; }
  .shot-cap, .pg-cap { grid-template-columns: 1fr; }
  .shot-cap span, .pg-cap span { text-align: left; }
  .deliver-list li { flex-basis: 50%; }
  .next-nav { grid-template-columns: 1fr; }
  .nn-center { grid-column: auto; grid-row: auto; }
}

@media (max-width: 460px) {
  .brand-name { display: none; }
  .brand-mark::after { display: none; }
  .contact-details { grid-template-columns: 1fr; }
  .deliver-list li { flex-basis: 100%; }
  .index-meta { grid-template-columns: 42px minmax(0, 1fr); gap: 0 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .selected-media img, .index-media img, .shot img, .pg-item img,
  .nav-links > a::after, .text-link::after, .chip::after { transition: none; transform: none; }
}

/* Native-ratio safeguards against legacy artboard rules. */
.selected-media.media-square img,
.selected-media.media-portrait img,
.selected-media.media-landscape img {
  position: static;
  left: auto;
  width: 100%;
  max-width: none;
  height: auto;
  transform: none;
}
.selected-card:hover .selected-media.media-square img,
.selected-card:hover .selected-media.media-portrait img,
.selected-card:hover .selected-media.media-landscape img,
.selected-card:focus-within .selected-media.media-square img,
.selected-card:focus-within .selected-media.media-portrait img,
.selected-card:focus-within .selected-media.media-landscape img {
  transform: scale(1.006);
}

@media (max-width: 760px) {
  .hero-role {
    max-width: 340px;
    font-size: clamp(32px, 9.6vw, 39px);
    line-height: 1.03;
    letter-spacing: -0.048em;
  }
}

/* Remove the previous fixed artboards completely: selected work follows source ratios. */
.selected-card.layout-lead .selected-media,
.selected-card.layout-portrait .selected-media,
.selected-card.layout-landscape-offset .selected-media,
.selected-card.layout-panorama .selected-media,
.selected-card.layout-left .selected-media,
.selected-card.layout-right .selected-media,
.selected-card.layout-left-wide .selected-media,
.selected-card.layout-right-narrow .selected-media {
  aspect-ratio: auto;
}
.selected-card.layout-lead .selected-media.media-square img,
.selected-card.layout-portrait .selected-media.media-portrait img,
.selected-card.layout-landscape-offset .selected-media img,
.selected-card.layout-panorama .selected-media img,
.selected-card.layout-left .selected-media img,
.selected-card.layout-right .selected-media img,
.selected-card.layout-left-wide .selected-media img,
.selected-card.layout-right-narrow .selected-media img {
  position: static;
  left: auto;
  width: 100%;
  max-width: none;
  height: auto;
  object-fit: initial;
  transform: none;
}
.selected-card:hover .selected-media img,
.selected-card:focus-within .selected-media img { transform: scale(1.006); }
.hero-role span { display: inline; }
@media (max-width: 760px) {
  .hero-role { max-width: none; font-size: clamp(29px, 8.6vw, 34px); }
  .hero-role span { display: block; white-space: nowrap; }
}

/* Keep the workflow rail aligned to the editorial grid at every desktop width. */
.workflow-status {
  width: 100%;
  min-width: 0;
  justify-self: stretch;
}
.workflow-status ol,
.workflow-status li,
.workflow-status li b { min-width: 0; }

/* v6.2 — case gallery label and long-page thumbnail repair
   `.page-full` is an overlay label in the current case markup. Earlier legacy
   rules treated the same class as a media container, allowing its SVG to use
   the browser's default 300×150 size and push the real project image down. */
.pg-thumb > .page-length-badge {
  position: absolute;
  z-index: 3;
  top: 12px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: auto;
  min-width: 0;
  max-width: calc(100% - 24px);
  margin: 0;
  padding: 7px 9px 6px;
  border: 0;
  background: var(--foreground);
  color: var(--background);
  font-family: var(--font-cjk);
  font-size: 10px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: .04em;
  white-space: nowrap;
  pointer-events: none;
}
.pg-thumb > .page-length-badge svg {
  display: block;
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  stroke-width: 1.8;
}

/* Page and interface screenshots are previews, not full documents. Give every
   thumbnail a stable viewing window and preserve the page header/top context. */
.pg-thumb > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

/* Keep gallery controls above the image without affecting its layout. */
.pg-thumb > .pg-zoom {
  position: absolute;
  z-index: 3;
}

@media (max-width: 600px) {
  .pg-thumb > .page-length-badge {
    top: 8px;
    left: 8px;
    max-width: calc(100% - 16px);
    padding: 6px 7px 5px;
    font-size: 9px;
  }
  .pg-thumb > .page-length-badge svg {
    width: 11px;
    height: 11px;
  }
}

/* v6.3 — embedded PDF reader */
.pdf-viewer {
  width: 100%;
  margin-top: clamp(36px, 5vw, 72px);
  border-top: 1px solid var(--foreground);
  border-bottom: 1px solid var(--foreground);
  background: var(--background);
}
.pdf-viewer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 58px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.pdf-viewer-label {
  margin: 0;
  color: var(--foreground);
  font-family: var(--font-cjk);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .02em;
}
.pdf-viewer-actions {
  display: flex;
  align-items: center;
  gap: 22px;
  flex: 0 0 auto;
}
.pdf-viewer-action {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--foreground);
  font: inherit;
  font-size: 13px;
  line-height: 1;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 5px;
  cursor: pointer;
  transition: text-decoration-color 180ms ease, opacity 180ms ease;
}
.pdf-viewer-action:hover,
.pdf-viewer-action:focus-visible {
  text-decoration-color: currentColor;
}
.pdf-embed {
  position: relative;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  background: #202020;
}
.pdf-embed-frame {
  display: block;
  width: 100%;
  height: clamp(720px, 82vh, 1080px);
  min-height: 720px;
  border: 0;
  background: #202020;
}
.pdf-viewer:fullscreen {
  display: flex;
  flex-direction: column;
  width: 100vw;
  height: 100vh;
  margin: 0;
  border: 0;
  background: var(--background);
}
.pdf-viewer:fullscreen .pdf-viewer-bar {
  flex: 0 0 auto;
  padding-inline: max(20px, env(safe-area-inset-left));
}
.pdf-viewer:fullscreen .pdf-embed {
  flex: 1 1 auto;
  min-height: 0;
}
.pdf-viewer:fullscreen .pdf-embed-frame {
  height: 100%;
  min-height: 0;
}
@media (max-width: 760px) {
  .pdf-viewer-bar {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
    padding-block: 14px;
  }
  .pdf-viewer-actions {
    width: 100%;
    justify-content: space-between;
  }
  .pdf-embed-frame {
    height: 72svh;
    min-height: 520px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .pdf-viewer-action { transition: none; }
}


/* v6.4 — locked-layout MOUTHWASH visual system
   Visual tokens and media treatment only. Existing grids, section order,
   dimensions, breakpoints, copy, and image paths remain unchanged. */
:root {
  --background: #ffffff;
  --surface: #ffffff;
  --surface-soft: #f7f7f5;
  --foreground: #111111;
  --text-secondary: #3d3d3d;
  --text-muted: #5f5f5f;
  --text-tertiary: #6b6b6b;
  --border: rgba(17, 17, 17, 0.18);
  --border-soft: rgba(17, 17, 17, 0.09);
  --disabled: #a3a3a3;
  --ai-accent: #111111;
  --media-surface: #f4f4f2;
  --media-line: rgba(17, 17, 17, 0.08);
  --font-sans: "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  --font-cjk: "PingFang SC", "Noto Sans SC", "Source Han Sans SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  --radius: 14px;
  --radius-media: 16px;
  --radius-media-large: 20px;
  --radius-control: 999px;
  --hairline: 0 0 0 1px rgba(17, 17, 17, 0.09);
  --ease-studio: cubic-bezier(.2, .72, .2, 1);
  --motion-fast: 180ms;
  --motion-media: 360ms;
}

html { background: #ffffff; }
body {
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-cjk);
  font-weight: 400;
  letter-spacing: 0;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
::selection { background: var(--foreground); color: #ffffff; }
:focus-visible { outline: 1.5px solid var(--foreground); outline-offset: 4px; }

/* Typography — Chinese-first and studio-neutral. */
h1, h2, h3, h4, h5, h6,
.home-hero h1, .hero-role, .section-heading h2, .page-title, .cs-title,
.contact-inner h2, .hero-name, .project-title, .pcta-main {
  font-family: var(--font-cjk);
  font-weight: 500;
  font-synthesis: none;
}
.home-hero h1, .hero-role, .section-heading h2, .page-title, .contact-inner h2 {
  letter-spacing: -0.035em;
}
.hero-intro, .section-copy, .about-copy > p, .capability-list p,
.page-lede, .cs-text, .case-v, .cm-v, .project-description,
.index-description, .summary-lead, .exp-summary, .exp-bullets {
  color: var(--text-secondary);
}
.eyebrow, .kicker, .cs-eyebrow, .crumb, .pt-en, .page-name,
.index-number, .case-meta .cm-k, .proc-k, .tf-k, .kj-k,
.cue-label, .scope-label, .sg-label, .asset-code, .asset-status,
.exp-period, .project-tag, .col-tag, .workflow-head, .work-count {
  font-family: var(--font-sans);
  color: var(--text-tertiary);
  font-weight: 500;
}

/* Navigation — white canvas, direct type, quiet rule. */
.site-header {
  background: rgba(255, 255, 255, 0.94);
  border-bottom-color: transparent;
  -webkit-backdrop-filter: blur(10px) saturate(120%);
  backdrop-filter: blur(10px) saturate(120%);
}
.site-header[data-scrolled="true"] {
  background: rgba(255, 255, 255, 0.985);
  border-bottom-color: var(--border-soft);
}
.brand-mark, .brand-name, .brand-zh, .nav-links > a, .nav-dd-trigger {
  color: var(--foreground);
  font-family: var(--font-sans);
  font-weight: 500;
}
.nav-links > a::after, .text-link::after { height: 1px; }
.nav-links > a, .text-link, .nav-dd-trigger {
  transition: color var(--motion-fast) ease, opacity var(--motion-fast) ease;
}
.nav-links > a:hover, .text-link:hover, .nav-dd-trigger:hover { opacity: .62; }

/* Controls — rounded, compact, black/white only. */
.primary-button, .secondary-button, .pill, .pcta-link,
.pdf-viewer-action, .flowstep {
  border-radius: var(--radius-control);
  font-family: var(--font-cjk);
  font-weight: 500;
  transition: color var(--motion-fast) ease,
              background-color var(--motion-fast) ease,
              border-color var(--motion-fast) ease,
              transform var(--motion-fast) var(--ease-studio),
              opacity var(--motion-fast) ease;
}
.primary-button {
  border-color: var(--foreground);
  background: var(--foreground);
  color: #ffffff;
}
.primary-button:hover, .primary-button:focus-visible { background: #2a2a2a; transform: translateY(-1px); }
.secondary-button, .pill, .pcta-link {
  border-color: var(--border);
  background: #ffffff;
  color: var(--foreground);
}
.secondary-button:hover, .pill:hover, .pcta-link:hover,
.secondary-button:focus-visible, .pill:focus-visible, .pcta-link:focus-visible {
  border-color: var(--foreground);
  transform: translateY(-1px);
}
.primary-button:active, .secondary-button:active, .pill:active, .pcta-link:active { transform: translateY(0); }

/* Filters and compact tags. */
.filter-scroll { gap: 8px; }
.chip {
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-cjk);
  font-weight: 500;
  transition: color var(--motion-fast) ease,
              background-color var(--motion-fast) ease,
              border-color var(--motion-fast) ease,
              transform var(--motion-fast) var(--ease-studio);
}
.chip::after { display: none; }
.chip:hover, .chip:focus-visible { border-color: var(--border-soft); background: var(--surface-soft); color: var(--foreground); }
.chip[aria-pressed="true"] { border-color: var(--foreground); background: var(--foreground); color: #ffffff; }
.chip[aria-pressed="true"] span { color: rgba(255, 255, 255, .72); }
.chip:active { transform: scale(.98); }
.selected-tags { gap: 6px; }
.selected-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: var(--radius-control);
  background: var(--surface-soft);
  color: var(--text-muted);
  font-family: var(--font-cjk);
  font-size: 10px;
  letter-spacing: 0;
}
.selected-tags span + span::before { display: none; }
.flowstep {
  border-color: var(--border-soft);
  background: var(--surface-soft);
  color: var(--text-secondary);
  text-decoration: none;
}
.flowstep.key { border: 1px solid var(--foreground); background: var(--foreground); color: #ffffff; text-decoration: none; }
.page-length-badge { border-radius: var(--radius-control); }

/* Media — rounded, image-first, ratio-aware. */
.selected-media, .index-media, .co-hero, .shot-fig, .pg-thumb,
.hero-portrait .hp-frame, .video-cover, .pdf-embed, .lb-stage {
  overflow: hidden;
  border: 1px solid var(--media-line);
  background: var(--media-surface);
  box-shadow: none;
  isolation: isolate;
}
.selected-media, .index-media, .shot-fig, .pg-thumb,
.hero-portrait .hp-frame, .video-cover { border-radius: var(--radius-media); }
.co-hero, .pdf-embed, .lb-stage { border-radius: var(--radius-media-large); }
.selected-media img, .index-media img, .co-hero img, .co-hero video,
.shot-fig img, .pg-thumb img, .hero-portrait img {
  display: block;
  backface-visibility: hidden;
  transition: transform var(--motion-media) var(--ease-studio),
              opacity var(--motion-fast) ease,
              filter var(--motion-media) ease;
}
.selected-card:hover .selected-media img,
.selected-card:focus-within .selected-media img,
.index-card:hover .index-media img,
.index-card:focus-within .index-media img,
.shot:hover .shot-fig img, .shot:focus-visible .shot-fig img,
.pg-item:hover .pg-thumb img, .pg-item:focus-visible .pg-thumb img {
  transform: scale(1.012);
  filter: saturate(1.015) contrast(1.005);
}
.selected-card:active .selected-media img,
.index-card:active .index-media img,
.shot:active .shot-fig img, .pg-item:active .pg-thumb img { transform: scale(1.004); }

/* Selected work keeps source composition. */
.selected-media img,
.selected-media.media-square img,
.selected-media.media-portrait img,
.selected-media.media-landscape img {
  width: 100%;
  height: auto;
  max-width: none;
  object-fit: contain;
}

/* Index uses the existing artboards with media-aware fitting. */
.index-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  padding: 0;
  object-fit: cover;
  object-position: center;
}
.index-media.media-square img,
.index-media.media-portrait img {
  left: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: contain;
  transform: none;
}
.index-media.media-page img { object-fit: cover; object-position: center top; }
.index-card:hover .index-media.media-portrait img,
.index-card:focus-within .index-media.media-portrait img { transform: scale(1.012); }

/* Case hero retains its existing width rules and shows the original composition. */
.co-hero img, .co-hero video { width: 100%; height: auto; object-fit: contain; }
.co-hero.media-page img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }

/* Gallery: natural ratios for normal media; bounded viewport only for long pages. */
.shot-fig.media-landscape, .pg-thumb.media-landscape,
.shot-fig.media-portrait, .pg-thumb.media-portrait { aspect-ratio: auto; }
.shot-fig img, .pg-thumb img { width: 100%; height: auto; object-fit: contain; object-position: center; }
.shot-fig.media-square, .pg-thumb.media-square { aspect-ratio: 1 / 1; }
.shot-fig.media-square img, .pg-thumb.media-square img { width: 100%; height: 100%; object-fit: contain; }
.shot-fig.media-page, .pg-thumb.media-page { aspect-ratio: 4 / 5; }
.shot-fig.media-page img, .pg-thumb.media-page img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.shot-zoom, .pg-zoom {
  border-color: rgba(255,255,255,.56);
  background: rgba(17,17,17,.72);
  color: #ffffff;
  transition: background-color var(--motion-fast) ease,
              transform var(--motion-fast) var(--ease-studio);
}
.shot:hover .shot-zoom, .pg-item:hover .pg-zoom,
.shot:focus-visible .shot-zoom, .pg-item:focus-visible .pg-zoom {
  background: rgba(17,17,17,.9);
  transform: scale(1.05);
}

/* Captions and arrows respond without moving the layout. */
.selected-meta h3 i, .index-meta h3 i, .nn-link svg, .pcta-link svg {
  transition: transform var(--motion-fast) var(--ease-studio);
}
.selected-card:hover .selected-meta h3 i,
.selected-card:focus-within .selected-meta h3 i,
.index-card:hover .index-meta h3 i,
.index-card:focus-within .index-meta h3 i { transform: translate(3px, -3px); }
.nn-link:hover svg, .pcta-link:hover svg { transform: translateX(4px); }

/* White studio canvas across sections; black contact/footer remains the closing contrast. */
.section, .case-page, .case-section, .portfolio-cta,
.summary-card, .competency-card, .exp-item, .project-card, .asset-card, .edu-card {
  background-color: #ffffff;
}
.contact-section, .site-footer { background: var(--foreground); }
.contact-section { color: #ffffff; }
.contact-section .eyebrow, .contact-section .contact-inner > p,
.footer-grid, .foot-grid { color: rgba(255,255,255,.68); }
.contact-details > div { border-bottom-color: rgba(255,255,255,.22); }
.contact-details span { color: rgba(255,255,255,.58); }
.contact-details a, .contact-details b, .contact-section .text-link,
.footer-grid p:first-child { color: #ffffff; }

/* Resume and PDF media receive the same rounded visual language. */
.hero-portrait .hp-frame { border-color: var(--media-line); background: var(--media-surface); }
.portfolio-cta { border-color: var(--border-soft); border-radius: var(--radius-media); }
.pdf-viewer { border-color: var(--border); background: #ffffff; }
.pdf-viewer-bar { border-bottom-color: var(--border-soft); }
.pdf-viewer-action {
  min-height: 38px;
  padding-inline: 14px;
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--foreground);
  text-decoration: none;
}
.pdf-viewer-action:hover, .pdf-viewer-action:focus-visible { border-color: var(--foreground); transform: translateY(-1px); }
.pdf-embed, .pdf-embed-frame { background: #1f1f1f; }
.lightbox { background: rgba(17,17,17,.94); }

@media (max-width: 760px) {
  :root { --radius-media: 12px; --radius-media-large: 14px; }
  .site-header, .nav-links { background: #ffffff; }
  .filter-scroll { gap: 6px; }
  .chip { min-height: 36px; padding: 7px 11px; }
  .selected-tags span { min-height: 24px; padding: 3px 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .selected-media img, .index-media img, .co-hero img, .co-hero video,
  .shot-fig img, .pg-thumb img, .hero-portrait img,
  .primary-button, .secondary-button, .pill, .pcta-link, .pdf-viewer-action,
  .chip, .selected-meta h3 i, .index-meta h3 i, .nn-link svg, .pcta-link svg,
  .shot-zoom, .pg-zoom {
    transition: none;
    transform: none;
    filter: none;
  }
}
