/* ==========================================================================
   RuoMen · 设计系统 v1
   近黑底 / 单一强调色 / 细线分层 / 等宽标签
   不依赖任何框架，不加载外部字体
   ========================================================================== */

:root {
    --bg: #07090C;
    --bg-soft: #0A0D12;
    --panel: #0D1117;
    --line: rgba(255, 255, 255, 0.08);
    --line-strong: rgba(255, 255, 255, 0.16);
    --ink: #E8EDF2;
    --ink-dim: #8A94A3;
    --ink-faint: #5A6472;
    --accent: #5EE6C4;
    --accent-dim: rgba(94, 230, 196, 0.16);

    --font-sans: "PingFang SC", "Hiragino Sans GB", "Source Han Sans SC",
                 "Noto Sans SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
    --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", "Cascadia Mono",
                 Menlo, Consolas, monospace;

    --w: 1180px;
    --gap: clamp(20px, 4vw, 56px);
    --radius: 4px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

::selection { background: var(--accent); color: #04120E; }

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

/* ---------- 工具类 ---------- */

.wrap {
    width: 100%;
    max-width: var(--w);
    margin-inline: auto;
    padding-inline: clamp(18px, 4vw, 40px);
}

.mono {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-dim);
}

.rule {
    height: 1px;
    background: var(--line);
    border: 0;
    margin: 0;
}

.skip {
    position: absolute;
    left: -9999px;
    top: 0;
    padding: 10px 16px;
    background: var(--accent);
    color: #04120E;
    z-index: 100;
}
.skip:focus { left: 12px; top: 12px; }

/* ---------- 顶部导航 ---------- */

.nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(7, 9, 12, 0.82);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
}

.nav__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-mono);
    font-size: 13px;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--ink);
    white-space: nowrap;
}

.brand__dot {
    width: 7px;
    height: 7px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 12px var(--accent);
}

.nav__links {
    display: flex;
    align-items: center;
    gap: clamp(14px, 2.4vw, 34px);
}

.nav__links a {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.12em;
    color: var(--ink-dim);
    padding: 6px 0;
    border-bottom: 1px solid transparent;
    transition: color 0.25s ease, border-color 0.25s ease;
    white-space: nowrap;
}

.nav__links a:hover { color: var(--ink); }

.nav__links a[aria-current="page"] {
    color: var(--ink);
    border-bottom-color: var(--accent);
}

.nav__toggle {
    display: none;
    background: none;
    border: 1px solid var(--line-strong);
    color: var(--ink);
    border-radius: var(--radius);
    padding: 6px 10px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.1em;
    cursor: pointer;
}

/* ---------- 页头 ---------- */

.pagehead {
    /* 用 padding-block，避免覆盖 .wrap 的左右内边距（移动端会贴边） */
    padding-block: clamp(48px, 8vw, 96px) clamp(32px, 5vw, 56px);
}

.pagehead__eyebrow {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.pagehead__eyebrow::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--line);
}

.pagehead h1 {
    margin: 0 0 20px;
    font-size: clamp(32px, 5.4vw, 64px);
    line-height: 1.08;
    letter-spacing: -0.02em;
    font-weight: 700;
}

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

.pagehead p {
    margin: 0;
    max-width: 62ch;
    color: var(--ink-dim);
    font-size: clamp(15px, 1.3vw, 18px);
}

/* ---------- 筛选 ---------- */

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 20px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.filters a {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-dim);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 7px 16px;
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.filters a:hover { color: var(--ink); border-color: var(--line-strong); }

.filters a[aria-current="true"] {
    color: #04120E;
    background: var(--accent);
    border-color: var(--accent);
    font-weight: 600;
}

.filters a span { opacity: 0.55; margin-left: 6px; }

/* ---------- 作品网格 ---------- */

.projects {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--gap);
    padding: clamp(36px, 6vw, 72px) 0 clamp(56px, 8vw, 104px);
}

/* 错落：第二列整体下沉，做出刊物感 */
.projects > .card:nth-child(even) { margin-top: clamp(0px, 5vw, 72px); }

.card {
    display: block;
    border-top: 1px solid var(--line);
    padding-top: 18px;
    transition: border-color 0.3s ease;
}

.card:hover { border-top-color: var(--accent); }

.card__cover {
    display: block;
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.card__cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(0.92) brightness(0.94);
    transition: transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1), filter 0.5s ease;
}

.card:hover .card__cover img {
    transform: scale(1.025);
    filter: saturate(1) brightness(1);
}

.card__badge {
    position: absolute;
    top: 12px;
    left: 12px;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
    background: rgba(7, 9, 12, 0.78);
    border: 1px solid rgba(94, 230, 196, 0.32);
    border-radius: 2px;
    padding: 3px 8px;
    backdrop-filter: blur(6px);
}

/* 没有截图的项目：用排版做封面，而不是编一张假图 */
/* 极淡的强调色辉光，给纯文字封面一点纵深 */
.card__cover--type::after,
.detail__cover--type::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(58% 78% at 82% 18%, rgba(94, 230, 196, 0.10), transparent 72%);
    pointer-events: none;
}
.card__cover--type,
.detail__cover--type {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 10px;
    padding: clamp(18px, 2.4vw, 28px);
    background-image:
        linear-gradient(var(--line) 1px, transparent 1px),
        linear-gradient(90deg, var(--line) 1px, transparent 1px);
    background-size: 56px 56px, 56px 56px;
    background-position: -1px -1px;
}

.detail__cover--type {
    aspect-ratio: 21 / 9;
    padding: clamp(24px, 3.4vw, 48px);
}

.card__cover--type .type-idx,
.detail__cover--type .type-idx {
    position: absolute;
    top: clamp(16px, 2vw, 26px);
    right: clamp(18px, 2.4vw, 28px);
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.2em;
    color: var(--ink-faint);
}

.card__cover--type .type-title,
.detail__cover--type .type-title {
    font-family: var(--font-mono);
    font-size: clamp(20px, 2.6vw, 32px);
    letter-spacing: 0.06em;
    line-height: 1.15;
    color: var(--ink);
}

.detail__cover--type .type-title {
    font-size: clamp(36px, 5.6vw, 76px);
}

.card__cover--type .type-tech,
.detail__cover--type .type-tech {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.12em;
    color: var(--accent);
}

.card__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin: 16px 0 6px;
}

.card__title {
    margin: 0;
    font-size: clamp(17px, 1.7vw, 21px);
    font-weight: 600;
    letter-spacing: -0.01em;
}

.card__title span { color: var(--ink-dim); font-weight: 400; }
.card__title a:hover { color: var(--accent); }

.card__year {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.1em;
    color: var(--ink-faint);
    white-space: nowrap;
}

.card__desc {
    margin: 0 0 14px;
    color: var(--ink-dim);
    font-size: 14.5px;
    line-height: 1.7;
}

.card__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.techline {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: 0.1em;
    color: var(--ink-faint);
    text-transform: uppercase;
}

.techline span::before {
    content: "·";
    margin-right: 10px;
    opacity: 0.5;
}
.techline span:first-child::before { content: none; margin: 0; }

.card__go {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.12em;
    color: var(--accent);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.card__go::after {
    content: "↗";
    transition: transform 0.3s ease;
}

.card:hover .card__go::after { transform: translate(2px, -2px); }

/* ---------- 详情页 ---------- */

.detail__back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.12em;
    color: var(--ink-dim);
    padding: 28px 0 0;
}
.detail__back:hover { color: var(--accent); }

.detail__head {
    padding: 28px 0 clamp(28px, 4vw, 44px);
    border-bottom: 1px solid var(--line);
}

.detail__head h1 {
    margin: 10px 0 14px;
    font-size: clamp(30px, 4.6vw, 56px);
    line-height: 1.08;
    letter-spacing: -0.02em;
}

.detail__head .lede {
    margin: 0;
    max-width: 64ch;
    color: var(--ink-dim);
    font-size: clamp(15px, 1.3vw, 18px);
}

.detail__meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px 32px;
    padding: 24px 0;
    border-bottom: 1px solid var(--line);
}

.detail__meta dt {
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ink-faint);
    margin-bottom: 6px;
}

.detail__meta dd {
    margin: 0;
    font-size: 14px;
    color: var(--ink);
}

.detail__cover {
    margin: clamp(28px, 4vw, 48px) 0;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-soft);
}

.detail__cover img { width: 100%; }

.detail__body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: clamp(28px, 5vw, 72px);
    align-items: start;
    padding: clamp(24px, 4vw, 48px) 0 clamp(56px, 8vw, 96px);
}

