/* ===== 共享浅色主题导航栏样式 =====
 * 供 about.html / project.html / contact_weixin.html / contact_qq.html / contact_xhs.html / contact_dy.html 引用
 */
:root {
    /* [兼容] 流式根字号：与 index_style.css 保持一致 */
    font-size: clamp(14px, 0.6vw + 11px, 18px);
    --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box }
body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font);
    background: #f5f5f5;
    color: #222;
    /* [兼容] 安全区：iPhone 底部 home indicator 不遮挡内容 */
    padding-bottom: env(safe-area-inset-bottom, 0px);
}
.site-header {
    width: 100%;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    margin: 0;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 8px 30px rgba(2, 6, 23, 0.12);
}
.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
}
.brand {
    font-weight: 700;
    font-size: 1.05rem;
    color: #111;
    text-decoration: none;
}
.nav-links {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}
.nav-links .nav-item { position: relative; }
.nav-links a:not(.nav-link),
.nav-links .nav-item > a:not(.nav-link) {
    color: #111;
    text-decoration: none;
    padding: 0.35rem 0.5rem;
    border-radius: 6px;
    transition: color 150ms ease, background 150ms ease, transform 150ms ease;
    font-size: 0.96rem;
    display: inline-block;
}
.nav-link {
    position: relative;
    color: rgba(0, 0, 0, 0.75);
    text-decoration: none;
    padding: 8px 16px;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.96rem;
    display: inline-block;
    cursor: pointer;
}
.nav-link:hover {    color: #000000;    text-shadow: 0 0 8px rgba(79, 172, 254, 0.6)}
.nav-link::after {    content: '';    position: absolute;    width: 0;    height: 2px;    bottom: 0;    left: 50%;    transform: translateX(-50%);    background: linear-gradient(90deg, #4facfe 0%, #00f2fe 100%);    transition: width 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);    border-radius: 2px;    box-shadow: 0 0 5px rgba(79, 172, 254, 0.5)}
.nav-link:hover::after {    width: 80%}
.nav-link.active {    color: #061126;    background: rgba(0, 0, 0, 0.06);    border-radius: 20px;    backdrop-filter: blur(4px);    -webkit-backdrop-filter: blur(4px)}
.nav-link.active::after {    display: none}
.nav-links .dropdown-menu {
    position: absolute;
    top: calc(100% + 0.35rem);
    left: 0;
    min-width: 110px;
    margin: 0;
    padding: 0.35rem;
    list-style: none;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(2, 6, 23, 0.12);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
    pointer-events: none;
    z-index: 20;
}
.nav-links .nav-item:hover .dropdown-menu,
.nav-links .nav-item:focus-within .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}
.nav-links .dropdown-menu a {
    display: block;
    padding: 0.45rem 0.6rem;
    border-radius: 6px;
    white-space: nowrap;
    color: #000000;
}
.nav-links .dropdown-menu a:hover,
.nav-links .dropdown-menu a:focus {
    background: rgba(0, 0, 0, 0.06);
    color: #061126;
}
.page-content {
    min-height: calc(100vh - 64px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

/* [兼容] 触屏设备：关闭导航 hover 粘滞效果 */
@media (hover: none) and (pointer: coarse) {
    .nav-link:hover {
        text-shadow: none;
    }
    .nav-link:hover::after {
        width: 0;
    }
    .nav-links .nav-item:hover .dropdown-menu {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }
}

/* [兼容] 图片防溢出兜底 */
img {
    max-width: 100%;
    height: auto;
}