/* ============================================================
   MBX · UI 设计作品集
   配色参考：浅灰底 + 纯白卡片 + 深灰文字 + 黑色主按钮
   ============================================================ */

:root {
  /* 淡彩配色：取自封面的 蓝 → 薰衣草 → 粉 → 青 */
  --bg: #eef4ff;
  --bg-deep: #f4eefb;
  --surface: #ffffff;
  --surface-soft: #f2f5fd;
  --ink-strong: #2b3252;
  --ink: #3d4463;
  --ink-soft: #6b7392;
  --muted: #959cb8;
  --line: rgba(58, 74, 130, 0.10);
  --line-strong: rgba(58, 74, 130, 0.18);

  /* 点缀色 */
  --accent-blue: #7ea9f0;
  --accent-violet: #ab93ef;
  --accent-mint: #a5e2ea;
  --accent-pink: #f4bcd9;
  --grad-accent: linear-gradient(120deg, #7ea9f0 0%, #ab93ef 100%);
  --grad-soft: linear-gradient(140deg, #eaf2ff 0%, #f4f1ff 50%, #fdeef8 100%);

  --radius-lg: 26px;
  --radius-md: 18px;
  --radius-sm: 12px;

  --shadow-card: 0 30px 60px -44px rgba(74, 92, 160, 0.55);
  --shadow-float: 0 42px 90px -50px rgba(74, 92, 160, 0.62);

  --font-sans: "PingFang SC", "HarmonyOS Sans SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Source Han Sans SC", system-ui, -apple-system, sans-serif;
  --font-serif: "Songti SC", "Source Han Serif SC", Georgia, "Times New Roman", serif;
  --font-en: "Helvetica Neue", Helvetica, Arial, sans-serif;

  --header-h: 78px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: 0.01em;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* 背景：封面同款的淡彩渐变（蓝 → 薰衣草 → 粉 → 青） */
.ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(900px 640px at 86% 2%, rgba(223, 248, 255, 0.95), transparent 64%),
    radial-gradient(820px 600px at 4% 22%, rgba(230, 239, 255, 0.95), transparent 66%),
    radial-gradient(920px 720px at 10% 98%, rgba(245, 236, 255, 0.95), transparent 68%),
    radial-gradient(860px 660px at 92% 96%, rgba(251, 237, 250, 0.92), transparent 70%),
    radial-gradient(760px 560px at 52% 58%, rgba(255, 255, 255, 0.85), transparent 72%),
    linear-gradient(170deg, #e9f2ff 0%, #f7f7fd 46%, #f5eefb 100%);
}

/* 光标光绘（GlowCursor）：铺满视口、位于内容之下，不接收鼠标事件 */
.glow-cursor {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.glow-cursor__canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
  user-select: none;
  /* 白色发光用叠加模式，压在浅灰背景上像一束光 */
  mix-blend-mode: screen;
}

main,
.site-header,
.site-footer {
  position: relative;
  z-index: 1;
}

img {
  display: block;
  max-width: 100%;
}

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

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4.5vw, 60px);
}

/* ---------------- 通用文字 ---------------- */

.eyebrow {
  margin: 0;
  font-family: var(--font-en);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

.section-title {
  margin: 18px 0 0;
  font-size: clamp(1.55rem, 3.2vw, 2.6rem);
  font-weight: 600;
  line-height: 1.32;
  letter-spacing: -0.01em;
  color: var(--ink-strong);
}

.section-desc {
  max-width: 46ch;
  margin: 18px 0 0;
  font-size: 0.98rem;
  color: var(--ink-soft);
}

.section-head {
  max-width: 100%;
  margin-bottom: clamp(36px, 5vw, 64px);
}

/* ---------------- 按钮 ---------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 999px;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
  transition: transform 0.35s var(--ease), background-color 0.35s var(--ease),
    color 0.35s var(--ease), border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.btn-primary {
  background: var(--grad-accent);
  color: #fff;
  box-shadow: 0 20px 38px -24px rgba(110, 130, 210, 0.95);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 26px 46px -24px rgba(110, 130, 210, 1), 0 0 0 4px rgba(171, 147, 239, 0.14);
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  font-size: 0.8rem;
  line-height: 1;
  transition: transform 0.35s var(--ease);
}

.btn-primary:hover .btn-icon {
  transform: translateX(3px);
}

.btn-ghost {
  border: 1px solid rgba(126, 169, 240, 0.35);
  background: rgba(255, 255, 255, 0.62);
  color: var(--ink);
}

.btn-ghost:hover {
  border-color: var(--accent-violet);
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink-strong);
  transform: translateY(-2px);
}

/* 「查看完整作品集」：标题行右侧的主按钮，做得比普通按钮更显眼一点 */
.btn-cta {
  padding: 14px 24px;
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  box-shadow: 0 24px 44px -24px rgba(110, 130, 210, 1), 0 0 0 1px rgba(255, 255, 255, 0.3) inset;
}

.btn-cta:hover {
  box-shadow: 0 30px 52px -24px rgba(110, 130, 210, 1), 0 0 0 5px rgba(171, 147, 239, 0.12);
}

/* ---------------- 顶部导航 ---------------- */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-h);
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color 0.5s var(--ease), backdrop-filter 0.5s var(--ease),
    border-color 0.5s var(--ease), box-shadow 0.5s var(--ease);
}