.prose p {
    margin: 0 0 1.1em;
    color: var(--ink-dim);
    font-size: 15.5px;
    line-height: 1.85;
}

.prose h2 {
    font-size: 15px;
    letter-spacing: 0.02em;
    margin: 0 0 18px;
    color: var(--ink);
}

.points {
    list-style: none;
    margin: 0 0 36px;
    padding: 0;
    display: grid;
    gap: 18px;
}

.points li {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
}

.points .n {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.1em;
    color: var(--accent);
    padding-top: 4px;
}

.points p {
    margin: 0;
    color: var(--ink-dim);
    font-size: 15px;
    line-height: 1.8;
}

.points strong { color: var(--ink); font-weight: 600; }

.sidebar {
    position: sticky;
    top: 88px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px;
    background: var(--panel);
}

.sidebar dl { margin: 0; display: grid; gap: 14px; }

.sidebar dt {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ink-faint);
}

.sidebar dd { margin: 2px 0 0; font-size: 13px; color: var(--ink); }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 11px 16px;
    margin-top: 18px;
    background: var(--accent);
    color: #04120E;
    font-family: var(--font-mono);
    font-size: 11.5px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 700;
    border-radius: var(--radius);
    transition: filter 0.2s ease;
}

.btn:hover { filter: brightness(1.08); }

.btn--ghost {
    background: transparent;
    color: var(--ink);
    border: 1px solid var(--line-strong);
    font-weight: 500;
}

.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }

.note {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
    font-size: 12px;
    line-height: 1.7;
    color: var(--ink-faint);
}

/* 上一篇 / 下一篇 */

.pager {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: var(--line);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.pager a {
    padding: 26px 4px;
    display: block;
}

.pager a:hover .pager__t { color: var(--accent); }

.pager__k {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ink-faint);
}

.pager__t {
    margin-top: 6px;
    font-size: 16px;
    transition: color 0.2s ease;
}

.pager a:last-child { text-align: right; }

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

.footer {
    border-top: 1px solid var(--line);
    margin-top: clamp(48px, 8vw, 96px);
    padding: 32px 0 44px;
}

.footer__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.footer__links {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.1em;
    color: var(--ink-faint);
}

.footer__links a:hover { color: var(--ink); }

/* ---------- 空状态 ---------- */

.empty {
    padding: 80px 0;
    text-align: center;
    color: var(--ink-dim);
}

.empty .mono { display: block; margin-bottom: 12px; }

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

@media (max-width: 900px) {
    .projects { grid-template-columns: minmax(0, 1fr); }
    .projects > .card:nth-child(even) { margin-top: 0; }

    .detail__body { grid-template-columns: minmax(0, 1fr); }
    .sidebar { position: static; }

    .nav__toggle { display: inline-flex; }

    .nav__links {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        padding: 14px clamp(18px, 4vw, 40px) 22px;
        background: rgba(7, 9, 12, 0.98);
        border-bottom: 1px solid var(--line);
    }

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

    .nav__links a { padding: 10px 0; width: 100%; }
}

/* ---------- 动效克制 ---------- */

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

/* ==========================================================================
   资源索引
   ========================================================================== */

.res-group {
    padding: clamp(30px, 4.4vw, 52px) 0;
    border-bottom: 1px solid var(--line);
}

.res-group__head {
    display: flex;
    align-items: baseline;
    gap: 16px;
    margin-bottom: 8px;
}

.res-group__head h2 {
    margin: 0;
    font-size: clamp(20px, 2.2vw, 26px);
    letter-spacing: -0.01em;
}

.res-group__head .n {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.16em;
    color: var(--accent);
}

.res-group__note {
    margin: 0 0 22px;
    color: var(--ink-faint);
    font-size: 14px;
}

.res {
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr) 24px;
    gap: 18px;
    align-items: start;
    padding: 16px 8px;
    margin-inline: -8px;
    border-top: 1px solid var(--line);
    border-radius: 2px;
    transition: background 0.2s ease;
}

.res:hover { background: rgba(255, 255, 255, 0.025); }

.res__body,
.res__title {
    display: block;
}

.res__type {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-faint);
    border: 1px solid var(--line);
    border-radius: 2px;
    padding: 3px 0;
    text-align: center;
    margin-top: 3px;
}

.res__name {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
    color: var(--ink);
    transition: color 0.2s ease;
}

.res:hover .res__name { color: var(--accent); }

.res__pick {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 8px rgba(94, 230, 196, 0.7);
    flex: none;
}

.res__tags {
    margin-left: 10px;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.1em;
    color: var(--ink-faint);
    white-space: nowrap;
}

.res__desc {
    display: block;
    margin-top: 4px;
    color: var(--ink-dim);
    font-size: 14px;
    line-height: 1.65;
}

.res__arrow {
    font-family: var(--font-mono);
    color: var(--ink-faint);
    transition: color 0.2s ease, transform 0.2s ease;
    text-align: right;
    padding-top: 2px;
}

.res:hover .res__arrow { color: var(--accent); transform: translate(2px, -2px); }

/* 学习路径 */

.paths {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--gap);
    padding: clamp(36px, 5vw, 64px) 0 clamp(48px, 7vw, 88px);
}

.path h2 {
    font-size: clamp(18px, 2vw, 22px);
    margin: 0 0 6px;
}

.path .path__hint {
    margin: 0 0 22px;
    color: var(--ink-faint);
    font-size: 13.5px;
}

.path ol {
    list-style: none;
    margin: 0;
    padding: 0;
    counter-reset: step;
}

.path li {
    counter-increment: step;
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 14px;
    padding: 14px 0;
    border-top: 1px solid var(--line);
}

.path li::before {
    content: counter(step, decimal-leading-zero);
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.1em;
    color: var(--accent);
    padding-top: 3px;
}

.path b {
    display: block;
    font-weight: 600;
    font-size: 14.5px;
    color: var(--ink);
}

.path span {
    display: block;
    margin-top: 3px;
    color: var(--ink-dim);
    font-size: 13.5px;
    line-height: 1.65;
}

@media (max-width: 900px) {
    .res { grid-template-columns: 64px minmax(0, 1fr) 18px; gap: 12px; }
    .res__tags { display: block; margin: 4px 0 0; }
    .paths { grid-template-columns: minmax(0, 1fr); }
}

/* ==========================================================================
   首页
   ========================================================================== */

.hero {
    padding-block: clamp(56px, 9vw, 116px) clamp(36px, 5vw, 60px);
}

.hero h1 {
    margin: 14px 0 20px;
    font-size: clamp(36px, 6.2vw, 80px);
    line-height: 1.06;
    letter-spacing: -0.03em;
    font-weight: 700;
    max-width: 16em;
    text-wrap: balance;
}

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

.hero .lede {
    margin: 0;
    max-width: 56ch;
    color: var(--ink-dim);
    font-size: clamp(15.5px, 1.35vw, 18px);
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 34px;
}

.btn--inline {
    width: auto;
    margin: 0;
    padding: 12px 22px;
}

.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding: clamp(44px, 6vw, 76px) 0 0;
}

.section-head h2 {
    margin: 0;
    font-size: clamp(21px, 2.5vw, 30px);
    letter-spacing: -0.01em;
}

.section-head .more {
    font-family: var(--font-sans);
    font-size: 13px;
    letter-spacing: 0.01em;
    color: var(--accent);
    white-space: nowrap;
}

.projects--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding-top: 26px;
}

.projects--3 > .card:nth-child(even) { margin-top: 0; }
.projects--3 .card__desc { font-size: 13.5px; }

.caps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--gap);
    padding: clamp(36px, 5vw, 60px) 0 clamp(48px, 7vw, 84px);
    border-top: 1px solid var(--line);
    margin-top: clamp(40px, 6vw, 72px);
}

.caps h3 {
    margin: 0 0 16px;
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink-faint);
    font-weight: 500;
}

.caps ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 9px;
    font-size: 14.5px;
    color: var(--ink);
}

.caps li span {
    display: block;
    color: var(--ink-faint);
    font-size: 12.5px;
    margin-top: 1px;
}

@media (max-width: 900px) {
    .projects--3 { grid-template-columns: minmax(0, 1fr); }
    .caps { grid-template-columns: minmax(0, 1fr); }
}

/* ==========================================================================
   游戏 · 心得
   ========================================================================== */

.notes {
    display: grid;
    gap: 1px;
    background: var(--line);
    margin-top: 26px;
}

.note-item {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: clamp(20px, 3vw, 40px);
    align-items: center;
    padding: clamp(20px, 3vw, 32px) 0;
    background: var(--bg);
}

