/* ==========================================================================
   v16 · 响应式统一层（最后加载，覆盖此前各轮补丁）
   - ≤1100px：首屏剪影改为 sticky 背景，卡片在其上滚动，剪影随滚动持续形变
   - ≤768px：手机端字号、间距、作品剧场与履历轮盘整体收紧
   - ≥1101px：PC 端整体 UI 轻度缩小，信息密度更接近成熟作品集
   ========================================================================== */

/* ---------- 1. 首屏（平板 + 手机） ---------- */
@media (max-width: 1100px) {
  .morph { height: auto; }
  .morph__stage {
    position: relative;
    height: auto;
    min-height: 100svh;
    overflow: clip;
  }
  .morph__stage::before { display: none; }
  .morph__canvas {
    position: sticky;
    top: 0;
    inset: auto;
    width: 100%;
    height: 100svh !important;
    z-index: 0;
    opacity: .96;
  }
  .morph__copy {
    position: relative;
    margin-top: -100svh;
    padding-top: calc(100svh - 132px) !important;
    z-index: 3;
  }
  .morph__copy [data-pos=pos-1-top-left] { margin-bottom: 0 !important; }
}

/* ---------- 2. 全局触控细节 ---------- */
html { -webkit-tap-highlight-color: transparent; }
@media (hover: none) {
  .capability-portal:hover { transform: none; }
}

