/* ============================================================
   Components — 组件层：按钮 / 导航 / Hero / 项目卡 / Bento / 页脚
   ============================================================ */

/* ---- 按钮 ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 700;
  transition: all var(--duration-base) var(--ease-out);
}

.btn-primary {
  color: var(--accent);
  border: 1px solid var(--accent);
  background: transparent;
}

.btn-primary:hover {
  background: var(--accent-dim);
  box-shadow: var(--shadow-glow);
}

.btn-secondary {
  color: var(--text-primary);
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
}

.btn-secondary:hover {
  border-color: var(--accent);
}

/* ---- 技术标签 ---- */
.chip {
  display: inline-block;
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  transition: all var(--duration-fast) var(--ease-out);
}

.chip:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ---- 页面切换动画：紫色长条分块横扫 ---- */
.page-transition {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none; /* 无 JS 时不阻塞页面，由 html.js 启用 */
  flex-direction: column;
  background: var(--bg-base);
  pointer-events: auto;
}

html.js .page-transition {
  display: flex;
}

.pt-strip {
  flex: 1;
  overflow: hidden;
  position: relative;
}

.pt-panel {
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform-origin: left center;
  transform: scaleX(1);
  transition: transform 400ms var(--ease-out);
}

/* 打开页面：最下方长块先动，紫色从右向左退去（--d-open 由 JS 按倒序写入） */
.page-transition.is-open .pt-panel {
  transform: scaleX(0);
  transition-delay: var(--d-open, 0ms);
}

/* 打开尾声：整体渐隐，页面渐变出现（--d-fade 由 JS 写入，值为长块动画总时长） */
.page-transition.is-done {
  opacity: 0;
  pointer-events: none;
  transition: opacity 300ms ease;
  transition-delay: var(--d-fade, 0ms);
}

/* 关闭页面：最上方长块先动，紫色从左向右填满（--d-close 由 JS 按顺序写入） */
.page-transition.is-closing .pt-panel {
  transform: scaleX(1);
  transition-delay: var(--d-close, 0ms);
}

/* ---- 导航（嵌入文档流，非固定） ---- */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: var(--space-4);
  padding: var(--space-3) var(--space-6);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
}

.site-header .logo {
  font-weight: 700;
  color: var(--accent);
}

.header-right {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

.site-nav {
  display: flex;
  gap: var(--space-8);
  list-style: none;
}

.site-nav a {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  transition: color var(--duration-fast) var(--ease-out);
}

.site-nav a:hover {
  color: var(--text-primary);
}

@media (max-width: 640px) {
  .site-nav { display: none; }
}

/* 导航当前页高亮：紫色文字 + 下划线 */
.site-nav a {
  position: relative;
  padding-bottom: var(--space-1);
}

.site-nav a.active {
  color: var(--accent);
}

.site-nav a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(-1 * var(--space-1));
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
}

/* ---- 纯图标按钮（紫色调） ---- */
.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3);
  color: var(--accent);
  border: 1px solid rgba(203, 172, 249, 0.35);
  border-radius: var(--radius-full);
  transition: all var(--duration-fast) var(--ease-out);
}

.btn-icon:hover {
  background: var(--accent-dim);
  box-shadow: var(--shadow-glow);
}

/* ---- 语言切换 ---- */
.lang-switch {
  position: relative;
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text-primary);
  background: var(--bg-glass);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-full);
  transition: border-color var(--duration-fast) var(--ease-out);
}

.lang-btn:hover,
.lang-btn[aria-expanded="true"] {
  border-color: var(--accent);
}

.lang-btn .chevron {
  transition: transform var(--duration-fast) var(--ease-out);
}

.lang-btn[aria-expanded="true"] .chevron {
  transform: rotate(180deg);
}

.lang-menu {
  position: absolute;
  top: calc(100% + var(--space-2));
  right: 0;
  min-width: 140px;
  padding: var(--space-2);
  margin: 0;
  list-style: none;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  z-index: 60;
}

.lang-menu[hidden] {
  display: none;
}

.lang-menu li {
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}

.lang-menu li:hover {
  color: var(--text-primary);
  background: var(--bg-glass);
}

.lang-menu li[aria-selected="true"] {
  color: var(--accent);
}

/* ---- Hero（左文右图） ---- */
.hero {
  min-height: calc(100vh - 6rem);
  display: flex;
  align-items: center;
}

.hero-inner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-12);
}

.hero-text {
  max-width: 38rem;
}

.hero h1 {
  font-size: clamp(var(--text-4xl), 6vw, var(--text-7xl));
  margin: var(--space-6) 0 var(--space-4);
}

/* 名字悬停幕布效果：
   悬停——紫色背景从左向右铺满，文字渐变为深色；
   离开——背景从右向左收回（深色回归），文字渐变回紫色 */
.hero h1 .accent {
  display: inline-block;
  padding: 0 var(--space-2);
  color: var(--accent);
  background-image: linear-gradient(var(--accent), var(--accent));
  background-repeat: no-repeat;
  background-position: left center;
  background-size: 0% 100%;
  border-radius: var(--radius-sm);
  transition:
    background-size var(--duration-slow) var(--ease-out),
    color var(--duration-slow) var(--ease-out);
}

.hero h1 .accent:hover {
  background-size: 100% 100%;
  color: var(--bg-base);
}

.hero .tagline {
  color: var(--text-secondary);
  font-size: var(--text-base);
  margin-bottom: var(--space-8);
}

.hero .actions {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
}

/* 圆形头像：紫色描边 + 木星环 */
@property --orbit-angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

@keyframes orbit-spin {
  to { --orbit-angle: 360deg; }
}

.avatar-wrap {
  position: relative;
  flex-shrink: 0;
  --avatar-size: clamp(260px, 24vw, 420px);
}

