:root {
  color-scheme: light;
  --ink: #1c1c1a;
  --muted: #6f6a61;
  --line: #ddd6ca;
  --paper: #f6f2ea;
  --white: #ffffff;
  --charcoal: #161614;
  --olive: #5d6847;
  --terracotta: #a35f43;
  --gold: #b08a55;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.8;
}

body.case-view-open {
  overflow: hidden;
}

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

button,
a {
  font: inherit;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 22px clamp(20px, 5vw, 68px);
  color: var(--white);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.52), rgba(0, 0, 0, 0));
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.72);
  font-family: Georgia, serif;
  font-size: 22px;
}

.brand strong,
.brand small {
  display: block;
  line-height: 1.2;
  letter-spacing: 0.08em;
}

.brand small {
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 11px;
}

.site-nav {
  display: flex;
  gap: clamp(18px, 4vw, 42px);
}

.site-nav a {
  color: inherit;
  font-size: 14px;
  text-decoration: none;
}

.hero {
  position: relative;
  min-height: 86vh;
  background-image: url("assets/optimized/hero/hero-01.webp");
  background-position: center;
  background-size: cover;
  overflow: hidden;
}

.hero-slider,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slider {
  z-index: 0;
  background: var(--charcoal);
}

.hero-slide {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 1.4s ease, transform 7s ease;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.08)),
    linear-gradient(0deg, rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0));
}

.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 86vh;
  max-width: 1180px;
  margin: 0 auto;
  padding: 150px clamp(20px, 5vw, 56px) 76px;
  color: var(--white);
  flex-direction: column;
  justify-content: flex-end;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.eyebrow.dark {
  color: var(--terracotta);
}

h1,
h2 {
  margin: 0;
  font-family: Georgia, "Songti SC", serif;
  font-weight: 400;
  line-height: 1.18;
}

h1 {
  max-width: 760px;
  font-size: clamp(42px, 8vw, 92px);
}

.hero-title {
  display: flex;
  align-items: flex-end;
  max-width: 920px;
  gap: clamp(16px, 3vw, 34px);
  flex-wrap: wrap;
}

.hero-title-cn {
  font-size: clamp(76px, 13vw, 150px);
  letter-spacing: 0;
}

.hero-title-en {
  margin-bottom: clamp(12px, 1.5vw, 22px);
  color: rgba(255, 255, 255, 0.78);
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  font-size: clamp(13px, 1.1vw, 17px);
  font-weight: 600;
  letter-spacing: 0.18em;
  line-height: 1.2;
  text-transform: uppercase;
}

h2 {
  font-size: clamp(28px, 4vw, 48px);
}

.hero-subtitle {
  max-width: 620px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(17px, 2vw, 24px);
}

.nowrap {
  white-space: nowrap;
}

.hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 36px;
  flex-wrap: wrap;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border: 1px solid currentColor;
  color: inherit;
  text-decoration: none;
}

.button-primary {
  border-color: var(--gold);
  background: var(--gold);
  color: #17130d;
}

.button-ghost {
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
}

.button-dark {
  border-color: var(--charcoal);
  background: var(--charcoal);
  color: var(--white);
}

.button-line {
  border-color: var(--line);
  background: transparent;
  color: var(--ink);
}

.intro-band {
  padding: 64px clamp(20px, 5vw, 72px);
  background: var(--charcoal);
  color: var(--white);
}

.intro-grid {
  display: grid;
  max-width: 1180px;
  margin: 0 auto;
  gap: 34px;
  grid-template-columns: minmax(180px, 0.8fr) minmax(260px, 1.3fr) minmax(220px, 0.8fr);
}

.intro-grid > p {
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
}

.contact-meta {
  display: grid;
  gap: 12px;
  margin: 28px 0 0;
}

.contact-meta div {
  display: grid;
  gap: 6px;
  grid-template-columns: 56px 1fr;
}

.contact-meta dt {
  color: rgba(255, 255, 255, 0.45);
}

.contact-meta dd {
  margin: 0;
}

.contact-meta a {
  color: inherit;
  text-decoration: none;
}

.profile {
  display: grid;
  align-items: start;
  max-width: 1120px;
  margin: 0 auto;
  padding: 76px clamp(20px, 5vw, 56px) 60px;
  gap: clamp(32px, 5vw, 64px);
  grid-template-columns: minmax(300px, 0.85fr) minmax(420px, 1fr);
}

.profile-side {
  display: grid;
  align-self: start;
  justify-self: center;
  width: 100%;
  max-width: 300px;
  gap: 20px;
}

.profile-photo {
  overflow: hidden;
  background: #ddd6ca;
  width: 100%;
  max-width: 300px;
  aspect-ratio: 4 / 3;
}

.profile-photo img {
  height: 100%;
  min-height: 0;
  object-fit: cover;
  object-position: center 32%;
}

.profile-copy {
  align-self: start;
}

.profile-copy p:not(.eyebrow) {
  max-width: 640px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 18px;
}

.profile-lead {
  line-height: 1.9;
}

.resume-list {
  display: grid;
  max-width: 100%;
  margin-top: 0;
  border-top: 1px solid var(--line);
}

