/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* 浅绿色清爽小清新主题配色方案 */
    --bg-primary: #ffffff;
    --bg-secondary: #f0f9f4;
    --bg-card: #ffffff;
    --accent-primary: #2d5f4d;
    --accent-green: #52c997;
    --accent-mint: #7ce3b5;
    --accent-light: #a8e6cf;
    --text-primary: #2d5f4d;
    --text-secondary: #5a7a6d;
    --text-light: #a8c5b9;
    --border-color: #d4ebe0;
    --shadow-sm: 0 2px 8px rgba(82, 201, 151, 0.08);
    --shadow-md: 0 4px 16px rgba(82, 201, 151, 0.12);
    --shadow-lg: 0 8px 28px rgba(82, 201, 151, 0.18);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.8;
    color: var(--text-primary);
    background: linear-gradient(135deg, #e8f5e9 0%, #f1f8f4 50%, #e0f2f1 100%);
    background-attachment: fixed;
    padding: 0;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Header Styles */
.header {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    color: var(--accent-primary);
    text-align: center;
    padding: 4rem 2rem 3.5rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(82, 201, 151, 0.15);
    border-bottom: 1px solid var(--accent-light);
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(124, 227, 181, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(82, 201, 151, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.profile-img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid #ffffff;
    margin-bottom: 1.5rem;
    box-shadow: 0 8px 24px rgba(82, 201, 151, 0.3);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
}

.profile-img:hover {
    transform: scale(1.08) translateY(-5px) rotate(2deg);
    box-shadow: 0 12px 32px rgba(82, 201, 151, 0.4);
    border-color: var(--accent-mint);
}

.header h1 {
    font-size: 2.8rem;
    margin-bottom: 0.8rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--accent-primary);
    position: relative;
    z-index: 1;
}

.header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: 400;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* Container & Grid */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.grid {
    display: grid;
    gap: 2.5rem;
    margin-top: -20px;
    position: relative;
    z-index: 10;
}

@media (min-width: 768px) {
    .grid {
        grid-template-columns: 380px 1fr;
    }
}

/* Card Styles */
.card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(168, 230, 207, 0.5);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-mint);
    background: rgba(255, 255, 255, 0.95);
}

/* Section Titles */
.section-title {
    position: relative;
    color: var(--accent-green);
    margin-bottom: 1.8rem;
    padding-bottom: 0.8rem;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--accent-mint);
    border-radius: 2px;
}

/* Info List */
.info-list {
    list-style: none;
}

.info-list li {
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    padding: 0.6rem 0;
    color: var(--text-primary);
}

.info-list li:hover {
    transform: translateX(5px);
}

.info-list i {
    color: var(--accent-green);
    width: 28px;
    margin-right: 14px;
    font-size: 1.15rem;
    flex-shrink: 0;
}

/* Skills Section */
.skills {
    display: flex;
    flex-direction: column;
    gap: 1.8rem;
}

.skill-category {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(168, 230, 207, 0.4);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.4s ease;
}

.skill-category:hover {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 6px 20px rgba(82, 201, 151, 0.15);
    transform: translateY(-8px);
}

.skill-heading {
    font-size: 1.05rem;
    color: var(--accent-primary);
    margin-bottom: 1.2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    letter-spacing: -0.2px;
}

.skill-heading i {
    margin-right: 10px;
    font-size: 1.15rem;
    color: var(--accent-green);
}

.skill-item {
    background: rgba(255, 255, 255, 0.9);
    border: 1.5px solid rgba(124, 227, 181, 0.4);
    border-radius: 20px;
    padding: 7px 16px;
    font-size: 0.88rem;
    color: var(--text-primary);
    display: inline-block;
    margin: 4px 6px 4px 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
}

.skill-item:hover {
    background: var(--accent-green);
    color: #ffffff;
    border-color: var(--accent-green);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 16px rgba(82, 201, 151, 0.35);
}

/* Projects */
.project {
    margin-bottom: 2.5rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(168, 230, 207, 0.5);
    border-radius: 14px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 3px 10px rgba(82, 201, 151, 0.08);
}

.project:hover {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 8px 28px rgba(82, 201, 151, 0.18);
    transform: translateY(-4px);
    border-color: var(--accent-mint);
}

