/* ============================================================
   前台样式 · 亮色个人主页
   基调：浅冷灰白底（带纸质肌理）+ 蓝色强调 + 圆润卡片 + 柔和阴影
   动画手法借自参考站：滚动进度条、逐行浮现、封面 clip-path 擦除、
   指针视差、滚动跑马灯、动效开关
   ============================================================ */

/* 自托管的拉丁字体（只作用于英文/数字，中文自动回退到系统字体） */
@font-face {
    font-family: "Plus Jakarta Sans";
    src: url("../../media/fonts/plus-jakarta-sans-latin.woff2") format("woff2");
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
        U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* 圆润一点的字体，用在标题、数字和英文上 */
@font-face {
    font-family: "Quicksand";
    src: url("../../media/fonts/quicksand-latin.woff2") format("woff2");
    font-style: normal;
    font-weight: 500 700;
    font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
        U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    --canvas: #f4f7fc;
    --surface: #ffffff;
    --surface-2: #eef2f9;
    --surface-3: #e4eaf4;

    --ink: #121a2b;
    --ink-2: #4a5568;
    --ink-3: #8a93a5;

    --line: rgba(18, 26, 43, .09);
    --line-strong: rgba(18, 26, 43, .16);

    --accent: #2f6bff;
    --accent-strong: #1f4fd8;
    --accent-soft: #eaf0ff;
    --accent-on: #ffffff;

    --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
    --shadow-md: 0 6px 18px -6px rgba(16, 24, 40, .12), 0 2px 6px -3px rgba(16, 24, 40, .06);
    --shadow-lg: 0 28px 56px -26px rgba(47, 107, 255, .45), 0 8px 20px -12px rgba(16, 24, 40, .18);

    --r-lg: 24px;
    --r-md: 16px;
    --r-sm: 10px;

    --ease-out: cubic-bezier(.22, .8, .28, 1);
    --ease-spring: cubic-bezier(.34, 1.3, .5, 1);
    --ease-structure: cubic-bezier(.72, 0, .18, 1);

    --header-h: 68px;
    --pad: clamp(20px, 5vw, 72px);

    --font-display: "Quicksand", "Plus Jakarta Sans", "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", system-ui, sans-serif;
    --font-sans: "Plus Jakarta Sans", "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", Consolas, monospace;

    /* 自定义指针（内联 SVG，不依赖外部文件） */
    --cursor-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='26'%3E%3Cpath d='M5 2.6 5 19.4 9.4 14.9 12.3 21.3 15.4 19.8 12.5 13.6 18.8 13.6 Z' fill='%232f6bff' stroke='%23ffffff' stroke-width='2.1' stroke-linejoin='round'/%3E%3C/svg%3E");
    --cursor-heart: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28'%3E%3Cpath d='M14 23.6C14 23.6 3.4 17 3.4 10.4 3.4 6.7 6.2 4.2 9.1 4.2 11.5 4.2 13.2 5.7 14 7.1 14.8 5.7 16.5 4.2 18.9 4.2 21.8 4.2 24.6 6.7 24.6 10.4 24.6 17 14 23.6 14 23.6Z' fill='%23ff7aa8' stroke='%23ffffff' stroke-width='2' stroke-linejoin='round'/%3E%3C/svg%3E");
    --cursor-sakura: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30'%3E%3Cg fill='%23ffb8d2' stroke='%23ffffff' stroke-width='1.7'%3E%3Cellipse cx='15' cy='7.2' rx='3.7' ry='6.2'/%3E%3Cellipse cx='15' cy='7.2' rx='3.7' ry='6.2' transform='rotate(72 15 15)'/%3E%3Cellipse cx='15' cy='7.2' rx='3.7' ry='6.2' transform='rotate(144 15 15)'/%3E%3Cellipse cx='15' cy='7.2' rx='3.7' ry='6.2' transform='rotate(216 15 15)'/%3E%3Cellipse cx='15' cy='7.2' rx='3.7' ry='6.2' transform='rotate(288 15 15)'/%3E%3C/g%3E%3Ccircle cx='15' cy='15' r='2.5' fill='%23ff7aa8' stroke='%23ffffff' stroke-width='1.2'/%3E%3C/svg%3E");
}

/* 可切换的蓝色系强调（顶部色块） */
:root[data-accent="indigo"] {
    --accent: #5a4bff;
    --accent-strong: #3d2ee0;
    --accent-soft: #eeecff;
    --shadow-lg: 0 28px 56px -26px rgba(90, 75, 255, .45), 0 8px 20px -12px rgba(16, 24, 40, .18);
}

:root[data-accent="teal"] {
    --accent: #0ea5a5;
    --accent-strong: #0b8181;
    --accent-soft: #e4f7f7;
    --shadow-lg: 0 28px 56px -26px rgba(14, 165, 165, .42), 0 8px 20px -12px rgba(16, 24, 40, .18);
}

:root[data-accent="sakura"] {
    --accent: #ff7aa8;
    --accent-strong: #f4568e;
    --accent-soft: #ffedf3;
    --shadow-lg: 0 28px 56px -26px rgba(255, 122, 168, .45), 0 8px 20px -12px rgba(16, 24, 40, .18);
    --cursor-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='26'%3E%3Cpath d='M5 2.6 5 19.4 9.4 14.9 12.3 21.3 15.4 19.8 12.5 13.6 18.8 13.6 Z' fill='%23ff7aa8' stroke='%23ffffff' stroke-width='2.1' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* 动效开关 */
:root[data-motion="reduced"] *,
:root[data-motion="reduced"] *::before,
:root[data-motion="reduced"] *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    min-height: 100vh;
    background: var(--canvas);
    color: var(--ink);
    font-family: var(--font-sans);
    font-size: 15.5px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

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

/* 自定义指针：默认一支圆角箭头，可点的地方是小心心，项目相关的地方是樱花 */
body { cursor: var(--cursor-arrow), auto; }

a,
button,
.swatch,
.motion-toggle,
.nav a,
.link-chip,
.member,
.log__link,
.mini-projects a,
.quote__btn { cursor: var(--cursor-heart), pointer; }

.pcard,
.feature,
.spotlight,
.member__thumbs,
.detail__media,
.detail__media img,
.pcard__media,
.feature__media { cursor: var(--cursor-sakura), pointer; }

/* ---------------- 背景装饰 ----------------
   四块柔光色团缓慢漂移（用 transform 动画，交给合成层处理，开销很小），
   再叠一层点阵 + 纸质肌理，最后盖一层柔白"纱"保证文字始终清晰。 */
.bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

/* 二次元底图 */
.bg__photo {
    position: absolute;
    inset: 0;
    background-image: url("../../media/img/bg-anime.jpg");
    background-size: cover;
    background-position: center 38%;
    filter: saturate(106%);
}

.bg__wash {
    position: absolute;
    inset: -22%;
    opacity: .45;
    background:
        radial-gradient(46% 40% at 17% 13%, color-mix(in srgb, var(--accent) 30%, transparent), transparent 62%),
        radial-gradient(42% 38% at 85% 7%, rgba(122, 88, 255, .24), transparent 64%),
        radial-gradient(40% 36% at 79% 85%, rgba(14, 165, 165, .22), transparent 62%),
        radial-gradient(38% 34% at 13% 81%, rgba(255, 168, 76, .26), transparent 64%);
    animation: mesh-drift 44s ease-in-out infinite alternate;
    will-change: transform;
}

@keyframes mesh-drift {
    from { transform: translate3d(-2%, -1.5%, 0) scale(1.02); }
    to   { transform: translate3d(2.5%, 2%, 0) scale(1.12); }
}

/* 柔白纱：压住底图与色团，保证正文对比度 */
.bg::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        radial-gradient(80% 60% at 50% 32%, rgba(250, 252, 255, .72), rgba(250, 252, 255, .10) 74%),
        linear-gradient(180deg, rgba(250, 252, 255, .52) 0%, rgba(250, 252, 255, 0) 34%);
}

/* 细点阵 */
.bg__dots {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(var(--line-strong) 1px, transparent 1px);
    background-size: 26px 26px;
    -webkit-mask-image: radial-gradient(120% 78% at 50% 0%, #000 0%, transparent 68%);
    mask-image: radial-gradient(120% 78% at 50% 0%, #000 0%, transparent 68%);
    opacity: .42;
}

/* 纸质肌理 */
.bg__grain {
    position: absolute;
    inset: 0;
    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='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
    opacity: .16;
    mix-blend-mode: multiply;
}

/* 飘落的花瓣 */
.petals {
    position: absolute;
    inset: 0;
    z-index: 2;
    overflow: hidden;
}

.petals i {
    position: absolute;
    top: -10vh;
    left: var(--x, 20%);
    width: var(--s, 10px);
    height: var(--s, 10px);
    border-radius: 62% 12% 62% 12%;
    background: radial-gradient(circle at 32% 30%, #ffe4ef, #ff9ec4 72%);
    opacity: .7;
    animation: petal-fall var(--t, 16s) linear var(--delay, 0s) infinite;
}

.petals i:nth-child(1) { --x: 5%;  --s: 9px;  --t: 17s; --delay: -2s; }
.petals i:nth-child(2) { --x: 17%; --s: 12px; --t: 21s; --delay: -9s; }
.petals i:nth-child(3) { --x: 29%; --s: 8px;  --t: 15s; --delay: -5s; }
.petals i:nth-child(4) { --x: 41%; --s: 11px; --t: 24s; --delay: -14s; }
.petals i:nth-child(5) { --x: 54%; --s: 9px;  --t: 18s; --delay: -7s; }
.petals i:nth-child(6) { --x: 66%; --s: 13px; --t: 22s; --delay: -12s; }
.petals i:nth-child(7) { --x: 77%; --s: 8px;  --t: 16s; --delay: -3s; }
.petals i:nth-child(8) { --x: 88%; --s: 10px; --t: 20s; --delay: -17s; }
.petals i:nth-child(9) { --x: 95%; --s: 11px; --t: 26s; --delay: -10s; }

@keyframes petal-fall {
    0%   { transform: translate3d(0, -8vh, 0) rotate(0deg); opacity: 0; }
    8%   { opacity: .75; }
    50%  { transform: translate3d(4vw, 52vh, 0) rotate(170deg); }
    100% { transform: translate3d(-3vw, 112vh, 0) rotate(340deg); opacity: 0; }
}

/* 跟着指针走的柔光 */
.bg__spot {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity .5s ease;
    background: radial-gradient(380px 380px at var(--sx, 50%) var(--sy, 30%), color-mix(in srgb, var(--accent) 12%, transparent), transparent 70%);
}

body.has-pointer .bg__spot { opacity: 1; }

/* ---------------- 滚动进度条 ---------------- */
.progress {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 60;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), #7aa8ff 60%, #ffb04c);
    transform: scaleX(0);
    transform-origin: 0 50%;
    border-radius: 0 3px 3px 0;
}

@supports (animation-timeline: scroll()) {
    .progress {
        animation: progress-grow linear both;
        animation-timeline: scroll(root);
    }
    @keyframes progress-grow {
        from { transform: scaleX(0); }
        to   { transform: scaleX(1); }
    }
}

/* ---------------- 顶栏 ---------------- */
.topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    height: var(--header-h);
    border-bottom: 1px solid transparent;
    transition: border-color .3s ease, background .3s ease, box-shadow .3s ease;
}

.topbar.is-stuck {
    border-bottom-color: var(--line);
    background: rgba(255, 255, 255, .78);
    backdrop-filter: blur(16px) saturate(160%);
    box-shadow: 0 8px 24px -20px rgba(16, 24, 40, .5);
}

.topbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    height: 100%;
    max-width: 1180px;
    margin-inline: auto;
    padding-inline: var(--pad);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -.01em;
}

.brand__avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    flex: none;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: .85rem;
    font-weight: 700;
}