/* 滚动后：固定 + 毛玻璃 */
.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.62);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 18px 44px -34px rgba(74, 92, 160, 0.7), inset 0 -1px 0 rgba(74, 92, 160, 0.06);
}

/* 浏览器不支持毛玻璃时的兜底 */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .site-header.is-scrolled {
    background: rgba(240, 240, 241, 0.94);
  }
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 100%;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4.5vw, 60px);
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.brand-mark {
  font-family: var(--font-en);
  font-size: 1.32rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  color: var(--ink-strong);
}

.brand-sub {
  font-family: var(--font-en);
  font-size: 10px;
  letter-spacing: 0.24em;
  color: var(--muted);
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(18px, 4vw, 64px);
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.86rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  transition: color 0.3s var(--ease);
}

.nav-link .bracket {
  font-family: var(--font-en);
  font-size: 0.9rem;
  color: rgba(148, 149, 154, 0.65);
  transition: color 0.3s var(--ease);
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 1px;
  background: var(--grad-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s var(--ease);
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--ink-strong);
}

.nav-link:hover .bracket,
.nav-link.is-active .bracket {
  color: var(--ink-strong);
}

.nav-link:hover::after,
.nav-link.is-active::after {
  transform: scaleX(1);
}

/* 移动端菜单按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-family: inherit;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  cursor: pointer;
}

.nav-toggle-bar {
  display: block;
  width: 14px;
  height: 1px;
  background: currentColor;
}

/* ---------------- 首屏 ---------------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: calc(var(--header-h) + 24px) 0 clamp(140px, 20vh, 240px);
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.32fr) minmax(0, 0.68fr);
  grid-template-rows: auto auto auto auto;
  column-gap: clamp(28px, 5vw, 72px);
  align-items: end;
  width: 100%;
}

.hero-eyebrow {
  grid-column: 1 / -1;
  grid-row: 1;
  margin-bottom: clamp(24px, 5vh, 56px);
}

.hero-title {
  grid-column: 1;
  grid-row: 2;
  margin: 0;
  display: flex;
  flex-direction: column;
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.title-line {
  display: block;
  font-size: clamp(1.9rem, 5.4vw, 4.7rem);
}

.title-line-1 {
  color: var(--ink-strong);
}

.title-line-2 {
  color: rgba(43, 50, 82, 0.28);
}

.hero-side {
  grid-column: 2;
  grid-row: 2;
  align-self: start;
  padding-top: 0.35em;
}

.hero-copy {
  margin: 0;
  font-size: 0.98rem;
  color: rgba(107, 115, 146, 0.72);
}

.hero-thanks {
  margin: 14px 0 0;
  font-family: var(--font-serif);
  font-size: 1.06rem;
  /* 用背景同源的蓝紫粉渐变做文字色 */
  background: linear-gradient(110deg, #6f9bf0 0%, #a98bf0 52%, #e393c6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.hero-actions {
  grid-column: 1;
  grid-row: 3;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: clamp(24px, 3.4vh, 40px);
}