/* 木星环本体：倾斜平面上的紫色软环（rotateX 压扁成椭圆 + rotateZ 下倾 20°） */
.jupiter-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: calc(var(--avatar-size) * 1.4);
  aspect-ratio: 1;
  border-radius: 50%;
  transform: translate(-50%, -50%) rotateX(70deg) rotateZ(-20deg);
  background: radial-gradient(
    farthest-side,
    transparent 78%,
    rgba(203, 172, 249, 0.08) 82%,
    rgba(203, 172, 249, 0.35) 87%,
    rgba(239, 226, 255, 0.5) 90%,
    rgba(203, 172, 249, 0.35) 93%,
    rgba(203, 172, 249, 0.08) 97%,
    transparent 99%
  );
  pointer-events: none;
}

/* 后半环：沉在头像后面 */
.ring-back {
  z-index: 0;
  clip-path: inset(0 0 50% 0);
}

/* 前半环：盖在头像下端 */
.ring-front {
  z-index: 2;
  clip-path: inset(50% 0 0 0);
}

/* 环上光点：在倾斜平面内公转，反向旋转保持圆点不被压扁 */
.ring-dot {
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--dot-size, 5px);
  height: var(--dot-size, 5px);
  margin: calc(var(--dot-size, 5px) / -2) 0 0 calc(var(--dot-size, 5px) / -2);
  border-radius: 50%;
  background: var(--dot-color, var(--accent));
  box-shadow: 0 0 6px var(--dot-color, var(--accent)),
    0 0 12px var(--dot-color, var(--accent));
  transform: rotate(calc(var(--orbit-angle) + var(--phase, 0deg)))
    translateX(var(--r))
    rotate(calc(-1 * (var(--orbit-angle) + var(--phase, 0deg))))
    rotateZ(20deg)
    rotateX(-70deg);
  animation: orbit-spin var(--dur, 8s) linear infinite;
}

.avatar {
  position: relative;
  z-index: 1;
  width: var(--avatar-size);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 2px solid var(--accent);
  box-shadow: var(--shadow-glow);
  background:
    radial-gradient(circle at 30% 20%, var(--accent-dim), transparent 60%),
    var(--bg-elevated);
  display: grid;
  place-items: center;
  color: var(--text-muted);
  font-size: var(--text-sm);
  letter-spacing: 0.2em;
  overflow: hidden;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 768px) {
  .hero-inner {
    flex-direction: column;
    text-align: center;
    gap: var(--space-8);
  }

  .hero .actions {
    justify-content: center;
  }
}

/* ---- 教育经历 ---- */
/* 网格等高行：统一每个栏目卡片的高度 */
.education-list {
  display: grid;
  gap: var(--space-4);
  grid-auto-rows: 1fr;
}

.education-item {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: var(--space-6);
  padding: var(--space-8);
  background-color: var(--bg-glass);
  /* 悬停幕布：半透明暗绿光束从左向右铺满（600ms），透出底色保持文字可读 */
  background-image: linear-gradient(var(--accent-green-beam), var(--accent-green-beam));
  background-repeat: no-repeat;
  background-position: left center;
  background-size: 0% 100%;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  transition:
    background-size 600ms var(--ease-out),
    border-color var(--duration-base) var(--ease-out);
}

.education-item:hover {
  background-size: 100% 100%;
  border-color: var(--accent-green-deep);
}

.education-item h3 {
  font-size: var(--text-lg);
  letter-spacing: 0.025em;
  margin-bottom: var(--space-2);
}

.education-item .school {
  color: var(--text-secondary);
  font-size: var(--text-base);
}

/* 固定右栏宽度，统一各卡片左右分栏比例；成绩/状态底对齐 */
.education-item .meta {
  display: flex;
  flex-direction: column;
  text-align: right;
  flex: 0 0 15rem;
}

.education-item .meta .score {
  margin-top: auto;
}

.education-item .date {
  display: block;
  color: var(--text-muted);
  font-size: var(--text-base);
  white-space: nowrap;
  margin-bottom: var(--space-2);
}

.education-item .score {
  font-size: clamp(var(--text-xl), 3vw, var(--text-5xl));
  font-weight: 700;
  color: var(--accent-green);
  transition: color 600ms var(--ease-out);
}

/* 长文本成绩（如奖学金名称）使用较小字号 */
.education-item .score-text {
  font-size: clamp(var(--text-sm), 1.2vw, var(--text-lg));
  line-height: 1.4;
}

/* 悬停时右侧绿色文字反转为白色 */
.education-item:hover .score {
  color: var(--text-primary);
}

@media (max-width: 640px) {
  .education-item {
    flex-direction: column;
  }

  .education-item .meta {
    flex: 0 0 auto;
    width: 100%;
    text-align: left;
  }
}

/* ---- 项目卡 ---- */
.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-8);
  max-width: 64rem;
  margin-inline: auto;
  /* 为卡片悬停的水平旋转提供 3D 透视 */
  perspective: 1200px;
}

/* 奇数个项目时，最后一卡居中且与上方卡片同宽 */
.project-card:last-child:nth-child(odd) {
  grid-column: 1 / -1;
  justify-self: center;
  width: calc(50% - var(--space-8) / 2);
}

@media (max-width: 768px) {
  .project-grid {
    grid-template-columns: 1fr;
  }

  .project-card:last-child:nth-child(odd) {
    width: 100%;
  }
}

.project-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: transform 600ms var(--ease-out),
    border-color var(--duration-base) var(--ease-out),
    box-shadow var(--duration-base) var(--ease-out);
}

.project-card:hover {
  transform: translateY(-6px) rotateY(20deg);
  border-color: var(--accent);
  box-shadow: var(--shadow-glow);
}

.project-cover {
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  font-size: var(--text-4xl);
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
}

