* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --primary: #4361ee;
    --secondary: #3f37c9;
    --accent: #4895ef;
    --light: #f8f9fa;
    --dark: #212529;
    --success: #4cc9f0;
    --warning: #f72585;
    --gray: #6c757d;
    --light-gray: #e9ecef;
}

body {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: var(--dark);
    line-height: 1.6;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

header {
    text-align: center;
    padding: 30px 20px;
    margin-bottom: 30px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    animation: fadeIn 1s ease-out;
}

header h1 {
    font-size: 2.8rem;
    margin-bottom: 10px;
    background: linear-gradient(to right, var(--primary), var(--warning));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

header p {
    font-size: 1.2rem;
    color: var(--gray);
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
}

.search-container {
    max-width: 600px;
    margin: 25px auto 0;
    position: relative;
}

.search-container input {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid var(--light-gray);
    border-radius: 50px;
    font-size: 1.1rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.search-container input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 5px 15px rgba(67, 97, 238, 0.2);
}

.search-container i {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
    font-size: 1.2rem;
}

.content {
    display: flex;
    gap: 30px;
    margin-bottom: 40px;
}

.sidebar {
    flex: 0 0 280px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    height: fit-content;
    animation: slideInLeft 0.8s ease-out;
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    z-index: 10;
}

.sidebar h2 {
    font-size: 1.5rem;
    color: var(--secondary);
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--light-gray);
}

.filter-group {
    margin-bottom: 25px;
}

.filter-group h3 {
    font-size: 1.2rem;
    color: var(--primary);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.filter-group h3 i {
    margin-right: 10px;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.filter-btn {
    padding: 12px 15px;
    background: var(--light);
    border: none;
    border-radius: 10px;
    text-align: left;
    font-size: 1rem;
    color: var(--dark);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.filter-btn:hover {
    background: var(--light-gray);
}

.filter-btn.active {
    background: var(--primary);
    color: white;
    font-weight: 600;
}

.filter-btn i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.main-content {
    flex: 1;
    animation: slideInRight 0.8s ease-out;
}

.year-header {
    background: rgba(255, 255, 255, 0.95);
    padding: 20px 25px;
    border-radius: 15px;
    margin-bottom: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.year-header:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.year-header h2 {
    font-size: 1.8rem;
    color: var(--secondary);
    margin: 0;
}

.year-header .year-icon {
    width: 50px;
    height: 50px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
}

#projects-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.project-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease;
    cursor: pointer;
    min-height: 550px;
    max-height: 600px;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    position: relative;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.project-img {
    height: 0;
    padding-bottom: 60%;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.project-img img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.project-content {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.project-content h3 {
    font-size: 1.5rem;
    color: var(--secondary);
    margin-bottom: 15px;
    line-height: 1.4;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 15px 0 20px;
}

.tag {
    background: var(--light-gray);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--gray);
    font-weight: 500;
}

.tag.design {
    background: #e0f7fa;
    color: #00838f;
}

.tag.code {
    background: #e3f2fd;
    color: #1565c0;
}

.tag.team {
    background: #f3e5f5;
    color: #8e24aa;
}

.tag.research {
    background: #fff8e1;
    color: #ff8f00;
}

.project-desc {
    color: var(--gray);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 20px;
    flex: 1;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
}

.project-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--light-gray);
    padding-top: 20px;
    margin-top: auto;
}

.project-date {
    font-size: 0.9rem;
    color: var(--gray);
    font-weight: 500;
}

.view-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 1rem;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    position: relative;
    z-index: 2;
}

.view-btn:hover {
    background: var(--secondary);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(67, 97, 238, 0.3);
}

footer {
    text-align: center;
    padding: 25px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    color: var(--gray);
    font-size: 1rem;
    margin-top: 20px;
}

footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

footer a:hover {
    text-decoration: underline;
}

/* 新增的卡片点击覆盖层 */
.project-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

/* Responsive design */
@media (max-width: 1024px) {
    .content {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        margin-bottom: 30px;
        position: static;
        max-height: none;
    }
    
    #projects-container {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2.2rem;
    }
    
    header p {
        font-size: 1.1rem;
    }
    
    #projects-container {
        grid-template-columns: 1fr;
    }
    
    .year-header h2 {
        font-size: 1.5rem;
    }
    
    .year-header .year-icon {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .project-card {
        min-height: 500px;
        max-height: 550px;
    }
    
    .project-img {
        padding-bottom: 55%;
    }
}

@media (max-width: 480px) {
    body {
        padding: 15px;
    }
    
    header {
        padding: 20px 15px;
    }
    
    .search-container {
        margin-top: 15px;
    }
    
    .project-card {
        min-height: 450px;
        max-height: 500px;
    }
    
    .project-img {
        padding-bottom: 50%;
    }
    
    .project-content {
        padding: 20px;
    }
    
    .project-content h3 {
        font-size: 1.3rem;
    }
}