/* ============================================================
   作品集样式
   设计变量全部集中在 :root —— 换皮时只需要改这一块。
   Stitch / Figma 给的配色和字体，替换对应变量即可全局生效。
   ============================================================ */

:root {
  /* 颜色 —— 深色为唯一主题。刻意保持低饱和、无光晕，
     避免那种一眼就认得出的「AI 产品页」观感。 */
  --bg: #0f1115;
  --bg-soft: #14171c;
  --surface: #171a20;
  --text: #e8ebf0;
  --muted: #98a1ae;
  --faint: #6b7481;
  --border: #24282f;
  --border-strong: #343a44;
  --accent: #86a8ff;
  --accent-hover: #a8c2ff;
  --accent-weak: #1a2133;
  --accent-text: #0c1017;
  --ok: #64c894;

  /* 排版 */
  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans SC", "PingFang SC", "Microsoft YaHei",
    sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Courier New",
    monospace;
  --prose: 68ch;
  --container: 1080px;

  /* 形状与阴影 */
  --radius: 14px;
  --radius-sm: 9px;
  --radius-pill: 999px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 10px 30px rgba(0, 0, 0, 0.32);
  --shadow-hover: 0 2px 6px rgba(0, 0, 0, 0.55), 0 18px 42px rgba(0, 0, 0, 0.45);

  /* 节奏 */
  --gap: 24px;
  --section-y: clamp(56px, 8vw, 96px);
}

/* ------------------------------ 基础 ------------------------------ */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16.5px;
  line-height: 1.72;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
video,
svg {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent);
  text-decoration: none;
  text-underline-offset: 3px;
}

a:hover {
  text-decoration: underline;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 48px 0;
}

::selection {
  background: var(--accent-weak);
  color: var(--text);
}

/* --------------------------- 布局容器 --------------------------- */

.wrap {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 22px;
}

.prose {
  max-width: var(--prose);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--accent-text);
  padding: 10px 16px;
  border-radius: 0 0 var(--radius-sm) 0;
  z-index: 100;
}

.skip-link:focus {
  left: 0;
}

/* ---------------------------- 顶栏 ---------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  /* 毛玻璃只用在吸顶导航这一处：它是真有遮挡需求的地方，
     不是拿来做装饰的。 */
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: saturate(1.4) blur(18px);
  -webkit-backdrop-filter: saturate(1.4) blur(18px);
  border-bottom: 1px solid var(--border);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 62px;
}

