/* cycyotw · 全站样式。颜色只在这里定义，页面里不写死颜色。 */
/* 身份字体 Courier Prime（CY 1010 定：「可以，就这么用」）：只用在标志、名字、标签、日期这类「签名」位置，正文不换。子集见 工具/做字体子集.py；中文字符落回系统字体 */
@font-face { font-family: "Courier Prime"; src: url("/fonts/CourierPrime-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Courier Prime"; src: url("/fonts/CourierPrime-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
:root {
  --mono: "Courier Prime", ui-monospace, -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", monospace; /* 中文字符落到苹方 */
  --inset: 20px; /* 卡片内边距；卡片外的文字也按它缩进，所有文字和图标落在同一条竖线上 */
  --bg: #f5f2ec;
  --surface: #ffffff;
  --ink: #1e1c19;
  --muted: #6d675e;
  --line: #e2ddd3;
  --tag-bg: #ebe6dc;
  --tag-fill: transparent; /* 浅色模式标签只描边不填底（CY 1031：米灰底和截图区同色，在白卡上发闷） */
  --tag-ring: #e2ddd3;
  --accent: #b5562f;
  --shadow: 0 1px 2px rgba(30, 28, 25, .06), 0 8px 24px rgba(30, 28, 25, .06);
  --icon-line: rgba(0, 0, 0, .12);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161513;
    --surface: #201e1b;
    --ink: #ece8e1;
    --muted: #a39d93;
    --line: #34312c;
    --tag-bg: #2c2925;
    --tag-fill: #2c2925; /* 深色模式保持填底 */
    --tag-ring: transparent;
    --accent: #e08a62;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    --icon-line: rgba(255, 255, 255, .1);
      color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.75 -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
:lang(en) body, body:lang(en) { line-height: 1.6; }
/* 中文正文两端对齐；英文保持左对齐（窄屏两端对齐会把词距拉得忽大忽小） */
html:lang(zh) p { text-align: justify; }
a { color: inherit; }
.nowrap { white-space: nowrap; } /* 作品名不在行尾被拆开（如「Baird 小 / 姐」） */
img { display: block; max-width: 100%; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .wrap { padding: 0 16px; } }

/* 页头 */
.top { display: flex; justify-content: space-between; align-items: center; padding: 22px 0; font-size: 15px; }
.top a { text-decoration: none; }
.top .home { font-weight: 600; letter-spacing: .02em; }
.top .lang { color: var(--muted); }
.top .lang:hover { color: var(--ink); }

/* 开头 */
.hero { padding: 72px 0 64px; }
.hero .name-row { display: flex; align-items: center; gap: 20px; margin: 0 0 16px; } /* 头像在名字左边，和名字那一行上下居中 */
.hero .name-row h1 { margin: 0; position: relative; top: .075em; } /* 大写 CY 没有下伸部分，字形坐在行框上半部，按行框居中会偏上约 0.07em（1010 量过 64 号字高 4.6 px），往下挪回来，让字形中心对准头像中心 */
.hero .avatar { display: block; flex: none; width: 72px; height: 72px; border-radius: 50%; box-shadow: 0 0 0 .5px var(--icon-line); }
@media (max-width: 600px) { .hero .avatar { width: 56px; height: 56px; } .hero .name-row { gap: 14px; } }
.hero h1 { font-size: clamp(40px, 7vw, 64px); line-height: 1.1; margin: 0 0 16px; font-weight: 700; letter-spacing: -.01em; }
.hero p { font-size: clamp(18px, 2.4vw, 21px); color: var(--muted); margin: 0; }
.hero .lines { line-height: 1.7; text-align: left; } /* 一行一句的短句，不两端对齐 */

/* 分组 */
.group { padding: 24px 0 40px; }
.group > h2 { font-size: 14px; font-weight: 600; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; margin: 0 0 18px; }

.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 760px) { .cards { grid-template-columns: 1fr; } }

.card { display: flex; flex-direction: column; background: var(--surface); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); text-decoration: none; transition: transform .2s ease, box-shadow .2s ease; }
a.card:hover { transform: translateY(-2px); }
.card .shot { aspect-ratio: 16 / 9; background: var(--tag-bg); overflow: hidden; }
.card .shot img { width: 100%; height: 100%; object-fit: cover; }
.card .shot.contain img { object-fit: contain; padding: 18px 24px; }
.card .body { padding: 18px var(--inset) 22px; flex: 1; display: flex; flex-direction: column; }
.card .tags { margin-top: auto; padding-top: 14px; } /* 标签贴卡片底部：同一行两张卡正文行数不同，标签也对齐 */
.card .head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; min-height: 44px; } /* 固定高：没有图标的卡也和旁边对齐 */
.card .name { font-size: 20px; font-weight: 650; line-height: 1.3; }
.card .desc { margin: 0; color: var(--muted); font-size: 16px; }

/* 图标的 iOS 圆角和贴边细描线都画在图里（工具/做图标.py）：浏览器描线画不出图里的圆角、Safari 又不认半像素，线和图标自带的亮边夹成框（CY 1031 两次看出图标没填满） */
.icon { width: 44px; height: 44px; flex: none; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.tag { font-size: 13px; line-height: 1; padding: calc(6px + .06em) 9px calc(6px - .06em); border-radius: 999px; background: var(--tag-fill); box-shadow: inset 0 0 0 1px var(--tag-ring); color: var(--muted); } /* 文字下移 .06em：Courier Prime 字身下面留得多，行高 1 时大写字母偏上（CY 1031 看出没居中；和 .hero h1 下移同一个原因）。Chrome 和 Safari 排这款字差半像素，.06em 让两边都在 0.3px 以内（1031 按像素量过） */
.tag .zh { position: relative; top: .08em; } /* 标签里的中文（落到苹方）比 Courier Prime 的大写字母再高约 0.8px，单独下移（CY 1031：「中英文混杂的标签，你就把中文也做成垂直居中」；下移量取 Chrome 和 Safari 的折中，两边偏差都压到半像素以内——网站是给访客看的，不按 CY 自己用的浏览器取）。标签里写中文要包 <span class="zh"> */

/* 其他：小卡 */
.mini { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 860px) { .mini { grid-template-columns: 1fr; } }
.mini .item { display: flex; gap: 14px; padding: 18px var(--inset); background: var(--surface); border-radius: 14px; box-shadow: var(--shadow); }
.mini .item .icon { width: 48px; height: 48px; }
.mini .item h3 { margin: 0 0 4px; font-size: 17px; font-weight: 650; line-height: 1.3; }
.mini .item p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.6; }

/* 关于 */
.about { padding: 40px 0 24px; border-top: 1px solid var(--line); margin-top: 24px; }
.about h2 { font-size: 14px; font-weight: 600; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; margin: 0 0 18px; }
.about .text { max-width: 36em; }
.about .text p { margin: 0 0 1em; }
.about .mail a { color: var(--accent); text-decoration: none; }
.about .mail a:hover { text-decoration: underline; }

.foot { padding: 48px 0 40px; color: var(--muted); font-size: 14px; display: flex; flex-wrap: wrap; column-gap: 1em; }
.foot .motto { white-space: nowrap; } /* 页脚几段之间只空一个字、不用分隔符；放不下整段换行，不从中间拆 */

/* 作品详情页 */
.back { color: var(--muted); text-decoration: none; }
.back:hover { color: var(--ink); }
.work-head { padding: 40px 0 28px; }
.work-head h1 { font-size: clamp(32px, 5.5vw, 48px); line-height: 1.15; margin: 0 0 6px; }
.work-head .sub { color: var(--muted); font-size: 18px; margin: 0; }
.work-head .tags { margin-top: 16px; }
.work-lead { font-size: 19px; max-width: 34em; margin: 0 0 24px; }
.btn { display: inline-block; padding: 12px 20px; border-radius: 999px; background: var(--ink); color: var(--bg); text-decoration: none; font-size: 16px; font-weight: 600; }
.btn:hover { opacity: .88; }
.btn-note { color: var(--muted); font-size: 14px; margin-left: 12px; }

.gallery { display: grid; gap: 32px; margin: 48px 0; }
.gallery figure { margin: 0; }
.gallery img { width: 100%; border-radius: 12px; aspect-ratio: 16 / 9; object-fit: cover; }
.gallery figcaption { margin-top: 10px; padding: 0 var(--inset); color: var(--muted); font-size: 14px; } /* 说明文字和页面其他文字落在同一条竖线上 */

.section { max-width: 36em; margin: 0 0 40px; }
.section h2 { font-size: 20px; margin: 0 0 10px; }
.section p { margin: 0 0 1em; }
.quote { margin: 0 0 1.2em; color: var(--muted); } /* 评语用灰字和正文区分（CY 1031 定），不加竖线、引号这类装饰 */
.quote p { margin: 0; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { display: flex; gap: 16px; padding: 6px 0; }
.timeline time { flex: none; width: 6.5em; color: var(--muted); font-variant-numeric: tabular-nums; }

/* 卡片外的文字和卡片里的内容对齐 */
.top, .hero, .group > h2, .about, .foot,
.work-head, .wrap > p, .section { padding-left: var(--inset); padding-right: var(--inset); }

/* 身份字体用在哪：左上角 CY、名字、分组小标题、标签、页脚、时间线日期 */
.top, .back, .hero h1, .group > h2, .about h2, .tag, .foot, .timeline time { font-family: var(--mono); }
