/* ============================================================
   刘业鹏 · 个人作品集  样式表
   冷调底 / 朱砂红 / 极简留白
   ============================================================ */

:root {
    --bg: #E7EDF5;            /* 冷调浅蓝灰（原暖米白 #F4F1E9）*/
    --paper: #F2F6FB;         /* 冷调纸白 */
    --ink: #161A20;
    --ink-2: #49535F;         /* 冷灰 */
    --muted: #7B8493;         /* 冷灰 */
    --line: rgba(34, 48, 74, .15);
    --line-soft: rgba(34, 48, 74, .09);
    --red: #BE3A2B;           /* 朱砂红保留为品牌强调点（logo / 标题句号 / 侧栏等） */
    --accent: #2A629E;        /* 冷调强调色：卡片内替代朱砂红，与冷背景协调 */

    --sidebar-w: 272px;
    --pad: clamp(20px, 5vw, 80px);
    --maxw: 1240px;

    --sans: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", -apple-system, "Segoe UI", system-ui, sans-serif;
    --serif: "Georgia", "Songti SC", "SimSun", serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    background: var(--bg);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    padding-left: var(--sidebar-w);
}

/* ---------- 主页动态背景画布 ---------- */
#bgCanvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    filter: blur(18px) saturate(90%);
    transform: translateZ(0);            /* 提升到独立合成层，动画更顺滑 */
}
/* 仅在桌面端让动态背景透出：首页 body 设为透明，露出 html 的冷色对角渐变作为底图，
   画布（透明）再在上面叠加流动光斑与鼠标光晕 */
@media (min-width: 1001px) {
    body.homepage { background: transparent; }
    html {
        background: linear-gradient(150deg, #e8eff5 0%, #a3c2d6 48%, #6a8ba8 100%);
    }
    /* 肌理质感：在流动渐变之上叠加一层细噪点（soft-light 混合），强化质感表现力 */
    body.homepage::after {
        content: "";
        position: fixed;
        inset: 0;
        z-index: -1;
        pointer-events: none;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
        background-size: 180px 180px;
        opacity: .5;
        mix-blend-mode: soft-light;
    }
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }
button { font: inherit; color: inherit; }

::selection { background: var(--red); color: #fff; }

.container {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 var(--pad);
}

/* ============================================================
   左侧导航边栏（原顶栏 + 页脚整合）
   ============================================================ */
.sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: var(--sidebar-w);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    /* iOS 风格磨砂玻璃：半透明显色 + 背景模糊 + 边缘微亮 */
    background: rgba(255, 255, 255, .42);
    -webkit-backdrop-filter: blur(22px) saturate(150%);
    backdrop-filter: blur(22px) saturate(150%);
    border-right: 1px solid rgba(255, 255, 255, .55);
    box-shadow: 1px 0 0 rgba(255, 255, 255, .25), 10px 0 40px -24px rgba(40, 60, 90, .35);
    overflow-y: auto;
    overscroll-behavior: contain;
    transition: transform .34s cubic-bezier(.2, .8, .2, 1);
}
/* 侧栏作用域：--red 解析为冷色强调，覆盖导航文字 / 聚焦描边 / 激活指示条 / 飞出面板文字等；
   Logo 朱砂红点由下方 .brand-dot 直接用色保留品牌色。 */
.sidebar { --red: var(--accent); }

/* 右缘高光线，强化玻璃面板质感 */
.sidebar::after {
    content: "";
    position: absolute;
    top: 0; right: -1px; bottom: 0;
    width: 1px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, .85), rgba(255, 255, 255, .12));
    pointer-events: none;
}

.sb-inner { display: flex; flex-direction: column; min-height: 100%; padding: 26px 0 20px; }

