/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --primary-color: #00b050;
    --text-color: #333;
    --light-gray: #e0e0e0;
    --bg-color: #f8f8f8;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

/* Header Styles */
header {
    padding: 2rem 0;
    position: relative;
}

.title {
    font-size: 1.7rem;
    color: #00b050;
    font-weight: 500;
    margin-bottom: 1rem;
    font-style: italic;
}

.dots-decoration {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: -1;
}

/* Profile Section */
.profile {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 4rem 0;
    gap: 3rem;
}

.profile-info {
    flex: 2;
}

.greeting {
    font-size: 2.5rem;
    color: #00b050;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.bio {
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
    color: #555;
}

.buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.wechat-btn, .email-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.wechat-btn {
    background-color: #00b050;
    color: white;
    border: none;
}

.email-btn {
    background-color: white;
    color: #00b050;
    border: 1px solid #00b050;
}

.location {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.location-icon {
    width: 1rem;
    height: 1rem;
}

.profile-image {
    flex: 1;
    position: relative;
    display: flex;
    justify-content: center;
}

.profile-image img {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    display: block;
    object-fit: cover;
}

.availability {
    position: absolute;
    top: 15px;
    right: -20px;
    font-size: 0.9rem;
    color: #00b050;
    background-color: white;
    padding: 8px 12px;
    border-radius: 15px;
    border: 2px solid #00b050;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
    line-height: 1.2;
    z-index: 10;
    white-space: nowrap;
}

.availability span {
    display: block;
}

.availability::after {
    content: "";
    position: absolute;
    left: -10px;
    top: 50%;
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-right: 10px solid #00b050;
    transform: translateY(-50%);
}

/* Skills Section */
.skills {
    display: flex;
    justify-content: space-between;
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
    padding: 3rem 0;
    margin-bottom: 3rem;
}

.skill-item {
    flex: 1;
    padding: 0 1rem;
    border-right: 1px solid #e0e0e0;
}

.skill-item:last-child {
    border-right: none;
}

.skill-item h3 {
    font-size: 1.5rem;
    color: #00b050;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.skill-item p {
    font-size: 0.9rem;
    color: #555;
}

/* Work Experience */
.work-experience {
    margin-bottom: 4rem;
}

.work-title {
    display: inline-block;
    font-size: 1.2rem;
    color: #00b050;
    padding: 0.5rem 1.5rem;
    border: 1px solid #00b050;
    border-radius: 2rem;
    margin-bottom: 2rem;
    font-weight: 400;
}

.company-logos {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2rem;
}

.logo-item {
    width: 120px;
    height: 120px;
    background-color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* 针对不同的logo设置不同的内边距，以保证视觉大小一致 */
.logo-item:nth-child(1) {
    padding: 22px;
}

.logo-item:nth-child(2) {
    padding: 22px;
}

.logo-item:nth-child(3) {
    padding: 20px;
}

.logo-item:nth-child(4) {
    padding: 8px; /* 进一步减小第四个logo的内边距，使其看起来更大 */
}

.logo-item:nth-child(5) {
    padding: 40px; /* 进一步增加第五个logo的内边距，使其看起来更小 */
}

.logo-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Footer */
footer {
    text-align: center;
    padding: 1.5rem 0;
    border-top: 1px solid #e0e0e0;
    font-size: 0.9rem;
    color: #777;
}

/* WeChat QR Code */
.wechat-qr-code {
    position: absolute;
    width: 140px;
    height: auto;
    background: white;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    display: none;
    z-index: 100;
    padding: 10px;
    text-align: center;
}

.wechat-qr-code img {
    width: 120px;
    height: 120px;
    object-fit: contain;
}

.qr-title {
    color: #00b050;
    font-size: 12px;
    margin-top: 5px;
    font-weight: 500;
}

/* 关闭按钮样式 */
.qr-close-btn {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 20px;
    height: 20px;
    background-color: #00b050;
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Responsive Design */
@media (max-width: 768px) {
    html {
        font-size: 14px;
    }
    
    .container {
        padding: 1rem;
    }
    
    .title {
        font-size: 1.5rem;
    }
    
    .profile {
        flex-direction: column-reverse;
        margin: 2rem 0;
        gap: 2rem;
    }
    
    .profile-image {
        position: relative;
    }
    
    .profile-image img {
        width: 200px;
        height: 200px;
    }
    
    .availability {
        top: -40px;
        right: 10px;
        font-size: 0.8rem;
        padding: 6px 10px;
    }
    
    .availability::after {
        left: 50%;
        top: auto;
        bottom: -10px;
        border-left: 8px solid transparent;
        border-right: 8px solid transparent;
        border-top: 10px solid #00b050;
        border-bottom: none;
        transform: translateX(-50%);
    }
    
    .greeting {
        font-size: 2rem;
    }
    
    .skills {
        flex-wrap: wrap;
        padding: 2rem 0;
    }
    
    .skill-item {
        flex: 1 0 50%;
        margin-bottom: 1.5rem;
        border-right: none;
        border-bottom: 1px solid var(--light-gray);
        padding-bottom: 1rem;
    }
    
    .company-logos {
        justify-content: center;
        gap: 1rem;
    }
    
    .logo-item {
        width: 100px;
        height: 100px;
    }
    
    .logo-item:nth-child(1) {
        padding: 18px;
    }
    
    .logo-item:nth-child(2) {
        padding: 18px;
    }
    
    .logo-item:nth-child(3) {
        padding: 16px;
    }
    
    .logo-item:nth-child(4) {
        padding: 6px; /* 平板设备上继续减小内边距 */
    }
    
    .logo-item:nth-child(5) {
        padding: 32px; /* 平板设备上调整内边距 */
    }
}

@media (max-width: 480px) {
    html {
        font-size: 12px;
    }
    
    .title {
        font-size: 1.3rem;
    }
    
    .skill-item {
        flex: 1 0 100%;
    }
    
    .buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .wechat-btn, .email-btn {
        width: 100%;
    }
    
    .profile-image img {
        width: 150px;
        height: 150px;
    }
    
    .logo-item {
        width: 80px;
        height: 80px;
    }
    
    .logo-item:nth-child(1) {
        padding: 14px;
    }
    
    .logo-item:nth-child(2) {
        padding: 14px;
    }
    
    .logo-item:nth-child(3) {
        padding: 12px;
    }
    
    .logo-item:nth-child(4) {
        padding: 4px; /* 移动设备上进一步减小内边距 */
    }
    
    .logo-item:nth-child(5) {
        padding: 24px; /* 移动设备上调整内边距 */
    }
    
    .availability {
        top: -35px;
        right: 15px;
        padding: 5px 8px;
        font-size: 0.75rem;
    }
}

/* 优化性能 */
img, button, a {
    will-change: transform;
}

.wechat-btn:hover, .email-btn:hover {
    transform: translateY(-2px);
    transition: transform 0.2s ease-in-out;
}

/* 为Cloudflare优化 */
@supports (content-visibility: auto) {
    .work-experience {
        content-visibility: auto;
        contain-intrinsic-size: auto 500px;
    }
}

.light-text {
    font-weight: 300;
    font-style: normal;
} 