.brand__avatar img { width: 100%; height: 100%; object-fit: cover; }

.nav {
    display: flex;
    align-items: center;
    gap: .15rem;
}

.nav a {
    position: relative;
    padding: .42rem .8rem;
    border-radius: 999px;
    color: var(--ink-2);
    font-size: .85rem;
    transition: color .25s ease, background .25s ease;
}

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

.nav a.is-active {
    color: var(--accent);
    background: var(--accent-soft);
    font-weight: 600;
}

.topbar__tools {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.swatches {
    display: flex;
    align-items: center;
    gap: .32rem;
    padding: .3rem .55rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, .7);
}

.swatch {
    width: 13px;
    height: 13px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--sw);
    cursor: pointer;
    outline: 2px solid transparent;
    outline-offset: 3px;
    transition: transform .3s var(--ease-spring), outline-color .3s ease;
}

.swatch:hover { transform: scale(1.2); }
.swatch[aria-pressed="true"] { outline-color: var(--ink-3); }

.motion-toggle {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .36rem .7rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, .7);
    color: var(--ink-3);
    font: inherit;
    font-size: .76rem;
    cursor: pointer;
    transition: color .25s ease, border-color .25s ease;
}

.motion-toggle:hover { color: var(--ink); border-color: var(--line-strong); }