/* ---------- 边缘流光按钮（SpecularButton） ---------- */

.specular-button {
  --sb-radius: 999px;
  --sb-text-color: var(--ink-strong);

  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  margin: 0;
  border: 0;
  border-radius: var(--sb-radius);
  font: inherit;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.06em;
  color: var(--sb-text-color);
  background: rgba(255, 255, 255, 0.66);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: 0 16px 34px -24px rgba(74, 92, 160, 0.8);
  cursor: pointer;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.3s var(--ease);
}

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

.specular-button:active {
  transform: scale(0.97);
}

.specular-button:focus-visible {
  outline: 2px solid var(--accent-violet);
  outline-offset: 3px;
}

.specular-button--primary {
  color: #ffffff;
  background: var(--grad-accent);
  box-shadow: 0 20px 38px -24px rgba(110, 130, 210, 0.95);
}

.specular-button--md {
  padding: 16px 32px;
  font-size: 0.95rem;
}

.specular-button__light {
  position: absolute;
  inset: -24px;
  z-index: 1;
  display: block;
  width: calc(100% + 48px);
  height: calc(100% + 48px);
  pointer-events: none;
}

.specular-button__label {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: inherit;
}

.hero-scroll {
  grid-column: 1 / -1;
  grid-row: 4;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: clamp(40px, 8vh, 84px);
  font-family: var(--font-en);
  font-size: 11px;
  letter-spacing: 0.24em;
  color: var(--muted);
}

.scroll-line {
  position: relative;
  display: block;
  width: 74px;
  height: 1px;
  background: var(--line-strong);
  overflow: hidden;
}

.scroll-line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--grad-accent);
  animation: scrollTrace 2.6s var(--ease) infinite;
}

@keyframes scrollTrace {
  0% { transform: translateX(-100%); }
  55% { transform: translateX(0); }
  100% { transform: translateX(100%); }
}

/* ---------- 首屏插画（显示器素材） ---------- */

.hero-visual {
  position: absolute;
  right: calc(max((100vw - 1280px) / 2, 0px) + clamp(20px, 4.5vw, 60px));
  bottom: clamp(64px, 8vh, 124px);
  width: clamp(240px, 28vw, 400px);
  z-index: 1;
  pointer-events: none;
}

.hero-visual.reveal {
  transform: translateY(38px) scale(0.95);
  transition-duration: 1.15s;
  transition-delay: 0.42s;
}

.hero-visual.reveal.is-in {
  transform: translateY(0) scale(1);
}

/* 白色柔光把插画“融”进淡彩背景 */
.hero-visual-glow {
  position: absolute;
  left: 50%;
  top: 58%;
  width: 126%;
  height: 126%;
  transform: translate(-50%, -50%);
  background: radial-gradient(
    closest-side,
    rgba(255, 255, 255, 0.9),
    rgba(255, 255, 255, 0.42) 46%,
    transparent 72%
  );
  filter: blur(2px);
  pointer-events: none;
}

.hero-visual-parallax {
  position: relative;
  transform: translate3d(0, 0, 0);
  transition: transform 0.7s var(--ease);
  will-change: transform;
}

.hero-visual-float {
  animation: heroFloat 7.5s ease-in-out 2s infinite;
}

.hero-visual img {
  display: block;
  width: 100%;
  height: auto;
}

@keyframes heroFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-12px);
  }
}

/* ---------------- 区块通用 ---------------- */

.section {
  position: relative;
  padding: clamp(72px, 11vw, 148px) 0;
}

/* ---------------- 精选作品（通屏横向滚动图墙） ---------------- */

