/* ============================================
   萌创匠盒 · 总官网 — 品牌级样式
   ============================================ */

:root {
  /* 品牌色：暖白底 + 墨色 + 匠金 */
  --color-bg: #faf9f7;
  --color-bg-hero: #f5f2ed;
  --color-text: #1c1c1c;
  --color-text-muted: #5c5c5c;
  --color-accent: #a67c52;
  --color-accent-light: #c4a574;
  --color-border: #e8e4de;

  /* 字体 */
  --font-serif: "Noto Serif SC", "Source Han Serif CN", serif;
  --font-sans: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;

  /* 版心与间距 */
  --width-content:  min(1120px, 92vw);
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;

  /* 动效 */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --duration: 0.4s;
}

/* Reset & 基础 */
*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

/* 页面容器 */
.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* 手机端整体底色：
   - 顶部保持几乎完全透明，让「关于萌创匠盒」上半部分主要透出首屏 3D + 毛玻璃
   - 从中部开始向下渐变到暖色底，一整块贯穿「保持联系」和页脚，形成连续过渡 */
body.mobile-page {
  background:
    radial-gradient(circle at 30% 10%, rgba(255, 255, 255, 0.9), transparent 55%),
    radial-gradient(circle at 70% 90%, rgba(214, 186, 150, 0.22), transparent 60%),
    linear-gradient(to bottom, #faf9f7 0%, #f0e4d6 55%, #e8dac8 100%);
}

/* 手机端：整页底层加一层柔和渐变背景，供毛玻璃模糊使用。
   这样即使 3D 画面在最底部被浏览器优化掉，也不会直接变成纯白。 */
.mobile-page .page::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  /* 上面更亮、下面略深一点，接近首屏背景的暖色渐变 */
  background: radial-gradient(circle at 30% 10%, rgba(255, 255, 255, 0.9), transparent 55%),
              radial-gradient(circle at 70% 90%, rgba(214, 186, 150, 0.22), transparent 60%),
              linear-gradient(to bottom, #faf9f7 0%, #f0e4d6 55%, #e8dac8 100%);
}

main {
  /* 让下面的内容从首屏高度之后开始，从而在滚动时像是盖到首屏之上（桌面端专用） */
  padding-top: 100vh;
  position: relative;
}

/* ========== 顶栏 ========== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0.75rem 0;
  /* 电脑端顶部：再略微加深一点，让玻璃更稳 */
  background: rgba(250, 249, 247, 0.88);
  backdrop-filter: blur(18px) saturate(1.05);
  -webkit-backdrop-filter: blur(18px) saturate(1.05);
  border-bottom: 1px solid transparent;
  transition: border-color var(--duration) var(--ease-out), background var(--duration) var(--ease-out);
}
.site-header.scrolled {
  border-bottom-color: var(--color-border);
}
.header-inner {
  width: var(--width-content);
  max-width: 92vw;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  text-decoration: none;
  color: var(--color-text);
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.02em;
}
.logo-mark {
  height: 60px;
  width: auto;
  display: block;
}
.logo:hover { color: var(--color-accent); }
.nav {
  display: flex;
  gap: var(--space-lg);
}
.nav a {
  color: var(--color-text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color var(--duration) var(--ease-out);
}
.nav a:hover { color: var(--color-accent); }

/* 移动端导航开关（仅 mobile.html 使用） */
.mobile-page .nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 32px;
  height: 32px;
  margin-left: auto;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
}
.mobile-page .nav-toggle-line {
  display: block;
  width: 18px;
  height: 2px;
  margin: 3px 0;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform var(--duration) var(--ease-out), opacity var(--duration) var(--ease-out);
}
.mobile-page .nav-mobile {
  /* 抽屉固定在头部下方，永远盖在正文之上，但不盖住顶栏 */
  position: fixed;
  left: 0;
  right: 0;
  top: 56px; /* 与 .site-header 高度对齐 */
  padding: 0.75rem var(--space-md) 1rem;
  /* 抽屉：0.95 不透明度的磨砂玻璃，基本视作实心，仅留极轻微透感 */
  background: rgba(250, 249, 247, 0.95);
  backdrop-filter: blur(32px) saturate(1.03);
  -webkit-backdrop-filter: blur(32px) saturate(1.03);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  /* 四个角都做圆角，顶部与底部都更柔和 */
  border-radius: 14px;
  /* 默认收起状态：轻微上移 + 透明 + 不可点击 */
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
  transition:
    opacity var(--duration) var(--ease-out),
    transform var(--duration) var(--ease-out);
  z-index: 90; /* 低于 header(100)，高于下面内容 */
}
.mobile-page .nav-mobile a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 1rem;
  font-weight: 500;
}
.mobile-page.nav-open .nav-mobile {
  /* 展开时：向下滑入并淡入，同时恢复点击 */
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.mobile-page.nav-open .nav-toggle-line:nth-child(1) {
  transform: translateY(5px) rotate(45deg);
}
.mobile-page.nav-open .nav-toggle-line:nth-child(2) {
  transform: translateY(-5px) rotate(-45deg);
}
.mobile-page .nav-text {
  flex: 1 1 auto;
}
.mobile-page .nav-icon {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  object-fit: contain;
}

/* 联系菜单项的邮箱图标稍微放大一些，并略向右一点 */
.mobile-page .nav-link-contact .nav-icon {
  width: 22px;
  height: 22px;
  margin-left: 9px;
}

/* 移动端：取消系统默认的蓝色直角点击反馈（保持点击但不显示高亮框） */
.mobile-page .logo,
.mobile-page .nav-toggle,
.mobile-page .nav-mobile a,
.mobile-page .contact-links-mobile .contact-link {
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

/* ========== Hero 首屏 ========== */
.hero {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 100vh;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: calc(80px + var(--space-2xl)) var(--space-md) var(--space-2xl);
  overflow: hidden;
  z-index: 0;
}

.hero.hero-hidden {
  opacity: 0;
  pointer-events: none;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #faf7f2 0%, #f3ece2 100%);
  z-index: 0;
}
.hero-3d-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* 手机端首屏 3D 背景（独立 JS：hero-bg-mobile.js） */
.hero-3d-mobile {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.hero-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 720px;
}

/* 移动端首屏：整块区域一层超透明毛玻璃，3D 在其下方，文案和按钮在其上方 */
.mobile-page .hero {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  height: 100vh;
  min-height: 100vh;
  z-index: 0;
  background: var(--color-bg-hero);
  overflow: visible;
}
.mobile-page .hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  /* 再更透一些：3D 颜色和弧度更清楚，仍保留轻微柔化 */
  background: rgba(250, 249, 247, 0.26);
  backdrop-filter: blur(9px) saturate(1.02);
  -webkit-backdrop-filter: blur(9px) saturate(1.02);
}
/* 文案和按钮层级再抬一层，浮在整块毛玻璃之上 */
.mobile-page .hero-inner {
  position: relative;
  z-index: 2;
  max-width: 720px;
  margin: 0 auto;
}
.hero-label {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin: 0 0 var(--space-sm);
  opacity: 0;
  animation: fadeUp 0.8s var(--ease-out) 0.2s forwards;
}
.hero-title {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  line-height: 1.15;
  letter-spacing: 0.02em;
  margin: 0 0 var(--space-md);
  opacity: 0;
  animation: fadeUp 0.8s var(--ease-out) 0.35s forwards;
}
.hero-tagline {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: var(--color-text-muted);
  font-weight: 400;
  margin: 0 0 var(--space-xl);
  opacity: 0;
  animation: fadeUp 0.8s var(--ease-out) 0.5s forwards;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  justify-content: center;
  opacity: 0;
  animation: fadeUp 0.8s var(--ease-out) 0.65s forwards;
}
.btn {
  display: inline-block;
  padding: 0.85rem 1.6rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: 6px;
  transition: background var(--duration) var(--ease-out), color var(--duration) var(--ease-out), transform 0.2s var(--ease-out);
}
.btn-primary {
  background: var(--color-accent);
  color: #fff;
  border: none;
}
.btn-primary:hover {
  background: var(--color-accent-light);
  transform: translateY(-1px);
}
.btn-ghost {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border);
}
.btn-ghost:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}
.hero-scroll {
  position: absolute;
  bottom: var(--space-lg);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  font-size: 0.75rem;
  color: var(--color-text-muted);
  letter-spacing: 0.1em;
  opacity: 0;
  animation: fadeUp 0.8s var(--ease-out) 1s forwards;
}
.scroll-icon {
  width: 20px;
  height: 32px;
  border: 2px solid var(--color-border);
  border-radius: 12px;
  position: relative;
}
.scroll-icon::after {
  content: "";
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 6px;
  background: var(--color-accent);
  border-radius: 2px;
  animation: scrollDot 2s ease-in-out infinite;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes scrollDot {
  0%, 100% { opacity: 0.3; transform: translateX(-50%) translateY(0); }
  50%      { opacity: 1; transform: translateX(-50%) translateY(6px); }
}

/* ========== 通用区块 ========== */
.section {
  padding: var(--space-2xl) var(--space-md);
  position: relative;
  z-index: 1; /* 确保内容区块在固定首屏之上滑过 */
}
.section-inner {
  width: var(--width-content);
  max-width: 92vw;
  margin: 0 auto;
}
.section-title {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  letter-spacing: 0.02em;
  margin: 0 0 var(--space-md);
  color: var(--color-text);
}
.section-desc {
  color: var(--color-text-muted);
  margin: 0 0 var(--space-xl);
  max-width: 560px;
}

/* 电脑端：关于 / 项目 / 联系 合并为一块毛玻璃背景，内部分区保持原有间距 */
.desktop-main-glass {
  margin-top: var(--space-2xl);
  margin-bottom: 0; /* 底部紧贴页脚，避免中间漏出裸露的 3D 区域 */
  padding: 0 var(--space-md) var(--space-2xl);
  /* 主内容大块玻璃：透明度略提高，和底部页脚更协调 */
  background: rgba(250, 249, 247, 0.7);
  backdrop-filter: blur(16px) saturate(1.1);
  -webkit-backdrop-filter: blur(16px) saturate(1.1);
  border-radius: 24px;
}

/* 合并玻璃容器内部：去掉各自的纯色背景，让玻璃真正露出来（仅桌面端） */
.desktop-main-glass .about,
.desktop-main-glass .projects,
.desktop-main-glass .contact {
  background: transparent;
}

/* 电脑端页脚：单独一块毛玻璃，盖住底部 3D，避免“漏光” */
.site-footer {
  position: relative;
  z-index: 2;
  margin-top: var(--space-2xl);
  padding: var(--space-xl) var(--space-md);
  /* 底部版权玻璃：比顶部稍微更“实”一点，压住底部 3D */
  background: rgba(250, 249, 247, 0.9);
  backdrop-filter: blur(18px) saturate(1.05);
  -webkit-backdrop-filter: blur(18px) saturate(1.05);
  border-top: 1px solid var(--color-border);
}


/* ========== 关于 ========== */
.about { background: #fff; }
.about-content { max-width: 640px; }
.about-lead {
  font-size: 1.15rem;
  line-height: 1.75;
  color: var(--color-text);
  margin: 0 0 var(--space-md);
}
.about-body {
  color: var(--color-text-muted);
  margin: 0;
}

/* ========== 项目网格 ========== */
.projects { background: var(--color-bg); }

/* 项目走马灯容器 */
.project-marquee {
  position: relative;
  overflow: hidden;
}
.project-marquee-track {
  display: flex;
  gap: var(--space-lg);
  will-change: transform;
}

.project-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-lg);
}

