:root {
  --paper: #f8f7f2;
  --paper-light: #fcfbf7;
  --ink: #243746;
  --body: #4c5c68;
  --quiet: #6d7880;
  --line: #dce1e2;
  --mist: #eff2f3;
  --cobalt: #315ed8;
  --night: #091724;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 110px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Noto Sans SC", "PingFang SC", sans-serif;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  width: 100%;
  height: auto;
}

figure,
dl,
dd {
  margin: 0;
}

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

.serif {
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-weight: 500;
}

.container {
  width: min(960px, calc(100% - 56px));
  margin: 0 auto;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 30;
  border-bottom: 1px solid rgba(220, 225, 226, 0.9);
  background: rgba(248, 247, 242, 0.9);
  backdrop-filter: blur(16px);
}

.nav {
  width: min(960px, calc(100% - 56px));
  height: 84px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 12px;
}

.brand-mark,
.label,
.caption-kicker {
  font-family: Inter, sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.brand-mark,
.label,
.caption-kicker {
  color: var(--cobalt);
}

.brand-name {
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 18px;
  font-weight: 500;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--body);
  font-size: 13px;
}

.nav-actions a {
  padding: 8px 0;
  border-bottom: 1px solid transparent;
}

.nav-actions a:hover,
.nav-actions a:focus-visible,
.text-link:hover,
.text-link:focus-visible {
  color: var(--cobalt);
  border-bottom-color: currentColor;
  outline: none;
}

.nav-back {
  margin-left: 8px;
  color: var(--cobalt);
}

.hero {
  padding: 168px 0 118px;
  border-bottom: 1px solid var(--line);
}

.hero-copy {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 36px;
  align-items: start;
  margin-bottom: 72px;
}

.hero h1 {
  max-width: none;
  margin: 18px 0 0;
  font-size: clamp(48px, 6vw, 82px);
  line-height: 1.08;
  letter-spacing: -0.04em;
  white-space: nowrap;
}

.hero-intro {
  max-width: 900px;
}

.hero-intro > p {
  margin: 0;
  color: var(--body);
  font-size: 17px;
  line-height: 1.9;
}

.hero-meta {
  margin-top: 38px;
}

