* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Orbitron", system-ui, -apple-system, PingFang SC, Microsoft YaHei, sans-serif;
}
:root {
  --cyan: #00e5ff;
  --bg-dark: #03050c;
  --glass-bg: rgba(10, 16, 32, 0.3);
  --text-light: #d0e2ff;
  --text-gray: #98aed0;
  --border-light: rgba(0, 229, 255, 0.2);
}
html { scroll-behavior: smooth; }
body {
  background: var(--bg-dark);
  color: #fff;
  overflow-x: hidden;
  line-height: 1.7;
}
/* 深空背景。层级：星空与地球为 0，扫描线为 1，正文为 2 */
#starCanvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
/* CRT扫描线 */
.crt-line {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,0.1) 0 1px, transparent 1px 4px);
}
/* 顶部导航：站名在左，栏目居中，窄屏收成菜单 */
.topnav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 5;
  height: 64px;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(3, 5, 12, 0.9), rgba(3, 5, 12, 0));
}
.topnav-bar {
  position: relative;
  max-width: 1140px;
  height: 64px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  pointer-events: auto;
}
.topnav-brand {
  position: relative;
  z-index: 2;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 1px;
  text-decoration: none;
  background: linear-gradient(90deg, var(--cyan), #fff);
  -webkit-background-clip: text;
  color: transparent;
}
.nav-toggle {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.nav-burger {
  display: none;
  width: 40px;
  height: 40px;
  margin-left: auto;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.nav-burger span,
.nav-burger span:before,
.nav-burger span:after {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--text-light);
  position: relative;
}
.nav-burger span:before,
.nav-burger span:after {
  content: "";
  position: absolute;
  left: 0;
}
.nav-burger span:before { top: -6px; }
.nav-burger span:after { top: 6px; }
.nav-toggle:checked + .nav-burger span { background: transparent; }
.nav-toggle:checked + .nav-burger span:before { top: 0; transform: rotate(45deg); }
.nav-toggle:checked + .nav-burger span:after { top: 0; transform: rotate(-45deg); }
.topnav-links {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 32px;
}
.topnav-links a {
  color: var(--text-gray);
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
}
.topnav-links a:hover { color: #fff; }
/* 页面容器 */
.wrap {
  position: relative;
  z-index: 2;
  max-width: 1140px;
  margin: 0 auto;
  padding: 96px 24px 50px;
}
section[id] { scroll-margin-top: 80px; }
/* 抬头居中。名字由 0/1 拼出；脚本未运行时仍显示流动光带 */
.header-box {
  width: min(720px, 100%);
  margin: clamp(18px, 4vw, 36px) auto clamp(44px, 8vw, 72px);
  text-align: center;
}
.name-title {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 0 0.08em;
  font-size: clamp(34px, 8vw, 64px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: clamp(1px, 0.5vw, 4px);
  overflow-wrap: anywhere;
  background-image: linear-gradient(100deg, #7af6ff 0%, #00e5ff 22%, #fff 46%, #b7e4ff 68%, #4aa8ff 84%, #7af6ff 100%);
  background-size: 200% 100%;
  background-position: 0% 50%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: name-shine 6s linear infinite;
}
.name-bits {
  display: none;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.name-title.is-bits {
  background-image: none;
  animation: none;
}
.name-title.is-bits .name-bits { display: block; }
.name-title.is-bits .name-fallback {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.name-title::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: 50%;
  top: 58%;
  width: min(130%, 420px);
  height: 160%;
  transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(0, 229, 255, 0.34), rgba(140, 190, 255, 0.2) 46%, transparent 72%);
  filter: blur(10px);
  pointer-events: none;
  animation: name-halo 3.2s ease-in-out infinite;
}
.name-title.is-bits::after {
  width: var(--name-ink, 280px);
  height: 78%;
}
@keyframes name-shine {
  to { background-position: 100% 50%; }
}
@keyframes name-halo {
  50% { opacity: 0.45; transform: translate(-50%, -50%) scale(1.08); }
}
.sub-desc {
  margin-top: clamp(8px, 1.6vw, 12px);
  font-size: clamp(13px, 2.2vw, 16px);
  line-height: 1.5;
  color: var(--text-gray);
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .name-title,
  .name-title::after {
    animation: none;
  }
  .to-top { transition: none; }
}
/* 区块通用标题 */
.section-title {
  font-size: 22px;
  margin-bottom: 36px;
  padding-left: 10px;
  border-left: 3px solid var(--cyan);
}
.section-title a {
  color: inherit;
  text-decoration: none;
}
.section-title a:hover {
  color: var(--cyan);
}
.year-num a,
.data-item h3 a,
.do-card h4 a,
.work-card h4 a,
.contact-card h4 a {
  color: inherit;
  text-decoration: none;
}
.year-num a:hover,
.data-item h3 a:hover,
.do-card h4 a:hover,
.work-card h4 a:hover,
.contact-card h4 a:hover {
  color: var(--cyan);
}
/* 关于我 时间线 */
.about-block {
  margin-bottom: 85px;
}
.timeline-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
}
.time-card {
  padding: 22px;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  transition: 0.3s ease;
}
.time-card:hover {
  border-color: var(--cyan);
  box-shadow: 0 0 22px rgba(0, 229, 255, 0.16);
  transform: translateY(-4px);
}
.year-num {
  font-size: 26px;
  color: var(--cyan);
  font-weight: bold;
  margin-bottom: 6px;
}
.time-txt {
  color: var(--text-gray);
  font-size: 14px;
}
.data-row {
  display: flex;
  gap: 50px;
  margin-top: 32px;
}
.data-item h3 {
  font-size: 30px;
  color: #fff;
}
.data-item p {
  color: var(--text-gray);
  font-size: 14px;
}
/* 我在做什么 */
.doing-block {
  margin-bottom: 85px;
}
.doing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 22px;
}
.do-card {
  padding: 24px;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  transition: 0.3s ease;
}
.do-card:hover {
  border-color: var(--cyan);
  box-shadow: 0 0 24px rgba(0, 229, 255, 0.14);
  transform: translateY(-4px);
}
.do-card h4 {
  font-size: 19px;
  margin-bottom: 10px;
}
.do-card p {
  color: var(--text-gray);
  font-size: 14px;
}
/* 作品工具 */
.work-block {
  margin-bottom: 85px;
}
.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
}
.work-card {
  padding: 24px;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  transition: 0.3s ease;
}
.work-card:hover {
  border-color: var(--cyan);
  box-shadow: 0 0 22px rgba(0, 229, 255, 0.15);
  transform: translateY(-5px);
}
.work-card h4 {
  font-size: 19px;
  color: var(--cyan);
  margin-bottom: 10px;
}
.work-card p {
  color: var(--text-gray);
  font-size: 14px;
}
/* 联系方式 */
.contact-block {
  margin-bottom: 60px;
}
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}
.contact-card {
  padding: 24px;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  text-align: center;
  transition: 0.3s ease;
}
.contact-card:hover {
  border-color: var(--cyan);
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.13);
  transform: translateY(-3px);
}
.contact-card h4 {
  color: #fff;
  margin-bottom: 8px;
}
.contact-card p {
  color: var(--text-gray);
  font-size: 14px;
}
/* 底部：签名、版权、备案各占一行，并居中 */
footer {
  margin-top: 28px;
  padding-top: 26px;
  text-align: center;
  border-top: 1px solid transparent;
  border-image: linear-gradient(90deg, transparent, rgba(0, 229, 255, 0.55), rgba(231, 247, 255, 0.8), transparent) 1;
}
.foot-sign {
  color: var(--text-gray);
  font-size: 14px;
}
.foot-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  color: rgba(152, 174, 208, 0.78);
  font-size: 12px;
  letter-spacing: 0.2px;
  text-align: center;
}
footer .beian {
  color: inherit;
  text-decoration: none;
}
footer .beian:hover {
  color: var(--cyan);
}
/* 点阵地球：画布大于视口并偏向右下，只露出左上弧 */
.earth-canvas {
  position: fixed;
  z-index: 0;
  width: min(860px, 92vw);
  height: min(860px, 92vw);
  right: calc(min(860px, 92vw) * -0.4);
  bottom: calc(min(860px, 92vw) * -0.44);
  pointer-events: none;
  opacity: 0.82;
}
/* 移动端适配 */
@media (max-width: 640px) {
  .data-row {
    flex-direction: column;
    gap: 16px;
  }
  .wrap {
    padding: 84px 18px 36px;
  }
  .nav-burger { display: flex; }
  .topnav-links {
    display: none;
    left: 0;
    right: 0;
    top: 64px;
    transform: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 6px 18px 14px;
    background: rgba(5, 8, 18, 0.94);
    border-bottom: 1px solid var(--border-light);
    backdrop-filter: blur(12px);
  }
  .nav-toggle:checked ~ .topnav-links { display: flex; }
  .topnav-links a {
    padding: 12px 2px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }
}
/* 触屏返回顶部：平时藏起，滚过一屏后再出现。桌面不显示。
   微信的放大缩小在右下角，所以按钮放在左下角 */