.motion-toggle i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
    transition: background .3s ease;
}

:root[data-motion="reduced"] .motion-toggle i { background: var(--ink-3); }

/* 窄屏：色块收起，导航改成可横向滑动，不做隐藏 */
@media (max-width: 900px) {
    .swatches { display: none; }

    .topbar__inner { gap: .6rem; }

    .nav {
        flex: 1;
        min-width: 0;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .nav::-webkit-scrollbar { display: none; }

    .nav a {
        padding: .35rem .58rem;
        font-size: .8rem;
        white-space: nowrap;
    }

    .topbar__tools { gap: .35rem; }
    .topbar__tools .btn { padding: .35rem .7rem !important; font-size: .76rem !important; }
}

/* 更窄时只留头像标记，给导航让出空间 */
@media (max-width: 560px) {
    .brand > span:not(.brand__avatar) { display: none; }
    .motion-toggle span { display: none; }
    .motion-toggle { padding: .4rem .5rem; }
}

/* ---------------- 通用元素 ---------------- */
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    margin: 0;
    color: var(--accent);
    font-family: var(--font-display);
    font-size: .76rem;
    font-weight: 600;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.eyebrow::before {
    content: "";
    width: 20px;
    height: 2px;
    border-radius: 2px;
    background: var(--accent);
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.chips li {
    padding: .2rem .6rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--ink-2);
    font-size: .74rem;
    white-space: nowrap;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .22rem .6rem;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: .72rem;
    font-weight: 600;
}

.pill--ok { background: #e6f7ee; color: #0f8a53; }
.pill--warn { background: #fff3e0; color: #b26a00; }
.pill--muted { background: var(--surface-2); color: var(--ink-3); }

.pill i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

/* 作者署名 */
.byline {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    color: var(--ink-3);
    font-size: .78rem;
}

.byline a {
    color: var(--ink-2);
    text-decoration: underline;
    text-decoration-style: dotted;
    text-underline-offset: 3px;
    transition: color .25s ease;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .68rem 1.25rem;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: var(--surface);
    color: var(--ink);
    font-family: inherit;
    font-size: .88rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out),
                border-color .3s ease, background .3s ease, color .3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: var(--shadow-md);
}

.btn--primary {
    border-color: transparent;
    background: var(--accent);
    color: var(--accent-on);
    box-shadow: 0 10px 24px -12px var(--accent);
}

.btn--primary:hover {
    background: var(--accent-strong);
    color: var(--accent-on);
    box-shadow: 0 18px 34px -14px var(--accent);
}

.btn--ghost { background: transparent; border-color: var(--line-strong); color: var(--ink-2); }

.btn em { font-style: normal; transition: transform .35s var(--ease-out); }
.btn:hover em { transform: translate(3px, -3px); }

/* ---------------- 首屏 ---------------- */
.hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
    gap: clamp(2rem, 5vw, 4.5rem);
    align-items: center;
    max-width: 1180px;
    margin-inline: auto;
    padding: clamp(2.5rem, 7vh, 5.5rem) var(--pad) clamp(3rem, 7vh, 5rem);
    min-height: calc(100svh - var(--header-h));
}

.hero__avatar {
    position: relative;
    width: clamp(88px, 12vw, 124px);
    height: clamp(88px, 12vw, 124px);
    margin: 1.4rem 0 1.6rem;
    border-radius: 32%;
    overflow: hidden;
    background: var(--accent-soft);
    color: var(--accent);
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 18px 40px -18px rgba(47, 107, 255, .55);
    animation: avatar-pop .9s var(--ease-spring) both;
}

.hero__avatar img { width: 100%; height: 100%; object-fit: cover; }

@keyframes avatar-pop {
    from { opacity: 0; transform: scale(.82) translateY(10px); }
    to   { opacity: 1; transform: none; }
}

.hero__name {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(2.6rem, 6.4vw, 4.6rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -.03em;
}

.hero__name > span {
    display: inline-block;
    animation: name-up .95s var(--ease-structure) .05s both;
}

@keyframes name-up {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: none; }
}

.hero__tagline {
    margin: .9rem 0 0;
    color: var(--ink-2);
    font-size: clamp(1rem, 1.6vw, 1.18rem);
    animation: fade-up .9s .18s var(--ease-out) both;
}

.hero__bio {
    margin-top: 1.5rem;
    max-width: 34rem;
    color: var(--ink-2);
    font-size: .95rem;
}

.hero__bio p {
    margin: 0 0 .5rem;
    animation: fade-up .8s var(--ease-out) both;
}

.hero__bio p:nth-child(1) { animation-delay: .26s; }
.hero__bio p:nth-child(2) { animation-delay: .34s; }
.hero__bio p:nth-child(3) { animation-delay: .42s; }
.hero__bio p:nth-child(4) { animation-delay: .5s; }
.hero__bio p:nth-child(5) { animation-delay: .58s; }

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: .7rem;
    margin-top: 1.9rem;
    animation: fade-up .9s .56s var(--ease-out) both;
}

