/* Alfred Y. Zhang — single-page case study
   修改颜色、宽度与字体：优先编辑下方变量。无需构建或安装依赖。 */
:root {
  --paper: #fcfcfa;
  --ink: #242529;
  --muted: #62656d;
  --line: #dedfe3;
  --accent: #476F73;
  --tint: #EFF4F3;
  --body-font: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --heading-font: Georgia, "Times New Roman", serif;
  --mono-font: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --sidebar-width: 200px;
  --header-height: 76px;
  --content-width: 1120px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-height) + 24px); }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--body-font); font-size: 16px; line-height: 1.65; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; border-radius: 2px; }
img { display: block; width: 100%; height: auto; }
figure, p, dl, dd { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 400; }
h1, h2 { font-family: var(--heading-font); }
p + p { margin-top: 18px; }
.skip-link { position: fixed; top: -100px; left: 16px; z-index: 10; padding: 10px 18px; background: var(--ink); color: white; }
.skip-link:focus { top: 12px; }
.site-header { position: sticky; top: 0; z-index: 5; min-height: var(--header-height); padding: 20px 36px; display: flex; align-items: center; gap: 24px; background: var(--paper); border-bottom: 1px solid var(--line); }
.wordmark { font-size: 18px; font-weight: 600; letter-spacing: -.6px; white-space: nowrap; }
.wordmark-dot { font-size: 11px; color: var(--accent); vertical-align: super; margin-left: 4px; }
.header-note, .header-link, .sidebar, .eyebrow, .template-tag, dt, figcaption, .item-number, .footer-bottom { font-family: var(--mono-font); }
.header-note { margin-left: auto; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .07em; }
.header-link { font-size: 14px; margin-left: 32px; }
.page-layout { display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); max-width: 1760px; margin: 0 auto; }
.sidebar { position: sticky; top: var(--header-height); height: calc(100dvh - var(--header-height)); padding: 42px 20px 26px 28px; border-right: 1px solid var(--line); display: flex; flex-direction: column; font-size: 12px; }
.sidebar-label { color: var(--muted); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 23px; }
.sidebar nav { display: grid; gap: 5px; }
.sidebar nav a { display: flex; gap: 12px; padding: 10px 0; font-size: 13px; line-height: 1.5; }
.sidebar nav a span { color: #777c88; font-size: 11px; padding-top: 2px; }
.sidebar nav a:hover { transform: translateX(3px); }
.back-top { margin-top: auto; padding-top: 30px; font-size: 12px; }
main { min-width: 0; }
.cover { background: #EFF4F3; border-bottom: 1px solid var(--line); }
.case-content { max-width: var(--content-width); padding: 0 clamp(28px, 5.1vw, 90px); margin: 0 auto; }
.overview { padding-top: 54px; }
.eyebrow-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 23px; }
.eyebrow { color: var(--accent); font-size: 12px; text-transform: uppercase; letter-spacing: .07em; line-height: 1.5; }
.template-tag { color: var(--muted); font-size: 11px; border: 1px solid var(--line); padding: 3px 8px; }
h1 { font-size: clamp(38px, 4.3vw, 66px); line-height: 1.07; letter-spacing: -.045em; }
.project-deck { font-size: 19px; color: var(--muted); max-width: 680px; margin-top: 25px; line-height: 1.6; }
.project-meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; padding: 38px 0; margin-top: 12px; border-bottom: 1px solid var(--line); }
dt { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); margin-bottom: 9px; }
dd { font-size: 14px; line-height: 1.6; }
.meta-note { display: block; font-size: 12px; color: var(--muted); }
.brief { padding-top: 54px; max-width: 740px; }
h2 { font-size: clamp(29px, 2.9vw, 43px); letter-spacing: -.035em; line-height: 1.18; }
.brief h2 { font-size: clamp(27px, 2.5vw, 36px); }
.eyebrow + h2 { margin-top: 18px; }
h2 + p, h2 + .prose { margin-top: 23px; }
.brief p:not(.eyebrow), .prose, .decision p, .reflection p { color: var(--muted); }
.fill-in { color: var(--muted); }
.story-section { padding-top: 105px; }
.story-section:target > .eyebrow, .overview:target .eyebrow-row .eyebrow { text-decoration: underline; text-underline-offset: 5px; }
.prose { max-width: 720px; }
.media-block { margin-top: 32px; }
.media-block img { background: #f0f1f3; border: 1px solid var(--line); }
figcaption { margin-top: 12px; display: flex; gap: 16px; color: var(--muted); font-size: 11px; line-height: 1.65; }
figcaption span { color: var(--ink); flex-shrink: 0; }
.insight-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; margin-top: 36px; }
.insight-grid article { border-top: 1px solid var(--line); padding-top: 20px; }
.item-number { color: var(--accent); font-size: 12px; }
.insight-grid h3 { font-size: 19px; font-weight: 500; line-height: 1.35; margin: 15px 0 12px; }
.insight-grid p { color: var(--muted); font-size: 15px; }
.problem-section { margin-top: 100px; padding: clamp(28px, 4vw, 54px); background: var(--tint); border-left: 3px solid var(--accent); }
.problem-section h2 { font-size: clamp(29px, 3vw, 43px); }
.problem-section > p:last-child { max-width: 650px; color: #50586e; }
.decision { margin-top: 52px; }
.decision-heading { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 13px; }
.decision-heading > .item-number { padding-top: 5px; }
.decision h3, .reflection h3 { font-size: 21px; font-weight: 500; letter-spacing: -.025em; line-height: 1.4; }
.decision h3 + p { margin-top: 14px; max-width: 675px; }
.comparison { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px; margin-top: 36px; padding: 28px 0 32px; border-block: 1px solid var(--line); }
.metric-value { font-family: var(--heading-font); color: var(--accent); font-size: clamp(36px, 4vw, 56px); letter-spacing: -.065em; line-height: 1.25; white-space: nowrap; }
.metric-value span { font-size: .6em; margin-left: 2px; }
.metrics h3 { margin-top: 14px; font-size: 16px; font-weight: 500; }
.metrics div > p:last-child { margin-top: 6px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.measurement-note { margin-top: 16px; color: var(--muted); font-size: 13px; }
.reflection { margin-top: 42px; display: grid; grid-template-columns: 1fr 2fr; gap: 30px; }
.case-footer { margin-top: 105px; padding-top: 46px; border-top: 1px solid var(--line); }
.case-footer h2 { font-size: clamp(28px, 2.7vw, 38px); }
.contact-link { display: inline-block; margin-top: 21px; font-size: 16px; text-decoration: underline; text-underline-offset: 6px; overflow-wrap: anywhere; }
.contact-link span { display: inline-block; margin-left: 12px; }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; margin-top: 72px; padding-bottom: 30px; color: var(--muted); font-size: 11px; }
/* 平板：目录变为顶部横向导航，正文仍为一页。 */
@media (max-width: 1000px) {
  :root { --header-height: 68px; }
  .site-header { padding: 18px 24px; }
  .page-layout { display: block; }
  .sidebar { position: sticky; top: var(--header-height); z-index: 4; height: auto; padding: 10px 24px; background: var(--paper); border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar-label, .back-top { display: none; }
  .sidebar nav { display: flex; overflow-x: auto; gap: 24px; scrollbar-width: thin; }
  .sidebar nav a { white-space: nowrap; padding: 5px 0; min-height: 32px; }
  .sidebar nav a:hover { transform: none; }
  html { scroll-padding-top: 142px; }
  .case-content { padding-inline: 36px; }
}
/* 手机：元信息两列；洞察、对比图、成果改为单列。 */
@media (max-width: 600px) {
  .site-header { gap: 16px; padding-inline: 20px; }
  .wordmark { font-size: 17px; }
  .header-note { display: none; }
  .header-link { margin-left: auto; font-size: 12px; }
  .sidebar { padding-inline: 20px; }
  .sidebar nav { gap: 20px; }
  .sidebar nav a { font-size: 12px; gap: 8px; }
  .case-content { padding-inline: 24px; }
  .overview { padding-top: 34px; }
  .eyebrow-row { align-items: flex-start; gap: 10px; margin-bottom: 22px; }
  h1 { font-size: 42px; }
  .desktop-break { display: none; }
  .project-deck { font-size: 17px; margin-top: 20px; }
  .project-meta { grid-template-columns: 1fr 1fr; gap: 25px 18px; padding: 29px 0; }
  .brief { padding-top: 38px; }
  .story-section { padding-top: 68px; }
  .insight-grid { grid-template-columns: 1fr; gap: 24px; }
  .insight-grid p { font-size: 16px; }
  .problem-section { margin-top: 65px; padding: 28px 24px; }
  .comparison { grid-template-columns: 1fr; gap: 0; }
  .decision { margin-top: 38px; }
  .decision-heading { grid-template-columns: 22px minmax(0, 1fr); gap: 10px; }
  .metrics { grid-template-columns: 1fr; gap: 23px; padding: 20px 0; }
  .metrics > div { border-bottom: 1px solid var(--line); padding-bottom: 23px; }
  .metrics > div:last-child { border: 0; padding-bottom: 0; }
  .metric-value { font-size: 52px; }
  .metrics h3 { margin-top: 7px; }
  .reflection { grid-template-columns: 1fr; gap: 15px; }
  .case-footer { margin-top: 70px; padding-top: 34px; }
  .footer-bottom { flex-direction: column; margin-top: 52px; gap: 10px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media print {
  .site-header, .sidebar, .skip-link, .template-tag { display: none; }
  .page-layout { display: block; }
  .case-content { max-width: none; padding: 0; }
  .cover img { max-height: 300px; }
  .story-section { padding-top: 36px; }
  .problem-section, .case-footer { margin-top: 36px; }
  figure, .metrics, .insight-grid, .reflection { break-inside: avoid; }
  body { font-size: 11pt; }
}
