/* ==========================================================================
   唐行宇 · 个人网站
   风格参考：tiagofragoso.com（手绘 / 纸张 / 铅笔线条）
   全部涂鸦为内联 SVG，无外部图片依赖
   ========================================================================== */

/* ---------- 设计变量 ---------- */
:root {
  --paper: #f7f6f1;
  --paper-2: #fcfbf7;
  --paper-3: #fffefb;
  --ink: #1b1a17;
  --ink-soft: #615f58;
  --ink-faint: #9b988f;
  --blue: #2f6fb5;
  --blue-soft: #dceaf8;
  --red: #b23a2e;
  --red-soft: #f7ddd8;
  --yellow: #f2c14e;
  --yellow-soft: #fdf1cf;
  --mint: #62c3c9;
  --green: #4f8a52;
  --line: #1b1a17;

  --edge: 2px;
  --shadow-card: 5px 6px 0 rgba(27, 26, 23, .13);
  --shadow-soft: 0 10px 24px rgba(27, 26, 23, .10);
  --radius-wob: 14px 10px 16px 9px / 9px 15px 10px 16px;

  --font-hand: "Ink Free", "Segoe Print", "Bradley Hand", "Comic Sans MS", "Permanent Marker", "Caveat", "楷体", "KaiTi", "STKaiti", cursive;
  --font-body: "Ink Free", "Segoe Print", "Xingkai SC", "楷体", "KaiTi", "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
  --font-display: "Anton", "Arial Narrow", "Impact", var(--font-body);
  --font-marker: "Permanent Marker", "Ink Free", "Segoe Print", var(--font-body);
  --font-type: "Special Elite", "Courier New", ui-monospace, monospace;

  --grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='g'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' seed='7'/><feColorMatrix type='saturate' values='0'/></filter><rect width='180' height='180' filter='url(%23g)' opacity='0.35'/></svg>");
}

/* ---------- 基础 ---------- */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background-color: var(--paper);
  background-image: var(--grain);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.75;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-hand);
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 .5em;
}

p { margin: 0 0 1em; }
a { color: var(--ink); text-decoration: none; }
b, strong { font-weight: 700; }

.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

.ink, .accent-blue { vector-effect: non-scaling-stroke; }
.accent-blue { color: var(--blue); }

.wrap { width: min(1180px, 92vw); margin: 0 auto; }

/* ---------- 手写标注小元素 ---------- */
.marker {
  position: relative;
  display: inline-block;
  padding: 0 .12em;
}
.marker::after {
  content: "";
  position: absolute;
  left: -2%; right: -2%;
  bottom: .06em;
  height: .42em;
  background: var(--yellow);
  opacity: .55;
  border-radius: 40% 60% 55% 45% / 60% 40% 60% 40%;
  transform: rotate(-.7deg);
  z-index: -1;
}

.hand-note {
  font-family: var(--font-hand);
  font-size: .78em;
  color: var(--ink-soft);
}

.u-squiggle { display: inline; border-bottom: 2px solid var(--red); }

/* ==========================================================================
   开场页
   ========================================================================== */
#splash {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  background-color: var(--paper);
  background-image: var(--grain);
  transition: opacity .5s ease, visibility .5s ease;
}
#splash.is-gone { opacity: 0; visibility: hidden; pointer-events: none; }

.splash-inner { padding: 6vh 5vw; }

.splash-card {
  position: relative;
  width: min(620px, 88vw);
  padding: 46px 34px 30px;
  background: var(--paper-3);
  border: var(--edge) solid var(--line);
  text-align: center;
  transform: rotate(-.8deg);
  box-shadow: var(--shadow-card);
  animation: drop-in .7s cubic-bezier(.2, .9, .25, 1) both;
}
@keyframes drop-in {
  from { opacity: 0; transform: rotate(-.8deg) translateY(-18px) scale(.98); }
  to   { opacity: 1; transform: rotate(-.8deg) translateY(0) scale(1); }
}

.splash-art { width: min(360px, 70vw); height: auto; color: var(--ink); display: block; margin: 0 auto 6px; }

.splash-kicker { font-family: var(--font-marker); font-size: .85rem; letter-spacing: .22em; color: var(--ink-soft); margin: 0; }
.splash-name { font-size: clamp(2.6rem, 9vw, 4.2rem); letter-spacing: .04em; margin: .05em 0 .1em; }
.splash-sub { font-family: var(--font-hand); color: var(--ink-soft); margin-bottom: 1.4em; }

.splash-btn {
  font-family: var(--font-hand);
  font-size: 1.05rem;
  padding: 12px 26px;
  color: var(--ink);
  background: var(--yellow-soft);
  border: var(--edge) solid var(--line);
  border-radius: var(--radius-wob);
  cursor: pointer;
  transition: transform .18s ease, background .18s ease;
}
.splash-btn:hover { transform: rotate(-1.6deg) scale(1.04); background: var(--yellow); }
.splash-btn:active { transform: scale(.97); }

.splash-note { font-family: var(--font-type); font-size: .72rem; color: var(--ink-faint); margin: 1.4em 0 0; letter-spacing: .08em; }

/* ==========================================================================
   导航
   ========================================================================== */