.note-item__cover {
    display: block;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 16 / 9;
}

.note-item__cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(0.95) brightness(0.95);
    transition: transform 0.6s ease;
}

.note-item:hover .note-item__cover img { transform: scale(1.03); }

.note-item__body h3 {
    margin: 0 0 10px;
    font-size: clamp(17px, 1.8vw, 22px);
}

.note-item__body h3 a:hover { color: var(--accent); }

.note-item__body p {
    margin: 0 0 14px;
    color: var(--ink-dim);
    font-size: 14.5px;
    line-height: 1.75;
    max-width: 62ch;
}

.note-item__foot {
    display: flex;
    align-items: center;
    gap: 18px;
}

/* ==========================================================================
   音乐播放器
   ========================================================================== */

.player-wrap {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
    gap: var(--gap);
    padding-top: clamp(28px, 4vw, 48px);
}

.player {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: clamp(22px, 3vw, 36px);
    background: var(--panel);
}

.player__now {
    display: flex;
    gap: clamp(18px, 3vw, 32px);
    align-items: center;
    margin-bottom: 30px;
}

.player__cover {
    width: clamp(110px, 16vw, 168px);
    height: clamp(110px, 16vw, 168px);
    object-fit: cover;
    border-radius: 2px;
    border: 1px solid var(--line);
    flex: none;
}

.player__meta h2 {
    margin: 10px 0 6px;
    font-size: clamp(20px, 2.4vw, 28px);
    letter-spacing: -0.01em;
}

.player__meta p {
    margin: 0;
    color: var(--ink-dim);
    font-size: 14px;
}

.player__bar {
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    cursor: pointer;
    position: relative;
    margin-bottom: 10px;
}

.player__fill {
    position: absolute;
    inset: 0 auto 0 0;
    width: 0;
    background: var(--accent);
    border-radius: 2px;
}

.player__time {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--ink-faint);
}

.player__controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 26px;
}

.pbtn {
    border: 1px solid var(--line-strong);
    background: transparent;
    color: var(--ink-dim);
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.1em;
    padding: 9px 14px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s ease;
}

.pbtn:hover { color: var(--ink); border-color: var(--ink-faint); }

.pbtn.is-on {
    color: var(--accent);
    border-color: rgba(94, 230, 196, 0.5);
    background: var(--accent-dim);
}

.pbtn--main {
    background: var(--accent);
    border-color: var(--accent);
    color: #04120E;
    font-weight: 700;
    padding: 12px 34px;
    font-size: 12px;
}

.pbtn--main:hover { filter: brightness(1.08); color: #04120E; }

.plist {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    align-self: start;
}

.plist__head {
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
    color: var(--ink-faint);
    font-size: 10.5px;
}

.plist__item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 16px;
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
    text-align: left;
    cursor: pointer;
    transition: background 0.2s ease;
}

.plist__item:last-child { border-bottom: 0; }
.plist__item:hover { background: rgba(255, 255, 255, 0.03); }

.plist__item img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 2px;
    flex: none;
}

.plist__text { min-width: 0; }

.plist__title {
    display: block;
    font-size: 13.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.plist__artist {
    display: block;
    font-size: 11.5px;
    color: var(--ink-faint);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.plist__item.is-active { background: var(--accent-dim); }
.plist__item.is-active .plist__title { color: var(--accent); }

.player__hint {
    display: block;
    padding: 18px 0 clamp(36px, 5vw, 64px);
    color: var(--ink-faint);
    font-size: 11px;
    line-height: 1.8;
}

/* ==========================================================================
   时间线
   ========================================================================== */

.tl { padding-top: 10px; }

.tl__year {
    padding: clamp(24px, 3vw, 36px) 0 6px;
}

.tl__year .mono {
    font-size: 12px;
    color: var(--accent);
    letter-spacing: 0.22em;
}

.tl__item {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 20px;
    padding: 16px 0;
    border-top: 1px solid var(--line);
}

.tl__date {
    font-size: 11px;
    color: var(--ink-faint);
    padding-top: 3px;
}

.tl__body h3 {
    margin: 0 0 4px;
    font-size: 16px;
    font-weight: 600;
}

.tl__body h3 a:hover { color: var(--accent); }

.tl__body p {
    margin: 0;
    color: var(--ink-dim);
    font-size: 14px;
    line-height: 1.7;
    max-width: 64ch;
}

.linkrow {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1px;
    background: var(--line);
    border-block: 1px solid var(--line);
    margin-top: 24px;
}

.linkrow a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 20px;
    background: var(--bg);
    font-size: 14px;
    transition: background 0.2s ease, color 0.2s ease;
}

.linkrow a:hover { background: var(--panel); color: var(--accent); }

.linkrow__arrow { color: var(--ink-faint); font-family: var(--font-mono); }

.contact-box {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    gap: var(--gap);
    align-items: start;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: clamp(22px, 3vw, 36px);
    margin: clamp(40px, 6vw, 72px) 0 clamp(48px, 7vw, 88px);
    background: var(--panel);
}

.contact-box p {
    margin: 10px 0 0;
    color: var(--ink-dim);
    font-size: 14.5px;
}

.contact-box ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 12px;
}

.contact-box li {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
    font-size: 14px;
}

.contact-box li:last-child { border-bottom: 0; padding-bottom: 0; }
.contact-box li .mono { font-size: 10.5px; color: var(--ink-faint); }
.contact-box a:hover { color: var(--accent); }

/* ==========================================================================
   聊天
   ========================================================================== */

.chat {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--panel);
    margin-top: clamp(24px, 4vw, 40px);
}

.chat__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--line);
    background: var(--bg-soft);
}

.chat__id {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
}

.chat__id strong { display: block; font-size: 14px; }

.chat__id span:last-child {
    display: block;
    font-family: var(--font-mono);
    font-size: 10.5px;
    color: var(--ink-faint);
}

.chat__dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #E5534B;
    box-shadow: 0 0 8px rgba(229, 83, 75, 0.6);
    flex: none;
}

.chat__dot.is-on {
    background: var(--accent);
    box-shadow: 0 0 8px rgba(94, 230, 196, 0.7);
}

.chat__tools { display: flex; gap: 8px; }

.chat__tools button {
    background: transparent;
    border: 1px solid var(--line-strong);
    color: var(--ink-dim);
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: 0.08em;
    padding: 6px 12px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s ease;
}

.chat__tools button:hover { color: var(--ink); border-color: var(--ink-faint); }

.chat__body {
    height: min(58vh, 520px);
    overflow-y: auto;
    padding: 22px 18px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.msg { display: flex; gap: 12px; align-items: flex-start; }
.msg--user { flex-direction: row-reverse; }

.msg__avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid var(--line-strong);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 9.5px;
    letter-spacing: 0.06em;
    color: var(--ink-faint);
    flex: none;
    margin-top: 2px;
}

.msg--user .msg__avatar { border-color: rgba(94, 230, 196, 0.4); color: var(--accent); }

.msg__bubble {
    padding: 12px 16px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--bg-soft);
    max-width: min(72ch, 88%);
    font-size: 14.5px;
    line-height: 1.75;
    overflow-wrap: anywhere;
}

.msg--user .msg__bubble {
    background: rgba(94, 230, 196, 0.08);
    border-color: rgba(94, 230, 196, 0.25);
}

.msg__bubble p { margin: 0 0 0.85em; }
.msg__bubble p:last-child { margin-bottom: 0; }

.msg__bubble pre {
    position: relative;
    margin: 12px 0;
    padding: 14px 14px 12px;
    background: #05070A;
    border: 1px solid var(--line);
    border-radius: 3px;
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: 12.5px;
    line-height: 1.65;
}

.msg__bubble code {
    font-family: var(--font-mono);
    font-size: 12.5px;
}

.msg__bubble p code {
    background: rgba(255, 255, 255, 0.06);
    padding: 1px 5px;
    border-radius: 2px;
}

.code-copy {
    position: absolute;
    top: 6px;
    right: 6px;
    background: rgba(10, 13, 18, 0.9);
    border: 1px solid var(--line-strong);
    color: var(--ink-dim);
    font-family: var(--font-mono);
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 2px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease;
}

pre:hover .code-copy { opacity: 1; }

.msg__bubble table { border-collapse: collapse; margin: 10px 0; }
.msg__bubble th,
.msg__bubble td { border: 1px solid var(--line); padding: 6px 10px; }
.msg__bubble blockquote {
    margin: 10px 0;
    padding-left: 12px;
    border-left: 2px solid var(--line-strong);
    color: var(--ink-dim);
}

