/* ==================== 设计系统变量 ==================== */
:root {
    /* 背景色 */
    --bg-base: #121316;
    --bg-card: linear-gradient(140deg, rgba(108,113,124,1) 1%, rgba(46,50,59,1) 100%);
    --bg-card-dark: linear-gradient(180deg, rgba(61,72,92,1) 0%, rgba(38,38,38,1) 100%);
    --bg-card-adunpai: linear-gradient(-46deg, rgba(0,0,0,1) 0%, rgba(84,98,95,1) 100%);
    --bg-card-defense: linear-gradient(137deg, rgba(79,94,128,1) 1%, rgba(16,25,42,1) 94%);

    /* 品牌渐变 */
    --brand-h: linear-gradient(90deg, #38D9FD 0%, #FFF583 100%);
    --brand-v: linear-gradient(180deg, #38D9FD 0%, #FFF583 100%);
    --brand-radial: radial-gradient(50% 50% at 50% 50%, #25262B 1.44%, #1C1D22 44.71%, rgba(28,29,34,0.8) 62.02%, rgba(28,29,34,0.4) 80%, rgba(24,24,24,0) 100%);

    /* 文字色 */
    --text: #BFBFBF;
    --text-50: rgba(191,191,191,0.5);
    --text-60: rgba(191,191,191,0.6);
    --text-10: rgba(191,191,191,0.1);
    --text-dark: #010101;
    --text-dark-sub: #3E3E3E;
    --text-dark-btn: #333333;

    /* 边框 */
    --border: rgba(191,191,191,0.3);
    --border-subtle: rgba(191,191,191,0.06);
    --border-faint: rgba(191,191,191,0.1);

    /* 字体 */
    --font-en: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-cn: 'PingFang SC', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;

    /* 间距 */
    --side-pad: clamp(24px, 8.33vw, 160px);
    --nav-h: 80px;
}

/* ==================== Reset ==================== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    background: var(--bg-base);
    color: var(--text);
    font-family: var(--font-cn);
    line-height: 1.5;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; -webkit-user-drag: none; user-select: none; -webkit-touch-callout: none; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { background: none; border: none; cursor: pointer; font-family: inherit; color: inherit; }

/* ==================== 背景光晕微动 ==================== */
.hero__glow { will-change: transform; }
body > * { position: relative; z-index: 1; }

/* ==================== 导航 ==================== */
.nav {
    position: fixed; top: 0; left: 0; width: 100%; z-index: 100;
    height: var(--nav-h);
    border-bottom: 1px solid var(--border-subtle);
    backdrop-filter: blur(20px);
    background: transparent;
    box-sizing: border-box;
}
.nav__inner {
    width: 100%; height: 100%; margin: 0 auto;
    padding: 0 var(--side-pad);
    display: flex; align-items: center; justify-content: space-between;
    position: relative;
}
.nav__logo { flex-shrink: 0; }
.nav__logo img { width: 235px; height: 30px; }
.nav__menu {
    position: absolute; left: 50%; transform: translateX(-50%);
    display: flex; align-items: center; gap: 53px;
}
.nav__item {
    position: relative; z-index: 1;
    font-size: 18px; font-weight: 400;
    color: var(--text); opacity: 1;
    padding: 4px 16px; border-radius: 100px;
    transition: color 0.3s ease, font-weight 0.3s ease;
}
.nav__item.is-active {
    font-weight: 700;
    font-family: var(--font-en);
    background: var(--brand-h);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 6px rgba(56,217,253,0.35)) drop-shadow(0 0 12px rgba(255,245,131,0.30));
}
/* 选中项文字底部的蓝青→黄渐变光晕 */
.nav__item.is-active::after {
    content: '';
    position: absolute; left: 15px; right: 15px; bottom: -8px;
    height: 4px; border-radius: 50%;
    background: var(--brand-h);
    filter: blur(8px);
    opacity: 0.65;
}
.nav__slider-wrap {
    position: absolute; top: 0; left: 0; height: 100%;
    pointer-events: none; z-index: 0;
    list-style: none;
}
.nav__slider {
    position: absolute; top: 0; left: 0;
    height: 100%;
    background: transparent;
    border-radius: 100px;
    transition: left 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
                width 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.nav__brand { height: 33px; width: auto; flex-shrink: 0; }
.nav__toggle { display: none; flex-direction: column; gap: 5px; padding: 8px; }
.nav__toggle span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: 0.3s; }
.nav__toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle.is-open span:nth-child(2) { opacity: 0; }
.nav__toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ==================== 首屏 ==================== */
.hero {
    position: relative; min-height: 800px;
    padding: var(--nav-h) var(--side-pad) 60px;
    display: flex; align-items: center;
    overflow: hidden;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.hero__glow {
    position: absolute; border-radius: 50%;
    background: radial-gradient(50% 50% at 50% 50%,
        rgba(56, 217, 253, 0.10) 0%,
        #25262B 1.44%,
        #1C1D22 44.71%,
        rgba(28,29,34,0.8) 62.02%,
        rgba(28,29,34,0.4) 80%,
        rgba(24,24,24,0) 100%);
    pointer-events: none;
    z-index: 0;
    will-change: transform;
}
.hero__glow--top { width: 1920px; height: 1212px; top: -696px; left: 361px; }
.hero__glow--mid { width: 2200px; height: 1389px; top: 760px; left: -1114px; }
.hero__glow--bottom { width: 1920px; height: 1212px; top: 2526px; left: 661px; display: none; }
.hero__inner {
    width: 100%; max-width: 1600px; margin: 0 auto;
    display: flex; align-items: center; justify-content: space-between; gap: 40px;
    position: relative; z-index: 1;
}
.hero__content { width: 534px; flex-shrink: 0; display: flex; flex-direction: column; gap: 26px; position: relative; z-index: 2; }
.hero__title-wrap { position: relative; width: fit-content; max-width: 100%; }
.hero__title {
    font-family: var(--font-en); font-weight: 700;
    font-size: clamp(40px, 4.1vw, 66px);
    line-height: 1.1;
    background: var(--brand-v);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero__and {
    position: absolute; top: 12px; right: 0;
    height: clamp(40px, 4vw, 66px); width: auto;
    opacity: 0.12; pointer-events: none;
}
.hero__subtitle {
    font-size: clamp(14px, 1.3vw, 21px); font-weight: 600;
    opacity: 0.5; line-height: 1.3;
}
.hero__tags { display: flex; flex-wrap: wrap; gap: 16px; }
.tag {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 5px; width: 110px; flex-shrink: 0;
    border: 1px solid var(--border); border-radius: 100px;
    font-size: 16px; font-weight: 600; color: var(--text);
}
.hero__version {
    height: clamp(40px, 4.1vw, 66px); width: auto;
    align-self: flex-start; pointer-events: none;
}
/* 大图：Figma #434:719 绝对定位 left=385.6/1600 width=1278.76/1600，垂直居中 */
.hero__visual {
    position: absolute;
    left: 24.1%;
    top: 50%;
    /* 垂直居中：高度为父宽的 50.69%，向上偏移一半即 25.34%（百分比相对父容器宽度） */
    margin-top: -25.34%;
    width: 79.92%;
    max-width: none;
    aspect-ratio: 1278.76 / 811.05;
    z-index: 0;
    pointer-events: none;
}
.hero__img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; border-radius: 0; }

/* ==================== 首屏入场动效 ==================== */
@keyframes heroFadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes heroFadeLeft {
    from { opacity: 0; transform: translateX(60px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes glowFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes tagPopIn {
    0% { opacity: 0; transform: scale(0.6); }
    70% { transform: scale(1.08); }
    100% { opacity: 1; transform: scale(1); }
}
@keyframes andFadeIn {
    from { opacity: 0; transform: translateY(20px) rotate(-8deg); }
    to { opacity: 0.12; transform: translateY(0) rotate(0); }
}
@keyframes imgReveal {
    from { opacity: 0; transform: scale(0.94); }
    to { opacity: 1; transform: scale(1); }
}

.hero__glow { animation: glowFadeIn 1.8s ease-out both; }
.hero__glow--mid { animation-delay: 0.3s; }
.hero__title { animation: heroFadeUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.3s both; }
.hero__and { animation: andFadeIn 1.2s ease-out 0.7s both; }
.hero__subtitle { animation: heroFadeUp 0.8s ease-out 0.6s both; }
.hero__tags .tag { animation: tagPopIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
.hero__tags .tag:nth-child(1) { animation-delay: 0.8s; }
.hero__tags .tag:nth-child(2) { animation-delay: 0.9s; }
.hero__tags .tag:nth-child(3) { animation-delay: 1.0s; }
.hero__tags .tag:nth-child(4) { animation-delay: 1.1s; }
.hero__version { animation: heroFadeUp 0.8s ease-out 1.2s both; }
.hero__visual { animation: glowFadeIn 1.2s ease-out 0.5s both; }
.hero__img { animation: imgReveal 1.2s cubic-bezier(0.22, 1, 0.36, 1) 0.8s both; }

@media (prefers-reduced-motion: reduce) {
    .hero__glow, .hero__glow--mid, .hero__title, .hero__and, .hero__subtitle,
    .hero__tags .tag, .hero__version, .hero__visual, .hero__img { animation: none; }
}

/* ==================== Section 通用 ==================== */
.section-head { display: flex; align-items: center; gap: 20px; }
.section-head__bar { display: none; }
.section-head__text { display: flex; flex-direction: column; gap: 8px; }
.section-head__cn {
    display: flex; align-items: center; gap: 20px;
    font-family: var(--font-en); font-weight: 700; font-size: 32px; line-height: 1;
    background: var(--brand-h); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.section-head__cn::before {
    content: ''; width: 2px; flex-shrink: 0; align-self: stretch;
    background: var(--brand-v); border-radius: 2px;
}
.section-head__en { font-size: 18px; font-weight: 600; line-height: 26px; color: var(--text); opacity: 1; }
.divider { position: relative; z-index: 2; width: 100%; height: 0; border-top: 1px dashed var(--text); opacity: 0.15; }

/* ==================== 关于我 ==================== */
.about { position: relative; z-index: 1; padding: 120px var(--side-pad) 80px; }
.about__inner { position: relative; z-index: 1; }
.about__avatar {
    position: absolute; top: -240px; left: 0;
    width: 173px; height: 182px; object-fit: cover;
    outline: 1px solid rgba(191,191,191,0.25);
    outline-offset: 10px;
    z-index: 2;
}
.about__inner {
    max-width: 1600px; margin: 0 auto;
    display: flex; gap: clamp(40px, 8vw, 120px);
    position: relative;
}
.about__left { flex: 1 1 0; max-width: 600px; min-width: 0; display: flex; flex-direction: column; gap: 32px; }
.about__bio { font-size: 14px; line-height: 35px; color: var(--text); }
.about__contact, .about__skills { display: flex; flex-direction: column; gap: 32px; }
.about__sub-title { font-size: 20px; font-weight: 600; color: var(--text); }
.about__contact-row { display: flex; align-items: center; gap: 40px; flex-wrap: wrap; }
.about__contact-item { display: flex; flex-direction: column; gap: 8px; }
.about__contact-label { font-size: 16px; font-weight: 600; color: var(--text); opacity: 0.6; }
.about__contact-value { font-size: 20px; font-weight: 600; color: var(--text); }
.about__contact-sep { width: 1px; height: 50px; background: var(--text); opacity: 0.1; }
.about__skill-group { display: flex; align-items: flex-start; gap: 26px; flex-wrap: wrap; }
.about__skill-label { font-size: 16px; line-height: 35px; color: var(--text); opacity: 0.6; flex-shrink: 0; width: 32px; }
.about__skill-list { display: grid; grid-template-columns: repeat(5, 1fr); gap: 26px; flex: 1; }
.skill-icon { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 70px; transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); }
.skill-icon img { width: 46px; height: 46px; object-fit: contain; border-radius: 100px; transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); }
.skill-icon img[alt="Illustrator"] { box-shadow: 0 0 0 1px rgba(255,154,0,0.1); }
.skill-icon img[alt="Photoshop"] { box-shadow: 0 0 0 1px rgba(49,168,255,0.1); }
.skill-icon img[alt="AE"] { box-shadow: 0 0 0 1px rgba(153,153,255,0.1); }
.skill-icon span { font-size: 14px; color: var(--text); text-align: center; }
.skill-icon:hover { transform: translateY(-4px); }
.skill-icon:hover img { transform: scale(1.2); }

.about__right { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 40px; }

/* 中等屏幕：about 区域单列堆叠 */
@media (max-width: 1280px) {
    .about__inner { flex-direction: column; gap: 60px; }
    .about__left { width: 100%; max-width: 720px; flex: none; }
    .about__avatar { top: -200px; }
}

/* 时间线 */
.timeline { display: flex; flex-direction: column; }
.timeline__item { display: flex; gap: 20px; }
.timeline__dot {
    width: 20px; flex-shrink: 0;
    display: flex; flex-direction: column; align-items: center;
}
.timeline__dot-top {
    width: 1px; height: 15px; flex-shrink: 0;
    background: var(--text); opacity: 0.2;
}
.timeline__item:first-child .timeline__dot-top { height: 16px; opacity: 0; }
.timeline__dot-icon { width: 20px; height: 18px; flex-shrink: 0; }
.timeline__dot-line {
    width: 1px; flex: 1; flex-shrink: 0;
    background: var(--text); opacity: 0.2;
}
.timeline__item:last-child .timeline__dot-line {
    background: linear-gradient(180deg, rgba(191,191,191,0.2) 0%, transparent 100%);
    opacity: 1;
    min-height: 40px;
}
.timeline__content {
    flex: 1; display: flex; flex-direction: column; gap: 8px; padding: 12px 0 24px 12px;
    border-radius: 8px; transition: background 0.3s ease;
}
.timeline__item:hover .timeline__content { background: rgba(255,255,255,0.04); }
.timeline__item:hover .timeline__company { color: #FFFFFF; }
.timeline__item:hover .timeline__desc { color: rgba(255,255,255,0.9); }
.timeline__company { font-size: 18px; font-weight: 600; line-height: 24px; color: var(--text); transition: color 0.3s ease; }
.timeline__period { font-size: 14px; line-height: 24px; color: var(--text); opacity: 0.6; }
.timeline__desc { font-size: 14px; line-height: 22px; color: var(--text); transition: color 0.3s ease; }

/* ==================== 作品展示 ==================== */
.portfolio { padding: 80px var(--side-pad); display: flex; flex-direction: column; gap: 32px; border-top: 1px solid var(--border-faint); }
.portfolio__head {
    max-width: 1600px; margin: 0 auto; width: 100%;
    display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px;
}
.portfolio__filters { display: flex; gap: 16px; flex-wrap: wrap; }
.filter {
    height: 40px; padding: 0 16px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--text); border-radius: 100px;
    font-size: 18px; font-weight: 600; line-height: 1; color: var(--text);
    transition: all 0.3s;
}
.filter.is-active { background: var(--text); color: var(--bg-base); }
.filter:hover { background: var(--text-10); }

.portfolio__grid {
    max-width: 1600px; margin: 0 auto; width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
    gap: 32px;
}

/* 卡片 - Figma 设计 v2。宽度随网格在约 340–420px 间变化，封面按设计比例伸缩 */
.card {
    width: auto; min-width: 0;
    padding: 16px; border-radius: 16px;
    background: #25262C;
    display: flex; flex-direction: column; gap: 16px;
    cursor: pointer;
    transition: transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}
.card:hover {
    transform: translateY(-4px);
    background: #2C2E36;
    box-shadow: 0 16px 32px rgba(0,0,0,0.32);
}
.card[hidden] { display: none !important; }

/* 封面区 */
.card__cover {
    position: relative;
    width: 100%; height: auto; aspect-ratio: 344 / 220;
    border-radius: 4px;
    background: linear-gradient(140deg, rgba(108,113,124,1) 1%, rgba(46,50,59,1) 100%);
    overflow: hidden;
    flex-shrink: 0;
}
/* 描边叠在图片上层，圆角与图片完全对齐 */
.card__cover::after {
    content: ''; position: absolute; inset: 0;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 4px;
    pointer-events: none; z-index: 2;
}
.card__cover-img {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover; object-position: center;
    transition: transform 0.5s ease;
}
.card:hover .card__cover-img { transform: scale(1.06); }

/* 多图封面（全数据防线） */
.card__cover--defense {
    background: linear-gradient(140deg, rgba(108,113,124,1) 1%, rgba(46,50,59,1) 100%);
    border-radius: 4px;
    overflow: hidden;
}
/* defense bg/fg merged into single image */

/* 全数据防线封面 - Figma 532:42402 精确尺寸 */
.card__cover--defense .card__cover-img {
    inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    object-position: center;
    transform: scale(1.08);
    transition: transform 0.5s ease;
}
.card:hover .card__cover--defense .card__cover-img { transform: scale(1.14); }

/* A盾牌封面 */
.card__cover--adunpai {
    background: linear-gradient(0deg, rgba(12,50,42,1) 0%, rgba(36,74,55,1) 92%);
}

/* 信息区 */
.card__body { display: flex; flex-direction: column; gap: 8px; }
.card__title {
    font-family: 'PingFang SC', var(--font-cn);
    font-weight: 600; font-size: 20px; line-height: 28px;
    color: #FFFFFF;
    text-align: left;
    margin: 0;
}
.card__tags { display: flex; flex-wrap: wrap; gap: 4px; }
.card__tag {
    height: 22px; padding: 10px 8px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 2px;
    background: rgba(255,255,255,0.05);
    font-family: 'PingFang SC', var(--font-cn);
    font-size: 12px; line-height: 20px;
    color: #FFFFFF;
    opacity: 0.6;
    white-space: nowrap;
}
.card__divider {
    width: 100%; height: 0;
    border-top: 1px dashed rgba(255,255,255,0.1);
}
.card__foot {
    height: 16px;
    display: flex; align-items: center; gap: 7px;
    font-family: 'PingFang SC', var(--font-cn);
    font-size: 12px;
    color: #FFFFFF;
    opacity: 0.6;
}
.card__foot-img {
    display: block;
    height: 100%;
    width: auto;
    object-fit: contain;
}

/* ==================== 感谢 ==================== */
.thanks { padding: 80px var(--side-pad) 80px; border-top: 1px solid var(--border-faint); }
.thanks__inner {
    max-width: 1600px; margin: 0 auto;
    display: flex; align-items: center; justify-content: center; gap: 33px; flex-wrap: wrap;
}
.thanks__img { width: 279px; height: auto; flex-shrink: 0; }
.thanks__text { display: flex; flex-direction: column; gap: 24px; }
.thanks__title { font-family: var(--font-en); font-weight: 700; font-size: 40px; color: var(--text); }
.thanks__desc { font-size: 16px; line-height: 35px; color: var(--text); max-width: 649px; }

.footer { padding: 24px var(--side-pad); border-top: 1px solid var(--border-faint); text-align: center; }
.footer__version { font-family: var(--font-en); font-size: 12px; color: var(--text); opacity: 0.3; }

/* ==================== 作品详情浮层 ==================== */
.modal {
    position: fixed; inset: 0; z-index: 200;
    display: flex; align-items: flex-start; justify-content: center;
    padding: 32px 0 0; opacity: 0; visibility: hidden; pointer-events: none;
    transition: opacity 0.42s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.42s linear;
}
.modal.is-open { opacity: 1; visibility: visible; pointer-events: auto; }
.modal__overlay {
    position: absolute; inset: 0;
    background: rgba(5,6,8,0.82);
}
.modal__dialog {
    position: relative; z-index: 1;
    width: calc(100% - 48px); max-width: 1600px; height: calc(100vh - 32px);
    background: #222329; border: 1px solid rgba(191,191,191,0.22);
    border-radius: 24px 24px 0 0; overflow: hidden;
    box-shadow: 0 32px 90px rgba(0,0,0,0.5);
    transform: translate3d(0, 48px, 0);
    transition: transform 0.52s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal.is-open .modal__dialog { transform: translate3d(0, 0, 0); }
/* 大屏弹框：居中对齐，四角圆角，高度适配内容（仅桌面端）
   用 #modalDashboard 命中，避免 modal--dashboard 类被内联编辑移除后失效 */
@media (min-width: 769px) {
    #modalDashboard,
    .modal--dashboard { align-items: center; padding: 32px 0; }
    #modalDashboard .modal__dialog {
        height: auto;
        max-height: calc(100vh - 64px + 100px);
        border-radius: 24px;
    }
    #modalDashboard .modal__body { height: auto; }
    #modalDashboard .modal-layout { min-height: 0; height: 100%; }
}
.modal__close {
    position: absolute; top: 18px; right: 18px; z-index: 4;
    width: 40px; height: 40px; border: 1px solid rgba(255,255,255,0.14);
    border-radius: 50%; background: rgba(18,19,22,0.72); color: var(--text);
    display: flex; align-items: center; justify-content: center;
    transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}
.modal__close:hover { background: rgba(255,255,255,0.16); border-color: rgba(255,255,255,0.32); transform: rotate(90deg); }
.modal--gallery .modal__dialog > .modal__close { display: none; }
/* 画廊弹框标题行关闭按钮 */
.modal-gallery__title-wrap { position: relative; }
.modal-gallery__close {
    position: absolute; top: 16px; right: 16px;
    width: 34px; height: 34px; border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(18,19,22,0.72);
    color: #FFFFFF;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; z-index: 30; pointer-events: auto;
    transition: background 0.3s ease, transform 0.3s ease;
}
.modal-gallery__close:hover { background: rgba(255,255,255,0.16); transform: rotate(90deg); }
.modal__body { max-height: 100%; height: 100%; overflow-y: auto; scrollbar-width: none; }
.modal__body::-webkit-scrollbar { width: 6px; }
.modal__body::-webkit-scrollbar-track { background: transparent; }
.modal__body::-webkit-scrollbar-thumb { background: transparent; border-radius: 3px; }
.modal__body:hover::-webkit-scrollbar-thumb { background: rgba(191,191,191,0.3); }
.modal__body:hover::-webkit-scrollbar-thumb:hover { background: rgba(191,191,191,0.5); }
.modal-layout { display: grid; min-height: 620px; }
.modal-layout--dashboard {
    display: flex; flex-direction: column; justify-content: center;
    grid-template-columns: none;
}
.modal-layout--gallery { display: flex; flex-direction: column; grid-template-columns: none; position: relative; }
.modal-layout--gallery--full { grid-template-columns: minmax(0, 1fr); }
.modal-layout--gallery--full .modal-gallery__body { grid-template-columns: minmax(0, 1fr); }
.modal-gallery__body { display: grid; grid-template-columns: minmax(0, 1fr) 480px; flex: 1 1 auto; min-height: 0; position: relative; }
.modal-gallery__content {
    flex: none;
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding-top: var(--gallery-header-h, 69px);
    height: calc(100% + var(--gallery-header-h, 69px));
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.modal-layout--gallery.is-header-hidden .modal-gallery__content {
    transform: translateY(calc(var(--gallery-header-h, 69px) * -1));
}
.modal-detail__main { min-width: 0; }
.modal-dashboard__main-column,
.modal-gallery__main-column { padding: 0; }
.modal-dashboard__heading {
    display: flex; align-items: center; gap: 16px;
    padding: 20px 40px; margin-bottom: 0;
    border-bottom: 1px solid #303030;
}
.modal-gallery__heading {
    position: absolute; top: 0; left: 0; right: 0; z-index: 10;
    display: flex; flex-direction: column;
    align-items: stretch; justify-content: flex-end;
    gap: 16px;
    padding: 20px 40px; margin-bottom: 0;
    border-bottom: 1px solid #303030;
    background: #222329;
    transform: translateY(0);
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.modal-gallery__heading.is-hidden {
    transform: translateY(-100%);
    opacity: 0;
}
.modal-gallery__title-wrap {
    display: flex; align-items: center; gap: 16px;
    flex: 0 0 auto;
}
/* 组件规范锚点导航 */
.modal-gallery__anchor-nav {
    flex: 0 0 auto;
    display: flex; align-items: center; gap: 0;
    height: 32px;
    padding: 0 40px;
    border-bottom: 1px solid #303030;
    background: #222329;
    z-index: 6;
}
.modal-gallery__anchor-arrow {
    display: flex; align-items: center; justify-content: center;
    width: 20px; height: 20px; flex-shrink: 0;
    background: rgba(255,255,255,0.05);
    border-radius: 4px;
    color: rgba(255,255,255,0.4);
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.modal-gallery__anchor-arrow:hover {
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.8);
}
.modal-gallery__anchor-items {
    flex: 1; display: flex; align-items: center;
    overflow-x: auto; scrollbar-width: none;
    gap: 0; padding: 0 10px;
    scroll-behavior: smooth;
}
.modal-gallery__anchor-items::-webkit-scrollbar { display: none; }
.modal-gallery__anchor-item {
    position: relative;
    display: flex; align-items: center; justify-content: center;
    padding: 10px 12px; height: 32px;
    flex-shrink: 0; white-space: nowrap;
    font-family: 'PingFang SC', var(--font-cn);
    font-size: 12px; font-weight: 400; line-height: 20px;
    color: rgba(255,255,255,0.4);
    cursor: pointer;
    border: none; background: none;
    transition: color 0.2s;
}
.modal-gallery__anchor-item.is-active {
    font-weight: 600;
    background: linear-gradient(90deg, #38D9FD, #FFF583);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
}
.modal-gallery__anchor-item.is-active::after {
    content: ''; position: absolute;
    bottom: 0; left: 0; right: 0; height: 2px;
    background: linear-gradient(-90deg, #38D9FD, #FFF583);
}
.modal-gallery__tabs {
    flex: 0 0 auto;
    display: flex; align-items: stretch; gap: 24px;
}
.modal-gallery__title-wrap::before {
    content: ''; width: 2.4px; flex: 0 0 2.4px;
    height: 20px; background: var(--brand-v); border-radius: 2px;
}
.modal-detail__kicker {
    display: block; margin-bottom: 9px; color: var(--text-60);
    font-family: var(--font-en); font-size: 11px; font-weight: 600;
    letter-spacing: 0.12em; line-height: 16px; text-transform: uppercase;
}
.modal-dashboard__title {
    font-family: 'Inter', var(--font-en);
    font-size: 20px; font-weight: 700; line-height: 28px;
    background: var(--brand-h);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
}
.modal-gallery__title {
    font-family: 'Inter', var(--font-en);
    font-size: 20px; font-weight: 700; line-height: 28px;
    background: var(--brand-h);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
}
.modal-dashboard__en,
.modal-gallery__en {
    margin-top: 4px; color: var(--text-60); font-family: var(--font-en);
    font-size: 13px; line-height: 20px;
}
.modal-dashboard__content {
    display: flex; flex-direction: column; align-items: center;
    padding: 40px 40px 0; gap: 32px;
    width: 100%;
}
.modal-dashboard__stage-wrap { position: relative; width: 100%; max-width: 1278px; }
.modal-dashboard__stage {
    width: 100%; aspect-ratio: 16 / 9; overflow: hidden;
    border: none; border-radius: 8px;
    background: transparent;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.24);
}
.modal--dashboard .modal-dashboard__stage img {
    width: 100%; height: 100%;
    object-fit: cover; object-position: center;
}
.modal-dashboard__thumbs {
    display: flex; flex-wrap: wrap;
    justify-content: center; align-items: flex-start; gap: 16px;
    padding: 16px 32px;
}
.modal-dashboard__thumb {
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
    flex: 1 1 0; min-width: 0; gap: 7.026px;
    padding: 0; background: transparent;
    opacity: 0.4;
    transition: opacity 0.25s ease, transform 0.25s ease;
}
.modal-dashboard__thumb::after {
    content: ''; position: absolute; top: 0; left: 0; width: 100%;
    height: 81.94px; border-radius: 8px;
    border: 1px solid transparent; pointer-events: none;
    box-sizing: border-box;
}
.modal-dashboard__thumb img {
    width: 100%; height: 81.94px; object-fit: cover; object-position: center;
    border-radius: 8px; display: block;
}
.modal-dashboard__thumb span {
    font-family: 'PingFang SC', var(--font-cn); font-size: 14px; line-height: 35px; color: #FFFFFF;
    text-align: center;
}
.modal-dashboard__thumb:hover { opacity: 0.8; transform: translateY(-2px); }
.modal-dashboard__thumb.is-active { opacity: 1; }
.modal-dashboard__thumb.is-active::after {
    border: 1.5px solid transparent;
    border-radius: 8px;
    background: linear-gradient(135deg, #38D9FD, #FFF583) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
}
.modal-detail__aside {
    position: relative; align-self: stretch; min-width: 0; min-height: 0;
    display: flex; flex-direction: column; justify-content: flex-start;
    padding: 24px 0;
    background: #222329;
    border-left: 1px solid #303030;
    border-radius: 0 24px 0 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;
}
.modal-detail__aside::-webkit-scrollbar { width: 6px; }
.modal-detail__aside::-webkit-scrollbar-track { background: transparent; }
.modal-detail__aside::-webkit-scrollbar-thumb { background: transparent; border-radius: 3px; }
.modal-detail__aside:hover::-webkit-scrollbar-thumb { background: rgba(191,191,191,0.3); }
.modal-detail__aside:hover::-webkit-scrollbar-thumb:hover { background: rgba(191,191,191,0.5); }
.modal-detail__aside-content { padding: 0 48px 0; display: flex; flex-direction: column; gap: 24px; }
.modal-detail__aside-title {
    color: #FFFFFF; font-family: 'Inter', var(--font-en);
    font-size: 20px; font-weight: 700; line-height: 26px;
    margin: 0;
}
.modal-detail__aside-sections { display: flex; flex-direction: column; gap: 32px; }
.modal-detail__aside-section { display: flex; flex-direction: column; gap: 8px; }
.modal-detail__aside-section-title {
    color: #FFFFFF; font-family: 'PingFang SC', var(--font-cn);
    font-size: 16px; font-weight: 600; line-height: 24px;
    margin: 0;
}
.modal-detail__aside-desc {
    color: rgba(255,255,255,0.6); font-family: 'PingFang SC', var(--font-cn);
    font-size: 14px; font-weight: 400; line-height: 28px;
    margin: 0; white-space: pre-wrap;
}
.modal-detail__aside-copy {
    color: rgba(255,255,255,0.6); font-family: 'PingFang SC', var(--font-cn);
    font-size: 14px; line-height: 28px;
}
.modal-detail__meta {
    display: flex; flex-direction: column; gap: 16px; margin: 42px 0 0;
    padding-top: 24px; border-top: 1px dashed rgba(191,191,191,0.18);
}
.modal-detail__meta div { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 12px; }
.modal-detail__meta dt { color: var(--text-50); font-size: 12px; line-height: 20px; }
.modal-detail__meta dd { min-width: 0; color: var(--text); font-size: 12px; line-height: 20px; overflow-wrap: anywhere; }
.modal-gallery__heading { margin-bottom: 0; }
.modal-gallery__tabs {
    display: flex; gap: 24px; overflow-x: auto; margin-bottom: 0;
    scrollbar-width: none;
}
.modal-gallery__tabs::-webkit-scrollbar { display: none; }
.modal-gallery__tab-group {
    display: flex; align-items: center; gap: 4px;
    border: 1px solid #53545C; border-radius: 100px; overflow: hidden;
    height: 32px;
}
.modal-gallery__tab {
    flex: 0 0 auto; height: 32px; padding: 10px 16px;
    border: none; border-radius: 0;
    background: transparent;
    color: rgba(255,255,255,0.4); font-family: 'PingFang SC', var(--font-cn);
    font-size: 14px; font-weight: 400; line-height: 22px;
    display: flex; align-items: center; justify-content: center;
    transition: color 0.25s ease, background 0.25s ease, font-weight 0.25s ease;
}
.modal-gallery__tab:hover { color: rgba(255,255,255,0.7); }
.modal-gallery__tab.is-active {
    background: linear-gradient(76deg, rgba(56,217,253,1) 4%, rgba(255,245,131,1) 92%);
    color: #222329; font-weight: 600; border-radius: 100px;
}
.modal-gallery__list { display: flex; flex-direction: column; gap: 32px; padding: 24px 48px 24px; }
/* A盾牌、城市盾牌：竖向整页图，无侧栏 */
.modal[data-project="adunpai"] .modal-gallery__list,
.modal[data-project="cityshield"] .modal-gallery__list {
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
    padding-top: 0;
    gap: 4px;
}
.modal[data-project="adunpai"] .modal-gallery__item img {
    max-width: 1500px;
}
.modal[data-project="adunpai"] .modal-gallery__list .modal-gallery__item,
.modal[data-project="cityshield"] .modal-gallery__list .modal-gallery__item {
    margin: 0 0 4px;
}
.modal[data-project="adunpai"] .modal-gallery__list .modal-gallery__item:last-child,
.modal[data-project="cityshield"] .modal-gallery__list .modal-gallery__item:last-child {
    margin-bottom: 0;
}
.modal[data-project="cityshield"] .modal-gallery__list { align-items: center; }
.modal[data-project="cityshield"] .modal-gallery__item { width: min(100%, 420px); }
.modal-gallery__group { display: flex; flex-direction: column; align-items: stretch; gap: 10px; }
.modal-gallery__item {
    overflow: hidden; margin: 0; border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px; background: #101216;
    box-shadow: none;
}
.modal-gallery__item--rounded-16 { border-radius: 16px; }
.modal-gallery__item img { width: 100%; max-width: 100%; height: auto; }
/* 全数据防线弹框：严格按 Figma 341:54538 */
.defense-group { display: flex; flex-direction: column; gap: 16px; }
.modal-gallery__list:has(.defense-group) { gap: 32px; }
.defense-head { display: flex; flex-direction: column; gap: 8px; }
.defense-row { display: flex; align-items: stretch; gap: 7px; flex-wrap: wrap; }
.defense-row--wrap { flex-wrap: wrap; }
.defense-row .modal-gallery__item { flex: 1 1 50%; min-width: 0; max-width: calc(50% - 3.5px); overflow: hidden; border-radius: 8px; box-shadow: 0 5.6px 16.8px rgba(0,0,0,0.6); cursor: zoom-in; }
.defense-row.defense-row--full .modal-gallery__item { flex: 1 1 100%; max-width: 100%; }
.defense-row--wrap .modal-gallery__item { flex: 1 1 50%; max-width: calc(50% - 3.5px); }
.defense-row .modal-gallery__item.is-expanded,
.defense-row--wrap .modal-gallery__item.is-expanded { flex: 1 1 100%; max-width: 100%; cursor: zoom-out; }
.defense-row .modal-gallery__item.is-expanded:hover,
.defense-row--wrap .modal-gallery__item.is-expanded:hover { box-shadow: 0 10px 28px rgba(0,0,0,0.55); }
.defense-row .modal-gallery__item.is-expanded img,
.defense-row--wrap .modal-gallery__item.is-expanded img { aspect-ratio: auto; object-fit: contain; }
.defense-row .modal-gallery__item img { width: 100%; height: auto; object-fit: contain; display: block; }
.defense-row--wrap .modal-gallery__item img { aspect-ratio: 536 / 301.5; object-fit: cover; }
/* 用户端tab：完整显示不裁剪，圆角8（深浅调共用 src 含 SM-用户端） */
.modal-gallery__item img[src*="SM-用户端"] {
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
}
@media (max-width: 768px) {
    .modal-gallery__item img[src*="SM-用户端"] {
        height: auto;
        max-height: 70vh;
        object-fit: contain;
    }
}
.modal-gallery__item-title { font-family: 'Inter', 'PingFang SC', sans-serif; font-size: 16px; font-weight: 700; line-height: 24px; color: #FFFFFF; margin-bottom: -6px; }
.modal-gallery__item-title--large { font-size: 16px; line-height: 24px; }
.modal-gallery__item-title--inter { font-family: 'Inter', sans-serif; font-weight: 700; font-size: 16px; line-height: 24px; }
.modal-gallery__item-desc { font-family: 'PingFang SC', var(--font-cn); font-size: 14px; font-weight: 400; line-height: 28px; color: rgba(255,255,255,0.6); white-space: pre-wrap; }
.modal-gallery__item-desc--full { color: rgba(255,255,255,1); }
.modal-gallery__image-label { font-family: 'PingFang SC', var(--font-cn); font-size: 14px; font-weight: 400; line-height: 22px; color: #FFFFFF; }
.modal-gallery__sub-group { display: flex; flex-direction: column; align-items: stretch; gap: 16px; }
.modal-gallery__sub-group--grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.modal-gallery__image-group { display: flex; flex-direction: column; gap: 7px; }

/* 深调模式：图片边缘加浅色分割线，增强与背景分离 */
.modal-gallery__list[data-tone="深调"] .modal-gallery__item {
    border: 1px solid rgba(191,191,191,0.22);
}

.modal--dashboard .modal-detail__aside,
.modal--gallery .modal-detail__aside {
    position: relative;
    align-self: stretch;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;
}
.modal--gallery .modal-detail__aside::-webkit-scrollbar { width: 6px; }
.modal--gallery .modal-detail__aside::-webkit-scrollbar-track { background: transparent; }
.modal--gallery .modal-detail__aside::-webkit-scrollbar-thumb { background: transparent; border-radius: 3px; }
.modal--gallery .modal-detail__aside:hover::-webkit-scrollbar-thumb { background: rgba(191,191,191,0.3); }
.modal--gallery .modal-detail__aside:hover::-webkit-scrollbar-thumb:hover { background: rgba(191,191,191,0.5); }

.modal-gallery__main-column { background: radial-gradient(circle at 15% 0%, rgba(56,217,253,0.06), transparent 34%); }
.modal-dashboard__main-column { background: radial-gradient(circle at 15% 0%, rgba(255,245,131,0.05), transparent 34%); }

/* Dashboard detail follows the Figma split frame: each column owns its scroll. */
.modal--dashboard .modal__body,
.modal--gallery .modal__body {
    overflow: hidden;
}
.modal--dashboard .modal-layout--dashboard,
.modal--gallery .modal-layout--gallery {
    height: 100%;
    min-height: 0;
    overflow: hidden;
    background: #222329;
}
.modal--dashboard .modal-layout--dashboard {
    grid-template-rows: minmax(0, 1fr);
}
.modal--gallery .modal-gallery__body {
    overflow: hidden;
    min-height: 0;
}
.modal--gallery .modal-gallery__main-column {
    position: relative;
    min-height: 0;
    padding: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;
    background: #222329;
}
.modal--gallery .modal-gallery__main-column::-webkit-scrollbar { width: 6px; }
.modal--gallery .modal-gallery__main-column::-webkit-scrollbar-track { background: transparent; }
.modal--gallery .modal-gallery__main-column::-webkit-scrollbar-thumb { background: transparent; border-radius: 3px; }
.modal--gallery .modal-gallery__main-column:hover::-webkit-scrollbar-thumb { background: rgba(191,191,191,0.3); }
.modal--gallery .modal-gallery__main-column:hover::-webkit-scrollbar-thumb:hover { background: rgba(191,191,191,0.5); }
.modal--gallery .modal-detail__aside {
    overflow-y: auto;
    overscroll-behavior: contain;
}
.back-to-top {
    position: sticky;
    bottom: 24px;
    display: flex; align-items: center; justify-content: center;
    width: 44px; height: 44px;
    margin: 0 24px 0 auto;
    border-radius: 50%;
    background: rgba(34,35,41,0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.1);
    color: #FFFFFF;
    cursor: pointer;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, background 0.3s ease;
    z-index: 5;
}
.back-to-top.is-visible {
    opacity: 1;
    transform: translateY(0);
}
.back-to-top:hover {
    background: linear-gradient(90deg, #38D9FD 0%, #FFF583 100%);
    border-color: transparent;
    color: #222329;
}
.modal--dashboard .modal-dashboard__main-column {
    min-height: 0; padding: 0; display: flex; flex-direction: column;
    overflow-y: auto; background: #222329; scrollbar-width: none;
}
.modal--dashboard .modal-dashboard__main-column::-webkit-scrollbar,
.modal--gallery .modal-gallery__main-column::-webkit-scrollbar { width: 6px; }
.modal--dashboard .modal-dashboard__main-column::-webkit-scrollbar-track,
.modal--gallery .modal-gallery__main-column::-webkit-scrollbar-track { background: transparent; }
.modal--dashboard .modal-dashboard__main-column::-webkit-scrollbar-thumb,
.modal--gallery .modal-gallery__main-column::-webkit-scrollbar-thumb { background: transparent; border-radius: 3px; }
.modal--dashboard .modal-dashboard__main-column:hover::-webkit-scrollbar-thumb,
.modal--gallery .modal-gallery__main-column:hover::-webkit-scrollbar-thumb { background: rgba(191,191,191,0.3); }
.modal--dashboard .modal-dashboard__main-column:hover::-webkit-scrollbar-thumb:hover,
.modal--gallery .modal-gallery__main-column:hover::-webkit-scrollbar-thumb:hover { background: rgba(191,191,191,0.5); }
.modal--dashboard .modal-dashboard__heading {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 0;
    padding: 20px 40px;
    border-bottom: 1px solid #303030;
}
#modalDashboard .modal-dashboard__heading::before,
.modal--dashboard .modal-dashboard__heading::before {
    content: '';
    position: static;
    top: auto; bottom: auto; left: auto;
    width: 2.4px; flex: 0 0 2.4px;
    height: 20px; border-radius: 2px;
    background: var(--brand-v);
}
.modal--dashboard .modal-dashboard__title {
    padding-left: 0;
    font-family: 'Inter', var(--font-en);
    font-size: 20px;
    font-weight: 700;
    line-height: 28px;
    background: var(--brand-h);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.modal--dashboard .modal-dashboard__content {
    flex: 0 0 auto;
    min-height: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 32px 40px;
    overflow: visible;
}
#modalDashboard .modal-dashboard__stage,
.modal--dashboard .modal-dashboard__stage {
    position: relative;
    flex: 0 0 auto;
    width: 100%;
    max-width: 1278px;
    height: auto;
    max-height: 80vh;
    aspect-ratio: 1018 / 572.63;
    margin: 0 auto;
    border: 0;
    border-radius: 8px;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.modal--dashboard .modal-dashboard__stage img {
    width: 100%; height: 100%;
    object-fit: cover; object-position: center;
    border-radius: 8px;
}
.modal-dashboard__stage-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    flex: 0 0 auto;
    overflow: visible;
}
.modal-dashboard__stage-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 100px;
    background: rgba(18,19,22,0.8);
    color: var(--text);
    cursor: pointer;
    transition: all 0.3s ease;
}
.modal-dashboard__stage-nav--prev { left: -20px; }
.modal-dashboard__stage-nav--next { right: -20px; }
.modal-dashboard__stage-nav:hover {
    background: var(--brand-h);
    color: var(--bg-base);
    border-color: transparent;
}
.modal-dashboard__stage-nav:disabled {
    opacity: 0.2;
    cursor: not-allowed;
}
.modal--dashboard .modal-dashboard__thumbs {
    flex: 0 0 auto;
    width: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 16px;
    min-width: 0;
    margin-top: 0;
    padding: 16px 0 32px;
    overflow-x: auto;
    scrollbar-width: none;
    overscroll-behavior: contain;
}
@container (max-width: 640px) {
    .modal--dashboard .modal-dashboard__thumb span { display: none; }
}
.modal--dashboard .modal-dashboard__thumbs::-webkit-scrollbar { display: none; }
.modal--dashboard .modal-dashboard__thumb {
    display: flex;
    flex: 1 1 0;
    min-width: 80px;
    max-width: 160px;
    flex-direction: column;
    align-items: center;
    aspect-ratio: auto;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    opacity: 0.4;
    transform: none;
}
.modal--dashboard .modal-dashboard__thumb::after { display: none; }
.modal--dashboard .modal-dashboard__thumb:hover {
    opacity: 0.72;
    transform: none;
}
.modal--dashboard .modal-dashboard__thumb.is-active { opacity: 1; }
.modal--dashboard .modal-dashboard__thumb img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    max-width: none;
    border: 1px solid transparent;
    border-radius: 8px;
    object-fit: cover;
    object-position: center;
}
.modal--dashboard .modal-dashboard__thumb.is-active img { border-color: #38D9FD; }
.modal--dashboard .modal-dashboard__thumb span {
    display: block;
    width: 100%;
    height: 35px;
    overflow: hidden;
    color: #fff;
    font-family: 'PingFang SC', var(--font-cn);
    font-size: 14px;
    font-weight: 400;
    line-height: 35px;
    text-align: center;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.modal--dashboard .modal-dashboard__thumb:focus-visible img {
    outline: 2px solid #FFF583;
    outline-offset: 2px;
}
.modal--dashboard .modal-detail__aside {
    position: relative;
    align-self: stretch;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;
}
.modal--dashboard .modal-detail__aside::-webkit-scrollbar { width: 6px; }
.modal--dashboard .modal-detail__aside::-webkit-scrollbar-track { background: transparent; }
.modal--dashboard .modal-detail__aside::-webkit-scrollbar-thumb { background: transparent; border-radius: 3px; }
.modal--dashboard .modal-detail__aside:hover::-webkit-scrollbar-thumb { background: rgba(191,191,191,0.3); }
.modal--dashboard .modal-detail__aside:hover::-webkit-scrollbar-thumb:hover { background: rgba(191,191,191,0.5); }

/* ==================== 响应式：平板 ==================== */
@media (max-width: 1024px) {
    :root { --nav-h: 56px; }
    .nav__brand { display: none; }
    .nav__slider-wrap { display: none; }
    .nav__menu:not(.is-open) { display: none; }
    .nav__logo img { width: 160px; height: 20px; }
    .nav__menu {
        position: fixed; top: var(--nav-h); left: 0; right: 0;
        flex-direction: column; gap: 0;
        background: rgba(18,19,22,0.97); backdrop-filter: blur(20px);
        padding: 0 var(--side-pad);
        transform: translateY(-120%); transition: transform 0.3s ease;
        border-bottom: 1px solid var(--border-subtle);
        z-index: 99;
    }
    .nav__menu.is-open { transform: translateY(0); }
    .nav__menu li { width: 100%; border-bottom: 1px solid var(--border-subtle); }
    .nav__menu li:last-child { border-bottom: none; }
    .nav__item { padding: 0; width: 100%; text-align: left; font-size: 18px; height: 44px; line-height: 44px; }
    .nav__item.is-active { color: var(--brand-h); background: none; }
    .nav__toggle { display: flex; order: -1; margin-right: 16px; }

    .hero { min-height: auto; padding-top: calc(var(--nav-h) + 40px); padding-bottom: 60px; }
    .hero__inner { flex-direction: column; }
    .hero__content { width: 100%; }
    .hero__visual { position: static; transform: none; width: 100%; max-width: 100%; margin-top: 0; }

    .about { padding: 80px var(--side-pad) 60px; }
    .about__avatar { width: 120px; height: 126px; top: -180px; }
    .about__inner { flex-direction: column; gap: 60px; }
    .about__left { width: 100%; }

    .portfolio__head { flex-direction: column; align-items: flex-start; }
    .portfolio__grid { gap: 24px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .card { width: auto; }

    .thanks__inner { flex-direction: column; align-items: flex-start; }

    .modal { padding: 20px; }
    .modal__dialog { max-height: calc(100vh - 40px); }
    .modal__body { max-height: calc(100vh - 40px); }
    .modal-layout { min-height: auto; }
    .modal-layout--dashboard,
    .modal-layout--gallery { grid-template-columns: minmax(0, 1fr) 260px; }
    .modal-dashboard__main-column,
    .modal-gallery__main-column { padding: 42px 28px 32px; }
    .modal-detail__aside { padding: 88px 26px 32px; }
    .modal-detail__aside-copy { line-height: 30px; }
    .modal-dashboard__thumbs { gap: 8px; }
}


/* ==================== 响应式：移动端 ==================== */
@media (max-width: 768px) {
    :root { --side-pad: 24px; }

    .nav__slider-wrap { display: none; }
    .nav__brand { display: none; }
    .nav__menu:not(.is-open) { display: none; }
    .nav__inner { justify-content: flex-start; }

    .hero { position: relative; overflow: hidden; }
    .hero__inner { flex-direction: column; align-items: stretch; gap: 0; }
    .hero__visual {
        display: block;
        position: absolute;
        top: 0; left: 0; right: 0; bottom: 0;
        width: 100%;
        max-width: 100%;
        aspect-ratio: auto;
        transform: none;
        margin-top: 0;
        opacity: 0.35;
        z-index: 0;
        pointer-events: none;
    }
    .hero__visual .hero__img {
        width: 100%; height: 100%; object-fit: cover;
        position: absolute; top: 0; left: 0;
    }
    .hero__content { width: 100%; position: relative; z-index: 1; }

    .hero__title { font-size: 36px; }
    .hero__and { font-size: 26px; }
    .hero__tags { gap: 8px; }
    .tag { min-width: auto; padding: 8px 12px; font-size: 14px; }

    .about { padding: calc(60px + 50px) var(--side-pad) 40px; }
    .about__avatar { width: 100px; height: 105px; top: -130px; left: calc(var(--side-pad) - 10px); }
    .about__bio { font-size: 14px; line-height: 28px; }
    .about__contact-row { flex-direction: column; align-items: flex-start; gap: 16px; }
    .about__contact-sep { display: none; }
    .about__skill-group { flex-direction: column; gap: 8px; }
    .about__skill-list { gap: 16px; }
    .skill-icon { width: 56px; }
    .skill-icon img { width: 36px; height: 36px; }

    .section-head__cn { font-size: 24px; line-height: 1; }
    .section-head__en { font-size: 14px; }

    .portfolio { padding: 60px var(--side-pad); }
    .portfolio__filters { gap: 8px; }
    .filter { height: 36px; padding: 8px 12px; font-size: 14px; }
    .portfolio__grid { gap: 20px; grid-template-columns: minmax(0, 1fr); }
    .card { width: auto; padding: 12px; }
    .card__title { font-size: 18px; line-height: 26px; }

    .thanks { padding: 60px var(--side-pad); }
    .thanks__img { width: 200px; }
    .thanks__title { font-size: 28px; }
    .thanks__desc { font-size: 14px; line-height: 28px; }

    .modal { align-items: flex-start; padding: 0; }
    .modal__dialog { width: 100%; max-height: 100vh; height: 100vh; border-radius: 0; }
    .modal__body { max-height: 100vh; }
    .modal-layout--dashboard,
    .modal-layout--gallery { display: flex; flex-direction: column; }
    .modal-dashboard__main-column,
    .modal-gallery__main-column { padding: 0; }
    .modal-gallery__heading { padding: 16px 20px; gap: 16px; }
    .modal-gallery__title { font-size: 24px; line-height: 1; }
    .modal-gallery__content { padding-top: var(--gallery-header-h, 64px); height: calc(100% + var(--gallery-header-h, 64px)); }
    .modal-layout--gallery.is-header-hidden .modal-gallery__content { transform: translateY(calc(var(--gallery-header-h, 64px) * -1)); }
    .modal-gallery__list { padding: 0 20px 20px; gap: 24px; }
    .modal-gallery__tab { font-size: 14px; padding: 0 12px; }
    .modal-dashboard__heading { padding: 16px 20px; margin-bottom: 0; gap: 12px; }
    .modal-dashboard__title { font-size: 20px; line-height: 28px; }
    .modal-dashboard__en,
    .modal-gallery__en { font-size: 11px; line-height: 18px; overflow-wrap: anywhere; }
    .modal-dashboard__stage { border-radius: 10px; width: 100%; max-height: 65vh; }
    .modal-dashboard__stage-nav { width: 36px; height: 36px; }
    .modal-dashboard__stage-nav svg { width: 18px; height: 18px; }
    .modal-dashboard__stage-nav--prev { left: -18px; }
    .modal-dashboard__stage-nav--next { right: -18px; }
    .modal--dashboard .modal-dashboard__thumb span { display: none; }
    .modal--dashboard .modal-dashboard__thumb { min-width: 64px; }
    .modal-detail__aside { position: static; min-height: 0; padding: 30px 20px 32px; border-left: 0; background: #222329; }
    .modal-detail__aside-content { max-width: none; padding: 0; }
    .modal-detail__aside-kicker { margin-bottom: 14px; }
    .modal-detail__aside-title { margin-bottom: 12px; font-size: 22px; line-height: 30px; }
    .modal-detail__aside-copy { line-height: 28px; }
    .modal-detail__meta { margin-top: 28px; }
    .modal-gallery__tabs { margin-bottom: 20px; }
    .modal-gallery__list { gap: 16px; }
    .modal-gallery__item { border-radius: 8px; }

    .modal--dashboard .modal__body,
    .modal--gallery .modal__body { overflow-y: auto; }
    .modal--dashboard .modal-layout--dashboard,
    .modal--gallery .modal-layout--gallery { height: auto; min-height: 0; overflow: visible; }
    .modal--dashboard .modal-dashboard__main-column,
    .modal--gallery .modal-gallery__main-column { overflow: visible; background: #222329; }
    .modal--dashboard .modal-dashboard__content { padding: 32px 20px; }
    .modal--dashboard .modal-dashboard__thumbs { justify-content: flex-start; }
    .modal--dashboard .modal-detail__aside { position: static; overflow: visible; background: #222329; }

}

/* ==================== 响应式：大屏 ==================== */
@media (min-width: 1441px) {
    .hero__inner, .about__inner, .portfolio__head, .portfolio__grid, .thanks__inner {
        max-width: 1600px;
    }
}