.selection-notes {
  display: grid;
  max-width: 680px;
  margin-top: 22px;
  gap: 8px;
  grid-template-columns: repeat(3, 1fr);
}

.selection-notes div {
  padding: 14px 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.36);
}

.selection-notes strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
  font-size: 15px;
}

.selection-notes span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.58;
}

.resume-list.compact {
  margin-top: 0;
}

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

.resume-list time {
  color: var(--terracotta);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.8;
}

.resume-list span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.profile-actions {
  display: flex;
  gap: 14px;
  margin-top: 34px;
  flex-wrap: wrap;
}

.works {
  max-width: 1180px;
  margin: 0 auto;
  padding: 76px clamp(20px, 5vw, 56px) 36px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}

.section-heading > p {
  max-width: 360px;
  margin: 0;
  color: var(--muted);
}

.works {
  max-width: none;
  padding: 82px clamp(20px, 5vw, 56px) 78px;
  background: var(--white);
}

.works .section-heading {
  display: block;
  max-width: 1180px;
  margin: 0 auto 42px;
  text-align: center;
}

.works-grid {
  display: grid;
  max-width: 1180px;
  margin: 0 auto;
  gap: 8px;
  grid-template-columns: repeat(3, 1fr);
}

.work-card {
  display: flex;
  min-height: 0;
  overflow: hidden;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  flex-direction: column;
  text-align: center;
}

