/* 深邃宇宙 + 小王子式微型星球视觉系统。
   基调：深蓝黑宇宙、少量金与蓝的星云层次、高级白文字；
   行星是有岩石质感的微型世界（纯 CSS），只用 transform / opacity 做动效。
   艺术参考：resource/ 下两张小王子星球插画（B-612 玫瑰星球与国王星球）。 */
:root {
  --bg-deep: #04060d;
  --bg-soft: #080a0d;
  --ink: rgba(255, 255, 255, 0.94);
  --muted: rgba(255, 255, 255, 0.58);
  --faint: rgba(255, 255, 255, 0.4);
  --line: rgba(255, 255, 255, 0.12);
  --line-faint: rgba(255, 255, 255, 0.06);
  --line-strong: rgba(255, 255, 255, 0.3);
  --glow-white: rgba(255, 255, 255, 0.42);
  --glass: rgba(255, 255, 255, 0.035);
  --glass-deep: rgba(8, 10, 13, 0.88);
  --shadow: 0 30px 96px rgba(0, 0, 0, 0.55);
  --radius: 16px;
  --radius-lg: 20px;
  --serif: "Noto Serif SC", "Songti SC", "STSong", serif;
  --sans: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  /* 深蓝黑宇宙 + 远景星云：蓝色冷雾为主，右下与左下藏一点暖金尘埃（参考素材图的空间层次） */
  background:
    radial-gradient(1100px 760px at 74% 16%, rgba(64, 96, 168, 0.1), transparent 62%),
    radial-gradient(800px 600px at 22% 34%, rgba(40, 62, 118, 0.07), transparent 60%),
    radial-gradient(900px 700px at 86% 78%, rgba(196, 150, 78, 0.05), transparent 62%),
    radial-gradient(560px 420px at 8% 88%, rgba(180, 140, 80, 0.04), transparent 65%),
    linear-gradient(180deg, #04060d 0%, #060a15 50%, #02030a 100%);
  color: var(--ink);
  font-family: var(--sans);
  text-rendering: geometricPrecision;
}

/* 暗部噪声颗粒：消除大面积渐变的"数码平滑感" */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.04;
  mix-blend-mode: overlay;
}

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

p,
h1,
h2,
h3 {
  margin: 0;
}

button {
  font: inherit;
}

.loading-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  gap: 14px;
  background: var(--bg-deep);
  color: var(--muted);
  transition: opacity 360ms ease, visibility 360ms ease;
}

.loading-screen.is-hidden {
  visibility: hidden;
  opacity: 0;
}

/* 暖金星核：loading 标记和品牌 logo 共用，呼应主恒星 */
.loading-star,
.brand-sun {
  border-radius: 50%;
  background: radial-gradient(circle at 38% 34%, #fffdf4 0 20%, #ffe2a4 50%, #9c6a2c 88%);
  box-shadow: 0 0 16px rgba(255, 210, 140, 0.5), 0 0 48px rgba(255, 190, 110, 0.16);
}

.loading-star {
  width: 30px;
  height: 30px;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 0 clamp(18px, 4vw, 54px);
  border-bottom: 1px solid var(--line-faint);
  background: rgba(3, 4, 5, 0.55);
  backdrop-filter: blur(18px);
}

.brand,
.site-nav,
.hero-actions,
.contact-actions,
.panel-actions {
  display: flex;
  align-items: center;
}

.brand {
  gap: 12px;
  font-family: var(--serif);
  font-size: 1.06rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.brand-sun {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.site-nav {
  gap: 4px;
  color: var(--muted);
  font-size: 0.9rem;
}

.site-nav a {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 8px 14px;
  transition: color 180ms ease, border-color 180ms ease, background 180ms ease;
}

.site-nav a:hover {
  border-color: var(--line);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.04);
}

.hero-system {
  position: relative;
  min-height: 100vh;
  padding: 112px clamp(18px, 4vw, 54px) 44px;
  overflow: hidden;
}

/* 斜向金色尘埃带：呼应行星上的暖金细节 */
.hero-system::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(112deg, transparent 34%, rgba(196, 152, 80, 0.05) 50%, rgba(130, 95, 50, 0.028) 62%, transparent 78%);
}

/* 星空、流星、四芒星都画在这一块 Canvas 上（见 js/galaxy.js 的 initSpaceCanvas） */
.space-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.88;
}

