/* 全局基础重置与拟态基础变量 */
:root {
    --bg-primary: #f0f3f8;
    --card-bg: #f0f3f8;
    --text-primary: #334155;
    --text-muted: #64748b;
    --accent: #ec4899;
    --accent-light: #fbcfe8;
    --shadow-light: #ffffff;
    --shadow-dark: #d1d9e6;
    --card-shadow: 8px 8px 16px var(--shadow-dark), -8px -8px 16px var(--shadow-light);
    --card-shadow-inset: inset 4px 4px 8px var(--shadow-dark), inset -4px -4px 8px var(--shadow-light);
    --border-radius-lg: 24px;
    --border-radius-md: 16px;
    --border-radius-sm: 10px;
}

/* 深色拟态主题 */
body.theme-dark, [data-theme="dark"] {
    --bg-primary: #121824;
    --card-bg: #182030;
    --text-primary: #e2e8f0;
    --text-muted: #94a3b8;
    --accent: #f43f5e;
    --accent-light: rgba(244, 63, 94, 0.2);
    --shadow-light: #1f2a3f;
    --shadow-dark: #0a0e17;
    --card-shadow: 6px 6px 14px var(--shadow-dark), -6px -6px 14px var(--shadow-light);
    --card-shadow-inset: inset 3px 3px 6px var(--shadow-dark), inset -3px -3px 6px var(--shadow-light);
}

/* 渐变拟态主题 */
body.theme-gradient, [data-theme="gradient"] {
    --bg-primary: #fdf2f8;
    --card-bg: #ffffff;
    --text-primary: #374151;
    --text-muted: #6b7280;
    --accent: #d946ef;
    --accent-light: #fae8ff;
    --shadow-light: #ffffff;
    --shadow-dark: #f0d5e8;
    --card-shadow: 0 10px 25px -5px rgba(217, 70, 239, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.03);
    --card-shadow-inset: inset 2px 2px 4px rgba(217, 70, 239, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Noto Sans SC', sans-serif;
    line-height: 1.7;
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.main-content-wrap {
    padding-top: 100px;
    padding-bottom: 80px;
}

/* 顶部导航栏 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 72px;
    background: var(--bg-primary);
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.navbar > .container {
    width: 100%;
    flex: 1 1 auto;
}

.navbar-content {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    font-weight: 700;
    font-size: 19px;
    font-family: 'Noto Serif SC', serif;
}

.brand-badge {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--card-bg);
    box-shadow: var(--card-shadow);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
}

.nav-menu {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 24px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 15px;
    transition: color 0.2s;
    position: relative;
    padding: 6px 2px;
}

.nav-link:hover {
    color: var(--accent);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* 语言切换器 */
.language-switcher {
    position: relative;
}

.language-main-btn {
    background: var(--card-bg);
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    box-shadow: var(--card-shadow);
    color: var(--text-primary);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.2s;
}

.language-main-btn:active {
    box-shadow: var(--card-shadow-inset);
}

.language-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: var(--card-bg);
    box-shadow: var(--card-shadow);
    border-radius: var(--border-radius-md);
    padding: 8px;
    display: none;
    flex-direction: column;
    min-width: 160px;
    z-index: 1001;
}

.language-dropdown.show {
    display: flex;
}

.language-dropdown-btn {
    background: none;
    border: none;
    text-align: left;
    padding: 9px 12px;
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    cursor: pointer;
    font-size: 13.5px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
}

.language-dropdown-btn:hover {
    background: rgba(0, 0, 0, 0.04);
    color: var(--accent);
}

.language-dropdown-btn.active {
    font-weight: 700;
    color: var(--accent);
}

.nav-toggle {
    display: none;
    background: var(--card-bg);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-shadow: var(--card-shadow);
    color: var(--text-primary);
    cursor: pointer;
    font-size: 16px;
}

/* 拟态卡片与个人名片 */
.personal-card, .content-box {
    background: var(--card-bg);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--card-shadow);
    padding: 44px 36px;
    margin-bottom: 40px;
    transition: all 0.3s ease;
}

.card-info {
    text-align: center;
    margin-bottom: 28px;
}

.card-name {
    font-family: 'Noto Serif SC', serif;
    font-size: 38px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--text-primary);
}

.card-subtitle {
    font-size: 16px;
    color: var(--text-muted);
    margin-top: 6px;
}

.typing-container {
    margin-top: 14px;
    min-height: 32px;
}

.typing-text {
    font-size: 16px;
    font-style: italic;
    color: var(--accent);
    letter-spacing: 0.5px;
    font-family: 'Noto Serif SC', serif;
}

.typing-text::after {
    content: '|';
    animation: blink 0.8s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* 头像 */
.card-avatar-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 36px;
}

.card-avatar {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    padding: 8px;
    background: var(--card-bg);
    box-shadow: var(--card-shadow);
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-badge {
    margin-top: 14px;
    font-size: 12.5px;
    padding: 5px 14px;
    background: var(--accent-light);
    color: var(--accent);
    border-radius: 20px;
    font-weight: 600;
}

/* 个人信息网格 */
.basic-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 36px;
}

