:root {
  --red: #e61e1e;
  --black: #111111;
  --paper: #f4f0ea;
  --white: #ffffff;
  --muted: #6f6963;
  --line: rgba(17, 17, 17, 0.16);
  --shadow: 0 18px 48px rgba(17, 17, 17, 0.18);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(90deg, rgba(17, 17, 17, 0.06) 1px, transparent 1px) 0 0 / 12.5vw 12.5vw,
    var(--paper);
  color: var(--black);
  font-family: "Helvetica Neue", Helvetica, Arial, "HYQiHei", "HYQiHei-50S", "汉仪旗黑", "Microsoft YaHei", sans-serif;
  overflow-x: hidden;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 260 260' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  width: 100%;
  --image-edit-scale: 1;
  --image-edit-x: 0px;
  --image-edit-y: 0px;
}

img.image-frame-edited {
  transform: translate(var(--image-edit-x), var(--image-edit-y)) scale(var(--image-edit-scale));
  transform-origin: center;
}

img.image-natural-frame {
  max-width: none;
  object-fit: contain !important;
  object-position: center !important;
  aspect-ratio: auto !important;
}

.hero-image-frame img.image-natural-frame,
.category-card img.image-natural-frame,
.project-card img.image-natural-frame,
.category-cover img.image-natural-frame,
.folder-card img.image-natural-frame,
.project-cover-frame img.image-natural-frame {
  width: auto;
  height: auto;
  min-width: 100%;
  min-height: 100%;
}

.hero-image-frame img.image-natural-frame,
.category-card img.image-natural-frame,
.project-card img.image-natural-frame,
.folder-card img.image-natural-frame,
.category-cover img.image-natural-frame,
.project-cover-frame img.image-natural-frame {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(calc(-50% + var(--image-edit-x)), calc(-50% + var(--image-edit-y))) scale(var(--image-edit-scale));
  transform-origin: center;
}

.asset-card img.image-natural-frame,
.detail-gallery img.image-natural-frame,
.asset-board img.image-natural-frame {
  width: 100%;
  height: auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  min-height: 72px;
  padding: 18px clamp(20px, 4vw, 64px);
  border-bottom: 1px solid rgba(17, 17, 17, 0.12);
  background: rgba(244, 240, 234, 0.86);
  backdrop-filter: blur(18px);
}