.project-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 占位封面（无图时）：每张卡一个渐变 */
.cover-1 { background: linear-gradient(135deg, #4c1d95, #cbacf9); }
.cover-2 { background: linear-gradient(135deg, #065f46, #00ff99); }
.cover-3 { background: linear-gradient(135deg, #1e3a8a, #60a5fa); }

.project-body {
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  flex: 1;
}

.project-body h3 {
  font-size: clamp(var(--text-base), 1.5vw, var(--text-2xl));
}

.project-body p {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  flex: 1;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.project-link {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--accent);
}

/* ---- Bento 网格：4 行 × 5 列定制布局 ---- */
.bento {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: repeat(4, minmax(9rem, auto));
  grid-template-areas:
    "intro intro intro quote quote"
    "intro intro intro paper paper"
    "stack stack art   art   art"
    "mail  mail  art   art   art";
  gap: var(--space-4);
}

.bento-card {
  position: relative;
  background-color: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  overflow: hidden;
  transition: border-color var(--duration-base) var(--ease-out);
}

.bento-card:hover {
  border-color: var(--border-strong);
}

/* 背景图卡片：内联 style 写 --bento-bg: url('xxx.jpg') 即可启用背景图 */
.bento-bg {
  background-image:
    linear-gradient(rgba(15, 14, 26, 0.35), rgba(15, 14, 26, 0.35)),
    var(--bento-bg, none);
  background-size: cover;
  background-position: center;
}

/* 大卡比例跟照片一致（3:2），避免 cover 裁掉屏幕；底部只压一行字 */
.bento-intro.bento-bg {
  background-image:
    linear-gradient(to top, rgba(15, 14, 26, 0.72), rgba(15, 14, 26, 0.12) 32%),
    var(--bento-bg, none);
  background-position: center;
}

/* 卡片内的一句话 */
.bento-caption {
  position: absolute;
  z-index: 1; /* 压在装饰层（.bento-deco, z-index: 0）之上 */
  margin: 0;
  font-size: var(--text-lg);
  font-weight: 700;
  line-height: 1.6;
  color: var(--text-primary);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
}

/* 左下角（简介大卡） */
.bento-caption-bl {
  left: var(--space-6);
  bottom: var(--space-6);
}

/* 靠左垂直居中（窄条卡） */
.bento-caption-left {
  left: var(--space-6);
  top: 50%;
  transform: translateY(-50%);
}

/* 邮箱卡：问句在上，鲸鱼娘倚在复制按钮上沿 */
.bento-mail {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.bento-mail .mail-title {
  margin: 0;
  font-size: var(--text-lg);
  font-weight: 700;
  text-align: center;
}

.mail-lean {
  --lean-h: 11rem;
  position: relative;
  width: min(100%, 18rem);
  height: var(--lean-h);
  margin-top: auto;
}

.mail-whale {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 100%;
  width: auto;
  z-index: 1;
  pointer-events: none;
  user-select: none;
}

.bento-mail .btn {
  position: absolute;
  /* 左缘伸进手掌，文字再往右，避开盖过来的头发 */
  left: calc(var(--lean-h) * 0.4);
  top: 48%;
  z-index: 0;
  margin: 0;
  padding-left: 3.25rem;
}

.bento-intro { grid-area: intro; aspect-ratio: 3 / 2; }
.bento-quote { grid-area: quote; }
.bento-paper { grid-area: paper; }
.bento-stack { grid-area: stack; }
.bento-mail  { grid-area: mail; }
.bento-art   { grid-area: art; }

/* ---- Bento 装饰层：极淡、靠右/角落、纯 CSS，不随语言切换（无 data-i18n） ---- */
.bento-deco {
  position: absolute;
  z-index: 0;
  pointer-events: none;
  user-select: none;
}

/* 语言卡：满幅散落问候，大字稍显、小字更淡 */
.bento-greetings {
  inset: 0;
}

.greet-orb {
  position: absolute;
  width: 14rem;
  height: 14rem;
  border-radius: 50%;
  filter: blur(48px);
}

.greet-orb-a {
  right: -4rem;
  top: -4rem;
  background: color-mix(in srgb, var(--text-primary) 4%, transparent);
}

.greet-orb-b {
  bottom: -5rem;
  left: 25%;
  background: color-mix(in srgb, var(--accent-green) 5%, transparent);
}

.bento-greetings .greet {
  position: absolute;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
}

.greet-xl {
  color: rgb(255 255 255 / 14%);
  font-size: var(--text-4xl);
}

.greet-lg {
  color: rgb(255 255 255 / 5%);
  font-size: var(--text-2xl);
}

.greet-md {
  color: rgb(255 255 255 / 5%);
  font-size: var(--text-xl);
}

.greet-sm {
  color: rgb(255 255 255 / 5%);
  font-size: var(--text-lg);
}

.greet-xs {
  color: rgb(255 255 255 / 5%);
  font-size: var(--text-base);
}

.greet-1 { right: 24%; bottom: 10%; }
.greet-2 { right: 6%; top: 14%; }
.greet-3 { left: 6%; bottom: 15%; }
.greet-4 { right: 9%; bottom: 32%; }
.greet-5 { left: 43%; top: 8%; }
.greet-6 { left: 9%; top: 42%; }
.greet-7 { left: 31%; bottom: 7%; }
.greet-8 { right: 39%; top: 42%; }
.greet-9 { right: 4%; top: 54%; }
.greet-10 { right: 20%; top: 6%; }
.greet-11 { left: 55%; bottom: 27%; }
.greet-12 { right: 47%; bottom: 15%; }

/* 技术栈卡：照参考站。空药丸把右列顶高，虚线向下、向右 */
.bento-paper {
  --tech-flow: #38bdf8;
  --tech-dash: 5px;
  --tech-period: 14px;
  --tech-line: 1px;
  --tech-gap-y: 2rem;
  --tech-gap-x: 1.25rem;
  --tech-pad-y: 1rem;
  --tech-pad-x: 0.75rem;
  --tech-pill-h: 3.25rem;
}

.tech-face {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
}

.tech-kicker {
  margin: 0;
  max-width: 8rem;
  font-size: var(--text-sm);
  font-weight: 200;
  line-height: 1.4;
  color: #c1c2d3;
}

.tech-title {
  margin: 0;
  max-width: 14rem;
  font-size: var(--text-2xl);
  font-weight: 700;
  line-height: 1.15;
  color: var(--text-primary);
}

.tech-board {
  position: absolute;
  z-index: 0;
  top: calc(-1 * (var(--tech-pad-y) * 2 + var(--tech-gap-y)));
  right: calc(-1 * var(--space-4));
  display: flex;
  align-items: flex-start;
  gap: var(--tech-gap-x);
  pointer-events: none;
}

.tech-col {
  display: flex;
  flex-direction: column;
  gap: var(--tech-gap-y);
}

.tech-pill {
  position: relative;
  display: block;
  min-width: 6.5rem;
  padding: var(--tech-pad-y) var(--tech-pad-x);
  font-size: var(--text-base);
  line-height: 1.25;
  color: var(--text-secondary);
  text-align: center;
  white-space: nowrap;
  background: #3a3a44;
  border-radius: var(--radius-sm);
}

.tech-pill-slot {
  min-height: var(--tech-pill-h);
}

.tech-pill-short {
  min-height: 0;
  padding-block: var(--tech-pad-y);
  font-size: 0;
  line-height: 0;
}

.tech-flow {
  position: absolute;
  pointer-events: none;
  background-repeat: repeat;
  filter:
    drop-shadow(0 0 3px rgb(56 189 248 / 90%))
    drop-shadow(0 0 6px rgb(56 189 248 / 40%));
}

.tech-flow-y {
  left: 50%;
  top: 100%;
  width: var(--tech-line);
  height: var(--tech-gap-y);
  transform: translateX(-50%);
  background-image: repeating-linear-gradient(
    to bottom,
    var(--tech-flow) 0 var(--tech-dash),
    transparent var(--tech-dash) var(--tech-period)
  );
  animation: tech-flow-y 0.9s linear infinite;
}

.tech-flow-x {
  left: 100%;
  top: 50%;
  width: var(--tech-gap-x);
  height: var(--tech-line);
  transform: translateY(-50%);
  background-image: repeating-linear-gradient(
    to right,
    var(--tech-flow) 0 var(--tech-dash),
    transparent var(--tech-dash) var(--tech-period)
  );
  animation: tech-flow-x 0.9s linear infinite;
}

@keyframes tech-flow-y {
  to { background-position: 0 var(--tech-period); }
}

@keyframes tech-flow-x {
  to { background-position: var(--tech-period) 0; }
}

/* Agent 卡：右侧大号终端符号 */
.bento-terminal {
  right: var(--space-6);
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  opacity: 0.14;
  font-size: var(--text-5xl);
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

/* 右下大卡：文案留在左侧，对话贴在右下角 */
.bento-art {
  --art-chat-width: 20rem;
  --art-user-width: 14rem;
  --art-grid-size: var(--space-12);
  --art-grid-reach: 72%;
}

.art-face {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100%;
  max-width: calc(100% - var(--art-chat-width) - var(--space-4));
}

.art-kicker {
  margin: 0;
  font-size: var(--text-base);
  font-weight: 200;
  line-height: 1.4;
  color: #c1c2d3;
}

.art-title {
  margin: 0;
  font-size: var(--text-4xl);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
}

/* 在逗号处换行，避免「探索未来」被拆开 */
.art-title span {
  display: block;
}

.art-chat {
  position: absolute;
  right: var(--space-4);
  bottom: var(--space-4);
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  width: var(--art-chat-width);
}

.art-bubble {
  width: fit-content;
  max-width: 100%;
  margin: 0;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  line-height: 1.5;
}

.art-who {
  display: block;
  margin-bottom: var(--space-1);
  font-size: var(--text-xs);
  font-weight: 200;
  line-height: 1.2;
  color: var(--text-muted);
}

/* 我的话靠右，圆角收在右下，像发出去的气泡 */
.art-bubble-user {
  align-self: flex-end;
  max-width: var(--art-user-width);
  border-bottom-right-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--text-primary) 8%, transparent);
}

/* 思考贴在回复上方，和回答同一侧 */
.art-bubble-think {
  align-self: flex-start;
  padding: 0 var(--space-2);
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* 回答靠左，圆角收在左下，和上面的问题错开 */
.art-bubble-reply {
  align-self: flex-start;
  border-bottom-left-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--accent) 16%, transparent);
}

.bento-grid {
  right: 0;
  bottom: calc(-1 * var(--space-4));
  width: 68%;
  height: var(--art-grid-reach);
  background-image:
    linear-gradient(
      color-mix(in srgb, var(--text-secondary) 36%, transparent) 1px,
      transparent 1px
    ),
    linear-gradient(
      90deg,
      color-mix(in srgb, var(--text-secondary) 36%, transparent) 1px,
      transparent 1px
    );
  background-size: var(--art-grid-size) var(--art-grid-size);
  mask-image: linear-gradient(to top left, #000 0%, transparent 58%);
  -webkit-mask-image: linear-gradient(to top left, #000 0%, transparent 58%);
}

/* 前景文字限宽，避免和右侧装饰叠在一起 */
.bento-quote .bento-caption { max-width: 68%; }

@media (max-width: 768px) {
  .bento {
    display: flex;
    flex-direction: column;
  }

  .bento-paper {
    --tech-gap-y: var(--space-4);
    --tech-gap-x: var(--space-3);
    --tech-pad-y: var(--space-2);
    --tech-pill-h: 2.25rem;
    min-height: 18rem;
  }

  .tech-face {
    justify-content: flex-start;
  }

  .tech-title {
    font-size: var(--text-lg);
  }

  .tech-board {
    top: 4.5rem;
    right: 0;
  }

  .tech-pill {
    min-width: 5.5rem;
    font-size: var(--text-xs);
  }

  .bento-art {
    min-height: 16rem;
  }

  .art-face {
    max-width: none;
    min-height: 0;
  }

  .art-title {
    font-size: var(--text-2xl);
  }

  .art-chat {
    position: static;
    width: min(100%, 16rem);
    margin-top: var(--space-6);
    margin-left: auto;
  }
}


/* ---- 旅途时间线（仿参考站：粘性年份 + 滚动切换，每年占一屏） ---- */
.journey-intro {
  text-align: center;
  color: var(--text-secondary);
  max-width: 40rem;
  margin: calc(-1 * var(--space-8)) auto var(--space-16);
}

.timeline {
  position: relative;
  max-width: 56rem;
  margin-inline: auto;
}

/* 左侧轨道基线 + 滚动进度渐变填充 */
.timeline::before {
  content: "";
  position: absolute;
  left: calc(1.25rem - 1px);
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border-subtle);
}

.timeline-rail-fill {
  position: absolute;
  left: calc(1.25rem - 1px);
  top: 0;
  width: 2px;
  height: 0;
  background: linear-gradient(to bottom, var(--accent), var(--accent-green));
}

/* 每个年份条目占满一屏 */
.timeline-item {
  display: flex;
  gap: var(--space-8);
  min-height: 100vh;
  padding-top: 20vh;
}

/* 粘性年份：滚动经过该年时钉在左侧，下一个年份到来时被推走 */
.timeline-year-wrap {
  position: sticky;
  top: 20vh;
  align-self: flex-start;
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-shrink: 0;
}

.timeline-dot {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--bg-base);
  border: 1px solid var(--border-strong);
  display: grid;
  place-items: center;
}

.timeline-dot::after {
  content: "";
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  background: var(--accent);
}

.timeline-year {
  font-size: var(--text-5xl);
  font-weight: 700;
  color: var(--text-muted);
}

/* 移动端内联年份（桌面端隐藏） */
.timeline-year-mobile {
  display: none;
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: var(--space-4);
}

.timeline-content {
  flex: 1;
}

.timeline-content p {
  color: var(--text-secondary);
  margin-bottom: var(--space-6);
}

.journey-checks {
  margin: calc(-1 * var(--space-3)) 0 var(--space-6);
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.journey-checks li {
  color: var(--text-secondary);
  font-size: var(--text-sm);
}

.journey-photos {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.journey-photo {
  width: 18rem;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-md);
  background:
    radial-gradient(circle at 30% 20%, var(--accent-dim), transparent 60%),
    var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  display: grid;
  place-items: center;
  color: var(--text-muted);
  font-size: var(--text-xs);
  letter-spacing: 0.15em;
  overflow: hidden;
}

.journey-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 768px) {
  /* 移动端：隐藏轨道与粘性年份，年份内联显示，条目不再占满整屏 */
  .timeline::before,
  .timeline-rail-fill,
  .timeline-year-wrap {
    display: none;
  }

  .timeline-item {
    display: block;
    min-height: auto;
    padding-top: var(--space-12);
  }

  .timeline-year-mobile {
    display: block;
  }
}

/* ---- 个人页：子页 Hero / 爱好 / 未来计划 ---- */
.page-hero {
  padding: var(--space-24) 0 var(--space-8);
}

.page-hero h1 {
  font-size: clamp(var(--text-4xl), 6vw, var(--text-7xl));
  margin: var(--space-6) 0 var(--space-4);
}

.page-hero h1 .accent {
  color: var(--accent);
}

.page-hero .tagline {
  color: var(--text-secondary);
  font-size: var(--text-base);
  max-width: 40rem;
}

/* 爱好：共用边线的紧凑分栏，上排 4+2、下排各半 */
#hobbies .section-title {
  margin-bottom: var(--space-4);
}

.hobby-lead {
  max-width: 36rem;
  margin: 0 auto var(--space-8);
  color: var(--text-secondary);
  font-size: var(--text-sm);
  text-align: center;
}

.hobby-bento {
  display: grid;
  grid-template-columns: 1fr;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.hobby-cell {
  display: flex;
  flex-direction: column;
  min-height: 22rem;
  padding: var(--space-6);
  overflow: hidden;
  border-bottom: 1px solid var(--border-subtle);
}

.hobby-cell--wide {
  min-height: 0;
}

.hobby-bento > .hobby-cell:last-child {
  border-bottom: none;
}

.hobby-cell h3 {
  font-size: var(--text-2xl);
  letter-spacing: -0.02em;
}

.hobby-cell p {
  max-width: 22rem;
  margin-top: var(--space-2);
  color: var(--text-secondary);
  font-size: var(--text-sm);
}

.hobby-stage {
  position: relative;
  flex: 1;
  min-height: 9rem;
  margin-top: var(--space-4);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 120%, var(--accent-dim), transparent 58%),
    var(--bg-elevated);
}

/* 竖图裁成与卡片同宽的横幅，比例跟裁切结果一致，避免再被压扁 */
.hobby-stage--photo {
  flex: none;
  aspect-ratio: 1600 / 733;
  min-height: 0;
  background: var(--bg-elevated);
}

.hobby-stage img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hobby-stage--gamer {
  flex: 1;
  min-height: 11rem;
}

.hobby-stage--gamer img {
  position: absolute;
  inset: 0;
  object-position: center 58%;
}

.hobby-cell--dream {
  position: relative;
}

/* 画布比格子大，只露出上半颗球，下沿被格子裁掉 */
.hobby-globe {
  position: absolute;
  z-index: 0;
  width: 37.5rem;
  height: 37.5rem;
  right: -2.5rem;
  bottom: -20rem;
  pointer-events: none;
}

.hobby-globe-tip {
  position: fixed;
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.4rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-sm);
  background: rgba(17, 17, 17, 0.95);
  pointer-events: none;
}

.hobby-globe-tip[hidden] {
  display: none;
}

.hobby-globe-tip-label {
  color: #fff;
  font-size: var(--text-sm);
  font-weight: 700;
}

.hobby-globe-tip-country {
  color: #a3a3a3;
  font-size: var(--text-xs);
}

@media (max-width: 900px) {
  .hobby-globe {
    width: 26rem;
    height: 26rem;
    right: -2.5rem;
    bottom: -14rem;
  }
}

.hobby-covers {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 11rem;
  margin-top: var(--space-3);
  overflow: hidden;
}

.hobby-covers::before,
.hobby-covers::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2rem;
  z-index: 1;
  pointer-events: none;
}

.hobby-covers::before {
  left: 0;
  background: linear-gradient(90deg, var(--bg-base), transparent);
}

.hobby-covers::after {
  right: 0;
  background: linear-gradient(270deg, var(--bg-base), transparent);
}

.hobby-cover-row {
  display: flex;
  margin-left: -2.5rem;
}

.hobby-cover-row--shift {
  margin-left: 0.5rem;
}

/* 阅读格要看清全部封面，不把第一张推出格子 */
.hobby-covers--fit::before,
.hobby-covers--fit::after {
  display: none;
}

.hobby-covers--fit .hobby-cover-row,
.hobby-covers--fit .hobby-cover-row--shift {
  margin-left: 0;
}

.hobby-covers--fit .hobby-cover-row--shift {
  margin-left: var(--space-6);
}

.hobby-covers--fit {
  overflow: visible;
}

.hobby-cell--narrow {
  position: relative;
  z-index: 2;
  overflow: visible;
}

.hobby-covers--fit .hobby-cover {
  position: relative;
  z-index: 1;
  width: 5.8rem;
  height: 5.8rem;
  padding: 0.22rem;
  overflow: visible;
  background: #000;
  border-color: #000;
  cursor: pointer;
  transition: transform var(--duration-base) var(--ease-out);
}

.hobby-covers--fit .hobby-cover img {
  border-radius: calc(var(--radius-md) - 0.15rem);
}

.hobby-covers--fit .hobby-cover:hover,
.hobby-covers--fit .hobby-cover:focus {
  transform: rotate(0deg);
  z-index: 6;
}

.hobby-covers--fit .hobby-cover:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.hobby-note {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 0.45rem);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  width: 12rem;
  padding: 0.45rem 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-sm);
  background: #111;
  font-size: var(--text-xs);
  line-height: 1.45;
  text-align: left;
  white-space: normal;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%);
  transition: opacity var(--duration-base) var(--ease-out);
}