.brand {
  font-weight: 650;
  font-size: 15.5px;
  color: var(--text);
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.brand:hover {
  text-decoration: none;
  color: var(--accent);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14.5px;
  flex-wrap: wrap;
}

.site-nav a {
  color: var(--muted);
  padding: 7px 11px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

.site-nav a:hover {
  color: var(--text);
  background: var(--bg-soft);
  text-decoration: none;
}

.site-nav a[aria-current="page"] {
  color: var(--text);
  font-weight: 600;
}

.site-nav .nav-cta {
  color: var(--accent);
  border: 1px solid var(--border-strong);
}

.site-nav .nav-cta:hover {
  background: var(--accent-weak);
  border-color: var(--accent);
}

/* ----------------------------- 区块 ----------------------------- */

.section {
  padding-block: var(--section-y);
  border-top: 1px solid var(--border);
}

.section--flush {
  border-top: 0;
}

.section--tint {
  background: var(--bg-soft);
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(20px, 2.4vw, 25px);
  letter-spacing: -0.018em;
  font-weight: 650;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 14.5px;
}

.eyebrow {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 18px;
}

/* ---------------------------- 首屏 ---------------------------- */

.hero {
  padding-block: clamp(64px, 11vw, 132px) clamp(52px, 8vw, 92px);
  /* 一层极淡的纵向渐变，做出「顶部有光」的层次；
     不用径向光斑——那是 AI 模板最容易识别的特征。 */
  background: linear-gradient(180deg, #151920 0%, var(--bg) 70%);
}

.hero h1 {
  margin: 0 0 22px;
  font-size: clamp(30px, 4.6vw, 50px);
  line-height: 1.2;
  letter-spacing: -0.028em;
  font-weight: 680;
  max-width: 20ch;
}

.hero h1 em {
  font-style: normal;
  color: var(--accent);
}

.hero .lede {
  margin: 0 0 34px;
  font-size: clamp(16.5px, 1.9vw, 19px);
  color: var(--muted);
  max-width: 60ch;
  line-height: 1.68;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: var(--radius-pill);
  font-size: 15px;
  font-weight: 570;
  border: 1px solid transparent;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.btn:hover {
  text-decoration: none;
}

.btn--primary {
  background: var(--accent);
  color: var(--accent-text);
}

.btn--primary:hover {
  background: var(--accent-hover);
}

.btn--ghost {
  border-color: var(--border-strong);
  color: var(--text);
}

.btn--ghost:hover {
  background: var(--bg-soft);
  border-color: var(--faint);
}

.hero-meta {
  margin-top: 54px;
  padding-top: 26px;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(158px, 1fr));
  gap: 22px 30px;
}

.hero-meta > div {
  padding-left: 15px;
  border-left: 2px solid color-mix(in srgb, var(--accent) 45%, transparent);
}

.hero-meta .n {
  display: block;
  font-size: clamp(22px, 2.6vw, 27px);
  font-weight: 680;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.hero-meta .l {
  display: block;
  margin-top: 5px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--muted);
}

/* ---------------------------- 卡片 ---------------------------- */

.grid {
  display: grid;
  gap: var(--gap);
  grid-template-columns: repeat(auto-fit, minmax(288px, 1fr));
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

a.card {
  color: inherit;
}

a.card:hover {
  text-decoration: none;
}

.card-media {
  aspect-ratio: 16 / 10;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
  display: grid;
  place-items: center;
  color: var(--faint);
  font-size: 13px;
  text-align: center;
  padding: 16px;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s cubic-bezier(0.2, 0.7, 0.3, 1);
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .card:hover .card-media img {
    transform: scale(1.045);
  }
}

.card-body {
  padding: 22px 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.card h3 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.012em;
  font-weight: 630;
  line-height: 1.4;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 14.8px;
  line-height: 1.68;
}

.card-foot {
  margin-top: auto;
  padding-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  font-size: 12.5px;
  color: var(--muted);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

.tag--accent {
  color: var(--accent);
  background: var(--accent-weak);
  border-color: transparent;
  font-weight: 570;
}

/* ------------------------ 指标 / 成果 ------------------------ */

.stats {
  display: grid;
  gap: var(--gap);
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.stat {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  background: var(--surface);
}

.stat .num {
  font-size: clamp(26px, 3.4vw, 34px);
  font-weight: 680;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.stat .label {
  font-size: 14px;
  color: var(--muted);
  margin-top: 6px;
}

/* --------------------------- 列表式条目 --------------------------- */

.list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.list > li {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 24px;
  padding: 22px 0;
  border-top: 1px solid var(--border);
}

.list > li:first-child {
  border-top: 0;
  padding-top: 0;
}

.list .when {
  color: var(--faint);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  padding-top: 2px;
}

.list h3 {
  margin: 0 0 4px;
  font-size: 16.5px;
  font-weight: 620;
  letter-spacing: -0.008em;
}

.list .role {
  color: var(--muted);
  font-size: 14.5px;
  margin: 0 0 10px;
}

.list .detail {
  margin: 0;
  color: var(--muted);
  font-size: 14.8px;
}

/* --------------------------- 正文排版 --------------------------- */

.prose h2 {
  margin: 56px 0 16px;
  font-size: clamp(20px, 2.3vw, 24px);
  letter-spacing: -0.018em;
  font-weight: 650;
  scroll-margin-top: 84px;
}

.prose h3 {
  margin: 36px 0 12px;
  font-size: 17.5px;
  letter-spacing: -0.01em;
  font-weight: 630;
}

.prose h2:first-child,
.prose h3:first-child {
  margin-top: 0;
}

.prose p,
.prose ul,
.prose ol {
  margin: 0 0 18px;
}

.prose ul,
.prose ol {
  padding-left: 22px;
}

.prose li {
  margin-bottom: 9px;
}

.prose li::marker {
  color: var(--faint);
}

.prose strong {
  font-weight: 640;
}

.prose blockquote {
  margin: 0 0 22px;
  padding: 4px 0 4px 20px;
  border-left: 3px solid var(--accent);
  color: var(--muted);
}

.prose blockquote p:last-child {
  margin-bottom: 0;
}

.prose code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1px 5px;
}

/* 提示框：案例里用来放"关键决策""取舍"这类高亮内容 */

.callout {
  margin: 26px 0;
  padding: 20px 22px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
}

.callout h3,
.callout h4 {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 640;
  letter-spacing: 0;
}

.callout p:last-child,
.callout ul:last-child {
  margin-bottom: 0;
}

.callout--warn {
  border-left-color: #c9821f;
}

/* 表格 */

.table-scroll {
  overflow-x: auto;
  margin: 0 0 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14.5px;
  min-width: 460px;
}

th,
td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

th {
  background: var(--bg-soft);
  font-weight: 620;
  white-space: nowrap;
}

tr:last-child td {
  border-bottom: 0;
}

/* --------------------------- 案例页头部 --------------------------- */

.case-hero {
  padding-block: clamp(48px, 8vw, 88px) 40px;
  background: linear-gradient(180deg, #151920 0%, var(--bg) 70%);
}

.case-hero h1 {
  margin: 0 0 20px;
  font-size: clamp(27px, 3.9vw, 40px);
  line-height: 1.24;
  letter-spacing: -0.024em;
  font-weight: 670;
  max-width: 26ch;
}

.case-hero .subtitle {
  margin: 0 0 28px;
  font-size: clamp(16px, 1.85vw, 18.5px);
  color: var(--muted);
  max-width: 62ch;
}

.facts {
  display: grid;
  gap: 18px 32px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  padding: 22px 0 0;
  border-top: 1px solid var(--border);
}

.facts dt {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 4px;
}

.facts dd {
  margin: 0;
  font-size: 15px;
}

.tldr {
  margin-top: 34px;
  padding: 24px 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-soft);
}

.tldr h2 {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
}

.tldr p {
  margin: 0;
  font-size: 16.5px;
  line-height: 1.7;
}

.tldr p + p {
  margin-top: 12px;
}

/* --------------------------- 上下页 --------------------------- */

.pager {
  display: grid;
  gap: var(--gap);
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  padding-block: 48px;
  border-top: 1px solid var(--border);
}

.pager a {
  display: block;
  padding: 20px 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: inherit;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.pager a:hover {
  text-decoration: none;
  border-color: var(--accent);
  background: var(--accent-weak);
}

.pager .dir {
  font-size: 12.5px;
  color: var(--faint);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 600;
}

.pager .title {
  margin-top: 6px;
  font-weight: 620;
  font-size: 16px;
}

/* ---------------------------- 页脚 ---------------------------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding-block: 44px 56px;
  font-size: 14.5px;
  color: var(--muted);
}

.site-footer .cols {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 26px;
}

.site-footer h2 {
  margin: 0 0 10px;
  font-size: 15px;
  color: var(--text);
  font-weight: 620;
}

.site-footer a {
  color: var(--muted);
}

.site-footer a:hover {
  color: var(--accent);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* --------------------------- 提示条 --------------------------- */

/* 内容还没填完时会显示，填完请删掉对应元素 */
.todo {
  border: 1px dashed #c9821f;
  background: color-mix(in srgb, #c9821f 8%, transparent);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 14px;
  color: var(--text);
  margin-bottom: 26px;
}

.todo strong {
  color: #e6ab52;
}

/* --------------------------- 响应式 --------------------------- */

@media (max-width: 720px) {
  body {
    font-size: 16px;
  }

  .site-header .wrap {
    min-height: 56px;
  }

  .site-nav {
    gap: 0;
    font-size: 14px;
  }

  .site-nav a {
    padding: 6px 9px;
  }

  .list > li {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .list .when {
    padding-top: 0;
  }

  .hero-meta {
    gap: 18px 22px;
  }

  .card-body {
    padding: 20px 18px 22px;
  }
}

@media (max-width: 430px) {
  .site-nav .nav-secondary {
    display: none;
  }
}

/* --------------------------- 打印 / 存 PDF --------------------------- */

@media print {
  :root {
    --bg: #fff;
    --bg-soft: #fff;
    --surface: #fff;
    --text: #000;
    --muted: #333;
    --border: #ccc;
  }

  .site-header,
  .site-footer,
  .pager,
  .actions,
  .todo,
  .skip-link {
    display: none !important;
  }

  body {
    font-size: 10.5pt;
    line-height: 1.5;
  }

  a {
    color: #000;
    text-decoration: none;
  }

  .section,
  .hero,
  .case-hero {
    padding-block: 14px;
    border-top: 0;
    background: none;
  }

  .card,
  .stat,
  .callout {
    break-inside: avoid;
    box-shadow: none;
  }

  .prose h2 {
    margin-top: 20px;
    break-after: avoid;
  }
}

/* ------------------- 无截图时的封面（用文字排成一张卡） ------------------- */

.card-media--cover {
  display: grid;
  place-items: center start;
  text-align: left;
  background: linear-gradient(140deg, #1b2029 0%, #252d3e 100%);
  border-bottom: 1px solid var(--border);
  padding: 26px;
}

.card-media--cover .cover-kicker {
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #8aaaff;
}

.card-media--cover .cover-title {
  margin-top: 12px;
  font-size: 21px;
  font-weight: 680;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.card-media--cover .cover-sub {
  margin-top: 9px;
  font-size: 13px;
  line-height: 1.55;
  color: #98a0ae;
}
