/* 确保在所有桌面尺寸下sidebar使用fixed定位 */
@media (min-width: 769px) {
  .sidebar {
    position: fixed !important;
    left: 40px !important;
    top: 50vh !important;
    transform: translateY(-50%) !important;
    z-index: 1001 !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    width: auto !important;
    height: auto !important;
    flex-direction: column !important;
  }

  .sidebar.show {
    display: flex !important;
  }
}

/* 移动端 */
@media (max-width: 768px) {
  /* 移动端 Portfolio 四个项目整体稍微靠近顶部 */
  .portfolio-page.active .portfolio-grid {
    margin-top: 20px !important;
  }
  .project-detail-content {
    padding: 20px 20px 40px;
    max-width: 100%;
  }
  .project-hero-title {
    margin-bottom: 8px;
  }
}

/* 移动端优化 - 确保稳定性 */
@media (max-width: 768px) {
  .about-contact-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .about-contact-card {
    padding: 32px 24px;
    border-radius: 16px;
  }

  .contact-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    margin-bottom: 20px;
  }

  .about-contact-card:hover {
    transform: translateY(-2px);
  }

  .about-contact h3 {
    font-size: 24px;
    margin-bottom: 40px;
  }
}

/* 移动端优化 */
@media (max-width: 768px) {
  /* ========== 全局重置 ========== */
  * {
    box-sizing: border-box;
  }

  body {
    overflow-x: hidden; /* 防止横向滚动 */
  }

  /* ========== 强制隐藏桌面专属元素 ========== */
  .sidebar {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }

  .project-spline-text {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }

  /* ========== 作品集页面头部精简 ========== */
  .header {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 20px 24px;
    height: 120px;
    backdrop-filter: blur(25px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(0, 0, 0, 0.98);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  .logo {
    margin-bottom: 15px;
    margin-right: auto;
  }

  .logo h1 {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.5px;
  }

  .subtitle {
    font-size: 9px;
    letter-spacing: 2px;
    opacity: 0.5;
    margin-top: 2px;
  }

  /* ========== 导航过滤器精简 ========== */
  .nav-filters {
    gap: 32px;
    justify-content: center;
  }

  .filter-btn {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.2px;
    padding: 10px 0;
    opacity: 0.5;
    transition: all 0.3s ease;
  }

  .filter-btn.active {
    opacity: 1;
  }

  .filter-btn::after {
    height: 1px;
    background: rgba(255, 255, 255, 0.9);
  }

  /* ========== 主内容区域精简 ========== */
  .main-content {
    margin-left: 0;
    margin-top: 0;
    padding: 24px 24px 60px;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
  }

  /* ========== 项目网格精致化重新设计 ========== */
  .work-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    max-width: 400px;
    margin: 24px auto 0;
    padding: 0;
  }

  .project-card {
    background: linear-gradient(
      135deg,
      rgba(15, 15, 15, 0.95) 0%,
      rgba(8, 8, 8, 0.98) 100%
    );
    backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2), 0 4px 16px rgba(0, 0, 0, 0.1),
      inset 0 1px 0 rgba(255, 255, 255, 0.05);
    position: relative;
    cursor: pointer;
    /* 手机端点击优化 */
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    user-select: none;
  }

  .project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(
      90deg,
      transparent,
      rgba(255, 255, 255, 0.2),
      transparent
    );
    opacity: 0;
    transition: opacity 0.3s ease;
  }

  .project-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(
      90deg,
      transparent,
      rgba(255, 255, 255, 0.1),
      transparent
    );
    opacity: 0;
    transition: opacity 0.3s ease;
  }

  .project-card:active {
    transform: translateY(-1px) scale(0.995);
    background: linear-gradient(
      135deg,
      rgba(12, 12, 12, 0.98) 0%,
      rgba(6, 6, 6, 1) 100%
    );
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25), 0 3px 10px rgba(0, 0, 0, 0.12),
      inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transition: all 0.1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  }

  .project-card:hover {
    transform: translateY(-2px);
    background: linear-gradient(
      135deg,
      rgba(18, 18, 18, 0.98) 0%,
      rgba(10, 10, 10, 1) 100%
    );
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.28), 0 7px 20px rgba(0, 0, 0, 0.12),
      inset 0 1px 0 rgba(255, 255, 255, 0.1);
  }

  .project-card:hover::before,
  .project-card:hover::after {
    opacity: 1;
  }

  .project-image {
    height: 240px;
    margin: 0;
    border-radius: 0;
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, #000 0%, #111 100%);
  }

  .project-video,
  .project-card-video,
  .project-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  }

  .project-card:hover .project-video,
  .project-card:hover .project-card-video,
  .project-card:hover .project-card-image {
    transform: scale(1.01);
  }

  .project-info {
    padding: 26px 26px 30px;
    gap: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: relative;
  }

  .project-title {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.6px;
    line-height: 1.15;
    color: #fff;
    margin: 0 0 16px 0;
    width: 100%;
  }

  .project-meta {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-top: 0;
  }

  .project-category {
    font-size: 9px;
    opacity: 0.65;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    background: none;
    padding: 8px 0;
    border: none;
    border-radius: 0;
    width: 100%;
    text-align: center;
    line-height: 1.1;
    word-wrap: break-word;
    white-space: normal;
    display: block;
    position: relative;
  }

  .project-category::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 1px;
    background: rgba(255, 255, 255, 0.4);
  }

  .project-year {
    font-size: 20px;
    font-weight: 900;
    opacity: 1;
    color: #fff;
    background: none;
    padding: 12px 0;
    border: none;
    border-radius: 0;
    text-align: center;
    width: 100%;
    letter-spacing: 0.5px;
    position: relative;
  }

  .project-year::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 32px;
    height: 1px;
    background: rgba(255, 255, 255, 0.6);
  }

  /* ========== About页面精简 ========== */
  .about-section {
    padding: 24px 24px;
    max-width: 100%;
    overflow-x: hidden;
  }

  .about-content h2 {
    font-size: clamp(28px, 7vw, 40px);
    margin-bottom: 24px;
    text-align: center;
    line-height: 1.1;
    font-weight: 700;
  }

  .about-intro {
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 48px;
  }

  .about-intro .intro-text p {
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 16px;
    opacity: 0.8;
    text-align: center;
  }

  .about-intro .intro-highlight {
    padding: 20px;
    border-radius: 12px;
    margin: 0 auto;
    max-width: 320px;
    text-align: center;
  }

  .intro-highlight h3 {
    font-size: 16px;
    margin-bottom: 12px;
  }

  .intro-highlight .highlight-text {
    font-size: 12px;
    line-height: 1.5;
  }

  /* ========== 技能部分精简 ========== */
  .skills {
    margin-bottom: 48px;
  }

  .skills h3 {
    font-size: 20px;
    margin-bottom: 24px;
    text-align: center;
  }

  .skills-container {
    grid-template-columns: 1fr;
    gap: 20px;
    max-width: 360px;
    margin: 0 auto;
  }

  .skill-category {
    padding: 20px;
    border-radius: 12px;
    background: rgba(12, 12, 12, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(10px);
  }

  .skill-category h4 {
    font-size: 15px;
    margin-bottom: 16px;
    text-align: center;
    color: #fff;
  }

  .skill-category ul {
    list-style: none;
    padding: 0;
    margin: 0;
  }

  .skill-category li {
    font-size: 11px;
    padding: 10px 12px;
    margin-bottom: 6px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    text-align: center;
    opacity: 0.8;
  }

  .skill-category li::before {
    display: none;
  }

  /* ========== 联系部分精简 ========== */
  .about-contact {
    padding-top: 48px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }

  .about-contact h3 {
    font-size: 20px;
    margin-bottom: 24px;
    text-align: center;
  }

  .about-contact-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    max-width: 340px;
    margin: 0 auto;
  }

  .about-contact-card {
    padding: 20px 16px;
    border-radius: 12px;
    background: rgba(12, 12, 12, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(10px);
    text-align: center;
  }

  .contact-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    margin: 0 auto 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
  }

  .about-contact-label {
    font-size: 9px;
    letter-spacing: 1.2px;
    margin-bottom: 6px;
    opacity: 0.6;
  }

  .about-contact-value {
    font-size: 12px;
    line-height: 1.3;
  }

  /* ========== 项目详情页面优化 - 减少更多间距 ========== */
  .project-detail-content {
    padding: 50px 20px 32px;
    max-width: 100%;
  }

  .project-detail-header {
    padding: 14px 20px;
    backdrop-filter: blur(25px);
    background: rgba(0, 0, 0, 0.98);
    height: 60px;
    position: sticky;
    top: 0;
  }

  /* 确保移动端项目详情页面只有一个滚动条 */
  .project-detail-page {
    overflow-y: auto;
    overflow-x: hidden;
    height: 100vh;
    position: fixed;
  }

  body:has(.project-detail-page.active) {
    overflow: hidden;
    position: fixed;
    width: 100%;
  }

  .project-back-btn {
    width: 32px;
    height: 32px;
    font-size: 16px;
  }

  /* 项目英雄区域更紧凑 */
  .project-hero {
    margin-bottom: 40px;
  }

  .project-hero-title {
    font-size: clamp(24px, 6vw, 36px);
    margin-bottom: 12px;
    text-align: center;
    line-height: 1.1;
    font-weight: 700;
  }

  .project-hero-meta {
    grid-template-columns: 1fr;
    gap: 16px;
    text-align: center;
  }

  .project-hero-category {
    text-align: center;
    margin-bottom: 8px;
    font-size: 10px;
    opacity: 0.6;
  }

  .project-hero-description {
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 20px;
    text-align: center;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0.8;
  }

  .project-hero-details {
    grid-template-columns: 1fr;
    gap: 10px;
    max-width: 260px;
    margin: 0 auto;
    text-align: center;
  }

  .project-detail-item {
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }

  .project-detail-label {
    font-size: 9px;
    margin-bottom: 3px;
    opacity: 0.5;
  }

  .project-detail-value {
    font-size: 11px;
    font-weight: 500;
  }

  .project-hero-year {
    font-size: 28px;
    text-align: center;
    margin-top: 12px;
    opacity: 0.1;
  }

  /* 导航按钮精简 */
  .project-detail-nav {
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
  }

  .project-nav-btn {
    font-size: 10px;
    padding: 8px 0;
    min-width: 70px;
    text-align: center;
    font-weight: 600;
  }

  /* 内容区域标题更紧凑 */
  .project-section-title {
    font-size: 18px;
    margin-bottom: 16px;
    text-align: center;
    font-weight: 600;
  }

  /* ========== 图片画廊大幅优化 - 更紧凑 ========== */
  .project-image-gallery {
    gap: 12px; /* 从16px进一步减少到12px */
    margin-bottom: 20px; /* 从24px减少到20px */
  }

  .project-image-large {
    height: 200px; /* 从220px减少到200px */
    border-radius: 6px; /* 从8px减少到6px */
  }

  .project-image-medium {
    height: 160px; /* 从180px减少到160px */
    border-radius: 6px; /* 从8px减少到6px */
  }

  .project-detail-image,
  .project-detail-video,
  .project-detail-iframe {
    border-radius: 6px;
  }

  /* ========== 文字内容更紧凑 ========== */
  .project-text-content {
    text-align: center;
    max-width: 340px;
    margin: 0 auto;
  }

  .project-text-content p {
    font-size: 12px;
    line-height: 1.5;
    margin-bottom: 12px; /* 从16px减少到12px */
    opacity: 0.8;
  }

  .project-text-content h3 {
    font-size: 15px;
    margin: 20px 0 10px; /* 进一步减少边距 */
    text-align: center;
    font-weight: 600;
  }

  /* ========== 内容区域间距大幅优化 ========== */
  .project-content-section {
    padding: 0 8px;
    margin-bottom: 24px; /* 从32px减少到24px */
  }

  /* ========== 项目导航更紧凑 ========== */
  .project-navigation {
    flex-direction: column;
    gap: 10px;
    text-align: center;
    margin-top: 24px; /* 从32px减少到24px */
    padding-top: 20px; /* 从24px减少到20px */
  }

  .project-nav-link {
    font-size: 11px;
    justify-content: center;
    padding: 8px 0;
  }

  /* ========== 联系覆盖层精简 ========== */
  .contact-section {
    padding: 30px 0 20px;
    height: auto;
    max-height: 65vh;
  }

  .contact-content {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 0 20px;
    text-align: center;
  }

  .contact-left h2 {
    font-size: clamp(20px, 5vw, 26px);
    margin-bottom: 12px;
  }

  .contact-description {
    font-size: 12px;
    line-height: 1.4;
    margin-bottom: 16px;
    max-width: 260px;
    margin-left: auto;
    margin-right: auto;
  }

  .contact-right {
    gap: 8px;
  }

  .contact-close {
    right: 20px;
    top: 12px;
    width: 36px;
    height: 36px;
    font-size: 20px;
    z-index: 1600;
  }

  .contact-item {
    padding: 8px 0;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .contact-label {
    font-size: 10px;
    margin-bottom: 4px;
  }

  .contact-value {
    font-size: 13px;
  }

  /* ========== 优化触摸交互 ========== */
  .project-card:active {
    transform: translateY(-2px) scale(0.99);
  }

  .filter-btn:active {
    transform: scale(0.95);
  }

  /* ========== 移除不必要的动画 ========== */
  .project-card {
    animation: none;
    opacity: 1;
    transform: none;
  }

  /* ========== 确保视频正确显示 ========== */
  .project-video,
  .project-card-video,
  .project-detail-video {
    object-fit: cover;
    width: 100%;
    height: 100%;
  }

  /* ========== 占位符优化 ========== */
  .project-image-placeholder {
    font-size: 12px;
    border-radius: 0;
    background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
  }
}