/* 横向滚动专用样式 */
.project-grid--marquee {
  display: flex;
  flex-wrap: nowrap;
  gap: var(--space-lg);
  min-width: max-content;
}
.project-grid--marquee .project-card {
  flex: 0 0 320px;
  opacity: 1;
  animation: none;
}
.project-card {
  --delay: 0;
  opacity: 0;
  animation: fadeUp 0.6s var(--ease-out) calc(0.1s * var(--delay)) forwards;
}
.project-card-inner {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: var(--space-lg);
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: border-color var(--duration) var(--ease-out), box-shadow var(--duration) var(--ease-out);
}
.project-card-inner:hover {
  border-color: var(--color-accent-light);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.06);
}
.project-card-label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--color-accent);
  margin-bottom: var(--space-sm);
}
.project-card-title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.35rem;
  margin: 0 0 var(--space-xs);
  color: var(--color-text);
}
.project-card-desc {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  margin: 0 0 var(--space-md);
  flex: 1;
}
.project-card-link {
  font-weight: 500;
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--duration) var(--ease-out), gap var(--duration) var(--ease-out);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.project-card-link:hover { color: var(--color-accent-light); }

/* ========== 联系 ========== */
.contact { background: #fff; }
.contact-layout {
  display: flex;
  align-items: stretch;
  gap: var(--space-xl);
}
.contact-text {
  flex: 1 1 auto;
}
.contact-illustration {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}
.contact-mail-icon {
  height: 140px; /* 大致覆盖 GitHub 到最后一行邮箱的高度 */
  width: auto;
  opacity: 0.95;
}
.contact-lead {
  color: var(--color-text-muted);
  margin: 0 0 var(--space-lg);
  max-width: 480px;
}
.contact-links {
  display: flex;
  flex-direction: column;
  gap: 0;
  align-items: flex-start; /* 链接宽度只跟随文字，不拉满整行 */
}
.contact-link {
  display: inline-block;
  font-weight: 500;
  color: var(--color-accent);
  text-decoration: none;
  padding: 0.35rem 0;
  border-bottom: 1px solid transparent;
  transition: border-color var(--duration) var(--ease-out);
}
.contact-link:hover { border-bottom-color: var(--color-accent); }

/* ========== 页脚 ========== */
.site-footer {
  margin-top: auto;
  padding: var(--space-xl) var(--space-md);
  background: var(--color-bg-hero);
  border-top: 1px solid var(--color-border);
}
.footer-inner {
  width: var(--width-content);
  max-width: 92vw;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  text-align: center;
}
.footer-logo {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--color-text);
  text-decoration: none;
}
.footer-logo:hover { color: var(--color-accent); }
.footer-copy {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin: 0;
}

