/* ══════════════════════════════════════════════════════
   毕钰涵 · 平面设计作品集 2026
   画布之外一律保持深色并尽量安静，让作品自己占据视觉重心。
   ══════════════════════════════════════════════════════ */

:root{
  --bg:#0d0d0b;
  --line-2:rgba(255,255,255,.055);
  --ink:#f3f0e7;
  --ink-2:#a9a599;
  --ink-3:#6f6c63;
  --accent:#ffba00;
  --accent-dim:rgba(255,186,0,.14);
  --dash:rgba(70,52,0,.42);
  --bar-h:58px;
  --art-w:1560px;
  --pad-x:clamp(14px,2.4vw,48px);
  --ease:cubic-bezier(.22,.61,.28,1);
}

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

html{
  background:var(--bg);
  -webkit-text-size-adjust:100%;
  scroll-behavior:smooth;
  /* clip 而非 hidden：不产生滚动容器，sticky 与锚点定位才不会被破坏 */
  overflow-x:clip;
}

body{
  margin:0;
  background:var(--bg);
  color:var(--ink);
  font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Hiragino Sans GB","Microsoft YaHei","Noto Sans SC",system-ui,sans-serif;
  font-size:14px;
  line-height:1.6;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}

img{max-width:100%}
a{color:inherit;text-decoration:none}