.project-dock {
  position: relative;
  z-index: 4;
  display: flex;
  gap: 10px;
  max-width: min(1180px, 100%);
  margin: 0 auto;
  padding: 8px;
  overflow-x: auto;
  border: 1px solid var(--line-faint);
  border-radius: var(--radius-lg);
  background: rgba(5, 6, 8, 0.5);
  backdrop-filter: blur(18px);
  scrollbar-width: thin;
}

/* 项目快捷入口：星际档案卡片——更细的边、更弱的底、微弱扫描线 + 坐标角标 */
.dock-item {
  position: relative;
  flex: 0 0 auto;
  width: 178px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  padding: 13px 15px;
  background: rgba(255, 255, 255, 0.022);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  transition: transform 200ms ease, border-color 200ms ease, background 200ms ease, box-shadow 200ms ease, opacity 200ms ease;
}

/* 星图坐标角标 */
.dock-item::before {
  content: "";
  position: absolute;
  top: 7px;
  right: 9px;
  width: 7px;
  height: 7px;
  border-top: 1px solid rgba(255, 255, 255, 0.3);
  border-right: 1px solid rgba(255, 255, 255, 0.3);
  opacity: 0.55;
  transition: opacity 200ms ease;
}

/* 微弱扫描线 */
.dock-item::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.016) 0 1px, transparent 1px 4px);
  pointer-events: none;
}

.dock-item:hover::before,
.dock-item.is-active::before,
.dock-item.is-hovered::before {
  opacity: 1;
}