.project-title {
    color: var(--accent-green);
    margin-bottom: 1rem;
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: -0.3px;
    position: relative;
    padding-left: 14px;
}

.project-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 20px;
    background: var(--accent-mint);
    border-radius: 2px;
}

.project-desc {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 0.95rem;
}

.project-link {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--accent-green);
    text-decoration: none;
    margin-right: 1.2rem;
    margin-bottom: 0.6rem;
    padding: 9px 20px;
    border: 2px solid var(--accent-green);
    border-radius: 25px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.9rem;
    font-weight: 600;
}

.project-link:hover {
    background: var(--accent-green);
    color: #ffffff;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(82, 201, 151, 0.35);
}

.project-link i {
    font-size: 0.95rem;
    transition: transform 0.3s ease;
}

.project-link:hover i {
    transform: translateX(4px);
}

/* Footer */
.footer {
    text-align: center;
    padding: 2.5rem 2rem;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--accent-light);
    color: var(--text-secondary);
    margin-top: 3rem;
    font-size: 0.9rem;
}

.footer a {
    color: var(--accent-green);
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 600;
}

.footer a:hover {
    color: var(--accent-mint);
}

.footer i {
    color: #e74c3c;
    margin: 0 4px;
}

/* Image Preview */
.review {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.92);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(8px);
}

.review img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 12px;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.6);
    transform: scale(0.95);
    animation: zoomIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes zoomIn {
    to { transform: scale(1); opacity: 1; }
}

/* Video Modal Premium Styling */
.video-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 20, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    padding: 20px;
}

.video-container {
    width: 100%;
    max-width: 960px;
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(82, 201, 151, 0.2);
}

.video-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    background: linear-gradient(to right, #ffffff, var(--bg-secondary));
    border-bottom: 1px solid var(--border-color);
}

.video-title {
    margin: 0;
    font-size: 1.15rem;
    color: var(--accent-primary);
    font-weight: 700;
}

.close-video {
    background: var(--bg-secondary);
    border: none;
    font-size: 28px;
    color: var(--text-secondary);
    cursor: pointer;
    line-height: 1;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.close-video:hover {
    background: var(--accent-green);
    color: white;
    transform: rotate(90deg);
}

.video-body {
    position: relative;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    background: #000;
}

.video-body video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    outline: none;
}

/* Scrollbar within video modal if needed */
.video-modal::-webkit-scrollbar {
    width: 6px;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: rgba(168, 230, 207, 0.15);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-mint);
    border-radius: 6px;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-green);
}

/* Mobile Responsive */
@media (max-width: 767px) {
    body {
        font-size: 14px;
    }
    
    .header {
        padding: 3rem 1.5rem 2.5rem;
    }
    
    .header h1 {
        font-size: 2.2rem;
    }
    
    .header p {
        font-size: 1rem;
    }
    
    .profile-img {
        width: 120px;
        height: 120px;
    }
    
    .container {
        padding: 2rem 1rem;
    }
    
    .grid {
        margin-top: -10px;
        gap: 1.5rem;
    }
    
    .card {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .section-title {
        font-size: 1.2rem;
    }
    
    .project {
        padding: 1.5rem;
    }
    
    .project-title {
        font-size: 1.1rem;
    }
    
    .skill-item {
        font-size: 0.85rem;
        padding: 5px 12px;
    }
    
    .project-link {
        font-size: 0.85rem;
        padding: 7px 14px;
        margin-right: 0.8rem;
    }

    /* Video Modal Mobile Adjustments */
    .video-container {
        border-radius: 12px;
        margin: 0 10px;
    }
    .video-header {
        padding: 12px 18px;
    }
    .video-title {
        font-size: 1rem;
    }
    .close-video {
        width: 32px;
        height: 32px;
        font-size: 22px;
    }
}

/* Loading Animation for Better UX */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeInUp 0.6s ease-out;
}

.card:nth-child(2) { animation-delay: 0.1s; }
.card:nth-child(3) { animation-delay: 0.2s; }
.card:nth-child(4) { animation-delay: 0.3s; }

/* Print Styles */
@media print {
    body {
        background: white;
    }
    
    .header {
        background: none;
        color: var(--text-primary);
        border-bottom: 2px solid #e8e8e8;
    }
    
    .card {
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .project-link {
        text-decoration: underline;
    }
}