.thinking { display: flex; align-items: center; gap: 6px; }
.thinking i {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--ink-faint);
    animation: pulse 1.2s infinite ease-in-out;
}
.thinking i:nth-child(2) { animation-delay: 0.15s; }
.thinking i:nth-child(3) { animation-delay: 0.3s; }
.thinking span {
    margin-left: 6px;
    font-family: var(--font-mono);
    font-size: 10.5px;
    color: var(--ink-faint);
}

@keyframes pulse {
    0%, 100% { opacity: 0.25; transform: scale(0.9); }
    50% { opacity: 1; transform: scale(1.1); }
}

.composer {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    padding: 14px 18px;
    border-top: 1px solid var(--line);
    background: var(--bg-soft);
}

.composer textarea {
    flex: 1;
    resize: none;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--ink);
    padding: 11px 14px;
    font-family: inherit;
    font-size: 14.5px;
    line-height: 1.6;
    min-height: 46px;
    max-height: 140px;
}

.composer textarea:focus {
    outline: none;
    border-color: rgba(94, 230, 196, 0.5);
}

.composer button {
    height: 46px;
    padding: 0 24px;
    background: var(--accent);
    border: 0;
    border-radius: var(--radius);
    color: #04120E;
    font-family: var(--font-mono);
    font-size: 11.5px;
    letter-spacing: 0.1em;
    font-weight: 700;
    cursor: pointer;
    transition: filter 0.2s ease;
}

.composer button:hover { filter: brightness(1.08); }
.composer button:disabled { opacity: 0.5; cursor: default; }

/* 模态框 */

.modal {
    position: fixed;
    inset: 0;
    background: rgba(4, 6, 9, 0.8);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 100;
}

.modal[hidden] { display: none; }

.modal__panel {
    width: 100%;
    max-width: 460px;
    background: var(--panel);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    padding: clamp(22px, 3vw, 32px);
}

.modal__panel h2 {
    margin: 0 0 10px;
    font-size: 20px;
}

.modal__panel > p {
    margin: 0 0 20px;
    color: var(--ink-dim);
    font-size: 13.5px;
    line-height: 1.7;
}

.modal__panel a { color: var(--accent); }

.modal__field { display: block; margin-bottom: 14px; }

.modal__field span {
    display: block;
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-faint);
    margin-bottom: 8px;
}

.modal__field input {
    width: 100%;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--ink);
    padding: 10px 12px;
    font-family: var(--font-mono);
    font-size: 13px;
}

.modal__check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--ink-dim);
    margin-bottom: 22px;
}

.modal__actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

@media (max-width: 900px) {
    .player-wrap { grid-template-columns: minmax(0, 1fr); }
    .note-item { grid-template-columns: minmax(0, 1fr); }
    .contact-box { grid-template-columns: minmax(0, 1fr); }
    .tl__item { grid-template-columns: 1fr; gap: 6px; }
    .tl__date { padding-top: 0; }
    .chat__body { height: min(60vh, 460px); padding: 16px 12px; }
    .msg__bubble { max-width: 100%; }
    .composer { padding: 12px; }
    .composer button { padding: 0 18px; }
}

/* ==========================================================================
   设计系统 v2 · 精修层
   在 v1 的结构之上补三件事：氛围（光/噪点/网格）、字体对比、构图与动效
   ========================================================================== */

:root {
    --bg: #06070A;
    --bg-soft: #0A0C11;
    --panel: #0C0F15;
    --line: rgba(255, 255, 255, 0.07);
    --line-strong: rgba(255, 255, 255, 0.15);
    --ink: #EEF2F6;
    --ink-dim: #9AA4B2;
    --ink-faint: #66707D;
    --accent: #7DE8C9;
    --accent-dim: rgba(125, 232, 201, 0.14);

    --font-serif: "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC",
                  "SimSun", "Times New Roman", serif;

    --w: 1240px;
    --radius: 3px;
}

/* ---------- 氛围：底部光晕 + 噪点 ---------- */

body {
    background:
        radial-gradient(1100px 560px at 82% -8%, rgba(125, 232, 201, 0.10), transparent 62%),
        radial-gradient(900px 520px at 6% 4%, rgba(126, 160, 255, 0.07), transparent 62%),
        var(--bg);
    background-attachment: fixed;
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    opacity: 0.045;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- 字体对比：中文标题用宋体 ---------- */

.hero h1,
.pagehead h1,
.detail__head h1,
.empty h1,
.error-title {
    font-family: var(--font-serif);
    font-weight: 600;
    letter-spacing: 0.005em;
    line-height: 1.14;
}

.hero h1 {
    font-size: clamp(40px, 6.6vw, 92px);
    line-height: 1.08;
    letter-spacing: -0.005em;
    max-width: 15em;
}

.hero h1 em,
.pagehead h1 em {
    color: var(--accent);
    font-style: normal;
    /* 宋体本身没有倾斜，「强调」靠颜色与一点点错位 */
    position: relative;
}

.pagehead h1 {
    font-size: clamp(32px, 5vw, 68px);
}

.detail__head h1 { font-size: clamp(30px, 4.4vw, 58px); }

/* 大标题的字重不要过重，宋体加粗会糊 */
.detail__head h1 span { font-family: var(--font-serif); }

/* 正文与界面文字保持无衬线，避免整页都在「古风」里 */
.hero .lede,
.pagehead p { font-size: clamp(15px, 1.25vw, 17.5px); line-height: 1.85; }

/* ---------- 导航：更克制 ---------- */

.nav {
    background: rgba(6, 7, 10, 0.72);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.nav__links a {
    font-family: var(--font-sans);
    font-size: 13.5px;
    letter-spacing: 0.02em;
    color: rgba(238, 242, 246, 0.62);
}

.nav__links a:hover { color: var(--ink); }

.nav__links a[aria-current="page"] {
    color: var(--ink);
    border-bottom-color: var(--accent);
}

.brand { letter-spacing: 0.3em; }

/* ---------- 按钮：去掉等宽大写，回到产品感 ---------- */

.btn {
    font-family: var(--font-sans);
    font-size: 13.5px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: none;
    border-radius: 2px;
    padding: 12px 24px;
    transition: transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1), filter 0.25s ease;
}

.btn:hover { transform: translateY(-1px); }

.btn--ghost {
    border-color: rgba(255, 255, 255, 0.18);
    color: var(--ink);
}

.btn--ghost:hover {
    border-color: rgba(125, 232, 201, 0.55);
    color: var(--accent);
    background: rgba(125, 232, 201, 0.05);
}

/* ---------- 首屏构图：左文右图 ---------- */

.hero {
    position: relative;
    padding-block: clamp(44px, 6.5vw, 88px) clamp(48px, 7vw, 96px);
    overflow: hidden;
}

.hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
    gap: clamp(28px, 4.5vw, 72px);
    align-items: center;
}

.hero__copy { position: relative; z-index: 2; }

.hero__visual {
    position: relative;
    z-index: 1;
}

.hero__frame {
    display: block;
    position: relative;
    aspect-ratio: 16 / 10;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 3px;
    overflow: hidden;
    background: #05070A;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.05) inset,
        0 40px 90px -40px rgba(0, 0, 0, 0.95),
        0 0 80px -30px rgba(125, 232, 201, 0.18);
    animation: frame-in 1.1s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.hero__frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 50%;
    filter: saturate(1.04) contrast(1.02) brightness(0.98);
    transition: transform 1.2s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.hero__visual:hover .hero__frame img { transform: scale(1.03); }

.hero__frame::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(6, 7, 10, 0) 52%, rgba(6, 7, 10, 0.72));
    pointer-events: none;
}

.hero__caption {
    position: absolute;
    left: 16px;
    bottom: 14px;
    z-index: 2;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(238, 242, 246, 0.72);
    display: flex;
    align-items: center;
    gap: 8px;
}

.hero__caption::before {
    content: "";
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent);
}

.hero__glow {
    position: absolute;
    inset: -18% -14% -10% -14%;
    background: radial-gradient(closest-side, rgba(125, 232, 201, 0.22), transparent 72%);
    filter: blur(60px);
    z-index: -1;
    pointer-events: none;
}

@keyframes frame-in {
    from { opacity: 0; transform: translateY(18px) scale(0.985); }
    to { opacity: 1; transform: none; }
}

.hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 28px;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
}

.hero__meta div {
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-faint);
}

.hero__meta strong {
    display: block;
    margin-top: 4px;
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
    color: var(--ink);
}

/* ---------- 卡片：加内高光 / 深投影 / 渐隐 ---------- */