.dock-item span {
  display: block;
  color: var(--faint);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.dock-item strong,
.dock-item em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dock-item strong {
  margin-top: 6px;
  font-size: 0.94rem;
  font-weight: 650;
}

.dock-item em {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.76rem;
  font-style: normal;
}

.dock-item:hover,
.dock-item.is-active,
.dock-item.is-hovered {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--node-color, #ffffff) 36%, rgba(255, 255, 255, 0.2));
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 24px color-mix(in srgb, var(--node-color, #ffffff) 12%, transparent);
}

.dock-item.is-dimmed {
  opacity: 0.45;
}

.system-layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(270px, 0.84fr) minmax(420px, 1.22fr) minmax(280px, 0.82fr);
  gap: clamp(22px, 4vw, 56px);
  align-items: center;
  min-height: calc(100vh - 200px);
}

.hero-copy {
  min-width: 0;
}

.eyebrow {
  color: var(--faint);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
}

h1 {
  margin-top: 18px;
  font-family: var(--serif);
  font-size: clamp(3rem, 6.6vw, 6.2rem);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: 0.02em;
}

h1 small {
  display: block;
  margin-top: 18px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: clamp(0.96rem, 1.6vw, 1.14rem);
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.5;
}

.hero-summary {
  max-width: 540px;
  margin-top: 22px;
  color: var(--muted);
  font-size: clamp(0.98rem, 1.4vw, 1.06rem);
  line-height: 1.9;
}

.hero-actions,
.contact-actions,
.panel-actions {
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 18px;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary {
  border-color: transparent;
  background: rgba(255, 255, 255, 0.92);
  color: #0a0c0e;
}

.button.primary:hover {
  background: #ffffff;
  box-shadow: 0 0 26px rgba(255, 255, 255, 0.16);
}

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

.button.ghost:hover {
  border-color: var(--line-strong);
}

.solar-map {
  position: relative;
  width: min(48vw, 640px);
  aspect-ratio: 1;
  margin: 0 auto;
  isolation: isolate;
}

/* 轨道线由 GalaxyEngine 按项目数据生成，宽高与行星轨迹共用同一套椭圆参数 */
.orbit-rings {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* 轨道线：只画车道，极淡且局部断开（双重遮罩：迎光弧亮 + 背光弧隐没），
   作用是暗示运行轨迹，不做主视觉，几乎要看不见 */
.orbit-ring {
  position: absolute;
  left: 50%;
  top: 50%;
  border: 1px solid rgba(200, 214, 244, 0.08);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  -webkit-mask-image: conic-gradient(from 210deg, transparent 0 12%, #000 26%, transparent 46% 58%, #000 74%, transparent 88% 100%);
  mask-image: conic-gradient(from 210deg, transparent 0 12%, #000 26%, transparent 46% 58%, #000 74%, transparent 88% 100%);
  transition: border-color 220ms ease, box-shadow 220ms ease, opacity 220ms ease;
}

.orbit-ring.is-active {
  border-color: rgba(214, 226, 252, 0.3);
  box-shadow: 0 0 20px rgba(160, 190, 255, 0.06);
}

.orbit-ring.is-dimmed {
  opacity: 0.4;
}

/* 主恒星 = 个人主页入口：暖金星核 + 柔和引力光晕 + 细环刻度。
   是一个 <a>，点击跳转 galaxyConfig.homeEntryUrl，可 Tab 聚焦、回车进入 */
.core-star {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 7;
  display: grid;
  place-items: center;
  width: clamp(110px, 14vw, 164px);
  aspect-ratio: 1;
  border-radius: 50%;
  cursor: pointer;
  transform: translate(-50%, -50%);
}

/* 星尘环 ×2：内圈细虚线正转，外圈更淡反转，速度极慢 */
.core-star::after {
  content: "";
  position: absolute;
  inset: -16px;
  border: 1px dashed rgba(255, 226, 170, 0.17);
  border-radius: 50%;
  animation: spin 90s linear infinite;
}

.core-star::before {
  content: "";
  position: absolute;
  inset: -30px;
  border: 1px dotted rgba(255, 222, 168, 0.1);
  border-radius: 50%;
  animation: spin 140s linear infinite reverse;
}

/* 大柔光晕：星核向外的多级暖光衰减，让边缘自然融进宇宙 */
.core-halo {
  position: absolute;
  inset: -72%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 224, 172, 0.17) 0 22%, rgba(255, 210, 150, 0.07) 44%, rgba(255, 200, 140, 0.025) 62%, transparent 76%);
  transition: opacity 280ms ease, transform 280ms ease;
  opacity: 0.9;
}

.core-glow {
  position: absolute;
  inset: -48px;
  border-radius: inherit;
  background: conic-gradient(from 20deg, transparent, rgba(255, 218, 156, 0.15), transparent 42%, rgba(255, 206, 140, 0.08) 64%, transparent);
  filter: blur(14px);
  animation: spin 36s linear infinite;
  transition: opacity 260ms ease;
}

/* 最外层：极淡的蓝紫星云veil —— 原恒星尘 + 演化终局星云的概念 */
.core-nebula {
  position: absolute;
  inset: -60%;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, transparent 36%, rgba(96, 116, 206, 0.06) 52%, rgba(150, 96, 180, 0.045) 66%, transparent 80%);
}

/* 柔和呼吸的日冕（红巨星向外抛射的暖光层） */
.core-corona {
  position: absolute;
  inset: -22%;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(255, 214, 150, 0.2) 0 30%, rgba(255, 150, 80, 0.07) 52%, transparent 72%);
  animation: star-pulse 6s ease-in-out infinite;
}

/* 倾斜引力环：承载 4 个演化阶段节点 */
.core-ringtilt {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 172%;
  height: 60%;
  border: 1px solid rgba(255, 228, 180, 0.12);
  border-radius: 50%;
  transform: translate(-50%, -50%) rotate(-16deg);
  -webkit-mask-image: linear-gradient(120deg, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.15) 55%, rgba(0, 0, 0, 0.6));
  mask-image: linear-gradient(120deg, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.15) 55%, rgba(0, 0, 0, 0.6));
}

