* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #0d1117;
    min-height: 100vh;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
    overflow: hidden;
    position: relative;
}

/* 星空背景 */
#starfield {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background: radial-gradient(ellipse at bottom, #1a1f3a 0%, #0a0e1f 100%);
}

.star {
    position: absolute;
    background: white;
    border-radius: 50%;
    animation: twinkle linear infinite;
}

@keyframes twinkle {

    0%,
    100% {
        opacity: 0;
        transform: scale(0.5);
    }

    50% {
        opacity: 1;
        transform: scale(1);
    }
}

.container {
    max-width: 1400px;
    width: 100%;
    height: 95vh;
    background: transparent;
    padding: 1.5rem 3rem;
    animation: fadeInScale 0.8s ease-out;
    position: relative;
    z-index: 1;
    overflow: hidden;
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 2rem;
}

.profile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    animation: fadeInUp 1s ease-out;
    padding: 2rem 0 2.5rem 0;
    border-bottom: 2px solid rgba(255, 255, 255, 0.15);
}

.profile-left {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.profile-info {
    text-align: left;
}

.avatar {
    width: 140px;
    height: 140px;
    flex-shrink: 0;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.6);
    animation: pulse 2s ease-in-out infinite;
    border: 5px solid rgba(255, 255, 255, 0.4);
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.name {
    font-size: 3.2rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 3px 15px rgba(0, 0, 0, 0.5);
    margin-bottom: 0.8rem;
    letter-spacing: 1px;
}

.title {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 400;
    margin-bottom: 1rem;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.bio {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.7;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

.bio em {
    color: rgba(255, 255, 255, 0.9);
    font-style: italic;
}

.section {
    animation: fadeInUp 1s ease-out;
    overflow-y: auto;
}

.section.main-content {
    display: flex;
    flex-direction: row;
    gap: 2rem;
    padding-right: 0.5rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
    align-items: flex-start;
}

.section.main-content::-webkit-scrollbar {
    display: none;
}

.section-title {
    font-size: 1.8rem;
    color: white;
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 600;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.title-en {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 300;
    margin-left: 0.5rem;
    letter-spacing: 1.5px;
}

.section-icon {
    font-size: 1.8rem;
}

.project-section {
    flex: 1;
    min-width: 0;
}

/* 项目卡片 */
.projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.2rem;
}

.project-card {
    background: linear-gradient(135deg, 
        rgba(30, 35, 60, 0.85) 0%, 
        rgba(40, 45, 75, 0.85) 100%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 2.5rem 2.8rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 2rem;
    backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    height: 140px;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(99, 102, 241, 0.2) 0%, 
        rgba(139, 92, 246, 0.2) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.project-card:hover::before {
    opacity: 1;
}

.project-card:hover {
    transform: translateY(-4px);
    border-color: rgba(139, 92, 246, 0.6);
    box-shadow: 0 15px 50px rgba(99, 102, 241, 0.4), 0 8px 30px rgba(139, 92, 246, 0.3);
}

.project-icon {
    flex-shrink: 0;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, 
        rgba(99, 102, 241, 0.9) 0%, 
        rgba(139, 92, 246, 0.9) 100%);
    border-radius: 16px;
    position: relative;
    z-index: 1;
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
    border: 1px solid rgba(139, 92, 246, 0.8);
}

.project-icon svg {
    width: 36px;
    height: 36px;
    fill: white;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.project-content {
    flex: 1;
    position: relative;
    z-index: 1;
}

.project-card h3 {
    color: #ffffff;
    font-size: 1.35rem;
    margin-bottom: 0.6rem;
    font-weight: 600;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.project-card p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1rem;
    line-height: 1.6;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

/* 联系链接 */
.contact-links {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    align-items: flex-end;
}

.contact-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.contact-link svg {
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.contact-link span {
    display: none;
}

.contact-link:hover {
    transform: translateY(-3px) scale(1.05);
}

/* 微信 - 绿色 */
.contact-link.wechat {
    background: rgba(7, 193, 96, 0.15);
    border-color: rgba(7, 193, 96, 0.3);
}

.contact-link.wechat svg {
    fill: #07C160;
}

.contact-link.wechat:hover {
    background: rgba(7, 193, 96, 0.25);
    border-color: rgba(7, 193, 96, 0.6);
    box-shadow: 0 12px 30px rgba(7, 193, 96, 0.4);
}

/* QQ - 蓝色 */
.contact-link.qq {
    background: rgba(18, 183, 245, 0.15);
    border-color: rgba(18, 183, 245, 0.3);
}

.contact-link.qq svg {
    fill: #12B7F5;
}

.contact-link.qq:hover {
    background: rgba(18, 183, 245, 0.25);
    border-color: rgba(18, 183, 245, 0.6);
    box-shadow: 0 12px 30px rgba(18, 183, 245, 0.4);
}

/* GitHub - 白色 */
.contact-link.github {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.contact-link.github svg {
    fill: #ffffff;
}

.contact-link.github:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 12px 30px rgba(255, 255, 255, 0.3);
}

/* Email - 红色 */
.contact-link.email {
    background: rgba(234, 67, 53, 0.15);
    border-color: rgba(234, 67, 53, 0.3);
}

.contact-link.email svg {
    fill: #EA4335;
}

.contact-link.email:hover {
    background: rgba(234, 67, 53, 0.25);
    border-color: rgba(234, 67, 53, 0.6);
    box-shadow: 0 12px 30px rgba(234, 67, 53, 0.4);
}

/* 博客 - 橙色 */
.contact-link.blog {
    background: rgba(255, 152, 0, 0.15);
    border-color: rgba(255, 152, 0, 0.3);
}

.contact-link.blog svg {
    fill: #FF9800;
}

.contact-link.blog:hover {
    background: rgba(255, 152, 0, 0.25);
    border-color: rgba(255, 152, 0, 0.6);
    box-shadow: 0 12px 30px rgba(255, 152, 0, 0.4);
}


.footer {
    text-align: center;
    padding: 0.8rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

/* 动画 */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

/* 响应式设计 */
@media (max-width: 1400px) {
    .container {
        padding: 1.5rem 2.5rem;
    }
}

@media (max-width: 1024px) {
    .container {
        padding: 1.5rem 2rem;
    }

    .section.main-content {
        flex-direction: column;
        gap: 2rem;
    }

    .project-section {
        margin-bottom: 2rem;
    }

    .project-section:last-child {
        margin-bottom: 0;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    body {
        padding: 1rem;
        overflow-y: auto;
        height: auto;
    }

    .container {
        padding: 1.5rem;
        height: auto;
        overflow: visible;
        grid-template-rows: auto auto auto;
    }

    .profile-header {
        flex-direction: column;
        text-align: center;
    }

    .profile-info {
        text-align: center;
    }

    .avatar {
        width: 80px;
        height: 80px;
    }

    .name {
        font-size: 1.8rem;
    }

    .title {
        font-size: 0.95rem;
    }

    .bio {
        font-size: 0.85rem;
    }

    .section-title {
        font-size: 1.2rem;
    }

    .subsection-title {
        font-size: 0.95rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .project-card {
        padding: 2rem 1.8rem;
        gap: 1.5rem;
        height: 120px;
    }

    .project-icon {
        width: 60px;
        height: 60px;
    }

    .project-icon svg {
        width: 30px;
        height: 30px;
    }

    .project-card h3 {
        font-size: 1.2rem;
    }

    .project-card p {
        font-size: 0.95rem;
    }

    .title-en {
        font-size: 0.75rem;
        display: block;
        margin-left: 0;
        margin-top: 0.2rem;
    }

    .profile-header {
        flex-direction: column;
        gap: 1rem;
    }

    .profile-left {
        flex-direction: column;
        text-align: center;
    }

    .profile-info {
        text-align: center;
    }

    .contact-links {
        align-items: center;
        flex-direction: column;
    }
}