/* ---------------- 一言卡片 ----------------
   刻意做成一望而知的「引用块」：衬线字体、大引号、独立卡片、带来源和"换一句" */
.hero__quote { min-width: 0; }

.quote {
    position: relative;
    padding: 2.2rem 1.9rem 1.5rem;
    border: 1px solid var(--line);
    border-left: 4px solid var(--accent);
    border-radius: var(--r-lg);
    /* 不透明的底：之前半透明，底图色团会透出来显得"漏色" */
    background: linear-gradient(150deg, #ffffff, #f7faff);
    box-shadow: var(--shadow-md);
    animation: fade-up 1s .34s var(--ease-out) both;
    overflow: hidden;
}

/* 卡片左上角原来压了一个大引号，会和「一言」标签叠在一起显得糊，
   去掉，靠正文里的「」和左侧强调色边就够了 */
.quote__label {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .24rem .72rem;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .08em;
}

.quote__label i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}

.quote__text {
    position: relative;
    margin: 1.1rem 0 0;
    min-height: 3.6em;
    font-family: Georgia, "Songti SC", "STSong", "SimSun", serif;
    font-size: clamp(1.15rem, 1.9vw, 1.42rem);
    line-height: 1.85;
    letter-spacing: .02em;
    color: var(--ink);
}

.quote__from {
    margin: .9rem 0 0;
    color: var(--ink-3);
    font-size: .82rem;
    text-align: right;
}

.quote__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .6rem;
    margin-top: 1.3rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--line);
}

.quote__src {
    color: var(--ink-3);
    font-size: .72rem;
    letter-spacing: .04em;
}

.quote__src a { text-decoration: underline; text-underline-offset: 3px; }
.quote__src a:hover { color: var(--accent); }

.quote__btn {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .36rem .85rem;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: var(--surface);
    color: var(--ink-2);
    font: inherit;
    font-size: .78rem;
    cursor: pointer;
    transition: transform .35s var(--ease-out), border-color .3s ease, color .3s ease;
}

.quote__btn:hover {
    transform: translateY(-1px);
    border-color: var(--accent);
    color: var(--accent);
}

.quote__btn[disabled] { opacity: .5; pointer-events: none; }

.quote.is-loading { opacity: .55; }

/* 外链胶囊：图标 + 文字，图标用品牌色 */
.links {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin: 1.8rem 0 0;
    animation: fade-up .9s .66s var(--ease-out) both;
}

.link-chip {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .46rem 1rem .46rem .82rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    color: var(--ink);
    font-size: .86rem;
    transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out), border-color .3s ease;
}

.link-chip:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--line-strong);
}

.link-chip em {
    color: var(--ink-3);
    font-style: normal;
    font-size: .76em;
    transition: transform .35s var(--ease-out);
}

.link-chip:hover em { transform: translate(2px, -2px); }

.link-chip__icon { display: inline-flex; }

