/* 自定义CSS样式 */

/* 全局样式增强 */
body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    scroll-behavior: smooth;
}

/* 导航栏样式增强 */
#navbar {
    backdrop-filter: blur(8px);
}

#navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
}

/* 标题动画效果 */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
}

/* 按钮悬停效果增强 */
button, a.btn {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

button::after, a.btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    z-index: -1;
}

button:hover::after, a.btn:hover::after {
    height: 100%;
}

/* 卡片阴影效果 */
.card-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* 项目卡片特效 */
.project-card {
    transition: all 0.4s ease;
}

.project-card:hover .project-image {
    transform: scale(1.05);
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-overlay {
    opacity: 0;
    transition: all 0.3s ease;
}

/* 技术栈进度条动画 */
.skill-progress {
    transition: width 1s ease-in-out;
}

/* 博客文章卡片效果 */
.blog-card {
    transition: all 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-8px);
}

.blog-card:hover .blog-title {
    color: #3b82f6;
}

/* 联系表单输入框焦点效果 */
.form-input:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

/* 社交媒体图标悬停效果 */
.social-icon {
    transition: all 0.3s ease;
}

.social-icon:hover {
    transform: translateY(-3px) scale(1.1);
}

/* 页面滚动指示器 */
.scroll-indicator {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background-color: #3b82f6;
    z-index: 100;
    width: 0%;
    transition: width 0.2s ease;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    .section-padding {
        padding-top: 5rem;
        padding-bottom: 5rem;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.fade-in {
    animation: fadeIn 0.8s ease forwards;
}

.slide-in-right {
    animation: slideInRight 0.8s ease forwards;
}

.slide-in-left {
    animation: slideInLeft 0.8s ease forwards;
}

.pulse {
    animation: pulse 2s infinite;
}

/* 加载动画 */
.loading-spinner {
    border: 3px solid rgba(59, 130, 246, 0.2);
    border-radius: 50%;
    border-top: 3px solid #3b82f6;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 图片效果 */
.img-hover-zoom {
    transition: transform 0.5s ease;
}

.img-hover-zoom:hover {
    transform: scale(1.03);
}

/* 卡片边框效果 */
.border-effect {
    position: relative;
    border: 2px solid transparent;
    background-clip: padding-box, border-box;
    background-origin: padding-box, border-box;
    background-image: linear-gradient(to right, #ffffff, #ffffff), 
                      linear-gradient(90deg, #3b82f6, #10b981);
}

/* 文本渐变效果 */
.text-gradient {
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    background-image: linear-gradient(90deg, #3b82f6, #10b981);
}

/* 页脚样式 */
footer a {
    transition: color 0.3s ease;
}

footer a:hover {
    color: #3b82f6 !important;
}