.to-top { display: none; }
@media (max-width: 640px), (hover: none) and (pointer: coarse) {
  .to-top {
    display: grid;
    place-items: center;
    position: fixed;
    z-index: 6;
    left: calc(16px + env(safe-area-inset-left));
    bottom: calc(20px + env(safe-area-inset-bottom));
    width: 44px;
    height: 44px;
    border: 1px solid rgba(0, 229, 255, 0.5);
    border-radius: 50%;
    background: rgba(5, 8, 18, 0.86);
    box-shadow: 0 0 16px rgba(0, 229, 255, 0.2);
    text-decoration: none;
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
    transition: opacity 0.25s ease, transform 0.25s ease;
  }
  .to-top.on {
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }
  .to-top span {
    width: 10px;
    height: 10px;
    border-top: 2px solid var(--cyan);
    border-left: 2px solid var(--cyan);
    transform: translateY(2px) rotate(45deg);
  }
}
/* 每日资讯列表和弹窗 */
.daily-back {
  margin-left: auto;
  color: var(--text-gray);
  font-size: 14px;
  text-decoration: none;
}
.daily-back:hover { color: #fff; }
.daily-head { margin: clamp(8px, 3vw, 28px) 0 28px; text-align: center; }
.daily-kicker {
  margin: 0 0 8px;
  color: var(--cyan);
  font-size: 12px;
  letter-spacing: 0.28em;
}
.daily-head h1 {
  margin: 0;
  font-size: clamp(28px, 6vw, 44px);
  font-weight: 700;
  letter-spacing: 1px;
}
.daily-empty {
  margin: 48px auto;
  max-width: 420px;
  padding: 28px 20px;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  background: var(--glass-bg);
  color: var(--text-gray);
  text-align: center;
}
.daily-list { list-style: none; max-width: 760px; margin: 0 auto; }
.daily-list li {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 12px;
  align-items: center;
  margin: 0 0 12px;
  padding: 16px 18px;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  transition: 0.3s ease;
}
.daily-list li:hover {
  border-color: var(--cyan);
  box-shadow: 0 0 22px rgba(0, 229, 255, 0.14);
}
.daily-no {
  color: var(--cyan);
  font-size: 18px;
  font-weight: 700;
}
.daily-open {
  padding: 0;
  border: 0;
  background: none;
  color: #fff;
  font: inherit;
  font-size: 16px;
  line-height: 1.5;
  text-align: left;
  cursor: pointer;
  word-break: break-word;
}
.daily-open:hover { color: var(--cyan); }
.daily-list time {
  color: var(--text-gray);
  font-size: 13px;
  text-align: right;
  white-space: nowrap;
}
.daily-mask {
  position: fixed;
  z-index: 8;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: rgba(3, 5, 12, 0.72);
  backdrop-filter: blur(6px);
}
.daily-mask[hidden] { display: none; }
.daily-dialog {
  position: relative;
  width: min(640px, 100%);
  max-height: min(78vh, 720px);
  overflow: auto;
  padding: 28px 28px 24px;
  border: 1px solid transparent;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(10, 16, 32, 0.96), rgba(6, 10, 22, 0.96)) padding-box,
    linear-gradient(120deg, rgba(0, 229, 255, 0.7), rgba(231, 247, 255, 0.35), rgba(0, 229, 255, 0.15)) border-box;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.45);
}
.daily-dialog h2 {
  margin: 0 0 14px;
  font-size: 22px;
  line-height: 1.45;
  word-break: break-word;
}
.daily-body {
  color: var(--text-light);
  font-size: 15px;
  line-height: 1.8;
  white-space: pre-wrap;
  word-break: break-word;
}
.daily-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border-light);
  border-radius: 50%;
  background: rgba(3, 5, 12, 0.55);
  cursor: pointer;
}
.daily-close:before,
.daily-close:after {
  content: "";
  position: absolute;
  left: 10px;
  top: 16px;
  width: 14px;
  height: 2px;
  background: var(--text-light);
}
.daily-close:before { transform: rotate(45deg); }
.daily-close:after { transform: rotate(-45deg); }
.daily-close:hover { border-color: var(--cyan); }
body.daily-open { overflow: hidden; }
@media (max-width: 640px) {
  .daily-list li { grid-template-columns: 32px 1fr; }
  .daily-list time { grid-column: 2; }
  .daily-dialog { padding: 48px 18px 20px; }
}