/* 4 个演化阶段节点（原恒星 / 主序星 / 红巨星 / 终局），克制的小标记点。
   当前阶段 = 主序星（个人主页核心），更亮并轻微脉动 */
.evo-node {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  mask-image: none;
}

.evo-node--protostar {
  left: 0;
  top: 50%;
  background: radial-gradient(circle, #d8a98a, #7a4a35);
  box-shadow: 0 0 5px rgba(200, 130, 95, 0.6);
}

.evo-node--main {
  left: 50%;
  top: 0;
  background: radial-gradient(circle, #fffdf2, #ffce72);
}

.evo-node--giant {
  left: 100%;
  top: 50%;
  background: radial-gradient(circle, #ffb38a, #c0492a);
  box-shadow: 0 0 5px rgba(220, 110, 70, 0.55);
}

.evo-node--final {
  left: 50%;
  top: 100%;
  background: radial-gradient(circle, #eaf2ff, #9bbce8);
  box-shadow: 0 0 5px rgba(180, 205, 255, 0.55);
}

.evo-node.is-current {
  width: 7px;
  height: 7px;
  box-shadow: 0 0 9px rgba(255, 214, 150, 0.85), 0 0 18px rgba(255, 200, 130, 0.4);
  animation: evo-pulse 3.4s ease-in-out infinite;
}

@keyframes evo-pulse {
  50% {
    box-shadow: 0 0 13px rgba(255, 224, 170, 0.95), 0 0 26px rgba(255, 205, 135, 0.5);
  }
}

/* 星核本体：等离子赤道图在圆形遮罩里横向滚动 = 缓慢自转 */
.core-body {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  overflow: hidden;
  box-shadow:
    0 0 30px 6px rgba(255, 212, 150, 0.28),
    0 0 92px 16px rgba(255, 192, 120, 0.12),
    0 0 200px rgba(255, 182, 112, 0.06),
    inset -10px -13px 28px rgba(120, 60, 18, 0.4);
  animation: star-pulse 6s ease-in-out infinite;
  transition: filter 280ms ease;
}

.core-plasma {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 200%;
  background-image: url("assets/planets/star-core-surface.webp?v=aibot-20260615");
  background-repeat: repeat-x;
  background-size: 50% 100%;
  animation: planet-spin 40s linear infinite;
}

/* 演化色带叠在等离子上（固定不转）：中心炽白主序核 → 中圈红巨星红橙带 → 边缘暗化 */
.core-evolve {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
  background:
    radial-gradient(circle at 42% 37%, rgba(255, 255, 246, 0.72) 0 13%, rgba(255, 248, 222, 0) 36%),
    radial-gradient(circle at 50% 50%, transparent 40%, rgba(214, 92, 42, 0.26) 62%, rgba(150, 44, 22, 0.16) 80%, transparent 93%),
    radial-gradient(circle at 50% 50%, transparent 66%, rgba(2, 3, 8, 0.32) 100%);
}

.core-hint {
  position: absolute;
  left: 50%;
  top: calc(100% + 26px);
  color: rgba(255, 244, 220, 0.85);
  font-size: 0.68rem;
  font-weight: 550;
  letter-spacing: 0.18em;
  white-space: nowrap;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.9);
  opacity: 0;
  transform: translateX(-50%) translateY(4px);
  transition: opacity 240ms ease, transform 240ms ease;
}

/* hover：星核内部流动增强（提亮 + 饱和），日冕扩张 */
.core-star:hover .core-body,
.core-star:focus-visible .core-body {
  filter: brightness(1.08) saturate(1.06);
}

.core-star:hover .core-corona,
.core-star:focus-visible .core-corona {
  transform: scale(1.08);
}

/* 周围星尘被吸引（光晕聚拢增亮） */
.core-star:hover .core-halo,
.core-star:focus-visible .core-halo {
  opacity: 1;
  transform: scale(1.07);
}

/* hover 时 4 个演化节点一起提亮 */
.core-star:hover .evo-node,
.core-star:focus-visible .evo-node {
  filter: brightness(1.3);
}

.core-star:hover .core-hint,
.core-star:focus-visible .core-hint {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.core-star:focus-visible {
  outline: 1px solid rgba(255, 235, 190, 0.55);
  outline-offset: 10px;
}

.planet-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* 行星定位容器：transform 由 rAF 循环更新（仅合成层操作，无回流） */
.planet-wrap {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  will-change: transform;
}

.planet {
  --planet-size: 64px;
  --node-color: #c6cdd6;
  position: absolute;
  left: 0;
  top: 0;
  width: var(--planet-size);
  height: var(--planet-size);
  border: 0;
  border-radius: 50%;
  padding: 0;
  background: transparent;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  cursor: pointer;
  transition: transform 220ms ease, opacity 220ms ease, filter 220ms ease;
}

/* 引力光晕：常态几乎不可见，hover 时柔和浮现（带主题点缀色） */
.planet::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: -1;
  width: 178%;
  height: 178%;
  border-radius: inherit;
  background: radial-gradient(circle, color-mix(in srgb, var(--node-color) 24%, transparent), transparent 68%);
  transform: translate(-50%, -50%);
  opacity: 0.3;
  transition: opacity 220ms ease;
}

/* ===== 行星本体 =====
   .planet-orb   轻微上下浮动（空间漂浮感）
   .planet-sphere 圆形遮罩，裁掉滚动表面的方形边
   .planet-surface 赤道图横向无缝滚动 = 自转（transform 合成，GPU 友好）
   .planet-shade  固定球面打光（高光 + 终结线 + 边缘暗化），把平面卷成球
   .planet-prop   凸出物件（玫瑰 / 酒店楼），固定不随自转
   .planet-atmo   主题色大气边缘光 */
.planet-orb {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  animation: planet-float var(--float-dur, 8s) ease-in-out infinite;
  filter: drop-shadow(0 8px 16px rgba(0, 2, 8, 0.5));
}

.planet-sphere {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  overflow: hidden;
}

.planet-surface {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 200%;
  background-repeat: repeat-x;
  background-size: 50% 100%;
  animation: planet-spin var(--spin-dur, 90s) linear infinite;
  transition: filter 280ms ease;
}

/* 反向自转 */
.planet.is-rev .planet-surface {
  animation-direction: reverse;
}

/* 横向平移一个赤道图宽度（= 200% 元素的 50%），首尾无缝循环 */
@keyframes planet-spin {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(-50%, 0, 0);
  }
}

@keyframes planet-float {
  50% {
    transform: translateY(-3%);
  }
}

.planet-shade {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
  background:
    radial-gradient(circle at 31% 26%, rgba(255, 250, 236, 0.42), rgba(255, 248, 232, 0) 34%),
    radial-gradient(circle at 50% 50%, transparent 44%, rgba(3, 5, 12, 0.5) 82%, rgba(1, 2, 7, 0.86) 100%),
    linear-gradient(124deg, transparent 38%, rgba(2, 4, 10, 0.42) 72%, rgba(1, 2, 6, 0.7) 98%);
  box-shadow:
    inset 3px 4px 8px -2px rgba(224, 234, 255, 0.4),
    inset -9px -11px 24px rgba(0, 2, 8, 0.6);
}

.planet-prop {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 112%;
  height: 112%;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  /* 物件锚在画布中心，上移让它从球顶长出（克制） */
  transform: translate(-50%, -50%) translateY(-30%);
  pointer-events: none;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.5));
}