/* 优化移动端滚动条 */
@media (max-width: 768px) {
  ::-webkit-scrollbar {
    width: 3px;
  }

  ::-webkit-scrollbar-track {
    background: transparent;
  }

  ::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
  }

  /* 移动端项目详情页面的滚动条样式 */
  .project-detail-page::-webkit-scrollbar {
    width: 3px;
  }

  .project-detail-page::-webkit-scrollbar-track {
    background: transparent;
  }

  .project-detail-page::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
  }
}

@media (max-width: 768px) {
  .work-grid {
    padding-top: 12px;
  }
  .about-section {
    padding-top: 24px;
  }
  .project-image-large,
  .project-image-medium {
    height: auto !important;
    aspect-ratio: 16/9;
    max-width: 100%;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    margin-bottom: 0 !important;
  }
  .project-detail-video,
  .project-detail-iframe {
    width: 100% !important;
    height: 100% !important;
    max-width: 100vw;
    max-height: 40vw;
    aspect-ratio: 16/9;
    object-fit: contain !important;
    display: block;
    margin: 0 auto;
    background: #000;
    border-radius: 6px;
  }
  .project-section-title {
    margin-bottom: 4px !important;
  }
  .project-image-gallery {
    gap: 4px !important;
    margin-bottom: 4px !important;
  }
  .project-image-item {
    margin-bottom: 0 !important;
  }

  /* ========== 项目网格优化 (中等屏幕) ========== */
  .work-grid {
    grid-template-columns: 1fr;
    gap: 36px;
    padding-top: 24px;
    max-width: 390px;
    margin: 0 auto;
  }

  .project-card {
    background: linear-gradient(
      135deg,
      rgba(15, 15, 15, 0.92) 0%,
      rgba(8, 8, 8, 0.96) 100%
    );
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 18px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 6px 28px rgba(0, 0, 0, 0.18), 0 3px 12px rgba(0, 0, 0, 0.08),
      inset 0 1px 0 rgba(255, 255, 255, 0.04);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    user-select: none;
  }

  .project-card:active {
    transform: translateY(-2px) scale(0.98);
    background: linear-gradient(
      135deg,
      rgba(12, 12, 12, 0.96) 0%,
      rgba(6, 6, 6, 0.98) 100%
    );
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.22), 0 2px 8px rgba(0, 0, 0, 0.1),
      inset 0 1px 0 rgba(255, 255, 255, 0.06);
    transition: all 0.1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  }

  .project-card:hover {
    transform: translateY(-2px);
    background: linear-gradient(
      135deg,
      rgba(18, 18, 18, 0.96) 0%,
      rgba(10, 10, 10, 0.98) 100%
    );
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.22), 0 5px 18px rgba(0, 0, 0, 0.1),
      inset 0 1px 0 rgba(255, 255, 255, 0.08);
  }

  .project-image {
    height: 220px;
    margin: 0;
    border-radius: 0;
    overflow: hidden;
    background: linear-gradient(135deg, #000 0%, #111 100%);
  }

  .project-info {
    padding: 24px 24px 28px;
    gap: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }

  .project-title {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.5px;
    line-height: 1.15;
    margin: 0 0 14px 0;
    width: 100%;
  }

  .project-meta {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    margin-top: 0;
  }

  .project-category {
    font-size: 9px;
    opacity: 0.65;
    letter-spacing: 1.1px;
    text-transform: uppercase;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    background: none;
    padding: 7px 0;
    border: none;
    border-radius: 0;
    width: 100%;
    text-align: center;
    line-height: 1.1;
    word-wrap: break-word;
    white-space: normal;
    display: block;
    position: relative;
  }

  .project-category::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 22px;
    height: 1px;
    background: rgba(255, 255, 255, 0.4);
  }

  .project-year {
    font-size: 18px;
    font-weight: 900;
    opacity: 1;
    color: #fff;
    background: none;
    padding: 10px 0;
    border: none;
    border-radius: 0;
    text-align: center;
    width: 100%;
    letter-spacing: 0.4px;
    position: relative;
  }

  .project-year::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 28px;
    height: 1px;
    background: rgba(255, 255, 255, 0.6);
  }

  /* ========== About页面优化 ========== */
  .about-section {
    padding: 16px 0;
    max-width: 100%;
  }

  .about-content h2 {
    font-size: 28px;
    margin-bottom: 24px;
    text-align: center;
  }

  .about-content p {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 32px;
    opacity: 0.7;
  }

  .skills {
    margin-bottom: 48px;
  }

  .skills h3 {
    font-size: 18px;
    margin-bottom: 20px;
    text-align: center;
  }

  .skills ul {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .skills li {
    font-size: 13px;
    padding: 14px 16px;
    background: rgba(20, 20, 20, 0.6);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: none;
    text-align: center;
  }

  .about-contact h3 {
    font-size: 20px;
    margin-bottom: 24px;
    text-align: center;
  }

  .about-contact-info {
    gap: 16px;
  }

  .about-contact-item {
    padding: 16px 0;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }

  .about-contact-label {
    font-size: 10px;
    margin-bottom: 8px;
  }

  .about-contact-value {
    font-size: 14px;
  }

  /* ========== 项目详情页优化 ========== */
  .project-detail-content {
    padding: 40px 20px 40px;
    max-width: 100%;
  }

  .project-hero-title {
    font-size: clamp(32px, 8vw, 48px);
    margin-bottom: 16px;
    text-align: center;
  }

  .project-hero-meta {
    grid-template-columns: 1fr;
    gap: 32px;
    text-align: center;
  }

  .project-hero-category {
    text-align: center;
    margin-bottom: 20px;
  }

  .project-hero-description {
    font-size: 15px;
    line-height: 1.5;
    margin-bottom: 32px;
    text-align: center;
  }

  .project-hero-details {
    grid-template-columns: 1fr;
    gap: 20px;
    max-width: 300px;
    margin: 0 auto;
  }

  .project-hero-year {
    font-size: 64px;
    text-align: center;
    margin-top: 24px;
  }

  .project-detail-header {
    padding: 16px 20px;
    backdrop-filter: blur(16px);
  }

  .project-detail-nav {
    gap: 16px;
  }

  .project-nav-btn {
    font-size: 11px;
    padding: 8px 0;
  }

  .project-section-title {
    font-size: 24px;
    margin-bottom: 24px;
    text-align: center;
  }

  .project-image-large {
    height: 280px;
    border-radius: 12px;
  }

  .project-image-medium {
    height: 240px;
    border-radius: 12px;
  }

  .project-image-gallery {
    gap: 20px;
    margin-bottom: 32px;
  }

  .project-text-content {
    text-align: center;
  }

  .project-text-content p {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 24px;
    opacity: 0.7;
  }

  .project-text-content h3 {
    font-size: 18px;
    margin: 32px 0 20px;
    text-align: center;
  }

  .project-detail-video {
    object-fit: contain;
    border-radius: 12px;
  }

  .project-navigation {
    flex-direction: column;
    gap: 20px;
    text-align: center;
    margin-top: 48px;
    padding-top: 32px;
  }

  .project-nav-link {
    font-size: 13px;
    justify-content: center;
  }

  /* ========== 联系页面优化 ========== */
  .contact-section {
    padding: 30px 0 20px;
    height: auto;
    max-height: 65vh;
  }

  .contact-content {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 0 20px;
    text-align: center;
  }

  .contact-left h2 {
    font-size: clamp(20px, 5vw, 26px);
    margin-bottom: 12px;
  }

  .contact-description {
    font-size: 12px;
    line-height: 1.4;
    margin-bottom: 16px;
    max-width: 260px;
    margin-left: auto;
    margin-right: auto;
  }

  .contact-right {
    gap: 8px;
  }

  .contact-close {
    right: 20px;
    top: 12px;
    width: 36px;
    height: 36px;
    font-size: 20px;
    z-index: 1600;
  }

  .contact-item {
    padding: 8px 0;
    text-align: center;
  }

  .contact-label {
    font-size: 10px;
    margin-bottom: 4px;
  }

  .contact-value {
    font-size: 13px;
  }

  /* ========== 内容区域优化 ========== */
  .project-content-section {
    padding: 0 12px;
    margin-bottom: 48px;
  }

  /* 移除不必要的动画延迟，提升流畅度 */
  .project-card {
    animation: none;
    opacity: 1;
    transform: none;
  }

  /* 优化触摸交互 */
  .project-card:active {
    transform: translateY(-2px) scale(0.98);
  }

  .filter-btn:active {
    transform: scale(0.95);
  }

  /* 确保视频在手机端正确显示 */
  .project-video,
  .project-card-video {
    object-fit: cover;
    width: 100%;
    height: 100%;
  }

  /* 优化图片加载占位符 */
  .project-image-placeholder {
    font-size: 14px;
    border-radius: 12px;
  }
}