.work-marquee {
  position: relative;
  /* 通屏：跳出 .container 的左右留白 */
  width: 100vw;
  margin-left: calc(50% - 50vw);
  overflow: hidden;
  padding: clamp(10px, 1.4vw, 20px) 0;
  /* 两侧淡出，滚动看起来更自然 */
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 5%, #000 95%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 5%, #000 95%, transparent 100%);
}

.work-marquee-track {
  --marquee-gap: clamp(14px, 1.6vw, 24px);

  display: flex;
  gap: var(--marquee-gap);
  width: max-content;
  will-change: transform;
  animation: work-marquee-scroll 64s linear infinite;
}

/* 鼠标停在图墙上就暂停滚动，方便看细节 */
.work-marquee:hover .work-marquee-track {
  animation-play-state: paused;
}

@keyframes work-marquee-scroll {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    /* 图片列表在 JS 里复制了一份；减掉半个间距，头尾才能真正接上 */
    transform: translate3d(calc(-50% - var(--marquee-gap) / 2), 0, 0);
  }
}

.work-shot {
  position: relative;
  flex: none;
  display: block;
  width: clamp(300px, 30vw, 520px);
  aspect-ratio: 16 / 9;
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--surface-soft);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-card);
}

.work-shot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.9s var(--ease);
}

/* 竖版长封面：从顶部裁切，保留标题和主画面 */
.work-shot--top img {
  object-position: top center;
}

.work-shot:hover img {
  transform: scale(1.03);
}

/* 通用的「占位图」角标：首页图墙和作品集详情页都在用 */
.shot-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(43, 50, 82, 0.55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: #fff;
  font-family: var(--font-en);
  font-size: 9.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* ---------------- 工作经历 ---------------- */

.timeline {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}

.timeline-item {
  display: grid;
  grid-template-columns: minmax(150px, 0.2fr) minmax(0, 0.8fr);
  gap: clamp(20px, 4vw, 56px);
  padding: clamp(26px, 3.4vw, 44px) 0;
  border-bottom: 1px solid var(--line);
}

.timeline-period {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding-top: 0.42em;
  font-family: var(--font-en);
  font-size: 0.86rem;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
}

.timeline-dot {
  flex: none;
  margin-top: 0.42em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--grad-accent);
  box-shadow: 0 0 0 4px rgba(126, 169, 240, 0.16);
}

.timeline-role {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  margin: 0;
  font-size: clamp(1.08rem, 1.6vw, 1.32rem);
  font-weight: 600;
  color: var(--ink-strong);
}

.timeline-at {
  text-align: right;
  font-size: 0.86rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.timeline-text {
  max-width: 100%;
  margin: 12px 0 0;
  font-size: 0.96rem;
  color: var(--ink-soft);
}

.timeline-text p {
  margin: 0 0 7px;
}

.timeline-text p:last-child {
  margin-bottom: 0;
}

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

.tags li {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(126, 169, 240, 0.22);
  background: rgba(255, 255, 255, 0.68);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}

/* ---------------- 项目经历 ---------------- */

.section-head--row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 18px;
  max-width: 100%;
}

/* 一行为一组：左边标题 / 说明，右边按钮 / 轮播控件，行内垂直居中对齐 */
.section-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(18px, 3vw, 40px);
  flex-wrap: wrap;
}

.section-row .section-title,
.section-row .section-desc {
  margin: 0;
}

/* 轮播控制区 */
.carousel-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 6px;
}

.carousel-count {
  font-family: var(--font-en);
  font-size: 0.86rem;
  letter-spacing: 0.16em;
  color: var(--muted);
}

.carousel-current {
  color: var(--ink-strong);
}

.carousel-sep {
  padding: 0 2px;
  opacity: 0.55;
}

.carousel-bar {
  position: relative;
  display: block;
  width: clamp(70px, 9vw, 130px);
  height: 2px;
  border-radius: 2px;
  background: rgba(74, 92, 160, 0.16);
  overflow: hidden;
}

.carousel-bar-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 33.333%;
  border-radius: 2px;
  background: var(--grad-accent);
  transition: transform 0.6s var(--ease);
}

