/* Section 05 · Contact / Let's Connect v1.0
 * New rules are deliberately scoped so Sections 01–04 stay locked. */
.contact {
  --contact-copy: #51627a;
  --contact-muted: #64758b;
  position: relative;
  isolation: isolate;
  min-height: 100svh;
  overflow: hidden;
  padding: clamp(7.7rem, 9vw, 9.2rem) 0 clamp(3.5rem, 6vw, 5.5rem);
  scroll-margin-top: 5rem;
}

.contact__ambient {
  position: absolute;
  z-index: -2;
  inset: -8%;
  overflow: hidden;
  pointer-events: none;
}

.contact__ambient span {
  position: absolute;
  border-radius: 50%;
  filter: blur(72px);
  opacity: .5;
}

.contact__ambient span:nth-child(1) {
  top: 5%;
  left: 4%;
  width: 34rem;
  height: 28rem;
  background: rgba(207, 232, 255, .74);
}

.contact__ambient span:nth-child(2) {
  top: 20%;
  right: 3%;
  width: 31rem;
  height: 25rem;
  background: rgba(255, 235, 196, .62);
}

.contact__ambient span:nth-child(3) {
  bottom: 4%;
  left: 30%;
  width: 34rem;
  height: 23rem;
  background: rgba(224, 214, 255, .52);
}

.contact__intro {
  width: min(48rem, calc(100% - 2 * var(--page-gutter)));
  margin: 0 auto clamp(2rem, 4vw, 3rem);
  text-align: center;
}

.contact__title {
  display: grid;
  margin: 0;
  color: var(--color-text-display);
  font-family: var(--font-display);
  font-size: clamp(3.45rem, 6vw, 4.9rem);
  font-weight: var(--weight-bold);
  letter-spacing: -.04em;
  line-height: .94;
  text-wrap: balance;
}

.contact__title [lang="en"] {
  margin-top: .42rem;
  color: #5c6c83;
  font-size: .57em;
  font-weight: var(--weight-semibold);
  letter-spacing: -.025em;
}

.contact__statement {
  margin: 1.35rem 0 0;
  color: var(--color-text-primary);
  font-size: clamp(1.1rem, 1.7vw, 1.35rem);
  font-weight: var(--weight-semibold);
  letter-spacing: -.015em;
}

.contact__description {
  margin: .35rem auto 0;
  color: var(--contact-copy);
  font-size: .92rem;
  line-height: 1.75;
}

.contact-card {
  width: min(61rem, calc(100% - 2 * var(--page-gutter)));
  min-height: 28rem;
  display: grid;
  margin: 0 auto;
  padding: clamp(1.15rem, 2.2vw, 1.7rem);
  overflow: hidden;
  grid-template-columns: minmax(17rem, .78fr) minmax(0, 1.42fr);
  background:
    radial-gradient(42rem 30rem at 8% 12%, rgba(209, 235, 255, .2), transparent 68%),
    radial-gradient(34rem 25rem at 92% 88%, rgba(255, 229, 190, .14), transparent 70%),
    linear-gradient(125deg, rgba(255, 255, 255, .19), rgba(231, 241, 255, .09) 50%, rgba(255, 248, 230, .08)),
    rgba(245, 249, 253, .13);
  box-shadow:
    0 34px 82px rgba(66, 91, 119, .105),
    inset 0 1px 0 rgba(255, 255, 255, .82),
    inset 0 -1px 0 rgba(180, 207, 232, .16);
  -webkit-backdrop-filter: blur(var(--glass-blur-media)) saturate(146%);
  backdrop-filter: blur(var(--glass-blur-media)) saturate(146%);
}

.contact-card::before {
  background:
    radial-gradient(420px circle at var(--glass-x) var(--glass-y), rgba(255, 255, 255, .46), transparent 66%),
    linear-gradient(145deg, rgba(255, 255, 255, .34), rgba(255, 255, 255, .03) 46%, rgba(200, 227, 255, .1));
}

.contact-card::after {
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .26),
    inset 0 1px 0 rgba(255, 255, 255, .7),
    inset 1px 0 0 rgba(255, 255, 255, .32),
    inset 0 -1px 0 rgba(143, 177, 210, .1);
}

.contact-identity {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 1.2rem clamp(1.4rem, 2.8vw, 2.3rem) 1.4rem;
  border-right: 1px solid rgba(111, 142, 176, .18);
  text-align: center;
}