.planet-atmo {
  position: absolute;
  inset: -3%;
  border-radius: 50%;
  pointer-events: none;
  box-shadow:
    inset 0 0 8px color-mix(in srgb, var(--node-color) 22%, transparent),
    0 0 10px color-mix(in srgb, var(--node-color) 12%, transparent);
}

/* hover：自转细节提亮（不粗暴变亮） */
.planet:hover .planet-surface,
.planet.is-hovered .planet-surface,
.planet.is-active .planet-surface {
  filter: brightness(1.08);
}

/* 行星标签：天文标注式——小号低透明白字 + 细指引线 + 微光点，
   按 --tr / --bl / --br 三种方位错开，不直接压在星球正下方 */
.planet-label {
  position: absolute;
  color: rgba(255, 255, 255, 0.52);
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  white-space: nowrap;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.9);
  pointer-events: none;
  transition: color 220ms ease;
}

.planet-label::before {
  content: "";
  position: absolute;
  top: 58%;
  width: 14px;
  height: 1px;
}

.planet-label::after {
  content: "";
  position: absolute;
  top: 58%;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transform: translateY(-50%);
}

.planet-label--tr {
  left: calc(100% + 22px);
  top: 2%;
}

.planet-label--tr::before {
  right: calc(100% + 4px);
  background: linear-gradient(270deg, rgba(255, 255, 255, 0.34), transparent);
}

