/* Homepage identity stage: one glass nucleus with two diagonal electron orbits. */
html.home-document,
.home-page {
  overflow-x: clip;
}

.home-page .home-header,
.home-page .home-header.has-site-nav {
  position: sticky;
  top: 0;
  right: 0;
  left: 0;
  bottom: auto;
  z-index: 20;
  min-height: 4.25rem;
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.home-page .home-intro {
  display: grid;
  width: 100%;
  min-height: 43rem;
  height: clamp(43rem, 100svh, 58rem);
  margin: 0;
  padding: 0;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  overflow: visible;
  mask-image: none;
  -webkit-mask-image: none;
  place-items: center;
}

.home-orbit {
  --card-width: clamp(27rem, 38vw, 36rem);
  --card-height: clamp(31rem, 62vh, 38rem);
  /* Keep the nucleus readable while giving the electron paths room to clear it. */
  --orbit-width: min(clamp(50rem, 72vw, 80rem), calc(100svh + 7rem));
  --orbit-height: min(clamp(19rem, 26vw, 24rem), calc(100svh - 20rem));
  --orbit-stroke: rgba(100, 116, 139, 0.22);
  --orbit-diagonal-a-tilt: 37deg;
  --orbit-diagonal-b-tilt: -37deg;
  position: relative;
  top: clamp(0.5rem, 2vh, 1.25rem);
  display: grid;
  width: min(100%, 64rem);
  height: 100%;
  margin-inline: auto;
  overflow: visible;
  place-items: center;
  isolation: isolate;
}

.home-orbit-track {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 50%;
  width: var(--orbit-width);
  height: var(--orbit-height);
  box-sizing: border-box;
  border: 1px solid var(--orbit-stroke);
  border-radius: 50%;
  transform: translate(-50%, -50%) rotate(var(--orbit-tilt));
  transform-origin: center;
  pointer-events: none;
}

.home-orbit-track--diagonal-a {
  --orbit-tilt: var(--orbit-diagonal-a-tilt);
}

.home-orbit-track--diagonal-b {
  --orbit-tilt: var(--orbit-diagonal-b-tilt);
}

.home-orbit-surface,
.home-orbit-center {
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--card-width);
  height: var(--card-height);
  box-sizing: border-box;
  transform: translate(-50%, -50%);
}

.home-orbit-surface {
  z-index: 20;
  overflow: hidden;
  pointer-events: none;
  background:
    linear-gradient(136deg, rgba(255, 255, 255, 0.52), rgba(244, 247, 250, 0.34) 57%, rgba(226, 232, 240, 0.28)),
    rgba(241, 245, 249, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 0.75rem;
  box-shadow:
    0 28px 62px rgba(71, 85, 105, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.96),
    inset 0 -1px 0 rgba(148, 163, 184, 0.14);
  backdrop-filter: blur(22px) saturate(125%);
  -webkit-backdrop-filter: blur(22px) saturate(125%);
}

.home-orbit-surface::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: '';
  background: linear-gradient(116deg, rgba(255, 255, 255, 0.28), transparent 39%, rgba(255, 255, 255, 0.04) 68%, rgba(255, 255, 255, 0.16));
}

.home-orbit-center {
  z-index: 30;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: clamp(0.75rem, 1.4vw, 1.1rem);
  padding: clamp(1.35rem, 2vw, 1.8rem);
  overflow: visible;
  color: #334155;
  text-align: left;
}

.home-orbit-center > * {
  position: relative;
  z-index: 1;
}

.home-orbit-details,
.home-orbit-details dd,
.home-orbit-roles p {
  margin: 0;
}

.home-orbit-details {
  display: grid;
  min-height: 0;
  grid-template-rows: auto minmax(0, 1fr);
  gap: clamp(0.75rem, 1.5vh, 1.1rem);
  align-content: start;
}

.home-orbit-row {
  min-width: 0;
}

.home-orbit-row > dd {
  min-width: 0;
}

.home-orbit-row--name {
  --name-slot-height: clamp(3.5rem, 4.2vw, 4.2rem);
  display: grid;
  grid-template-rows: auto var(--name-slot-height);
  gap: 0.42rem;
  padding-bottom: clamp(0.55rem, 0.9vw, 0.72rem);
  border-bottom: 1px solid rgba(71, 85, 105, 0.24);
}

.home-orbit-row--name > dd {
  height: var(--name-slot-height);
}

.home-orbit-row:not(.home-orbit-row--name) {
  display: grid;
  min-height: 0;
  grid-template-columns: minmax(7.1rem, 0.68fr) minmax(0, 1.32fr);
  column-gap: clamp(0.8rem, 1.7vw, 1.3rem);
  align-content: stretch;
  align-items: start;
  align-self: stretch;
}

