/* ==========================================================================
   AlexCuiDev · 共享设计系统
   风格：dark-tech —— 近黑底 / 单一强调色 / 发丝级描边 / 紧凑排版 / 克制动效
   被三页共用：index.html · blog/index.html · blog/post-viewer.html
   ========================================================================== */

/* ---------- 1. 设计令牌 ---------- */
:root {
    /* 表面层级 */
    --bg:            #0b0e14;
    --surface:       #10151d;
    --surface-2:     #161d27;
    --surface-hover: #1c2430;

    /* 文字层级 */
    --ink:           #e6edf3;
    --ink-2:         #9aa7b4;
    --ink-3:         #6b7784;

    /* 描边 */
    --line:          rgba(255, 255, 255, .08);
    --line-strong:   rgba(255, 255, 255, .16);

    /* 唯一强调色 */
    --accent:        #58a6ff;
    --accent-ink:    #0b0e14;
    --accent-soft:   rgba(88, 166, 255, .12);
    --accent-line:   rgba(88, 166, 255, .40);

    /* 形状与节奏 */
    --radius:        10px;
    --radius-sm:     6px;
    --container:     1120px;
    --header-h:      64px;
    --ease:          cubic-bezier(.4, 0, .2, 1);
    --dur:           180ms;

    /* 字体：不依赖外部 CDN，国内访问稳定 */
    --mono: ui-monospace, "JetBrains Mono", SFMono-Regular, Menlo, Consolas, "Courier New", monospace;
    --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
            "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", sans-serif;
}

/* ---------- 2. 基础重置 ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

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

body {
    margin: 0;
    background-color: var(--bg);
    /* 细颗粒纹理：打散大面积纯黑的塑料感 */
    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='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
    background-repeat: repeat;
    color: var(--ink);
    font-family: var(--sans);
    font-size: 15px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    margin: 0;
    line-height: 1.25;
    letter-spacing: -.02em;
    font-weight: 600;
}

p  { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
img { max-width: 100%; display: block; }
a  { color: var(--accent); text-decoration: none; }

button {
    font: inherit;
    color: inherit;
    background: none;
    border: 0;
    cursor: pointer;
}

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

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

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

/* 键盘用户专用：跳过导航 */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 2000;
    padding: 10px 18px;
    background: var(--accent);
    color: var(--accent-ink);
    border-radius: 0 0 var(--radius-sm) 0;
    font-weight: 600;
}
.skip-link:focus { left: 0; }

/* ---------- 3. 小标签 / 分节头 ---------- */
.kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: .04em;
    color: var(--ink-3);
    text-transform: uppercase;
}

.kicker--accent { color: var(--accent); }

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #3fb950;
    box-shadow: 0 0 0 3px rgba(63, 185, 80, .16);
    animation: pulse 2.8s var(--ease) infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: .35; }
}

.section {
    position: relative;
    padding: 96px 0;
    border-top: 1px solid var(--line);
    /* 关键修复：固定头部不再遮挡锚点目标 */
    scroll-margin-top: calc(var(--header-h) + 16px);
}

/* 分节线改成带强调色渐隐的细线，避免一道死板的灰 */
.section::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -1px;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(88, 166, 255, .38) 22%,
        rgba(88, 166, 255, .38) 78%,
        transparent 100%);
    opacity: .55;
    pointer-events: none;
}

/* 交替的极浅色分层，让连续的分节不至于全压在同一个底色上 */
.section--tint {
    background: linear-gradient(180deg,
        rgba(255, 255, 255, .028) 0,
        rgba(255, 255, 255, .012) 220px,
        rgba(255, 255, 255, 0) 460px);
}

.section-head { margin-bottom: 48px; }

.section-head .kicker { margin-bottom: 14px; }

.section-head h2 {
    font-size: clamp(26px, 3.4vw, 34px);
    margin-bottom: 12px;
}

.section-desc {
    color: var(--ink-2);
    max-width: 640px;
    font-size: 15px;
}