.lic {
    width: 1.15em;
    height: 1.15em;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* 各站点的品牌色 */
[data-icon="bilibili"] { color: #fb7299; }
[data-icon="youtube"]  { color: #ff0033; }
[data-icon="github"]   { color: #24292f; }
[data-icon="gitee"]    { color: #c71d23; }
[data-icon="weibo"]    { color: #e6162d; }
[data-icon="zhihu"]    { color: #0084ff; }
[data-icon="qq"]       { color: #12b7f5; }
[data-icon="telegram"] { color: #229ed9; }
[data-icon="discord"]  { color: #5865f2; }
[data-icon="steam"]    { color: #1b2838; }
[data-icon="gamepad"]  { color: #34a853; }
[data-icon="cloud"]    { color: #4a90d9; }
[data-icon="music"]    { color: #c20c0c; }
[data-icon="douban"]   { color: #2e963d; }
[data-icon="book"]     { color: #2e963d; }
[data-icon="brush"]    { color: #0096fa; }
[data-icon="mail"]     { color: #f4a100; }
[data-icon="x"]        { color: #111111; }
[data-icon="link"],
[data-icon="globe"],
[data-icon="code"]     { color: var(--ink-3); }

/* 按钮里的图标跟着文字颜色 */
.btn .lic { width: 1.1em; height: 1.1em; }

@keyframes fade-up {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: none; }
}

/* 首屏右侧的推荐卡片 */
.hero__spotlight { min-width: 0; }

.spotlight {
    display: block;
    padding: 1rem 1rem 1.4rem;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    background: var(--surface);
    box-shadow: var(--shadow-md);
    animation: fade-up 1s .3s var(--ease-out) both;
    transition: transform .5s var(--ease-out), box-shadow .5s var(--ease-out);
}

.spotlight:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.spotlight__media {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: var(--r-md);
    background: var(--surface-2);
    clip-path: inset(0 100% 0 0);
    animation: wipe-in 1.1s var(--ease-structure) .5s forwards;
}

@keyframes wipe-in {
    to { clip-path: inset(0); }
}

.spotlight__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.spotlight__body { padding: 1.1rem .35rem 0; }

.spotlight__title {
    margin: .6rem 0 0;
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -.01em;
}

.spotlight__desc {
    margin: .4rem 0 0;
    color: var(--ink-2);
    font-size: .87rem;
}

.spotlight .chips { margin-top: .8rem; }

/* ---------------- 滚动跑马灯 ---------------- */
.ticker {
    position: relative;
    max-width: 1180px;
    margin-inline: auto;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

.ticker__track {
    display: flex;
    width: max-content;
    animation: ticker 34s linear infinite;
}

.ticker:hover .ticker__track { animation-play-state: paused; }

.ticker__group {
    display: flex;
    align-items: center;
    gap: 1.4rem;
    padding: .95rem 0;
    white-space: nowrap;
}

.ticker__group span {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .2rem .7rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--ink-2);
    font-size: .8rem;
}

.ticker__group span::before {
    content: "";
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent);
    opacity: .6;
}

@keyframes ticker {
    to { transform: translateX(-50%); }
}

/* ---------------- 区块 ---------------- */
.section {
    max-width: 1180px;
    margin-inline: auto;
    padding: clamp(3rem, 8vh, 6rem) var(--pad) 0;
    scroll-margin-top: calc(var(--header-h) + 12px);
}

.section__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
    flex-wrap: wrap;
}

.section__title {
    margin: .6rem 0 0;
    font-family: var(--font-display);
    font-size: clamp(1.7rem, 3.6vw, 2.7rem);
    font-weight: 800;
    letter-spacing: -.025em;
}

.section__desc {
    margin: .7rem 0 0;
    max-width: 40rem;
    color: var(--ink-2);
    font-size: .92rem;
}

.section__count {
    color: var(--ink-3);
    font-family: var(--font-display);
    font-size: .82rem;
    font-weight: 600;
    letter-spacing: .1em;
}

/* ---------------- 项目：大卡片 + 网格 ---------------- */
.feature {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: clamp(1.2rem, 3vw, 2.5rem);
    align-items: center;
    padding: 1.1rem;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    background: var(--surface);
    box-shadow: var(--shadow-md);
    transition: transform .5s var(--ease-out), box-shadow .5s var(--ease-out), border-color .4s ease;
}

.feature:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: color-mix(in srgb, var(--accent) 30%, transparent);
}

.feature__media {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: var(--r-md);
    background: var(--surface-2);
}

.feature__media img,
.pcard__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: translate3d(var(--tx, 0), var(--ty, 0), 0) scale(1.01);
    transition: transform .75s var(--ease-out);
}

.feature:hover .feature__media img,
.pcard:hover .pcard__media img { transform: translate3d(var(--tx, 0), var(--ty, 0), 0) scale(1.05); }

.feature__media .fallback,
.pcard__media .fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: linear-gradient(140deg, var(--accent-soft), var(--surface-2));
    color: var(--accent);
    font-family: var(--font-display);
    font-size: 2.4rem;
    font-weight: 800;
}

.feature__body { padding: .4rem .6rem .6rem 0; }

.feature__title {
    margin: .8rem 0 0;
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 2.6vw, 2rem);
    font-weight: 800;
    letter-spacing: -.02em;
}

.feature__desc {
    margin: .7rem 0 0;
    color: var(--ink-2);
    font-size: .95rem;
    max-width: 32rem;
}

.meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem;
    margin-top: 1.2rem;
}

.more {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    margin-top: 1.3rem;
    color: var(--accent);
    font-size: .88rem;
    font-weight: 600;
}

.more em { font-style: normal; transition: transform .4s var(--ease-out); }
.feature:hover .more em,
.pcard:hover .more em { transform: translateX(6px); }

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(258px, 1fr));
    gap: clamp(1rem, 2vw, 1.5rem);
    margin-top: clamp(1rem, 2vw, 1.5rem);
}

.pcard {
    display: flex;
    flex-direction: column;
    padding: .85rem .85rem 1.1rem;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    transition: transform .45s var(--ease-out), box-shadow .45s var(--ease-out), border-color .4s ease;
}

.pcard:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: color-mix(in srgb, var(--card-accent, var(--accent)) 35%, transparent);
}

.pcard__media {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: var(--r-md);
    background: var(--surface-2);
}

.pcard__body { padding: 1rem .35rem 0; display: flex; flex-direction: column; flex: 1; }

.pcard__title {
    margin: .55rem 0 0;
    font-family: var(--font-display);
    font-size: 1.12rem;
    font-weight: 700;
    letter-spacing: -.01em;
}

.pcard__desc {
    margin: .4rem 0 0;
    color: var(--ink-2);
    font-size: .85rem;
    flex: 1;
}

.pcard .chips { margin-top: .9rem; }

.pcard .more { margin-top: 1rem; }

/* 卡片左上角的小色条，标识每个项目的专属色 */
.pcard__flag {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--card-accent, var(--accent));
    box-shadow: 0 0 0 3px rgba(255, 255, 255, .85);
}

/* ---------------- 成员 ---------------- */
.members {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: clamp(1rem, 2vw, 1.5rem);
}

.member {
    display: flex;
    flex-direction: column;
    padding: 1.4rem;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    transition: transform .45s var(--ease-out), box-shadow .45s var(--ease-out), border-color .4s ease;
}

.member:hover {
    transform: translateY(-7px);
    box-shadow: var(--shadow-lg);
    border-color: color-mix(in srgb, var(--card-accent, var(--accent)) 32%, transparent);
}

.member__top {
    display: flex;
    align-items: center;
    gap: .9rem;
}

.member__avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    flex: none;
    overflow: hidden;
    border-radius: 20px;
    background: var(--accent-soft);
    color: var(--accent);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.5rem;
    box-shadow: 0 10px 22px -12px var(--card-accent, var(--accent));
}

.member__avatar img { width: 100%; height: 100%; object-fit: cover; }

.member__id { min-width: 0; }

.member__name {
    display: block;
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -.01em;
}

.member__role {
    display: block;
    color: var(--ink-3);
    font-size: .82rem;
}

.member .chips { margin-top: 1rem; }

.member__thumbs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .5rem;
    margin-top: 1rem;
}

.member__thumbs span {
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 10px;
    background: var(--surface-2);
}

.member__thumbs img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .6s var(--ease-out);
}

.member:hover .member__thumbs img { transform: scale(1.06); }

.member__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .6rem;
    margin-top: auto;
    padding-top: 1.1rem;
}

.member__count {
    color: var(--ink-3);
    font-size: .8rem;
    font-variant-numeric: tabular-nums;
}

.member__more {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    color: var(--accent);
    font-size: .84rem;
    font-weight: 600;
}

.member__more em {
    font-style: normal;
    transition: transform .4s var(--ease-out);
}

.member:hover .member__more em { transform: translateX(6px); }

/* ---------------- 更新日志 ---------------- */
.log {
    margin: 0;
    padding: 0;
    list-style: none;
    position: relative;
}

/* 懒加载时的占位 */
.log-skeleton {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: 1.8rem 0;
    color: var(--ink-3);
    font-size: .86rem;
}

.log-skeleton i {
    width: 15px;
    height: 15px;
    flex: none;
    border-radius: 50%;
    border: 2px solid var(--line-strong);
    border-top-color: var(--accent);
    animation: spin .8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.log::before {
    content: "";
    position: absolute;
    top: .6rem;
    bottom: .6rem;
    left: 7px;
    width: 1px;
    background: linear-gradient(180deg, var(--accent), var(--line) 60%, transparent);
}

.log__item {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: .9rem;
    padding: .75rem 0 .75rem 2rem;
}

.log__dot {
    position: absolute;
    top: 1.15rem;
    left: 0;
    width: 15px;
    height: 15px;
    border: 3px solid var(--canvas);
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 1px var(--line);
}

.log__main { flex: 1; min-width: 0; }

.log__msg {
    margin: 0;
    font-size: .92rem;
    word-break: break-word;
}

.log__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .45rem;
    margin: .3rem 0 0;
    color: var(--ink-3);
    font-size: .78rem;
}

.log__repo {
    padding: .1rem .5rem;
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--ink-2);
}

.log__link {
    flex: none;
    padding: .2rem .5rem;
    border-radius: 999px;
    color: var(--ink-3);
    font-size: .82rem;
    transition: color .25s ease, background .25s ease;
}

.log__link:hover { color: var(--accent); background: var(--accent-soft); }

.log-empty {
    padding: 2.5rem 1.5rem;
    border: 1px dashed var(--line-strong);
    border-radius: var(--r-lg);
    color: var(--ink-3);
    text-align: center;
    font-size: .9rem;
}

/* ---------------- 联系 / 页脚 ---------------- */
.section--contact { text-align: center; }

.section--contact .eyebrow { justify-content: center; }

.section--contact .section__title { margin-top: .8rem; }

.links--big {
    justify-content: center;
    gap: .6rem;
    margin-top: 1.8rem;
}

.links--big .link-chip {
    padding: .6rem 1.2rem .6rem 1rem;
    font-size: .9rem;
}

.link-chip--big {
    padding: .62rem 1.3rem .62rem 1.05rem;
    font-size: .9rem;
    border-radius: 999px;
}

.footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    max-width: 1180px;
    margin: clamp(3rem, 8vh, 5rem) auto 0;
    padding: 1.5rem var(--pad) 2.5rem;
    border-top: 1px solid var(--line);
    color: var(--ink-3);
    font-size: .82rem;
}

.footer a { transition: color .25s ease; white-space: nowrap; }
.footer a:hover { color: var(--accent); }

/* ---------------- 浮现动画 ---------------- */
html.js [data-reveal] {
    opacity: 0;
    transform: translateY(22px);
    transition:
        opacity .75s var(--ease-out) var(--d, 0ms),
        transform .75s var(--ease-out) var(--d, 0ms);
}

html.js [data-reveal].is-in {
    opacity: 1;
    transform: none;
}

/* 封面擦除揭示 */
html.js .pcard__media,
html.js .feature__media {
    clip-path: inset(0 100% 0 0);
}

html.js [data-reveal].is-in .pcard__media,
html.js [data-reveal].is-in .feature__media {
    clip-path: inset(0);
    transition: clip-path 1s var(--ease-structure) calc(var(--d, 0ms) + 80ms);
}

/* ---------------- 详情页 ---------------- */
.detail {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: clamp(1.5rem, 4vw, 3.5rem);
    align-items: start;
    max-width: 1180px;
    margin-inline: auto;
    padding: clamp(2rem, 6vh, 4rem) var(--pad) 0;
}

.detail__back {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    max-width: 1180px;
    margin: clamp(1.5rem, 4vh, 2.5rem) auto 0;
    padding-inline: var(--pad);
    color: var(--ink-2);
    font-size: .86rem;
    transition: color .25s ease, gap .25s ease;
}

.detail__back:hover { color: var(--accent); gap: .5rem; }

.detail__media {
    position: relative;
    aspect-ratio: 16 / 11;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    background: var(--surface-2);
    box-shadow: var(--shadow-md);
    clip-path: inset(0 100% 0 0);
    animation: wipe-in 1.1s var(--ease-structure) .08s forwards;
}

.detail__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail__media .fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: linear-gradient(140deg, var(--accent-soft), var(--surface-2));
    color: var(--accent);
    font-family: var(--font-display);
    font-size: 4rem;
    font-weight: 800;
}