.planet-label--tr::after {
  right: calc(100% + 17px);
}

.planet-label--bl {
  right: calc(100% + 22px);
  top: 74%;
}

.planet-label--bl::before {
  left: calc(100% + 4px);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.34), transparent);
}

.planet-label--bl::after {
  left: calc(100% + 17px);
}

.planet-label--br {
  left: calc(100% + 20px);
  top: 80%;
}

.planet-label--br::before {
  right: calc(100% + 4px);
  background: linear-gradient(270deg, rgba(255, 255, 255, 0.34), transparent);
}

.planet-label--br::after {
  right: calc(100% + 17px);
}

.planet:hover,
.planet.is-hovered,
.planet.is-active {
  opacity: 1;
}

.planet:hover::before,
.planet.is-hovered::before,
.planet.is-active::before {
  opacity: 0.95;
}

.planet:hover .planet-label,
.planet.is-hovered .planet-label,
.planet.is-active .planet-label {
  color: rgba(255, 255, 255, 0.95);
}

/* 放大用 transform，避免 width/height 触发布局回流 */
.planet.is-hovered,
.planet.is-active {
  transform: translate(-50%, -50%) scale(1.16);
}

.planet.is-dimmed {
  opacity: 0.34;
  filter: saturate(0.4) brightness(0.8);
}

.system-readout {
  width: min(390px, 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  background: rgba(8, 10, 13, 0.62);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.system-readout h2 {
  margin-top: 12px;
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3vw, 2.6rem);
  font-weight: 600;
  line-height: 1.14;
}

.system-readout p:not(.eyebrow) {
  margin-top: 14px;
  color: var(--muted);
  line-height: 1.8;
}

.readout-tags,
.panel-tags,
.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.readout-tags span,
.panel-tags span,
.project-tags span {
  border: 1px solid var(--line-faint);
  border-radius: 999px;
  padding: 6px 11px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.03em;
}

.project-index,
.contact-section,
.archive-main {
  position: relative;
  padding: 86px clamp(18px, 4vw, 54px);
  border-top: 1px solid var(--line-faint);
  background: linear-gradient(180deg, rgba(8, 10, 13, 0.85), var(--bg-deep));
}

.section-heading {
  max-width: 860px;
}

.section-heading h1,
.section-heading h2,
.contact-section h2 {
  margin-top: 14px;
  font-family: var(--serif);
  font-size: clamp(2.1rem, 4.6vw, 4rem);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: 0.01em;
}

.section-heading p:not(.eyebrow) {
  margin-top: 16px;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.85;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 36px;
}

.project-card {
  min-height: 250px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  background: rgba(255, 255, 255, 0.03);
  transition: transform 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
}

.project-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.26);
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.42), 0 0 22px rgba(255, 255, 255, 0.04);
}