/* ---------- 4. 按钮 ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 22px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    transition: background var(--dur) var(--ease),
                border-color var(--dur) var(--ease),
                color var(--dur) var(--ease),
                box-shadow var(--dur) var(--ease),
                transform var(--dur) var(--ease);
}

.btn-primary {
    background: var(--accent);
    color: var(--accent-ink);
    font-weight: 600;
}
.btn-primary:hover {
    background: #79b8ff;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(88, 166, 255, .24);
}

.btn-ghost {
    border: 1px solid var(--line-strong);
    color: var(--ink);
}
.btn-ghost:hover {
    border-color: var(--accent-line);
    background: var(--surface-2);
    transform: translateY(-1px);
}

.btn--sm { padding: 7px 14px; font-size: 13px; }

/* ---------- 5. 头部 / 导航 ---------- */
.site-header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 900;
    height: var(--header-h);
    background: rgba(11, 14, 20, .78);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    border-bottom: 1px solid var(--line);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    height: var(--header-h);
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--ink);
    font-family: var(--mono);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -.01em;
    flex-shrink: 0;
}

.logo-mark {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    background: var(--accent);
    color: var(--accent-ink);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .02em;
}

.logo:hover .logo-mark { background: #79b8ff; }

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-links a {
    position: relative;
    padding: 7px 12px;
    border-radius: var(--radius-sm);
    color: var(--ink-2);
    font-size: 14px;
    white-space: nowrap;
    transition: color var(--dur) var(--ease),
                background var(--dur) var(--ease);
}

.nav-links a:hover {
    color: var(--ink);
    background: var(--surface-2);
}

/* 滚动高亮：当前区块 */
.nav-links a.is-active {
    color: var(--accent);
    background: var(--accent-soft);
}

.nav-links a.is-active::after {
    content: "";
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: -1px;
    height: 2px;
    border-radius: 2px;
    background: var(--accent);
}

.ext { font-size: 11px; opacity: .7; }

/* 汉堡按钮（移动端） */
.nav-toggle {
    display: none;
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line-strong);
    flex-shrink: 0;
}
.nav-toggle:hover { border-color: var(--accent-line); }

.nav-toggle-bar {
    position: absolute;
    left: 11px;
    width: 16px;
    height: 1.5px;
    border-radius: 2px;
    background: var(--ink);
    transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.nav-toggle-bar:nth-child(1) { top: 15px; }
.nav-toggle-bar:nth-child(2) { top: 20px; }
.nav-toggle-bar:nth-child(3) { top: 25px; }

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

/* ---------- 6. 首屏 Hero ---------- */
.hero {
    padding: calc(var(--header-h) + 72px) 0 0;
    position: relative;
    overflow: hidden;
    scroll-margin-top: calc(var(--header-h) + 16px);
}

/* 极淡的网格底纹，给大面积留白一点结构 */
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .022) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .022) 1px, transparent 1px);
    background-size: 56px 56px;
    -webkit-mask-image: radial-gradient(ellipse 92% 78% at 44% 34%, #000 0%, transparent 80%);
            mask-image: radial-gradient(ellipse 92% 78% at 44% 34%, #000 0%, transparent 80%);
    pointer-events: none;
}

/* 强调色柔光：让首屏有纵深，不再是一整块死黑 */
.hero::after {
    content: "";
    position: absolute;
    top: -200px;
    right: -160px;
    width: 820px;
    height: 820px;
    background:
        radial-gradient(circle at 50% 50%, rgba(88, 166, 255, .16), rgba(88, 166, 255, .05) 42%, transparent 68%);
    pointer-events: none;
}

.hero-grid {
    position: relative;
    padding-bottom: 72px;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
    gap: 56px;
    align-items: center;
}

/* 文字区不再限宽，由栅格列宽控制节奏 */
.hero-copy { max-width: 640px; }

.hero-copy .kicker { margin-bottom: 22px; }

.hero h1 {
    font-size: clamp(34px, 5.2vw, 54px);
    line-height: 1.12;
    letter-spacing: -.035em;
    margin-bottom: 16px;
}

.grad {
    background: linear-gradient(96deg, var(--accent) 0%, #a5d6ff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-sub {
    font-size: 19px;
    color: var(--ink);
    margin-bottom: 14px;
}

.hero-desc {
    color: var(--ink-2);
    max-width: 520px;
    margin-bottom: 28px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 22px;
}

.hero-mail {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--mono);
    font-size: 13px;
    color: var(--ink-3);
    transition: color var(--dur) var(--ease);
}
.hero-mail:hover { color: var(--accent); }

/* ---------- 6.1 首屏右侧：能力图谱面板 ---------- */
.hero-graph {
    position: relative;
    padding: 18px 18px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        radial-gradient(120% 90% at 50% 0%, rgba(88, 166, 255, .07), transparent 62%),
        var(--surface);
    overflow: hidden;
}

.graph-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 12px;
    margin-bottom: 4px;
    border-bottom: 1px solid var(--line);
    font-family: var(--mono);
    font-size: 11.5px;
    letter-spacing: .04em;
    color: var(--ink-3);
    text-transform: uppercase;
}