::selection{background:var(--accent);color:#171400}

/* ── 滚动条 ─────────────────────────────────────────── */
::-webkit-scrollbar{width:11px;height:11px}
::-webkit-scrollbar-track{background:var(--bg)}
::-webkit-scrollbar-thumb{background:#33312c;border-radius:99px;border:3px solid var(--bg)}
::-webkit-scrollbar-thumb:hover{background:#4a473f}

/* ── 开场 ───────────────────────────────────────────── */
.boot{
  position:fixed;inset:0;z-index:200;background:var(--bg);
  display:flex;align-items:center;justify-content:center;
  transition:opacity .7s var(--ease),visibility .7s;
}
.boot.done{opacity:0;visibility:hidden;pointer-events:none}
.boot-mark{text-align:center;font-size:22px;letter-spacing:.22em;font-weight:600}
.boot-mark span{
  display:block;margin-top:14px;font-size:10.5px;letter-spacing:.42em;
  color:var(--ink-3);font-weight:500;
}
.boot-mark::after{
  content:"";display:block;width:44px;height:2px;margin:20px auto 0;
  background:var(--accent);transform-origin:left;
  animation:bootbar 1.1s var(--ease) infinite;
}
@keyframes bootbar{
  0%{transform:scaleX(.1);opacity:.4}
  50%{transform:scaleX(1);opacity:1}
  100%{transform:scaleX(.1);opacity:.4;transform-origin:right}
}

/* ── 顶部进度条 ─────────────────────────────────────── */
.progress{position:fixed;top:0;left:0;right:0;height:2px;z-index:120;background:transparent}
.progress i{
  display:block;height:100%;width:0;background:var(--accent);
  box-shadow:0 0 12px rgba(255,186,0,.55);
  transition:width .12s linear;
}

/* ── 顶栏 ───────────────────────────────────────────── */
.topbar{
  position:fixed;top:0;left:0;right:0;height:var(--bar-h);z-index:110;
  display:flex;align-items:center;gap:20px;
  padding:0 var(--pad-x);
  background:rgba(13,13,11,.72);
  backdrop-filter:saturate(1.6) blur(18px);
  -webkit-backdrop-filter:saturate(1.6) blur(18px);
  border-bottom:1px solid var(--line-2);
  transform:translateY(0);
  transition:transform .42s var(--ease),background .3s;
}
.topbar.hidden{transform:translateY(-100%)}
.topbar.at-top{background:rgba(13,13,11,.4);border-bottom-color:transparent}

.brand{display:flex;align-items:baseline;gap:9px;flex-shrink:0}
.brand b{font-size:15px;letter-spacing:.06em;font-weight:600}
.brand span{font-size:11px;color:var(--ink-3);letter-spacing:.08em}

.chapters{
  display:flex;align-items:center;gap:2px;margin-left:auto;
  overflow-x:auto;scrollbar-width:none;-ms-overflow-style:none;
  mask-image:linear-gradient(90deg,transparent,#000 14px,#000 calc(100% - 14px),transparent);
  -webkit-mask-image:linear-gradient(90deg,transparent,#000 14px,#000 calc(100% - 14px),transparent);
}
.chapters::-webkit-scrollbar{display:none}
.chapters a{
  position:relative;flex-shrink:0;
  padding:7px 11px;border-radius:7px;
  font-size:12px;color:var(--ink-2);letter-spacing:.02em;white-space:nowrap;
  transition:color .22s,background .22s;
}
.chapters a i{
  font-style:normal;font-size:9.5px;color:var(--ink-3);
  margin-right:5px;letter-spacing:.06em;transition:color .22s;
}
.chapters a:hover{color:var(--ink);background:rgba(255,255,255,.05)}
.chapters a.on{color:var(--accent);background:var(--accent-dim)}
.chapters a.on i{color:var(--accent);opacity:.75}

.topbar-actions{display:flex;gap:6px;flex-shrink:0}
.icon-btn{
  width:32px;height:32px;border-radius:8px;color:var(--ink-2);
  display:grid;place-items:center;
  transition:color .2s,background .2s;
}
.icon-btn:hover{color:var(--ink);background:rgba(255,255,255,.07)}

/* ── 舞台与作品长图 ─────────────────────────────────── */
.stage{padding:calc(var(--bar-h) + 14px) var(--pad-x) 0}
.artwork{width:100%;max-width:var(--art-w);margin:0 auto}

.page{
  position:relative;width:100%;
  /* 锚点跳转时给固定顶栏让出位置 */
  scroll-margin-top:calc(var(--bar-h) + 18px);
  box-shadow:0 40px 90px -30px rgba(0,0,0,.75);
}
/* overflow 必须保持 visible，否则热区与圆角会被裁掉 */
.page:first-child .tile:first-child{border-radius:14px 14px 0 0}
.page:last-child  .tile:last-child{border-radius:0 0 14px 14px}

.tile{display:block;width:100%;height:auto;vertical-align:bottom}

/* ── 热区 ───────────────────────────────────────────────
   框线画在目标之外（outline-offset），像一圈「选中光环」：
   封面胶囊和目录卡片本身已经有白色底和黑边，压在它们上面会打架。
   悬停时只有目标内部染一层淡黄。                            */
.spot{
  position:absolute;display:block;
  background:transparent;
  outline:1.6px dashed var(--dash);
  outline-offset:5px;
  transition:background .26s var(--ease),
             outline-color .26s var(--ease),
             box-shadow .26s var(--ease);
}
.spot:hover,
.spot:focus-visible{
  background:var(--accent-dim);
  outline-color:#c68f00;
  box-shadow:0 10px 34px -10px rgba(198,143,0,.6);
}
.spot:focus-visible{outline-style:solid;outline-width:2px}

/* ── 响应式 ─────────────────────────────────────────── */
@media (max-width:1000px){
  :root{--pad-x:0px}
  .stage{padding-top:var(--bar-h)}
  .artwork{max-width:none}
  .page:first-child .tile:first-child,
  .page:last-child  .tile:last-child{border-radius:0}
  .chapters{display:none}
  .brand span{display:none}
}

@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{
    animation-duration:.01ms!important;animation-iteration-count:1!important;
    transition-duration:.01ms!important;
  }
  html{scroll-behavior:auto}
}

@media print{
  .topbar,.progress,.boot{display:none!important}
  body{background:#fff}
  .stage{padding:0}
  .artwork{max-width:none}
  .spot{display:none}
}