.sb-brand {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    padding: 0 24px 22px;
    border-bottom: 1px solid var(--line);
}
.sb-brand-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.brand-dot { width: 9px; height: 9px; border-radius: 50%; background: #BE3A2B; margin-bottom: 6px; flex-shrink: 0; }   /* 品牌朱砂红：保留 */
.brand-name { font-size: 1.02rem; font-weight: 600; letter-spacing: .1em; }
.brand-en { font-size: .6rem; letter-spacing: .22em; color: var(--muted); text-transform: uppercase; }

.sb-group { padding-top: 22px; }
.sb-group-title {
    padding: 0 24px 10px;
    font-size: .62rem;
    letter-spacing: .24em;
    color: var(--muted);
    text-transform: uppercase;
}
.sb-list { display: flex; flex-direction: column; }

.sb-item { position: relative; display: flex; align-items: center; gap: 6px; padding: 0 16px 0 24px; }
.sb-link {
    position: relative;
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 0;
    background: none;
    border: 0;
    text-align: left;
    font-size: .86rem;
    letter-spacing: .04em;
    color: var(--ink-2);
    cursor: pointer;
    transition: color .25s, padding-left .3s cubic-bezier(.2, .8, .2, 1);
}
.sb-link::before {
    content: "";
    position: absolute;
    left: -24px; top: 50%;
    width: 2px; height: 0;
    background: var(--red);
    transform: translateY(-50%);
    transition: height .28s cubic-bezier(.2, .8, .2, 1);
}
.sb-link:hover { color: var(--red); padding-left: 7px; }
.sb-item.is-active .sb-link { color: var(--ink); font-weight: 600; }
.sb-item.is-active .sb-link::before { height: 18px; }
.sb-link:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
.sb-count { font-size: .66rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.sb-item.is-active .sb-count { color: var(--red); }
/* 占位项：移除"作品"链接后保留的视觉高度，无文字、不可交互、对屏读隐藏 */
.sb-link--spacer { visibility: hidden; pointer-events: none; }

/* 分类展开（窄屏抽屉内使用） */
.sb-toggle {
    display: none;
    width: 26px; height: 26px;
    place-items: center;
    background: none;
    border: 1px solid var(--line);
    color: var(--muted);
    font-size: .8rem;
    line-height: 1;
    cursor: pointer;
    transition: border-color .25s, color .25s, transform .3s;
}
.sb-toggle:hover { border-color: var(--red); color: var(--red); }
.sb-cat.open .sb-toggle { transform: rotate(45deg); border-color: var(--red); color: var(--red); }
.sb-sub { display: none; flex-direction: column; padding: 2px 0 10px 24px; }
.sb-cat.open .sb-sub { display: flex; }
.sb-sub a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 7px 0;
    font-size: .78rem;
    color: var(--muted);
    transition: color .25s;
}
.sb-sub a:hover { color: var(--red); }
.sb-sub .sb-sub-all { color: var(--ink-2); }

/* 飞出面板展开时，对应分类高亮（与 hover / 选中态一致） */
.sb-cat.fly-active .sb-link { color: var(--red); padding-left: 7px; }
.sb-cat.fly-active .sb-link::before { height: 18px; }
.sb-cat.fly-active .sb-count { color: var(--red); }

/* 底部信息区（原页脚） */
.sb-foot { margin-top: auto; padding: 22px 24px 0; border-top: 1px solid var(--line); }
.sb-contact { display: flex; flex-direction: column; gap: 7px; font-size: .76rem; color: var(--ink-2); }
.sb-contact a { transition: color .25s; word-break: break-all; }
.sb-contact a:hover { color: var(--red); }
.sb-contact span { color: var(--muted); }
.sb-copy { margin-top: 16px; font-size: .66rem; line-height: 1.8; color: var(--muted); letter-spacing: .04em; }

/* ============================================================
   分类飞出面板（桌面端悬停 / 聚焦展开）
   ============================================================ */
.sb-flyout {
    position: fixed;
    z-index: 1001;
    width: 290px;
    max-height: min(70vh, 560px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 18px 20px;
    background: rgba(255, 255, 255, .55);
    -webkit-backdrop-filter: blur(22px) saturate(150%);
    backdrop-filter: blur(22px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, .6);
    box-shadow: 0 30px 60px -30px rgba(40, 60, 90, .40);
    opacity: 0;
    visibility: hidden;
    transform: translateX(-10px);
    transition: opacity .26s ease, transform .26s cubic-bezier(.2, .8, .2, 1), visibility .26s;
}
.sb-flyout.open { opacity: 1; visibility: visible; transform: none; }

.sb-flyout-head {
    display: flex;
    align-items: baseline;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}
.sb-flyout-no { font-size: .66rem; letter-spacing: .22em; color: var(--red); }
.sb-flyout-title { font-size: .94rem; font-weight: 600; }
.sb-flyout-all { margin-left: auto; font-size: .72rem; color: var(--red); }
.sb-flyout-all:hover { text-decoration: underline; }

.sb-flyout-item {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 4px 12px;
    padding: 11px 0;
    border-bottom: 1px dashed var(--line-soft);
}
.sb-flyout-item .t { font-size: .86rem; color: var(--ink-2); transition: color .22s; }
.sb-flyout-item:hover .t { color: var(--red); }
.sb-flyout-item .b { justify-self: end; }
.sb-flyout-item .m { grid-column: 1 / -1; font-size: .7rem; color: var(--muted); opacity: .8; }
.sb-flyout-empty { padding: 12px 0; font-size: .82rem; color: var(--muted); }

/* ============================================================
   窄屏：侧边栏收起为抽屉
   ============================================================ */
.sb-menu-btn {
    display: none;
    position: fixed;
    top: 14px; left: 14px;
    z-index: 1002;
    width: 44px; height: 44px;
    place-items: center;
    background: var(--paper);
    border: 1px solid var(--line);
    font-size: 1.05rem;
    line-height: 1;
    cursor: pointer;
    transition: border-color .25s, color .25s;
}
.sb-menu-btn:hover { border-color: var(--red); color: var(--red); }
.sb-menu-btn .x { display: none; }
.sb-menu-btn.open .x { display: inline; }
.sb-menu-btn.open .bars { display: none; }

.sb-backdrop {
    position: fixed;
    inset: 0;
    z-index: 999;
    background: rgba(28, 27, 24, .42);
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s, visibility .3s;
}
.sb-backdrop.open { opacity: 1; visibility: visible; }
body.sb-open { overflow: hidden; }

/* ============================================================
   主体内容
   ============================================================ */
.page { position: relative; }

.section { padding: clamp(64px, 9vw, 132px) 0; border-top: 1px solid var(--line); }
.section:first-child { border-top: 0; }

.sec-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: clamp(28px, 4vw, 56px);
}
.sec-head h2 { font-size: clamp(1.4rem, 2.6vw, 2rem); font-weight: 600; letter-spacing: -.01em; }
.sec-en { font-size: .68rem; letter-spacing: .24em; color: var(--muted); text-transform: uppercase; }

/* ---------- Hero ---------- */
.hero {
    min-height: calc(100dvh - 40px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(48px, 8vw, 96px) 0;
}
.hero-eyebrow {
    font-size: .7rem;
    letter-spacing: .26em;
    color: var(--muted);
    text-transform: uppercase;
    margin-bottom: clamp(20px, 3vw, 36px);
}
.hero-title {
    font-size: clamp(3rem, 13vw, 9.5rem);
    font-weight: 600;
    line-height: .95;
    letter-spacing: -.04em;
}
.hero-title .dot { color: var(--red); }
.hero-sub {
    margin-top: clamp(24px, 3vw, 40px);
    max-width: 46ch;
    font-size: clamp(.95rem, 1.5vw, 1.12rem);
    line-height: 1.9;
    color: var(--ink-2);
}
.hero-meta {
    margin-top: clamp(28px, 4vw, 52px);
    font-size: .76rem;
    letter-spacing: .16em;
    color: var(--muted);
    text-transform: uppercase;
}

/* ---------- 项目展示区（3D 倾斜卡片网格） ---------- */
.work-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(288px, 100%), 1fr));
    gap: clamp(18px, 2.2vw, 30px);
}

.work-card {
    --rx: 0deg;
    --ry: 0deg;
    --mx: 50%;
    --my: 50%;
    --lift: 0;
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--paper);
    border: 1px solid var(--line);
    isolation: isolate;
    transform-style: preserve-3d;
    transform:
        perspective(1000px)
        rotateX(var(--rx))
        rotateY(var(--ry))
        translate3d(0, calc(var(--lift) * -10px), 0)
        scale(calc(1 + var(--lift) * .025));
    transition: transform .55s cubic-bezier(.2, .8, .2, 1), box-shadow .45s ease, border-color .3s ease;
    will-change: transform;
}
/* 卡片红色系 → 冷调强调：本项目卡与首页卡片墙内的 --red 一律解析为冷色 --accent，
   覆盖字体（分类标签 / 标题悬停）、边框与阴影；不改结构 / 尺寸 / 交互。 */
.work-card,
.wall-card { --red: var(--accent); }

/* 指针跟随期间去掉 transform 过渡以保证实时；离开时移除该类 → 平滑复位 */
.work-card.tilting { transition: box-shadow .45s ease, border-color .3s ease; }
/* 悬停反馈同时由 CSS :hover 与 JS 切换的 .is-hover 类承载：
   .is-hover 用于夸克等对 :hover 支持不稳、但 pointer 事件正常的浏览器，保证跨内核一致。 */
.work-card:hover,
.work-card.is-hover {
    --lift: 1;
    border-color: rgba(42, 98, 158, .6);
box-shadow:
            0 26px 54px -24px rgba(30, 48, 74, .42),
            0 6px 16px -8px rgba(42, 98, 158, .28);
}
.work-card:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

.work-card__glow {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    opacity: calc(var(--lift) * .95);
    background: radial-gradient(340px circle at var(--mx) var(--my), rgba(42, 98, 158, .22), rgba(42, 98, 158, 0) 62%);
    transition: opacity .4s ease;
}
.work-card.tilting .work-card__glow { transition: none; }

/* 缩略图：统一 16:9，用宽高比约束而不是固定像素高度。
   容器尺寸只由宽度决定，与源图尺寸无关 → 不会因为不同大小的图而抖动或位移；
   内部图片用 object-fit: contain 完整呈现，绝不拉伸/裁切变形。 */
.work-card__thumb {
    display: block;
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    flex: 0 0 auto;
    min-height: 0;
    overflow: hidden;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
}
.work-card__thumb img,
.work-card__thumb .ph {
    display: block;
    width: 100%;
    height: 100%;
    aspect-ratio: auto;        /* 让图片铺满 16:9 容器，自身不再带比例 */
    object-fit: contain;       /* 完整呈现，不裁切、不拉伸 */
    object-position: center;
    border: 0;
    transition: transform .6s cubic-bezier(.2, .8, .2, 1);
}
.work-card:hover .work-card__thumb img,
.work-card.is-hover .work-card__thumb img { transform: scale(1.06); }

.work-card__body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 22px 22px 4px;
    transform: translateZ(24px);
}
.work-card__cat { font-size: .66rem; letter-spacing: .2em; color: var(--red); }
.work-card__title { display: block; font-size: 1.14rem; font-weight: 600; letter-spacing: -.01em; }
.work-card__tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 6px; list-style: none; }
.work-card__tags li {
    list-style: none;
    font-size: .66rem;
    letter-spacing: .06em;
    padding: 4px 10px;
    border: 1px solid var(--line);
    color: var(--muted);
    background: var(--bg);
    white-space: nowrap;
}
/* 双保险：彻底抑制任何浏览器默认的项目符号（标签 <li> 置于 <span> 内，全局 ul/ol reset 触达不到） */
.work-card__tags li::marker { content: ''; display: none; }
/* ---------- 项目详情弹窗（移动端为底部抽屉） ---------- */
.modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(16px, 4vw, 48px);
}
.modal[hidden] { display: none; }

.modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(28, 27, 24, .45);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    opacity: 0;
    transition: opacity .32s ease;
}
.modal.open .modal__backdrop { opacity: 1; }

.modal__panel {
    position: relative;
    z-index: 1;
    width: min(740px, 100%);
    max-height: min(86dvh, 780px);
    overflow-y: auto;
    background: var(--bg);
    border: 1px solid var(--line);
    padding: clamp(26px, 3.4vw, 46px);
    opacity: 0;
    transform: translateY(20px) scale(.985);
    transition: opacity .34s ease, transform .34s cubic-bezier(.2, .8, .2, 1);
}
.modal.open .modal__panel { opacity: 1; transform: none; }

.modal__close {
    position: absolute;
    top: 14px; right: 14px;
    width: 38px; height: 38px;
    display: grid;
    place-items: center;
    background: var(--paper);
    border: 1px solid var(--line);
    cursor: pointer;
    font-size: .95rem;
    line-height: 1;
    transition: border-color .25s, color .25s;
}
.modal__close:hover { border-color: var(--red); color: var(--red); }
.modal__close:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

.modal__cat { font-size: .68rem; letter-spacing: .22em; color: var(--red); }
.modal__title { font-size: clamp(1.55rem, 3.4vw, 2.25rem); font-weight: 600; letter-spacing: -.02em; margin: 12px 0 14px; }
.modal__meta { display: flex; align-items: center; gap: 14px; font-size: .84rem; color: var(--muted); margin-bottom: 24px; }
.modal__figure { margin-bottom: 22px; }
.modal__figure img,
.modal__figure .ph { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border: 1px solid var(--line); background: var(--paper); }
.modal__tagline { font-size: 1.02rem; line-height: 1.8; color: var(--ink); margin-bottom: 16px; }
.modal__desc { font-size: .95rem; line-height: 2; color: var(--ink-2); }
.modal__h { font-size: .7rem; letter-spacing: .22em; color: var(--muted); font-weight: 600; text-transform: uppercase; margin: 30px 0 14px; }
.modal__features { display: grid; gap: 10px; }
.modal__features li { position: relative; padding-left: 20px; font-size: .92rem; line-height: 1.85; color: var(--ink-2); }
.modal__features li::before { content: ""; position: absolute; left: 0; top: .72em; width: 7px; height: 7px; background: var(--red); }
.modal__tags { margin-top: 4px; }

.modal__links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: 1px solid var(--ink);
    background: var(--ink);
    color: var(--bg);
    font-size: .82rem;
    letter-spacing: .08em;
    transition: background .28s, color .28s, border-color .28s;
}
.btn:hover { background: var(--red); border-color: var(--red); color: #fff; }
.btn:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
.btn--ghost { background: transparent; color: var(--ink-2); border-color: var(--line); }
.btn--ghost:hover { background: transparent; border-color: var(--red); color: var(--red); }

body.modal-open { overflow: hidden; }

/* ---------- 分类索引 ---------- */
.cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(232px, 1fr));
    gap: 14px;
}
.cat-card a {
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: 100%;
    min-height: 208px;
    padding: 26px 24px 22px;
    border: 1px solid var(--line);
    background: transparent;
    transition: border-color .3s, background .3s, transform .3s cubic-bezier(.2, .8, .2, 1);
}
.cat-card a:hover { border-color: var(--red); background: var(--paper); transform: translateY(-3px); }
.cat-card-no { font-size: .68rem; letter-spacing: .24em; color: var(--red); }
.cat-card-title { font-size: 1.12rem; font-weight: 600; letter-spacing: -.01em; }
.cat-card-en { font-size: .64rem; letter-spacing: .18em; color: var(--muted); text-transform: uppercase; }
.cat-card-desc { font-size: .82rem; line-height: 1.75; color: var(--ink-2); opacity: .85; flex: 1; }
.cat-card-count { font-size: .72rem; letter-spacing: .1em; color: var(--muted); }

/* ---------- 关于 ---------- */
.cv { margin-top: 34px; border-top: 1px dashed var(--line); }
.cv-row {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 20px;
    padding: 13px 0;
    border-bottom: 1px dashed var(--line-soft);
    font-size: .88rem;
}
.cv-row dt { color: var(--muted); letter-spacing: .08em; font-variant-numeric: tabular-nums; }
.cv-row dd { color: var(--ink-2); }

/* ---------- 联系 ---------- */
.contact-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: clamp(24px, 5vw, 72px);
    align-items: end;
}
.contact-mail {
    display: inline-block;
    font-size: clamp(1.3rem, 4vw, 2.6rem);
    font-weight: 500;
    letter-spacing: -.02em;
    word-break: break-word;
    transition: color .25s;
}
.contact-mail:hover { color: var(--red); }
.contact-note { margin-top: 20px; max-width: 48ch; font-size: .92rem; line-height: 1.9; color: var(--ink-2); }
.contact-side { display: flex; flex-direction: column; gap: 10px; font-size: .85rem; color: var(--ink-2); }
.contact-side span { display: flex; gap: 12px; }
.contact-side em { font-style: normal; color: var(--muted); min-width: 64px; }

/* ---------- 关于页（独立整页，不再沿用卡片样式） ---------- */
.about-hero { padding: clamp(40px, 7vw, 96px) 0 clamp(28px, 4vw, 48px); border-bottom: 1px solid var(--line); }
.about-eyebrow { font-size: .68rem; letter-spacing: .24em; color: var(--red); text-transform: uppercase; }
.about-name {
    font-size: clamp(2.2rem, 6vw, 3.6rem);
    font-weight: 700;
    letter-spacing: -.02em;
    line-height: 1.05;
    margin: 14px 0 6px;
}
.about-name .dot { color: var(--red); }
.about-en { font-size: .82rem; letter-spacing: .14em; color: var(--muted); }
.about-lead {
    max-width: 64ch;
    margin-top: clamp(20px, 3vw, 32px);
    font-size: clamp(1rem, 1.6vw, 1.18rem);
    line-height: 2;
    color: var(--ink-2);
}

.about-figure {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(16px, 3vw, 28px);
    margin: clamp(28px, 4vw, 44px) 0;
}
.about-figure figure { margin: 0; }
.about-figure .ph { aspect-ratio: 4 / 3; }

.about-cols {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: clamp(28px, 5vw, 72px);
    padding-top: clamp(28px, 4vw, 44px);
    border-top: 1px solid var(--line);
}
.about-text h2,
.about-aside h2 {
    font-size: .68rem;
    letter-spacing: .24em;
    color: var(--muted);
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 18px;
}
.about-text p {
    max-width: 62ch;
    font-size: clamp(.94rem, 1.3vw, 1.04rem);
    line-height: 2;
    color: var(--ink-2);
    margin-bottom: 18px;
}
.about-aside .cv { margin-top: 0; border-top: 0; }

/* ============================================================
   联系页（contact.html）
   冷调强调（var(--accent)）+ 大留白 + 区块式分隔
   ============================================================ */
.contact-hero {
    padding: clamp(40px, 8vh, 88px) 0 clamp(28px, 4vh, 52px);
}
.contact-eyebrow {
    display: block;
    font-size: .72rem;
    letter-spacing: .26em;
    color: var(--accent);
    text-transform: uppercase;
    margin-bottom: 18px;
}
.contact-name {
    font-size: clamp(2.2rem, 4.4vw, 3.4rem);
    font-weight: 600;
    letter-spacing: -.015em;
    margin-bottom: 22px;
}
.contact-name .dot { color: var(--red); }   /* 朱砂红句号：品牌 */
.contact-lead {
    font-size: clamp(.92rem, 1.15vw, 1.04rem);
    line-height: 1.85;
    color: var(--ink-2);
    max-width: 58ch;
}