.mark {
  font-family: "Helvetica Neue", Helvetica, Arial, "HYQiHei", "HYQiHei-50S", "汉仪旗黑", sans-serif;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 18px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav a {
  transition: color 250ms ease, background 250ms ease;
}

.nav button {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 900;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
}

.nav a:hover,
.nav a:focus-visible,
.nav button:hover,
.nav button:focus-visible {
  color: var(--red);
}

.hero-deck {
  min-height: calc(100svh - 72px);
  height: calc(100svh - 72px);
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(520px, 1.24fr);
  gap: clamp(20px, 2.7vw, 48px);
  align-items: stretch;
  padding: clamp(28px, 3.6vw, 58px) clamp(20px, 3vw, 52px);
}

.hero-title {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 0;
  height: 100%;
  padding: clamp(24px, 4vw, 52px);
  background: var(--white);
  box-shadow: var(--shadow);
}

.eyebrow,
.section-label,
.project-meta {
  margin: 0;
  color: var(--red);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
.category-card strong,
.project-card strong {
  font-family: "Helvetica Neue", Helvetica, Arial, "HYQiHei", "HYQiHei-50S", "汉仪旗黑", sans-serif;
  font-weight: 900;
  letter-spacing: -0.055em;
}

h1 {
  margin: 42px 0;
  font-size: clamp(64px, 9vw, 150px);
  line-height: 0.83;
}

.hero-title h1 {
  font-size: clamp(60px, 6.2vw, 118px);
  line-height: 0.88;
}

h1 span,
h2 span,
.project-card em,
.category-card em {
  color: var(--red);
  font-style: normal;
}

.hero-cn {
  max-width: 620px;
  margin: 0;
  font-size: clamp(20px, 3vw, 42px);
  font-weight: 900;
  line-height: 1.12;
}

.hero-collage {
  position: relative;
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: repeat(9, 1fr);
  gap: 14px;
}

.hero-image-frame {
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-img-main {
  grid-column: 1 / 7;
  grid-row: 1 / 8;
}

.hero-img-small {
  grid-column: 1 / 4;
  grid-row: 8 / 10;
}

.hero-red {
  grid-column: 4 / 7;
  grid-row: 8 / 10;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  background: var(--red);
  color: var(--white);
  font-size: 14px;
  font-weight: 900;
  text-transform: uppercase;
}

.hero-red strong {
  font-family: "Helvetica Neue", Helvetica, Arial, "HYQiHei", "HYQiHei-50S", "汉仪旗黑", sans-serif;
  font-size: clamp(32px, 4.5vw, 64px);
  line-height: 0.9;
  letter-spacing: -0.06em;
}

.hero-number {
  position: absolute;
  right: 18px;
  top: 18px;
  padding: 12px 16px;
  background: var(--white);
  color: var(--red);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 900;
  font-size: 54px;
  line-height: 0.9;
}

.section {
  padding: clamp(56px, 8vw, 112px) clamp(20px, 4vw, 64px);
  border-top: 1px solid var(--line);
}

.contents {
  background: var(--black);
  color: var(--white);
}

.toc-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 28px;
}

.toc-grid a {
  min-height: 230px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  transition: background 250ms ease, color 250ms ease;
}

.toc-grid a:hover,
.toc-grid a:focus-visible {
  background: var(--red);
}

.toc-grid span,
.category-index,
.card-index {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 900;
  color: var(--red);
  font-size: clamp(38px, 6vw, 92px);
  line-height: 0.85;
  letter-spacing: -0.06em;
}

.contents .toc-grid a:hover span,
.contents .toc-grid a:focus-visible span {
  color: var(--white);
}

.toc-grid strong {
  font-size: clamp(24px, 2.6vw, 42px);
  line-height: 0.95;
}

.toc-grid em {
  color: rgba(255, 255, 255, 0.68);
  font-style: normal;
  font-weight: 800;
}

.about,
.section-heading,
.visual-system,
.contact {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(300px, 1.1fr);
  gap: clamp(24px, 5vw, 80px);
  align-items: end;
}

.split-heading h2,
.section-heading h2,
.contact h2,
.visual-system h2 {
  margin: 20px 0 0;
  font-size: clamp(42px, 6.8vw, 108px);
  line-height: 0.92;
}

.about-card {
  padding: clamp(24px, 4vw, 44px);
  background: var(--white);
  box-shadow: var(--shadow);
}

.about-card p {
  font-size: clamp(20px, 2vw, 32px);
  font-weight: 900;
  line-height: 1.24;
}

.metric-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 36px;
}

.metric-row span {
  display: grid;
  gap: 8px;
  padding-top: 12px;
  border-top: 2px solid var(--black);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.metric-row strong {
  color: var(--red);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 900;
  font-size: 42px;
  line-height: 0.9;
}

.experience {
  background: var(--red);
  color: var(--white);
}

.experience .section-label {
  color: var(--white);
}

.experience-list {
  display: grid;
  gap: 12px;
  margin-top: 30px;
}

.experience-editbar {
  display: none;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 28px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.global-image-editing .experience-editbar {
  display: flex;
}

.experience-editbar p {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 800;
}

.experience-editbar button,
.experience-row-remove {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: var(--white);
  color: var(--red);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.experience-list article {
  position: relative;
  display: grid;
  grid-template-columns: 180px minmax(0, 0.75fr) minmax(260px, 1fr) auto;
  gap: 24px;
  align-items: baseline;
  padding: 22px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.36);
}

.experience-list article:not(.experience-custom-row) {
  grid-template-columns: 180px minmax(0, 0.75fr) minmax(260px, 1fr);
}

.experience-row-remove {
  display: none;
  align-self: center;
}

.global-image-editing .experience-row-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.experience-list span,
.experience-list h3 {
  font-weight: 900;
}

.experience-list h3,
.experience-list p {
  margin: 0;
}

.experience-list p {
  color: rgba(255, 255, 255, 0.78);
}

.section-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  font-weight: 700;
}

.compact-heading {
  margin-bottom: 34px;
}

.category-depth {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(420px, 1.18fr);
  gap: clamp(24px, 4vw, 64px);
  align-items: stretch;
  background: var(--black);
  color: var(--white);
}

.depth-intro {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 520px;
  padding: clamp(24px, 4vw, 46px);
  background: var(--red);
  box-shadow: var(--shadow);
}

.depth-intro .eyebrow {
  color: var(--white);
}

.depth-intro h2 {
  margin: 28px 0;
  font-size: clamp(44px, 6vw, 96px);
  line-height: 0.92;
}

.depth-intro h2 span {
  color: var(--white);
}

.depth-intro p {
  max-width: 560px;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(18px, 2vw, 28px);
  font-weight: 900;
  line-height: 1.26;
}

.scope-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.scope-link {
  min-height: 250px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.04);
  transition: background 220ms ease, transform 220ms ease, border-color 220ms ease;
}

.scope-link:hover,
.scope-link:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.32);
  transform: translateY(-2px);
}