.nav {
  position: sticky;
  top: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px clamp(14px, 4vw, 46px);
  background: var(--paper-2);
  background-image: var(--grain);
  border-bottom: 2px solid var(--line);
}
.nav-logo { display: block; width: 44px; height: 44px; color: var(--ink); }
.logo-svg { width: 100%; height: 100%; }
.logo-txt { font-family: var(--font-hand); font-size: 15px; fill: var(--ink); }

.nav-links { display: flex; flex-wrap: wrap; gap: clamp(10px, 2.6vw, 30px); }
.nav-links a {
  font-family: var(--font-hand);
  font-size: clamp(.95rem, 2.4vw, 1.15rem);
  letter-spacing: .04em;
  color: var(--ink);
  padding: 2px 2px;
  transition: color .15s ease, transform .15s ease;
}
.nav-links a:hover { color: var(--blue); transform: rotate(-2deg) translateY(-1px); }

/* ---------- 菜单栏上的音乐控制 ---------- */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}
.nav-music {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}
.nm-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 12px;
  font-family: var(--font-hand);
  font-size: .9rem;
  color: var(--ink);
  background: var(--paper-3);
  border: 2px solid var(--line);
  border-radius: 11px 8px 13px 9px / 9px 13px 8px 11px;
  box-shadow: 2px 2px 0 rgba(27, 26, 23, .16);
  cursor: pointer;
  transition: transform .16s ease, background .16s ease, color .16s ease;
}
.nm-btn:hover { background: var(--yellow-soft); transform: translateY(-1px) rotate(-1deg); }
.nm-btn:active { transform: translateY(0) scale(.97); }
.nm-ico { width: 16px; height: 16px; fill: currentColor; stroke: none; }
.nm-ico-pause { display: none; fill: none; stroke: currentColor; stroke-width: 2.8; stroke-linecap: round; }
.nm-btn.is-playing .nm-ico-play { display: none; }
.nm-btn.is-playing .nm-ico-pause { display: block; }
.nm-play.is-playing { background: var(--ink); color: var(--paper-2); }
.nm-play.is-playing:hover { background: var(--blue); }
.nm-close { padding: 0 8px; color: var(--ink-soft); }
.nm-close .nm-ico-x { fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.nm-close:hover { background: var(--red-soft); color: var(--red); }

/* 菜单栏里的简历下载：做成最显眼的那一个 */
.nm-resume {
  background: var(--yellow);
  border-color: var(--line);
  font-weight: 700;
  text-decoration: none;
  box-shadow: 3px 3px 0 rgba(27, 26, 23, .28);
}
.nm-resume:hover, .nm-resume:focus-visible { background: var(--yellow-soft); color: var(--ink); transform: translate(-2px, -2px) rotate(-1deg); box-shadow: 5px 5px 0 rgba(27, 26, 23, .22); }
.nm-ico-doc { fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linejoin: round; }
.nm-ico-dl { fill: none; stroke: currentColor; stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; }

/* 首屏按钮组里的简历下载 */
.btn-resume {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--yellow);
  color: var(--ink);
  border-width: var(--edge);
}
.btn-resume:hover { background: var(--yellow-soft) !important; color: var(--ink) !important; }
.btn-resume em {
  font-family: var(--font-type);
  font-style: normal;
  font-size: .64rem;
  letter-spacing: .06em;
  opacity: .72;
  border-left: 1.5px solid currentColor;
  padding-left: 8px;
}
.btn-ico { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linejoin: round; }

/* ---------- 右侧分区标签 ---------- */
.rail {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
}
.rail-tab {
  display: block;
  padding: 9px 7px;
  background: var(--mint);
  border: 2px solid var(--line);
  border-right: 0;
  border-radius: 8px 0 0 8px;
  color: var(--ink);
  font-family: var(--font-type);
  font-size: .6rem;
  letter-spacing: .18em;
  writing-mode: vertical-rl;
  transition: background .18s ease, padding .18s ease, color .18s ease;
}
.rail-tab:hover { padding-right: 12px; background: var(--yellow); }
.rail-tab.is-on { background: var(--ink); color: var(--paper-2); padding-right: 12px; }

/* ==========================================================================
   区块骨架
   ========================================================================== */
.section { padding: clamp(56px, 9vw, 110px) 0; border-bottom: 2px solid var(--line); position: relative; }
.section-alt { background: rgba(255, 255, 255, .45); }

.sec-title {
  font-size: clamp(1.8rem, 4.6vw, 2.9rem);
  margin-bottom: .35em;
}
.sec-title em {
  display: inline-block;
  font-family: var(--font-type);
  font-style: normal;
  font-size: .42em;
  letter-spacing: .04em;
  color: var(--ink-soft);
  transform: rotate(-1deg) translateY(-.5em);
  margin-left: .5em;
}
.sec-lead { font-family: var(--font-hand); color: var(--ink-soft); max-width: 46ch; margin-bottom: 2.4em; }

.mini-title {
  font-size: 1.1rem;
  margin: 1.6em 0 .8em;
  padding-bottom: .25em;
  border-bottom: 2px dashed rgba(27, 26, 23, .28);
}

/* 撕纸 / 毛边卡片
   做法：元素本身只保留一圈手绘边框；背景与「撕纸剪切」放在 ::before 内缩一点的伪元素上，
   这样切口不会把边框啃掉，视觉上就是纸片从框里露出来。 */