.hero-meta div {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 24px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.hero-meta div:last-child {
  border-bottom: 0;
}

.hero-meta dt {
  color: var(--quiet);
  font-size: 12px;
}

.hero-meta dd {
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
}

.hero-visual {
  margin-top: 0;
}

.image-frame {
  overflow: hidden;
  border: 1px solid rgba(210, 218, 222, 0.96);
  border-radius: 14px;
  background: var(--night);
  box-shadow: 0 24px 68px rgba(36, 55, 70, 0.07);
}

.image-frame img {
  transition: transform 420ms ease;
}

.image-frame:hover img {
  transform: scale(1.008);
}

.image-frame--hero {
  padding: clamp(12px, 2vw, 24px);
  border-color: #1b2c3b;
  background: #071522;
  border-radius: 16px;
}

.image-frame--hero img {
  border-radius: 5px;
}

.caption {
  display: grid;
  grid-template-columns: minmax(260px, 0.75fr) minmax(360px, 1.25fr);
  gap: 56px;
  align-items: start;
  padding-top: 22px;
}

.caption h2,
.caption h3 {
  margin: 6px 0 0;
  line-height: 1.35;
}

.caption h2 {
  font-size: 27px;
}

.caption h3 {
  font-size: 24px;
}

.caption p {
  margin: 2px 0 0;
  color: var(--quiet);
  font-size: 14px;
  line-height: 1.8;
}

.chapter {
  padding: 124px 0;
  border-bottom: 1px solid var(--line);
}

.chapter--tint {
  background: var(--paper-light);
}

.chapter-head {
  max-width: 820px;
  margin: 0 0 58px;
}

.chapter-head h2 {
  margin: 14px 0 22px;
  font-size: clamp(38px, 4.6vw, 58px);
  line-height: 1.18;
  letter-spacing: -0.035em;
}

.chapter-head p {
  max-width: 760px;
  margin: 0;
  color: var(--body);
  font-size: 16px;
  line-height: 1.9;
}

.project-group {
  margin-top: 92px;
}

/* Project copy follows the same hierarchy used by “其他复杂系统”. */
.project-copy-unified {
  display: flex;
  flex-direction: column;
  gap: 14px;
  color: var(--ink);
}

.project-copy-unified > .label {
  color: var(--cobalt);
}

.project-copy-unified > h2,
.project-copy-unified > h3 {
  margin: 0;
  font-family: var(--portfolio-font);
  font-size: clamp(28px, 3.6vw, 40px);
  font-weight: 500;
  line-height: 1.22;
  letter-spacing: normal;
}

.project-copy-unified .project-text {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 10px;
}

.project-copy-unified .project-text p {
  margin: 8px 0 0;
  color: var(--body);
  font-size: 16px;
  line-height: 1.85;
}

.project-copy-unified .caption-kicker {
  color: var(--cobalt);
}

.caption.project-copy-unified,
.cabin-main .project-copy-unified,
.paired-project .project-copy-unified,
.medical-layout .project-copy-unified {
  padding-top: 22px;
}

.editorial-copy.project-copy-unified,
.compact-copy.project-copy-unified {
  padding-top: 0;
}

.field-ui-caption.project-copy-unified {
  display: flex;
  margin-bottom: 28px;
  padding-top: 0;
  border-top: 0;
}

.chapter-head + .project-group {
  margin-top: 0;
}

.project-group--editorial {
  display: grid;
  grid-template-columns: minmax(250px, 0.33fr) minmax(0, 0.67fr);
  gap: 52px;
  align-items: center;
  padding: 56px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.project-group--reverse {
  grid-template-columns: minmax(250px, 0.31fr) minmax(0, 0.69fr);
}

.editorial-copy h3,
.compact-copy h3,
.cabin-main h3,
.paired-project h3,
.medical-layout h3,
.field-copy h3 {
  margin: 8px 0 14px;
  font-size: 27px;
  line-height: 1.35;
}

.editorial-copy p,
.compact-copy p,
.cabin-main p,
.paired-project p,
.medical-layout p,
.field-copy p {
  margin: 0;
  color: var(--quiet);
  font-size: 14px;
  line-height: 1.8;
}

.evidence-list {
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
  color: var(--body);
  font-size: 13px;
}

.evidence-list li {
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.paired-projects {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 72px;
  align-items: start;
  margin-top: 92px;
}

.paired-project--small {
  width: 100%;
  margin-top: 0;
}

.paired-project figcaption {
  padding-top: 18px;
}

.cabin-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, 0.5fr);
  gap: 30px;
  align-items: start;
  margin-top: 92px;
}

.cabin-main figcaption,
.medical-layout figcaption {
  padding-top: 18px;
}

.cabin-details {
  display: grid;
  gap: 24px;
}

.cabin-details figure {
  margin: 0;
}

.image-frame--detail {
  border-radius: 10px;
}

.cabin-details figcaption {
  padding-top: 9px;
  color: var(--quiet);
  font-size: 12px;
}

.project-group--compact {
  display: grid;
  grid-template-columns: minmax(240px, 0.38fr) minmax(0, 0.62fr);
  gap: 64px;
  align-items: center;
  margin-left: 10%;
}

.sequence {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
  margin-top: 86px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}

.sequence figure {
  position: relative;
  margin: 0;
}

.sequence-number {
  margin-bottom: 12px;
  color: var(--cobalt);
  font-family: Inter, sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.sequence .image-frame {
  border-radius: 10px;
}

.sequence figcaption {
  padding-top: 14px;
}

.sequence h3 {
  margin: 0 0 7px;
  font-size: 16px;
}

.sequence p {
  margin: 0;
  color: var(--quiet);
  font-size: 12px;
  line-height: 1.7;
}

.medical-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.55fr);
  gap: 30px;
  align-items: end;
  margin-top: 92px;
}

.medical-forecast {
  margin-bottom: 40px;
}

.medical-forecast .image-frame {
  padding: 16px 12px;
  background: #091827;
}

.field-ui {
  margin: 0;
}

.field-ui-caption {
  margin-bottom: 28px;
  border-top: 1px solid var(--line);
}

.field-ui-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px 18px;
}

.field-ui-item {
  min-width: 0;
}

.field-ui-item .image-frame {
  position: relative;
  border-radius: 9px;
  box-shadow: 0 18px 46px rgba(36, 55, 70, 0.08);
}