.graph-hint {
    color: var(--accent);
    letter-spacing: 0;
    text-transform: none;
}

.graph-canvas-wrap {
    position: relative;
    height: 300px;
    margin: 4px 0 2px;
}

.graph-canvas {
    display: block;
    width: 100%;
    height: 100%;
    touch-action: manipulation;
}

.graph-tip {
    padding-top: 13px;
    border-top: 1px solid var(--line);
    transition: border-color var(--dur) var(--ease);
}

.graph-tip.is-active { border-top-color: var(--accent-line); }

.graph-tip-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--ink-2);
    transition: color var(--dur) var(--ease);
}

.graph-tip.is-active .graph-tip-label { color: var(--accent); }

.graph-tip-text {
    font-size: 13px;
    line-height: 1.7;
    color: var(--ink-3);
    margin-top: 5px;
    min-height: 44px;
    transition: color var(--dur) var(--ease);
}

.graph-tip.is-active .graph-tip-text { color: var(--ink-2); }

.graph-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 13px;
}

.graph-legend li { display: block; }

.graph-legend button {
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid var(--line);
    background: var(--surface-2);
    font-size: 12px;
    line-height: 1.5;
    color: var(--ink-3);
    transition: color var(--dur) var(--ease),
                border-color var(--dur) var(--ease),
                background var(--dur) var(--ease);
}

.graph-legend button:hover {
    color: var(--accent);
    border-color: var(--accent-line);
    background: var(--accent-soft);
}

.graph-legend button.is-active {
    color: var(--accent);
    border-color: var(--accent-line);
    background: var(--accent-soft);
}

/* 数据条 */
.stat-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    overflow: hidden;
    margin-bottom: 24px;
}

.stat-strip li {
    padding: 22px 20px;
    border-right: 1px solid var(--line);
    transition: background var(--dur) var(--ease);
}
.stat-strip li:last-child { border-right: 0; }
.stat-strip li:hover { background: var(--surface-2); }

.stat-strip b {
    display: block;
    font-family: var(--mono);
    font-size: 30px;
    font-weight: 600;
    color: var(--accent);
    line-height: 1.1;
    margin-bottom: 4px;
}

.stat-strip b em {
    font-style: normal;
    font-size: 15px;
    margin-left: 1px;
}

.stat-strip span {
    font-size: 13px;
    color: var(--ink-2);
}

/* ---------- 7. 关于我 ---------- */
.about-grid {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    gap: 28px;
    align-items: start;
}

.about-lede {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 30px;
}

.about-lede p { color: var(--ink-2); margin-bottom: 22px; }

.trail {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.trail li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: var(--ink);
}

.trail .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    flex-shrink: 0;
}

.trail .year {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--ink-3);
    flex-shrink: 0;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.info-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px;
    transition: border-color var(--dur) var(--ease),
                background var(--dur) var(--ease),
                transform var(--dur) var(--ease);
}

.info-card:hover {
    border-color: var(--accent-line);
    background: var(--surface-2);
    transform: translateY(-2px);
}

.info-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: var(--radius-sm);
    background: var(--accent-soft);
    border: 1px solid var(--accent-line);
    margin-bottom: 16px;
}