.rip {
  position: relative;
  background: transparent;
  border: var(--edge) solid var(--line);
}
.rip > * { position: relative; z-index: 1; }
.rip::before {
  content: "";
  position: absolute;
  inset: 3px;
  z-index: 0;
  background-color: var(--rip-bg, var(--paper-3));
  background-image: var(--grain);
  clip-path: polygon(1% .6%, 34% .1%, 68% .9%, 99.3% .2%, 98.9% 33%, 100% 67%, 99.1% 99.2%, 66% 98.8%, 32% 99.7%, .7% 99.1%, .2% 65%, 1.1% 32%);
}
.rip-b::before { clip-path: polygon(.4% .3%, 38% 1.1%, 72% .2%, 99.6% .9%, 99.2% 29%, 99.7% 65%, 98.9% 99.5%, 70% 99.1%, 35% 99.8%, 1% 98.7%, 1.3% 71%, .1% 37%); }
.rip-c::before { clip-path: polygon(.9% .2%, 28% 1%, 63% .3%, 99% .8%, 100% 38%, 98.9% 72%, 99.5% 99%, 66% 100%, 29% 98.9%, .4% 99.6%, 1.1% 64%, .3% 28%); }
.rip-d::before { clip-path: polygon(1.2% .5%, 40% .2%, 70% 1%, 99.4% .4%, 99% 35%, 99.6% 64%, 98.8% 99.4%, 62% 99.2%, 30% 99.9%, .6% 98.9%, .9% 68%, .2% 33%); }
.rip-e::before { clip-path: polygon(.6% .8%, 33% .2%, 69% .6%, 99.2% .1%, 99.5% 31%, 98.8% 69%, 99.4% 99%, 68% 99.5%, 34% 98.8%, 1% 99.7%, .3% 62%, 1.3% 30%); }
.rip-f::before { clip-path: polygon(.2% .4%, 36% .9%, 74% .2%, 99.7% .7%, 98.7% 36%, 99.3% 63%, 99.6% 98.9%, 64% 99.3%, 28% 99.6%, .8% 99.8%, 1% 66%, .4% 31%); }

/* ==========================================================================
   首页 hero
   ========================================================================== */
.hero {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: clamp(30px, 5vw, 70px);
  align-items: center;
}
.eyebrow { font-family: var(--font-marker); letter-spacing: .3em; font-size: .8rem; color: var(--ink-soft); margin-bottom: .3em; }
.hero-name { font-size: clamp(3rem, 11vw, 6.4rem); letter-spacing: .06em; margin: 0 0 .1em; line-height: .95; }
.hero-role { font-family: var(--font-hand); font-size: clamp(1rem, 2.4vw, 1.3rem); margin-bottom: 1em; }
.hero-lead { font-size: 1.02rem; max-width: 40ch; }
.hero-lead .u-squiggle { margin-top: .4em; display: inline-block; }

.hero-tags { list-style: none; padding: 0; margin: 1.5em 0; display: flex; flex-wrap: wrap; gap: 8px; }
.hero-tags li {
  font-family: var(--font-hand);
  font-size: .82rem;
  padding: 5px 12px;
  border: 1.6px solid var(--line);
  border-radius: 20px 16px 22px 14px / 14px 22px 16px 20px;
  background: var(--paper-2);
}
.hero-tags li:nth-child(2n) { transform: rotate(-1.2deg); background: var(--blue-soft); }
.hero-tags li:nth-child(3n) { transform: rotate(1deg); background: var(--yellow-soft); }

.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 1.8em; }
.btn {
  display: inline-block;
  font-family: var(--font-hand);
  padding: 11px 24px;
  border: var(--edge) solid var(--line);
  border-radius: var(--radius-wob);
  background: var(--ink);
  color: var(--paper-2);
  box-shadow: 4px 4px 0 rgba(27, 26, 23, .22);
  transition: transform .16s ease, box-shadow .16s ease;
}
.btn:hover { transform: translate(-2px, -2px) rotate(-1deg); box-shadow: 6px 6px 0 rgba(27, 26, 23, .22); }
.btn-ghost { background: var(--paper-3); color: var(--ink); }

/* hero 右侧 */
.hero-art { position: relative; display: flex; justify-content: center; padding: 20px 0; }

.sticker-doodle {
  position: absolute;
  top: -26px;
  right: 8%;
  width: 96px;
  height: 96px;
  color: var(--blue);
  animation: spin 26s linear infinite;
  transform-origin: 50% 50%;
}
.sticker-doodle svg { width: 100%; height: 100%; overflow: visible; }
@keyframes spin { to { transform: rotate(360deg); } }
.sticker-txt { font-family: var(--font-type); font-size: 14px; fill: var(--blue); letter-spacing: .06em; }

.polaroid {
  position: relative;
  margin: 0;
  padding: 14px 14px 52px;
  background: #fff;
  border: 2px solid var(--line);
  transform: rotate(-1.6deg);
  box-shadow: var(--shadow-soft);
  width: min(360px, 78vw);
  transition: transform .35s ease;
}
.polaroid:hover { transform: rotate(.6deg) scale(1.02); }
.avatar { width: 100%; height: auto; display: block; color: var(--ink); }