.projects { gap: clamp(28px, 4.5vw, 64px); }

.card {
    border-top: 0;
    padding-top: 0;
}

.card__cover {
    border-color: rgba(255, 255, 255, 0.09);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.04) inset,
        0 30px 60px -34px rgba(0, 0, 0, 0.9);
    transition: border-color 0.35s ease, box-shadow 0.35s ease, transform 0.35s ease;
}

.card__cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(6, 7, 10, 0) 58%, rgba(6, 7, 10, 0.45));
    opacity: 0.9;
    transition: opacity 0.35s ease;
    pointer-events: none;
}

.card:hover .card__cover {
    border-color: rgba(125, 232, 201, 0.32);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.06) inset,
        0 40px 80px -34px rgba(0, 0, 0, 1),
        0 0 60px -28px rgba(125, 232, 201, 0.5);
}

.card:hover .card__cover::after { opacity: 0.4; }

.card__cover img {
    filter: saturate(1.03) contrast(1.02);
    transition: transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.card:hover .card__cover img { transform: scale(1.035); }

.card__title { font-size: clamp(18px, 1.7vw, 22px); letter-spacing: -0.005em; }
.card__title span { font-size: 0.86em; }

.card__desc { font-size: 14px; line-height: 1.75; color: rgba(154, 164, 178, 0.92); }

.card__badge {
    color: rgba(238, 242, 246, 0.9);
    background: rgba(6, 7, 10, 0.62);
    border-color: rgba(255, 255, 255, 0.16);
    font-size: 9.5px;
    padding: 3px 9px;
    backdrop-filter: blur(10px);
}

.card__badge::before {
    content: "";
    display: inline-block;
    width: 4px;
    height: 4px;
    margin-right: 6px;
    border-radius: 50%;
    background: var(--accent);
    vertical-align: middle;
}

.card__year { font-size: 10.5px; color: var(--ink-faint); }

.techline { font-size: 10px; letter-spacing: 0.08em; color: rgba(102, 112, 125, 0.95); }

.card__go { font-family: var(--font-sans); font-size: 12.5px; letter-spacing: 0.01em; }

.card__go::after { transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1); }
.card:hover .card__go::after { transform: translate(3px, -3px); }

/* ---------- 章节标题：加编号与渐隐细线 ---------- */

body { counter-reset: sec; }

.section-head { counter-increment: sec; position: relative; padding-top: clamp(48px, 6vw, 84px); }

.section-head::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -14px;
    height: 1px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0));
}

.section-head h2 {
    font-size: clamp(20px, 2.2vw, 27px);
    font-weight: 600;
    letter-spacing: 0.005em;
    display: flex;
    align-items: baseline;
    gap: 14px;
}

.section-head h2::before {
    content: counter(sec, decimal-leading-zero);
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.16em;
    color: var(--accent);
    font-weight: 400;
}

/* 页头的小标签：降低存在感 */
.pagehead__eyebrow .mono,
.pagehead__eyebrow {
    letter-spacing: 0.22em;
    color: rgba(102, 112, 125, 0.95);
}

/* ---------- 滚动入场 ---------- */

.reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.8s cubic-bezier(0.2, 0.7, 0.2, 1),
                transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
    will-change: opacity, transform;
}

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

@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; }
    .hero__frame { animation: none; }
}

/* ---------- 细节 ---------- */

::selection { background: rgba(125, 232, 201, 0.9); color: #04120E; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #06070A; }
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.14);
    border-radius: 10px;
    border: 3px solid #06070A;
}
::-webkit-scrollbar-thumb:hover { background: rgba(125, 232, 201, 0.5); }

.footer {
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    background: linear-gradient(180deg, rgba(6, 7, 10, 0), rgba(10, 12, 17, 0.7));
}

/* ---------- 移动端 ---------- */

@media (max-width: 900px) {
    .hero__grid { grid-template-columns: minmax(0, 1fr); }
    .hero__visual { order: -1; margin-bottom: 8px; }
    .hero__frame { aspect-ratio: 16 / 10; }
    .hero__glow { inset: -10% -6% 30% -6%; }
}

/* ==========================================================================
   v2.1 · 节奏与标志性细节
   ========================================================================== */

/* 收紧纵向节奏：v2 的留白偏散 */
.hero { padding-block: clamp(40px, 5.5vw, 72px) clamp(32px, 4vw, 52px); }
.hero__meta { margin-top: 30px; padding-top: 16px; }

.section-head { padding-top: clamp(40px, 5vw, 64px); }
.projects { padding: clamp(26px, 3.4vw, 40px) 0 clamp(56px, 7vw, 88px); }
.projects--3 { padding-top: 22px; }

.caps {
    margin-top: clamp(20px, 3vw, 34px);
    padding: clamp(32px, 4vw, 48px) 0 clamp(40px, 5vw, 64px);
}

/* 取景框四角标记：给画面一个「被拍摄/被测量」的暗示 */
.hero__frame::before,
.detail__cover::before {
    content: "";
    position: absolute;
    inset: 12px;
    z-index: 2;
    pointer-events: none;
    opacity: 0.55;
    background:
        linear-gradient(var(--accent), var(--accent)) left top / 14px 1px no-repeat,
        linear-gradient(var(--accent), var(--accent)) left top / 1px 14px no-repeat,
        linear-gradient(var(--accent), var(--accent)) right top / 14px 1px no-repeat,
        linear-gradient(var(--accent), var(--accent)) right top / 1px 14px no-repeat,
        linear-gradient(var(--accent), var(--accent)) left bottom / 14px 1px no-repeat,
        linear-gradient(var(--accent), var(--accent)) left bottom / 1px 14px no-repeat,
        linear-gradient(var(--accent), var(--accent)) right bottom / 14px 1px no-repeat,
        linear-gradient(var(--accent), var(--accent)) right bottom / 1px 14px no-repeat;
}

.detail__cover { position: relative; }

/* 能力/联系三栏：加细线分隔，密度高一点 */
.caps > div + div { border-left: 1px solid var(--line); padding-left: clamp(16px, 3vw, 32px); }

.caps li {
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.caps li:last-child { border-bottom: 0; padding-bottom: 0; }

/* 卡片标题稍微收一点，避免挤成两行 */
.card__title { font-size: clamp(17px, 1.55vw, 20px); }
.card__head { margin: 14px 0 6px; }

/* 筛选条与页面头之间收紧 */
.filters { margin-top: 8px; }

@media (max-width: 900px) {
    .caps > div + div {
        border-left: 0;
        padding-left: 0;
        border-top: 1px solid var(--line);
        padding-top: 24px;
    }
}

/* v2.2 · 筛选条改用无衬线，和导航保持一致 */
.filters a {
    font-family: var(--font-sans);
    font-size: 13px;
    letter-spacing: 0.01em;
    text-transform: none;
    color: rgba(154, 164, 178, 0.9);
    padding: 8px 16px;
}

.filters a[aria-current="true"] { color: #04120E; }

.filters a span { font-family: var(--font-mono); font-size: 10px; }

.mono { letter-spacing: 0.12em; }

/* ==========================================================================
   设计系统 v3 · 星空
   深空底 + 星云 + three.js 星场（#sky）+ 冷色调
   ========================================================================== */

:root {
    --bg: #04050B;
    --bg-soft: #070810;
    --panel: #090B15;
    --ink: #EDF1F8;
    --ink-dim: #9AA3B8;
    --ink-faint: #636C82;
    --accent: #7DE8C9;
    --accent-2: #A9B6FF;
}

html { background: #04050B; }

/* 背景必须放到 #sky 上：body 一旦有不透明背景，
   z-index:-1 的星场就会被压在 body 背景之下，看不见 */
body {
    background: transparent;
}

/* 星场容器：固定在最底层，位于 body 背景之上、内容之下 */
#sky {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
    background:
        /* 暗角：把注意力收到中间，边缘自然压暗 */
        radial-gradient(130% 95% at 50% 42%, rgba(4, 5, 11, 0) 52%, rgba(3, 4, 9, 0.55) 100%),
        radial-gradient(1400px 900px at 78% 118%, rgba(96, 74, 176, 0.16), transparent 68%),
        radial-gradient(1000px 700px at 88% -14%, rgba(92, 132, 255, 0.16), transparent 64%),
        radial-gradient(900px 700px at 8% 8%, rgba(125, 232, 201, 0.07), transparent 66%),
        linear-gradient(180deg, #060814 0%, #04050B 52%, #05060F 100%);
}

#sky canvas { display: block; }

/* 星云：90 秒极缓慢漂移，几乎察觉不到，但画面不会「死」 */
#sky::before {
    content: "";
    position: absolute;
    inset: -25%;
    background:
        radial-gradient(36% 40% at 74% 12%, rgba(120, 150, 255, 0.20), transparent 70%),
        radial-gradient(30% 34% at 18% 54%, rgba(125, 232, 201, 0.10), transparent 70%),
        radial-gradient(42% 38% at 58% 86%, rgba(150, 122, 255, 0.16), transparent 72%),
        radial-gradient(24% 26% at 40% 26%, rgba(200, 210, 255, 0.07), transparent 72%);
    filter: blur(32px);
    animation: nebula-drift 90s ease-in-out infinite alternate;
}

@keyframes nebula-drift {
    from { transform: translate3d(-1.4%, -1%, 0) scale(1); }
    to   { transform: translate3d(1.4%, 1.4%, 0) scale(1.06); }
}

/* 银河带：一条斜向的淡光，给天空一点结构 */
#sky::after {
    content: "";
    position: absolute;
    left: -20%;
    top: 26%;
    width: 140%;
    height: 40%;
    transform: rotate(-13deg);
    background: linear-gradient(
        180deg,
        transparent 0%,
        rgba(150, 170, 255, 0.07) 36%,
        rgba(214, 222, 255, 0.13) 50%,
        rgba(150, 170, 255, 0.07) 64%,
        transparent 100%
    );
    filter: blur(26px);
    opacity: 0.8;
}

/* 玻璃面板：星空背景下需要一点「浮起来」的感觉 */
.nav {
    background: rgba(4, 5, 11, 0.62);
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset;
}

.card__cover {
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.05) inset,
        0 36px 70px -34px rgba(0, 0, 0, 0.95),
        0 0 90px -40px rgba(122, 140, 255, 0.5);
}