.contact-avatar {
  display: grid;
  width: clamp(6rem, 8vw, 7.4rem);
  aspect-ratio: 1;
  place-items: center;
  border: 5px solid rgba(255, 255, 255, .82);
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 25%, rgba(255, 255, 255, .9), transparent 36%),
    linear-gradient(145deg, rgba(210, 234, 255, .9), rgba(255, 239, 205, .72));
  box-shadow: 0 14px 36px rgba(76, 98, 126, .15), inset 0 1px 0 rgba(255, 255, 255, .95);
  color: #586f8d;
  font-size: 2.1rem;
  font-weight: var(--weight-semibold);
}

.contact-identity h3 {
  margin: 1rem 0 0;
  color: var(--color-text-primary);
  font-size: 1.25rem;
  font-weight: var(--weight-bold);
  letter-spacing: -.02em;
}

.contact-identity > p {
  margin: .3rem 0 0;
  color: var(--contact-copy);
  font-size: .9rem;
  line-height: 1.55;
}

.contact-tags {
  width: min(100%, 19rem);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin: 1.1rem 0 0;
  padding: 0;
  gap: .48rem;
  list-style: none;
}

.contact-tags li {
  min-height: 2.1rem;
  display: inline-grid;
  place-items: center;
  padding: .35rem .92rem;
  border: 1px solid rgba(255, 255, 255, .58);
  border-radius: var(--radius-pill);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .26), rgba(231, 243, 255, .1)),
    rgba(255, 255, 255, .08);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .76),
    0 7px 18px rgba(78, 103, 132, .045);
  color: #52647b;
  font-size: .76rem;
  line-height: 1.2;
}

.contact-availability {
  width: min(100%, 19rem);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(105, 133, 164, .16);
  text-align: left;
}

.contact-availability__dot {
  width: .68rem;
  height: .68rem;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #20bf7c;
  box-shadow: 0 0 0 6px rgba(32, 191, 124, .09), 0 3px 10px rgba(32, 191, 124, .22);
  animation: contact-breathe 3s var(--ease-soft) infinite;
}

.contact-availability strong,
.contact-availability small { display: block; }
.contact-availability strong { color: var(--color-text-primary); font-size: .76rem; letter-spacing: .12em; }
.contact-availability small { margin-top: .2rem; color: var(--contact-copy); font-size: .75rem; }

.contact-methods {
  display: grid;
  min-width: 0;
  align-content: center;
  gap: .62rem;
  padding: .35rem 0 .35rem clamp(1.25rem, 2.4vw, 2rem);
}

.contact-method {
  min-width: 0;
  display: grid;
  align-items: center;
  grid-template-columns: 3.35rem minmax(0, 1fr) 5.65rem;
  gap: .9rem;
  padding: .9rem 1rem;
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: var(--radius-control);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .14), rgba(222, 239, 255, .045) 58%, rgba(255, 244, 225, .05));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .5),
    inset 0 -1px 0 rgba(147, 179, 209, .06);
}

.contact-method--wechat { grid-template-columns: 3.35rem minmax(0, 1fr) 5.65rem 7.2rem; }

.contact-method--email { grid-template-columns: 3.35rem minmax(0, 1fr) 5.65rem 7.2rem; }

.contact-method--email::after {
  content: "";
  grid-column: 4;
  width: 7.2rem;
  height: 1px;
}

.contact-method__icon {
  display: grid;
  width: 3.35rem;
  height: 3.35rem;
  place-items: center;
  border-radius: 1.1rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .82);
}

.contact-method__icon svg {
  width: 1.75rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.65;
}