.carousel-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(126, 169, 240, 0.32);
  background: rgba(255, 255, 255, 0.75);
  color: var(--ink-strong);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.35s var(--ease), color 0.35s var(--ease),
    border-color 0.35s var(--ease), opacity 0.35s var(--ease), transform 0.35s var(--ease);
}

.carousel-btn:hover:not(:disabled) {
  background: var(--grad-accent);
  border-color: transparent;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 18px 32px -20px rgba(110, 130, 210, 0.9);
}

.carousel-btn:disabled {
  opacity: 0.3;
  cursor: default;
}

.carousel-btn:focus-visible,
.carousel-viewport:focus-visible {
  outline: 2px solid var(--ink-strong);
  outline-offset: 3px;
}

/* 轮播主体 */
.carousel {
  position: relative;
}

.carousel-viewport {
  overflow: hidden;
  cursor: grab;
  touch-action: pan-y;
  border-radius: var(--radius-md);
}

.carousel-viewport.is-dragging {
  cursor: grabbing;
  user-select: none;
}

.carousel-viewport img {
  -webkit-user-drag: none;
}

.carousel-track {
  display: flex;
  gap: clamp(14px, 1.6vw, 22px);
  transition: transform 0.75s var(--ease);
}

.carousel-track.is-dragging {
  transition: none;
}

.carousel-page {
  flex: 0 0 100%;
  min-width: 100%;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(14px, 1.6vw, 22px);
  align-items: stretch;
}

/* 案例卡片 */
.project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 10px 10px 22px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-card);
  cursor: pointer;
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-float);
}

.project-thumb {
  display: block;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  aspect-ratio: 4 / 3;
}

.project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.9s var(--ease);
}

.project-thumb .project-cover--left {
  object-position: left center;
}

.project-thumb .project-cover--top-left {
  object-position: left top;
}

.project-thumb .project-cover--top {
  object-position: center top;
}

.project-card:hover .project-thumb img {
  transform: scale(1.04);
}

.project-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 16px 8px 0;
}

.project-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--font-en);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.project-index {
  padding-bottom: 2px;
  border-bottom: 1px solid var(--line-strong);
  color: var(--ink-strong);
}

.project-name {
  margin: 12px 0 0;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.55;
  color: var(--ink-strong);
}

.project-en {
  margin: 4px 0 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.86rem;
  color: var(--muted);
}

.project-desc {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 12px 0 0;
  font-size: 0.88rem;
  line-height: 1.72;
  color: var(--ink-soft);
}

.project-card .tags {
  margin-top: auto;
  padding-top: 16px;
}

.project-card .tags li {
  padding: 5px 11px;
  font-size: 0.73rem;
}

/* ---------------- 个人简历 ---------------- */

.resume-card {
  position: relative;
  overflow: hidden;
  padding: clamp(34px, 5.2vw, 76px);
  border-radius: clamp(24px, 3vw, 40px);
  background: linear-gradient(168deg, #ffffff 0%, #fafaff 46%, #f2f2fc 100%);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 60px 120px -74px rgba(74, 92, 160, 0.75);
}

/* 卡片上的柔光，呼应参考图的细腻质感 */
.resume-card::after {
  content: "";
  position: absolute;
  top: -30%;
  right: -18%;
  width: 62%;
  height: 110%;
  background: radial-gradient(closest-side, rgba(255, 255, 255, 0.95), transparent 72%);
  pointer-events: none;
}

.resume-kicker {
  margin: 0;
  font-family: var(--font-en);
  font-size: 11px;
  letter-spacing: 0.26em;
  color: var(--muted);
}

.resume-title {
  position: relative;
  margin: 22px 0 0;
  font-family: var(--font-serif);
  font-size: clamp(1.9rem, 4.4vw, 3.4rem);
  font-weight: 500;
  line-height: 1.28;
  letter-spacing: 0.01em;
  color: #5b6288;
}

.resume-title-en {
  display: block;
  margin-top: 6px;
  font-style: italic;
  color: var(--muted);
}

.resume-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 48px);
  margin-top: clamp(32px, 4.4vw, 56px);
  padding-top: clamp(26px, 3.6vw, 44px);
  border-top: 1px solid var(--line);
}

