/* ==================== 项目展示页样式 ==================== */

/* 项目卡片样式 */
.project-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                border-color 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid #e9ecef;
    will-change: transform, box-shadow; /* 提升性能 */
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border-color: #3682e0;
}

.project-header {
    color: white;
    padding: 1.5rem;
    text-align: center;
}

.project-header.bg-blue {
    background: #3682e0;
}

.project-header.bg-orange {
    background: #ff9500;
}

.project-header.bg-green {
    background: #20c997;
}

.project-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.project-body {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-body p {
    color: #495057;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.project-body strong {
    color: #333;
}

.project-body ul {
    margin: 0.5rem 0 1rem 0;
    padding-left: 1.5rem;
    color: #6c757d;
    line-height: 1.6;
}

.project-body li {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.project-body li i {
    color: #3682e0;
    margin-top: 3px;
    flex-shrink: 0;
}

.project-actions {
    margin-top: auto;
    padding-top: 1.5rem;
    text-align: center;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.95rem;
    will-change: transform, opacity;
}

.btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn-blue {
    background: #3682e0;
}

.btn-orange {
    background: #ff9500;
}

.btn-green {
    background: #20c997;
}

/* 项目网格布局 - 优化响应式 */
.project-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
    gap: 2rem;
    margin-top: 1.5rem;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 350px), 1fr));
    gap: 2rem;
    margin-top: 1.5rem;
}

/* 技术栈详情 - 优化网格 */
.tech-stack-details {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.tech-stack-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
    height: 100%;
    border: 1px solid #e9ecef;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.tech-stack-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: #3682e0;
}

.tech-stack-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1.2rem;
    padding-bottom: 0.8rem;
    border-bottom: 2px solid #dee2e6;
}

.tech-stack-header i {
    color: #3682e0;
    font-size: 1.5rem;
}

.tech-stack-header h3 {
    margin: 0;
    color: #333;
    font-size: 1.3rem;
}

