/* V4: one typographic system for the Chinese home and its quiet inner pages. */
:root {
  --font-zh: "Charles Sans", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-en: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ink: #f0f1e9;
  --muted: #a4b2a7;
  --accent: #deecb2;
  --line: rgb(222 236 196 / 16%);
  font-family: var(--font-zh);
  font-synthesis: none;
}

[hidden], .page[hidden], .hero[hidden] { display: none !important; }
.page:focus { outline: none; }

.wordmark {
  display: inline-flex;
  align-items: baseline;
  flex: 0 0 auto;
  gap: 3px;
  font-size: 22px;
  line-height: 1.35;
  letter-spacing: 0;
  white-space: nowrap;
}
.wordmark > a { display: inline-flex; align-items: baseline; gap: inherit; }
.brand-zh { font-family: var(--font-zh); font-weight: 600; letter-spacing: -.035em; }
.brand-en { font-family: var(--font-en); font-weight: 500; font-size: 1.045em; letter-spacing: -.045em; }
.brand-opc {
  margin-left: 6px;
  color: var(--accent);
  font-family: var(--font-en);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: .14em;
}
.navigation a { font-weight: 400; }
.navigation small { font-family: var(--font-en); font-weight: 400; }

#headline {
  font-family: var(--font-zh);
  font-size: clamp(52px, 5.15vw, 76px);
  font-weight: 500;
  line-height: 1.24;
  letter-spacing: -.035em;
}
#headline .hero-line {
  display: block;
  font: inherit;
  letter-spacing: inherit;
  white-space: nowrap;
}
#headline .accent { color: var(--accent); }
.intro .hero-signature {
  margin: 25px 0 35px;
  color: #b7c4b8;
  font-family: var(--font-en);
  font-size: clamp(16px, 1.4vw, 20px);
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: -.015em;
}
.primary { font-family: var(--font-zh); font-weight: 500; }
.primary span { font-family: var(--font-en); }
.footer { justify-content: space-between; }
.footer-name {
  color: #8f9f92;
  font-family: var(--font-zh);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: .015em;
}
.footer-icp {
  color: #8f9f92;
  font-family: var(--font-zh);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: .015em;
  text-decoration: none;
  opacity: .82;
  transition: opacity .2s, color .2s;
}
.footer-icp:hover { opacity: 1; color: #d8e6d4; }
.footer-filings { display: inline-flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.motion-toggle { margin-left: auto; flex: 0 0 auto; }
.motion-label { letter-spacing: .025em; }

/* Inner pages compose the same universe around a quiet reading edge. */
body:not([data-page="home"]) .galaxy-canvas { visibility: hidden; }
body:not([data-page="home"]) .nebula {
  inset: 0;
  background-position: right center;
  opacity: .12;
  animation-play-state: paused;
  mask-image: linear-gradient(90deg, transparent 22%, #000 100%);
}
body:not([data-page="home"]) .nebula-detail {
  opacity: .08;
  animation-play-state: paused;
}
body:not([data-page="home"]) .stars { opacity: .2; }
body:not([data-page="home"]) .scene::after {
  background: linear-gradient(90deg, #030b08 8%, rgb(3 11 8 / 64%) 42%, rgb(3 11 8 / 12%));
}
body:not([data-page="home"]) .header::before {
  background: linear-gradient(180deg, rgb(3 11 8 / 72%), transparent);
}
.content-page {
  --art-image: url("assets/nebula-v2.png");
  --art-position: 76% center;
  --art-opacity: .66;
  position: relative;
  isolation: isolate;
  min-height: calc(100svh - 160px);
  overflow: clip;
}
.content-page::before, .content-page::after {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: -1;
}
.content-page::before {
  inset: -3% -4% -4% 30%;
  background-image: var(--art-image);
  background-size: cover;
  background-position: var(--art-position);
  opacity: var(--art-opacity);
  mask-image: linear-gradient(90deg, transparent 0%, #000 37%, #000 87%, transparent 100%);
}
.content-page::after {
  width: min(65vw, 1000px);
  aspect-ratio: 1;
  right: -14%;
  bottom: -44%;
  background: url("assets/nebula-detail-v2.png") center / cover;
  opacity: .42;
  mask-image: radial-gradient(ellipse, #000 8%, #000 27%, transparent 70%);
}
.page-inner {
  position: relative;
  isolation: isolate;
  min-height: inherit;
  max-width: 1440px;
  margin: 0 auto;
  padding: clamp(70px, 11vh, 112px) var(--gutter) 72px;
}
.page-inner::before, .page-inner::after {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: -1;
}
.page-inner::before {
  width: 68%;
  height: 52%;
  right: -10%;
  top: 24%;
  border: 1px solid rgb(221 228 173 / 26%);
  border-radius: 50%;
  transform: rotate(-25deg);
}
.page-inner::after {
  width: 77%;
  height: 37%;
  right: -13%;
  top: 35%;
  border: 1px solid rgb(221 228 173 / 13%);
  border-radius: 50%;
  transform: rotate(-25deg);
}
.page-heading { position: relative; width: 56%; margin: 0; }
.page-en {
  margin: 0 0 19px;
  color: #9caa91;
  font-family: var(--font-en);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: .19em;
  text-transform: uppercase;
}
.page-title {
  margin: 0;
  font-family: var(--font-zh);
  font-size: clamp(64px, 6.6vw, 96px);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -.035em;
}
.page-body {
  position: relative;
  width: min(56%, 720px);
  margin-top: 31px;
  border-top: 1px solid var(--line);
}
.page-body::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 56px;
  height: 1px;
  background: rgb(222 236 178 / 55%);
}
.empty-state {
  position: relative;
  display: flex;
  align-items: flex-start;
  min-height: 110px;
  padding: 25px 0 32px;
}
.empty-copy {
  position: relative;
  z-index: 1;
  margin: 0;
  color: #b7c2b5;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.8;
  letter-spacing: .04em;
}
.empty-orbit {
  position: absolute;
  width: 7px;
  aspect-ratio: 1;
  left: 139%;
  top: 154px;
  border-radius: 50%;
  background: #d1dda5;
  box-shadow: 0 0 18px 4px rgb(200 220 139 / 17%);
  opacity: .75;
  pointer-events: none;
}
.empty-orbit::before {
  content: "";
  position: absolute;
  height: 1px;
  width: 65px;
  left: -29px;
  top: 3px;
  background: linear-gradient(90deg, transparent, rgb(221 235 180 / 60%), transparent);
}
.empty-orbit::after {
  content: "";
  position: absolute;
  height: 45px;
  width: 1px;
  left: 3px;
  top: -19px;
  background: linear-gradient(transparent, rgb(221 235 180 / 45%), transparent);
}

/* Works: a broad rising panorama and long elliptical tracks. */
#projects::before { background-position: 78% 52%; }

/* Notes: upright dust filaments and a slanting, linear constellation. */
#blog { --art-image: url("assets/nebula-detail-v2.png"); --art-position: 75% center; --art-opacity: .56; }
#blog::before { left: 40%; top: -15%; bottom: -8%; background-size: auto 116%; }
#blog::after { width: 64vw; right: -18%; bottom: -50%; opacity: .24; }
#blog .page-inner::before {
  width: 28%; height: 72%; top: 10%; right: 18%;
  border: 0;
  border-left: 1px solid rgb(221 228 173 / 22%);
  border-right: 1px solid rgb(221 228 173 / 10%);
  border-radius: 0;
  transform: skewX(-15deg);
}
#blog .page-inner::after {
  width: 52%; height: 1px; top: 61%; right: -3%;
  border: 0; border-radius: 0;
  background: linear-gradient(90deg, transparent, rgb(221 228 173 / 35%) 44%, transparent);
  transform: rotate(-18deg);
}
#blog .empty-orbit { left: 151%; top: 97px; width: 5px; }

/* About: a deep, open pocket in a luminous wall of cloud. */
#about { --art-image: url("assets/nebula-detail-v2.png"); --art-position: 40% 35%; --art-opacity: .61; }
#about::before { left: 28%; right: -10%; top: -15%; bottom: -22%; }
#about::after { width: 70vw; right: -25%; bottom: -24%; opacity: .28; }
#about .page-inner::before {
  width: 52%; height: 90%; right: -3%; top: 0;
  border: 0; border-radius: 0;
  background: radial-gradient(ellipse at 55% 42%, rgb(1 9 6 / 78%) 5%, rgb(1 9 6 / 38%) 28%, transparent 64%);
  transform: none;
}
#about .page-inner::after {
  width: 1px; height: 58%; top: 17%; right: 18%;
  border: 0; border-radius: 0;
  background: linear-gradient(transparent, rgb(221 228 173 / 31%), transparent);
  transform: rotate(36deg);
}
#about .empty-orbit { left: 159%; top: 64px; width: 5px; opacity: .5; }
.about-body { padding: 30px 0 46px; }
.about-company {
  margin: 0 0 14px;
  color: #d1dda5;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: .14em;
}
.about-lead, .about-desc {
  margin: 0 0 15px;
  color: #b7c2b5;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.95;
  letter-spacing: .02em;
}
.about-note {
  margin: 22px 0 0;
  padding-top: 16px;
  border-top: 1px solid rgb(221 228 173 / 14%);
  color: #8f9f92;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.7;
  letter-spacing: .03em;
}

/* Contact: the address anchors a crossing of light at the right edge. */
#contact { --art-position: 90% 70%; --art-opacity: .57; }
#contact::before { left: 34%; top: -8%; right: -12%; }
#contact::after { width: 66vw; right: -20%; bottom: -39%; opacity: .43; }
#contact .page-inner::before {
  width: 54%; height: 41%; top: 27%; right: -12%;
  border: 0;
  border-top: 1px solid rgb(221 228 173 / 23%);
  border-bottom: 1px solid rgb(221 228 173 / 12%);
  border-radius: 0;
  transform: skewY(-25deg);
}
#contact .page-inner::after {
  width: 6px; height: 6px; top: 31%; right: 12%;
  border: 0; border-radius: 50%;
  background: #cfdfaa;
  box-shadow: 0 0 28px 5px rgb(210 229 167 / 20%);
  transform: none;
}
.contact-body { padding: 28px 0 54px; }
.contact-invitation {
  margin: 0 0 22px;
  color: #b0bdaf;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.8;
  letter-spacing: .02em;
}
.contact-email {
  display: inline;
  color: var(--ink);
  font-family: var(--font-en);
  font-size: clamp(25px, 3.6vw, 52px);
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: -.045em;
  text-decoration-line: underline;
  text-decoration-color: rgb(222 236 178 / 35%);
  text-decoration-thickness: 1px;
  text-underline-offset: .22em;
  overflow-wrap: anywhere;
  transition: color .2s ease, text-decoration-color .2s ease;
}
.contact-email:hover { color: var(--accent); text-decoration-color: var(--accent); }
.contact-caption {
  display: block;
  margin-top: 29px;
  color: #82927f;
  font-family: var(--font-zh);
  font-size: 12px;
  letter-spacing: .02em;
}