.hobby-note-title {
  color: #fff;
  font-weight: 700;
}

.hobby-note-text {
  color: #a3a3a3;
}

.hobby-covers--fit .hobby-cover:first-child .hobby-note {
  left: 0;
  transform: none;
}

.hobby-covers--fit .hobby-cover:last-child .hobby-note {
  left: auto;
  right: 0;
  transform: none;
}

.hobby-covers--fit .hobby-cover:hover .hobby-note,
.hobby-covers--fit .hobby-cover:focus .hobby-note {
  opacity: 1;
}

.hobby-cover {
  --cover-tilt: -8deg;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 6.5rem;
  height: 6.5rem;
  margin-top: var(--space-4);
  margin-right: -0.7rem;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  font-size: var(--text-xs);
  transform: rotate(var(--cover-tilt));
}

.hobby-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  justify-self: stretch;
  align-self: stretch;
}

.hobby-cover:nth-child(6n + 2) { --cover-tilt: 6deg; }
.hobby-cover:nth-child(6n + 3) { --cover-tilt: -4deg; }
.hobby-cover:nth-child(6n + 4) { --cover-tilt: 9deg; }
.hobby-cover:nth-child(6n + 5) { --cover-tilt: -6deg; }
.hobby-cover:nth-child(6n + 6) { --cover-tilt: 3deg; }