.tech-stack-content {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.tech-item {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.tech-label {
    font-weight: 600;
    color: #495057;
    font-size: 0.95rem;
}

.tech-value {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* 技能条样式 */
.skill-bar {
    margin-bottom: 1.5rem;
}

.skill-bar-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.skill-bar-label span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.skill-bar-label i {
    width: 16px;
    text-align: center;
}

.skill-bar-progress {
    height: 10px;
    background: #e9ecef;
    border-radius: 5px;
    overflow: hidden;
}

.skill-bar-fill {
    height: 100%;
    border-radius: 5px;
    transition: width 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
    will-change: width;
}

/* 技能进度条容器 */
.skills-progress {
    margin-top: 1.5rem;
}

/* 图标样式增强 */
.content-section h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #333;
    margin-bottom: 1rem;
    border-bottom: 3px solid #3682e0;
    padding-bottom: 0.5rem;
}

.content-section h2 i {
    color: #3682e0;
}

/* 状态标签样式 */
.status-tag {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    color: white;
    transition: transform 0.3s ease;
}

.status-tag i {
    margin-right: 5px;
}

.status-dev {
    background: #ff9500;
}

.status-planning {
    background: #20c997;
}

/* 性能优化类 */
.performance-optimize {
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* ==================== 优化响应式断点设计 ==================== */
/* 大屏幕 - 默认样式 */
@media (min-width: 1201px) {
    .project-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* 中等屏幕 */
@media (min-width: 769px) and (max-width: 1200px) {
    .project-container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .tech-stack-details {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 平板尺寸 */
@media (min-width: 577px) and (max-width: 768px) {
    .project-container {
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
        gap: 1.5rem;
    }
    
    .tech-stack-details {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }
    
    .project-header h3 {
        font-size: 1.25rem;
    }
    
    .project-body {
        padding: 1.25rem;
    }
}

/* 手机尺寸 */
@media (max-width: 576px) {
    /* 使用更简单的单列布局 */
    .project-container,
    .project-grid,
    .tech-stack-details {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }
    
    /* 减小内边距 */
    .project-header {
        padding: 1rem;
    }
    
    .project-body {
        padding: 1rem;
    }
    
    /* 调整字体大小 */
    .project-header h3 {
        font-size: 1.15rem;
        flex-wrap: wrap;
        justify-content: center;
        line-height: 1.4;
    }
    
    .content-section h2 {
        font-size: 1.35rem;
        padding-bottom: 0.4rem;
    }
    
    /* 简化列表样式 */
    .project-body ul {
        padding-left: 1rem;
    }
    
    .project-body li {
        margin-bottom: 0.4rem;
        font-size: 0.95rem;
    }
    
    /* 减小按钮大小 */
    .btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
    
    /* 技术栈卡片调整 */
    .tech-stack-card {
        padding: 1rem;
    }
    
    .tech-stack-header {
        padding-bottom: 0.6rem;
        margin-bottom: 1rem;
    }
    
    .tech-stack-header h3 {
        font-size: 1.15rem;
    }
    
    /* 技能条调整 */
    .skill-bar {
        margin-bottom: 1.25rem;
    }
    
    .skill-bar-label {
        font-size: 0.9rem;
    }
    
    /* 移除部分动画效果以提升性能 */
    .project-card:hover,
    .tech-stack-card:hover,
    .btn:hover {
        transform: none;
    }
}

/* 小手机尺寸 */
@media (max-width: 360px) {
    .project-header {
        padding: 0.75rem;
    }
    
    .project-body {
        padding: 0.75rem;
    }
    
    .project-header h3 {
        font-size: 1.1rem;
        gap: 5px;
    }
    
    .content-section h2 {
        font-size: 1.25rem;
        gap: 8px;
    }
    
    .project-body p {
        font-size: 0.9rem;
        line-height: 1.5;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
    
    .tech-stack-card {
        padding: 0.75rem;
    }
}

/* 性能优化：减少重绘重排 */
@media (prefers-reduced-motion: reduce) {
    .project-card,
    .tech-stack-card,
    .btn,
    .skill-bar-fill {
        transition: none !important;
    }
    
    .project-card:hover,
    .tech-stack-card:hover,
    .btn:hover {
        transform: none !important;
    }
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
    .project-card {
        border: 2px solid #000;
    }
    
    .tech-stack-card {
        border: 2px solid #000;
    }
    
    .project-header {
        border-bottom: 2px solid #000;
    }
}

/* 时间线样式 */
.timeline {
  position: relative;
  padding-left: 2rem;
  margin-top: 1.5rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 10px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #e9ecef;
}

.timeline-item {
  position: relative;
  margin-bottom: 2rem;
  padding-left: 1.5rem;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -6px;
  top: 5px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #3682e0;
  border: 3px solid white;
  box-shadow: 0 0 0 3px #3682e0;
}

.timeline-date {
  font-weight: 600;
  color: #3682e0;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.timeline-content {
  background: #f8f9fa;
  padding: 1rem;
  border-radius: 8px;
  border-left: 3px solid #3682e0;
}

.timeline-content h4 {
  margin: 0 0 0.5rem 0;
  color: #333;
  font-size: 1.1rem;
}

.timeline-content p {
  margin: 0;
  color: #666;
  font-size: 0.9rem;
  line-height: 1.5;
}


/* 移动端菜单按钮 */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
}

/* 段落描述 */
.section-description {
  color: #666;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .mobile-menu-btn {
    display: block;
  }
  
  .nav-links {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: rgba(54, 130, 224, 0.95);
    flex-direction: column;
    padding: 1rem;
    border-radius: 0 0 12px 12px;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
  }
  
  .nav-links.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  
  .nav-links li {
    width: 100%;
    text-align: center;
  }
  
  .nav-links a {
    display: block;
    padding: 0.8rem;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .timeline {
    padding-left: 1.5rem;
  }
}

@media (max-width: 480px) {
  .timeline {
    padding-left: 1rem;
  }
  
  .timeline-item {
    padding-left: 1rem;
  }
  
  .timeline-content {
    padding: 0.75rem;
  }
}