/* 手绘 SVG 统一按视窗裁切（配合写死的 width/height 属性，避免边缘被裁掉） */
.art { display: block; width: 100%; height: auto; overflow: visible; color: var(--ink); }
.polaroid figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 14px;
  text-align: center;
  font-family: var(--font-type);
  font-size: .72rem;
  letter-spacing: .1em;
  color: var(--ink-soft);
}

.doodle-note {
  position: absolute;
  bottom: -6px;
  left: 2%;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--red);
  font-family: var(--font-hand);
  font-size: .9rem;
  transform: rotate(-3deg);
}
.doodle-note svg { width: 110px; height: 30px; }

/* ==========================================================================
   关于
   ========================================================================== */
.about-grid {
  display: grid;
  grid-template-columns: minmax(240px, 340px) 1fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}
.about-photo { margin: 0; position: sticky; top: 96px; }
.about-photo svg { width: 100%; height: auto; color: var(--ink); display: block; }
.about-photo figcaption {
  font-family: var(--font-type);
  font-size: .74rem;
  color: var(--ink-soft);
  letter-spacing: .06em;
  margin-top: 8px;
  border-top: 2px dashed rgba(27, 26, 23, .25);
  padding-top: 6px;
}

.say {
  font-size: 1.06rem;
  padding: 20px 22px;
  background: var(--paper-3);
  border: 2px solid var(--line);
  border-radius: var(--radius-wob);
  box-shadow: var(--shadow-card);
}
.say b { background: var(--yellow-soft); padding: 0 .2em; }

.facts { margin: 1.8em 0; display: grid; gap: 2px; }
.facts > div {
  display: grid;
  grid-template-columns: 6.5em 1fr;
  gap: 12px;
  padding: 9px 2px;
  border-bottom: 2px dashed rgba(27, 26, 23, .18);
}
.facts dt { font-family: var(--font-hand); color: var(--ink-soft); }
.facts dd { margin: 0; }