.info-icon svg {
    width: 19px;
    height: 19px;
    stroke: var(--accent);
    fill: none;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.info-card h3 { font-size: 16px; margin-bottom: 8px; }
.info-card p  { font-size: 14px; color: var(--ink-2); }

/* ---------- 8. 专业技能 ---------- */
.skill-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.skill-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 28px;
    transition: border-color var(--dur) var(--ease),
                background var(--dur) var(--ease);
}

.skill-card:hover {
    border-color: var(--line-strong);
    background: var(--surface-2);
}

.skill-head {
    display: flex;
    align-items: center;
    gap: 13px;
    margin-bottom: 14px;
}

.skill-head .info-icon { margin-bottom: 0; }

.skill-head h3 { font-size: 17px; }

.skill-card > p {
    color: var(--ink-2);
    font-size: 14px;
    margin-bottom: 18px;
}

.chips { display: flex; flex-wrap: wrap; gap: 7px; }

.chip {
    padding: 4px 11px;
    border-radius: 20px;
    border: 1px solid var(--line);
    background: var(--surface-2);
    font-family: var(--mono);
    font-size: 11.5px;
    color: var(--ink-2);
    transition: color var(--dur) var(--ease),
                border-color var(--dur) var(--ease);
}

.chip:hover { color: var(--accent); border-color: var(--accent-line); }

/* ---------- 9. 工作经历（时间轴） ---------- */
.timeline { position: relative; padding-left: 30px; }

.timeline::before {
    content: "";
    position: absolute;
    left: 5px;
    top: 10px;
    bottom: 10px;
    width: 1px;
    background: linear-gradient(180deg, var(--accent-line), var(--line) 70%, transparent);
}

.tl-item { position: relative; padding-bottom: 34px; }
.tl-item:last-child { padding-bottom: 0; }

.tl-item::before {
    content: "";
    position: absolute;
    left: -30px;
    top: 8px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--bg);
    border: 2px solid var(--accent);
    box-shadow: 0 0 0 4px var(--bg), 0 0 14px rgba(88, 166, 255, .35);
}

.tl-date {
    display: inline-block;
    font-family: var(--mono);
    font-size: 12px;
    color: var(--accent);
    background: var(--accent-soft);
    border: 1px solid var(--accent-line);
    border-radius: 20px;
    padding: 2px 11px;
    margin-bottom: 12px;
}

.tl-item h3 { font-size: 18px; margin-bottom: 4px; }

.tl-org {
    font-size: 14px;
    color: var(--ink-2);
    margin-bottom: 10px;
}

.tl-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }

/* 经历里挂的案例块：把「做了什么、做成什么样」摊开讲 */
.tl-case {
    margin-top: 16px;
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-left: 2px solid var(--accent-line);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, .018);
}

.tl-case-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 10px;
}

.tl-case-tag {
    padding: 1px 9px;
    border-radius: 20px;
    border: 1px solid var(--accent-line);
    background: var(--accent-soft);
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 400;
    color: var(--accent);
    letter-spacing: .02em;
}

.tl-case ul {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tl-case li {
    position: relative;
    padding-left: 14px;
    font-size: 13.5px;
    line-height: 1.75;
    color: var(--ink-2);
}

.tl-case li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 10px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--ink-3);
}

.tl-case li b {
    font-weight: 600;
    color: var(--ink);
}

/* ---------- 9.1 代表案例（成果展示置顶） ---------- */
.case-block {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
    gap: 18px;
    margin-bottom: 56px;
}

.case-main {
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
}

.case-label {
    font-family: var(--mono);
    font-size: 11.5px;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 10px;
}

.case-title {
    font-size: 20px;
    line-height: 1.35;
    margin-bottom: 8px;
}

.case-sub {
    font-size: 13px;
    color: var(--ink-3);
    margin-bottom: 16px;
}

.case-desc {
    font-size: 14px;
    line-height: 1.85;
    color: var(--ink-2);
}

.case-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin: 22px 0 18px;
    padding: 18px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.case-metrics b {
    display: block;
    font-family: var(--mono);
    font-size: 24px;
    font-weight: 600;
    color: var(--accent);
    line-height: 1.2;
    margin-bottom: 3px;
}

.case-metrics b em {
    font-style: normal;
    font-size: 13px;
    margin-left: 1px;
}

