/* 全局样式 */
:root {
    --transition-standard: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

/* 导航栏样式 */
#navbar {
    background-color: transparent;
}

#navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

#navbar.scrolled a {
    color: #333333;
}

/* 动画效果 */
.animate-fade-in-up {
    animation: fadeInUp 0.8s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 动画延迟类 */
.animation-delay-300 {
    animation-delay: 300ms;
}

.animation-delay-600 {
    animation-delay: 600ms;
}

.animation-delay-900 {
    animation-delay: 900ms;
}

/* 滚动动画元素 */
.scroll-animation {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.scroll-animation.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 项目模态框样式 */
.max-h-90vh {
    max-height: 90vh;
}

/* 项目悬停效果强化 */
#projects .grid > div {
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

#projects .grid > div:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* 技能条动画 */
#about .bg-secondary {
    width: 0;
    transition: width 1s ease-in-out;
}

#about .skill-visible .bg-secondary {
    animation: fillBar 1.5s forwards;
}

@keyframes fillBar {
    from { width: 0; }
    to { width: var(--percent); }
}

/* 联系表单动画 */
#contact-form input, #contact-form textarea {
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#contact-form input:focus, #contact-form textarea:focus {
    border-color: #4D7CFF;
    box-shadow: 0 0 0 3px rgba(77, 124, 255, 0.1);
}

/* 按钮悬停动画加强 */
button, a.inline-block {
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

button:hover, a.inline-block:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* 响应式调整 */
@media (max-width: 768px) {
    #hero h1 {
        font-size: 2.5rem;
    }
    
    #hero h2 {
        font-size: 1.2rem;
    }
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
} 