.contact-section {
    padding: clamp(28px, 4.5vh, 52px) 0;
    border-top: 1px solid var(--line);
}
.contact-section-label {
    display: block;
    font-size: .66rem;
    letter-spacing: .26em;
    color: var(--accent);
    text-transform: uppercase;
    margin-bottom: 18px;
}
.contact-section-label--block { display: block; }

/* 邮箱：作为整页主交互，做大尺寸 */
.contact-email-card { padding-top: clamp(36px, 6vh, 72px); }
.contact-email {
    display: inline-block;
    font-size: clamp(1.6rem, 3.4vw, 2.4rem);
    font-weight: 500;
    letter-spacing: -.01em;
    color: var(--accent);
    border-bottom: 2px solid transparent;
    transition: border-color .3s ease, color .3s ease;
    word-break: break-all;
}
.contact-email:hover { border-bottom-color: var(--accent); }
.contact-email .dot { color: var(--red); }

/* 信息网格 */
.contact-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: clamp(18px, 2.4vw, 36px);
    margin-top: 4px;
}
.contact-info-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.contact-info-label {
    font-size: .66rem;
    letter-spacing: .22em;
    color: var(--accent);
    text-transform: uppercase;
}
.contact-info-value {
    font-size: 1rem;
    color: var(--ink);
    word-break: break-all;
}

/* 社交媒体 */
.contact-social { padding-bottom: clamp(60px, 9vh, 110px); }
.contact-social-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px 36px;
    margin-top: 4px;
}
.contact-social-list li {
    border-bottom: 1px dashed var(--line-soft);
    padding-bottom: 10px;
}
.contact-social-list a {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    font-size: 1rem;
    color: var(--ink);
    transition: color .25s ease;
}
.contact-social-list a:hover { color: var(--accent); }
.contact-social-handle {
    font-size: .82rem;
    color: var(--muted);
    letter-spacing: .02em;
}

/* ============================================================
   首页：锁定单屏卡片墙（仅作用于 body.homepage）
   ------------------------------------------------------------
   规则：
   1) body / html 锁高 100dvh + overflow:hidden —— 页面级不滚动
   2) .screen 三行栅格：头部 auto / 卡片墙 minmax(0,1fr) / 页脚 auto
   3) .wall 用固定行列数（--cols / --rows，由 JS 依据视口宽高计算）
      + minmax(0,1fr)，槽位尺寸恒定 → 换卡不重排、不跳动
   4) 卡片内部 .wall-scroll 负责溢出滚动（min-height:0 + overflow:auto）
   ============================================================ */
body.homepage {
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
}
body.homepage .page { height: 100%; overflow: hidden; }

.screen {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr) auto;
    height: 100%;
}
/* .container 用 margin:0 auto 居中，会禁止栅格拉伸 → 显式给宽度，
   否则 .screen-body 会缩到内容宽度，卡片墙算不出可用空间 */
.screen-head,
.screen-body,
.screen-foot { width: 100%; }

/* #contact 等锚点定位，绝对定位后不占栅格轨道 */
.anchor { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- 头部 ---------- */
.screen-head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: end;
    gap: clamp(14px, 2.2vw, 40px);
    padding-top: clamp(16px, 2.4vw, 32px);
    padding-bottom: clamp(10px, 1.4vw, 18px);
    border-bottom: 1px solid var(--line);
}
.screen-head-main { min-width: 0; }
.screen-head .hero-eyebrow { margin-bottom: clamp(6px, 1vw, 12px); }
.screen-head .hero-title {
    font-size: clamp(1.7rem, 3.6vw, 3rem);
    line-height: 1;
    white-space: nowrap;
}
.screen-head-side { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.screen-head .hero-sub {
    margin-top: 0;
    max-width: 60ch;
    font-size: clamp(.76rem, .95vw, .88rem);
    line-height: 1.75;
}
.screen-head .hero-meta { margin-top: 0; font-size: .68rem; letter-spacing: .12em; }

/* 暂停按钮：横向长方形 + 框内从左到右的进度填充
   —— --p 由 JS 每帧写入（0 → 1），填充层用 transform: scaleX() 横向拉伸，
      只走合成层，不触发重排；overflow 把填充裁剪在方框内；图标与文字 z-index 更高，
      永远压在填充之上，并水平排列、垂直居中。 */
.screen-pause {
    --pause-h: 36px;                          /* 按钮高度，宽度由「图标 + 文案」撑开 */
    --pause-fill: rgba(42, 98, 158, .22);     /* 冷钢蓝半透明，与卡片强调色一致 */
    --red: var(--accent);                     /* 按钮内 --red 解析为冷色强调 */
    --p: 0;
    position: relative;
    flex: 0 0 auto;
    justify-self: start;                      /* 窄屏独占一行时不被栅格拉成长条 */
    display: inline-flex;
    align-items: center;                      /* 图标与文字垂直居中 */
    gap: 8px;
    height: var(--pause-h);
    padding: 0 14px;
    background: transparent;
    border: 1px solid var(--line);
    font-size: .68rem;
    letter-spacing: .14em;
    color: var(--muted);
    white-space: nowrap;                      /* 文案不换行 */
    cursor: pointer;
    overflow: hidden;                         /* 填充裁剪在方框内 */
    transition: border-color .25s, color .25s;
    -webkit-tap-highlight-color: transparent;
}
.screen-pause-fill {
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    z-index: 0;
    background: var(--pause-fill);
    transform: scaleX(var(--p, 0));           /* 0 → 1：宽度随进度增长 */
    transform-origin: left center;            /* 从左侧起点向右推进 */
    will-change: transform;
    pointer-events: none;                     /* 不挡点击 */
}
.screen-pause-ico {
    position: relative;
    z-index: 1;                               /* 图标始终在填充层之上 */
    flex: 0 0 auto;
    font-size: .6rem;
    line-height: 1;
}
.screen-pause-txt {
    position: relative;
    z-index: 1;                               /* 文字始终在填充层之上 */
    flex: 0 0 auto;
    white-space: nowrap;                       /* 「暂停轮播 / 继续轮播」四个字不换行、不裁切 */
}
.screen-pause:hover { border-color: var(--red); color: var(--red); }
.screen-pause:hover .screen-pause-fill { background: rgba(42, 98, 158, .32); }
.screen-pause:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.screen-pause[aria-pressed="true"] { color: var(--ink); border-color: var(--ink); }

/* ---------- 卡片墙 ---------- */
.screen-body {
    min-height: 0;
    padding-top: clamp(10px, 1.4vw, 18px);
    padding-bottom: clamp(10px, 1.4vw, 18px);
}

.wall {
    --wall-gap: clamp(10px, 1.1vw, 18px);
    display: grid;
    grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr));
    grid-template-rows: repeat(var(--rows, 3), minmax(0, 1fr));
    gap: var(--wall-gap);
    height: 100%;
    min-height: 0;
}

/* 卡片：复用 .work-card 组件，仅覆盖容器属性 */
body.homepage .wall-card {
    min-width: 0;
    min-height: 0;
    height: 100%;
    overflow: hidden;
}
/* 首页卡片：缩略图锁定 16:9。
   高度完全由宽度算出（16:9），不再用百分比/固定像素限高 ——
   行列数在 JS 里已经按「16:9 图 + 全部文字」的总高挑过了，所以这里无需兜底；
   --thumb-max 只在极端矮视口由 JS 设置，作为最后一道让位给文字的退路。 */