.card:hover .card__cover {
    border-color: rgba(125, 232, 201, 0.34);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.07) inset,
        0 44px 90px -34px rgba(0, 0, 0, 1),
        0 0 80px -26px rgba(125, 232, 201, 0.55);
}

/* 首屏画面：青紫双色光晕，比单色更「夜空」 */
.hero__glow {
    background:
        radial-gradient(closest-side, rgba(125, 232, 201, 0.20), transparent 70%),
        radial-gradient(closest-side at 70% 30%, rgba(150, 120, 255, 0.26), transparent 72%);
    filter: blur(64px);
}

.hero__frame {
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.06) inset,
        0 44px 100px -44px rgba(0, 0, 0, 1),
        0 0 110px -40px rgba(120, 140, 255, 0.45);
}

/* 正文区域：文字压在星场上时，加一层极淡的暗底，保证可读性 */
.pagehead p,
.detail__head .lede,
.prose p {
    text-shadow: 0 1px 18px rgba(4, 5, 11, 0.85);
}

.section-head::after {
    background: linear-gradient(90deg, rgba(169, 182, 255, 0.28), rgba(255, 255, 255, 0));
}

.footer {
    background: linear-gradient(180deg, rgba(4, 5, 11, 0), rgba(6, 7, 15, 0.85));
}

/* 移动端：星点变少（JS 已按宽度降数量），星云减弱避免糊 */
@media (max-width: 760px) {
    #sky::before { opacity: 0.7; }
    #sky::after { opacity: 0.45; }
}

/* ==========================================================================
   v4 · 星空大屏首页
   ========================================================================== */

.masthead {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    place-items: center;
    padding: 128px clamp(20px, 4vw, 48px) 120px;
    overflow: hidden;
    isolation: isolate;
}

/* 取景框：四条边各留两个角，落在导航之下、底部信息之上 */
.masthead::before {
    content: "";
    position: absolute;
    inset: 92px clamp(18px, 2.6vw, 38px) 96px;
    pointer-events: none;
    opacity: 0.42;
    background:
        linear-gradient(var(--accent), var(--accent)) left top / 16px 1px no-repeat,
        linear-gradient(var(--accent), var(--accent)) left top / 1px 16px no-repeat,
        linear-gradient(var(--accent), var(--accent)) right top / 16px 1px no-repeat,
        linear-gradient(var(--accent), var(--accent)) right top / 1px 16px no-repeat,
        linear-gradient(var(--accent), var(--accent)) left bottom / 16px 1px no-repeat,
        linear-gradient(var(--accent), var(--accent)) left bottom / 1px 16px no-repeat,
        linear-gradient(var(--accent), var(--accent)) right bottom / 16px 1px no-repeat,
        linear-gradient(var(--accent), var(--accent)) right bottom / 1px 16px no-repeat;
}

/* 名字背后的光晕，缓慢呼吸 */
.masthead__aura {
    position: absolute;
    left: 50%;
    top: 50%;
    width: min(1240px, 128vw);
    aspect-ratio: 1.75;
    transform: translate(-50%, -54%);
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(closest-side, rgba(125, 232, 201, 0.15), transparent 68%),
        radial-gradient(closest-side at 66% 36%, rgba(140, 120, 255, 0.22), transparent 70%),
        radial-gradient(closest-side at 44% 70%, rgba(110, 160, 255, 0.14), transparent 72%);
    filter: blur(72px);
    animation: aura-breathe 14s ease-in-out infinite alternate;
}

@keyframes aura-breathe {
    from { opacity: 0.75; transform: translate(-50%, -54%) scale(0.98); }
    to   { opacity: 1;    transform: translate(-50%, -54%) scale(1.05); }
}

.masthead__inner {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 920px;
}

.masthead__eyebrow {
    margin: 0 0 clamp(18px, 2.6vw, 30px);
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: 0.52em;
    padding-left: 0.52em;
    text-transform: uppercase;
    color: rgba(125, 232, 201, 0.8);
}