.scope-grid span {
  color: var(--red);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 54px;
  font-weight: 900;
  line-height: 0.9;
}

.scope-grid strong {
  font-size: clamp(22px, 2vw, 34px);
  font-weight: 900;
}

.scope-grid p {
  margin: 16px 0 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 15px;
  font-weight: 700;
}

.category-grid,
.featured-grid,
.project-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.category-card,
.project-card {
  position: relative;
  min-height: 520px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  padding: 20px;
  background: var(--black);
  color: var(--white);
  box-shadow: var(--shadow);
}

.category-card img,
.project-card img {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
  transition: transform 700ms ease, opacity 700ms ease;
}

.category-card::after,
.project-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(17, 17, 17, 0.08), rgba(17, 17, 17, 0.92));
}

.category-card > *,
.project-card > * {
  position: relative;
  z-index: 1;
}

.category-card:hover img,
.project-card:hover img,
.category-card:focus-visible img,
.project-card:focus-visible img {
  transform: translate(var(--image-edit-x), var(--image-edit-y)) scale(calc(var(--image-edit-scale, 1) * 1.08));
  opacity: 0.92;
}

.category-card:hover img.image-natural-frame,
.project-card:hover img.image-natural-frame,
.category-card:focus-visible img.image-natural-frame,
.project-card:focus-visible img.image-natural-frame,
.global-image-editing .category-card:hover img.image-natural-frame,
.global-image-editing .project-card:hover img.image-natural-frame {
  transform: translate(calc(-50% + var(--image-edit-x)), calc(-50% + var(--image-edit-y))) scale(var(--image-edit-scale));
}

.global-image-editing .category-card:hover img.image-frame-edited:not(.image-natural-frame),
.global-image-editing .project-card:hover img.image-frame-edited:not(.image-natural-frame) {
  transform: translate(var(--image-edit-x), var(--image-edit-y)) scale(var(--image-edit-scale));
}

.category-card strong,
.project-card strong {
  margin-top: auto;
  font-size: clamp(30px, 3.5vw, 56px);
  line-height: 0.95;
}

.category-card em,
.project-card em {
  margin-top: 8px;
  color: var(--white);
  font-size: 13px;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
}

.category-card small {
  margin-top: 22px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.featured-grid {
  grid-template-columns: repeat(3, 1fr);
  margin-top: 32px;
}

.project-card {
  min-height: 460px;
}

.project-card .card-index {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 2;
  color: var(--white);
}

.project-meta {
  color: var(--white);
}

.contact {
  background: var(--black);
  color: var(--white);
}

.contact .eyebrow {
  color: var(--red);
}

.contact-links {
  display: grid;
  gap: 14px;
  justify-items: start;
}

.contact-links a {
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.42);
  color: rgba(255, 255, 255, 0.74);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.category-hero,
.project-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr);
  gap: clamp(24px, 4vw, 64px);
  align-items: stretch;
  padding: clamp(32px, 5vw, 76px) clamp(20px, 4vw, 64px);
}