body.homepage .wall-card .work-card__thumb {
    aspect-ratio: 16 / 9;
    flex: 0 0 auto;
    width: 100%;
    min-height: 0;
    max-height: var(--thumb-max, 100%);
}
body.homepage .wall-card .work-card__thumb .ph { aspect-ratio: auto; border: 0; font-size: .6rem; padding: 8px; }
/* 3D 位移在可滚动容器里会出问题，卡片内部统一平面化 */
body.homepage .wall-card .work-card__body { transform: none; }
body.homepage .wall-card .work-card__body { padding: 12px 14px 6px; gap: 6px; }
body.homepage .wall-card .work-card__cat { font-size: .62rem; letter-spacing: .16em; }
body.homepage .wall-card .work-card__title { font-size: clamp(.92rem, 1.1vw, 1.02rem); }
body.homepage .wall-card .work-card__tags { gap: 6px; margin-top: 4px; }
body.homepage .wall-card .work-card__tags li { font-size: .62rem; padding: 3px 8px; letter-spacing: .04em; list-style: none; }

/* 换卡时的淡入淡出容器：只换内层，卡片外框尺寸恒定 */
.wall-card__paint {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    transition: opacity .3s ease;
}
.wall-card.swapping .wall-card__paint { opacity: 0; }

/* 整张卡片就是链接：任意区域可点，光标与焦点态都要给足反馈 */
.wall-hit {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
}
.wall-hit[data-slug] { cursor: pointer; }
.wall-hit:focus-visible { outline: 2px solid var(--red); outline-offset: -3px; }
/* 悬停/聚焦时标题转朱砂红，配合已有的倾斜与光晕，明确「这整块可以点」 */
.wall-hit[data-slug]:hover .work-card__title,
.wall-hit[data-slug]:focus-visible .work-card__title,
.work-card.is-hover .work-card__title,
.work-card:hover .work-card__title { color: var(--red); }

/* 卡片内部文字区：高度由网格槽位给出，内容**永不滚动**。
   --fit 由 JS 写入（0.xx – 1）：文字块整体等比缩放到刚好装下可用高度。
   手法是把宽度放大到 100%/fit、再用 scale(fit) 缩回来 ——
   换行宽度按「放大后的宽度」计算，缩回后视觉宽度仍等于容器宽度，
   所以文字完整、不裁切、不留白、也不会撑出滚动条；缩略图不受影响，仍锁 16:9。 */
.wall-scroll {
    --fit: 1;
    flex: 0 1 auto;                  /* 不抢高度；空间不够时收缩，由 --fit 把文字缩到刚好 */
    min-height: 0;
    display: flex;                   /* 顶部对齐：文字自缩略图下沿起向下排布 */
    flex-direction: column;
    justify-content: flex-start;
    overflow: hidden;                /* 横向、纵向都不产生滚动条 */
    transform-style: flat;
}
/* 缩略图 + 文字作为一个整体自卡片顶部向下排布（顶部对齐），不再垂直居中 */
body.homepage .wall-hit { justify-content: flex-start; }
body.homepage .wall-scroll > .work-card__body,
body.homepage .wall-scroll > .wall-info {
    display: flex;
    width: calc(100% / var(--fit));
    transform: scale(var(--fit));
    /* 以顶部为原点缩放：fit<1 时文字自顶部向下收缩，配合 .wall-scroll 的顶部对齐，
       文字始终从缩略图下沿起排布，不被顶出顶部裁切 */
    transform-origin: top center;
}
/* 极端矮视口（横屏手机）：实在放不下图 + 文时，砍掉缩略图把高度全留给文字，
   宁可少一张图，也不裁字、不滚动。由 JS 给 .wall 加类控制，整墙一致。 */
body.homepage .wall--nothumb .work-card__thumb,
body.homepage .wall-probe.nothumb .work-card__thumb { display: none; }

/* 离屏探针：只为量「这张卡自然需要多高」，不可见、不参与布局 */
.wall-probe {
    position: absolute;
    left: -99999px;
    top: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: -1;
}
.wall-probe .wall-card { height: auto; }

/* ---------- 信息卡（关于 / 联系 / 作品分类） ---------- */
.wall-info { display: flex; flex-direction: column; gap: 10px; padding: 15px 17px 18px; }
.wall-kicker {
    display: flex;
    align-items: baseline;
    gap: 10px;
    font-size: .62rem;
    letter-spacing: .22em;
    color: var(--red);
    text-transform: uppercase;
}
.wall-kicker em { font-style: normal; letter-spacing: .2em; color: var(--muted); }

.wall-info .contact-mail { font-size: clamp(1rem, 1.9vw, 1.35rem); }
.wall-info .contact-note { margin-top: 12px; max-width: none; font-size: .8rem; line-height: 1.85; }
.wall-info .contact-side { gap: 7px; font-size: .79rem; }
.wall-info .contact-side em { min-width: 52px; }

.wall-info .cat-grid { grid-template-columns: 1fr; gap: 10px; }
.wall-info .cat-card a { min-height: 0; gap: 6px; padding: 13px 15px 14px; transform: none; }
.wall-info .cat-card a:hover { transform: none; }
.wall-info .cat-card-title { font-size: 1rem; }
.wall-info .cat-card-desc { font-size: .77rem; line-height: 1.7; }

/* 信息卡（关于 / 联系 / 作品分类）内容量远大于项目卡，
   在卡片墙里用紧凑排版把高度压到与项目卡同量级，才能完整放进同一个槽位、不出现滚动条。
   文字一字不少，只收紧字号 / 间距，并把分类列表改成两列。 */
body.homepage .wall-info { gap: 6px; padding: 12px 14px 14px; }

body.homepage .wall-info .contact-mail { font-size: clamp(.82rem, 1.2vw, 1rem); }
body.homepage .wall-info .contact-note { margin-top: 6px; font-size: .67rem; line-height: 1.62; }
body.homepage .wall-info .contact-side { gap: 3px; font-size: .67rem; }
body.homepage .wall-info .contact-side em { min-width: 40px; }

/* 作品分类：5 个分类塞进一个小格子里，用「编号 + 名称 + 计数」一行一项的索引式排版。
   完整描述保留在分类页，这里只做入口索引，否则单是这一张卡就要 500px 高，
   会把整面墙挤成一行。 */
body.homepage .wall-info .cat-grid { grid-template-columns: 1fr; gap: 5px; }
body.homepage .wall-info .cat-card a {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: baseline;
    gap: 9px;
    min-height: 0;
    padding: 7px 11px;
}
body.homepage .wall-info .cat-card a:hover { transform: none; }
body.homepage .wall-info .cat-card-no { font-size: .56rem; letter-spacing: .16em; }
body.homepage .wall-info .cat-card-title { font-size: .76rem; }
body.homepage .wall-info .cat-card-en,
body.homepage .wall-info .cat-card-desc { display: none; }
body.homepage .wall-info .cat-card-count { font-size: .6rem; }