.chips { list-style: none; padding: 0; margin: .6em 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li {
  font-family: var(--font-hand);
  font-size: .84rem;
  padding: 4px 11px;
  border: 1.6px solid var(--line);
  border-radius: 18px 14px 20px 12px / 12px 20px 14px 18px;
  background: var(--paper-2);
}
.chips.small li { font-size: .76rem; padding: 2px 9px; background: var(--blue-soft); }
.chips li:nth-child(2n) { background: var(--yellow-soft); }

/* 手绘进度条 */
.bars { list-style: none; padding: 0; margin: .6em 0 0; }
.bars li {
  display: grid;
  grid-template-columns: 1fr 180px 2.4em;
  gap: 12px;
  align-items: center;
  padding: 7px 0;
}
.bar-label { font-size: .92rem; }
.bar {
  display: block;
  height: 14px;
  border: 2px solid var(--line);
  border-radius: 12px 8px 14px 10px / 8px 14px 10px 12px;
  background: var(--paper-2);
  overflow: hidden;
}
.bar i {
  display: block;
  height: 100%;
  width: var(--p);
  background: repeating-linear-gradient(115deg, var(--blue) 0 9px, var(--blue) 9px 12px, var(--blue-soft) 12px 18px);
  transform-origin: left center;
  transform: scaleX(0);
  transition: transform 1s cubic-bezier(.2, .8, .3, 1);
}
.bars.is-drawn .bar i { transform: scaleX(1); }
.bar-num { font-family: var(--font-type); font-size: .74rem; color: var(--ink-soft); text-align: right; }

/* ==========================================================================
   作品集
   ========================================================================== */
.grid-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2.6vw, 30px);
}
@media (max-width: 900px) { .grid-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .grid-cards { grid-template-columns: 1fr; } }
.wcard {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-height: 210px;
  padding: 26px 22px;
  font-family: inherit;
  color: var(--ink);
  background: var(--paper-3);
  border: var(--edge) solid var(--line);
  cursor: pointer;
  text-align: left;
  box-shadow: var(--shadow-card);
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.wcard:nth-child(2n) { --rip-bg: var(--blue-soft); transform: rotate(.7deg); }
.wcard:nth-child(3n) { --rip-bg: var(--yellow-soft); transform: rotate(-.8deg); }
.wcard:nth-child(5n) { --rip-bg: var(--red-soft); }
.wcard:hover { transform: rotate(0deg) translate(-3px, -4px); box-shadow: 8px 10px 0 rgba(27, 26, 23, .16); }
.wcard:focus-visible { outline: 3px dashed var(--blue); outline-offset: 4px; }
.wcard-icon { width: 56px; height: 56px; color: var(--ink); margin-bottom: 6px; }
.wcard-icon svg { width: 100%; height: 100%; }
.wcard-title { font-family: var(--font-hand); font-size: 1.3rem; font-weight: 700; }
.wcard-title em {
  display: block;
  font-family: var(--font-marker);
  font-style: normal;
  font-size: .62rem;
  letter-spacing: .22em;
  color: var(--ink-soft);
  margin-top: 2px;
}
.wcard-sub { font-size: .86rem; color: var(--ink-soft); }
.wcard::after {
  content: "点开看看 →";
  position: absolute;
  right: 16px;
  bottom: 14px;
  font-family: var(--font-hand);
  font-size: .78rem;
  color: var(--blue);
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity .2s ease, transform .2s ease;
}
.wcard:hover::after { opacity: 1; transform: translateX(0); }

/* ==========================================================================
   爱好（软木板 + 便利贴）
   ========================================================================== */
.board { position: relative; padding-top: 26px; }
.board-line { position: absolute; top: 0; left: 0; width: 100%; height: 40px; color: var(--ink); }

.notes {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(18px, 2.4vw, 28px);
}
@media (max-width: 980px) { .notes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .notes { grid-template-columns: 1fr; } }
.note {
  position: relative;
  margin: 0;
  padding: 26px 20px 18px;
  border: 2px solid var(--line);
  background: var(--paper-3);
  box-shadow: var(--shadow-card);
  transition: transform .22s ease, box-shadow .22s ease;
}
.note:nth-child(4n+1) { transform: rotate(-1.4deg); background: var(--yellow-soft); }
.note:nth-child(4n+2) { transform: rotate(1.1deg); background: var(--paper-2); }
.note:nth-child(4n+3) { transform: rotate(-.6deg); background: var(--blue-soft); }
.note:nth-child(4n+4) { transform: rotate(1.6deg); background: var(--red-soft); }
.note:hover { transform: rotate(0) translateY(-5px); box-shadow: 8px 12px 0 rgba(27, 26, 23, .14); z-index: 3; }
.note h3 { font-size: 1.16rem; margin: .5em 0 .35em; }
.note p { font-size: .9rem; color: var(--ink-soft); margin: 0; }

.note-ico { display: block; width: 40px; height: 40px; color: var(--ink); }
.note-ico svg { width: 100%; height: 100%; }

.tape {
  position: absolute;
  top: -12px;
  left: 50%;
  width: 84px;
  height: 24px;
  margin-left: -42px;
  background: rgba(98, 195, 201, .42);
  border-left: 1px dashed rgba(27, 26, 23, .3);
  border-right: 1px dashed rgba(27, 26, 23, .3);
  transform: rotate(-3deg);
}

/* ==========================================================================
   荣誉时间线
   ========================================================================== */
.timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.timeline::before {
  content: "";
  position: absolute;
  left: 92px;
  top: 12px;
  bottom: 12px;
  width: 3px;
  background: repeating-linear-gradient(180deg, var(--ink) 0 12px, transparent 12px 20px);
  opacity: .55;
}
.tl-item {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 30px;
  position: relative;
  padding-bottom: clamp(22px, 3.4vw, 40px);
}
.tl-item:last-child { padding-bottom: 0; }
.tl-date {
  font-family: var(--font-type);
  font-size: .82rem;
  color: var(--ink-soft);
  padding-top: 22px;
  letter-spacing: .04em;
}
.tl-dot {
  position: absolute;
  left: 84px;
  top: 26px;
  width: 19px;
  height: 19px;
  background: var(--yellow);
  border: 2.5px solid var(--line);
  border-radius: 50% 44% 52% 46%;
}
.tl-card { padding: 22px 24px; box-shadow: var(--shadow-card); }
.tl-card h3 { font-size: 1.16rem; margin-bottom: .5em; }
.tl-card p { margin-bottom: .7em; font-size: .95rem; }
.tl-card .chips { margin-top: .4em; }
.badge {
  display: inline-block;
  font-family: var(--font-marker);
  font-size: .62rem;
  letter-spacing: .1em;
  padding: 3px 10px;
  margin-left: 6px;
  vertical-align: middle;
  background: var(--yellow);
  border: 2px solid var(--line);
  border-radius: 12px 8px 14px 10px / 8px 14px 10px 12px;
  transform: rotate(-1.5deg);
}
.badge-3 { background: var(--blue-soft); }
.badge-cert { background: var(--mint); }

/* ---------- 证书墙 ---------- */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 24px);
}
.cert-card {
  display: block;
  margin: 0;
  padding: 10px 10px 12px;
  font-family: inherit;
  color: var(--ink);
  text-align: left;
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 12px 9px 14px 10px / 10px 14px 9px 12px;
  box-shadow: var(--shadow-card);
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease;
}
.cert-card:nth-child(2n) { transform: rotate(-.8deg); }
.cert-card:nth-child(3n) { transform: rotate(.7deg); }
.cert-card:hover { transform: rotate(0) translateY(-5px); box-shadow: 8px 10px 0 rgba(27, 26, 23, .16); }
.cert-card:focus-visible { outline: 3px dashed var(--blue); outline-offset: 3px; }
.cert-card img {
  display: block;
  width: 100%;
  height: 156px;
  object-fit: contain;
  background: #f4f1e8;
  border: 1px solid rgba(27, 26, 23, .18);
}
.cert-meta { display: block; margin-top: 9px; }
.cert-meta b { display: block; font-size: .86rem; line-height: 1.35; }
.cert-meta i {
  display: block;
  margin-top: 2px;
  font-family: var(--font-type);
  font-style: normal;
  font-size: .66rem;
  letter-spacing: .04em;
  color: var(--ink-soft);
}

/* ---------- 作品卡片补充 ---------- */
.grid-cards-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.wcard { min-height: 232px; }
.wcard-tag {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 2px 9px;
  font-family: var(--font-type);
  font-size: .62rem;
  letter-spacing: .08em;
  background: var(--mint);
  border: 1.6px solid var(--line);
  border-radius: 10px 7px 12px 8px / 7px 12px 8px 10px;
  transform: rotate(2deg);
}
.work-more {
  margin-top: 2.2em;
  font-size: .9rem;
  color: var(--ink-soft);
  max-width: 78ch;
  border-left: 4px solid var(--yellow);
  padding-left: 14px;
}
.work-more b { color: var(--ink); }