.project-card .node-dot {
  display: block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: radial-gradient(circle at 36% 32%, #ffffff, var(--node-color, #9aa3ae) 80%);
  box-shadow: 0 0 12px color-mix(in srgb, var(--node-color, #9aa3ae) 45%, transparent);
}

.project-card .eyebrow {
  margin-top: 16px;
}

.project-card h3 {
  margin-top: 12px;
  font-size: 1.3rem;
  font-weight: 650;
  line-height: 1.2;
}

.project-card p:not(.eyebrow) {
  margin-top: 12px;
  color: var(--muted);
  line-height: 1.78;
}

.project-card button {
  margin-top: 18px;
  border: 0;
  cursor: pointer;
}

.contact-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.contact-section h2 {
  max-width: 920px;
  font-size: clamp(1.8rem, 3.8vw, 3.3rem);
}

.project-panel {
  position: fixed;
  right: clamp(14px, 3vw, 34px);
  top: 92px;
  z-index: 40;
  width: min(440px, calc(100vw - 28px));
  max-height: calc(100vh - 116px);
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-lg);
  padding: 26px;
  background: var(--glass-deep);
  box-shadow: var(--shadow), 0 0 60px rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(24px);
  transform: translateX(calc(100% + 54px));
  opacity: 0;
  transition: transform 280ms ease, opacity 280ms ease;
}

.project-panel.is-open {
  transform: translateX(0);
  opacity: 1;
}

.panel-close {
  float: right;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
  padding: 8px 14px;
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease;
}

.panel-close:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.08);
}

.project-panel h2 {
  clear: both;
  margin-top: 18px;
  font-family: var(--serif);
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  font-weight: 600;
  line-height: 1.16;
}

.panel-subtitle {
  margin-top: 12px;
  color: var(--muted);
  font-weight: 550;
  letter-spacing: 0.02em;
}

.panel-description {
  margin-top: 16px;
  color: var(--muted);
  line-height: 1.8;
}

.panel-block {
  margin-top: 20px;
}

.panel-block span {
  display: block;
  color: var(--faint);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.panel-block p,
.panel-block li {
  color: var(--muted);
  line-height: 1.75;
}

.panel-block p,
.panel-block ul {
  margin: 9px 0 0;
}

.panel-block ul {
  padding-left: 1.15rem;
}

/* 详情面板：案例结构新增件 */
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel-status {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 10px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
}

.panel-status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--node-color, #8fd4b4);
  box-shadow: 0 0 8px var(--node-color, #8fd4b4);
}

.panel-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.panel-metrics .metric {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
}

.panel-metrics .metric strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.1;
}

.panel-metrics .metric span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.76rem;
}

.panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.panel-live {
  flex-basis: 100%;
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.6;
  font-style: italic;
}

.archive-page {
  background: var(--bg-deep);
}

/* ===== 内置 AI 客服弹层（iframe 嵌入 Dify，页面内打开） ===== */
.assistant-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  align-items: center;
  justify-content: center;
  padding: clamp(12px, 4vw, 40px);
}

.assistant-modal.is-open {
  display: flex;
}

.assistant-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 4, 10, 0.72);
  backdrop-filter: blur(6px);
}

.assistant-dialog {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(960px, 100%);
  height: min(82vh, 760px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #0b0e14;
  box-shadow: var(--shadow), 0 0 80px rgba(255, 214, 150, 0.06);
  animation: assistant-in 240ms ease;
}

@keyframes assistant-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.99);
  }
}

.assistant-bar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px 12px 18px;
  border-bottom: 1px solid var(--line-faint);
  background: rgba(255, 255, 255, 0.02);
}

.assistant-title {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.assistant-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 34%, #fffdf4, #ffce72 70%);
  box-shadow: 0 0 10px rgba(255, 206, 130, 0.7);
}

.assistant-bar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.assistant-newtab {
  color: var(--muted);
  font-size: 0.82rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  transition: color 180ms ease, border-color 180ms ease;
}

.assistant-newtab:hover {
  color: var(--ink);
  border-color: var(--line-strong);
}