/* ========== 响应式 ========== */
/* 移动端：顶部 header 与底部 footer 都使用毛玻璃质感 */
/* 顶部头 = header.site-header（logo + 菜单图标） */
/* 底部脚 = footer.site-footer（萌创匠盒 © 2026） */
.mobile-page .site-header,
.mobile-page .site-footer {
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}
.mobile-page .site-header {
  background: rgba(255, 255, 255, 0.18) !important;
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
}
/* 移动端页脚：去掉自身背景，直接透出 body 的整体渐变，保证和「保持联系」一整块连贯 */
.mobile-page .site-footer {
  background: rgba(250, 249, 247, 0.45) !important;
  backdrop-filter: blur(16px) saturate(1.1);
  -webkit-backdrop-filter: blur(16px) saturate(1.1);
}

/* 移动端关于 + 保持联系：同一块 section.about 上做一次毛玻璃，避免中间分界线 */
.mobile-page .about {
  background: rgba(250, 249, 247, 0.62) !important;
  backdrop-filter: blur(16px) saturate(1.1);
  -webkit-backdrop-filter: blur(16px) saturate(1.1);
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

/* 合并块内部：让保持联系与关于之间有自然间距，但不再创建新的毛玻璃边界 */
.mobile-page .about-contact .contact-inner-mobile {
  margin-top: var(--space-2xl);
}

/* 移动端与桌面端一致：首屏固定，向上滑动时下方内容叠在首屏之上，而不是把首屏推上去 */
.mobile-page main {
  padding-top: 100vh; /* 与桌面端一致，留出首屏高度，内容从第二屏开始排布 */
  /*
   * main 在 DOM 中位于固定首屏 hero 之后，padding-top 会在视觉上「空出」首屏，
   * 但整块 main 仍参与命中测试，透明区域会挡住 hero 上的按钮点击。
   * 让 main 不接收事件，事件落到下层 hero；各区块与子叠层再单独恢复可点。
   */
  pointer-events: none;
}
.mobile-page main > * {
  pointer-events: auto;
}
.mobile-page .hero {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  height: 100vh;
  min-height: 100vh;
  z-index: 0;
  background: var(--color-bg-hero);
  overflow: visible;
}
.mobile-page .hero-inner {
  max-width: 640px;
}
.mobile-page .hero-scroll {
  display: none;
}

/* 移动端项目叠层卡片 */
.mobile-page .projects-overlay {
  position: fixed;
  inset: 0;
  /* 顶部保留内边距给标题，其余方向铺满到手机边缘 */
  padding: 80px 0 0;
  /* 默认退化为暖色渐变背景（兼容不支持 backdrop-filter 的浏览器） */
  background: linear-gradient(to bottom, #faf7f2 0%, #f0e2cf 60%, #e7d3bd 100%);
  display: none;
  align-items: center;
  justify-content: flex-start;
  z-index: 90;
  touch-action: pan-y;
}
.mobile-page.projects-open .projects-overlay {
  display: flex;
}
.mobile-page.projects-open .hero {
  display: none;
}
.mobile-page .projects-overlay-inner {
  width: 100%;
  max-width: none;
  padding: 0; /* 叠层容器左右、底部贴到屏幕边缘 */
  min-height: calc(100vh - 80px); /* 从标题下方一直铺到屏幕底部 */
  display: flex;
  flex-direction: column;
}
.projects-overlay-header {
  text-align: center;
  margin-bottom: var(--space-md);
}
.projects-overlay-title {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.4rem;
  margin: 0;
}

/* 浏览器支持 backdrop-filter 时，为项目页启用整页毛玻璃背景 */
@supports ((backdrop-filter: blur(10px)) or (-webkit-backdrop-filter: blur(10px))) {
  .mobile-page .projects-overlay {
    background: rgba(250, 249, 247, 0.82);
    backdrop-filter: blur(26px) saturate(1.05);
    -webkit-backdrop-filter: blur(26px) saturate(1.05);
  }
}
.project-stack {
  position: relative;
  height: 260px;        /* 固定一个适中的高度，保持 3D 堆叠稳定 */
  overflow: hidden;
  perspective: 1400px;
  width: 100%;              /* 容器宽度铺满 */
  padding: 0 var(--space-md); /* 给所有卡片左右都留出一点内边距，避免贴边 */
  display: flex;
  justify-content: center;  /* 但内部卡片保持居中宽度，不跟着拉伸 */
  align-items: center;
}

/* 覆盖移动端叠层中的卡片尺寸，让它更接近横向长方形，但不要跟着容器一起拉高 */
.mobile-page .project-stack .project-card-inner {
  height: auto;              /* 卡片按照内容本身高度，不撑满整个 stack */
  max-width: 420px;          /* 横向长方形宽度，接近桌面端卡片 */
  margin: 0 auto;            /* 在宽容器中水平居中 */
  padding-top: 1.1rem;
  padding-bottom: 1.1rem;
}

/* 叠在后面的几张卡片：只露出顶部的一小条，下面内容裁掉，效果跟专业版一样 */
.mobile-page .project-stack .project-card-inner.is-back {
  max-height: 52px;
  overflow: hidden;
  padding-top: 0.6rem;
  padding-bottom: 0.4rem;
}

/* 下面的项目说明文字区域（手机端） */
.mobile-page .project-description {
  padding: var(--space-md) var(--space-md) var(--space-md);
}
.mobile-page .project-description-inner {
  max-width: 420px;
  margin: 0 auto;
  opacity: 0;
  transition: opacity 0.35s var(--ease-out);
}
.mobile-page .project-description-inner.is-visible {
  opacity: 1;
}
.mobile-page .project-description-title {
  font-weight: 700;
  font-size: 1.05rem;
  margin: 0 0 0.6rem;
}
.mobile-page .project-description-text {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--color-text-muted);
  white-space: pre-line; /* 按你写的分段换行 */
}
.project-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform-origin: center center;
  will-change: transform, opacity;
  transition:
    opacity 0.45s var(--ease-out),
    transform 0.45s var(--ease-out),
    box-shadow 0.45s var(--ease-out);
}

@media (max-width: 640px) {
  .nav { gap: var(--space-md); }
  .hero-cta { flex-direction: column; }
  .btn { width: 100%; max-width: 280px; text-align: center; }
  .project-grid { grid-template-columns: 1fr; }
  .project-marquee-track { animation: none; }
  .project-grid--marquee {
    flex-direction: column;
    min-width: auto;
  }
  .contact-layout {
    flex-direction: column;
    align-items: flex-start;
  }
  .contact-illustration {
    justify-content: flex-start;
  }
  .contact-mail-icon {
    height: 100px;
  }
}