.case-metrics span {
    font-size: 12px;
    color: var(--ink-3);
}

.case-side {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.case-card {
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    transition: border-color var(--dur) var(--ease),
                background var(--dur) var(--ease);
}

.case-card:hover {
    border-color: var(--line-strong);
    background: var(--surface-2);
}

.case-card-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 8px;
}

.case-card p {
    font-size: 13.5px;
    line-height: 1.8;
    color: var(--ink-2);
}

.case-card .link {
    display: inline-block;
    margin-top: 12px;
    font-family: var(--mono);
    font-size: 12px;
}

/* ---------- 10. 成果展示（按能力分组 + 横向滚动轨道） ---------- */

/* 定位段：先说清成果来自哪里 */
.works-lead {
    max-width: 78ch;
    margin: -2px 0 34px;
    font-size: 14.5px;
    line-height: 1.8;
    color: var(--ink-2);
}
.works-lead b { color: var(--ink); font-weight: 600; }

/* 能力分组 */
.works-block { margin-top: 52px; }

/* 组头：标题 + 这组证明了什么能力 */
.works-head--block { margin-bottom: 20px; }

.works-head--block h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 17px;
    margin-bottom: 8px;
}

.works-head--block h3 svg {
    width: 18px;
    height: 18px;
    stroke: var(--accent);
    fill: none;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.works-note {
    font-size: 13px;
    line-height: 1.65;
    color: var(--ink-3);
    max-width: 72ch;
}

/* 轨道头：类型标签 + 计数 + 翻页箭头 */
.works-track + .works-track { margin-top: 26px; }

.works-head--track {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.rail-block-label {
    font-family: var(--mono);
    font-size: 11.5px;
    letter-spacing: .08em;
    color: var(--ink-3);
    white-space: nowrap;
}

.works-count {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--ink-3);
}

.works-nav { margin-left: auto; display: flex; gap: 6px; }

/* 资质索引：主页只留摘要，完整成果与证书在 works.html */
.works-index {
    display: flex;
    align-items: center;
    gap: 20px 24px;
    flex-wrap: wrap;
    padding: 22px 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
}
.works-index-label {
    font-family: var(--mono);
    font-size: 11.5px;
    letter-spacing: .08em;
    color: var(--ink-3);
    white-space: nowrap;
}
.works-index-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 26px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.works-index-list li { display: flex; align-items: baseline; gap: 6px; }
.works-index-list b { font-family: var(--mono); font-size: 19px; color: var(--accent); }
.works-index-list span { font-size: 13px; color: var(--ink-2); }
.works-index-desc {
    flex: 1 1 340px;
    min-width: 0;
    font-size: 13px;
    line-height: 1.7;
    color: var(--ink-3);
}
.works-index-cta { margin-left: auto; white-space: nowrap; }

/* 二级页：返回首页 */
.works-back { margin-bottom: 16px; }
.works-back-link {
    font-family: var(--mono);
    font-size: 12.5px;
    color: var(--ink-2);
    text-decoration: none;
    transition: color var(--dur) var(--ease);
}
.works-back-link:hover { color: var(--accent); }

/* 二级页首节避开固定头部 */
.page-works .section:first-of-type { padding-top: calc(var(--header-h) + 56px); }

.rail-btn {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    color: var(--ink-2);
    transition: color var(--dur) var(--ease),
                border-color var(--dur) var(--ease),
                background var(--dur) var(--ease),
                opacity var(--dur) var(--ease);
}

.rail-btn:hover:not(:disabled) {
    color: var(--accent);
    border-color: var(--accent-line);
    background: var(--accent-soft);
}

.rail-btn:disabled { opacity: .3; cursor: default; }

.rail-btn svg {
    width: 15px;
    height: 15px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* 轨道：隐藏丑陋的系统滚动条，改用箭头 + 边缘渐隐 */
.rail { position: relative; }

.rail-track {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 4px 0 14px;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    cursor: grab;
}
.rail-track::-webkit-scrollbar { display: none; }
.rail-track.is-dragging { cursor: grabbing; user-select: none; }

.rail-track::after {
    content: "";
    flex: 0 0 1px;
}

/* 左右边缘渐隐，暗示还有内容 */
.rail::before,
.rail::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 14px;
    width: 44px;
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--dur) var(--ease);
    z-index: 2;
}
.rail::before {
    left: 0;
    background: linear-gradient(90deg, var(--bg), transparent);
}
.rail::after {
    right: 0;
    background: linear-gradient(270deg, var(--bg), transparent);
}
.rail.is-start::before { opacity: 0; }
.rail.is-end::after  { opacity: 0; }
.rail:not(.is-start)::before { opacity: 1; }
.rail:not(.is-end)::after   { opacity: 1; }