/* 未来计划：窄清单，实心点是进行中，右上角数字是实心点数量 */
.plan-board {
  width: auto;
  margin-inline: 0;
  padding: var(--space-4);
  border-radius: var(--radius-xl);
  background: #18181b;
}

.plan-board-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  margin: 0;
  color: #60a5fa;
  font-size: var(--text-xl);
  font-weight: 700;
}

.plan-board-title {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.plan-board-count {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  border-radius: var(--radius-full);
  background: #3f3f46;
  color: #60a5fa;
  font-size: var(--text-xs);
  font-weight: 400;
}

.plan-list {
  margin: var(--space-1) 0 0;
  padding: 0;
  list-style: none;
}

.plan-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-1) 0;
  border-bottom: 1px solid #3f3f46;
}

.plan-dot {
  width: 0.75rem;
  height: 0.75rem;
  flex-shrink: 0;
  border: 2px solid #3f3f46;
  border-radius: var(--radius-full);
}

.plan-item.is-on .plan-dot {
  background: #3b82f6;
}

.plan-label {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  color: #fff;
  font-size: var(--text-xs);
  font-weight: 600;
}

.plan-item:hover .plan-label,
.plan-item:focus-within .plan-label {
  color: #93c5fd;
}

.plan-info {
  margin-left: auto;
  flex-shrink: 0;
  color: #52525b;
}