/* 弹窗里的下载按钮（作品制作过程 PDF 等） */
.modal-dl { margin: 1.15em 0 .2em; }
.modal-dl .btn-resume { font-size: .95rem; padding: 9px 18px; }

.awards-tail {
  margin-top: 2.4em;
  font-family: var(--font-hand);
  font-size: 1.05rem;
  padding-left: 92px;
}
.awards-tail b { border-bottom: 2px solid var(--red); }

/* ==========================================================================
   联系
   ========================================================================== */
.links-wrap { position: relative; }
.link-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: clamp(20px, 3vw, 40px);
}
.link-col h3 {
  font-size: 1.06rem;
  padding-bottom: .3em;
  border-bottom: 2px dashed rgba(27, 26, 23, .3);
}
.link-list { list-style: none; padding: 0; margin: 0; }
.link-list li {
  display: grid;
  grid-template-columns: 5.6em 1fr;
  gap: 10px;
  padding: 7px 0;
  font-size: .92rem;
  border-bottom: 1px solid rgba(27, 26, 23, .1);
}
.link-list .lk { font-family: var(--font-hand); color: var(--ink-soft); }
.link-list a { border-bottom: 2px solid var(--yellow); }
.link-list a:hover { border-bottom-color: var(--blue); color: var(--blue); }

.copy-note {
  margin-top: clamp(34px, 5vw, 60px);
  padding-top: 22px;
  border-top: 2px dashed rgba(27, 26, 23, .25);
  display: flex;
  align-items: center;
  gap: 26px;
  flex-wrap: wrap;
}
.copy-art { width: 260px; height: auto; color: var(--ink); flex: 0 0 auto; }
.copy-note p { font-size: .86rem; color: var(--ink-soft); margin: 0; max-width: 52ch; }
.copy-note a { border-bottom: 2px solid var(--mint); }

/* ==========================================================================
   悬浮播放器
   ========================================================================== */
/* 播放器图标：实心图形正常填充，线条型图标显式描边 */
.ico { fill: currentColor; stroke: none; }
.ico-collapse, .ico-expand { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
/* 暂停的双竖线用描边绘制，填充模式下会看不见 */
.ico-pause { fill: none; stroke: currentColor; stroke-width: 2.8; stroke-linecap: round; }
.player {
  position: fixed;
  left: 18px;
  top: 50%;
  z-index: 120;
  width: 272px;
  transform: translateY(-50%);
  transition: transform .3s cubic-bezier(.2, .9, .3, 1), opacity .3s ease;
}
.player[hidden] { display: none; }
.player.is-collapsed { transform: translate(-100%, -50%); opacity: 0; pointer-events: none; }
.player-inner { transition: opacity .45s ease; }
/* 静置几秒后自动变淡，避免挡住正文；hover / 触摸立刻恢复 */
.player.is-dim { opacity: .34; }
.player.is-dim:hover, .player.is-dim:focus-within { opacity: 1; }

.player-inner {
  position: relative;
  padding: 18px 18px 14px;
  background: rgba(252, 251, 247, .94);
  backdrop-filter: blur(3px);
  border: var(--edge) solid var(--line);
  border-radius: 16px 12px 18px 10px / 10px 18px 12px 16px;
  box-shadow: 6px 8px 0 rgba(27, 26, 23, .18);
}

.player-toggle {
  position: absolute;
  top: -13px;
  right: -13px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--paper-2);
  border: 2px solid var(--line);
  border-radius: 50%;
  cursor: pointer;
  transition: transform .18s ease;
}
.player-toggle:hover { transform: scale(1.12) rotate(-8deg); }
.ico-expand { display: none; }
.player.is-collapsed .ico-collapse { display: none; }
.player.is-collapsed .ico-expand { display: block; }

.player-kicker {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 8px;
  font-family: var(--font-type);
  font-size: .62rem;
  letter-spacing: .16em;
  color: var(--ink-soft);
}

.player-meta { min-height: 62px; }
.player-title {
  margin: 0;
  font-family: var(--font-hand);
  font-size: 1.14rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.player-jp {
  margin: 1px 0 0;
  font-family: var(--font-type);
  font-size: .74rem;
  color: var(--ink-soft);
  overflow-wrap: anywhere;
}
.player-artist { margin: 3px 0 0; font-size: .8rem; color: var(--ink-soft); }

.player-seek {
  position: relative;
  margin: 12px 0 4px;
  height: 16px;
  background: var(--paper-3);
  border: 2px solid var(--line);
  border-radius: 10px 7px 12px 8px / 7px 12px 8px 10px;
  cursor: pointer;
}
.player-seek:focus-visible { outline: 3px dashed var(--blue); outline-offset: 3px; }
.seek-fill {
  display: block;
  height: 100%;
  min-width: 0;
  width: 0%;
  border-radius: 8px 5px 10px 6px / 5px 10px 6px 8px;
  background: repeating-linear-gradient(115deg, var(--blue) 0 9px, var(--blue) 9px 12px, var(--blue-soft) 12px 18px);
}
.seek-knob {
  position: absolute;
  top: 50%;
  left: 8px;
  width: 15px;
  height: 15px;
  margin: -8px 0 0 -8px;
  background: var(--yellow);
  border: 2px solid var(--line);
  border-radius: 50%;
  pointer-events: none;
}
.player-times {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-type);
  font-size: .68rem;
  color: var(--ink-soft);
}

