/* 全局字体与平滑滚动设置 */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500&display=swap');

:root {
    --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
    --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
    font-family: 'Helvetica Neue', Arial, 'Noto Sans SC', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background-color: #ffffff; /* 纯白背景 */
    color: #1a1a1a; /* 炭黑文字 */
    overflow-x: hidden;
}

/* 导航栏下划线动画 */
.nav-item {
    position: relative;
    display: inline-block;
}

.nav-item::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: -2px;
    left: 0;
    background-color: currentColor;
    transition: width 0.4s var(--ease-out-expo);
}

.nav-item:hover::after,
.nav-item.active::after {
    width: 100%;
}

/* 渐入上浮动画 */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s var(--ease-out-expo), transform 1s var(--ease-out-expo);
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 图片模糊到清晰加载效果 */
.img-reveal {
    opacity: 0;
    filter: blur(15px);
    transition: opacity 1.2s ease, filter 1.2s ease;
    transform: scale(1.02); /* 微缩放防止边缘白边 */
}

.img-reveal.visible {
    opacity: 1;
    filter: blur(0);
    transform: scale(1);
}

/* 图片悬停微动效果 */
.hover-scale {
    overflow: hidden;
    display: block;
}

.hover-scale img {
    transition: transform 0.8s var(--ease-out-expo), filter 0.5s ease;
}

.hover-scale:hover img {
    transform: scale(1.05);
    filter: brightness(0.95);
}

/* 极简按钮悬停 */
.btn-minimal {
    position: relative;
    padding-bottom: 2px;
    transition: color 0.3s ease;
}

.btn-minimal::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: #d1d5db; /* tailwind gray-300 */
    transform: scaleX(1);
    transform-origin: right;
    transition: transform 0.4s var(--ease-in-out);
}

.btn-minimal:hover::before {
    transform: scaleX(0);
    transform-origin: left;
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 4px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #d4d4d4;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #a3a3a3;
}