.assistant-close {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease;
}

.assistant-close:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.1);
}

.assistant-frame-wrap {
  flex: 1 1 auto;
  min-height: 0;
  background: #fff;
}

.assistant-frame-wrap iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

@media (max-width: 760px) {
  .assistant-modal {
    padding: 0;
  }

  .assistant-dialog {
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 0;
  }
}

/* ===== 关于页 ===== */
.about-main {
  min-height: 100vh;
  padding: 128px clamp(18px, 4vw, 54px) 0;
}

.about-hero {
  max-width: 760px;
  padding-bottom: 40px;
}

.about-hero h1 {
  margin-top: 14px;
  font-family: var(--serif);
  font-size: clamp(2.8rem, 7vw, 5.4rem);
  font-weight: 600;
  line-height: 1.02;
}

.about-role {
  margin-top: 18px;
  color: var(--ink);
  font-size: clamp(1.05rem, 2vw, 1.4rem);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.about-summary {
  margin-top: 16px;
  max-width: 620px;
  color: var(--muted);
  font-size: 1.04rem;
  line-height: 1.9;
}

.about-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.about-section {
  padding: 56px 0;
  border-top: 1px solid var(--line-faint);
}

.about-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 30px;
}

.about-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  background: rgba(255, 255, 255, 0.025);
  transition: transform 200ms ease, border-color 200ms ease;
}

.about-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.24);
}

.about-card h3 {
  margin-top: 10px;
  font-size: 1.3rem;
  font-weight: 650;
}

.about-card p:not(.eyebrow) {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.78;
}

.about-skills {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin-top: 30px;
}

.about-skill {
  border-left: 2px solid color-mix(in srgb, var(--cyan, #8fd4b4) 50%, transparent);
  padding: 4px 0 4px 16px;
}

.about-skill h4 {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 650;
}

.about-skill p {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.75;
  font-size: 0.95rem;
}

@media (max-width: 760px) {
  .about-cards {
    grid-template-columns: 1fr;
  }
}

.archive-main {
  min-height: 100vh;
  padding-top: 128px;
  border-top: 0;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes star-pulse {
  50% {
    transform: scale(1.025);
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

@media (max-width: 1180px) {
  .system-layout {
    grid-template-columns: 1fr;
  }

  .solar-map {
    order: -1;
    width: min(76vw, 640px);
  }

  .hero-copy,
  .system-readout {
    width: min(760px, 100%);
    margin: 0 auto;
  }

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

@media (max-width: 760px) {
  .site-header {
    position: sticky;
    flex-direction: column;
    align-items: flex-start;
    min-height: auto;
    padding: 14px 18px;
  }

  .site-nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .hero-system {
    min-height: auto;
    padding-top: 22px;
  }

  .project-dock {
    margin: 0 -6px;
  }

  .dock-item {
    width: 150px;
  }

  .solar-map {
    width: min(88vw, 430px);
    margin-top: 24px;
  }

  .planet-label {
    font-size: 0.58rem;
    letter-spacing: 0.1em;
  }

  .planet-label--tr,
  .planet-label--br {
    left: calc(100% + 12px);
  }

  .planet-label--bl {
    right: calc(100% + 12px);
  }

  /* 移动端降级：减小投影开销 */
  .planet-orb {
    filter: drop-shadow(0 5px 9px rgba(0, 2, 8, 0.45));
  }

  .core-star {
    width: 100px;
  }

  /* 移动端降级：去掉模糊和大阴影，省 GPU */
  .project-dock,
  .system-readout,
  .site-header,
  .project-panel {
    backdrop-filter: none;
  }

  .project-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 12px;
  }

  .project-card {
    min-width: 84vw;
    scroll-snap-align: start;
  }

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

  .project-panel {
    inset: auto 0 0;
    width: 100%;
    max-height: 78vh;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    transform: translateY(100%);
  }

  .project-panel.is-open {
    transform: translateY(0);
  }
}