@media (max-width: 768px) {
  .home-page {
    overflow-y: auto;
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    position: relative;
    background: #000;
  }

  /* 移动端滚动淡入效果CSS类 */
  .fade-in-hidden {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
  }

  .fade-in-visible {
    opacity: 1 !important;
    transform: translateY(0) !important;
  }

  .home-content {
    padding: 0 24px;
    padding-top: 40px; /* 文字内容区域上边距 */
    align-items: flex-start;
    height: auto;
    min-height: 80vh; /* 让文字区域有足够高度 */
    order: 2; /* 文字在球体下方 */
    display: block;
    flex-shrink: 0;
  }

  .home-info {
    gap: 36px;
    padding-bottom: 40px;
  }

  .main-title {
    width: auto;
    max-width: 100%;
    line-height: 0.9;
    margin-bottom: 24px;
    font-size: 48px;
    letter-spacing: -2px;
  }

  .title-description {
    max-width: 100%;
    font-size: 15px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 40px;
  }

  .home-logo {
    margin-bottom: 40px;
  }

  .info-section {
    border-left: none;
    padding-left: 0;
    margin-bottom: 0;
  }

  .info-label {
    margin-bottom: 12px;
    font-size: 11px;
    opacity: 0.4;
    letter-spacing: 1.5px;
    text-transform: uppercase;
  }

  .info-content p {
    font-size: 15px;
    line-height: 1.5;
    margin-bottom: 6px;
    color: #fff;
  }

  .nav-hint {
    position: relative;
    left: auto;
    transform: none;
    bottom: auto;
    margin: 10px auto 30px;
    order: 3; /* 底部提示在最后 */
    width: 100%;
    opacity: 0.5;
    padding-bottom: 20px;
  }

  .scroll-indicator {
    display: none;
  }

  .info-link {
    margin-right: 20px;
    font-size: 15px;
    display: inline-block;
    padding: 6px 0;
    position: relative;
    color: #fff;
    opacity: 0.8;
  }

  .info-link::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 0;
    width: 100%;
    height: 1px;
    background: rgba(255, 255, 255, 0.3);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
  }

  .info-link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
  }

  .spline-container {
    width: 100%;
    height: 80vh; /* 球体占据首屏大部分高度 */
    min-height: 500px;
    position: relative;
    bottom: auto;
    right: auto;
    top: auto;
    left: auto;
    border-radius: 0;
    overflow: visible;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    padding: 0;
    order: 1; /* 球体在最上方 */
    z-index: 0;
    pointer-events: none;
    opacity: 0; /* 初始隐藏 */
    animation: splineFadeIn 1.5s ease-out 0.5s forwards; /* 0.5s延迟后开始淡入，forwards保持结束状态 */
  }

  @keyframes splineFadeIn {
    0% {
      opacity: 0;
      transform: translateY(20px);
    }
    100% {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .spline-container spline-viewer {
    width: 100%;
    height: 100%;
    transform: scale(1); /* 保持原始比例，避免裁剪 */
  }

  .spline-container::after {
    display: none;
  }
}

/* 确保iPad和桌面端Spline文字特效正常显示 */
@media (min-width: 769px) {
  .project-spline-text {
    display: block !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    /* 恢复桌面端的默认样式 */
    position: absolute !important;
    top: 25px !important;
    left: 45% !important;
    transform: translateX(-50%) !important;
    width: 520px !important;
    height: 300px !important;
    z-index: 1 !important;
    transition: all 0.6s ease !important;
    background: transparent !important;
    border-radius: 12px !important;
  }

  .project-spline-text.visible {
    opacity: 1 !important;
    visibility: visible !important;
  }
}

/* 新About页面移动端优化 */
@media (max-width: 768px) {
  /* ========== 新About页面移动端优化 ========== */
  .about-hero {
    min-height: 100vh;
    padding: 0 24px;
    align-items: center;
  }

  .about-hero-content {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

  .about-hero-text {
    order: 2;
  }

  .about-hero-visual {
    order: 1;
    gap: 24px;
  }

  .about-label {
    font-size: 11px;
    letter-spacing: 2px;
    margin-bottom: 16px;
  }

  .about-title {
    font-size: clamp(28px, 8vw, 42px);
    line-height: 1.25;
    letter-spacing: -0.5px;
    margin-bottom: 16px;
    white-space: normal;
    word-break: normal;
    max-width: 100%;
    text-align: center;
  }

  .about-tagline {
    font-size: 16px;
    margin-bottom: 24px;
    line-height: 1.4;
  }

  .about-description p {
    font-size: 14px;
    line-height: 1.6;
    text-align: center;
    max-width: 100%;
  }

  .about-photo-container {
    width: 200px;
    height: 260px;
    border-radius: 16px;
  }

  .about-stats {
    gap: 16px;
    justify-content: center;
    max-width: 280px;
    margin: 0 auto;
  }

  .stat-item {
    padding: 12px 16px;
    min-width: 60px;
    max-width: 80px;
    border-radius: 10px;
  }

  .stat-number {
    font-size: 20px;
    margin-bottom: 3px;
  }

  .stat-label {
    font-size: 9px;
    letter-spacing: 0.8px;
  }

  /* Biography Section Mobile */
  .about-biography {
    padding: 50px 24px;
  }

  .section-heading {
    font-size: clamp(24px, 7vw, 32px);
    margin-bottom: 40px;
    text-align: center;
  }

  .bio-grid {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

  .bio-main {
    order: 1;
  }

  .bio-highlight {
    order: 2;
  }

  .bio-text {
    font-size: 14px;
    text-align: center;
    max-width: 100%;
    margin: 0 auto 18px;
    line-height: 1.6;
  }

  .highlight-card {
    max-width: 100%;
    margin: 0 auto;
    padding: 24px;
    border-radius: 16px;
    text-align: center;
  }

  .highlight-card h3 {
    font-size: 20px;
    margin-bottom: 16px;
  }

  .highlight-card p {
    font-size: 14px;
    margin-bottom: 18px;
    line-height: 1.6;
  }

  /* Expertise Section Mobile */
  .about-expertise {
    padding: 50px 24px;
  }

  .expertise-grid {
    grid-template-columns: 1fr;
    gap: 28px;
    max-width: 100%;
    margin: 0 auto;
  }

  .expertise-category {
    padding: 24px;
    border-radius: 16px;
  }

  .category-header {
    margin-bottom: 24px;
    gap: 14px;
  }

  .category-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
  }

  .category-header h3 {
    font-size: 18px;
  }

  .skill-item {
    padding: 12px 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .skill-item:hover {
    padding-left: 0;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 6px;
  }

  .skill-name {
    font-size: 14px;
    font-weight: 600;
  }

  .skill-tools {
    font-size: 12px;
    opacity: 0.7;
  }

  /* Contact CTA Section Mobile */
  .about-contact-cta {
    padding: 50px 24px;
  }

  .cta-container {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

  .cta-content {
    max-width: 100%;
    margin: 0 auto;
  }

  .cta-content h2 {
    font-size: clamp(24px, 7vw, 32px);
    margin-bottom: 16px;
  }

  .cta-content p {
    font-size: 14px;
    margin-bottom: 24px;
    line-height: 1.6;
    max-width: 100%;
  }

  .cta-actions {
    gap: 16px;
    justify-content: center;
    flex-direction: column;
    align-items: center;
  }

  .cta-button {
    padding: 12px 24px;
    font-size: 14px;
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }

  .cta-button svg {
    width: 16px;
    height: 16px;
  }

  .info-grid {
    max-width: 100%;
    margin: 0 auto;
    gap: 20px;
    grid-template-columns: 1fr;
  }

  .info-item {
    padding: 18px;
    border-radius: 12px;
    text-align: center;
  }

  .info-label {
    font-size: 10px;
    margin-bottom: 6px;
  }

  .info-value {
    font-size: 14px;
  }
}

/* 超小屏幕设备优化 (iPhone SE等) */
@media (max-width: 480px) {
  /* ========== 项目卡片小屏幕优化 ========== */
  .work-grid {
    max-width: 360px;
    gap: 32px;
    margin: 28px auto 0;
  }

  .project-card {
    border-radius: 16px;
  }

  .project-image {
    height: 200px;
  }

  .project-info {
    padding: 22px 22px 26px;
  }

  .project-title {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 12px;
  }

  .project-meta {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-top: 0;
  }

  .project-category {
    font-size: 8px;
    opacity: 0.65;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    background: none;
    padding: 6px 0;
    border: none;
    border-radius: 0;
    width: 100%;
    text-align: center;
    line-height: 1.1;
    word-wrap: break-word;
    white-space: normal;
    display: block;
    position: relative;
  }

  .project-category::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 1px;
    background: rgba(255, 255, 255, 0.4);
  }

  .project-year {
    font-size: 16px;
    font-weight: 900;
    opacity: 1;
    color: #fff;
    background: none;
    padding: 8px 0;
    border: none;
    border-radius: 0;
    text-align: center;
    width: 100%;
    letter-spacing: 0.3px;
    position: relative;
  }

  .project-year::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 1px;
    background: rgba(255, 255, 255, 0.6);
  }

  /* ========== About页面小屏幕优化 ========== */
  .about-hero {
    padding-top: 60px;
    padding-left: 16px;
    padding-right: 16px;
  }

  .about-hero-content {
    gap: 40px;
  }

  .about-title {
    font-size: clamp(28px, 12vw, 42px);
    letter-spacing: -1px;
  }

  .about-tagline {
    font-size: 14px;
    line-height: 1.3;
  }

  .about-description p {
    font-size: 13px;
    line-height: 1.5;
  }

  .about-photo-container {
    width: 180px;
    height: 230px;
    border-radius: 16px;
  }

  .about-stats {
    gap: 12px;
  }

  .stat-item {
    padding: 12px 16px;
    min-width: 60px;
    max-width: 80px;
  }

  .stat-number {
    font-size: 16px;
  }

  .stat-label {
    font-size: 8px;
  }

  .about-biography,
  .about-expertise,
  .about-contact-cta {
    padding: 40px 16px;
  }

  .section-heading {
    font-size: clamp(20px, 8vw, 28px);
    margin-bottom: 32px;
  }

  .bio-text {
    font-size: 13px;
    line-height: 1.5;
  }

  .highlight-card {
    padding: 20px;
  }

  .highlight-card h3 {
    font-size: 16px;
  }

  .highlight-card p {
    font-size: 12px;
  }

  .expertise-category {
    padding: 20px;
  }

  .category-icon {
    width: 32px;
    height: 32px;
  }

  .category-header h3 {
    font-size: 14px;
  }

  .skill-name {
    font-size: 12px;
  }

  .skill-tools {
    font-size: 10px;
  }

  .cta-content h2 {
    font-size: clamp(20px, 8vw, 26px);
  }

  .cta-content p {
    font-size: 13px;
  }

  .cta-button {
    padding: 10px 20px;
    font-size: 13px;
    max-width: 100%;
  }
}

/* 横屏手机优化 */
@media (max-width: 768px) and (orientation: landscape) {
  .about-hero {
    padding-top: 40px;
    min-height: 100vh;
  }

  .about-hero-content {
    gap: 40px;
    align-items: center;
  }

  .about-hero-visual {
    order: 2;
  }

  .about-hero-text {
    order: 1;
  }

  .about-photo-container {
    width: 160px;
    height: 200px;
  }

  .about-stats {
    flex-direction: row;
    gap: 12px;
  }

  .stat-item {
    max-width: 70px;
    padding: 10px 12px;
  }

  .about-biography,
  .about-expertise,
  .about-contact-cta {
    padding: 40px 20px;
  }
}

/* Media Lightbox 移动端优化 */
@media (max-width: 768px) {
  .media-lightbox .lightbox-container {
    padding: 20px 10px 10px;
  }

  .media-lightbox .lightbox-close {
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
  }

  .media-lightbox .lightbox-close svg {
    width: 16px;
    height: 16px;
  }

  .media-lightbox .lightbox-nav {
    width: 40px;
    height: 40px;
  }

  .media-lightbox .lightbox-nav svg {
    width: 20px;
    height: 20px;
  }

  .media-lightbox .lightbox-prev {
    left: 10px;
  }

  .media-lightbox .lightbox-next {
    right: 10px;
  }

  .media-lightbox .lightbox-content {
    gap: 12px;
  }

  .media-lightbox .lightbox-media-container {
    max-height: calc(100% - 50px);
    border-radius: 8px;
  }

  .media-lightbox .lightbox-info {
    flex-direction: column;
    gap: 8px;
    padding: 0 10px;
  }

  .media-lightbox .lightbox-title {
    font-size: 12px;
    margin: 0;
    line-height: 1.3;
  }

  .media-lightbox .lightbox-counter {
    font-size: 11px;
  }

  /* 移动端触摸优化 */
  .media-lightbox .lightbox-nav,
  .media-lightbox .lightbox-close {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }

  /* 移动端视频控制优化 */
  .media-lightbox .lightbox-video {
    border-radius: 8px;
  }

  .media-lightbox .lightbox-iframe {
    border-radius: 8px;
  }
}