.home-orbit-label {
  color: #334155;
  font-family: var(--sans);
  font-size: clamp(1rem, 1.25vw, 1.15rem);
  font-weight: 800;
  line-height: 1.35;
  white-space: nowrap;
}

.home-page .home-orbit-center .home-orbit-name {
  display: flex;
  width: 100%;
  height: 100%;
  min-width: 0;
  align-items: center;
  justify-content: center;
  margin: 0;
  color: #1e293b;
  font-family: var(--sans);
  font-size: clamp(2.9rem, 3.7vw, 3.5rem);
  font-weight: 780;
  letter-spacing: 0;
  line-height: 1.08;
  text-align: center;
  white-space: nowrap;
}

.home-page .home-orbit-center[data-name-form='long'] .home-orbit-name,
.home-page .home-orbit-center[data-name-form='long'] .home-orbit-name .name-character {
  font-size: clamp(2.35rem, 3vw, 2.95rem);
}

.home-orbit-roles {
  display: grid;
  min-width: 0;
  gap: clamp(0.72rem, 1.35vh, 1rem);
  align-self: stretch;
  align-content: space-evenly;
  color: #475569;
  font-size: clamp(1rem, 1.25vw, 1.15rem);
  font-weight: 400;
  line-height: 1.3;
  text-align: right;
}

.home-orbit-roles p {
  min-width: 0;
  white-space: nowrap;
}

.home-orbit-say-hi {
  width: 100%;
  padding-top: clamp(0.55rem, 1.1vh, 0.8rem);
  border-top: 1px solid rgba(71, 85, 105, 0.16);
}

.home-orbit-say-hi-control {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.5rem;
  align-items: center;
}

.home-orbit-say-hi .say-hi-button {
  display: inline-flex;
  min-height: 2.8rem;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.82rem;
  color: #ffffff;
  background: #0f172a;
  border: 1px solid #0f172a;
  border-radius: 0.45rem;
  box-shadow: none;
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 720;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.home-orbit-say-hi .say-hi-button svg {
  width: 0.9rem;
  height: 0.9rem;
  stroke: currentColor;
}

.home-orbit-say-hi .say-hi-button:hover:not(:disabled),
.home-orbit-say-hi .say-hi-button:focus-visible:not(:disabled) {
  background: #c2410c;
  border-color: #c2410c;
  transform: translateY(-1px);
}

.home-orbit-say-hi .say-hi-button:focus-visible {
  outline: 2px solid #fdba74;
  outline-offset: 3px;
}

.home-orbit-say-hi .say-hi-button:disabled {
  color: #64748b;
  background: #f1f5f9;
  border-color: #e2e8f0;
  cursor: not-allowed;
}

.home-orbit-say-hi-meta {
  display: grid;
  min-width: 0;
  gap: 0.08rem;
  justify-items: end;
}

.home-orbit-say-hi .say-hi-status,
.home-orbit-say-hi .say-hi-count {
  margin: 0;
  color: #64748b;
  font-size: 0.78rem;
  line-height: 1.35;
  text-align: right;
}

.home-orbit-say-hi .say-hi-count {
  display: inline-flex;
  gap: 0.24rem;
  justify-content: flex-end;
}

.home-orbit-say-hi .say-hi-count strong {
  color: #334155;
  font-family: var(--mono);
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
}

.home-orbit-say-hi[data-say-hi-state='submitted'] .say-hi-status {
  color: #c2410c;
}

.home-orbit-say-hi[data-say-hi-state='unavailable'] .say-hi-status {
  color: #b45309;
}

.home-orbit-center.is-enhanced .name-character {
  display: inline-block;
  opacity: 0;
  filter: blur(9px);
  transform: translateY(0.22em) scale(0.92);
  transform-origin: 50% 80%;
  transition: opacity 380ms ease, filter 420ms ease, transform 420ms cubic-bezier(0.2, 0.75, 0.25, 1);
  transition-delay: var(--char-enter-delay, 0ms);
}

.home-orbit-center.is-enhanced.is-visible .name-character {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0) scale(1);
}

.home-orbit-center.is-enhanced.is-leaving .name-character {
  opacity: 0;
  filter: blur(9px);
  transform: translate(0.18em, -0.34em) scale(1.12);
  transition-delay: var(--char-leave-delay, 0ms);
}

.home-orbit-electron {
  position: absolute;
  z-index: var(--electron-layer, 2);
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  pointer-events: none;
  transform: translate3d(0, 0, 0);
  will-change: transform;
}