.player-ctrl {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}
.pbtn {
  flex: 1;
  display: grid;
  place-items: center;
  height: 38px;
  padding: 0;
  color: var(--ink);
  background: var(--paper-3);
  border: 2px solid var(--line);
  border-radius: 11px 8px 13px 9px / 9px 13px 8px 11px;
  cursor: pointer;
  transition: transform .16s ease, background .16s ease;
}
.pbtn:hover { background: var(--yellow-soft); transform: translateY(-2px); }
.pbtn:active { transform: translateY(0) scale(.97); }
.pbtn .ico { width: 19px; height: 19px; }
.pbtn-play { flex: 1.5; background: var(--ink); color: var(--paper-2); }
.pbtn-play:hover { background: var(--blue); color: #fff; }
.pbtn-mini { flex: .8; }
.pbtn .ico-pause { display: none; }
.player.is-playing .pbtn-play .ico-play { display: none; }
.player.is-playing .pbtn-play .ico-pause { display: block; }
.pbtn .ico-mute { display: none; }
.player.is-muted .pbtn-mini .ico-vol { display: none; }
.player.is-muted .pbtn-mini .ico-mute { display: block; }
.player.is-muted .pbtn-mini { background: var(--red-soft); }

.player-err {
  margin: 10px 0 0;
  font-size: .74rem;
  color: var(--red);
  border-top: 2px dashed rgba(178, 58, 46, .4);
  padding-top: 8px;
}

/* 跳动音柱 */
.wave { display: flex; align-items: flex-end; gap: 2px; height: 13px; }
.wave i {
  display: block;
  width: 3px;
  height: 4px;
  background: var(--blue);
  border-radius: 2px;
  animation: wave-bounce .9s ease-in-out infinite;
}
.wave i:nth-child(2) { animation-delay: .1s; }
.wave i:nth-child(3) { animation-delay: .22s; }
.wave i:nth-child(4) { animation-delay: .34s; }
.player:not(.is-playing) .wave i { animation-play-state: paused; height: 4px; }
@keyframes wave-bounce {
  0%, 100% { height: 4px; }
  50% { height: 13px; }
}

/* ==========================================================================
   页脚
   ========================================================================== */
.foot {
  text-align: center;
  padding: 34px 6vw 44px;
  background: var(--paper-2);
  background-image: var(--grain);
}
.foot-sign { font-family: var(--font-hand); font-size: 1rem; margin: 0 0 .2em; }
.foot-thanks { font-family: var(--font-type); font-size: .72rem; letter-spacing: .1em; color: var(--ink-faint); margin: 0; }

/* ==========================================================================
   弹窗
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: grid;
  place-items: center;
  padding: 5vh 4vw;
  background: rgba(27, 26, 23, .5);
  backdrop-filter: blur(2px);
  animation: fade .22s ease both;
  overflow-y: auto;
}
.modal-backdrop[hidden] { display: none; }
@keyframes fade { from { opacity: 0 } to { opacity: 1 } }

.modal {
  position: relative;
  width: min(660px, 100%);
  padding: 38px 30px 28px;
  background: var(--paper-3);
  box-shadow: 10px 12px 0 rgba(0, 0, 0, .28);
  animation: pop .28s cubic-bezier(.2, .9, .3, 1) both;
}
@keyframes pop {
  from { opacity: 0; transform: translateY(16px) rotate(-1.4deg) scale(.97); }
  to   { opacity: 1; transform: translateY(0) rotate(-.4deg) scale(1); }
}
.modal-x {
  position: absolute;
  top: 6px;
  right: 12px;
  width: 40px;
  height: 40px;
  font-size: 1.7rem;
  line-height: 1;
  font-family: var(--font-hand);
  color: var(--ink);
  background: none;
  border: 0;
  cursor: pointer;
  transition: transform .16s ease, color .16s ease;
}
.modal-x:hover { transform: rotate(90deg) scale(1.15); color: var(--red); }
.modal-kicker { font-family: var(--font-type); font-size: .72rem; letter-spacing: .14em; color: var(--ink-soft); margin-bottom: .4em; }
.modal h3 { font-size: 1.5rem; margin-bottom: .7em; }
.modal-body p { font-size: .96rem; }
.modal-body b { background: var(--yellow-soft); padding: 0 .16em; }

body.modal-open,
body.splash-lock { overflow: hidden; }

/* ==========================================================================
   弹窗内作品截图 + 图片灯箱
   ========================================================================== */
.modal-wide { width: min(940px, 100%); }
.modal-h4 {
  margin: 1.6em 0 .7em;
  padding-bottom: .25em;
  font-size: 1.05rem;
  border-bottom: 2px dashed rgba(27, 26, 23, .28);
}
.modal-body code {
  font-family: var(--font-type);
  font-size: .86em;
  background: var(--blue-soft);
  border-radius: 5px;
  padding: 1px 5px;
}
.modal-body a { border-bottom: 2px solid var(--mint); }

.shot-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.shot { margin: 0; }
.shot-btn {
  display: block;
  width: 100%;
  padding: 0;
  background: none;
  border: 2px solid var(--line);
  border-radius: 10px 7px 12px 8px / 7px 12px 8px 10px;
  overflow: hidden;
  cursor: zoom-in;
  transition: transform .18s ease, box-shadow .18s ease;
}
.shot-btn:hover { transform: translateY(-3px); box-shadow: 5px 6px 0 rgba(27, 26, 23, .16); }
.shot-btn:focus-visible { outline: 3px dashed var(--blue); outline-offset: 3px; }
.shot-btn img { display: block; width: 100%; height: auto; }
.shot figcaption {
  margin-top: 7px;
  font-size: .8rem;
  color: var(--ink-soft);
  line-height: 1.55;
}

/* 灯箱 */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: grid;
  grid-template-rows: 1fr auto;
  place-items: center;
  gap: 14px;
  padding: 4vh 3vw 5vh;
  background: rgba(20, 19, 17, .92);
  animation: fade .2s ease both;
}
.lightbox[hidden] { display: none; }
.lb-img {
  max-width: min(1200px, 96vw);
  max-height: 78vh;
  width: auto;
  height: auto;
  background: #fff;
  border: 3px solid #fff;
  border-radius: 6px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .5);
}
.lb-cap {
  margin: 0;
  max-width: 78ch;
  text-align: center;
  font-family: var(--font-hand);
  font-size: .92rem;
  color: #f2f0e8;
}
.lb-close {
  position: absolute;
  top: 14px;
  right: 18px;
  width: 44px;
  height: 44px;
  font-family: var(--font-hand);
  font-size: 1.9rem;
  line-height: 1;
  color: #f2f0e8;
  background: rgba(255, 255, 255, .1);
  border: 2px solid rgba(255, 255, 255, .5);
  border-radius: 50%;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease;
}
.lb-close:hover { transform: rotate(90deg) scale(1.1); background: rgba(255, 255, 255, .22); }