.detail__info { padding-top: .5rem; }

.detail__title {
    margin: .8rem 0 0;
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 800;
    line-height: 1.06;
    letter-spacing: -.03em;
    animation: fade-up .85s .16s var(--ease-out) both;
}

.detail__tagline {
    margin: .8rem 0 0;
    color: var(--ink-2);
    font-size: 1rem;
    animation: fade-up .85s .24s var(--ease-out) both;
}

.detail .chips { margin-top: 1.3rem; animation: fade-up .85s .3s var(--ease-out) both; }

.detail__meta {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: 1.1rem;
    animation: fade-up .85s .34s var(--ease-out) both;
}

.detail__body {
    margin-top: 2rem;
    padding-top: 1.8rem;
    border-top: 1px solid var(--line);
    max-width: 62ch;
    animation: fade-up .85s .4s var(--ease-out) both;
}

.detail__body p {
    margin: 0 0 1rem;
    color: var(--ink-2);
    font-size: .98rem;
    line-height: 1.9;
}

.detail__actions {
    display: flex;
    flex-wrap: wrap;
    gap: .7rem;
    margin-top: 2rem;
    animation: fade-up .85s .46s var(--ease-out) both;
}

/* 项目页的「相关链接」：直接摆几个带图标的胶囊 */
.detail__links {
    margin-top: 1.5rem;
    animation: fade-up .85s .5s var(--ease-out) both;
}

