/* ============================================================
   模板 B · 个人名片 / 简历主页
   颜色、文字都在 index.html 顶部的「配置区」改，这个文件一般不用动。
   ============================================================ */

:root {
  /* 这里是默认值，会被 index.html 配置区里的 colors 覆盖 */
  --main: #3657FF;   --main-rgb: 54, 87, 255;
  --main2: #8A4DFF;  --main2-rgb: 138, 77, 255;
  --accent: #FFD84A; --accent-rgb: 255, 216, 74;
  --bg: #F1F4FF;     --bg-rgb: 241, 244, 255;
  --ink: #10163A;    --ink-rgb: 16, 22, 58;

  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --num: "DIN Alternate", "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
ul, ol { list-style: none; }
img, svg { display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
h1, h2, h3 { font-weight: 800; }

.wrap {
  max-width: 560px; margin: 0 auto;
  padding: 0 16px 36px;
  padding-bottom: calc(36px + env(safe-area-inset-bottom));
}

/* ============================================================
   顶部小条：示例标签 + 状态
   ============================================================ */
.topbar {
  display: -webkit-flex; display: flex; -webkit-align-items: center; align-items: center;
  -webkit-justify-content: space-between; justify-content: space-between;
  height: 58px; padding: 0 4px;
}
.demo-tag {
  padding: 0 12px; border-radius: 999px;
  background: rgba(var(--ink-rgb), .07); color: rgba(var(--ink-rgb), .68);
  font-size: 12px; font-weight: 600; letter-spacing: .12em; line-height: 26px;
}
.status {
  display: -webkit-inline-flex; display: inline-flex; -webkit-align-items: center; align-items: center;
  margin-left: auto; padding: 0 13px 0 11px; border-radius: 999px;
  background: #DFF8EA; color: #0A8A4C;
  font-size: 13px; font-weight: 600; line-height: 28px;
}
.status i {
  width: 8px; height: 8px; margin-right: 7px; border-radius: 50%; background: #12B76A;
  -webkit-animation: pulse 2s ease-out infinite; animation: pulse 2s ease-out infinite;
}
.status b { font-weight: 600; }

/* ============================================================
   名片卡
   ============================================================ */
.hero {
  position: relative; overflow: hidden;
  padding: 26px 24px 20px; border-radius: 30px;
  color: #fff;
  background: var(--main);
  background: linear-gradient(150deg, var(--main) 8%, var(--main2) 100%);
  box-shadow: 0 24px 44px -14px rgba(var(--main-rgb), .6);
}
.hero > * { position: relative; z-index: 2; }
.hero-deco { position: absolute; left: 0; top: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }
.hero-deco i, .hero-deco svg { position: absolute; display: block; }
.d-circle { right: -74px; top: -86px; width: 270px; height: 270px; border-radius: 50%; background: rgba(255, 255, 255, .13); }
.d-ring { right: -58px; bottom: -70px; width: 190px; height: 190px; border-radius: 50%; border: 28px solid rgba(255, 255, 255, .1); }
.d-blob { left: -40px; bottom: 74px; width: 96px; height: 96px; border-radius: 50%; background: rgba(255, 255, 255, .07); }
.d-dots { right: 26px; top: 138px; width: 66px; height: 50px; opacity: .38; }
.d-star { right: 34px; top: 34px; width: 34px; height: 34px; fill: var(--accent); -webkit-animation: twinkle 3s ease-in-out infinite; animation: twinkle 3s ease-in-out infinite; }
.d-star-2 { right: 78px; top: 76px; width: 15px; height: 15px; fill: #fff; -webkit-animation-delay: 1.2s; animation-delay: 1.2s; }
.d-wave { right: 22px; top: 106px; width: 74px; height: 13px; }
.d-wave path { stroke: rgba(255, 255, 255, .5); }

.avatar {
  display: -webkit-flex; display: flex; -webkit-align-items: center; align-items: center; -webkit-justify-content: center; justify-content: center;
  width: 92px; height: 92px; border-radius: 50%; overflow: hidden;
  border: 4px solid #fff;
  background: var(--accent); color: var(--ink);
  font-size: 42px; font-weight: 800; line-height: 1;
  box-shadow: 0 12px 24px rgba(0, 0, 0, .2);
}
.avatar img, .avatar svg { width: 100%; height: 100%; object-fit: cover; }
.hello { margin-top: 18px; font-size: 16px; line-height: 1.4; color: rgba(255, 255, 255, .88); }
.name {
  margin-top: 2px;
  font-size: 56px; line-height: 1.16; letter-spacing: .05em;
  -webkit-text-stroke: 1px #fff;
}
/* 名字超过 4 个字时自动缩小（main.js 按字数加 len-5 / len-6 / len-7） */
.name.len-5 { font-size: 48px; }
.name.len-6 { font-size: 41px; }
.name.len-7 { font-size: 34px; letter-spacing: .02em; }
.name-en { margin-top: 3px; font-size: 12px; font-weight: 600; letter-spacing: .34em; color: rgba(255, 255, 255, .72); }
.role { margin-top: 16px; }
.role span {
  display: inline-block; padding: 0 14px; border-radius: 10px;
  background: var(--accent); color: var(--ink);
  font-size: 16px; font-weight: 700; line-height: 34px; letter-spacing: .04em;
  -webkit-transform: rotate(-2deg); transform: rotate(-2deg);
  box-shadow: 0 6px 14px rgba(0, 0, 0, .14);
}
.intro { margin-top: 16px; font-size: 16px; line-height: 1.7; color: rgba(255, 255, 255, .95); white-space: pre-line; }
.tags { display: -webkit-flex; display: flex; -webkit-flex-wrap: wrap; flex-wrap: wrap; margin-top: 16px; }
.tags li {
  margin: 0 8px 8px 0; padding: 0 12px; border-radius: 999px;
  background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .3);
  font-size: 13px; font-weight: 600; line-height: 28px;
}
.city {
  display: -webkit-flex; display: flex; -webkit-align-items: center; align-items: center;
  margin-top: 10px; padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, .2);
  font-size: 13.5px; color: rgba(255, 255, 255, .88);
}
.city svg { width: 17px; height: 17px; margin-right: 6px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* 首屏入场 */
.hero { -webkit-animation: rise .8s cubic-bezier(.2, .8, .2, 1) both; animation: rise .8s cubic-bezier(.2, .8, .2, 1) both; }
.avatar { -webkit-animation: pop .7s cubic-bezier(.2, .8, .2, 1) .15s both; animation: pop .7s cubic-bezier(.2, .8, .2, 1) .15s both; }
.contacts { -webkit-animation: rise .8s cubic-bezier(.2, .8, .2, 1) .2s both; animation: rise .8s cubic-bezier(.2, .8, .2, 1) .2s both; }

/* ============================================================
   联系方式
   ============================================================ */
.contacts {
  margin-top: 14px; padding: 4px 16px 4px 16px; border-radius: 24px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(var(--main-rgb), .1);
}
.contacts li { display: -webkit-flex; display: flex; -webkit-align-items: center; align-items: center; padding: 13px 0; }
.contacts li + li { border-top: 1px solid rgba(var(--ink-rgb), .07); }
.c-ic {
  -webkit-flex: none; flex: none;
  display: -webkit-flex; display: flex; -webkit-align-items: center; align-items: center; -webkit-justify-content: center; justify-content: center;
  width: 42px; height: 42px; margin-right: 12px; border-radius: 13px;
  background: var(--main); color: #fff;
}
.c-ic svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.c-wechat { background: #1DBF6A; }
.c-email { background: #FF8A3D; }
.c-link { background: var(--ink); }
.c-place { background: #FF5C8A; }
.c-tx { -webkit-flex: 1; flex: 1; min-width: 0; }
.c-k { font-size: 12px; line-height: 1.4; color: rgba(var(--ink-rgb), .55); }
.c-v { /* 太长时最多显示两行 */
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
  font-size: 15.5px; font-weight: 600; line-height: 1.45; word-break: break-all;
}
.c-copy {
  -webkit-flex: none; flex: none; height: 34px; margin-left: 10px; padding: 0 14px; border-radius: 999px;
  background: rgba(var(--main-rgb), .09); color: var(--main);
  font-size: 13px; font-weight: 700;
  -webkit-transition: background .2s ease; transition: background .2s ease;
}
.c-copy:active { background: rgba(var(--main-rgb), .2); }
.c-copy:focus-visible, .btn:focus-visible { outline: 3px solid var(--main); outline-offset: 2px; }

/* ============================================================
   下面的各个板块
   ============================================================ */
.sec { padding-top: 46px; }
.sec-head {
  display: -webkit-flex; display: flex; -webkit-align-items: baseline; align-items: baseline;
  -webkit-justify-content: space-between; justify-content: space-between;
  margin-bottom: 16px; padding: 0 4px;
}
.sec-head h2 { font-size: 27px; line-height: 1.3; letter-spacing: .02em; }
.sec-head h2 span {
  padding: 0 5px; margin-left: -5px;
  background: linear-gradient(rgba(255, 255, 255, 0) 58%, var(--accent) 58%, var(--accent) 92%, rgba(255, 255, 255, 0) 92%);
}
.sec-head em { font-style: normal; font-size: 11px; font-weight: 600; letter-spacing: .3em; color: rgba(var(--ink-rgb), .36); }

.panel {
  padding: 22px; border-radius: 24px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(var(--main-rgb), .08);
}

/* 关于我 */
.about p { font-size: 16px; line-height: 1.85; color: rgba(var(--ink-rgb), .86); }
.about p + p { margin-top: 10px; }
.points { margin-top: 14px; padding-top: 8px; border-top: 1px dashed rgba(var(--ink-rgb), .14); }
.points li { display: -webkit-flex; display: flex; -webkit-align-items: center; align-items: center; padding: 8px 0 0; font-size: 15.5px; font-weight: 600; }
.points svg {
  -webkit-flex: none; flex: none; width: 22px; height: 22px; margin-right: 10px; padding: 4px; border-radius: 50%;
  background: rgba(var(--main-rgb), .1);
  fill: none; stroke: var(--main); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round;
}

/* 服务 */
.services { display: -webkit-flex; display: flex; -webkit-flex-wrap: wrap; flex-wrap: wrap; margin: -6px; }
.services li { width: 50%; padding: 6px; }
.svc {
  height: 100%; padding: 18px 16px 18px; border-radius: 22px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(var(--main-rgb), .08);
  -webkit-transition: -webkit-transform .25s ease, box-shadow .25s ease; transition: transform .25s ease, box-shadow .25s ease;
}
.svc-ic {
  display: -webkit-flex; display: flex; -webkit-align-items: center; align-items: center; -webkit-justify-content: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 15px;
  background: var(--main); color: #fff;
}
.svc-ic svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.services li:nth-child(4n+2) .svc-ic { background: #FF7A45; }
.services li:nth-child(4n+3) .svc-ic { background: #12B76A; }
.services li:nth-child(4n+4) .svc-ic { background: #FF5C8A; }
.svc b { display: block; margin-top: 14px; font-size: 17px; font-weight: 700; line-height: 1.4; }
.svc-d { display: block; margin-top: 4px; font-size: 13.5px; line-height: 1.65; color: rgba(var(--ink-rgb), .66); }

/* 作品 */
.works { display: -webkit-flex; display: flex; -webkit-flex-wrap: wrap; flex-wrap: wrap; margin: -6px; }
.works li { width: 50%; padding: 6px; }
.work {
  overflow: hidden; border-radius: 22px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(var(--main-rgb), .08);
  -webkit-transition: -webkit-transform .25s ease; transition: transform .25s ease;
}
.work-art { position: relative; height: 0; padding-top: 112%; overflow: hidden; background: rgba(var(--main-rgb), .1); }
.work-art svg, .work-art img { position: absolute; left: 0; top: 0; width: 100%; height: 100%; object-fit: cover; }
.work-tx { padding: 12px 14px 14px; }
.work-tx b { display: block; font-size: 16px; font-weight: 700; line-height: 1.4; }
.work-tx span { display: block; font-size: 12.5px; line-height: 1.5; color: rgba(var(--ink-rgb), .6); }
.works-note { margin-top: 14px; font-size: 12px; text-align: center; color: rgba(var(--ink-rgb), .5); }

/* 合作流程 */
.steps { display: -webkit-flex; display: flex; -webkit-flex-wrap: wrap; flex-wrap: wrap; margin: -6px; }
.steps li { width: 50%; padding: 6px; }
.step {
  position: relative; height: 100%; padding: 14px 16px 16px; border-radius: 22px; overflow: hidden;
  background: #fff;
  box-shadow: 0 12px 30px rgba(var(--main-rgb), .08);
}
.step i {
  display: block;
  font-family: var(--num); font-style: normal; font-size: 36px; font-weight: 700; line-height: 1.1;
  color: var(--main);
  background: linear-gradient(135deg, var(--main), var(--main2));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.step b { display: block; margin-top: 6px; font-size: 17px; font-weight: 700; line-height: 1.4; }
.step-d { display: block; margin-top: 2px; font-size: 13.5px; line-height: 1.6; color: rgba(var(--ink-rgb), .66); }

/* 经历 */
.exp { padding-bottom: 8px; }
.exp li { position: relative; padding: 0 0 20px 24px; }
.exp li::before {
  content: ""; position: absolute; left: 0; top: 6px; width: 12px; height: 12px; border-radius: 50%;
  background: #fff; border: 3px solid var(--main);
}
.exp li::after { content: ""; position: absolute; left: 5px; top: 22px; bottom: -2px; width: 2px; background: rgba(var(--main-rgb), .16); }
.exp li:last-child::after { display: none; }
.exp-time { font-family: var(--num); font-size: 14px; font-weight: 700; letter-spacing: .02em; color: var(--main); }
.exp b { display: block; margin-top: 1px; font-size: 17px; font-weight: 700; line-height: 1.45; }
.exp span { display: block; margin-top: 2px; font-size: 14px; line-height: 1.65; color: rgba(var(--ink-rgb), .66); }

/* 结尾 */
.closing {
  position: relative; overflow: hidden;
  margin-top: 46px; padding: 30px 24px 24px; border-radius: 30px;
  color: #fff;
  background: var(--main);
  background: linear-gradient(150deg, var(--main) 8%, var(--main2) 100%);
  box-shadow: 0 24px 44px -14px rgba(var(--main-rgb), .6);
}
.closing > * { position: relative; z-index: 2; }
.closing-deco { position: absolute; left: 0; top: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }
.closing-deco i { position: absolute; display: block; }
.closing h2 { font-size: 30px; line-height: 1.3; letter-spacing: .02em; }
.closing p { margin-top: 6px; font-size: 15.5px; line-height: 1.7; color: rgba(255, 255, 255, .92); }
.btn {
  display: -webkit-inline-flex; display: inline-flex; -webkit-align-items: center; align-items: center; -webkit-justify-content: center; justify-content: center;
  height: 54px; margin-top: 20px; padding: 0 26px; border-radius: 999px;
  background: var(--accent); color: var(--ink);
  font-size: 17px; font-weight: 800; letter-spacing: .04em;
  box-shadow: 0 6px 0 rgba(0, 0, 0, .16), 0 16px 26px rgba(0, 0, 0, .16);
  -webkit-transition: -webkit-transform .15s ease, box-shadow .15s ease; transition: transform .15s ease, box-shadow .15s ease;
}
.btn:active { -webkit-transform: translateY(4px); transform: translateY(4px); box-shadow: 0 2px 0 rgba(0, 0, 0, .16), 0 8px 14px rgba(0, 0, 0, .16); }
.btn svg { width: 20px; height: 20px; margin-right: 8px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.qr {
  display: -webkit-flex; display: flex; -webkit-align-items: center; align-items: center; -webkit-justify-content: center; justify-content: center;
  height: 84px; margin-top: 22px; padding: 10px; border-radius: 18px;
  border: 2px dashed rgba(255, 255, 255, .6);
  font-size: 13.5px; line-height: 1.5; text-align: center; color: rgba(255, 255, 255, .92); white-space: pre-line;
}
.qr.has-img { width: 132px; height: 132px; padding: 8px; border: 0; background: #fff; }
.qr img { width: 100%; height: 100%; object-fit: contain; border-radius: 10px; }

.foot-note { margin-top: 28px; font-size: 12px; text-align: center; letter-spacing: .04em; color: rgba(var(--ink-rgb), .48); }

/* 轻提示 */
.toast {
  position: fixed; left: 50%; bottom: 12%; z-index: 50;
  max-width: 300px; width: -webkit-max-content; width: max-content; padding: 11px 18px; border-radius: 14px;
  background: rgba(var(--ink-rgb), .94); color: #fff;
  font-size: 14px; line-height: 1.5; text-align: center;
  opacity: 0; pointer-events: none;
  -webkit-transform: translate(-50%, 10px); transform: translate(-50%, 10px);
  -webkit-transition: opacity .25s ease, -webkit-transform .25s ease; transition: opacity .25s ease, transform .25s ease;
}
.toast.show { opacity: 1; -webkit-transform: translate(-50%, 0); transform: translate(-50%, 0); }

/* ============================================================
   动效
   ============================================================ */
.js .reveal {
  opacity: 0;
  -webkit-transform: translateY(22px); transform: translateY(22px);
  -webkit-transition: opacity .7s ease, -webkit-transform .7s cubic-bezier(.2, .8, .2, 1);
  transition: opacity .7s ease, transform .7s cubic-bezier(.2, .8, .2, 1);
}
.js .reveal.in { opacity: 1; -webkit-transform: none; transform: none; }

@-webkit-keyframes rise { from { opacity: 0; -webkit-transform: translateY(22px); } to { opacity: 1; -webkit-transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@-webkit-keyframes pop { 0% { opacity: 0; -webkit-transform: scale(.7); } 70% { opacity: 1; -webkit-transform: scale(1.06); } 100% { opacity: 1; -webkit-transform: none; } }
@keyframes pop { 0% { opacity: 0; transform: scale(.7); } 70% { opacity: 1; transform: scale(1.06); } 100% { opacity: 1; transform: none; } }
@-webkit-keyframes twinkle { 0%, 100% { opacity: 1; -webkit-transform: scale(1) rotate(0deg); } 50% { opacity: .5; -webkit-transform: scale(.72) rotate(20deg); } }
@keyframes twinkle { 0%, 100% { opacity: 1; transform: scale(1) rotate(0deg); } 50% { opacity: .5; transform: scale(.72) rotate(20deg); } }
@-webkit-keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(18, 183, 106, .55); } 100% { box-shadow: 0 0 0 9px rgba(18, 183, 106, 0); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(18, 183, 106, .55); } 100% { box-shadow: 0 0 0 9px rgba(18, 183, 106, 0); } }

@media (hover: hover) {
  .svc:hover, .work:hover { -webkit-transform: translateY(-4px); transform: translateY(-4px); }
  .c-copy:hover { background: rgba(var(--main-rgb), .16); }
  .btn:hover { -webkit-transform: translateY(-2px); transform: translateY(-2px); }
}

/* 系统开了「减弱动态效果」，或者截图模式：不做动画，直接显示 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { -webkit-animation: none !important; animation: none !important; -webkit-transition: none !important; transition: none !important; }
  .js .reveal { opacity: 1; -webkit-transform: none; transform: none; }
}
.shot *, .shot *::before, .shot *::after { -webkit-animation: none !important; animation: none !important; -webkit-transition: none !important; transition: none !important; }
.shot .reveal { opacity: 1 !important; -webkit-transform: none !important; transform: none !important; }

/* ============================================================
   屏幕尺寸适配
   ============================================================ */
@media (max-width: 360px) {
  .wrap { padding-left: 12px; padding-right: 12px; }
  .hero { padding-left: 20px; padding-right: 20px; }
  .name { font-size: 48px; }
  .name.len-5 { font-size: 42px; }
  .name.len-6 { font-size: 36px; }
  .name.len-7 { font-size: 30px; }
  .svc, .step { padding-left: 14px; padding-right: 14px; }
}

/* 平板：内容居中，板块排宽一点 */
@media (min-width: 600px) {
  .wrap { padding-top: 12px; }
  .steps li { width: 25%; }
}

/* 电脑：左边固定名片，右边滚动看内容 */
@media (min-width: 980px) {
  .wrap {
    display: -webkit-flex; display: flex; -webkit-align-items: flex-start; align-items: flex-start;
    max-width: 1140px; padding: 28px 32px 64px;
  }
  .side { -webkit-flex: none; flex: none; width: 404px; margin-right: 48px; position: -webkit-sticky; position: sticky; top: 20px; }
  .main { -webkit-flex: 1; flex: 1; min-width: 0; }
  .main .sec:first-child { padding-top: 58px; }
  .sec { padding-top: 56px; }
  .sec-head h2 { font-size: 30px; }
  .panel { padding: 28px; }
  .about p { font-size: 17px; }
  .svc { padding: 24px 22px; }
  .svc b { font-size: 19px; }
  .svc-d { font-size: 15px; }
  .work-art { padding-top: 96%; }
  .work-tx { padding: 14px 18px 16px; }
  .work-tx b { font-size: 18px; }
  .work-tx span { font-size: 14px; }
  .steps li { width: 25%; }
  .closing { display: -webkit-flex; display: flex; -webkit-align-items: center; align-items: center; margin-top: 56px; padding: 36px 36px; }
  .closing-tx { -webkit-flex: 1; flex: 1; }
  .closing h2 { font-size: 34px; }
  .qr { -webkit-flex: none; flex: none; width: 132px; height: 132px; margin: 0 0 0 28px; }
}