.pen-cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 300;
  width: 26px;
  height: 26px;
  pointer-events: none;
  opacity: 0;
  transition: opacity .2s ease, transform .06s linear;
  will-change: transform;
}
.pen-cursor svg { width: 100%; height: 100%; transform: rotate(-12deg); }
.pen-cursor.is-live { opacity: .9; }

/* ==========================================================================
   滚动出现动画
   ========================================================================== */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s cubic-bezier(.2, .8, .3, 1); }
.reveal.in { opacity: 1; transform: none; }

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

/* ==========================================================================
   响应式
   ========================================================================== */
@media (max-width: 1000px) {
  .hero { grid-template-columns: 1fr; }
  .hero-art { order: -1; }
  .about-grid { grid-template-columns: 1fr; }
  .about-photo { position: static; max-width: 340px; }
  .awards-tail { padding-left: 0; }
  .cert-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .shot-grid { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .grid-cards { grid-template-columns: 1fr; }
  .grid-cards-2 { grid-template-columns: 1fr; }
  .cert-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cert-card img { height: 118px; }
}
@media (max-width: 420px) {
  .cert-grid { grid-template-columns: 1fr; }
  .cert-card img { height: 170px; }
}

@media (max-width: 760px) {
  body { font-size: 17px; }
  .rail { display: none; }
  .nav { padding: 7px 10px; gap: 5px; flex-wrap: nowrap; }
  .nav-logo { width: 36px; height: 36px; }
  .nav-actions { order: 2; gap: 4px; }
  .nav-links {
    order: 3;
    gap: 9px;
    flex: 1 1 auto;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-links a { font-size: .88rem; white-space: nowrap; }
  .nm-label { display: none; }
  .nm-btn { padding: 0 8px; height: 33px; gap: 4px; }
  .nm-ico { width: 15px; height: 15px; }
  .section { padding: 48px 0; }
  .facts > div { grid-template-columns: 1fr; gap: 0; }
  .bars li { grid-template-columns: 1fr 2.6em; }
  .bars .bar { grid-column: 1 / -1; order: 3; }
  .timeline::before { left: 6px; }
  .tl-item { grid-template-columns: 1fr; gap: 6px; padding-left: 30px; }
  .tl-date { padding-top: 0; }
  .tl-dot { left: -1px; top: 4px; }
  .modal { padding: 34px 20px 22px; }
  .pen-cursor { display: none; }
  .doodle-note { position: static; transform: none; margin-top: 10px; }
  .copy-art { width: 100%; max-width: 260px; }
}

@media (max-width: 1280px) {
  /* 窄屏收起侧栏，播放器缩到右下角 */
  .player { left: auto; right: 14px; top: auto; bottom: 14px; width: 256px; transform: none; }
  .player.is-collapsed { transform: translateX(calc(100% + 24px)); opacity: 0; }
  .player-inner { padding: 14px 14px 12px; }
  .player-meta { min-height: 54px; }
  .player-title { font-size: 1.04rem; }
}

/* 视口不够高时把播放器挪到左下角，避免挡住首屏按钮 */
@media (min-width: 1281px) and (max-height: 940px) {
  .player { top: auto; bottom: 22px; transform: none; }
  .player.is-collapsed { transform: translateX(calc(-100% - 24px)); opacity: 0; }
}
