:root {
  color-scheme: light;
  --layout-vw: 1vw;
  --layout-vh: 1vh;
  --layout-svh: 1svh;
  /* 固定字级参考值，与窗口宽度无关。 */
  --type-vw: 14.4px;
  --site-font-family: "SF Pro", "SF Pro Display", "SF Pro Text", -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  --ink: #20221f;
  --muted: #666a64;
  --line: rgba(32, 34, 31, 0.25);
  --soft-line: rgba(32, 34, 31, 0.13);
  --hero: #d4d6d2;
  --paper: #efefeb;
  --works: #dfe1dc;
  --accent: #758900;
  --header-height: 76px;
  --header-min-height: 76px;
  --chrome-font-size: 12px;
  --chrome-display-size: var(--chrome-font-size);
}

/* 自定义内容只改变展示；编辑器样式仅在本机编辑模式加载。 */
.editable-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.editable-text[data-custom-font-weight] .profile-keyword { font-weight: inherit; }
.custom-text-box { grid-column: 1 / -1; min-width: 0; max-width: 100%; margin-block: 24px; font-family: var(--site-font-family); font-size: 19px; font-weight: 400; line-height: 1.8; text-align: left; }
.custom-text-box-tail { width: min(calc(100% - 8vw), 1200px); margin: 32px auto; }
[data-text-deleted] { display: none !important; }
.custom-background-image { position: absolute; inset: 0; z-index: 0; }
/* Hero 媒体是满屏背景，连续铺到页眉与底部提示的后方。 */
.custom-background-image img, .custom-background-image video { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.custom-optional-image { margin-top: 44px; }
.custom-optional-image:not(.has-image) { display: none; }
.custom-optional-image img { width: 100%; height: auto; object-fit: contain; }
.inserted-image { grid-column: 1 / -1; width: 100%; min-width: 0; margin: 32px 0; }
.inserted-image > .media-frame { display: block; height: auto; min-height: 0; aspect-ratio: auto; background: transparent; }
.inserted-image img { display: block; width: 100%; height: auto; }
.inserted-image video { display: block; width: 100%; height: auto; object-fit: contain; background: #090909; }
.inserted-image-tail { width: min(calc(100% - 8vw), 1200px); margin: 32px auto; }
.about-portrait-placeholder.has-image { background: none; overflow: hidden; }
.about-portrait-placeholder.has-image img { width: 100%; height: 100%; object-fit: contain; }
body.has-imageGap .detail-media-item + .detail-media-item { margin-top: var(--editor-imageGap); }
body.has-imageGap .work-row + .work-row { margin-top: var(--editor-imageGap); }
body.has-textImageGap .inline-preview, body.has-textImageGap .custom-optional-image { margin-top: var(--editor-textImageGap); }
body.has-textImageGap .about-layout { gap: var(--editor-textImageGap); }
body.has-textImageGap .project-head { padding-bottom: var(--editor-textImageGap); }
body.has-textImageGap .project-body { padding-top: var(--editor-textImageGap); padding-bottom: var(--editor-textImageGap); }
body.has-textImageGap .project-gallery .detail-media-item:first-of-type { margin-top: var(--editor-textImageGap); }
body.has-sectionGap .section-pad { padding-block: var(--editor-sectionGap); }

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: clip;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--site-font-family);
  line-height: 1.2;
  font-optical-sizing: auto;
  font-kerning: normal;
  font-variant-ligatures: common-ligatures;
  -webkit-font-smoothing: antialiased;
}