.work-card {
    flex: 0 0 280px;
    width: 280px;
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color var(--dur) var(--ease),
                transform var(--dur) var(--ease),
                box-shadow var(--dur) var(--ease);
}

.work-card:hover {
    border-color: var(--accent-line);
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, .45);
}

.work-media {
    display: block;
    width: 100%;
    height: 150px;
    padding: 0;
    border-bottom: 1px solid var(--line);
    background: var(--surface-2);
    overflow: hidden;
    position: relative;
}

.work-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: transform .3s var(--ease);
}

.work-card:hover .work-media img { transform: scale(1.05); }

.work-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(11, 14, 20, 0);
    transition: background var(--dur) var(--ease);
}

.work-media:hover::after { background: rgba(11, 14, 20, .18); }

.work-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 18px 18px 16px;
}

.work-body h4 {
    font-size: 15px;
    line-height: 1.45;
    margin-bottom: 10px;
}

.work-body h4 a { color: var(--ink); transition: color var(--dur) var(--ease); }
.work-body h4 a:hover { color: var(--accent); }

.work-meta {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--line);
    font-family: var(--mono);
    font-size: 11.5px;
    color: var(--ink-3);
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
}

.work-meta .link { color: var(--accent); }

/* ---------- 11. 灯箱 ---------- */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 32px;
    background: rgba(5, 7, 10, .92);
    backdrop-filter: blur(6px);
}

.lightbox.is-open { display: flex; }

.lightbox-figure {
    position: relative;
    max-width: min(1100px, 94vw);
    max-height: 88vh;
    margin: 0;
}

.lightbox-figure img {
    max-width: 100%;
    max-height: 86vh;
    border-radius: var(--radius);
    border: 1px solid var(--line-strong);
    background: #fff;
}

.lightbox-close {
    position: absolute;
    top: -44px;
    right: 0;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 1px solid var(--line-strong);
    background: var(--surface-2);
    font-size: 22px;
    line-height: 1;
    color: var(--ink-2);
    transition: color var(--dur) var(--ease),
                border-color var(--dur) var(--ease);
}

.lightbox-close:hover { color: var(--accent); border-color: var(--accent-line); }

.lightbox-cap {
    margin-top: 12px;
    text-align: center;
    font-size: 13px;
    color: var(--ink-2);
}

/* ---------- 12. 页脚 ---------- */
.site-footer {
    position: relative;
    border-top: 1px solid var(--line);
    padding: 56px 0 0;
    background: var(--surface);
    /* 页脚柔光是 1000px 宽的绝对定位伪元素，不裁剪会把页面横向撑宽 */
    overflow: hidden;
}

/* 页脚顶部柔光，收尾时再给一点亮度层次 */
.site-footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 1000px;
    height: 320px;
    background: radial-gradient(ellipse at 50% 0%, rgba(88, 166, 255, .12), transparent 66%);
    pointer-events: none;
}

.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr));
    gap: 36px;
    padding-bottom: 40px;
}

.footer-brand p {
    color: var(--ink-2);
    font-size: 14px;
    margin-top: 14px;
    max-width: 340px;
}

.footer-col h4 {
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--ink-3);
    margin-bottom: 16px;
}

.footer-col li { margin-bottom: 10px; }

.footer-col a {
    color: var(--ink-2);
    font-size: 13px;
    transition: color var(--dur) var(--ease);
}
.footer-col a:hover { color: var(--accent); }

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    justify-content: space-between;
    padding: 20px 24px;
    border-top: 1px solid var(--line);
    font-family: var(--mono);
    font-size: 12px;
    color: var(--ink-3);
}