.masthead__name {
    margin: 0;
    font-family: var(--font-serif);
    font-weight: 600;
    font-size: clamp(84px, 17vw, 208px);
    line-height: 0.94;
    letter-spacing: 0.06em;
    padding-left: 0.06em;
    background: linear-gradient(105deg, #ffffff 18%, #dceaff 34%, #93b9ff 52%, #eaf3ff 70%, #ffffff 88%);
    background-size: 220% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    transform-style: preserve-3d;
    will-change: transform;
    /* 入场交给粒子脚本控制（会把 opacity 从 0 淡到 1） */
    animation: name-shine 18s ease-in-out 1.6s infinite;
}

/* 极慢的流光，让字有「月光」在表面移动的感觉 */
@keyframes name-shine {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.masthead__latin {
    margin: clamp(8px, 1.2vw, 14px) 0 0;
    font-family: var(--font-mono);
    font-size: clamp(11px, 1.1vw, 13px);
    letter-spacing: 0.72em;
    padding-left: 0.72em;
    text-transform: uppercase;
    color: rgba(238, 242, 246, 0.5);
}

.masthead__role {
    margin: clamp(22px, 3vw, 34px) 0 0;
    font-size: clamp(14px, 1.15vw, 15.5px);
    letter-spacing: 0.04em;
    color: rgba(238, 242, 246, 0.82);
}

.masthead__tag {
    margin: 12px auto 0;
    max-width: 46ch;
    font-size: 14.5px;
    line-height: 1.9;
    color: rgba(154, 163, 184, 0.92);
}

.masthead__links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: clamp(18px, 3vw, 46px);
    margin-top: clamp(32px, 4.6vw, 54px);
}

.masthead__links a {
    display: inline-flex;
    align-items: baseline;
    gap: 9px;
    font-size: 14px;
    color: rgba(238, 242, 246, 0.82);
    padding-bottom: 6px;
    border-bottom: 1px solid transparent;
    transition: color 0.25s ease, border-color 0.25s ease;
}

.masthead__links a span {
    font-family: var(--font-mono);
    font-size: 9.5px;
    letter-spacing: 0.1em;
    color: var(--accent);
}

.masthead__links a i {
    font-style: normal;
    font-size: 11px;
    color: var(--ink-faint);
    transition: transform 0.25s ease, color 0.25s ease;
}

.masthead__links a:hover { color: #fff; border-bottom-color: rgba(125, 232, 201, 0.55); }
.masthead__links a:hover i { transform: translate(2px, -2px); color: var(--accent); }

/* 底栏：时钟 / 滚动提示 / 位置 */
.masthead__foot {
    position: absolute;
    left: 0;
    right: 0;
    bottom: clamp(18px, 2.6vw, 30px);
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: end;
    padding-inline: clamp(24px, 4vw, 54px);
}

.masthead__clock,
.masthead__loc {
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: 0.18em;
    color: rgba(238, 242, 246, 0.55);
}

.masthead__loc { text-align: right; }

.masthead__scroll {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.masthead__scroll span {
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: 0.34em;
    padding-left: 0.34em;
    color: rgba(238, 242, 246, 0.55);
}

.masthead__scroll i {
    position: relative;
    display: block;
    width: 1px;
    height: 54px;
    overflow: hidden;
    background: rgba(238, 242, 246, 0.14);
}

.masthead__scroll i::after {
    content: "";
    position: absolute;
    left: 0;
    top: -54px;
    width: 1px;
    height: 54px;
    background: linear-gradient(180deg, transparent, var(--accent));
    animation: cue 2.8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes cue {
    0% { top: -54px; }
    62%, 100% { top: 54px; }
}

/* 入场：除名字外整体上浮 */
.masthead__eyebrow,
.masthead__latin,
.masthead__role,
.masthead__tag,
.masthead__links {
    animation: rise-in 1.2s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.masthead__eyebrow { animation-delay: 0.06s; }
.masthead__latin { animation-delay: 0.42s; }
.masthead__role { animation-delay: 0.54s; }
.masthead__tag { animation-delay: 0.64s; }
.masthead__links { animation-delay: 0.76s; }

@keyframes rise-in {
    from { opacity: 0; transform: translateY(20px); filter: blur(6px); }
    to   { opacity: 1; transform: none; filter: blur(0); }
}

/* 首页导航：顶层透明，滚动后浮出 */
/* 首页导航浮在大屏之上，不占布局高度。
   即使 JS 没跑（滚动状态没加上），顶部也有一层渐隐的暗色，
   保证导航文字不会直接压在图片上。 */
body.is-home .nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(
        180deg,
        rgba(4, 5, 11, 0.88) 0%,
        rgba(4, 5, 11, 0.55) 62%,
        rgba(4, 5, 11, 0) 100%
    );
    border-bottom-color: transparent;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    transition: background 0.45s ease, border-color 0.45s ease, box-shadow 0.45s ease;
}

body.is-home .nav.is-scrolled {
    background: rgba(4, 5, 11, 0.72);
    border-bottom-color: rgba(255, 255, 255, 0.07);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

/* 首页下方的内容从大屏下方开始 */
.is-home #works { padding-top: clamp(40px, 6vw, 80px); }

@media (max-width: 760px) {
    .masthead { padding: 104px 20px 104px; }
    .masthead__name { font-size: clamp(76px, 26vw, 140px); }
    .masthead__latin { letter-spacing: 0.5em; padding-left: 0.5em; }
    .masthead__tag .br-pc { display: none; }
    .masthead__tag { max-width: 32ch; }
    .masthead__foot { grid-template-columns: 1fr 1fr; }
    .masthead__scroll { display: none; }
    .masthead__loc { text-align: right; }
}

@media (prefers-reduced-motion: reduce) {
    .masthead__name,
    .masthead__eyebrow,
    .masthead__latin,
    .masthead__role,
    .masthead__tag,
    .masthead__links { animation: none; }
    .masthead__aura { animation: none; }
}

/* 导航哨兵：放在页面最顶端，用来判断是否已滚动 */
#nav-sentinel {
    position: absolute;
    top: 0;
    left: 0;
    width: 1px;
    height: 1px;
    pointer-events: none;
    opacity: 0;
}

/* ==========================================================================
   文件中心
   ========================================================================== */

.filelist { margin-top: 26px; border-bottom: 1px solid var(--line); }

.file {
    display: grid;
    grid-template-columns: 66px minmax(0, 1fr) 90px;
    gap: 18px;
    align-items: center;
    padding: 14px 8px;
    margin-inline: -8px;
    border-top: 1px solid var(--line);
    transition: background 0.2s ease;
}

.file:hover { background: rgba(255, 255, 255, 0.022); }

.file__cat {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.12em;
    color: var(--ink-faint);
    border: 1px solid var(--line);
    border-radius: 2px;
    padding: 3px 0;
    text-align: center;
}

.file__name {
    font-size: 15px;
    font-weight: 500;
    color: var(--ink);
    overflow-wrap: anywhere;
}

.file__meta {
    margin-top: 4px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.04em;
    color: var(--ink-faint);
}

.file__get {
    font-size: 13px;
    color: var(--accent);
    text-align: right;
    white-space: nowrap;
}

.file:hover .file__get { text-decoration: underline; }

@media (max-width: 760px) {
    .file { grid-template-columns: 58px minmax(0, 1fr); gap: 12px; }
    .file__get { grid-column: 2; text-align: left; }
}

/* ==========================================================================
   笔记
   ========================================================================== */

.notelist { margin-top: 30px; border-top: 1px solid var(--line); }

.notecard {
    display: block;
    padding: clamp(20px, 2.6vw, 30px) 8px;
    margin-inline: -8px;
    border-bottom: 1px solid var(--line);
    transition: background 0.2s ease;
}

.notecard:hover { background: rgba(255, 255, 255, 0.022); }

.notecard__meta {
    font-size: 10.5px;
    letter-spacing: 0.14em;
    color: var(--ink-faint);
    display: flex;
    gap: 8px;
    align-items: center;
}

.notecard__title {
    margin: 8px 0 8px;
    font-size: clamp(19px, 2.2vw, 26px);
    font-weight: 600;
    letter-spacing: -0.01em;
    transition: color 0.2s ease;
}

.notecard:hover .notecard__title { color: var(--accent); }

.notecard__desc {
    margin: 0;
    max-width: 74ch;
    color: var(--ink-dim);
    font-size: 14.5px;
    line-height: 1.8;
}

.notecard__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.notecard__tags span {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.1em;
    color: var(--ink-faint);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 2px 10px;
}

/* ---------- 文章页 ---------- */

.readbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    z-index: 60;
    background: transparent;
}

.readbar i {
    display: block;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    box-shadow: 0 0 12px rgba(125, 232, 201, 0.55);
}

.note-head {
    padding: clamp(20px, 3vw, 34px) 0 clamp(22px, 3vw, 34px);
    border-bottom: 1px solid var(--line);
    max-width: 76ch;
}

.note-head h1 {
    margin: 12px 0 14px;
    font-family: var(--font-serif);
    font-size: clamp(28px, 4.2vw, 50px);
    line-height: 1.2;
    letter-spacing: 0.005em;
    text-wrap: balance;
}

.note-head .lede {
    margin: 0;
    color: var(--ink-dim);
    font-size: clamp(14.5px, 1.2vw, 16.5px);
    line-height: 1.85;
}

.note-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.note-tags a {
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: 0.1em;
    color: var(--ink-faint);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 3px 11px;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.note-tags a:hover { color: var(--accent); border-color: rgba(125, 232, 201, 0.4); }

.note-body {
    max-width: 76ch;
    padding: clamp(28px, 4vw, 44px) 0 clamp(48px, 7vw, 80px);
    font-size: 16px;
    line-height: 1.95;
    color: #C9D2E0;
}

.note-body > *:first-child { margin-top: 0; }

.note-body h1,
.note-body h2,
.note-body h3,
.note-body h4 {
    color: var(--ink);
    line-height: 1.4;
    letter-spacing: -0.005em;
    scroll-margin-top: 90px;
}

.note-body h1 { font-size: 28px; margin: 2em 0 0.7em; }
.note-body h2 {
    font-size: 22px;
    margin: 2.2em 0 0.8em;
    padding-top: 0.2em;
    border-top: 1px solid var(--line);
    padding-top: 1.2em;
}
.note-body h3 { font-size: 17.5px; margin: 1.8em 0 0.6em; }
.note-body h4 { font-size: 15.5px; margin: 1.6em 0 0.5em; color: var(--ink-dim); }

.note-body p { margin: 0 0 1.15em; }

.note-body strong { color: var(--ink); font-weight: 600; }

.note-body a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: rgba(125, 232, 201, 0.4);
}

.note-body a:hover { text-decoration-color: var(--accent); }

.note-body ul,
.note-body ol {
    margin: 0 0 1.2em;
    padding-left: 1.4em;
}

.note-body li { margin-bottom: 0.45em; }

.note-body blockquote {
    margin: 1.4em 0;
    padding: 2px 0 2px 18px;
    border-left: 2px solid rgba(125, 232, 201, 0.4);
    color: var(--ink-dim);
    font-style: normal;
}

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

.note-body code {
    font-family: var(--font-mono);
    font-size: 0.88em;
    background: rgba(255, 255, 255, 0.06);
    padding: 1px 5px;
    border-radius: 2px;
    color: #A9E8D8;
}

.note-body pre {
    position: relative;
    margin: 1.4em 0;
    padding: 16px 18px;
    background: #03050A;
    border: 1px solid var(--line);
    border-radius: 3px;
    overflow-x: auto;
    font-size: 13px;
    line-height: 1.7;
}

.note-body pre code {
    background: none;
    padding: 0;
    color: inherit;
    font-size: inherit;
}

.note-body pre .code-copy {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(10, 13, 18, 0.9);
    border: 1px solid var(--line-strong);
    color: var(--ink-dim);
    font-family: var(--font-mono);
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 2px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.note-body pre:hover .code-copy { opacity: 1; }

.note-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.4em 0;
    font-size: 14px;
}

.note-body th,
.note-body td {
    border: 1px solid var(--line);
    padding: 8px 12px;
    text-align: left;
}

.note-body th {
    background: rgba(255, 255, 255, 0.04);
    color: var(--ink);
    font-weight: 600;
}

.note-body img {
    max-width: 100%;
    border: 1px solid var(--line);
    border-radius: 3px;
    margin: 1.4em 0;
}

.note-body hr {
    border: 0;
    height: 1px;
    background: var(--line);
    margin: 2.4em 0;
}

@media (max-width: 760px) {
    .note-body { font-size: 15.5px; line-height: 1.9; }
    .note-body h2 { font-size: 19.5px; }
}

/* 移动端减少合成层：颗粒噪点关掉，星云保留 */
@media (max-width: 760px) {
    body::after { display: none; }
}

/* 投稿表单 */
.submitform { display: grid; gap: 14px; margin-top: 26px; max-width: 820px; }
.submitform__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.submitform label { display: grid; gap: 7px; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .12em; color: var(--ink-faint); text-transform: uppercase; }
.submitform input[type=text], .submitform input[type=url], .submitform input[type=email],
.submitform select, .submitform textarea {
    background: var(--bg-soft); border: 1px solid var(--line); color: var(--ink);
    padding: 11px 13px; border-radius: 2px; font-family: inherit; font-size: 14px;
    letter-spacing: 0; text-transform: none;
}
.submitform textarea { resize: vertical; line-height: 1.7; }
.submitform input:focus, .submitform select:focus, .submitform textarea:focus {
    outline: none; border-color: rgba(125, 232, 201, 0.5);
}
.submitform .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.submitform__foot { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 4px; }
@media (max-width: 760px) { .submitform__row { grid-template-columns: minmax(0, 1fr); } }

/* ==========================================================================
   联系弹窗
   ========================================================================== */

.contact-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
}

.contact-head h2 {
    margin: 0;
    font-family: var(--font-serif);
    font-size: 22px;
    letter-spacing: 0.01em;
}

.contact-close {
    background: none;
    border: 0;
    color: var(--ink-faint);
    font-size: 15px;
    cursor: pointer;
    padding: 4px 6px;
}

.contact-close:hover { color: var(--ink); }

.contact-hint {
    margin: 0 0 18px;
    color: var(--ink-faint);
    font-size: 12.5px;
}

.contact-list { display: grid; gap: 8px; }

.contact-row {
    display: grid;
    grid-template-columns: 62px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.02);
}

.contact-row__label {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-faint);
}