/* Keep short secondary pages filled to the viewport, with a footer in flow. */
body:not([data-page="home"]) {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

body:not([data-page="home"]) > main { flex: 1 0 auto; }
body:not([data-page="home"]) > .site-footer { flex: 0 0 auto; }

body,
button,
input {
  font-size: 16px;
}

/* 表单控件也使用全站字体，仅继承字族，保留各自的字号和排版。 */
button,
input,
select,
textarea,
::file-selector-button {
  font-family: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 5px;
}

img,
video {
  display: block;
  max-width: 100%;
}

h1,
h2,
p,
figure {
  margin: 0;
}

.container {
  width: min(100% - calc(var(--layout-vw) * 8), 1600px);
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 12px 16px;
  background: var(--ink);
  color: white;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: fixed;
  z-index: 50;
  inset: 0 0 auto;
  min-height: var(--header-min-height);
  height: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: flex-start;
  gap: clamp(16px, 3vw, 48px);
  padding-inline: calc(var(--layout-vw) * 4);
  padding-block: 12px;
  border-bottom: 1px solid transparent;
  transition: background-color 220ms ease, border-color 220ms ease;
}

.site-header.is-scrolled,
body:not([data-page="home"]) .site-header {
  background: rgba(237, 238, 233, 0.92);
  border-color: var(--soft-line);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  font-size: calc(var(--chrome-display-size) + 4px);
  font-weight: 700;
  letter-spacing: -.04em;
  white-space: nowrap;
  line-height: 1;
  flex: 0 0 auto;
}

.brand .editable-text { white-space: nowrap; overflow-wrap: normal; }
.site-header a:focus-visible { outline-color: currentColor; }

.accent-mark,
.hero-period {
  color: var(--accent);
}

.main-nav {
  display: flex;
  flex: 0 0 auto;
  align-items: baseline;
  gap: clamp(18px, calc(var(--layout-vw) * 2.5), 42px);
  margin-right: auto;
}

.location-status {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 14px;
  margin-left: auto;
  font-size: var(--chrome-display-size);
  font-weight: 700;
  letter-spacing: .09em;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.location-status .location-weather {
  position: relative;
  min-width: 4ch;
  text-align: right;
}
.location-clock { min-width: 5ch; }

.location-city {
  position: relative;
  display: inline-grid;
  grid-template-columns: max-content;
  overflow: hidden;
  line-height: 1.4;
  text-align: center;
}
.location-city-label {
  grid-area: 1 / 1;
  display: block;
  white-space: nowrap;
}
.location-city-en { opacity: 0; transform: translateY(100%); }
.location-city[data-city-motion="running"] .location-city-label { will-change: transform, opacity; }
.location-city-accessible {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.main-nav a {
  position: relative;
  padding-block: 8px;
  font-size: var(--chrome-display-size);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: none;
}

.main-nav a::after {
  position: absolute;
  right: 0;
  bottom: 2px;
  left: 0;
  height: 1px;
  background: currentColor;
  content: "";
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}

.main-nav a:hover::after,
.main-nav a:focus-visible::after,
.main-nav a[aria-current]::after {
  transform: scaleX(1);
}

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  height: auto;
  min-height: var(--hero-viewport-height, 100svh);
  overflow: hidden;
  background: var(--hero);
}

.hero::before {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 46%, rgba(255, 255, 255, 0.24), transparent 48%);
  content: "";
  pointer-events: none;
}

.hero-topline,
.hero-bottomline {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.13em;
}

.hero-topline {
  padding-top: min(calc(var(--header-height) + 34px), calc(var(--hero-viewport-height, 100svh) * .16));
}
.hero-topline[hidden] { display: none; }

.hero-bottomline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  margin-top: auto;
  padding-bottom: min(30px, calc(var(--hero-viewport-height, 100svh) * .055));
}

.hero-scroll { grid-column: 2; grid-row: 1; text-align: center; }
.hero-copyright { grid-column: 1; grid-row: 1; justify-self: start; white-space: nowrap; }

.hero-bottomline > span > span:not(.editable-text) {
  margin-left: 10px;
  font-size: 18px;
  vertical-align: -1px;
}

.hero-center {
  position: relative;
  z-index: 1;
  margin-top: auto;
  margin-bottom: auto;
  padding-block: min(calc(var(--layout-vh) * 7), calc(var(--hero-viewport-height, 100svh) * .04));
}
.hero-center.container,
.hero-bottomline.container {
  width: calc(100% - 8vw);
  margin-inline: 4vw;
}