.detail__links .chips { margin-top: .6rem; }

.detail__links .chips li {
    padding: 0;
    border: 0;
    background: none;
    font-size: inherit;
}

/* 伙伴页上的「TA 的项目」 */
.person-projects {
    margin-top: 2rem;
    padding-top: 1.7rem;
    border-top: 1px solid var(--line);
    animation: fade-up .85s .42s var(--ease-out) both;
}

.mini-projects {
    margin: 1rem 0 0;
    padding: 0;
    list-style: none;
}

.mini-projects li {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: .5rem;
    padding: .6rem 0;
    border-bottom: 1px dashed var(--line);
}

.mini-projects li:last-child { border-bottom: 0; }

.mini-projects a {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: .98rem;
    letter-spacing: -.01em;
    transition: color .25s ease;
}

.mini-projects a:hover { color: var(--accent); }

.mini-projects span {
    color: var(--ink-3);
    font-size: .82rem;
}

/* 伙伴详情 */
.detail--person { align-items: center; }

.detail__portrait {
    position: relative;
    aspect-ratio: 1 / 1;
    max-width: 420px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    background: var(--surface-2);
    box-shadow: var(--shadow-md);
    clip-path: inset(0 100% 0 0);
    animation: wipe-in 1.1s var(--ease-structure) .08s forwards;
}

.detail__portrait img { width: 100%; height: 100%; object-fit: cover; }

.detail__portrait .fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: linear-gradient(140deg, var(--accent-soft), var(--surface-2));
    color: var(--accent);
    font-family: var(--font-display);
    font-size: 5rem;
    font-weight: 800;
}

/* 404 */
.notfound {
    max-width: 640px;
    margin-inline: auto;
    padding: clamp(3rem, 12vh, 7rem) var(--pad);
    text-align: center;
}

.notfound__title {
    margin: 1rem 0 0;
    font-family: var(--font-display);
    font-size: clamp(2rem, 6vw, 3.4rem);
    font-weight: 800;
    letter-spacing: -.03em;
}

.notfound__desc {
    margin: 1rem 0 2rem;
    color: var(--ink-2);
}

/* ---------------- 无障碍 ---------------- */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *,
    *::before,
    *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
    }
    html.js [data-reveal] { opacity: 1 !important; transform: none !important; }
    html.js .pcard__media,
    html.js .feature__media,
    .spotlight__media,
    .detail__media,
    .detail__portrait { clip-path: none !important; }
}

/* ---------------- 响应式 ---------------- */
@media (max-width: 1000px) {
    .hero {
        grid-template-columns: 1fr;
        gap: 2rem;
        min-height: auto;
        padding-top: 2.5rem;
    }
    .feature { grid-template-columns: 1fr; }
    .detail { grid-template-columns: 1fr; }
    .detail__portrait { max-width: 360px; }
}

@media (max-width: 720px) {
    :root { --header-h: 60px; }

    .hero { padding-top: 1.5rem; }
    .hero__name { font-size: clamp(2.3rem, 11vw, 3.2rem); }
    .hero__actions .btn { flex: 1 1 auto; justify-content: center; }

    .cards { grid-template-columns: 1fr; }
    .section__head { align-items: flex-start; }
    .footer { justify-content: flex-start; }
}

/* ---------------- 动态页 ---------------- */
.lab-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(1rem, 2.4vw, 1.6rem);
}

.lab-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1.05rem;
    padding: clamp(1.1rem, 2.6vw, 1.55rem);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: transform .45s var(--ease-out), box-shadow .45s var(--ease-out), border-color .3s ease;
}

.lab-card:hover {
    transform: translateY(-4px);
    border-color: var(--line-strong);
    box-shadow: var(--shadow-md);
}