/* ---------- 页脚条 ---------- */
.screen-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px 24px;
    padding-top: clamp(9px, 1.2vw, 14px);
    padding-bottom: clamp(11px, 1.6vw, 18px);
    border-top: 1px solid var(--line);
}
.foot-cats { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.foot-cats a { display: inline-flex; align-items: baseline; gap: 7px; color: var(--ink-2); transition: color .25s; }
.foot-cats a:hover { color: var(--red); }
.foot-cat-no { font-size: .6rem; letter-spacing: .18em; color: var(--red); }
.foot-cat-name { font-size: .78rem; letter-spacing: .04em; }
.foot-cat-count { font-size: .66rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.foot-copy { font-size: .68rem; letter-spacing: .06em; color: var(--muted); }

/* ============================================================
   状态徽章（pill）
   ============================================================ */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 12px;
    border-radius: 999px !important;
    font-size: .72rem;
    font-weight: 600;
    line-height: 1.45;
    white-space: nowrap;
    flex-shrink: 0;
}
.status-built { background: #E3EFE5; color: #2F7D4A; }
.status-building { background: #F6E7E3; color: #A8452F; }
.status-paused,
.status-unknown { background: #EBE8E2; color: #8A8378; }

/* ============================================================
   子页
   ============================================================ */
.breadcrumb {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 22px var(--pad) 0;
    font-size: .74rem;
    letter-spacing: .06em;
    color: var(--muted);
}
.breadcrumb a { transition: color .25s; }
.breadcrumb a:hover { color: var(--red); }
.breadcrumb .sep { padding: 0 8px; opacity: .6; }
.breadcrumb .current { color: var(--ink-2); }

.sub-main { padding-bottom: clamp(48px, 7vw, 96px); }

.cat-hero { padding: clamp(24px, 4vw, 48px) 0 clamp(28px, 4vw, 48px); }
.cat-no { font-size: .72rem; letter-spacing: .26em; color: var(--red); }
.cat-title { font-size: clamp(1.9rem, 5vw, 3.2rem); font-weight: 600; letter-spacing: -.02em; margin: 14px 0; }
.cat-en { display: block; font-size: .72rem; letter-spacing: .22em; color: var(--muted); text-transform: uppercase; }
.cat-desc { max-width: 58ch; margin-top: 22px; font-size: .95rem; line-height: 2; color: var(--ink-2); }

.cat-list { border-bottom: 1px solid var(--line); }
.cat-item a {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) 160px auto;
    align-items: center;
    gap: 20px;
    padding: 20px 12px 20px 0;
    border-top: 1px solid var(--line);
    transition: padding .35s, background .35s;
}
.cat-item a:hover { padding-left: 14px; background: var(--paper); }
.cat-item-no { font-size: .72rem; letter-spacing: .12em; color: var(--muted); font-variant-numeric: tabular-nums; }
.cat-item-title { font-size: clamp(1rem, 2vw, 1.3rem); font-weight: 500; transition: color .25s; }
.cat-item a:hover .cat-item-title { color: var(--red); }
.cat-item-meta { font-size: .8rem; color: var(--ink-2); opacity: .72; }

.project-head { padding: clamp(22px, 4vw, 48px) 0 clamp(20px, 3vw, 34px); }
.project-cat { font-size: .72rem; letter-spacing: .22em; color: var(--red); }
.project-title { font-size: clamp(1.8rem, 5vw, 3.1rem); font-weight: 600; letter-spacing: -.02em; margin: 14px 0 16px; }
.project-meta { display: flex; align-items: center; gap: 16px; font-size: .84rem; color: var(--muted); }

.project-hero { margin-bottom: clamp(28px, 4vw, 56px); }
.project-hero img,
.project-hero .ph { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border: 1px solid var(--line); background: var(--paper); }

.project-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 296px;
    gap: clamp(24px, 4vw, 68px);
    align-items: start;
}
.project-desc { font-size: 1rem; line-height: 2; max-width: 62ch; color: var(--ink-2); }

.project-gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 34px; }
.project-gallery img,
.project-gallery .ph { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border: 1px solid var(--line); background: var(--paper); }

.project-info h2 {
    font-size: .7rem;
    letter-spacing: .22em;
    color: var(--muted);
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 14px;
}
.project-info h2 + * { margin-bottom: 30px; }
.project-info dl { border-top: 1px dashed var(--line); }
.project-info dt,
.project-info dd { padding: 11px 0; border-bottom: 1px dashed var(--line-soft); font-size: .85rem; }
.project-info dt { color: var(--muted); letter-spacing: .08em; }
.project-info dd { color: var(--ink-2); }
.project-info p { font-size: .9rem; line-height: 1.95; color: var(--ink-2); }

.project-nav {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: clamp(40px, 6vw, 84px);
    padding-top: 24px;
    border-top: 1px solid var(--line);
    font-size: .84rem;
    color: var(--ink-2);
}
.project-nav a { transition: color .25s; }
.project-nav a:hover { color: var(--red); }
.project-nav .back { color: var(--muted); }

/* ============================================================
   档案页：全部项目时间线（排序 / 分段 / 梳理）
   ============================================================ */
.arc-summary {
    border-top: 1px solid var(--line);
    padding-top: clamp(22px, 3vw, 34px);
    margin-bottom: clamp(32px, 5vw, 58px);
}
.arc-h2 {
    font-size: .7rem;
    letter-spacing: .22em;
    color: var(--muted);
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 18px;
}

.arc-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
}
.arc-stat {
    background: var(--paper);
    padding: 17px 16px 15px;
    display: flex;
    flex-direction: column;
}
.arc-stat-num {
    font-size: clamp(1.5rem, 2.6vw, 2.05rem);
    font-weight: 600;
    letter-spacing: -.02em;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}
.arc-stat-num.is-sm { font-size: clamp(.98rem, 1.6vw, 1.24rem); letter-spacing: 0; }
.arc-stat-lbl { margin-top: 8px; font-size: .66rem; letter-spacing: .18em; color: var(--red); }
.arc-stat-sub { margin-top: 7px; font-size: .76rem; line-height: 1.7; color: var(--ink-2); opacity: .78; }

.arc-note { margin-top: 26px; border-top: 1px dashed var(--line); padding-top: 20px; }
.arc-note h3 {
    font-size: .7rem;
    letter-spacing: .22em;
    color: var(--muted);
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 14px;
}
.arc-note ol { display: grid; gap: 9px; }
.arc-note li {
    position: relative;
    padding-left: 17px;
    font-size: .9rem;
    line-height: 1.95;
    color: var(--ink-2);
    max-width: 74ch;
}
.arc-note li::before {
    content: '';
    position: absolute;
    left: 0; top: .82em;
    width: 6px; height: 6px;
    background: var(--red);
}

/* 阶段快速跳转 */
.arc-index { margin-bottom: clamp(28px, 4vw, 44px); }
.arc-index ul { display: flex; flex-wrap: wrap; gap: 8px 10px; }
.arc-index a {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    padding: 7px 14px;
    border: 1px solid var(--line);
    background: var(--paper);
    font-size: .78rem;
    transition: border-color .25s, color .25s;
}
.arc-index a:hover { border-color: var(--red); color: var(--red); }
.arc-idx-n { font-size: .66rem; color: var(--muted); font-variant-numeric: tabular-nums; }