.contact-row__value {
    font-family: var(--font-mono);
    font-size: 13.5px;
    color: var(--ink);
    overflow-wrap: anywhere;
}

.contact-row__act { display: flex; gap: 6px; }

.contact-row__act button,
.contact-row__act a {
    background: none;
    border: 1px solid var(--line-strong);
    color: var(--ink-dim);
    border-radius: 2px;
    padding: 3px 9px;
    font-size: 11px;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
}

.contact-row__act button:hover,
.contact-row__act a:hover {
    color: var(--accent);
    border-color: rgba(125, 232, 201, 0.45);
}

.footer__btn {
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    letter-spacing: inherit;
    color: inherit;
    cursor: pointer;
}

.footer__btn:hover { color: var(--ink); }

.footer__admin { opacity: 0.6; }
.footer__admin:hover { opacity: 1; color: var(--accent); }

/* ==========================================================================
   搜索
   ========================================================================== */

.searchbar {
    display: flex;
    gap: 10px;
    margin-top: 26px;
}

.searchbar input {
    flex: 1;
    min-width: 0;
    background: var(--bg-soft);
    border: 1px solid var(--line);
    color: var(--ink);
    padding: 14px 16px;
    border-radius: 2px;
    font-family: inherit;
    font-size: 15px;
}

.searchbar input:focus {
    outline: none;
    border-color: rgba(125, 232, 201, 0.5);
}

.results { margin-top: 14px; border-top: 1px solid var(--line); }

.result {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 14px 8px;
    margin-inline: -8px;
    border-bottom: 1px solid var(--line);
    transition: background 0.2s ease;
}

.result:hover { background: rgba(255, 255, 255, 0.022); }

.result__title {
    font-size: 15.5px;
    font-weight: 500;
    color: var(--ink);
    transition: color 0.2s ease;
}

.result:hover .result__title { color: var(--accent); }

.result__desc {
    margin-top: 4px;
    font-size: 13.5px;
    line-height: 1.7;
    color: var(--ink-dim);
}

.result__meta {
    font-size: 10.5px;
    color: var(--ink-faint);
    white-space: nowrap;
}

mark {
    background: rgba(125, 232, 201, 0.22);
    color: var(--accent);
    padding: 0 2px;
    border-radius: 2px;
}

@media (max-width: 760px) {
    .result { grid-template-columns: minmax(0, 1fr); gap: 6px; }
    .result__meta { font-size: 10px; }
    .searchbar input { padding: 12px 14px; font-size: 14px; }
}

/* ==========================================================================
   自定义下拉
   ========================================================================== */

.sel { position: relative; }

/* 原生 select 保留在 DOM 里（表单提交用），视觉上隐藏 */
.sel-native {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    pointer-events: none;
    left: 0;
    bottom: 0;
}

/* 下拉常被放在 <label> 里，避免继承标签的大写/等宽/字距 */
.sel,
.sel__btn,
.sel__list,
.sel__opt,
.sel__label {
    text-transform: none;
    letter-spacing: 0;
    font-family: var(--font-sans);
}

.sel__btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    background: var(--bg-soft);
    border: 1px solid var(--line);
    color: var(--ink);
    padding: 11px 13px;
    border-radius: 2px;
    font-family: var(--font-sans);
    font-size: 14px;
    letter-spacing: 0;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.sel__btn:hover { border-color: var(--line-strong); }

.sel.is-open .sel__btn {
    border-color: rgba(125, 232, 201, 0.55);
    background: rgba(125, 232, 201, 0.045);
    box-shadow: 0 0 0 3px rgba(125, 232, 201, 0.08);
}

.sel__label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sel__label.is-placeholder { color: var(--ink-faint); }

.sel__arrow {
    flex: none;
    font-size: 13px;
    line-height: 1;
    color: var(--ink-faint);
    transition: transform 0.28s cubic-bezier(0.2, 0.7, 0.2, 1), color 0.2s ease;
}

.sel.is-open .sel__arrow { transform: rotate(180deg); color: var(--accent); }

.sel__list {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    z-index: 60;
    padding: 5px;
    background: #0A0D15;
    border: 1px solid var(--line-strong);
    border-radius: 3px;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.05) inset,
        0 24px 60px -24px rgba(0, 0, 0, 0.95);
    max-height: 268px;
    overflow-y: auto;
    overflow-x: hidden;
    opacity: 0;
    transform: translateY(-6px) scale(0.985);
    transform-origin: top center;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.2s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.sel.is-open .sel__list {
    opacity: 1;
    transform: none;
    pointer-events: auto;
}

.sel__opt {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 2px;
    font-size: 13.5px;
    color: var(--ink-dim);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.sel__opt + .sel__opt { margin-top: 1px; }

.sel__opt:hover,
.sel__opt.is-active { background: rgba(255, 255, 255, 0.055); color: var(--ink); }

.sel__opt.is-selected { color: var(--accent); }

.sel__tick {
    font-size: 11px;
    opacity: 0;
    transform: translateX(-3px);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.sel__opt.is-selected .sel__tick { opacity: 1; transform: none; }

/* 管理后台筛选条里的紧凑版 */
.filterbar .sel { min-width: 128px; }
.filterbar .sel__btn { padding: 6px 11px; font-size: 12.5px; }
.filterbar .sel__list { min-width: 150px; right: auto; }

@media (prefers-reduced-motion: reduce) {
    .sel__list, .sel__opt, .sel__arrow, .sel__btn { transition: none; }
}