.lab-card__art {
    position: relative;
    height: clamp(150px, 18vw, 210px);
    border-radius: var(--r-md);
    overflow: hidden;
    background: #04070e;
}

.lab-card--arch .lab-card__art {
    background:
        radial-gradient(circle at 28% 32%, rgba(108, 222, 255, .38), transparent 42%),
        radial-gradient(circle at 76% 68%, rgba(181, 146, 255, .32), transparent 46%),
        radial-gradient(circle at 58% 18%, rgba(104, 230, 199, .22), transparent 34%),
        #070b18;
}

.lab-card--arch .lab-card__art::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(236, 244, 255, .95) 1.1px, transparent 1.6px);
    background-size: 30px 30px;
    opacity: .38;
}

.lab-card--arch .lab-card__art::after {
    content: "";
    position: absolute;
    left: 10%;
    right: 10%;
    top: 50%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(108, 222, 255, .85), rgba(181, 146, 255, .75), transparent);
    box-shadow: 0 0 18px rgba(108, 222, 255, .6);
    transform: rotate(-8deg);
}

.lab-card--rt .lab-card__art {
    background:
        radial-gradient(circle at 50% 50%, rgba(86, 201, 221, .28), transparent 58%),
        #04080f;
}

.lab-card--rt .lab-card__art::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #56c9dd;
    box-shadow:
        0 0 0 18px rgba(86, 201, 221, .12),
        0 0 0 19px rgba(86, 201, 221, .38),
        0 0 0 46px rgba(86, 201, 221, .09),
        0 0 0 47px rgba(86, 201, 221, .28),
        0 0 0 76px rgba(86, 201, 221, .06),
        0 0 0 77px rgba(86, 201, 221, .18);
    transform: translate(-50%, -50%);
}

.lab-card--rt .lab-card__art::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ecf4ff;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 16px rgba(236, 244, 255, .9);
}

.lab-card__kicker {
    margin: 0;
    color: var(--ink-3);
    font-family: var(--font-mono);
    font-size: .7rem;
    letter-spacing: .12em;
}

.lab-card__title {
    margin: .35rem 0 0;
    font-family: var(--font-display);
    font-size: clamp(1.2rem, 2.2vw, 1.55rem);
    font-weight: 800;
    letter-spacing: -.015em;
}

.lab-card__desc {
    margin: .5rem 0 0;
    color: var(--ink-2);
    font-size: .89rem;
    line-height: 1.68;
}

.lab-card__actions {
    display: flex;
    gap: .55rem;
    flex-wrap: wrap;
    margin-top: auto;
}

.lab-card__actions .btn {
    padding: .55rem 1rem;
    font-size: .82rem;
}

.lab-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.2rem;
    flex-wrap: wrap;
    margin-bottom: 1.2rem;
}

.lab-head__title {
    margin: .5rem 0 0;
    font-family: var(--font-display);
    font-size: clamp(1.7rem, 3.4vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -.02em;
}

.lab-head__actions {
    display: flex;
    gap: .55rem;
    flex-wrap: wrap;
}

.lab-frame {
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    overflow: hidden;
    background: #04070e;
    box-shadow: var(--shadow-md);
}

.lab-frame__bar {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .55rem .9rem;
    border-bottom: 1px solid var(--line);
    background: var(--surface-2);
    color: var(--ink-2);
    font-size: .78rem;
}

.lab-frame__bar a {
    margin-left: auto;
    color: var(--accent);
}

.lab-frame__dot {
    width: .5rem;
    height: .5rem;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-soft);
}

.lab-frame__stage {
    position: relative;
    height: clamp(520px, 76vh, 820px);
    overscroll-behavior: contain;
    background: #03040a;
}

.lab-frame__stage iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    background: #03040a;
}

.lab-frame__loading {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: #03040a;
    color: #9fb0d0;
    font-size: .82rem;
    transition: opacity .4s ease;
}

.lab-frame.is-ready .lab-frame__loading {
    opacity: 0;
    pointer-events: none;
}

.lab-frame__fallback {
    position: absolute;
    inset: 0;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .85rem;
    padding: 1.5rem;
    text-align: center;
    background: rgba(3, 4, 10, .94);
    color: #dfeaf6;
}

.lab-frame__fallback.is-static,
.lab-frame.is-failed .lab-frame__fallback {
    display: flex;
}

.lab-frame__fallback p {
    margin: 0;
    font-size: .9rem;
}

.lab-frame__mobile {
    display: none;
}

.lab-foot {
    margin: 1rem 0 0;
    color: var(--ink-3);
    font-size: .78rem;
    line-height: 1.7;
}

/* 820–1000px：卡片改单列，架构星图不内嵌（星空环仍内嵌）。 */
@media (max-width: 1000px) {
    .lab-grid { grid-template-columns: 1fr; }

    .lab-frame[data-embed-mobile="false"] .lab-frame__stage { display: none; }

    .lab-frame[data-embed-mobile="false"] .lab-frame__mobile {
        display: flex;
        flex-direction: column;
        gap: .8rem;
        padding: 1.4rem;
        border-top: 1px solid var(--line);
        text-align: center;
    }

    .lab-frame[data-embed-mobile="false"] .lab-frame__mobile p {
        margin: 0;
        color: #b9c6da;
        font-size: .86rem;
        line-height: 1.7;
    }

    .lab-card--arch .lab-card__embed { display: none; }
}

@media (max-width: 820px) {
    .lab-frame[data-embed-mobile="true"] .lab-frame__stage {
        height: 70dvh;
        min-height: 420px;
    }

    .lab-card__embed { display: none; }

    .lab-head__actions { width: 100%; }
    .lab-head__actions .btn { flex: 1 1 auto; justify-content: center; }
}