/* ---------- 13. 回到顶部 ---------- */
.to-top {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 800;
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 1px solid var(--line-strong);
    background: rgba(16, 21, 29, .9);
    backdrop-filter: blur(8px);
    color: var(--ink-2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity var(--dur) var(--ease),
                transform var(--dur) var(--ease),
                visibility var(--dur) var(--ease),
                color var(--dur) var(--ease);
}

.to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top:hover { color: var(--accent); border-color: var(--accent-line); }

.to-top svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ---------- 14. 入场动效 ---------- */
.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .6s var(--ease), transform .6s var(--ease);
}

.reveal.is-visible { opacity: 1; transform: none; }

.reveal[data-delay="1"] { transition-delay: .06s; }
.reveal[data-delay="2"] { transition-delay: .12s; }
.reveal[data-delay="3"] { transition-delay: .18s; }
.reveal[data-delay="4"] { transition-delay: .24s; }
.reveal[data-delay="5"] { transition-delay: .30s; }

/* ---------- 15. 响应式 ---------- */
@media (max-width: 1000px) {
    .hero-desc { max-width: 640px; }
    /* 首屏回落单栏：图谱面板移到文字下方 */
    .hero-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 44px;
        align-items: start;
    }
    .hero-copy { max-width: 640px; }
    .case-block { grid-template-columns: minmax(0, 1fr); }
    .about-grid { grid-template-columns: minmax(0, 1fr); }
    .stat-strip { grid-template-columns: repeat(3, 1fr); }
    .stat-strip li:nth-child(3) { border-right: 0; }
    .stat-strip li:nth-child(-n+3) { border-bottom: 1px solid var(--line); }
    .footer-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

@media (max-width: 900px) {
    .nav-toggle { display: block; }

    /* 关键修复：移动端导航改为可展开面板，不再换行被裁切 */
    .nav-links {
        position: fixed;
        top: var(--header-h);
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        padding: 14px 24px 22px;
        background: var(--bg);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
        border-bottom: 1px solid var(--line);
        box-shadow: 0 18px 40px rgba(0, 0, 0, .5);
        transform: translateY(-8px);
        opacity: 0;
        visibility: hidden;
        transition: opacity var(--dur) var(--ease),
                    transform var(--dur) var(--ease),
                    visibility var(--dur) var(--ease);
    }

    .nav-links.is-open {
        transform: none;
        opacity: 1;
        visibility: visible;
    }

    .nav-links a { padding: 11px 12px; font-size: 15px; }
    .nav-links a.is-active::after { display: none; }

    body.nav-open { overflow: hidden; }
}

@media (max-width: 720px) {
    .container { padding: 0 18px; }
    .section { padding: 64px 0; }
    .hero { padding-top: calc(var(--header-h) + 48px); }
    .hero-grid { padding-bottom: 48px; gap: 36px; }
    .hero-copy { max-width: 100%; }
    .hero-graph { padding: 16px 14px 14px; }
    .graph-canvas-wrap { height: 248px; }
    .graph-head { font-size: 11px; }
    .info-grid { grid-template-columns: minmax(0, 1fr); }
    .skill-grid { grid-template-columns: minmax(0, 1fr); }
    .case-main { padding: 22px; }
    .case-title { font-size: 18px; }
    .case-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
    .tl-case { padding: 14px 15px; }
    .stat-strip { grid-template-columns: repeat(2, 1fr); }
    .stat-strip li { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
    .stat-strip li:nth-child(2n) { border-right: 0; }
    .stat-strip li:nth-last-child(-n+2) { border-bottom: 0; }
    .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
    .work-card { flex: 0 0 246px; width: 246px; }
    .work-media { height: 130px; }
    .works-lead { font-size: 13.5px; margin-bottom: 28px; }
    .works-note { font-size: 12.5px; }
    .works-head--track { gap: 10px 12px; }
    .works-index { padding: 18px 16px; gap: 14px 16px; }
    .works-index-list { gap: 8px 18px; }
}

/* ---------- 16. 降低动效偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
    .reveal { opacity: 1; transform: none; }
}