.work-card img {
  min-height: 0;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  opacity: 1;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

.work-card::after {
  content: none;
}

.work-card:hover img {
  opacity: 1;
  transform: scale(1.05);
}

.scheme-card img {
  background: #f8f5ef;
  object-fit: contain;
}

.works-more {
  display: flex;
  justify-content: center;
  margin-top: 58px;
}

.works-more .button {
  min-width: 260px;
  border-color: #333;
  background: #333;
  color: var(--white);
}

.scheme-selection {
  border-top: 1px solid #ece5d9;
  background: var(--paper);
}

.scheme-detail .image-button img,
.scheme-detail .case-flow-item img,
.scheme-detail .case-flow-item.wide img {
  background: transparent;
  object-fit: contain;
}

.work-number {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 1;
  color: rgba(255, 255, 255, 0.72);
  font-family: Georgia, serif;
  font-size: 18px;
}

.work-info {
  position: static;
  padding: 22px 10px 0;
  z-index: auto;
}

.work-info strong,
.work-info small {
  display: block;
}

.work-info strong {
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
}

.work-info small {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.case-tabs {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.case-tab {
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.case-tab.is-active {
  border-color: var(--olive);
  background: var(--olive);
  color: var(--white);
}

.story {
  max-width: 1180px;
  margin: 0 auto;
  padding: 36px clamp(20px, 5vw, 56px) 80px;
}

.story-block,
.story-copy {
  margin-bottom: clamp(46px, 8vw, 112px);
}

.story-block.pair {
  display: grid;
  align-items: start;
  gap: clamp(28px, 6vw, 88px);
  grid-template-columns: 1fr 1fr;
}

.story-block.pair .offset {
  margin-top: 90px;
}

.image-button {
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.image-button img {
  aspect-ratio: 16 / 10;
  object-fit: cover;
  filter: saturate(0.92);
  transition: transform 0.35s ease, filter 0.35s ease;
}

.story-block.pair img {
  aspect-ratio: 4 / 5;
}

.image-button:hover img {
  filter: saturate(1.04);
  transform: translateY(-4px);
}

.story-copy {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 21px);
}

.story-copy::before {
  display: block;
  width: 42px;
  height: 1px;
  margin-bottom: 22px;
  background: var(--terracotta);
  content: "";
}

.story-copy.narrow {
  max-width: 640px;
}

.case-gallery {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, 1fr);
}

.case-gallery-item {
  overflow: hidden;
  padding: 0;
  border: 0;
  background: var(--charcoal);
  cursor: zoom-in;
}

.case-gallery-item img {
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.case-gallery-item:hover img {
  opacity: 0.92;
  transform: scale(1.04);
}

.contact {
  display: grid;
  align-items: center;
  gap: 32px;
  padding: 76px clamp(20px, 5vw, 72px);
  background: var(--charcoal);
  color: var(--white);
  grid-template-columns: 1fr auto;
}

.profile,
.works,
.contact {
  content-visibility: auto;
  contain-intrinsic-size: 900px;
}

.contact h2,
.contact p {
  max-width: 780px;
}

.contact p:not(.eyebrow) {
  color: rgba(255, 255, 255, 0.72);
}

.copyright-note {
  max-width: 900px;
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.42);
  font-size: 12px;
  grid-column: 1 / -1;
}

.contact-actions {
  display: flex;
  align-items: center;
}

.wechat-card {
  width: 220px;
  margin: 0;
  padding: 12px;
  background: var(--white);
  color: var(--ink);
}

.wechat-card img {
  background: var(--white);
  object-fit: contain;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  padding: 52px;
  place-items: center;
  background: rgba(0, 0, 0, 0.86);
  touch-action: pan-y;
}

.lightbox[hidden] {
  display: none;
}

.lightbox img {
  max-width: min(1120px, 92vw);
  max-height: 84vh;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 18px;
  right: 26px;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 50%;
  background: transparent;
  color: var(--white);
  font-size: 28px;
  cursor: pointer;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  display: grid;
  width: 58px;
  height: 74px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(0, 0, 0, 0.24);
  color: var(--white);
  font-family: Georgia, serif;
  font-size: 58px;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
  transition: background 0.25s ease, opacity 0.25s ease;
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.14);
}

.lightbox-prev {
  left: clamp(16px, 4vw, 64px);
}

.lightbox-next {
  right: clamp(16px, 4vw, 64px);
}

.case-view {
  position: fixed;
  inset: 0;
  z-index: 35;
  overflow: auto;
  padding: 34px clamp(20px, 5vw, 70px) 76px;
  background: var(--paper);
  color: var(--ink);
}

.case-view.is-scheme-detail {
  background: #f1ece2;
}

.case-view[hidden] {
  display: none;
}

.case-view-header {
  display: grid;
  align-items: end;
  max-width: 1180px;
  margin: 0 auto 34px;
  gap: 24px;
  grid-template-columns: auto 1fr;
}

.case-view-back {
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.case-view-grid {
  max-width: 1180px;
  margin: 0 auto;
}

.case-view-grid.is-index {
  display: grid;
  gap: 34px 10px;
  grid-template-columns: repeat(4, 1fr);
}

.case-detail {
  display: block;
}

.case-detail > .image-button {
  margin-bottom: clamp(46px, 8vw, 112px);
}

.case-detail-flow {
  display: grid;
  gap: clamp(28px, 4vw, 46px);
  grid-template-columns: repeat(3, 1fr);
}

.case-flow-item {
  overflow: hidden;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.case-flow-item.wide {
  grid-column: span 2;
}

.case-flow-item img {
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.case-flow-item.wide img {
  aspect-ratio: 16 / 10;
}

.case-flow-item:hover img {
  opacity: 0.94;
  transform: scale(1.025);
}

.case-thumb-section {
  margin-top: clamp(54px, 8vw, 108px);
  padding-top: clamp(28px, 4vw, 46px);
  border-top: 1px solid var(--line);
}

.case-thumb-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(6, 1fr);
}

.case-thumb-item {
  overflow: hidden;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.case-thumb-item img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  filter: saturate(0.94);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.case-thumb-item:hover img {
  opacity: 0.92;
  transform: scale(1.04);
}

.case-view-item {
  overflow: hidden;
  padding: 0;
  border: 0;
  background: var(--charcoal);
  cursor: zoom-in;
}

.case-view-item img {
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.case-view-item:hover img {
  opacity: 0.92;
  transform: scale(1.04);
}

.case-index-card {
  display: flex;
  overflow: hidden;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  flex-direction: column;
  text-align: center;
}

.case-index-card img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.case-index-card span {
  padding-top: 18px;
  font-size: 17px;
  font-weight: 700;
}

.case-index-card:hover img {
  transform: scale(1.03);
}

@media (max-width: 820px) {
  .site-header {
    align-items: flex-start;
    padding: 18px 20px;
  }

  .site-nav {
    gap: 14px;
  }

  .brand small {
    display: none;
  }

  .hero-content {
    padding-top: 130px;
  }

  .intro-grid,
  .profile,
  .profile-side,
  .works-grid,
  .case-gallery,
  .case-detail-flow,
  .case-thumb-grid,
  .story-block.pair,
  .contact {
    grid-template-columns: 1fr;
  }

  .case-flow-item.wide {
    grid-column: auto;
  }

  .case-view-header {
    align-items: start;
    grid-template-columns: 1fr;
  }

  .case-view-grid.is-index {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .profile-photo img {
    height: 100%;
  }

  .profile-photo {
    max-width: none;
  }

  .selection-notes {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .selection-notes div {
    padding: 12px 14px;
  }

  .selection-notes strong {
    font-size: 16px;
  }

  .selection-notes span {
    font-size: 14px;
    line-height: 1.55;
  }

  .resume-list div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .story-block.pair .offset {
    margin-top: 0;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .site-nav a {
    font-size: 13px;
  }

  .site-nav {
    gap: 12px;
  }

  .brand strong {
    font-size: 13px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
  }

  .hero {
    min-height: 78vh;
  }

  .hero-content {
    min-height: 78vh;
    padding-bottom: 48px;
  }

  .hero-title {
    gap: 8px;
  }

  .hero-title-cn {
    font-size: clamp(64px, 18vw, 84px);
  }

  .hero-title-en {
    display: block;
    width: 100%;
    font-size: 13px;
  }

  .case-view-grid.is-index {
    grid-template-columns: 1fr;
  }

  .case-thumb-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .case-tab {
    width: 100%;
  }

  .work-card,
  .work-card img {
    min-height: 260px;
  }

  .lightbox {
    padding: 20px;
  }

  .lightbox-nav {
    width: 44px;
    height: 58px;
    font-size: 42px;
  }

  .lightbox-prev {
    left: 10px;
  }

  .lightbox-next {
    right: 10px;
  }
}