.basic-info-item {
    background: var(--card-bg);
    box-shadow: var(--card-shadow-inset);
    border-radius: var(--border-radius-md);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.basic-info-item.span-full {
    grid-column: span 2;
}

.info-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--card-bg);
    box-shadow: var(--card-shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 17px;
    flex-shrink: 0;
}

.info-meta {
    display: flex;
    flex-direction: column;
}

.info-label {
    font-size: 11.5px;
    color: var(--text-muted);
}

.info-val {
    font-size: 14.5px;
    font-weight: 600;
    color: var(--text-primary);
}

/* 个人故事 */
.life-story-section {
    margin-top: 36px;
    padding-top: 28px;
    border-top: 1px dashed rgba(100, 116, 139, 0.2);
}

.section-title-sub {
    font-size: 19px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Noto Serif SC', serif;
}

.section-title-sub i {
    color: var(--accent);
}

.past-experience {
    background: var(--card-bg);
    box-shadow: var(--card-shadow-inset);
    padding: 24px;
    border-radius: var(--border-radius-md);
}

.past-text {
    font-size: 15px;
    line-height: 1.85;
    color: var(--text-primary);
    text-align: justify;
}

/* 相册 */
.life-photos {
    margin-top: 40px;
}

.photos-title {
    font-size: 19px;
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Noto Serif SC', serif;
}

.photos-title i {
    color: var(--accent);
}

.photos-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.photo-item {
    position: relative;
    border-radius: var(--border-radius-md);
    overflow: hidden;
    aspect-ratio: 1;
    cursor: pointer;
    box-shadow: var(--card-shadow);
    background: var(--card-bg);
    padding: 5px;
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: calc(var(--border-radius-md) - 5px);
    transition: transform 0.4s ease;
}

.photo-overlay {
    position: absolute;
    inset: 5px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: calc(var(--border-radius-md) - 5px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 10px;
    text-align: center;
}

.photo-overlay i {
    font-size: 24px;
    margin-bottom: 6px;
    color: #f43f5e;
}

.photo-overlay span {
    font-size: 12px;
}

.photo-item:hover img {
    transform: scale(1.06);
}

.photo-item:hover .photo-overlay {
    opacity: 1;
}

/* 详细介绍 & 爱好 */
.info-section {
    margin-bottom: 32px;
}

.info-section:last-child {
    margin-bottom: 0;
}

.section-subtitle {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Noto Serif SC', serif;
}

.hobbies-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.hobby-item {
    background: var(--card-bg);
    box-shadow: var(--card-shadow-inset);
    border-radius: var(--border-radius-md);
    padding: 24px 20px;
    text-align: center;
    transition: transform 0.2s;
}

.hobby-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--card-bg);
    box-shadow: var(--card-shadow);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--accent);
    margin-bottom: 14px;
}

.hobby-item h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.hobby-item p {
    font-size: 13.5px;
    color: var(--text-muted);
    line-height: 1.6;
}

/* 期待的你 */
.section-header-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 14px;
    border-radius: 20px;
    background: var(--accent-light);
    color: var(--accent);
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 8px;
}

.pill-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
}

.section-title {
    font-family: 'Noto Serif SC', serif;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 24px;
}

.expect-intro {
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 18px;
}

.expect-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.expect-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 15px;
    line-height: 1.6;
}

.expect-list li i {
    color: #10b981;
    font-size: 18px;
    margin-top: 3px;
    flex-shrink: 0;
}

/* 未来畅想 */
.future-card {
    position: relative;
    padding: 10px 20px;
}

.future-text {
    font-size: 16px;
    line-height: 1.9;
    font-style: italic;
    font-family: 'Noto Serif SC', serif;
    text-align: center;
    color: var(--text-primary);
}

.quote-icon-top, .quote-icon-bottom {
    color: var(--accent-light);
    font-size: 32px;
}
.quote-icon-top { text-align: left; }
.quote-icon-bottom { text-align: right; }

/* 联系我 */
.contact-card {
    text-align: center;
}

.contact-intro {
    font-size: 15px;
    margin-bottom: 28px;
}

.contact-box-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-bottom: 28px;
}

.contact-qr-wrapper {
    position: relative;
    padding: 12px;
    background: var(--card-bg);
    box-shadow: var(--card-shadow);
    border-radius: var(--border-radius-md);
    cursor: pointer;
}

.contact-qr-code {
    width: 180px;
    height: 180px;
    border-radius: var(--border-radius-sm);
    display: block;
}

.qr-scan-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 8px;
}

.shake-animation:hover {
    animation: shake 0.6s ease-in-out infinite alternate;
}

@keyframes shake {
    0% { transform: rotate(0deg); }
    25% { transform: rotate(-3deg); }
    75% { transform: rotate(3deg); }
    100% { transform: rotate(0deg); }
}

.contact-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 14px;
    border-radius: 20px;
    background: #25d366;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
}

.contact-number {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 1px;
}

.copy-btn {
    background: var(--card-bg);
    border: none;
    padding: 8px 18px;
    border-radius: 20px;
    box-shadow: var(--card-shadow);
    color: var(--text-primary);
    cursor: pointer;
    font-size: 13px;
    margin-top: 10px;
    transition: transform 0.2s;
}

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