@media (min-width: 900px) and (max-height: 650px) {
  #headline { font-size: clamp(52px, 4.8vw, 76px); }
  .intro { padding-top: 42px; }
  .content-page { min-height: calc(100svh - 144px); }
  .page-inner { padding-top: 42px; padding-bottom: 36px; }
  .page-title { font-size: clamp(64px, 5.5vw, 88px); }
  .empty-state { min-height: 88px; }
  .empty-orbit { top: 76px; }
  .content-page::after { bottom: -90%; }
}

@media (max-width: 1100px) and (min-width: 900px) {
  .header { gap: 26px; }
  .navigation { gap: 26px; }
  #headline { font-size: 52px; }
  .intro .hero-signature { font-size: 16px; }
}

@media (max-width: 899px) {
  .wordmark { font-size: 20px; letter-spacing: 0; }
  .brand-opc { font-size: 11px; }
  #headline { font-size: clamp(42px, 8.4vw, 64px); line-height: 1.23; }
  .intro .hero-signature { margin: 23px 0 28px; font-size: 17px; }
  .content-page { min-height: max(580px, calc(100svh - 136px)); }
  .content-page::before { inset: 18% -25% -8% 0; mask-image: linear-gradient(180deg, transparent 0%, #000 43%, #000 87%, transparent 100%); opacity: .55; }
  .content-page::after { width: 800px; right: -280px; bottom: -300px; opacity: .25; }
  .page-inner { padding-top: 46px; padding-bottom: 260px; }
  .page-heading, .page-body { width: 100%; }
  .page-inner::before { width: 110%; height: 38%; right: -35%; top: 58%; opacity: .8; }
  .page-inner::after { width: 126%; height: 25%; right: -45%; top: 66%; opacity: .8; }
  .page-en { margin-bottom: 16px; font-size: 11px; }
  .page-title { font-size: clamp(50px, 9vw, 68px); }
  .page-body { margin-top: 28px; }
  .empty-state { min-height: 96px; padding-top: 22px; }
  .empty-copy { font-size: 16px; }
  .empty-orbit { left: 77%; top: 230px; }
  #blog::before { inset: 18% -25% -8% 0; background-size: cover; background-position: 70% center; }
  #blog::after { width: 800px; right: -400px; bottom: -350px; }
  #blog .page-inner::before { width: 43%; height: 40%; right: 9%; top: 57%; opacity: .8; }
  #blog .page-inner::after { width: 90%; right: -20%; top: 75%; }
  #blog .empty-orbit { left: 66%; top: 208px; }
  #about::before { inset: 18% -25% -8% 0; background-position: 42% center; }
  #about::after { width: 800px; right: -400px; bottom: -250px; }
  #about .page-inner::before { width: 90%; height: 53%; top: 48%; right: -20%; }
  #about .page-inner::after { height: 36%; top: 59%; right: 25%; }
  .about-body { padding: 26px 0 30px; }
  .about-company { font-size: 14px; }
  .about-lead, .about-desc { font-size: 16px; line-height: 1.9; }
  #contact::before { inset: 26% -25% -8% 0; background-position: 75% center; }
  #contact::after { width: 800px; right: -370px; bottom: -360px; }
  #contact .page-inner::before { width: 94%; height: 30%; top: 64%; right: -35%; }
  #contact .page-inner::after { top: 65%; right: 18%; }
  .contact-body { padding: 26px 0 22px; }
  .contact-invitation { font-size: 16px; margin-bottom: 25px; }
  .contact-email { font-size: clamp(24px, 4.8vw, 40px); }
  .footer { gap: 12px; }
  .footer-name { font-size: 10px; letter-spacing: .01em; }
  .motion-toggle { margin-left: auto; }
}

@media (max-width: 480px) {
  .header { gap: 14px; }
  .wordmark { font-size: 18px; }
  .brand-opc { margin-left: 5px; }
  #headline { font-size: clamp(36px, 10.7vw, 42px); }
  .intro .hero-signature { margin-top: 22px; margin-bottom: 27px; font-size: 16px; }
  .hero { gap: 34px; }
  .page-inner { padding-top: 39px; }
  .page-title { font-size: 52px; }
  .page-inner { padding-bottom: 300px; }
  .content-page::before { opacity: .6; }
  .empty-state { min-height: 90px; }
  .empty-orbit { top: 254px; left: 75%; }
  #blog .empty-orbit { top: 230px; }
  .about-body { padding-top: 24px; }
  .about-company { font-size: 13px; letter-spacing: .1em; }
  .about-lead, .about-desc { font-size: 15px; }
  .contact-body { padding-top: 26px; }
  .contact-email { font-size: 27px; }
  .footer-name { font-size: 10px; }
}