.home-orbit-satellite {
  position: absolute;
  z-index: 0;
  top: 0;
  left: 0;
  display: grid;
  width: var(--satellite-size);
  height: var(--satellite-size);
  margin: 0;
  pointer-events: none;
  place-items: center;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(226, 232, 240, 0.6));
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: 50%;
  box-shadow:
    0 14px 30px rgba(71, 85, 105, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.98),
    inset 0 -1px 0 rgba(148, 163, 184, 0.12);
  backdrop-filter: blur(16px) saturate(125%);
  transform: translate(-50%, -50%) scale(1);
  transform-origin: center;
}

.satellite--iflytek {
  --satellite-size: clamp(7rem, 10vw, 9rem);
  background: linear-gradient(145deg, rgba(71, 85, 105, 0.97), rgba(30, 41, 59, 0.95));
  border-color: rgba(255, 255, 255, 0.48);
  box-shadow: 0 16px 34px rgba(30, 41, 59, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.satellite--uestc {
  --satellite-size: clamp(7rem, 9vw, 8rem);
}

.satellite--python {
  --satellite-size: clamp(5.3rem, 6.8vw, 6.2rem);
}

.satellite--deptrum {
  --satellite-size: clamp(7.2rem, 9.2vw, 8.2rem);
}

.satellite--cplusplus {
  --satellite-size: clamp(5.1rem, 6.2vw, 5.7rem);
}

.satellite--stepfun {
  --satellite-size: clamp(8.5rem, 10.5vw, 10.5rem);
}

.home-orbit-satellite img {
  display: block;
  width: 68%;
  height: 68%;
  object-fit: contain;
}

.satellite--uestc img,
.satellite--iflytek img {
  width: 82%;
  height: 82%;
}

.satellite--deptrum img,
.satellite--stepfun img {
  width: 78%;
  height: 78%;
}

.satellite--iflytek img {
  filter: drop-shadow(0 1px 2px rgba(15, 23, 42, 0.2));
}

.satellite--python img,
.satellite--cplusplus img {
  width: 52%;
  height: 52%;
}

@media (max-width: 760px) {
  .home-page .home-header,
  .home-page .home-header.has-site-nav {
    min-height: 3.9rem;
  }

  .home-page .home-intro {
    min-height: 42rem;
    height: max(42rem, 100svh);
  }

  .home-orbit {
    --card-width: min(22rem, calc(100vw - 1rem));
    --card-height: min(22rem, calc(100svh - 4.7rem));
    --orbit-width: min(40rem, calc(100vw + 16rem));
    --orbit-height: min(20rem, max(17rem, calc(var(--card-height) - 4rem)));
    --orbit-stroke: rgba(100, 116, 139, 0.24);
    width: 100%;
    top: 0;
  }

  .home-orbit-surface {
    background:
      linear-gradient(136deg, rgba(255, 255, 255, 0.46), rgba(244, 247, 250, 0.28) 57%, rgba(226, 232, 240, 0.22)),
      rgba(241, 245, 249, 0.22);
    box-shadow:
      0 24px 54px rgba(71, 85, 105, 0.12),
      inset 0 1px 0 rgba(255, 255, 255, 0.9),
      inset 0 -1px 0 rgba(148, 163, 184, 0.12);
  }

  .home-orbit-center {
    gap: 0.6rem;
    padding: 0.95rem;
  }

  .home-orbit-surface::before {
    background: linear-gradient(116deg, rgba(255, 255, 255, 0.2), transparent 41%, rgba(255, 255, 255, 0.03) 68%, rgba(255, 255, 255, 0.08));
  }

  .home-orbit-details {
    gap: 0.6rem;
  }

  .home-orbit-row--name {
    --name-slot-height: 2.6rem;
    gap: 0.26rem;
    padding-bottom: 0.48rem;
  }

  .home-orbit-row:not(.home-orbit-row--name) {
    grid-template-columns: minmax(5rem, 0.66fr) minmax(0, 1.34fr);
    column-gap: 0.56rem;
  }

  .home-orbit-label {
    font-size: 0.88rem;
  }

  .home-page .home-orbit-center .home-orbit-name {
    font-size: 2.2rem;
  }

  .home-page .home-orbit-center[data-name-form='long'] .home-orbit-name,
  .home-page .home-orbit-center[data-name-form='long'] .home-orbit-name .name-character {
    font-size: 1.72rem;
  }

  .home-orbit-roles {
    gap: 0.58rem;
    font-size: 0.78rem;
  }

  .home-orbit-say-hi {
    padding-top: 0.42rem;
  }

  .home-orbit-say-hi-control {
    gap: 0.34rem;
  }

  .home-orbit-say-hi .say-hi-button {
    min-height: 2.4rem;
    gap: 0.34rem;
    padding: 0.42rem 0.58rem;
    font-size: 0.76rem;
  }

  .home-orbit-say-hi .say-hi-status,
  .home-orbit-say-hi .say-hi-count {
    font-size: 0.68rem;
  }

  .home-orbit-say-hi .say-hi-count strong {
    font-size: 0.9rem;
  }

  .satellite--iflytek { --satellite-size: 6.2rem; }
  .satellite--uestc { --satellite-size: 6rem; }
  .satellite--python { --satellite-size: 4.6rem; }
  .satellite--deptrum { --satellite-size: 6rem; }
  .satellite--cplusplus { --satellite-size: 4.2rem; }
  .satellite--stepfun { --satellite-size: 7.2rem; }
}

@media (max-width: 360px) {
  .home-page .home-header,
  .home-page .home-header.has-site-nav {
    min-height: 3.75rem;
  }

  .home-orbit {
    --card-width: calc(100vw - 0.5rem);
    --card-height: min(21rem, calc(100svh - 4.3rem));
    --orbit-width: min(38rem, calc(100vw + 15rem));
    --orbit-height: min(19rem, max(16rem, calc(var(--card-height) - 4rem)));
    --orbit-stroke: rgba(100, 116, 139, 0.26);
  }

  .home-orbit-center {
    padding: 0.82rem;
  }

  .home-orbit-details {
    gap: 0.5rem;
  }

  .home-orbit-row--name {
    --name-slot-height: 2.3rem;
    gap: 0.22rem;
    padding-bottom: 0.42rem;
  }

  .home-orbit-row:not(.home-orbit-row--name) {
    grid-template-columns: minmax(4.3rem, 0.64fr) minmax(0, 1.36fr);
    column-gap: 0.46rem;
  }

  .home-orbit-label {
    font-size: 0.8rem;
  }

  .home-page .home-orbit-center .home-orbit-name {
    font-size: 1.92rem;
  }

  .home-page .home-orbit-center[data-name-form='long'] .home-orbit-name,
  .home-page .home-orbit-center[data-name-form='long'] .home-orbit-name .name-character {
    font-size: 1.52rem;
  }

  .home-orbit-roles {
    gap: 0.48rem;
    font-size: 0.72rem;
  }

  .satellite--iflytek { --satellite-size: 5.15rem; }
  .satellite--uestc { --satellite-size: 5rem; }
  .satellite--python { --satellite-size: 3.95rem; }
  .satellite--deptrum { --satellite-size: 5.2rem; }
  .satellite--cplusplus { --satellite-size: 3.55rem; }
  .satellite--stepfun { --satellite-size: 6.2rem; }

}

/* Mobile identity stage: keep the orbit legible and bring the module list into view. */
@media (max-width: 760px) {
  .home-page .home-intro {
    min-height: 0;
    height: 29rem;
  }

  .home-orbit {
    --card-width: min(20rem, calc(100vw - 2.5rem));
    --card-height: min(20rem, calc(100vw - 1.25rem));
    --orbit-width: min(22rem, calc(100vw - 1.5rem));
    --orbit-height: clamp(8rem, 32vw, 10rem);
    --orbit-stroke: rgba(100, 116, 139, 0.28);
    top: 1rem;
  }

  .home-orbit-track {
    z-index: 25;
  }

  .satellite--iflytek { --satellite-size: 5.1rem; }
  .satellite--uestc { --satellite-size: 4.9rem; }
  .satellite--python { --satellite-size: 3.7rem; }
  .satellite--deptrum { --satellite-size: 4.9rem; }
  .satellite--cplusplus { --satellite-size: 3.4rem; }
  .satellite--stepfun { --satellite-size: 5.8rem; }
}

@media (max-width: 360px) {
  .home-page .home-intro {
    height: 29rem;
  }

  .home-orbit {
    --card-width: min(18rem, calc(100vw - 2rem));
    --card-height: min(19rem, calc(100vw - 1.25rem));
    --orbit-width: min(22rem, calc(100vw - 2rem));
    --orbit-height: 7.5rem;
    --orbit-stroke: rgba(100, 116, 139, 0.3);
    top: 1rem;
  }

  .satellite--iflytek { --satellite-size: 4.4rem; }
  .satellite--uestc { --satellite-size: 4.2rem; }
  .satellite--python { --satellite-size: 3.3rem; }
  .satellite--deptrum { --satellite-size: 4.3rem; }
  .satellite--cplusplus { --satellite-size: 3rem; }
  .satellite--stepfun { --satellite-size: 5.2rem; }
}

@media (max-width: 330px) {
  .home-orbit {
    --orbit-width: min(21rem, calc(100vw - 2.5rem));
  }

  .satellite--stepfun {
    --satellite-size: 5rem;
  }
}