.plan-item:hover .plan-info {
  color: #60a5fa;
}

.plan-status {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.plan-item:hover .plan-status,
.plan-item:focus-within .plan-status {
  position: static;
  order: 1;
  width: auto;
  height: auto;
  margin: 0.15rem 0 0;
  overflow: visible;
  clip: auto;
  clip-path: none;
  white-space: normal;
  color: #a1a1aa;
  font-size: 0.65rem;
  font-weight: 400;
}

.life-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  align-items: stretch;
}

.life-grid > .routine-card,
.life-grid > .song-card,
.life-grid > .plan-board,
.life-grid > .life-toys {
  width: auto;
  max-width: none;
  min-width: 0;
  margin: 0;
  height: 100%;
}

.life-toys {
  display: block;
}

@media (min-width: 760px) {
  .life-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.routine-card {
  padding: var(--space-4);
  border-radius: var(--radius-xl);
  background: #10281f;
  color: #ecfdf5;
}

.routine-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.routine-head h2 {
  margin: 0;
  font-size: var(--text-base);
}

.routine-head svg {
  color: #86efac;
}

.routine-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin: var(--space-3) 0 0;
  padding: 0;
  list-style: none;
}

.routine-list p {
  margin: 0;
}

.routine-list p:first-child {
  font-weight: 700;
}

.routine-list p:last-child {
  color: #86efac;
  font-size: var(--text-xs);
}