.contact-method__icon--wechat { background: rgba(219, 248, 235, .82); color: #08a85f; }
.contact-method__icon--email { background: rgba(220, 237, 255, .84); color: #286ee8; }
.contact-method__icon--social { background: rgba(239, 229, 255, .82); color: #8251de; }

.contact-method__copy { min-width: 0; }
.contact-method__copy h3 { margin: 0; color: var(--color-text-primary); font-size: .98rem; line-height: 1.3; }
.contact-method__copy p { margin: .12rem 0 0; color: var(--contact-muted); font-size: .72rem; }

.contact-value {
  width: fit-content;
  max-width: 100%;
  display: block;
  margin: .35rem 0 0;
  padding: 0;
  overflow-wrap: anywhere;
  border: 0;
  background: transparent;
  color: #263852;
  cursor: pointer;
  font-size: .84rem;
  line-height: 1.45;
  text-align: left;
  text-decoration: none;
  text-underline-offset: .22em;
}

a.contact-value:hover { text-decoration: underline; }

.contact-copy {
  width: 5.65rem;
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .36rem;
  padding: .42rem .72rem;
  cursor: pointer;
  color: #34547d;
  font-size: .74rem;
  font-weight: var(--weight-medium);
  transition: color var(--motion-feedback) var(--ease-out), box-shadow var(--motion-feedback) var(--ease-out), transform var(--motion-feedback) var(--ease-out);
}

.contact-copy svg {
  width: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.45;
}

.contact-copy.is-copied { color: #087b50; }

.contact-qr { display: grid; justify-items: center; gap: .28rem; }

.contact-qr__media {
  position: relative;
  width: 6.6rem;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .68);
  border-radius: var(--radius-thumbnail);
  background: rgba(255, 255, 255, .2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .82), 0 8px 20px rgba(66, 91, 119, .08);
}

.contact-qr__media img {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 136%;
  max-width: none;
  height: auto;
  transform: translate(-50%, -48%);
}

.contact-qr small { color: var(--contact-muted); font-size: .61rem; }

.contact-method--social {
  align-items: start;
  grid-template-columns: 3.35rem minmax(8rem, .6fr) minmax(0, 1.4fr);
}

.contact-socials {
  display: grid;
  min-width: 0;
  justify-content: end;
  grid-template-columns: repeat(3, 4.55rem);
  gap: .62rem;
}

.contact-socials button {
  position: relative;
  isolation: isolate;
  width: 4.55rem;
  min-height: 4.55rem;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: .3rem;
  padding: .5rem .25rem;
  border: 1px solid rgba(255, 255, 255, .56);
  border-radius: var(--radius-thumbnail);
  background:
    radial-gradient(76px circle at var(--glass-x) var(--glass-y), rgba(255, 255, 255, .48), transparent 68%),
    linear-gradient(145deg, rgba(255, 255, 255, .24), rgba(224, 239, 255, .08));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .82),
    inset 0 -1px 0 rgba(139, 171, 203, .08),
    0 9px 20px rgba(66, 89, 116, .055);
  color: var(--color-text-primary);
  cursor: pointer;
  transition: background-color var(--motion-feedback) var(--ease-out), border-color var(--motion-feedback) var(--ease-out), box-shadow var(--motion-feedback) var(--ease-out), transform var(--motion-feedback) var(--ease-out);
}

.contact-socials__icon { display: grid; width: 1.7rem; height: 1.7rem; place-items: center; }
.contact-socials__icon svg { width: 100%; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.contact-socials strong { overflow: hidden; max-width: 100%; font-size: .66rem; font-weight: var(--weight-semibold); text-overflow: ellipsis; white-space: nowrap; }
.contact-social--douyin { color: #26354b !important; }
.contact-social--xiaohongshu { color: #b94354 !important; }
.contact-social--github { color: #26354b !important; }
.contact-socials button.is-copied { border-color: rgba(74, 183, 137, .38); color: #087b50 !important; }

.contact-copy:focus-visible,
.contact-value:focus-visible,
.contact-socials button:focus-visible,
.back-to-top:focus-visible,
.site-footer a:focus-visible {
  outline: 3px solid rgba(49, 92, 201, .52);
  outline-offset: 3px;
}

.contact-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
  margin: -1px;
  white-space: nowrap;
}

.site-footer {
  width: min(91rem, calc(100% - 2 * var(--page-gutter)));
  min-height: 5rem;
  display: grid;
  align-items: center;
  margin: 0 auto;
  padding: 1.25rem 0 1.6rem;
  border-top: 1px solid rgba(96, 125, 158, .16);
  grid-template-columns: 1fr auto 1fr;
  gap: 1.5rem;
  color: #62738a;
  font-size: .68rem;
}

.site-footer p { margin: 0; }
.site-footer__filings, .site-footer__links { display: flex; align-items: center; justify-content: center; gap: 1rem; }
.site-footer__links { justify-content: flex-end; }
.site-footer__divider { width: 1px; height: 1rem; background: rgba(82, 111, 145, .22); }
.site-footer__filings span:not(.site-footer__divider), .site-footer__links span { color: #5f7087; }
.site-footer a { color: #536883; text-decoration: none; text-underline-offset: .24em; }
.site-footer a:hover { text-decoration: underline; }

.back-to-top {
  position: fixed;
  z-index: 18;
  right: clamp(1rem, 2.8vw, 2.5rem);
  bottom: clamp(1rem, 2.6vw, 2.2rem);
  width: 3.5rem;
  height: 3.5rem;
  display: grid;
  place-items: center;
  padding: 0;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity var(--motion-base) var(--ease-out), transform var(--motion-base) var(--ease-out), box-shadow var(--motion-feedback) var(--ease-out);
}

.back-to-top svg { width: 1.4rem; fill: none; stroke: #46607f; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.55; }
.back-to-top.is-visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.back-to-top.is-near-footer { bottom: 6.3rem; }

@media (hover: hover) and (pointer: fine) {
  .contact-copy:hover { box-shadow: 0 15px 34px rgba(72, 92, 116, .13), var(--glass-inset-control); transform: translateY(-1px); }
  .contact-copy:active { transform: translateY(0) scale(.985); }
  .contact-socials button:hover { border-color: rgba(255, 255, 255, .84); box-shadow: 0 15px 30px rgba(70, 93, 121, .11), inset 0 1px 0 rgba(255, 255, 255, .92); transform: translateY(-2px); }
  .back-to-top:hover { box-shadow: 0 16px 38px rgba(72, 92, 116, .15), var(--glass-inset-control); transform: translateY(-2px); }
}

@keyframes contact-breathe {
  0%, 100% { opacity: .72; transform: scale(.96); }
  50% { opacity: 1; transform: scale(1.04); }
}

@media (max-width: 1040px) {
  .contact-card { width: min(56rem, calc(100% - 2rem)); grid-template-columns: minmax(15rem, .72fr) minmax(0, 1.4fr); }
  .contact-method--wechat { grid-template-columns: 3.1rem minmax(0, 1fr) 5.4rem 6.6rem; gap: .7rem; }
  .contact-method--email { grid-template-columns: 3.1rem minmax(0, 1fr) 5.4rem 6.6rem; }
  .contact-method--email::after { width: 6.6rem; }
  .contact-method__icon { width: 3.1rem; height: 3.1rem; }
  .contact-qr__media { width: 6rem; }
  .contact-method--social { grid-template-columns: 3.1rem minmax(7rem, .55fr) minmax(0, 1.45fr); }
}

@media (max-width: 840px) {
  .contact { min-height: 0; padding: 7rem 0 3rem; }
  .contact__intro { width: min(38rem, calc(100% - 2rem)); }
  .contact-card { width: min(38rem, calc(100% - 2rem)); min-height: 0; grid-template-columns: 1fr; }
  .contact-identity { padding: 1.6rem 1rem 2rem; border-right: 0; border-bottom: 1px solid rgba(111, 142, 176, .18); }
  .contact-methods { padding: 1.15rem 0 0; }
  .site-footer { width: calc(100% - 2rem); grid-template-columns: 1fr; gap: .8rem; text-align: center; }
  .site-footer__links { justify-content: center; }
  .back-to-top.is-near-footer { opacity: 0; pointer-events: none; transform: translateY(10px); }
}

@media (max-width: 560px) {
  .contact { padding-top: 6.8rem; }
  .contact__title { font-size: clamp(3.35rem, 17vw, 4.3rem); }
  .contact__description { max-width: 22rem; }
  .contact-card { width: min(100% - 1.25rem, 28rem); padding: .65rem; border-radius: var(--radius-card); }
  .contact-identity { padding: 1.45rem .65rem 1.7rem; }
  .contact-avatar { width: 5.8rem; border-width: 4px; }
  .contact-tags, .contact-availability { width: min(100%, 18rem); }
  .contact-methods { gap: .65rem; padding-top: .65rem; }
  .contact-method { padding: .85rem; grid-template-columns: 3rem minmax(0, 1fr) 5.25rem; gap: .68rem; }
  .contact-method--wechat { grid-template-columns: 3rem minmax(0, 1fr) 5.25rem; }
  .contact-method--email { grid-template-columns: 3rem minmax(0, 1fr) 5.25rem; }
  .contact-method--email::after { display: none; }
  .contact-method--wechat .contact-qr { grid-column: 1 / -1; margin-top: .35rem; }
  .contact-method__icon { width: 3rem; height: 3rem; border-radius: 1rem; }
  .contact-copy { width: 5.25rem; padding-inline: .55rem; }
  .contact-qr__media { width: 7.3rem; }
  .contact-method--social { grid-template-columns: 3rem minmax(0, 1fr); }
  .contact-method--social .contact-socials { grid-column: 1 / -1; }
  .contact-socials { justify-content: center; grid-template-columns: repeat(3, minmax(4.2rem, 4.55rem)); }
  .contact-socials button { width: 100%; min-height: 4.55rem; }
  .contact-value { min-height: 2.75rem; display: inline-flex; align-items: center; }
  .site-footer a { min-width: 2.75rem; min-height: 2.75rem; display: inline-flex; align-items: center; justify-content: center; }
  .back-to-top { right: .8rem; bottom: .8rem; width: 3.25rem; height: 3.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  .contact-availability__dot { animation: none !important; transform: none !important; }
  .contact-qr__media,
  .contact-copy,
  .contact-socials button,
  .back-to-top { transition-duration: .01ms !important; }
  .contact-qr__placeholder:hover,
  .contact-copy:hover,
  .contact-socials button:hover,
  .back-to-top:hover { transform: none !important; }
}