.hero-kicker,
.eyebrow {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.eyebrow { font-weight: 600; letter-spacing: .08em; }

.hero-kicker {
  margin-bottom: 10px;
}

.hero h1 {
  width: fit-content;
  max-width: 100%;
  font-size: 216px;
  font-weight: 900;
  letter-spacing: -0.105em;
  line-height: 0.87;
  white-space: normal;
  text-align: left;
  margin-inline: 0;
}

.hero-period {
  letter-spacing: -0.1em;
}

.hero-spacer {
  height: 0;
  margin-top: min(clamp(24px, calc(var(--layout-vw) * 3), 48px), calc(var(--hero-viewport-height, 100svh) * .065));
}

.hero-meta {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  padding-top: min(18px, calc(var(--hero-viewport-height, 100svh) * .035));
}

.hero-meta > div {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.hero-meta-right {
  order: -1;
  align-items: flex-start;
  text-align: left;
}

/* 回退一个字符，以小幅缩进对齐 PORTFOLIO 字形的左边缘。 */
.hero-kicker,
.hero-meta-right { padding-inline-start: 1rem; }

.hero-kicker,
.hero-copyright,
.hero-meta-right > * { text-align: left; }
.hero-kicker[data-layout-positioned],
.hero-copyright[data-layout-positioned],
.hero-meta-right [data-layout-positioned] { left: 0 !important; }

#selected-work { scroll-margin-top: calc(var(--header-height) + 16px); }

.meta-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.13em;
}

.hero-meta strong {
  font-size: clamp(13px, calc(var(--type-vw) * 1.5), 20px);
  letter-spacing: 0.06em;
}

.placeholder-tag {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.04em;
}

.section-pad {
  padding-block: clamp(100px, calc(var(--layout-vw) * 12), 180px);
}

.section-index {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 9px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.4;
}

.section-index-wide {
  flex-direction: row;
  justify-content: space-between;
  padding-top: 0;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.intro-section {
  min-height: calc(var(--layout-svh) * 84);
  background: var(--paper);
}

.intro-grid,
.outro-grid {
  display: grid;
  grid-template-columns: 25% minmax(0, 1fr);
  gap: calc(var(--layout-vw) * 5);
}

.intro-content {
  max-width: 980px;
}

.intro-content h2,
.outro-grid h2,
.about-copy h2,
.project-body-copy h2 {
  margin-top: 20px;
  font-size: clamp(4.5rem, calc(var(--type-vw) * 9), 10rem);
  font-weight: 800;
  letter-spacing: -0.09em;
  line-height: 0.95;
}

.intro-lead {
  max-width: 940px;
  margin-top: clamp(38px, calc(var(--layout-vw) * 6), 96px);
  font-size: clamp(1.8rem, calc(var(--type-vw) * 3.25), 3.8rem);
  font-weight: 600;
  letter-spacing: -0.055em;
  line-height: 1.42;
}

.muted-copy {
  margin-top: 28px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  min-width: 178px;
  margin-top: 50px;
  padding-block: 12px;
  border-bottom: 1px solid var(--ink);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.5;
  transition: gap 180ms ease, color 180ms ease;
}

.text-link:hover {
  gap: 62px;
  color: #638d2f;
}

.text-link > span:not(.editable-text) {
  font-size: 20px;
  line-height: 0.6;
}

.works-section {
  background: var(--works);
}

.works-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 40px;
  padding-block: clamp(60px, calc(var(--layout-vw) * 8), 120px) clamp(50px, calc(var(--layout-vw) * 7), 100px);
}

.works-heading h2 {
  margin-top: 18px;
  font-size: clamp(5rem, calc(var(--type-vw) * 11), 11.5rem);
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 0.96;
}

.works-heading h2 em {
  font-family: inherit;
  font-weight: 400;
  letter-spacing: -0.035em;
}

.works-heading > p {
  max-width: 260px;
  padding-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}

.work-browser {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(300px, 0.88fr);
  align-items: start;
  gap: clamp(34px, calc(var(--layout-vw) * 5), 100px);
}

.work-list {
  border-top: 1px solid var(--ink);
}

.work-row {
  display: block;
  padding-block: clamp(26px, calc(var(--layout-vw) * 3), 42px);
  border-bottom: 1px solid var(--line);
  transition: padding-left 180ms ease, background-color 180ms ease;
}

.work-row:hover,
.work-row.is-active {
  padding-left: 12px;
  background: rgba(255, 255, 255, 0.18);
}

.work-row-main,
.work-row-meta {
  display: flex;
  align-items: baseline;
}

.work-row-main {
  gap: 20px;
}

.work-index {
  min-width: 34px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.work-title {
  flex: 1;
  font-size: clamp(2.2rem, calc(var(--type-vw) * 4.8), 5.8rem);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.work-arrow {
  font-size: clamp(18px, calc(var(--type-vw) * 2.5), 32px);
  line-height: 1;
  transition: transform 180ms ease;
}

.work-row:hover .work-arrow,
.work-row:focus-visible .work-arrow {
  transform: translate(4px, -4px);
}

.work-row-meta {
  justify-content: space-between;
  gap: 20px;
  margin-top: 15px;
  margin-left: 54px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.03em;
}

.inline-preview {
  display: none;
}

.work-preview-panel {
  position: sticky;
  top: calc(var(--header-height) + 28px);
  overflow: hidden;
  aspect-ratio: 0.94;
  min-height: 360px;
}

/* 首页精选作品：名称列表与跟随光标的独立预览。 */
.work-browser-cursor { display: block; }
.work-browser-cursor .work-list {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  border: 0;
}
.work-browser-cursor .work-row {
  width: fit-content;
  max-width: 100%;
  padding: 3px 0;
  border: 0;
  background: transparent;
}
.work-browser-cursor .work-index,
.work-browser-cursor .work-arrow,
.work-browser-cursor .work-row-meta { display: none; }
.work-browser-cursor .work-row-main {
  transition: filter 200ms ease, opacity 200ms ease;
}
.work-browser-cursor .work-title {
  font-size: 42px;
  font-weight: 400;
  letter-spacing: -.01em;
  line-height: 1.22;
}
.work-browser-cursor.has-cursor-preview .work-row:not(.is-active) .work-row-main {
  filter: blur(2.5px);
  opacity: .4;
}
.work-cursor-preview {
  position: fixed;
  z-index: 45;
  top: 0;
  left: 0;
  width: min(760px, calc(100vw - 32px));
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
  will-change: transform;
  transition: opacity 180ms ease, visibility 180ms ease;
}
.work-cursor-preview.is-visible { opacity: 1; visibility: visible; }
.work-cursor-card {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 172px;
  align-items: center;
  gap: 28px;
  visibility: hidden;
  opacity: 0;
  transform: translateY(10px) scale(.98);
  transform-origin: left center;
  transition: opacity 180ms ease, transform 320ms cubic-bezier(.2,.7,.2,1), visibility 180ms ease;
}
.work-cursor-card.is-current {
  position: relative;
  visibility: visible;
  opacity: 1;
  transform: none;
}
.work-cursor-visual {
  width: min(100%, calc(max(120px, 100svh - 140px) * var(--preview-ratio, 1.5)));
  aspect-ratio: var(--preview-ratio, 1.5);
  overflow: hidden;
  border-radius: 6px;
}
.work-cursor-visual > .preview-placeholder { height: 100%; }
.work-cursor-visual > .media-frame { height: auto !important; min-height: 0 !important; aspect-ratio: auto !important; background: transparent; }
.work-cursor-visual .media-object { display: block; width: 100%; height: auto !important; aspect-ratio: var(--preview-ratio, 1.5); object-fit: contain; }
.work-cursor-visual .preview-number { font-size: 96px; }
.work-cursor-visual .preview-bottom { font-size: 10px; gap: 16px; }
.work-cursor-summary {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 8;
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.65;
}
.work-summary-char { opacity: 0; }

.preview-placeholder,
.media-frame {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #c8cbc4;
}

.preview-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  isolation: isolate;
}

.preview-placeholder::before {
  position: absolute;
  inset: 10%;
  border: 1px solid rgba(255, 255, 255, 0.52);
  content: "";
}

.preview-placeholder::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 70%;
  height: 1px;
  background: rgba(32, 34, 31, 0.12);
  content: "";
  transform: translate(-50%, -50%) rotate(-35deg);
}

.preview-corner {
  position: absolute;
  z-index: 1;
  width: 15px;
  height: 15px;
  border-color: var(--ink);
  border-style: solid;
  opacity: 0.75;
}

.preview-corner-a { top: 18px; left: 18px; border-width: 1px 0 0 1px; }
.preview-corner-b { top: 18px; right: 18px; border-width: 1px 1px 0 0; }
.preview-corner-c { right: 18px; bottom: 18px; border-width: 0 1px 1px 0; }
.preview-corner-d { bottom: 18px; left: 18px; border-width: 0 0 1px 1px; }

.preview-number,
.preview-empty-mark {
  position: relative;
  z-index: 1;
  color: rgba(255, 255, 255, 0.68);
  font-size: clamp(8rem, calc(var(--type-vw) * 22), 20rem);
  font-weight: 900;
  letter-spacing: -0.12em;
  line-height: 1;
}

.preview-empty-mark {
  color: rgba(255, 255, 255, 0.55);
  font-weight: 400;
}

.preview-bottom {
  position: absolute;
  z-index: 2;
  right: 28px;
  bottom: 28px;
  left: 28px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-top: 10px;
  border-top: 1px solid rgba(32, 34, 31, 0.38);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.09em;
}

.media-object {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.works-more {
  margin-top: 60px;
}

.empty-list {
  padding-block: 50px;
  color: var(--muted);
}

.outro-section {
  min-height: calc(var(--layout-svh) * 68);
  background: #d4d6d2;
}

.outro-grid h2 {
  font-size: clamp(4rem, calc(var(--type-vw) * 8), 9rem);
}

.outro-grid p:not(.eyebrow) {
  margin-top: 32px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.75;
}

.site-footer {
  padding-block: 26px;
  background: var(--ink);
  color: #f3f4ee;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: var(--chrome-display-size);
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.4;
}

.footer-inner.container {
  width: calc(100% - 8vw);
  margin-inline: 4vw;
}
.footer-inner > span { text-align: left; min-width: 0; }
.footer-inner > a { margin-left: auto; text-align: right; white-space: nowrap; }
.footer-inner > [data-layout-positioned] { left: 0 !important; }

.footer-inner a:hover {
  text-decoration: underline;
}

.inner-main {
  padding-top: var(--header-height);
}

.page-hero {
  display: flex;
  flex-direction: column;
  min-height: min(700px, calc(var(--layout-svh) * 82));
  padding-top: 34px;
  padding-bottom: 48px;
}

.page-hero-top,
.page-hero-bottom,
.project-gallery-heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.page-hero-top,
.project-gallery-heading {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.page-hero .eyebrow {
  margin-top: auto;
}

.page-hero h1 {
  margin-top: 10px;
  font-size: clamp(7rem, calc(var(--type-vw) * 18), 19rem);
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 1.02;
}

.page-hero-bottom {
  align-items: end;
  margin-top: auto;
  padding-top: 24px;
  border-top: 1px solid var(--ink);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.page-hero-bottom p {
  max-width: 360px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.7;
}

.works-page-section {
  padding-top: 48px;
}

.works-page-section .work-browser {
  margin-top: 72px;
}

.about-page-hero {
  min-height: min(680px, calc(var(--layout-svh) * 78));
}

.about-content {
  background: var(--works);
}

.about-layout {
  display: grid;
  grid-template-columns: minmax(240px, 0.55fr) minmax(0, 1fr);
  gap: clamp(60px, calc(var(--layout-vw) * 10), 180px);
}

.about-side > span {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.about-portrait-placeholder {
  display: grid;
  place-items: center;
  aspect-ratio: 0.8;
  max-width: 460px;
  margin-top: 40px;
  border: 1px solid var(--line);
  background: repeating-linear-gradient(135deg, rgba(255,255,255,0.13) 0 2px, transparent 2px 18px);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  line-height: 1.8;
  text-align: center;
}

.about-copy h2 {
  font-size: clamp(4rem, calc(var(--type-vw) * 7), 8rem);
  white-space: normal;
}

.about-copy > .placeholder-tag {
  display: block;
  margin-top: 16px;
}

.about-copy > p:not(.eyebrow, .placeholder-tag) {
  max-width: min(100%, 36em);
  margin-top: 28px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.8;
}

.about-copy > p.about-lead {
  max-width: min(100%, 26em);
  margin-top: 70px;
  color: var(--ink);
  font-size: clamp(1.6rem, calc(var(--type-vw) * 2.6), 2.8rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.55;
}

.about-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 80px;
  border-top: 1px solid var(--ink);
}

.about-facts > div {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-top: 20px;
}

.about-facts > div > span,
.project-info-pair > span {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.about-facts strong,
.project-info-pair strong {
  font-size: 13px;
  font-weight: 600;
}

.project-content {
  min-height: calc(var(--layout-svh) * 65);
}

.project-head {
  padding-top: 34px;
  padding-bottom: clamp(70px, calc(var(--layout-vw) * 9), 130px);
}

.project-head .eyebrow {
  margin-top: clamp(85px, calc(var(--layout-vw) * 11), 160px);
}

.project-title {
  margin-top: 16px;
  font-size: clamp(5rem, calc(var(--type-vw) * 13), 14rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.08;
}

.project-summary {
  max-width: 560px;
  margin-top: 55px;
  font-size: clamp(1.2rem, calc(var(--type-vw) * 2), 2rem);
  letter-spacing: 0;
  line-height: 1.6;
}

.project-hero-media {
  width: 100%;
  aspect-ratio: 1.9;
  min-height: 360px;
}

.project-hero-media .preview-number {
  font-size: clamp(12rem, calc(var(--type-vw) * 34), 40rem);
}

.project-body {
  display: grid;
  grid-template-columns: 25% minmax(0, 1fr);
  gap: calc(var(--layout-vw) * 5);
}

.project-body-copy {
  max-width: 920px;
}

.project-body-copy h2 {
  font-size: clamp(3.8rem, calc(var(--type-vw) * 6), 7rem);
}

.project-description {
  max-width: 760px;
  margin-top: 54px;
  font-size: clamp(1.4rem, calc(var(--type-vw) * 2.2), 2.25rem);
  line-height: 1.75;
}

.project-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 80px;
  border-top: 1px solid var(--ink);
}

.project-info-pair {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-top: 18px;
}

.project-gallery {
  padding-bottom: 100px;
}

.project-gallery-heading {
  padding-bottom: 22px;
  border-bottom: 1px solid var(--ink);
}

.detail-media-item {
  margin-top: 44px;
}

.detail-media-item > .preview-placeholder,
.detail-media-item > .media-frame {
  aspect-ratio: 1.8;
  height: auto;
  min-height: 320px;
}

.detail-media-item:nth-of-type(even) {
  width: 76%;
  margin-left: auto;
}

.detail-media-item figcaption {
  margin-top: 12px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

/* Desktop image placement stays inside the project column; mobile reads in order. */
@media (max-width: 760px) {
  body:not(.is-editing) .project-content [data-project-media-layout] {
    width: 100% !important;
    margin-inline: 0 !important;
    left: 0 !important;
    margin-bottom: min(var(--project-media-bottom, 0px), 64px) !important;
  }
  body:not(.is-editing) .project-hero-media[data-project-media-layout] { margin-top: min(var(--project-media-top, 0px), 64px) !important; }
  body:not(.is-editing) .detail-media-item[data-project-media-layout] { margin-top: min(var(--project-media-top, var(--editor-imageGap, 44px)), 64px) !important; }
}

.project-bottom-nav {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-block: 36px 110px;
  border-top: 1px solid var(--ink);
}

.project-bottom-nav .text-link {
  margin-top: 0;
}

.project-missing {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-height: calc(var(--layout-svh) * 65);
  padding-block: 90px;
}

.project-missing h1 {
  margin-top: 20px;
  font-size: clamp(3.5rem, calc(var(--type-vw) * 8), 8rem);
  letter-spacing: -0.08em;
}

.project-missing > p:not(.eyebrow) {
  margin-top: 25px;
  color: var(--muted);
  line-height: 1.7;
}

/* Apply the reading hierarchy to content, retaining the Hero's graphic title. */
:is(.about-copy, .project-body-copy, .project-head, .outro-grid, .intro-content) {
  line-break: strict;
  word-break: normal;
}
:is(.about-copy h2, .project-body-copy h2, .outro-grid h2) {
  font-weight: 600;
  letter-spacing: -.035em;
  line-height: 1.08;
}
:is(.page-hero h1, .project-title, .works-heading h2, .about-copy h2, .project-body-copy h2, .outro-grid h2) {
  text-wrap: balance;
}
:is(.about-copy > p, .project-summary, .project-description, .works-heading > p, .page-hero-bottom p, .outro-grid p:not(.eyebrow)) {
  text-wrap: pretty;
}
:is(.about-copy > p, .project-summary, .project-description, .works-heading > p, .page-hero-bottom p, .outro-grid p:not(.eyebrow)) > .editable-text {
  overflow-wrap: break-word;
}

@media (max-width: 760px), (hover: none) {
  .work-browser {
    display: block;
  }
  .work-preview-panel {
    display: none;
  }
  .inline-preview {
    display: block;
    height: auto;
    margin-top: 22px;
  }
  .inline-preview > .preview-placeholder,
  .inline-preview > .media-frame {
    aspect-ratio: 1.65;
    height: auto;
  }
  .work-row:hover,
  .work-row.is-active {
    padding-left: 0;
    background: transparent;
  }
  .works-page-section .work-browser {
    margin-top: 42px;
  }
}

@media (max-width: 760px), (hover: none), (pointer: coarse) {
  .work-cursor-preview { display: none; }
  .work-browser-cursor .work-list { display: block; }
  .work-browser-cursor .work-row {
    width: 100%;
    padding-block: 20px;
  }
  .work-browser-cursor .inline-preview { display: block; margin-top: 18px; }
  .work-browser-cursor .inline-preview > .preview-placeholder,
  .work-browser-cursor .inline-preview > .media-frame { aspect-ratio: 1.65; height: auto; }
  .work-browser-cursor .work-title { font-size: 32px; }
  .work-browser-cursor.has-cursor-preview .work-row:not(.is-active) .work-row-main { filter: none; opacity: 1; }
}

@media (max-width: 760px) {
  :root {
    --header-height: 96px;
    --header-min-height: 96px;
    --chrome-display-size: min(var(--chrome-font-size), 14px);
  }
  .container {
    width: min(100% - 40px, 1600px);
  }
  .site-header {
    padding-inline: 20px;
    flex-wrap: wrap;
    align-content: center;
    row-gap: 7px;
    padding-block: 8px;
  }
  .location-status {
    flex-basis: 100%;
    justify-content: flex-end;
    gap: 12px;
    margin-left: 0;
  }
  .hero-topline {
    padding-top: calc(var(--header-height) + 26px);
  }
  .hero-center {
    padding-block: calc(var(--layout-vh) * 8);
  }
  .hero-center.container,
  .hero-bottomline.container,
  .footer-inner.container {
    width: calc(100% - 40px);
    margin-inline: 20px;
  }
  /* 手机展示使用独立字级；桌面编辑保留固定字号与已保存的位置。 */
  body:not(.is-editing) [data-layout-positioned] {
    left: 0 !important;
    top: 0 !important;
  }
  .hero h1 {
    font-size: clamp(56px, calc((100vw - 40px) * .20), 132px);
  }
  .page-hero h1 {
    font-size: clamp(76px, calc((100vw - 40px) * .30), 198px);
    line-height: 1;
  }
  .project-title {
    font-size: clamp(58px, calc((100vw - 40px) * .20), 132px);
    line-height: 1.05;
  }
  .works-heading h2 {
    font-size: clamp(60px, calc((100vw - 40px) * .22), 145px);
    line-height: .92;
  }
  .intro-content h2 {
    font-size: clamp(68px, calc((100vw - 40px) * .18), 110px);
  }
  .outro-grid h2 {
    font-size: clamp(48px, calc((100vw - 40px) * .17), 98px);
  }
  .about-copy h2 {
    font-size: clamp(48px, calc((100vw - 40px) * .17), 96px);
  }
  .project-body-copy h2,
  .project-missing h1 {
    font-size: clamp(46px, calc((100vw - 40px) * .17), 90px);
  }
  .intro-lead {
    font-size: clamp(24px, calc((100vw - 40px) * .08), 40px);
  }
  .about-copy > p.about-lead {
    font-size: clamp(24px, calc((100vw - 40px) * .07), 34px);
  }
  .work-title {
    font-size: clamp(36px, calc((100vw - 40px) * .11), 68px);
  }
  .project-hero-media .preview-number,
  .preview-number,
  .preview-empty-mark {
    font-size: clamp(96px, 30vw, 200px);
  }
  .intro-grid,
  .outro-grid,
  .project-body {
    grid-template-columns: 1fr;
    gap: 50px;
  }
  .section-index {
    flex-direction: row;
    justify-content: space-between;
  }
  .intro-section,
  .outro-section {
    min-height: auto;
  }
  .intro-lead {
    margin-top: 45px;
  }
  .works-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 26px;
  }
  .works-heading > p {
    max-width: 410px;
  }
  .about-layout {
    grid-template-columns: 1fr;
    gap: 65px;
  }
  .about-portrait-placeholder {
    max-width: 400px;
  }
  .about-copy > p.about-lead {
    margin-top: 48px;
  }
  .project-hero-media {
    min-height: 280px;
  }
  .project-facts {
    margin-top: 56px;
  }
}

@media (max-width: 520px) {
  .site-header { gap: 8px; }
  .main-nav {
    gap: 14px;
  }
  .hero-meta {
    gap: 16px;
  }
  .section-pad {
    padding-block: 86px;
  }
  .work-row-meta {
    margin-left: 48px;
  }
  .preview-bottom {
    right: 18px;
    bottom: 18px;
    left: 18px;
  }
  .page-hero {
    min-height: calc(var(--layout-svh) * 65);
  }
  .page-hero-bottom p {
    max-width: 225px;
  }
  .about-facts,
  .project-facts {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .about-facts > div,
  .project-info-pair {
    flex-direction: row;
    justify-content: space-between;
    gap: 20px;
    padding-block: 18px;
    border-bottom: 1px solid var(--soft-line);
  }
  .project-hero-media {
    min-height: 220px;
    aspect-ratio: 1.35;
  }
  .detail-media-item:nth-of-type(even) {
    width: 100%;
  }
  .detail-media-item > .preview-placeholder,
  .detail-media-item > .media-frame {
    min-height: 220px;
  }
  .project-bottom-nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    scroll-behavior: auto !important;
    transition-duration: 0s !important;
  }
}