.song-card {
  display: flex;
  flex-direction: column;
  min-height: 15rem;
  padding: var(--space-4);
  border-radius: var(--radius-xl);
  background: linear-gradient(to bottom left, #c7d2fe, #4f46e5);
  color: #fff;
}

.song-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.song-cover {
  width: 5rem;
  height: 5rem;
  border-radius: var(--radius-lg);
  object-fit: cover;
}

.song-eq {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 1.4rem;
}

.song-eq span {
  width: 3px;
  height: 40%;
  border-radius: var(--radius-full);
  background: #fff;
  animation: song-eq 0.8s ease-in-out infinite;
  animation-play-state: paused;
}

.song-card.is-playing .song-eq span {
  animation-play-state: running;
}

.song-eq span:nth-child(2) { animation-delay: 0.1s; }
.song-eq span:nth-child(3) { animation-delay: 0.2s; }
.song-eq span:nth-child(4) { animation-delay: 0.3s; }

@keyframes song-eq {
  50% { height: 100%; }
}

.song-title {
  margin: var(--space-3) 0 0;
  font-size: var(--text-lg);
  font-weight: 700;
}

.song-artist {
  margin: var(--space-1) 0 var(--space-3);
  color: #e0e7ff;
  font-size: var(--text-xs);
  font-weight: 600;
}

.song-card > .song-title {
  margin-top: 0;
}

.song-frame {
  display: block;
  flex: none;
  width: 100%;
  height: 152px;
  margin-top: auto;
  border: 0;
  border-radius: var(--radius-lg);
  background: #1e1b4b;
}

.song-seek-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.song-time {
  width: 2.2rem;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.65rem;
  font-variant-numeric: tabular-nums;
}

.song-seek {
  position: relative;
  flex: 1;
  height: 1rem;
}

.song-track,
.song-fill {
  position: absolute;
  left: 0;
  top: 50%;
  height: 0.35rem;
  border-radius: var(--radius-full);
  transform: translateY(-50%);
}

.song-track {
  width: 100%;
  background: rgba(255, 255, 255, 0.28);
}

.song-fill {
  width: 0;
  background: linear-gradient(90deg, #38bdf8, #e879f9, #fcd34d);
}

.song-seek input {
  position: absolute;
  inset: 0;
  width: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.song-controls {
  display: flex;
  justify-content: center;
  gap: var(--space-4);
  margin-top: var(--space-2);
}

.song-controls button {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
}

.song-controls svg {
  width: 1.1rem;
  height: 1.1rem;
  fill: currentColor;
}

.song-card .icon-pause,
.song-card.is-playing .icon-play {
  display: none;
}

.song-card.is-playing .icon-pause {
  display: block;
}

.cradle,
.toy-counts {
  width: min(100%, 22rem);
  padding: var(--space-4);
  border-radius: var(--radius-xl);
  background: #18181b;
}

.cradle p {
  margin: 0 0 var(--space-2);
  color: #a1a1aa;
  font-size: var(--text-xs);
}

.cradle-stage {
  display: flex;
  justify-content: center;
  gap: var(--space-4);
  height: 9rem;
}

.pendulum {
  position: relative;
  width: 2.4rem;
  height: 8.5rem;
  padding: 0;
  border: 0;
  background: transparent;
  transform-origin: top center;
  cursor: grab;
}

.pendulum-line {
  position: absolute;
  left: 50%;
  top: 0;
  width: 1px;
  height: 6rem;
  background: linear-gradient(#71717a, transparent);
}

.pendulum-bob {
  position: absolute;
  left: 50%;
  top: 5.6rem;
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid #3f3f46;
  border-radius: 0.7rem;
  background: #27272a;
  transform: translateX(-50%);
}

.toy-counts {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.toy-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 0.7rem;
  border: 0;
  border-radius: var(--radius-md);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.toy-chip--book { background: #3b82f6; }
.toy-chip--anime { background: #a855f7; }
.toy-chip--fight { background: #ef4444; }
.toy-chip--ball { background: #22c55e; }

.sf-trainer {
  width: 100%;
  height: 100%;
  padding: var(--space-4);
  border-radius: var(--radius-xl);
  background: #18181b;
  color: #fff;
}

.sf-trainer:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.sf-name {
  margin: 0;
  color: #f87171;
  font-weight: 700;
}

.sf-steps {
  display: flex;
  gap: var(--space-2);
  min-height: 2rem;
  margin: var(--space-3) 0 0;
  font-size: var(--text-2xl);
}

.sf-steps .is-done {
  color: #86efac;
}

.sf-log {
  min-height: 1rem;
  margin: var(--space-2) 0 0;
  color: #e4e4e7;
  font-size: var(--text-sm);
  letter-spacing: 0.12em;
}

.sf-stage {
  position: relative;
  height: 8rem;
  margin-top: var(--space-3);
  overflow: hidden;
}

.sf-stage::after {
  content: "";
  position: absolute;
  left: 0.4rem;
  right: 0.4rem;
  bottom: 0.35rem;
  height: 2px;
  background: #3f3f46;
}

.sf-fireball,
.sf-fighter {
  position: absolute;
  opacity: 0;
}

.sf-fireball {
  left: 0;
  top: 58%;
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius-full);
  background:
    radial-gradient(circle, #fff 0 18%, #93c5fd 36%, #2563eb 66%, #1d4ed8 76%, transparent 78%);
  box-shadow: 0 0 18px 4px #60a5fa;
}

.sf-fireball::before {
  content: "";
  position: absolute;
  top: 50%;
  right: 72%;
  width: 2.6rem;
  height: 0.45rem;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, transparent, #60a5fa);
  transform: translateY(-50%);
}

.sf-fireball.is-fired {
  animation: sf-hado 0.85s ease-out both;
}

.sf-fighter {
  left: 32%;
  bottom: 0.45rem;
  width: 4.8rem;
  height: 6.4rem;
  color: #f8fafc;
}

.sf-arm {
  transform-box: fill-box;
  transform-origin: 0% 100%;
}

.sf-fighter.is-fired {
  animation: sf-rise 0.8s ease-out both;
}

.sf-fighter.is-fired .sf-arm {
  animation: sf-uppercut 0.8s ease-out both;
}

@keyframes sf-hado {
  0% { opacity: 1; transform: translate(0, -50%) scale(0.65); }
  78% { opacity: 1; transform: translate(16rem, -50%) scale(1); }
  100% { opacity: 0; transform: translate(18.5rem, -50%) scale(0.8); }
}

@keyframes sf-rise {
  0% { opacity: 1; transform: translateY(1.15rem) scale(0.94, 0.72); }
  30% { opacity: 1; transform: translateY(0.2rem) scale(1, 0.9); }
  62% { opacity: 1; transform: translateY(-1.55rem) scale(1, 1); }
  100% { opacity: 0; transform: translateY(-2.35rem) scale(1, 1); }
}

@keyframes sf-uppercut {
  0% { transform: rotate(76deg); }
  28% { transform: rotate(42deg); }
  58% { transform: rotate(-6deg); }
  100% { transform: rotate(-14deg); }
}

/* 全局减少动效会把动画收成 0.01ms，火球和升龙就看不见了。 */
@media (prefers-reduced-motion: reduce) {
  .sf-fireball.is-fired,
  .sf-fighter.is-fired,
  .sf-fighter.is-fired .sf-arm {
    animation-duration: 0.85s !important;
  }
}

.sf-hint,
.sf-result {
  margin: var(--space-2) 0 0;
  color: #a1a1aa;
  font-size: var(--text-xs);
}

.sf-trainer.is-ok .sf-result {
  color: #86efac;
}

.sf-trainer.is-miss {
  outline: 2px solid #ef4444;
}

.sf-pad {
  display: grid;
  grid-template-columns: repeat(3, 3rem);
  gap: var(--space-2);
  justify-content: center;
  margin-top: var(--space-3);
}

.sf-pad button {
  height: 2.4rem;
  border: 1px solid #3f3f46;
  border-radius: var(--radius-md);
  background: #27272a;
  color: #fff;
  cursor: pointer;
}

@media (min-width: 901px) {
  .hobby-bento {
    grid-template-columns: repeat(6, 1fr);
  }

  .hobby-cell {
    min-height: 26rem;
  }

  .hobby-cell--wide {
    grid-column: span 4;
    min-height: 0;
    border-right: 1px solid var(--border-subtle);
  }

  .hobby-cell--narrow {
    grid-column: span 2;
  }

  .hobby-cell--half {
    grid-column: span 3;
    border-bottom: none;
  }

  .hobby-cell--split {
    border-right: 1px solid var(--border-subtle);
  }

  .hobby-cell--wide p,
  .hobby-cell--half p {
    max-width: 32rem;
  }
}

/* ---- 联系 / 页脚 ---- */
.contact {
  text-align: center;
}

.contact h2 {
  font-size: clamp(var(--text-5xl), 7vw, var(--text-giant));
  margin-bottom: var(--space-6);
}

.contact .desc {
  color: var(--text-secondary);
  max-width: 36rem;
  margin: 0 auto var(--space-8);
}

.contact .actions {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  flex-wrap: wrap;
}

.icon-link {
  display: inline-flex;
  padding: var(--space-3);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  transition: all var(--duration-fast) var(--ease-out);
}

.icon-link:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding: var(--space-8) 0;
  text-align: center;
  color: var(--text-muted);
  font-size: var(--text-sm);
}

.thanks-frame {
  position: relative;
  overflow: hidden;
  padding: 1px;
  border-radius: 1.75rem;
  background: #1c1c2e;
}

.thanks-orbit {
  position: absolute;
  z-index: 2;
  width: 6rem;
  height: 6rem;
  border-radius: var(--radius-full);
  background: radial-gradient(circle, var(--accent-green) 30%, transparent 68%);
  opacity: 0.8;
  pointer-events: none;
  offset-path: inset(0 round 1.75rem);
  animation: thanks-orbit 8s linear infinite;
}

.thanks-panel {
  position: relative;
  display: grid;
  place-items: center;
  min-height: min(40rem, 88vh);
  overflow: hidden;
  border-radius: calc(1.75rem - 1px);
  background: linear-gradient(to bottom, var(--bg-base), #141420);
}

.thanks-beams {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.thanks-beams span {
  position: absolute;
  top: -6rem;
  width: 1px;
  height: var(--beam-h);
  border-radius: var(--radius-full);
  background: linear-gradient(to top, var(--accent-green), transparent);
  animation: thanks-fall var(--beam-t) linear infinite;
  animation-delay: var(--beam-d);
}

.thanks-beams span:nth-child(1) { left: 6%; --beam-h: 3.5rem; --beam-t: 6.5s; --beam-d: 0s; }
.thanks-beams span:nth-child(2) { left: 18%; --beam-h: 1.5rem; --beam-t: 8s; --beam-d: -2s; }
.thanks-beams span:nth-child(3) { left: 32%; --beam-h: 3.5rem; --beam-t: 7s; --beam-d: -3.5s; }
.thanks-beams span:nth-child(4) { left: 48%; --beam-h: 5rem; --beam-t: 9s; --beam-d: -1s; }
.thanks-beams span:nth-child(5) { left: 63%; --beam-h: 3.5rem; --beam-t: 6s; --beam-d: -4s; }
.thanks-beams span:nth-child(6) { left: 78%; --beam-h: 3rem; --beam-t: 7.5s; --beam-d: -2.5s; }
.thanks-beams span:nth-child(7) { left: 90%; --beam-h: 1.5rem; --beam-t: 8.5s; --beam-d: -5s; }

.thanks-title {
  position: relative;
  z-index: 1;
  margin: 0;
  padding-inline: var(--space-4);
  color: var(--text-primary);
  font-size: clamp(var(--text-4xl), 6vw, var(--text-7xl));
  font-weight: 700;
  line-height: var(--leading-tight);
  letter-spacing: -0.03em;
  text-align: center;
}

.thanks-title span {
  display: block;
}

.thanks-accent {
  background-image: linear-gradient(90deg, #a855f7, #8b5cf6, #ec4899);
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 1px 3px rgba(27, 37, 80, 0.14));
}

@keyframes thanks-fall {
  0% { transform: translateY(0); opacity: 0; }
  12% { opacity: 1; }
  100% { transform: translateY(46rem); opacity: 0; }
}

@keyframes thanks-orbit {
  to { offset-distance: 100%; }
}