.tips {
    background: var(--card-bg);
    box-shadow: var(--card-shadow-inset);
    border-radius: var(--border-radius-md);
    padding: 14px 20px;
    font-size: 13px;
    color: var(--text-muted);
}

.tips i {
    color: var(--accent);
    margin-right: 6px;
}

/* 页脚 */
.footer {
    text-align: center;
    padding: 30px 0;
    font-size: 13px;
    color: var(--text-muted);
}

/* 桌面下这层不产生盒子，子元素继续固定在视口上 */
.page-dock,
.dock-tools {
    display: contents;
}

/* 主题浮动切换器 */
.theme-switcher {
    position: fixed;
    right: 24px;
    bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 999;
}

.theme-option {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: var(--card-bg);
    box-shadow: var(--card-shadow);
    color: var(--text-primary);
    cursor: pointer;
    font-size: 17px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.theme-option.active {
    color: var(--accent);
    box-shadow: var(--card-shadow-inset);
}

/* 返回顶部 */
.back-to-top {
    position: fixed;
    right: 24px;
    bottom: 180px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: var(--card-bg);
    box-shadow: var(--card-shadow);
    color: var(--text-primary);
    cursor: pointer;
    font-size: 16px;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999;
}

/* 灯箱 Lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
}

.lightbox-dialog {
    position: relative;
    max-width: 90vw;
    max-height: 85vh;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-dialog img {
    max-width: 100%;
    max-height: 75vh;
    border-radius: var(--border-radius-md);
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

.lightbox-caption {
    color: #fff;
    margin-top: 14px;
    font-size: 15px;
    text-align: center;
}

.lightbox-close {
    position: absolute;
    top: -46px;
    right: -10px;
    background: none;
    border: none;
    color: #fff;
    font-size: 38px;
    cursor: pointer;
}

/* 响应式适配 */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-primary);
        flex-direction: column;
        padding: 24px;
        box-shadow: 0 10px 20px rgba(0,0,0,0.06);
    }

    .nav-menu.show {
        display: flex;
    }

    .nav-toggle {
        display: block;
    }

    .basic-info-grid {
        grid-template-columns: 1fr;
    }
    .basic-info-item.span-full {
        grid-column: span 1;
    }

    .photos-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hobbies-grid {
        grid-template-columns: 1fr;
    }

    .personal-card, .content-box {
        padding: 28px 20px;
    }

    html, body {
        height: 100dvh;
        overflow: hidden;
    }

    body {
        display: flex;
        flex-direction: column;
    }

    .navbar {
        position: relative;
        flex: none;
        height: 56px;
    }

    .main-content-wrap {
        flex: 1 1 auto;
        min-height: 0;
        width: 100%;
        overflow-y: auto;
        padding-top: 16px;
        padding-bottom: 16px;
    }

    .page-dock {
        display: flex;
        flex-direction: column;
        gap: 8px;
        flex: none;
        padding: 8px 12px calc(12px + env(safe-area-inset-bottom));
        background: var(--bg-primary);
        border-top: 1px solid rgba(0, 0, 0, 0.06);
    }

    .dock-tools {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 8px;
    }

    .page-dock .back-to-top,
    .page-dock .floating-contact-btn-wrap {
        position: static;
        right: auto;
        bottom: auto;
        left: auto;
        transform: none;
    }

    /* 主题按钮贴在头像右侧，跟着名片滚动，不盖住下面的资料 */
    .theme-switcher {
        position: absolute;
        top: 8px;
        right: 0;
        bottom: auto;
        z-index: 2;
        gap: 8px;
    }

    .theme-option {
        width: 36px;
        height: 36px;
    }

    .page-dock .floating-contact-btn-wrap {
        width: 100%;
        max-width: none;
    }

    .floating-contact-btn {
        width: 100%;
        justify-content: center;
        box-sizing: border-box;
    }

    .floating-btn-text {
        white-space: normal;
        overflow: visible;
        text-overflow: unset;
        text-align: center;
    }

    .brand-text {
        max-width: 42vw;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .info-meta,
    .info-val,
    .past-text,
    .character-text,
    .card-subtitle {
        min-width: 0;
        overflow-wrap: anywhere;
    }
}

/* 底部悬浮联系按钮 */
.floating-contact-btn-wrap {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    max-width: 90vw;
}

.floating-contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    border-radius: 9999px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    box-shadow: 0 10px 25px -5px rgba(6, 199, 85, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: transform 0.2s, filter 0.2s;
    user-select: none;
}

.floating-contact-btn:hover {
    filter: brightness(1.1);
    transform: scale(1.03);
}

.floating-contact-btn:active {
    transform: scale(0.97);
}

.floating-btn-logo {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.floating-btn-logo img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: contain;
}

.line-svg-icon {
    width: 20px;
    height: 20px;
    fill: #06c755;
}

.floating-btn-arrow {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    flex-shrink: 0;
}

.btn-pulse {
    animation: btnPulse 2.5s infinite ease-in-out;
}

@keyframes btnPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.04); }
}
