:root {
    --color-primary: #101F3D;
    --color-accent: #B87333;
    /* 响应式流式间距 */
    --space-xs: clamp(0.75rem, 1vw, 1rem);
    --space-sm: clamp(1rem, 2vw, 1.5rem);
    --space-md: clamp(1.5rem, 4vw, 3rem);
    --space-lg: clamp(3rem, 8vw, 6rem);
    --space-xl: clamp(4rem, 12vw, 9rem);
}
*,
*::before,
*::after {
    box-sizing: border-box;
}
html {
    /* 性能优化：更好的文字渲染 */
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    background-color: #F8F9FA;
    /* 响应式流式字体大小 */
    font-size: clamp(14px, 1vw + 10px, 18px);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

h1, h2, h3, .font-serif {
    font-family: 'Playfair Display', Georgia, serif;
}
body {
    min-width: 320px;
    overflow-x: hidden;
    background-color: #F8F9FA;
    color: var(--color-primary);
    line-height: 1.6;
    animation: pageFadeIn 0.8s ease-out;
}

/* 全局文本颜色优化：提升专业感，避免纯黑 */
p, li, label, .text-gray-600, .text-gray-500 {
    color: #101F3D;
}

/* 页脚社交图标优化：提升可见度 */
.footer-social-icon {
    background-color: rgba(255, 255, 255, 0.1) !important;
    color: white !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.footer-social-icon:hover {
    background-color: var(--color-accent) !important;
    border-color: var(--color-accent);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(184, 115, 51, 0.4);
}

@keyframes pageFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
body.bg-bglight,
.bg-bglight {
    background-color: #F8F9FA !important;
}

.text-primary {
    color: var(--color-primary) !important;
}
.text-accent {
    color: var(--color-accent) !important;
}

.bg-primary {
    background-color: var(--color-primary) !important;
}

.bg-accent {
    background-color: var(--color-accent) !important;
}
.border-accent {
    border-color: var(--color-accent) !important;
}

img,
svg,
video,
canvas,
iframe {
    display: block;
    max-width: 100%;
}
img {
    height: auto;
}

iframe {
    border: 0;
}

button,
input,
select,
textarea {
    font: inherit;
}
button,
a,
[role="button"] {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: all 0.3s ease;
}

:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 3px;
}
footer,
#contact-footer {
    background-color: var(--color-primary);
    border-top-color: var(--color-accent);
}

.content-vis {
    content-visibility: auto;
    contain-intrinsic-size: 1000px;
}
.scroll-reveal {
    will-change: transform, opacity;
    backface-visibility: hidden;
    transform: translate3d(0, 0, 0);
}

.text-gradient-animate {
    background: linear-gradient(135deg, #B87333 0%, #E6B980 50%, #8E5623 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: inline-block;
}

/* 统一渐变按钮样式 */
.btn-gradient {
    background: linear-gradient(to right, #8E5623, #B87333, #D49455) !important;
    color: white !important;
    transition: all 0.3s ease;
}

.btn-gradient:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(184, 115, 51, 0.3);
}

.timeline-line {
    background: linear-gradient(to bottom, transparent, var(--color-accent), transparent);
}

.fade-in-up {
    animation: fadeInUp 1s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.glass-nav {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 8px 24px rgba(16, 31, 61, 0.08);
}

#navbar.is-scrolled {
    box-shadow: 0 12px 30px rgba(16, 31, 61, 0.12);
}
#mobile-menu {
    max-height: calc(100vh - 4.5rem);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
}
body.nav-open {
    overflow: hidden;
}
.foo {
    display: block;
}
.lang-switch-btn {
    will-change: transform, box-shadow;
}
.lang-switch-btn[aria-busy="true"] {
    pointer-events: none;
    opacity: 0.85;
}
.image-size-note {
    position: absolute;
    left: 1rem;
    bottom: 1rem;
    z-index: 30;
    padding: 0.65rem 0.9rem;
    border-radius: 999px;
    max-width: min(92%, 28rem);
    font-size: 0.75rem;
    line-height: 1.25;
    color: #FFFFFF;
    background: rgba(16, 31, 61, 0.88);
    backdrop-filter: blur(10px);
}
.image-size-note strong {
    color: #F6C78B;
    font-weight: 700;
}
@media (max-width: 1024px) {
    .content-vis {
        content-visibility: visible;
        contain-intrinsic-size: auto;
    }
}
@media (max-width: 767px) {
    html {
        scroll-padding-top: 4.5rem;
    }

    .fade-in-up {
        animation-duration: 0.8s;
    }

    .image-size-note {
        left: 0.75rem;
        right: 0.75rem;
        bottom: 0.75rem;
        max-width: none;
    }
}
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .scroll-reveal {
        opacity: 1 !important;
        transform: none !important;
        will-change: auto;
    }

    .fade-in-up,
    .text-gradient-animate {
        animation: none;
    }
}

/* 导航栏项悬浮方框效果 */
.nav-link {
    position: relative;
    padding: 0.5rem 1rem;
    border-radius: 0.75rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--color-primary);
    font-weight: 700;
}

.nav-link:hover {
    background-color: rgba(16, 31, 61, 0.05);
    color: var(--color-accent);
}

/* 针对深色背景下的导航（如果有） */
.nav-link-light {
    color: white;
}

.nav-link-light:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--color-accent);
}

.line-clamp-4 {
    max-height: 6.8em;
    overflow: hidden;
}

/* Back to Top Button */
#back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3.5rem;
    height: 3.5rem;
    background: var(--color-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 4px 12px rgba(16, 31, 61, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

#back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
}

#back-to-top:hover {
    background: var(--color-accent);
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(184, 115, 51, 0.3);
}