.category-hero h1,
.project-hero h1 {
  margin: 24px 0;
  font-size: clamp(60px, 9vw, 148px);
}

.category-hero h1 span,
.project-hero h1 span {
  display: block;
  font-size: clamp(34px, 5vw, 82px);
}

.category-hero p,
.project-hero p {
  max-width: 680px;
  color: var(--muted);
  font-size: clamp(18px, 2vw, 28px);
  font-weight: 800;
  line-height: 1.25;
}

.category-cover {
  position: relative;
  min-height: 0;
  background: var(--black);
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.category-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.category-cover span {
  position: absolute;
  right: 18px;
  bottom: 18px;
  padding: 16px 18px;
  background: var(--red);
  color: var(--white);
  font-weight: 900;
  text-transform: uppercase;
}

.category-cover-tools {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  display: none;
  gap: 10px;
}

.category-cover-tools.is-visible {
  display: flex;
}

.category-cover-tools button {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(17, 17, 17, 0.72);
  color: var(--white);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.category-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.category-tabs a {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 96px;
  padding: 18px;
  border: 2px solid var(--black);
  background: var(--white);
  font-weight: 900;
}

.category-tabs a span {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.category-tabs a.is-active,
.category-tabs a:hover,
.category-tabs a:focus-visible {
  background: var(--red);
  color: var(--white);
}

.category-tabs a.is-active span,
.category-tabs a:hover span,
.category-tabs a:focus-visible span {
  color: var(--white);
}

.portfolio-editbar {
  display: none;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  padding: 18px 20px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.global-image-editing .portfolio-editbar {
  display: flex;
}

.portfolio-editbar p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.portfolio-editbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.portfolio-editbar button,
.asset-editor-toolbar button,
.asset-edit-controls button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border: 1px solid rgba(17, 17, 17, 0.18);
  background: var(--white);
  color: var(--black);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.portfolio-editbar button:hover,
.asset-editor-toolbar button:hover,
.asset-edit-controls button:hover {
  border-color: var(--red);
  color: var(--red);
}

.global-image-editor {
  position: fixed;
  top: 84px;
  right: clamp(16px, 4vw, 64px);
  z-index: 90;
  display: grid;
  justify-items: end;
  gap: 10px;
  pointer-events: none;
}

.global-image-editor button,
.global-image-editor input {
  pointer-events: auto;
}

.global-image-edit-toggle {
  white-space: nowrap;
}

.global-image-edit-panel {
  width: min(340px, calc(100vw - 40px));
  padding: 16px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(17, 17, 17, 0.12);
  box-shadow: var(--shadow);
  pointer-events: auto;
}

.global-editor-login {
  width: min(300px, calc(100vw - 40px));
  display: grid;
  gap: 10px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(17, 17, 17, 0.12);
  box-shadow: var(--shadow);
  pointer-events: auto;
}

.global-editor-login strong {
  font-size: 14px;
  font-weight: 900;
}

.global-editor-login input {
  width: 100%;
  min-height: 40px;
  padding: 0 10px;
  border: 1px solid rgba(17, 17, 17, 0.18);
  background: var(--white);
  color: var(--black);
  font-size: 13px;
  font-weight: 800;
}

.global-editor-login button {
  min-height: 40px;
  border: 0;
  background: var(--black);
  color: var(--white);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.global-editor-login-status {
  min-height: 16px;
  margin: 0;
  color: #9d1515;
  font-size: 11px;
  font-weight: 900;
}

.global-image-edit-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.global-image-edit-head strong {
  font-size: 14px;
  font-weight: 900;
}

.global-image-edit-close {
  width: 34px;
  height: 34px;
  border: 0;
  background: var(--black);
  color: var(--white);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.global-image-edit-name {
  margin: 10px 0 14px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.4;
  word-break: break-all;
}

.global-image-edit-panel label {
  display: grid;
  gap: 8px;
  color: var(--black);
  font-size: 12px;
  font-weight: 900;
}

.global-image-edit-panel input[type="range"] {
  width: 100%;
  accent-color: var(--red);
}

.global-image-scale-value {
  display: block;
  margin-top: 6px;
  color: var(--red);
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
}

.global-image-edit-hint {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.4;
}

.global-image-edit-status {
  min-height: 16px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.35;
}

.global-image-edit-status[data-type="success"] {
  color: var(--red);
}

.global-image-edit-status[data-type="error"] {
  color: #9d1515;
}

.global-image-edit-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 14px;
}

.global-image-edit-actions button {
  min-height: 40px;
  padding: 0 10px;
  border: 1px solid rgba(17, 17, 17, 0.16);
  background: var(--white);
  color: var(--black);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.global-image-editor button:disabled {
  opacity: 0.45;
  cursor: wait;
}

.global-image-edit-actions .global-image-replace {
  grid-column: 1 / -1;
  background: var(--black);
  color: var(--white);
}

.global-editor-session {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 8px;
}

.global-editor-session button {
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid rgba(17, 17, 17, 0.16);
  background: var(--paper);
  color: var(--black);
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}

.global-image-editing img {
  outline: 2px dashed rgba(230, 30, 30, 0.74);
  outline-offset: -4px;
  cursor: grab;
  user-select: none;
  -webkit-user-drag: none;
}

.global-image-editing img.is-dragging-image {
  cursor: grabbing;
}

.global-image-editing [contenteditable="true"] {
  outline: 2px dashed rgba(230, 30, 30, 0.55);
  outline-offset: 3px;
  cursor: text;
}

.global-image-editing [contenteditable="true"]:focus {
  outline-style: solid;
  background: rgba(255, 255, 255, 0.72);
}

.global-image-editing #imageLightbox img {
  outline: 0;
  cursor: inherit;
}

.global-image-editing a,
.global-image-editing button {
  cursor: zoom-in;
}

.global-image-editing .global-image-editor button,
.global-image-editing .asset-edit-controls button,
.global-image-editing .asset-editor-toolbar button,
.global-image-editing .portfolio-editbar button,
.global-image-editing .category-cover-tools button {
  cursor: pointer;
}

.asset-editor-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 14px;
}

.asset-card {
  overflow: hidden;
}

.asset-edit-controls {
  position: absolute;
  inset: auto 10px 10px 10px;
  z-index: 2;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.portfolio-editing .asset-card:hover .asset-edit-controls,
.portfolio-editing .asset-edit-controls,
.global-image-editing .category-card:hover .asset-edit-controls,
.global-image-editing .category-card .asset-edit-controls,
.global-image-editing .folder-card:hover .asset-edit-controls,
.global-image-editing .folder-card .asset-edit-controls,
.global-image-editing .gallery-card:hover .asset-edit-controls,
.global-image-editing .gallery-card .asset-edit-controls {
  opacity: 1;
  pointer-events: auto;
}

.asset-edit-controls button {
  min-height: 34px;
  padding: 0 10px;
  background: rgba(255, 255, 255, 0.92);
}

.asset-card[data-custom="true"]::after {
  content: "Custom";
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 2;
  padding: 6px 8px;
  background: var(--red);
  color: var(--white);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.folder-card {
  position: relative;
  aspect-ratio: 3 / 4;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  padding: 20px;
  background: var(--black);
  color: var(--white);
  box-shadow: var(--shadow);
}

.project-add-card,
.folder-add-card,
.gallery-add-card {
  display: none;
  border: 2px dashed rgba(17, 17, 17, 0.24);
  background: rgba(255, 255, 255, 0.54);
  color: var(--black);
  box-shadow: none;
  cursor: pointer;
}

.global-image-editing .project-add-card,
.global-image-editing .folder-add-card,
.global-image-editing .gallery-add-card {
  display: flex;
}

.project-add-card,
.folder-add-card {
  position: relative;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 20px;
}

.project-add-card {
  min-height: 520px;
}

.folder-add-card {
  aspect-ratio: 3 / 4;
  min-height: 0;
}

.gallery-add-card {
  min-height: 260px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.project-add-card span,
.folder-add-card span,
.gallery-add-card span {
  color: var(--red);
  font-size: 48px;
  font-weight: 900;
  line-height: 1;
}

.project-add-card strong,
.folder-add-card strong,
.gallery-add-card strong {
  font-size: 16px;
  font-weight: 900;
}

.folder-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.7;
}

.folder-card.is-empty-folder {
  border: 1px dashed rgba(17, 17, 17, 0.28);
  background: rgba(255, 255, 255, 0.62);
  color: var(--black);
  box-shadow: none;
}

.folder-card.is-empty-folder::before {
  content: "空目录";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(17, 17, 17, 0.34);
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.folder-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(17, 17, 17, 0.1), rgba(17, 17, 17, 0.9));
}

.folder-card.is-empty-folder::after {
  background: none;
}

.folder-card > * {
  position: relative;
  z-index: 1;
}

.folder-card.is-missing-image::before,
.gallery-card.is-missing-image::before {
  content: "图片加载失败";
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  background: rgba(255, 255, 255, 0.72);
}

.folder-card strong {
  margin-top: auto;
  font-size: clamp(22px, 3vw, 44px);
  line-height: 1;
}

.folder-card.is-empty-folder .project-meta,
.folder-card.is-empty-folder strong {
  color: var(--black);
}

.folder-card em {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
}

.work-section {
  margin-top: 28px;
  padding: 22px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.work-section-head {
  display: grid;
  grid-template-columns: 1.2fr 1fr auto;
  gap: 16px;
  align-items: baseline;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.work-section-head strong {
  color: var(--black);
  font-size: 18px;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.asset-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: stretch;
  padding: 0;
  border: 0;
  background: var(--white);
  text-align: left;
  box-shadow: none;
  cursor: pointer;
}

.asset-card:has(img.image-natural-frame)::before {
  content: "";
  display: block;
  aspect-ratio: 4 / 5;
}

.asset-card.asset-square:has(img.image-natural-frame)::before {
  aspect-ratio: 1 / 1;
}

.asset-card.asset-wide:has(img.image-natural-frame)::before {
  aspect-ratio: 4 / 3;
}

.asset-card .card-index {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 1;
  color: var(--white);
  font-size: 22px;
  text-shadow: 0 2px 12px rgba(17, 17, 17, 0.4);
}

.asset-card img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: var(--paper);
}

.asset-card img.image-natural-frame {
  position: absolute;
  inset: 0 auto auto 0;
}

.asset-card strong {
  display: block;
  color: var(--black);
  font-size: 13px;
  line-height: 1.4;
  font-weight: 800;
}

.asset-card .project-meta {
  color: var(--muted);
  font-size: 11px;
}

.asset-card.asset-long img {
  aspect-ratio: 4 / 5;
  object-position: top center;
}

.asset-square img {
  aspect-ratio: 1 / 1;
}

.asset-wide img {
  aspect-ratio: 4 / 3;
}

.asset-portrait img,
.asset-long img {
  aspect-ratio: 4 / 5;
}

.gallery-card {
  position: relative;
  margin: 0;
  background: var(--white);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.gallery-card:has(img.image-natural-frame)::before {
  content: "";
  display: block;
  aspect-ratio: 4 / 5;
}

.gallery-card img.image-natural-frame {
  position: absolute;
  inset: 0 auto auto 0;
}

.project-grid {
  grid-template-columns: repeat(4, 1fr);
}

.project-cover-frame {
  position: relative;
  height: min(72vh, 760px);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.project-cover {
  height: 100%;
  object-fit: cover;
}

.project-copy {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(22px, 4vw, 48px);
  background: var(--white);
  box-shadow: var(--shadow);
}

.project-brief {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.brief-block {
  min-height: 220px;
  padding: 22px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.brief-block span {
  color: var(--red);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.brief-block p {
  margin: 36px 0 0;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.35;
}

.swatches {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.swatches span {
  min-height: 180px;
  display: flex;
  align-items: end;
  padding: 14px;
  background: var(--swatch);
  border: 1px solid rgba(17, 17, 17, 0.12);
}

.swatches b {
  padding: 6px 8px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--black);
  font-size: 12px;
}

.deliverable-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  padding-top: 0;
  padding-bottom: 0;
  background: var(--red);
}

.deliverable-strip span {
  min-height: 170px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  border-right: 1px solid rgba(255, 255, 255, 0.28);
  color: var(--white);
  font-size: 20px;
  font-weight: 900;
}

.deliverable-strip strong {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 900;
  font-size: 54px;
  line-height: 0.9;
}

.detail-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 32px;
}

.detail-gallery figure {
  margin: 0;
  background: var(--white);
  box-shadow: var(--shadow);
}

.detail-gallery img {
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: var(--paper);
}

.detail-gallery figcaption {
  padding: 14px 16px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.asset-board {
  display: grid;
  gap: 22px;
}

.asset-board img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: top center;
}

.asset-board figcaption {
  padding: 12px 14px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.asset-board-section {
  background: var(--paper);
}

.no-scroll {
  overflow: hidden;
}

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: none;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 3vw, 40px);
  background: rgba(17, 17, 17, 0.88);
  cursor: zoom-out;
}

.image-lightbox.is-open {
  display: flex;
}

.lightbox-stage {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
}

.lightbox-viewport {
  width: 100%;
  height: 100%;
  overflow: auto;
  overscroll-behavior: contain;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
}

.lightbox-stage img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  margin: auto;
  user-select: none;
  -webkit-user-drag: none;
  cursor: zoom-in;
  box-shadow: var(--shadow);
  background: transparent;
}

.image-lightbox.is-original-size .lightbox-viewport {
  display: block;
}

.image-lightbox.is-original-size .lightbox-stage img {
  max-width: none;
  max-height: none;
  cursor: zoom-out;
}

@media (max-width: 720px) {
  .image-lightbox {
    padding: 12px;
  }
}

@media (max-width: 1020px) {
  .hero-deck,
  .about,
  .section-heading,
  .contact,
  .category-hero,
  .category-depth,
  .project-hero,
  .visual-system {
    grid-template-columns: 1fr;
  }

  .hero-deck {
    min-height: auto;
    height: auto;
  }

  .hero-title,
  .hero-collage,
  .category-cover {
    min-height: 560px;
  }

  .toc-grid,
  .category-grid,
  .category-tabs,
  .scope-grid,
  .project-brief,
  .deliverable-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  .project-grid,
  .featured-grid,
  .work-grid {
    grid-template-columns: 1fr 1fr;
  }

  .experience-list article {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

@media (max-width: 680px) {
  .topbar {
    min-height: 58px;
    align-items: center;
    flex-direction: row;
    gap: 12px;
    padding: 12px 14px;
  }

  .nav {
    flex: 1;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 10px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    font-size: 10px;
  }

  .nav::-webkit-scrollbar {
    display: none;
  }

  .nav a,
  .nav button {
    flex: 0 0 auto;
    min-height: 34px;
    display: inline-flex;
    align-items: center;
  }

  .hero-deck,
  .section,
  .category-hero,
  .project-hero {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero-title,
  .hero-collage,
  .category-cover {
    min-height: 430px;
  }

  .hero-collage {
    gap: 8px;
  }

  h1 {
    font-size: clamp(54px, 18vw, 82px);
  }

  .toc-grid,
  .category-grid,
  .featured-grid,
  .project-grid,
  .category-tabs,
  .scope-grid,
  .metric-row,
  .project-brief,
  .swatches,
  .deliverable-strip,
  .work-grid {
    grid-template-columns: 1fr;
  }

  .depth-intro {
    min-height: auto;
  }

  .category-card,
  .project-card {
    min-height: 430px;
  }

  .detail-gallery {
    grid-template-columns: 1fr;
  }

  .work-section-head {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

@media (max-width: 520px) {
  body {
    background:
      linear-gradient(90deg, rgba(17, 17, 17, 0.05) 1px, transparent 1px) 0 0 / 25vw 25vw,
      var(--paper);
  }

  .mark {
    flex: 0 0 auto;
    font-size: 20px;
  }

  .hero-deck {
    min-height: auto;
    gap: 14px;
    padding-top: 18px;
    padding-bottom: 34px;
  }

  .hero-title {
    min-height: auto;
    min-width: 0;
    padding: 20px;
  }

  h1 {
    margin: 28px 0;
    font-size: clamp(42px, 14vw, 58px);
    line-height: 0.94;
    overflow-wrap: anywhere;
  }

  .hero-title h1 {
    font-size: clamp(40px, 12vw, 50px);
    line-height: 0.92;
    overflow-wrap: normal;
    word-break: normal;
  }

  .hero-cn {
    font-size: clamp(19px, 7vw, 30px);
    line-height: 1.16;
  }

  .hero-collage {
    min-height: 360px;
    min-width: 0;
    aspect-ratio: 4 / 5;
  }

  .hero-red {
    padding: 14px;
    font-size: 12px;
  }

  .hero-red strong {
    font-size: clamp(28px, 10vw, 42px);
  }

  .hero-number {
    top: 10px;
    right: 10px;
    padding: 8px 10px;
    font-size: 38px;
  }

  .section {
    padding-top: 44px;
    padding-bottom: 44px;
  }

  .toc-grid a {
    min-height: 164px;
    padding: 18px;
  }

  .about-card,
  .depth-intro,
  .brief-block,
  .work-section {
    padding: 18px;
  }

  .about-card p,
  .category-hero p,
  .project-hero p,
  .depth-intro p,
  .section-heading p {
    font-size: 17px;
    line-height: 1.36;
  }

  .split-heading h2,
  .section-heading h2,
  .contact h2,
  .visual-system h2,
  .depth-intro h2 {
    font-size: clamp(38px, 14vw, 60px);
    line-height: 0.96;
    overflow-wrap: anywhere;
  }

  .experience-list article {
    padding: 18px 0;
  }

  .category-card,
  .project-card {
    min-height: min(112vw, 420px);
    padding: 18px;
  }

  .category-card strong,
  .project-card strong {
    font-size: clamp(28px, 11vw, 46px);
  }

  .category-hero,
  .project-hero {
    gap: 16px;
    padding-top: 20px;
    padding-bottom: 34px;
  }

  .category-hero h1,
  .project-hero h1 {
    margin: 16px 0;
    font-size: clamp(44px, 15vw, 66px);
    line-height: 0.94;
    overflow-wrap: anywhere;
  }

  .category-cover {
    min-height: 0;
    aspect-ratio: 4 / 5;
  }

  .project-cover-frame {
    height: auto;
    aspect-ratio: 4 / 5;
  }

  .category-cover span {
    right: 12px;
    bottom: 12px;
    padding: 10px 12px;
    font-size: 11px;
  }

  .category-cover-tools {
    top: 10px;
    right: 10px;
    left: 10px;
    flex-wrap: wrap;
  }

  .category-cover-tools button,
  .portfolio-editbar button,
  .asset-editor-toolbar button,
  .asset-edit-controls button {
    min-height: 40px;
    padding: 0 12px;
  }

  .category-tabs a {
    min-height: 78px;
    padding: 14px;
  }

  .scope-link,
  .brief-block,
  .deliverable-strip span {
    min-height: 150px;
  }

  .swatches span {
    min-height: 120px;
  }

  .deliverable-strip strong {
    font-size: 42px;
  }

  .work-section {
    margin-top: 18px;
  }

  .asset-card strong,
  .detail-gallery figcaption,
  .asset-board figcaption {
    overflow-wrap: anywhere;
  }

  .portfolio-editbar {
    padding: 14px;
  }

  .portfolio-editbar-actions {
    width: 100%;
  }

  .portfolio-editbar-actions button {
    flex: 1 1 130px;
  }

  .global-image-editor {
    top: auto;
    right: 12px;
    bottom: 12px;
    left: 12px;
    justify-items: stretch;
  }

  .global-image-edit-panel,
  .global-editor-login {
    width: 100%;
    max-height: min(72vh, 560px);
    overflow: auto;
  }

  .global-image-edit-actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 380px) {
  .topbar {
    padding-inline: 10px;
  }

  .nav {
    gap: 8px;
    font-size: 9px;
  }

  .hero-deck,
  .section,
  .category-hero,
  .project-hero {
    padding-left: 12px;
    padding-right: 12px;
  }

  .hero-collage {
    min-height: 320px;
  }

  .category-card,
  .project-card {
    min-height: 360px;
  }
}