/* 分段 */
.arc-stage { margin-bottom: clamp(36px, 5vw, 64px); scroll-margin-top: 24px; }
.arc-stage-head { padding-bottom: 17px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.arc-stage-no { font-size: .72rem; letter-spacing: .26em; color: var(--red); }
.arc-stage-title { font-size: clamp(1.28rem, 3vw, 1.86rem); font-weight: 600; letter-spacing: -.01em; margin: 9px 0 8px; }
.arc-stage-en { display: block; font-size: .66rem; letter-spacing: .2em; color: var(--muted); text-transform: uppercase; }
.arc-stage-sum { max-width: 70ch; margin-top: 14px; font-size: .9rem; line-height: 1.95; color: var(--ink-2); }

/* 时间线 */
.arc-list { border-left: 1px solid var(--line); }
.arc-item { position: relative; padding-left: clamp(16px, 2.6vw, 30px); }
.arc-item + .arc-item { margin-top: 13px; }
.arc-item::before {
    content: '';
    position: absolute;
    left: -4.5px;
    top: 27px;
    width: 8px; height: 8px;
    background: var(--bg);
    border: 1.5px solid var(--red);
    border-radius: 999px;
}
.arc-item-in {
    display: block;
    padding: 17px 20px 18px;
    background: var(--paper);
    border: 1px solid var(--line);
    transition: border-color .3s, background .3s;
}
.arc-item-in:hover { border-color: var(--red); background: #fff; }
.arc-item-in:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

.arc-item-head { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 12px; margin-bottom: 9px; }
.arc-item-time { font-size: .74rem; letter-spacing: .1em; color: var(--muted); font-variant-numeric: tabular-nums; }
.arc-item-title { font-size: clamp(1rem, 1.8vw, 1.22rem); font-weight: 600; letter-spacing: -.01em; transition: color .25s; }
.arc-item-in:hover .arc-item-title { color: var(--red); }
.arc-item-tagline { margin-top: 7px; font-size: .92rem; line-height: 1.9; color: var(--ink-2); max-width: 64ch; }
.arc-item-plabel { margin-top: 14px; font-size: .64rem; letter-spacing: .2em; color: var(--muted); text-transform: uppercase; }
.arc-item-points { margin-top: 8px; display: grid; gap: 5px; }
.arc-item-points li {
    position: relative;
    padding-left: 15px;
    font-size: .86rem;
    line-height: 1.85;
    color: var(--ink-2);
}
.arc-item-points li::before {
    content: '';
    position: absolute;
    left: 0; top: .82em;
    width: 6px; height: 1px;
    background: var(--red);
}
.arc-item-foot {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 14px;
    margin-top: 15px;
    padding-top: 13px;
    border-top: 1px dashed var(--line);
}
.arc-item-cat { font-size: .72rem; letter-spacing: .14em; color: var(--red); }
.arc-item-loc { font-size: .76rem; color: var(--muted); }
.arc-item-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-left: auto; }
.arc-item-tags li {
    padding: 3px 9px;
    border: 1px solid var(--line);
    background: var(--bg);
    font-size: .68rem;
    letter-spacing: .04em;
    color: var(--ink-2);
}

/* ---------- 图片占位 ---------- */
.ph {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: var(--paper);
    border: 1px dashed var(--line);
    color: var(--muted);
    font-size: .72rem;
    letter-spacing: .14em;
    text-align: center;
    padding: 12px;
}

/* ---------- 入场动效 ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .8, .2, 1); }
.reveal.in { opacity: 1; transform: none; }

/* ============================================================
   响应式
   ============================================================ */
/* 大屏：侧边栏略收窄，给内容留更多空间 */
@media (max-width: 1280px) {
    :root { --sidebar-w: 244px; }
}

@media (max-width: 1000px) {
    /* 侧边栏变为抽屉，主内容占满宽度 */
    :root { --sidebar-w: 0px; }

    .sidebar {
        width: min(320px, 84vw);
        transform: translateX(-100%);
        box-shadow: 0 0 70px -24px rgba(28, 27, 24, .5);
    }
    .sidebar.open { transform: none; }

    /* 抽屉打开时不再给整页加暗色遮罩（极简留白风格 + 用户要求）：
       保留遮罩层以承接「点击空白处关闭」，但背景透明、不遮挡页面显示 */
    .sb-backdrop { background: transparent; }

    /* 默认（非首页）移动端：固定在右上角，右边缘与内容右边界（--pad）精确对齐 */
    .sb-menu-btn {
        display: grid;
        position: fixed;
        top: 14px; right: var(--pad); left: auto;
    }
    .sb-toggle { display: grid; }
    .sb-flyout { display: none; }

    .contact-grid { grid-template-columns: 1fr; align-items: start; }
    .about-figure { grid-template-columns: 1fr; }
    .about-cols { grid-template-columns: 1fr; gap: clamp(24px, 6vw, 40px); }

    /* 给悬浮的菜单按钮让出顶部空间 */
    .hero { padding-top: 78px; }
    .breadcrumb { padding-top: 74px; }

    /* 首页单屏：头部改为两列 + 副文案整行，给菜单按钮让位
       第 1 行：[刘业鹏 标题] [导航展开按钮] —— 按钮与标题同行、右对齐至内容右边缘
       第 2 行：暂停轮播（整行）
       第 3 行：副文案（整行） */
    body.homepage .screen-head {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-rows: auto auto auto;
        align-items: start;
        gap: 10px 18px;
        padding-top: 62px;
    }
    body.homepage .screen-head-main { grid-column: 1; grid-row: 1; min-width: 0; }
    body.homepage .screen-head-side { grid-column: 1 / -1; grid-row: 3; }
    body.homepage .screen-pause {
        grid-column: 1 / -1; grid-row: 2; justify-self: start;
        margin-top: 12px;
    }
    /* 导航展开按钮：与「刘业鹏」同行，右对齐至内容右边缘 */
    body.homepage .sb-menu-btn {
        display: grid;
        position: static;
        top: auto; right: auto; left: auto;
        grid-column: 2; grid-row: 1;
        align-self: center;
        justify-self: end;
        margin: 0;
    }
    body.homepage .screen-head .hero-sub { max-width: 68ch; }

    .project-body { grid-template-columns: 1fr; }
    .arc-stats { grid-template-columns: 1fr 1fr; }
    .arc-stage { scroll-margin-top: 84px; }
    .cat-item a { grid-template-columns: 44px minmax(0, 1fr) auto; gap: 14px; }
    .cat-item-meta { display: none; }
}

/* 矮屏（常见笔记本 768 / 800 高也计入）：压缩头部与页脚，把高度还给卡片墙 */
@media (max-height: 820px) {
    body.homepage .screen-head { padding-top: clamp(12px, 1.6vw, 20px); padding-bottom: 8px; }
    body.homepage .screen-head .hero-title { font-size: clamp(1.5rem, 2.8vw, 2.1rem); }
    body.homepage .screen-head .hero-sub { font-size: .74rem; line-height: 1.65; }
    body.homepage .screen-foot { padding-top: 7px; padding-bottom: 9px; }
    body.homepage .screen-body { padding-top: 8px; padding-bottom: 8px; }
}

@media (max-height: 720px) and (max-width: 1000px) {
    body.homepage .screen-head { padding-top: 58px; }
}

/* 横屏手机（窄且矮）：头部压成一行，把高度还給卡片墙；保持「标题 | 按钮」两列布局 */
@media (max-height: 560px) and (max-width: 1000px) {
    body.homepage .screen-head {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-rows: auto auto auto;
        align-items: center;
        gap: 8px 16px;
        padding-top: 54px;
        padding-bottom: 7px;
    }
    body.homepage .screen-head-main { grid-column: 1; grid-row: 1; }
    body.homepage .sb-menu-btn {
        grid-column: 2; grid-row: 1; align-self: center; justify-self: end;
    }
    body.homepage .screen-pause {
        grid-column: 1 / -1; grid-row: 2; justify-self: start; margin-top: 8px;
    }
    body.homepage .screen-head-side { grid-column: 1 / -1; grid-row: 3; }
    body.homepage .screen-foot { padding-top: 6px; padding-bottom: 8px; }
    body.homepage .foot-cats { gap: 4px 12px; }
    body.homepage .screen-body { padding-top: 7px; padding-bottom: 7px; }
}

@media (max-height: 560px) {
    body.homepage .screen-head { gap: 6px 20px; }
    body.homepage .screen-head .hero-title { font-size: clamp(1.3rem, 2.4vw, 1.7rem); }
    body.homepage .screen-head .hero-eyebrow { margin-bottom: 2px; font-size: .62rem; letter-spacing: .18em; }
    body.homepage .screen-head .hero-sub { font-size: .7rem; line-height: 1.55; }
    body.homepage .screen-head .hero-meta { font-size: .62rem; }
    body.homepage .screen-pause { --pause-h: 30px; padding: 0 10px; }
    body.homepage .wall-info { padding: 12px 14px 14px; }
}

@media (max-width: 680px) {
    .hero { min-height: auto; padding: clamp(78px, 14vw, 104px) 0 clamp(56px, 14vw, 88px); }

    /* 弹窗降级为底部抽屉 */
    .modal { align-items: flex-end; padding: 0; }
    .modal__panel {
        width: 100%;
        max-height: 88dvh;
        border-left: 0;
        border-right: 0;
        border-bottom: 0;
        transform: translateY(32px);
    }
    .modal.open .modal__panel { transform: none; }

    .cat-grid { grid-template-columns: 1fr; }
    .cat-card a { min-height: 0; }

    .cat-item a { grid-template-columns: 34px minmax(0, 1fr); row-gap: 8px; align-items: start; }
    .cat-item a .status-badge { grid-column: 2; justify-self: start; }

    .project-gallery { grid-template-columns: 1fr; }
    .project-nav { flex-direction: column; gap: 12px; }
    .project-nav .next { order: 3; }
    .project-nav .back { order: 2; }

    .arc-stats { grid-template-columns: 1fr; }
    .arc-item-in { padding: 15px 15px 16px; }
    .arc-item-tags { margin-left: 0; }
    .arc-item-foot { gap: 7px 12px; }

    .cv-row { grid-template-columns: 92px minmax(0, 1fr); gap: 14px; }
}

@media (max-width: 420px) {
    .hero-meta { letter-spacing: .1em; }
}

/* 触屏 / 无精确指针：静态卡片，不做指针跟随 */
@media (hover: none), (pointer: coarse) {
    /* .deck-card 除外：移动端层叠卡组的位移由 JS 每帧写入，不能被清掉 */
    .work-card:not(.deck-card),
    .work-card.tilting:not(.deck-card),
    .wall-card:not(.deck-card),
    .wall-card.tilting:not(.deck-card) { transform: none !important; }
    .work-card__glow { display: none; }
    .work-card__body { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { animation: none !important; transition: none !important; }
    .reveal { opacity: 1; transform: none; }
    /* .deck-card 除外：卡组位置本身就是「当前在第几张」的唯一呈现，必须保留 */
    .work-card:not(.deck-card),
    .work-card.tilting:not(.deck-card),
    .wall-card:not(.deck-card),
    .wall-card.tilting:not(.deck-card) { transform: none !important; }
    .work-card__glow { display: none; }
    .wall-card__paint { transition: none; }
    /* 减少动态效果时不做位移 / 光晕，但保留清晰、即时的描边 + 投影反馈 */
    .work-card:hover,
    .work-card.is-hover {
        border-color: rgba(190, 58, 43, .65);
        box-shadow: 0 18px 40px -18px rgba(28, 27, 24, .5);
    }
}


/* ============================================================
   移动端（视口 ≤1000px 且高度充足）· 卡片墙 → 层叠式卡组
   ------------------------------------------------------------
   · 桌面端完全不走这条分支：仍然是一屏多卡、不滚动的网格布局
   · 居中卡在最上层，左右两侧各露出上一张 / 下一张的一角
   · 位移 / 缩放 / 透明度由 JS 每帧写入（这里不给 transform 加过渡），
     所以跟手、惯性、吸附都在同一套逻辑里，不会出现内容换位错位
   · 卡片内容、样式、链接、点击打开详情等能力全部沿用原有实现
   ============================================================ */
@media (max-width: 1000px) {
    body.homepage .wall.wall--deck {
        display: block;
        position: relative;
        height: 100%;
        min-height: 0;
        overflow: visible;
        touch-action: pan-y;                 /* 只接管横向手势，纵向仍归浏览器 */
        overscroll-behavior-x: contain;
        -webkit-user-select: none;
        user-select: none;
        -webkit-tap-highlight-color: transparent;
    }
    /* 舞台横跨整屏：两侧露出的卡片被视口边缘自然裁切 */
    body.homepage .wall--deck .deck-stage {
        position: absolute;
        left: 50%;
        top: 0;
        bottom: 26px;
        width: 100vw;
        transform: translateX(-50%);
    }
    body.homepage .wall--deck .deck-card {
        position: absolute;
        left: 50%;
        top: 50%;
        width: var(--deck-w, 260px);
        height: var(--deck-h, 330px);
        min-height: 0;
        overflow: hidden;
        transform-origin: 50% 50%;
        transform: translate(-50%, -50%);
        transition: box-shadow .45s ease, border-color .3s ease;
        box-shadow: 0 20px 44px -22px rgba(30, 48, 74, .4);
        will-change: transform, opacity;
    }
    body.homepage .wall--deck .deck-card[data-center=1] {
        border-color: rgba(42, 98, 158, .45);
        box-shadow:
            0 26px 54px -24px rgba(30, 48, 74, .42),
            0 6px 16px -8px rgba(42, 98, 158, .28);
    }
    /* 只有居中卡可点（打开详情）；两侧露出的部分由舞台接管 → 点一下切到那张 */
    body.homepage .wall--deck .deck-card[data-center=0] { pointer-events: none; }
    /* 卡组内不启用「文字等比缩放」，宽度 100% */
    body.homepage .wall--deck .wall-scroll { --fit: 1; }
    body.homepage .wall--deck .wall-scroll > * { width: 100%; transform: none; }
    /* 缩略图 + 文字整体在卡片内垂直居中：底部多出来的空间上下均分，不偏不倚 */
    body.homepage .wall--deck .wall-hit { justify-content: center; }
    body.homepage .wall--deck .work-card__thumb { max-height: none; }

    /* 页码指示点 */
    body.homepage .wall--deck .deck-dots,
    body.homepage .wall--deck .deck-count {
        position: absolute;
        left: 50%;
        bottom: 2px;
        transform: translateX(-50%);
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        height: 20px;
        pointer-events: none;
    }
    body.homepage .wall--deck .deck-dot {
        width: 4px;
        height: 4px;
        border-radius: 999px;
        background: rgba(34, 48, 74, .22);
        transition: width .32s ease, background-color .32s ease;
    }
    body.homepage .wall--deck .deck-dot.on { width: 14px; background: var(--accent); }
    body.homepage .wall--deck .deck-count {
        display: block;
        line-height: 20px;
        font-size: .62rem;
        letter-spacing: .18em;
        color: var(--muted);
    }
    body.homepage .wall--deck .deck-count b { color: var(--accent); font-weight: 500; }
}


/* ============================================================
   移动端（视口 ≤1000px）· 主页侧边栏抽屉：精简 + 贴底 + 安全区
   ------------------------------------------------------------
   仅作用于 body.homepage 的窄屏抽屉，桌面端与其他页面完全不受影响：
   1) 隐藏「回到顶部」之后的 .sb-foot 区块（联系信息 + 版权 + 分隔线）
   2) 最后一个分组 margin-top:auto → 「回到顶部」贴到面板底边
   3) 顶部让开关闭按钮与状态栏，底部避开 iOS 手势条
   关闭按钮（.sb-menu-btn）的位置、尺寸、层级与交互均保持原样。
   ============================================================ */
@media (max-width: 1000px) {
    /* 开启 viewport-fit=cover 后，刘海 / 手势条会盖住主屏，这里用安全区补偿 */
    body.homepage .screen {
        padding-top: env(safe-area-inset-top, 0px);
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }
    /* 1) 移除「回到顶部」之后的全部内容 */
    body.homepage .sidebar .sb-foot { display: none; }

    /* 2) + 3) 顶部信息区下移让开关闭按钮；最后一组贴底 */
    body.homepage .sidebar .sb-inner {
        padding-top: calc(76px + env(safe-area-inset-top, 0px));
        padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    }
    body.homepage .sidebar .sb-group:last-of-type { margin-top: auto; }
}