/* ---------- 3. 手机端（≤768px） ---------- */
@media (max-width: 768px) {
  :root { --container-gutter: 18px; --nav-height: 3.5rem; }
  body { font-size: 15px; }

  /* 导航 */
  .nav__inner { padding-inline: 16px; }
  .nav__brand a { font-size: 13px; letter-spacing: .14em; }
  .nav__pill-btn { font-size: 11px; padding: 7px 12px; }
  .nav__menu-btn { width: 40px; height: 40px; }

  /* 首屏：提示胶囊放在头像上方，进度浮层改成细条，不再遮挡内容 */
  .intro-invitation { top: calc(var(--nav-height) + 18px); width: auto; }
  .intro-invitation > p { font-size: 13px; margin-bottom: 10px; }
  .intro-express { min-height: 40px; font-size: 12px; padding-inline: 18px; }
  .intro-journey-progress {
    width: calc(100vw - 32px); bottom: max(14px, env(safe-area-inset-bottom));
    padding: 10px 14px; border-radius: 14px;
  }
  .intro-journey-progress__status { display: none; }

  .morph__copy { padding: calc(100svh - 120px) 16px 48px !important; gap: 14px !important; }
  .morph__copy-item[data-pos] { padding: 20px 18px !important; min-height: 0 !important; border-radius: 18px; }
  .morph__copy .card-kicker { font-size: 10px; letter-spacing: .1em; margin-bottom: 10px; }
  .morph__copy .hero-name { font-size: 36px; }
  .morph__copy .hero-name-en { font-size: 17px; }
  .morph__copy .hero-positioning { font-size: 20px !important; line-height: 1.55; margin-bottom: 8px; }
  .intro-profile__desc { font-size: 13px !important; line-height: 1.8; color: #55555e; margin-bottom: 14px !important; }
  .morph__copy .hero-current-strip { grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px !important; }
  .morph__copy .hero-current-strip strong { font-size: 13px; }
  .morph__copy .hero-current-strip span { font-size: 11px !important; line-height: 1.6; }
  .intro-profile__foot { font-size: 10px; margin-top: 14px !important; }
  .intro-profile__foot a { font-size: 12px; }
  .morph__copy .glass-card__metrics { grid-template-columns: 1fr 1fr; gap: 6px 14px !important; }
  .morph__copy .mini-metric b { font-size: 24px !important; }
  .morph__copy .mini-metric--lead b { font-size: 28px !important; }
  .morph__copy .mini-metric span { font-size: 11px !important; line-height: 1.5; }
  .morph__copy .glass-card__title { font-size: 20px !important; }
  .intro-card-copy { font-size: 13px !important; line-height: 1.8; color: #55555e; }
  .intro-detail-link { font-size: 12px !important; margin-top: 10px !important; min-height: 36px; }
  .intro-preview__caption { font-size: 11px !important; }

  /* 通用章节标题与正文：提高字号与对比度 */
  .section-header { gap: 12px; margin-bottom: 24px; }
  .section-title { font-size: 26px !important; line-height: 1.45 !important; }
  .section-desc { font-size: 13px !important; line-height: 1.8; color: #55555e; }
  .eyebrow { font-size: 10px !important; letter-spacing: .12em; }
  .capabilities-section, .experience-section { padding-block: 56px; }

  /* 能力卡片 */
  .capability-portal { min-height: 0 !important; padding: 20px 18px !important; }
  .capability-portal .glass-card__title { font-size: 21px !important; }
  .capability-portal .portal-lead { font-size: 14px; }
  .capability-portal .portal-desc { font-size: 13px !important; line-height: 1.8; color: #55555e; }
  .capability-portal .portal-network { height: 180px !important; }
  .portal-tags { font-size: 11px; margin: 10px 0 !important; }
  .portal-open { min-height: 40px; font-size: 13px; }
  .tool-box { padding: 18px; }
  .tool-box h4 { font-size: 14px; }
  .tool-tag { font-size: 11px; }

  /* 履历轮盘：不再左右溢出，卡片宽度跟随屏幕 */
  .fff-wheel-stage { height: 470px !important; overflow: hidden; touch-action: pan-y; margin-inline: -16px; }
  .fff-card {
    width: min(78vw, 310px) !important; height: 430px !important;
    padding: 18px !important; gap: 10px !important;
  }
  .fff-card__num { font-size: 32px !important; }
  .fff-card__org { font-size: 19px !important; line-height: 1.4; }
  .fff-card__period, .fff-card__role small { font-size: 11px !important; }
  .fff-card__summary { font-size: 12px !important; line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .fff-card__stat b { font-size: 16px !important; }
  .fff-card__stat span { font-size: 10px !important; }
  .fff-card__bottom { font-size: 10px !important; }
  .fff-chapter-pills { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; padding: 2px 16px 6px; margin-inline: -16px; scrollbar-width: none; }
  .fff-chapter-pills::-webkit-scrollbar { display: none; }
  .fff-pill { flex: 0 0 auto; font-size: 12px !important; padding: 8px 12px !important; white-space: nowrap; }
  .experience-selected strong { font-size: 18px; }
  .experience-selected span { font-size: 12px; }

  /* 作品：标题区 */
  .portfolio-heading .section-title { font-size: 26px !important; }
  .portfolio-mode-switch { left: 16px !important; right: 16px; max-width: none !important; justify-content: space-between; }
  .portfolio-mode-switch button { font-size: 12px !important; padding: 8px 12px !important; }

  /* 作品：沉浸浏览（单屏一项，信息不再出现内嵌滚动） */
  .p-slide__inner { padding: calc(var(--nav-height) + 70px) 16px 112px !important; gap: 12px !important; }
  .p-slide__camera-frame { max-height: 36svh !important; border-radius: 16px; }
  .p-slide__info { max-height: none !important; overflow: visible !important; padding: 16px 16px 14px !important; border-radius: 16px; }
  .p-slide__index { font-size: 10px !important; }
  .p-slide__title { font-size: 19px !important; line-height: 1.45; }
  .p-slide__tag { font-size: 11px !important; }
  .p-slide__desc { font-size: 13px !important; line-height: 1.75; display: -webkit-box !important; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .p-slide__context, .p-slide__source { display: none !important; }
  .p-slide__actions .btn { font-size: 12px !important; padding: 9px 14px !important; }
  .cover-open-label { font-size: 11px !important; }
  .parallax-rail { left: 16px !important; right: 16px !important; bottom: 58px !important; }
  .parallax-rail button { width: 30px !important; height: 30px !important; font-size: 10px !important; }
  .parallax-bottom-bar { left: 16px !important; right: 16px !important; bottom: 14px !important; font-size: 11px !important; }
  #parallax-status-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
  .parallax-nav-btns button { font-size: 12px !important; padding: 7px 11px !important; }

  /* 作品：平铺改为纵向两列网格，手机上最易浏览 */
  .horizontal-workspace { padding: calc(var(--nav-height) + 76px) 16px 40px !important; }
  .horizontal-workspace__header h3 { font-size: 22px !important; }
  .horizontal-workspace__header > p { font-size: 12px !important; }
  .horizontal-workspace .filter-pills { flex-wrap: nowrap; overflow-x: auto; margin-inline: -16px; padding: 2px 16px 4px; scrollbar-width: none; }
  .horizontal-workspace .filter-pills::-webkit-scrollbar { display: none; }
  .horizontal-workspace .filter-btn { flex: 0 0 auto; font-size: 12px !important; padding: 8px 12px !important; white-space: nowrap; }
  .horizontal-workspace .catalog-search { font-size: 14px !important; padding: 9px 13px !important; flex: 1; }
  .horizontal-workspace #catalog-result-count { font-size: 11px !important; }
  .horizontal-workspace .works-grid {
    display: grid !important; grid-template-columns: 1fr 1fr !important; grid-template-rows: none !important;
    grid-auto-flow: row !important; grid-auto-columns: auto !important;
    overflow: visible !important; scroll-snap-type: none !important; gap: 12px !important; padding: 0 !important; cursor: default;
  }
  .horizontal-workspace .work-card { width: auto !important; flex: none !important; border-radius: 16px !important; }
  .horizontal-workspace .work-card__media { aspect-ratio: 4/3 !important; }
  .horizontal-workspace .work-card__body { padding: 10px 11px 12px !important; }
  .horizontal-workspace .work-card__meta { font-size: 10px !important; }
  .horizontal-workspace .work-card__title { font-size: 13px !important; min-height: 0 !important; line-height: 1.45; }
  .horizontal-workspace .work-card__footer { padding-top: 8px !important; }
  .horizontal-workspace .work-card__btn, .horizontal-workspace .work-card__ext { font-size: 11px !important; }
  .work-card__badges { font-size: 10px; }
  .horizontal-footer { font-size: 10px !important; }
  .horizontal-footer a { font-size: 12px !important; }

  /* 弹窗与页脚 */
  .modal-dialog { width: 100vw !important; max-width: 100vw !important; max-height: 100svh !important; margin: 0 !important; border-radius: 0 !important; }
  .modal-inner { padding: 20px 16px 28px !important; }
  .footer { padding-block: 40px 32px; }
  .footer__grid h4 { font-size: 14px; }
  .footer__grid li, .footer__grid p { font-size: 13px; }
}

/* ---------- 4. PC 端（≥1101px）：整体轻度缩小，提升信息密度 ---------- */
@media (min-width: 1101px) and (max-width: 1600px) {
  html { font-size: 15px; }
}
@media (max-width: 768px) {
  .horizontal-workspace .catalog-search-wrap { flex-wrap: wrap !important; width: 100%; }
  .horizontal-workspace .catalog-search { width: 100% !important; flex: 1 1 100%; }
  .horizontal-workspace__header > p { display: none; }
}