.field-ui-item .image-frame::after {
  content: "查看大图";
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 6px 9px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 5px;
  background: rgba(8, 20, 31, 0.78);
  color: #f2f5f7;
  font-size: 10px;
  letter-spacing: 0.04em;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.field-ui-item .image-frame:hover::after,
.field-ui-item .image-frame:focus-within::after {
  opacity: 1;
  transform: translateY(0);
}

.field-ui-item figcaption {
  display: flex;
  gap: 12px;
  align-items: baseline;
  padding-top: 11px;
  color: var(--body);
  font-size: 12px;
}

.field-ui-item figcaption span {
  color: var(--cobalt);
  font-family: Inter, sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
}

.field-evidence {
  margin-top: 100px;
  padding-top: 64px;
  border-top: 1px solid var(--line);
}

.field-copy {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(280px, 0.28fr);
  gap: 90px;
  align-items: end;
  margin-bottom: 42px;
}

.field-copy-intro {
  max-width: 680px;
}

.field-copy dl {
  margin: 0;
  border-top: 1px solid var(--line);
}

.field-copy dl div {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.field-copy dt {
  margin-bottom: 6px;
  color: var(--quiet);
  font-size: 11px;
}

.field-copy dd {
  font-size: 13px;
  font-weight: 500;
}

.field-photo-wall {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-flow: dense;
  grid-auto-rows: clamp(64px, 6.5vw, 94px);
  gap: 12px;
}

.field-photo {
  grid-column: span 4;
  grid-row: span 3;
  overflow: hidden;
  min-width: 0;
  border-radius: 9px;
  background: var(--mist);
}

.field-photo--hero {
  grid-column: span 8;
  grid-row: span 5;
}

.field-photo--portrait {
  grid-column: span 4;
  grid-row: span 5;
}

.field-photo--wide {
  grid-column: span 6;
  grid-row: span 3;
}

.field-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.closing {
  padding: 100px 0;
}

.closing-grid {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 48px;
}

.closing-grid--link-only {
  justify-content: flex-end;
}

.closing h2 {
  max-width: 760px;
  margin: 14px 0 0;
  font-size: clamp(36px, 4.8vw, 58px);
  line-height: 1.22;
  letter-spacing: -0.03em;
}

.text-link {
  display: inline-flex;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid transparent;
  color: var(--cobalt);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}

.footer {
  padding: 32px 0 48px;
  border-top: 1px solid var(--line);
  color: var(--quiet);
  font-size: 12px;
}

.footer-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.footer .text-link:hover,
.footer .text-link:focus-visible {
  border-bottom-color: transparent;
}

/* Keep the unified project hierarchy authoritative over legacy caption styles. */
.project-copy-unified > h2,
.project-copy-unified > h3,
.editorial-copy.project-copy-unified > h3,
.compact-copy.project-copy-unified > h3,
.cabin-main .project-copy-unified > h3,
.paired-project .project-copy-unified > h3,
.medical-layout .project-copy-unified > h3,
.field-ui-caption.project-copy-unified > h3 {
  margin: 0;
  font-size: clamp(28px, 3.6vw, 40px);
  line-height: 1.22;
}

.project-copy-unified .project-text p,
.editorial-copy.project-copy-unified .project-text p,
.compact-copy.project-copy-unified .project-text p,
.cabin-main .project-copy-unified .project-text p,
.paired-project .project-copy-unified .project-text p,
.medical-layout .project-copy-unified .project-text p {
  margin: 8px 0 0;
  color: var(--body);
  font-size: 16px;
  line-height: 1.85;
}

.image-frame img[data-lightbox-source] {
  cursor: zoom-in;
}

.image-frame img[data-lightbox-source]:focus-visible {
  outline: 3px solid var(--cobalt);
  outline-offset: -5px;
}

.lightbox {
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: #101820;
  color: #f4f6f7;
}

.lightbox::backdrop {
  background: rgba(5, 12, 18, 0.9);
  backdrop-filter: blur(10px);
}

.lightbox[open] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.lightbox-toolbar {
  position: relative;
  z-index: 2;
  min-height: 68px;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto 44px;
  gap: 22px;
  align-items: center;
  padding: 12px 18px 12px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(16, 24, 32, 0.94);
}

.lightbox-caption {
  overflow: hidden;
  margin: 0;
  color: #e6eaec;
  font-size: 13px;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lightbox-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.lightbox-controls button,
.lightbox-close {
  min-width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #f4f6f7;
  font: inherit;
  font-size: 17px;
  cursor: pointer;
}

.lightbox-controls button:hover,
.lightbox-controls button:focus-visible,
.lightbox-close:hover,
.lightbox-close:focus-visible {
  border-color: rgba(255, 255, 255, 0.52);
  background: rgba(255, 255, 255, 0.15);
  outline: none;
}

.lightbox-controls button:active,
.lightbox-close:active {
  transform: translateY(1px);
}

.lightbox-controls .lightbox-text-button {
  width: auto;
  padding: 0 12px;
  font-size: 12px;
  white-space: nowrap;
}

#lightbox-zoom {
  min-width: 56px;
  color: #c8d0d5;
  font-family: Inter, sans-serif;
  font-size: 12px;
  text-align: center;
}

.lightbox-close {
  font-size: 25px;
  line-height: 1;
}

.lightbox-stage {
  min-height: 0;
  overflow: auto;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 34px;
  overscroll-behavior: contain;
  background: #0b131a;
}

.lightbox-image {
  flex: none;
  margin: auto;
  width: auto;
  max-width: none;
  height: auto;
  max-height: none;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.42);
  cursor: zoom-in;
  user-select: none;
}

.lightbox-hint {
  margin: 0;
  padding: 10px 24px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  background: #101820;
  color: #9da9b1;
  font-size: 11px;
  text-align: center;
}

@media (max-width: 960px) {
  .hero-copy {
    grid-template-columns: 1fr;
    gap: 44px;
  }

  .hero-intro {
    max-width: 720px;
  }

  .cabin-layout,
  .medical-layout {
    grid-template-columns: 1fr;
  }

  .cabin-details {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .medical-forecast {
    width: 72%;
    margin: 20px 0 0 auto;
  }

  .field-ui-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .field-copy {
    grid-template-columns: minmax(0, 0.62fr) minmax(240px, 0.38fr);
    gap: 48px;
  }

  .field-photo-wall {
    grid-auto-rows: clamp(62px, 7.5vw, 78px);
  }
}

@media (max-width: 760px) {
  .container,
  .nav {
    width: min(100% - 40px, 1240px);
  }

  .nav {
    height: 74px;
  }

  .nav-actions a:not(.nav-back) {
    display: none;
  }

  .hero {
    padding: 126px 0 80px;
  }

  .hero h1 {
    white-space: normal;
  }

  .hero-copy {
    margin-bottom: 48px;
  }

  .caption,
  .project-group--editorial,
  .project-group--reverse,
  .project-group--compact,
  .field-evidence {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .project-group--compact {
    margin-left: 0;
  }

  .paired-projects {
    grid-template-columns: 1fr;
    gap: 56px;
  }

  .paired-project--small {
    width: 82%;
    margin: 0 0 0 auto;
  }

  .chapter {
    padding: 86px 0;
  }

  .chapter-head {
    margin-bottom: 42px;
  }

  .project-group,
  .cabin-layout,
  .sequence,
  .medical-layout,
  .field-evidence {
    margin-top: 68px;
  }

  .sequence {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .sequence figure:nth-child(2) {
    width: 88%;
    margin-left: auto;
  }

  .sequence figure:nth-child(3) {
    width: 76%;
  }

  .field-ui-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .field-copy {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .field-copy dl {
    margin-top: 0;
  }

  .field-photo-wall {
    display: block;
    columns: 2;
    column-gap: 10px;
  }

  .field-photo,
  .field-photo--hero,
  .field-photo--portrait,
  .field-photo--wide {
    display: inline-block;
    width: 100%;
    margin: 0 0 10px;
    break-inside: avoid;
  }

  .field-photo img {
    height: auto;
    object-fit: contain;
  }

  .closing-grid {
    align-items: flex-start;
    flex-direction: column;
  }

  .footer-grid {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .lightbox-toolbar {
    grid-template-columns: minmax(0, 1fr) 40px;
    gap: 10px;
    min-height: 58px;
    padding: 9px 12px 9px 16px;
  }

  .lightbox-caption {
    font-size: 12px;
  }

  .lightbox-controls {
    position: fixed;
    inset: auto 10px 42px;
    z-index: 3;
    justify-content: center;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 12px;
    background: rgba(16, 24, 32, 0.92);
    backdrop-filter: blur(12px);
  }

  .lightbox-stage {
    padding: 18px;
  }

  .lightbox-hint {
    min-height: 48px;
    padding: 10px 16px 14px;
  }
}

@media (max-width: 520px) {
  .brand-name {
    font-size: 16px;
  }

  .hero h1 {
    font-size: 44px;
  }

  .hero-intro > p {
    font-size: 16px;
  }

  .hero-meta div {
    grid-template-columns: 76px 1fr;
    gap: 18px;
  }

  .image-frame {
    border-radius: 10px;
  }

  .image-frame--hero {
    padding: 8px;
  }

  .chapter-head h2 {
    font-size: 36px;
  }

  .caption {
    gap: 16px;
  }

  .caption h2,
  .caption h3,
  .editorial-copy h3,
  .compact-copy h3,
  .cabin-main h3,
  .paired-project h3,
  .medical-layout h3,
  .field-copy h3 {
    font-size: 22px;
  }

  .cabin-details {
    grid-template-columns: 1fr;
  }

  .cabin-details figure:nth-child(2) {
    width: 84%;
    margin-left: auto;
  }

  .paired-project--small,
  .medical-forecast {
    width: 100%;
    margin-left: 0;
  }

  .field-photo-wall {
    columns: 1;
  }

  .hero h1 {
    white-space: normal;
  }

  .project-copy-unified > h2,
  .project-copy-unified > h3,
  .editorial-copy.project-copy-unified > h3,
  .compact-copy.project-copy-unified > h3,
  .cabin-main .project-copy-unified > h3,
  .paired-project .project-copy-unified > h3,
  .medical-layout .project-copy-unified > h3,
  .field-ui-caption.project-copy-unified > h3 {
    font-size: 28px;
  }

  .project-copy-unified .project-text p {
    font-size: 15px;
    line-height: 1.8;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .image-frame img {
    transition: none;
  }

  .image-frame:hover img {
    transform: none;
  }

  .lightbox-controls button,
  .lightbox-close {
    transition: none;
  }
}