.resume-block-title {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--muted);
}

.resume-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
  font-size: 0.94rem;
  color: var(--ink);
}

.resume-list a {
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), color 0.3s var(--ease);
}

.resume-list a:hover {
  border-bottom-color: var(--line-strong);
  color: var(--ink-strong);
}

.resume-tools {
  position: relative;
  margin-top: clamp(28px, 3.6vw, 44px);
  padding-top: clamp(24px, 3vw, 36px);
  border-top: 1px solid var(--line);
}

.tags-wide {
  margin-top: 16px;
}

.tags-wide li {
  background: #fff;
}

.resume-actions {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: clamp(30px, 4vw, 48px);
}

.resume-note {
  margin-left: auto;
  max-width: 36ch;
  text-align: right;
  font-family: var(--font-serif);
  font-size: clamp(1rem, 1.5vw, 1.16rem);
  font-weight: 500;
  line-height: 1.6;
  /* 和首屏那句感谢一样，用背景同源的蓝紫粉渐变做文字色 */
  background: linear-gradient(110deg, #6f9bf0 0%, #a98bf0 52%, #e393c6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

/* ---------------- 页脚 ---------------- */

.site-footer {
  padding: clamp(40px, 6vw, 72px) 0;
  border-top: 1px solid var(--line);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.footer-brand {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 14px;
}

.footer-note {
  font-size: 0.86rem;
  color: var(--ink-soft);
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  font-family: var(--font-en);
  font-size: 0.84rem;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.footer-meta a {
  transition: color 0.3s var(--ease);
}

.footer-meta a:hover {
  color: var(--ink-strong);
}

.footer-top {
  padding-left: 14px;
  border-left: 1px solid var(--line-strong);
}

/* ---------------- 悬浮回顶按钮（右下角圆形） ---------------- */

.to-top {
  position: fixed;
  right: clamp(16px, 3vw, 36px);
  bottom: clamp(16px, 3vw, 36px);
  z-index: 96;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  padding: 0;
  border: 1px solid rgba(74, 92, 160, 0.16);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  -webkit-backdrop-filter: blur(14px) saturate(170%);
  backdrop-filter: blur(14px) saturate(170%);
  color: var(--ink-strong);
  font-family: inherit;
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
  /* 浅色背景上也看得清：近处描边投影 + 远处柔和投影 */
  box-shadow: 0 1px 2px rgba(43, 50, 82, 0.2), 0 10px 22px -8px rgba(43, 50, 82, 0.42),
    0 26px 48px -28px rgba(74, 92, 160, 0.7);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px) scale(0.92);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease), visibility 0.4s,
    background 0.4s var(--ease), color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.to-top:hover {
  background: var(--grad-accent);
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 26px 46px -24px rgba(110, 130, 210, 1);
}

.to-top:focus-visible {
  outline: 2px solid var(--ink-strong);
  outline-offset: 3px;
}

.to-top-icon {
  display: block;
  transition: transform 0.4s var(--ease);
}

.to-top:hover .to-top-icon {
  transform: translateY(-2px);
}

@media (prefers-reduced-motion: reduce) {
  .to-top {
    transition: opacity 0.2s linear, visibility 0.2s;
    transform: none;
  }

  .to-top.is-visible {
    transform: none;
  }

  .to-top:hover {
    transform: none;
  }
}

/* ---------------- 进场动画 ---------------- */

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}

.reveal.is-in {
  opacity: 1;
  transform: translateY(0);
}

.hero-title .title-line-1 {
  transition-delay: 0.06s;
}

.hero-title .title-line-2 {
  transition-delay: 0.16s;
}

.hero-side {
  transition-delay: 0.26s;
}

.hero-scroll {
  transition-delay: 0.4s;
}

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

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .scroll-line::after {
    animation: none;
  }

  .hero-visual-float {
    animation: none;
  }

  .hero-visual.reveal,
  .hero-visual.reveal.is-in {
    transition: none;
  }

  .hero-visual-parallax {
    transition: none;
  }

  /* 减少动态效果时，图墙停止自动滚动，改成可以手动横向滚动 */
  .work-marquee {
    overflow-x: auto;
    -webkit-mask-image: none;
    mask-image: none;
  }

  .work-marquee-track {
    animation: none;
  }
}

/* 屏幕偏矮时，首屏插画收小一点，避免和文案打架 */
@media (min-width: 861px) and (max-height: 800px) {
  .hero-visual {
    width: clamp(200px, 25vw, 330px);
    bottom: clamp(36px, 7vh, 84px);
  }
}

/* ---------------- 响应式 ---------------- */

@media (max-width: 1024px) {
  .hero-visual {
    width: clamp(220px, 33vw, 340px);
    bottom: clamp(40px, 8vh, 96px);
  }

  .carousel-page {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(14px, 2vw, 20px);
  }

  .project-name {
    font-size: 1.02rem;
  }

  .project-desc {
    -webkit-line-clamp: 2;
  }
}

@media (max-width: 860px) {
  :root {
    --header-h: 68px;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav {
    position: absolute;
    top: var(--header-h);
    right: clamp(20px, 4.5vw, 60px);
    left: clamp(20px, 4.5vw, 60px);
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 12px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.86);
    -webkit-backdrop-filter: blur(18px) saturate(170%);
    backdrop-filter: blur(18px) saturate(170%);
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 30px 60px -40px rgba(28, 28, 29, 0.9);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.35s var(--ease), transform 0.35s var(--ease), visibility 0.35s;
  }

  .nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .nav-link {
    width: 100%;
    padding: 10px 8px;
    line-height: 1.45;
    font-size: 0.94rem;
  }

  .nav-link::after {
    display: none;
  }

  .hero {
    align-items: flex-start;
    padding-top: calc(var(--header-h) + 9vh);
  }

  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 26px;
    align-items: start;
  }

  .hero-title,
  .hero-side {
    grid-column: 1;
  }

  /* 手机端改回自然堆叠，避免标题和文案挤在同一个网格单元里 */
  .hero-eyebrow,
  .hero-title,
  .hero-side,
  .hero-actions,
  .hero-scroll {
    grid-row: auto;
  }

  .hero-side {
    padding-top: 0;
    max-width: 46ch;
  }

  .hero-visual {
    position: relative;
    right: auto;
    bottom: auto;
    order: 3;
    width: min(68vw, 340px);
    margin: clamp(26px, 5vh, 46px) auto 0;
  }

  .hero-scroll {
    order: 4;
  }

  .timeline-item {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

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

@media (max-width: 560px) {
  .work-shot {
    width: min(82vw, 380px);
  }

  .hero-visual {
    width: min(80vw, 310px);
  }

  .section-head--row {
    align-items: flex-start;
  }

  .section-row {
    align-items: flex-start;
  }

  .btn-cta {
    width: 100%;
    justify-content: center;
  }

  .carousel-controls {
    gap: 12px;
    padding-bottom: 0;
  }

  .carousel-btn {
    width: 42px;
    height: 42px;
  }

  .carousel-bar {
    width: 64px;
  }

  .carousel-page {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    align-items: start;
  }

  .carousel-track {
    gap: 12px;
  }

  .project-card {
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 10px;
  }

  .project-thumb {
    flex: 0 0 37%;
    aspect-ratio: 1 / 1;
  }

  .project-body {
    padding: 0 4px 0 0;
  }

  .project-name {
    margin-top: 8px;
    font-size: 0.94rem;
  }

  .project-desc {
    margin-top: 8px;
    font-size: 0.82rem;
  }

  .project-card .tags {
    display: none;
  }

  .brand-sub {
    display: none;
  }

  .timeline-at {
    text-align: left;
  }

  .timeline-role {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-top {
    padding-left: 0;
    border-left: none;
  }
}
