@charset "UTF-8";
/* ============================================================
   Portfolio / Resume — 复刻 www.ck-design.cn/myportfolios
   设计基准：1600px 视口，内容容器 1320px（内边距 15px → 1290px）
   ============================================================ */

/* ---------- 1. 变量与重置 ---------- */
:root{
  --wrap: 1320px;
  --wrap-pad: 15px;
  --header-h: 80px;

  --ink: #000;
  --ink-2: #1c1c1c;
  --muted: #959595;
  --muted-2: #686868;
  --line: #dcdcdc;
  --surface: #f7f7f7;
  --paper: #fff;
  --accent: #ef5d39;
  --accent-2: #d54949;
  --accent-3: #ed461d;

  --r-card: 16px;
  --r-hero: 32px;
  --r-main: 32px;

  --ease: cubic-bezier(.645,.045,.355,1);
  --ease-out: cubic-bezier(.22,1,.36,1);

  --stroke: #4d4d4d;
}

*,*::before,*::after{ box-sizing: border-box; }

html{
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body{
  margin: 0;
  padding-top: var(--header-h);
  background: var(--paper);
  color: var(--ink);
  font-family: "Arimo","Microsoft YaHei","PingFang SC","Hiragino Sans GB",sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1,h2,h3,h4,p,ul,figure{ margin: 0; }
ul{ padding: 0; list-style: none; }
a{ color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
img,video{ display: block; max-width: 100%; }
button{ font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

::selection{ background: var(--accent); color: #fff; }

.wrap{
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--wrap-pad);
}

/* ---------- 2. 预载页（进度条满 100% 才进入） ---------- */
.loader{
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--paper);
  transition: opacity .65s var(--ease), visibility .65s;
}
.loader.is-done{
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader__inner{
  width: min(320px, 70vw);
  transform: translateY(-4px);
}

.loader__name{
  margin: 0 0 30px;
  font-size: 12px;
  letter-spacing: .32em;
  text-indent: .32em;
  color: var(--ink);
  opacity: .5;
  text-align: center;
}
.loader__name span{ margin: 0 .55em; opacity: .55; }

.loader__track{
  position: relative;
  height: 2px;
  background: rgba(0,0,0,.09);
  overflow: hidden;
}
[data-theme="dark"] .loader__track{ background: rgba(255,255,255,.15); }

.loader__fill{
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 0;
  background: var(--ink);
  transition: width .3s linear;
}

.loader__meta{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: 16px;
}
.loader__pct{
  font-size: 23px;
  line-height: 1;
  letter-spacing: -.02em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.loader__pct b{ font-weight: 500; }
.loader__pct em{ font-style: normal; font-size: 12px; margin-left: 2px; opacity: .4; }

.loader__bytes{
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--ink);
  opacity: .36;
  font-variant-numeric: tabular-nums;
}

.loader__hint{
  margin: 18px 0 0;
  font-size: 11px;
  letter-spacing: .12em;
  color: var(--ink);
  opacity: .3;
  text-align: center;
}

.loader__skip{
  display: block;
  margin: 20px auto 0;
  padding: 9px 20px;
  border: 1px solid rgba(0,0,0,.16);
  background: transparent;
  color: var(--ink);
  font-size: 11px;
  letter-spacing: .1em;
  border-radius: 999px;
  cursor: pointer;
  opacity: .55;
}
.loader__skip[hidden]{ display: none; }
[data-theme="dark"] .loader__skip{ border-color: rgba(255,255,255,.22); }

/* ---------- 3. 头部 ---------- */
.header{
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: var(--paper);
  transition: transform .55s var(--ease),
              background-color .45s var(--ease),
              box-shadow .45s var(--ease),
              backdrop-filter .45s var(--ease);
}
/* 滚动后：白色半透明 + 毛玻璃 */
.header.is-scrolled{
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  box-shadow: 0 1px 0 rgba(0,0,0,.045);
}
/* 向下滚动收起 / 向上滚动展开 */
.header.is-hidden{ transform: translateY(-100%); }

.header__inner{
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand{ display: block; flex: 0 0 auto; }
.brand__mark{
  width: 50px;
  height: 50px;
  display: block;
  color: var(--ink);
}

/* 导航：文字上滑 + 倾斜入场 */
.nav{
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}
.nav ul{
  display: flex;
  align-items: center;
}
.nav li{ position: relative; }
.nav a{
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 25.5px;
  padding: 0 18.6px;
  font-size: 17px;
  line-height: 25.5px;
  overflow: hidden;
  color: var(--ink);
  transition: color .25s var(--ease);
}
.nav a span{
  display: block;
  transition: transform .5s var(--ease);
}
.nav a::after{
  content: attr(data-text);
  position: absolute;
  left: 18.6px;
  bottom: 0;
  transform: translateY(100%) skewY(20deg);
  transform-origin: left bottom;
  transition: transform .5s var(--ease);
  white-space: nowrap;
}
.nav a:hover span{ transform: translateY(-100%); }
.nav a:hover::after{ transform: translateY(0) skewY(0); }

.header__tools{
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 0 0 auto;
}
.theme-toggle,
.search-icon{
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
}
.theme-toggle svg{
  width: 20px;
  height: 20px;
  overflow: visible;
  transition: transform .6s var(--ease);
}
.theme-toggle:hover svg{ transform: rotate(-18deg); }
.theme-toggle__beams{
  stroke-width: 2;
  stroke-linecap: round;
  transition: opacity .4s var(--ease), transform .5s var(--ease);
  transform-origin: center;
}
.theme-toggle__mask circle{
  transition: transform .5s var(--ease);
}
[data-theme="dark"] .theme-toggle__beams{ opacity: 0; transform: scale(.6) rotate(30deg); }
[data-theme="dark"] .theme-toggle__mask circle{ transform: translate(-11px, -1px); }

.search-icon svg{
  width: 22px;
  fill: currentColor;
  transition: fill .4s var(--ease);
}
.search-icon:hover svg{ fill: var(--accent); }

/* ---------- 移动端菜单 ---------- */
.nav-trigger{
  display: none;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  height: 32px;
}
.nav-trigger__icon{
  position: relative;
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  transition: background .25s var(--ease);
}
.nav-trigger__icon::before,
.nav-trigger__icon::after{
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: currentColor;
  transition: transform .3s var(--ease), opacity .2s;
}
.nav-trigger__icon::before{ transform: translateY(-6px); }
.nav-trigger__icon::after{ transform: translateY(6px); }
.nav-trigger[aria-expanded="true"] .nav-trigger__icon{ background: transparent; }
.nav-trigger[aria-expanded="true"] .nav-trigger__icon::before{ transform: rotate(45deg); }
.nav-trigger[aria-expanded="true"] .nav-trigger__icon::after{ transform: rotate(-45deg); }

.mobile-nav{
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  z-index: 55;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity .35s var(--ease), transform .35s var(--ease), visibility .35s;
}
.mobile-nav.is-open{ opacity: 1; visibility: visible; transform: none; }
.mobile-nav ul{ padding: 8px 0; }
.mobile-nav a{
  display: block;
  padding: 14px 20px;
  font-size: 18px;
  border-bottom: 1px solid var(--line);
}
.mobile-nav li:last-child a{ border-bottom: 0; }

/* ---------- 4. 搜索层 ---------- */.search-modal{
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  backdrop-filter: saturate(180%) blur(10px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .35s var(--ease), visibility .35s;
}
.search-modal.is-open{ opacity: 1; visibility: visible; }
.search-modal__close{
  position: fixed;
  top: 15px;
  right: 15px;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: rgba(0,0,0,.9);
  display: flex;
  align-items: center;
  justify-content: center;
}
.search-modal__close svg{ width: 18px; height: 18px; color: #fff; }
.search-modal__inner{
  position: relative;
  width: 100%;
  max-width: 768px;
  margin: 0 15px;
  height: 60px;
}
.search-modal__field{
  width: 100%;
  height: 60px;
  padding: 15px 70px 15px 8px;
  font-size: 24px;
  font-family: inherit;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 2px solid var(--accent);
  outline: 0;
}
.search-modal__field::placeholder{ color: var(--muted); }
.search-modal__submit{
  position: absolute;
  top: 5px;
  right: 8px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}
.search-modal__submit svg{ width: 22px; fill: #fff; }

/* ---------- 5. 英雄区（滚动缩放视差） ---------- */
.hero-section{
  padding: 115px 0 15px;
}
.hero{
  position: relative;
  height: 450px;
  border-radius: var(--r-hero);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #262626;
  isolation: isolate;
}
.hero__media{
  position: absolute;
  inset: 0;
  z-index: -2;
  will-change: transform;
  transform: scale(1);
  transform-origin: 50% 50%;
  backface-visibility: hidden;
}
.hero__bg{
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 23% 46% at 60% 24%, rgba(206,84,50,.88) 0%, rgba(168,62,34,.34) 38%, rgba(96,44,30,.10) 62%, rgba(38,38,38,0) 80%),
    radial-gradient(ellipse 14% 48% at 33% 64%, rgba(28,148,142,.74) 0%, rgba(24,112,108,.26) 46%, rgba(38,38,38,0) 76%),
    #262626;
}
/* 同心圆环 */
.hero__rings{
  position: absolute;
  inset: 0;
  background: repeating-radial-gradient(circle at 48.8% 71.5%,
              rgba(255,255,255,0) 0 58px,
              rgba(255,255,255,.05) 58px 59px);
  -webkit-mask-image: radial-gradient(circle at 48.8% 71.5%, rgba(0,0,0,.95) 0 18%, rgba(0,0,0,.4) 42%, transparent 66%);
  mask-image: radial-gradient(circle at 48.8% 71.5%, rgba(0,0,0,.95) 0 18%, rgba(0,0,0,.4) 42%, transparent 66%);
}
/* 球体 */
.hero__sphere{
  position: absolute;
  left: calc(48.8% - 142px);
  top: 180px;
  width: 284px;
  height: 284px;
  border-radius: 50%;
  background:
    radial-gradient(48% 26% at 50% 5%, rgba(255,247,238,.62) 0%, rgba(255,244,232,.16) 54%, rgba(255,242,228,0) 82%),
    linear-gradient(179deg,
      #c08e7c 0%,
      #c69b83 10%,
      #b3a291 26%,
      #9cb69f 42%,
      #79cdbd 58%,
      #45dfcc 78%,
      #29c3b6 92%,
      #1aa9a0 100%);
  box-shadow:
    0 0 54px 8px rgba(96,232,216,.20),
    0 0 130px 44px rgba(54,196,186,.12),
    inset 0 -22px 54px rgba(10,140,132,.30);
}
.hero__overlay{
  position: absolute;
  inset: 0;
  z-index: -1;
  background: #000;
  opacity: .08;
}
.hero__content{
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1240px;
  margin: 0 25px;
  text-align: center;
  color: #fff;
}
.hero__title{
  font-size: 80px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -.01em;
  text-transform: uppercase;
}
.hero__subtitle{
  margin-top: 20.6px;
  font-size: 22px;
  line-height: 1.5;
  font-weight: 400;
}

/* ---------- 6. 区块标题（描边字） ---------- */
.section{ position: relative; }
.section-title{
  padding: 10px 0;
  font-family: "MiSans-Bold","Microsoft YaHei","PingFang SC",sans-serif;
  font-size: 64px;
  font-weight: 400;
  line-height: 1.2;
  text-align: center;
  color: transparent;
  -webkit-text-stroke: 1px var(--stroke);
  text-stroke: 1px var(--stroke);
}

/* ---------- 7. 作品网格 ---------- */
.grid{
  display: grid;
  gap: 48px;
  padding: 15px 0;
}
.grid--3{ grid-template-columns: repeat(3, minmax(0,1fr)); }

.card{ position: relative; }
.card__link{
  display: block;
  position: relative;
  border-radius: var(--r-card);
}
.card__body{
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 25px;
  text-align: center;
  color: #fff;
  opacity: 0;
  transition: opacity .3s var(--ease);
  pointer-events: none;
}
.card:hover .card__body{
  opacity: 1;
  transition: opacity .5s .1s var(--ease);
}
.card__body h3{
  font-size: 24px;
  line-height: 1.2;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .01em;
  transition: letter-spacing .5s var(--ease-out);
}
.card:hover .card__body h3{ letter-spacing: 0; }
.card__cat{
  margin-top: 5.33px;
  font-size: 14px;
  line-height: 1.2;
  font-weight: 400;
  text-transform: uppercase;
  color: #fff;
}

/* 通用媒体容器 */
.media{
  position: relative;
  overflow: hidden;
  border-radius: var(--r-card);
  background: var(--surface);
  width: 100%;
}
.media[data-ratio="16:9"]{ aspect-ratio: 16 / 9; }
.media[data-ratio="2.33:1"]{ aspect-ratio: 2.33 / 1; }
.media[data-ratio="1:1"]{ aspect-ratio: 1 / 1; }
.media[data-ratio="3:4"]{ aspect-ratio: 3 / 4; }
.media[data-ratio="4:3"]{ aspect-ratio: 4 / 3; }
.media[data-ratio="3:2"]{ aspect-ratio: 3 / 2; }

.media img,
.media video{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1);
  will-change: transform;
  transition: transform 1s var(--ease);
}
/* 悬停遮罩 */
.card .media::after{
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.4);
  opacity: 0;
  transition: opacity .5s var(--ease);
  z-index: 2;
}
.card:hover .media::after{ opacity: 1; }
.card:hover .media img,
.card:hover .media video{ transform: scale(1.08); }

/* ---------- 8. 项目集 ---------- */
.project{
  padding: 15px 0;
}
.project__link{ display: block; }
.project__media{
  max-width: 1140px;
  margin: 0 auto;
  border-radius: var(--r-card);
}
.project__cap{
  max-width: 1140px;
  margin: 18px auto 0;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: .01em;
  text-transform: uppercase;
  transition: color .4s var(--ease);
}
.project__link:hover .project__cap{ color: var(--accent); }

/* ---------- 9. 碎片集（整页大图） ---------- */
.masonry{
  max-width: 1160px;
  margin: 0 auto;
  padding: 15px 0 30px;
  columns: 3;
  column-gap: 24px;
}
.masonry .media{
  margin: 0 0 15px;
  break-inside: avoid;
  border-radius: 0;
  cursor: zoom-in;
}

/* 8 张 16:9 整页图，2 列（手机 1 列） */
.frag{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px;
  padding: 18px 0 40px;
}
.frag__item{
  margin: 0;
  border-radius: var(--r-card);
  cursor: zoom-in;
}
.frag__item img{ display: block; }

/* AI 动画：竖屏 9:16 */
.media[data-ratio="9:16"]{ aspect-ratio: 9 / 16; }
.grid--portrait{ gap: 32px; }
.section-note{
  margin: -14px 0 22px;
  text-align: center;
  font-size: 13px;
  letter-spacing: .1em;
  color: var(--muted);
}

/* ---------- 10. 回到顶部 ---------- */
.back-to-top{
  position: fixed;
  right: 30px;
  bottom: 30px;
  z-index: 40;
  width: 45px;
  height: 45px;
  cursor: pointer;
}
.back-to-top__inner{
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #e8e8e8;
  overflow: hidden;
  transition: border-radius .3s var(--ease), transform .1s var(--ease);
}
.back-to-top__inner::before{
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--accent);
  transform: scale(0);
  transition: transform .35s var(--ease);
}
.back-to-top__inner::after{
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid #e8e8e8;
  border-radius: 50%;
  transform: scale(.9);
  transition: transform .35s var(--ease), border-color .35s var(--ease);
}
.back-to-top__icon{
  position: relative;
  z-index: 1;
  width: 22px;
  fill: #6b6b6b;
  transition: fill .35s var(--ease), transform .35s var(--ease);
}
.back-to-top:hover .back-to-top__inner::before{ transform: scale(1); }
.back-to-top:hover .back-to-top__inner::after{ transform: scale(1.2); border-color: var(--accent); }
.back-to-top:hover .back-to-top__icon{ fill: #fff; transform: translateY(-3px); }
.back-to-top:active .back-to-top__inner{ transform: translateY(2px); }

/* ---------- 11. 页脚 ---------- */
.main{
  position: relative;
  z-index: 2;
  background: var(--paper);
  border-radius: 0 0 var(--r-main) var(--r-main);
  overflow: hidden;
}
.footer{
  position: relative;
  z-index: 1;
  margin-top: -40px;
  padding-top: 40px;
  background: var(--surface);
}
.footer__reveal{
  will-change: transform;
}

/* CTA */
.footer__cta{
  max-width: 600px;
  margin: 48px auto 0;
  padding: 0 10px;
}
.footer__cta-lg{
  font-family: "钉钉进步体","Microsoft YaHei","PingFang SC",sans-serif;
  font-size: 72px;
  line-height: 1.5;
}
.footer__cta-row{
  display: grid;
  grid-template-columns: 56.839% 43.076%;
  align-items: center;
  margin-top: 20px;
}
.footer__cta-md{
  font-family: "钉钉进步体","Microsoft YaHei","PingFang SC",sans-serif;
  font-size: 64px;
  line-height: 1.5;
  font-weight: 700;
}
.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10.5px 35px;
  border: 1px solid var(--ink);
  border-radius: 40px;
  font-size: 22.4px;
  line-height: 1.5;
  color: var(--ink);
  background: transparent;
  transition: color .3s var(--ease), border-color .3s var(--ease), background-color .3s var(--ease);
  justify-self: start;
}
.btn__icon svg{
  width: 1.05em;
  height: 1.05em;
  display: block;
  fill: currentColor;
}
.btn:hover{
  border-color: var(--accent-3);
  color: var(--accent-2);
}

/* 联系栏目 */
.footer__cols{
  max-width: 1360px;
  margin: 48px auto 0;
  padding: 0 0 48px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
}
.footer__col{ padding: 0 20px; }
.footer__col-head{
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}
.footer__label{
  display: inline-block;
  font-size: 18px;
  line-height: 1.4;
  transition: color .25s var(--ease);
}
.footer__label:hover{ color: var(--accent); }
.footer__value{
  margin-top: 4px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}
.footer__ico{
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-top: 4px;
  border-radius: 50%;
  background: rgba(184,184,184,.32);
  color: var(--ink-2);
  flex: 0 0 auto;
}
.footer__ico svg{
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* 版权 */
.footer__legal{
  max-width: 1360px;
  margin: 0 auto;
  /* 右侧留出「回到顶部」按钮的位置，避免滚动到底时文字被圆形按钮压住 */
  padding: 0 100px 30px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  font-size: 13px;
  color: var(--muted-2);
}
.footer__dot{
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--accent);
  vertical-align: -1px;
  opacity: .85;
}

/* ---------- 12. 图片/视频占位 ---------- */
.media .ph{
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px;
  text-align: center;
  color: #a6a6a6;
  background:
    linear-gradient(135deg, #f4f4f4 0%, #eee 100%);
  border: 1px dashed #dadada;
  border-radius: inherit;
  transition: opacity .4s var(--ease);
}
.media .ph__icon{
  width: 26px;
  height: 26px;
  margin-bottom: 2px;
  color: #c2c2c2;
}
.media .ph b{
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #9c9c9c;
}
.media .ph i{
  font-style: normal;
  font-size: 11px;
  letter-spacing: .06em;
  color: #b4b4b4;
  word-break: break-all;
}
/* 媒体默认可见：弱网、省流量、iOS 不预加载时也不会白屏。
   只有确实加载失败（is-missing）才藏起来并显示占位提示。 */
.media .ph{ opacity: 0; visibility: hidden; }
.media .ph__icon{ display: none; }
.media.is-missing .ph{ opacity: 1; visibility: visible; }
.media.is-missing .ph__icon{ display: block; }
.media.is-missing img,
.media.is-missing video{ opacity: 0; }

/* 确实被系统拦下（iOS 低电量模式）时，右下角给一个小角标提示，
   不再用居中大按钮遮挡画面 —— 主体流程改为底部一次性轻提示 */
.media.is-blocked::before{
  content: "";
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 30px;
  height: 30px;
  z-index: 6;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,.85);
  background:
    rgba(0,0,0,.45)
    url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fff'%3E%3Cpath d='M9 6.2l9.4 5.8-9.4 5.8z'/%3E%3C/svg%3E")
    center / 12px 12px no-repeat;
  pointer-events: none;
}

/* 自动播放被系统整体禁用时的底部轻提示（点一下全站解锁） */
.autoplay-tip{
  position: fixed;
  left: 50%;
  bottom: calc(92px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 120;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 11px 20px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 40px;
  background: rgba(20,20,20,.88);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  color: #f2f2f2;
  font-size: 13px;
  letter-spacing: .04em;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0,0,0,.28);
  animation: tipIn .45s cubic-bezier(.22,1,.36,1) both;
}
.autoplay-tip__dot{
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff;
  animation: tipPulse 1.6s ease-in-out infinite;
}
.autoplay-tip.is-out{
  opacity: 0;
  transform: translate(-50%, 10px);
  transition: opacity .3s ease, transform .3s ease;
  pointer-events: none;
}
@keyframes tipIn{
  from{ opacity: 0; transform: translate(-50%, 14px); }
  to{ opacity: 1; transform: translate(-50%, 0); }
}
@keyframes tipPulse{
  0%,100%{ opacity: 1; transform: scale(1); }
  50%{ opacity: .35; transform: scale(.72); }
}
@media (prefers-reduced-motion: reduce){
  .autoplay-tip{ animation: none; }
  .autoplay-tip__dot{ animation: none; }
}

/* ---------- 13. 深色主题 ---------- */
[data-theme="dark"]{
  --ink: #f2f2f2;
  --ink-2: #e6e6e6;
  --muted: #8d8d8d;
  --muted-2: #9a9a9a;
  --line: #2e2e2e;
  --surface: #161616;
  --paper: #0d0d0d;
  --stroke: #7a7a7a;
}
[data-theme="dark"] .media .ph{
  background: linear-gradient(135deg,#1b1b1b,#171717);
  border-color: #2b2b2b;
}
[data-theme="dark"] .header.is-scrolled{ box-shadow: 0 1px 0 rgba(255,255,255,.05); }
[data-theme="dark"] .back-to-top__inner{ background: #232323; }
[data-theme="dark"] .back-to-top__icon{ fill: #cfcfcf; }

/* ---------- 14. 响应式 ---------- */
/* 触摸设备没有 hover：卡片标题常驻显示，改底部对齐 + 渐变遮罩保证可读 */
@media (hover: none), (pointer: coarse){
  .card__body{
    opacity: 1;
    justify-content: flex-end;
    align-items: flex-start;
    text-align: left;
    padding: 18px 20px;
  }
  .card .media::after{
    opacity: 1;
    background: linear-gradient(to top,
      rgba(0,0,0,.78) 0%,
      rgba(0,0,0,.42) 32%,
      rgba(0,0,0,.06) 62%,
      rgba(0,0,0,0) 78%);
  }
  .card__body h3{ font-size: 17px; letter-spacing: 0; }
  .card__cat{ margin-top: 4px; font-size: 12px; letter-spacing: .08em; }
  /* 触摸时不要放大，避免点击后残留放大态 */
  .card:hover .media img,
  .card:hover .media video{ transform: scale(1); }

  /* iOS 人机指南建议点击目标不小于 44×44。下面几个控件视觉尺寸偏小，
     用伪元素把命中区撑开，布局和外观都不动 */
  .theme-toggle,
  .search-icon{ position: relative; }
  .theme-toggle::after,
  .search-icon::after{ content: ""; position: absolute; inset: -13px; }
  .nav-trigger{ position: relative; }
  .nav-trigger::after{ content: ""; position: absolute; left: -6px; right: -6px; top: -6px; bottom: -6px; }
  .footer__label{ padding: 9px 0; }
}

/* 中文标题禁止在词内断行（浏览器默认会对 CJK 逐字拆行） */
.hero__title,
.section-title{ word-break: keep-all; overflow-wrap: break-word; }

@media (max-width: 1440px){
  :root{ --wrap: 100%; }
  .hero-section{ padding-top: 100px; }
}

@media (max-width: 1100px){
  .section-title{ font-size: 52px; }
  .hero{ height: 400px; }
  .hero__title{ font-size: 62px; }
  .grid{ gap: 32px; }
  .footer__cta-lg{ font-size: 56px; }
  .footer__cta-md{ font-size: 50px; }
  .footer__cols{ grid-template-columns: repeat(2, minmax(0,1fr)); row-gap: 28px; }
}

@media (max-width: 860px){
  :root{ --header-h: 66px; }
  .nav{ display: none; }
  .nav-trigger{ display: inline-flex; }
  .hero-section{ padding-top: 86px; }
  .hero{ height: 320px; border-radius: 24px; }
  .hero__title{ font-size: 40px; }
  .hero__subtitle{ margin-top: 14px; font-size: 15px; }
  .hero__sphere{ width: 170px; height: 170px; left: calc(45.5% - 85px); top: 118px; }
  .section-title{ font-size: 34px; padding: 6px 0; }
  .grid--3{ grid-template-columns: repeat(2, minmax(0,1fr)); gap: 20px; }
  .grid{ padding: 12px 0; }
  .grid--portrait{ gap: 18px; }
  .frag{ gap: 16px; }
  .section-note{ margin: -8px 0 18px; font-size: 12px; }
  .masonry{ columns: 2; column-gap: 14px; }
  .masonry .media{ margin-bottom: 14px; }
  .project__cap{ font-size: 16px; margin-top: 12px; }
  .footer__cta{ margin-top: 34px; }
  .footer__cta-lg{ font-size: 36px; }
  .footer__cta-md{ font-size: 30px; }
  .btn{ padding: 8px 22px; font-size: 15px; }
  .footer__col{ padding: 0 12px; }
  .footer__legal{ padding: 0 16px 24px; flex-direction: column; align-items: flex-start; gap: 8px; }
  .back-to-top{ right: 16px; bottom: 16px; }
}

@media (max-width: 560px){
  .grid--3{ grid-template-columns: minmax(0,1fr); }
  /* AI 动画竖屏保持 2 列，变成 1 列会过高 */
  .grid--portrait{ grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
  .frag{ grid-template-columns: minmax(0,1fr); gap: 14px; }
  .hero__title{ font-size: 30px; }
  .footer__cols{ grid-template-columns: minmax(0,1fr); }

  /* 窄屏：中英文各占一行，避免中文被逐字拆行、竖线悬挂 */
  .hero__title .t-en,
  .hero__title .t-cn,
  .section-title .t-en,
  .section-title .t-cn{ display: block; }
  .hero__title .t-bar,
  .section-title .t-bar{ display: none; }
  .section-title{ font-size: 30px; line-height: 1.25; }
}

@media (max-width: 400px){
  .hero__title{ font-size: 26px; line-height: 1.2; }
  .section-title{ font-size: 26px; }
  .hero{ height: 300px; }
  .hero__sphere{ width: 150px; height: 150px; left: calc(45.5% - 75px); top: 108px; }
}

/* ---------- 15. 无障碍：减少动态 ---------- */
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *,*::before,*::after{
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .hero__media{ transform: none !important; }
}
