/* === 统一导航（更大字号 + 圆形按钮 + 右上汉堡） === */
:root {
    --nav-height: clamp(64px, 8vh, 92px);
    --nav-gap: clamp(16px, 1.4vw, 28px);
    /* 放大：移动端不小，4K 上最大 22px */
    --nav-fz: clamp(16px, 1.3vw, 22px);
}

/* 与页面内容等宽 */
.header.wrapper {
    max-width: clamp(1040px, 74vw, 1560px);
    margin: 0 auto;
    padding: 0 clamp(20px, 4vw, 96px);
}

/* 布局：品牌 | 占位 | 导航 | 主题 | 语言 | 汉堡 */
.header {
    display: grid;
    grid-template-columns: auto 1fr auto auto auto auto;
    align-items: center;
    gap: 16px;
    height: var(--nav-height);
}

/* 品牌 */
.brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #111;
    font-weight: 800;
    font-size: var(--nav-fz);
}

.brand .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: url("../img/nav/round.png") center/cover no-repeat;
}

/* 主导航 */
.nav {
    justify-self: end;
    display: flex;
    align-items: center;
    gap: var(--nav-gap);
    font-size: var(--nav-fz);
}

.nav a {
    color: #111;
    text-decoration: none;
    font-weight: 600;
}

.nav a[aria-current="page"] {
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* 圆形按钮：主题 & 语言（不进抽屉） */
.icon-btn {
    justify-self: end;
    align-self: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid #111;
    background: #fff;
    color: #111;
    font: 600 var(--nav-fz)/1 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform .12s ease, background-color .12s ease;
}

.icon-btn:hover {
    transform: translateY(-1px);
    background: #fafafa;
}

/* 汉堡：移动端右上角 */
.nav-burger {
    justify-self: end;
    align-self: center;
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid #111;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
}

.nav-burger span {
    display: block;
    width: 20px;
    height: 2px;
    background: #111;
    margin: 0 auto;
    transition: .18s;
}

.nav-burger span+span {
    margin-top: 4px;
}

/* 移动端抽屉（只含链接；语言/主题不进来） */
@media (max-width:768px) {
    .nav-burger {
        display: inline-flex;
    }

    .nav {
        position: fixed;
        left: 0;
        right: 0;
        top: var(--mob-nav-top, 64px);
        display: grid;
        gap: 12px;
        padding: 16px clamp(20px, 5vw, 28px) 20px;
        background: #fff;
        box-shadow: 0 10px 30px rgba(0, 0, 0, .12);
        z-index: 999;
        opacity: 0;
        transform: translateY(-8px);
        pointer-events: none;
        transition: opacity .18s ease, transform .18s ease;
    }

    .header.is-open .nav {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }

    .header.is-open .nav-burger span:nth-child(1) {
        transform: translateY(6px) rotate(45deg);
    }

    .header.is-open .nav-burger span:nth-child(2) {
        opacity: 0;
    }

    .header.is-open .nav-burger span:nth-child(3) {
        transform: translateY(-6px) rotate(-45deg);
    }
}

/* 打开抽屉时锁滚动 */
body.no-scroll {
    overflow: hidden;
}

/* ===== 轻量暗色 ===== */
html[data-theme="dark"] body {
    background: #0f0f10;
    color: #eee;
}

html[data-theme="dark"] .brand,
html[data-theme="dark"] .nav a,
html[data-theme="dark"] .icon-btn {
    color: #eee;
}

html[data-theme="dark"] .icon-btn,
html[data-theme="dark"] .nav-burger {
    border-color: #eee;
    background: transparent;
}

html[data-theme="dark"] .nav {
    background: #151518;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
}