:root {
    --color-primary: #0a0e17;
    --color-secondary: #1a1f35;
    --color-accent: #00f3ff;
    --color-accent2: #9d4edd;
    --color-accent3: #f9c74f;
    --color-text: #e0e0ff;
    --color-text-secondary: #a0a0c0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Exo 2', sans-serif;
    background-color: var(--color-primary);
    color: var(--color-text);
    overflow-x: hidden;
    line-height: 1.6;
}

h1,
h2,
h3,
h4 {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    letter-spacing: 1px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.container_header {
    margin: 0 auto;
    padding: 0 20px;
}

/* 导航栏 */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    background: rgba(10, 14, 23, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 243, 255, 0.2);
    transition: all 0.3s cubic-bezier(0.17, 0.89, 0.32, 1.28);
}

/* 滚动时的导航栏效果 */
header.scrolled {
    padding: 15px 0;
    background: rgba(10, 14, 23, 0.95);
    box-shadow: 0 5px 20px rgba(0, 243, 255, 0.1);
}

.nav-container {
    width: 80%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem;
    font-weight: 900;
    background: linear-gradient(90deg, var(--color-accent), var(--color-accent2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.logo-icon {
    margin-right: 10px;
    font-size: 1.5rem;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: var(--color-text);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    position: relative;
    padding: 5px 10px;
    transition: all 0.3s cubic-bezier(0.17, 0.89, 0.32, 1.28);
    display: inline-block;
    overflow: hidden;
}

.nav-links a:hover {
    color: var(--color-accent);
    transform: translateY(-2px) scale(1.05);
    text-shadow: 0 5px 15px rgba(0, 243, 255, 0.3);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--color-accent), transparent);
    border-radius: 10px;
    transition: all 0.3s cubic-bezier(0.17, 0.89, 0.32, 1.28);
    box-shadow: 0 3px 10px rgba(0, 243, 255, 0.5);
}

.nav-links a:hover::after {
    width: 100%;
}

/* 主区域 */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 80px;
    overflow: hidden;
}

#hero-canvas-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.hero-content {
    max-width: 800px;
    position: relative;
    z-index: 2;
}

.hero-content::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(0, 243, 255, 0.15), rgba(157, 78, 221, 0.15), transparent);
    border-radius: 50%;
    animation: breathe 4s ease-in-out infinite;
    z-index: -1;
    filter: blur(30px);
}

@keyframes breathe {
    0%, 100% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0.2;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.5;
    }
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    background: linear-gradient(90deg, var(--color-accent), var(--color-accent2), var(--color-accent3));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--color-accent);
    margin-bottom: 30px;
    font-weight: 600;
}

.hero-description {
    font-size: 1.2rem;
    margin-bottom: 40px;
    color: var(--color-text-secondary);
    max-width: 600px;
}

.cta-button {
    display: inline-block;
    padding: 15px 30px;
    background: linear-gradient(90deg, var(--color-accent), var(--color-accent2));
    color: var(--color-primary);
    text-decoration: none;
    border-radius: 4px;
    font-weight: 700;
    font-size: 1.1rem;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 243, 255, 0.3);
}

.cta-button::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.7s;
}

.cta-button:hover::after {
    left: 100%;
}

/* 关于我部分 */
.section {
    padding: 100px 0;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 60px;
    position: relative;
    transition: all 0.3s cubic-bezier(0.17, 0.89, 0.32, 1.28);
    cursor: default;
    display: inline-block;
}

.section-title:hover {
    transform: translateY(-5px);
    text-shadow: 0 5px 15px rgba(0, 243, 255, 0.3);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, var(--color-accent), var(--color-accent2));
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.17, 0.89, 0.32, 1.28);
}

.section-title.fade-in.visible {
    display: block;
    text-align: center;
}

.section-title:hover::after {
    width: 150px;
    box-shadow: 0 3px 10px rgba(0, 243, 255, 0.2);
}

.about-content {
    display: flex;
    align-items: center;
    gap: 50px;
}

.about-text {
    flex: 1;
}

.about-text h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--color-accent);
    position: relative;
    display: inline-block;
    transition: all 0.3s cubic-bezier(0.17, 0.89, 0.32, 1.28);
    overflow: hidden;
}

.about-text h3:hover {
    transform: translateY(-3px);
    text-shadow: 0 10px 20px rgba(0, 243, 255, 0.3);
}

.about-text h3::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.7s;
}

.about-text h3:hover::after {
    left: 100%;
}

.about-text p {
    margin-bottom: 20px;
    font-size: 1.1rem;
    position: relative;
    transition: all 0.3s cubic-bezier(0.17, 0.89, 0.32, 1.28);
    overflow: hidden;
}

.about-text p:hover {
    transform: translateY(-2px);
    text-shadow: 0 5px 15px rgba(0, 243, 255, 0.2);
}

.about-text p::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    transition: left 0.7s;
}

.about-text p:hover::after {
    left: 100%;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.tech-tag {
    padding: 8px 15px;
    background: rgba(0, 243, 255, 0.1);
    border: 1px solid rgba(0, 243, 255, 0.3);
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--color-accent);
    transition: all 0.3s cubic-bezier(0.17, 0.89, 0.32, 1.28);
    cursor: pointer;
}

.tech-tag:hover {
    background: rgba(0, 243, 255, 0.2);
    border-color: var(--color-accent);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 243, 255, 0.2);
}

.about-visual {
    flex: 1;
    position: relative;
    height: 300px;
    background: linear-gradient(45deg, rgba(0, 243, 255, 0.1), rgba(157, 78, 221, 0.1));
    border-radius: 10px;
    overflow: hidden;
}

.floating-element {
    position: absolute;
    width: 30px;
    height: 30px;
    background: rgba(0, 243, 255, 0.2);
    border: 1px solid var(--color-accent);
    border-radius: 50%;
    animation: bounce 6s infinite ease-in-out;

    /* 居中样式 */
    display: flex;
    align-items: center;
    justify-content: center;

    /* 图标容器样式 */
    padding: 5px;
    cursor: pointer;
    transition: transform 0.3s ease, background 0.3s ease;
    z-index: 1;
}

.floating-element:hover {
    transform: scale(1.1);
    background: rgba(0, 243, 255, 0.3);
}

/* 图标样式 */
.floating-element img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* 保持图标比例，完全包含在容器内 */
    /*filter: brightness(0) invert(1);*/
}

/* 如果想要彩色图标，移除 filter 或调整 filter */

.floating-element img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}


/* 针对不同图标的特殊调整（如果需要） */
.floating-element[title="PyQt"] img {
    /* PyQt图标的特殊样式 */
}

.floating-element[title="uni-app"] img {
    width: 70%;
    /* uni-app图标的特殊样式 */
}

.floating-element[title="FastAPI"] img {
    /* FastAPI图标的特殊样式 */
}

.floating-element:nth-child(1) {
    top: 10%;
    left: 10%;
    width: 60px;
    height: 60px;
    animation-duration: 5s;
    animation-delay: 0s;
    background: rgba(0, 243, 255, 0.25);
}

.floating-element:nth-child(2) {
    top: 40%;
    left: 30%;
    width: 90px;
    height: 90px;
    animation-duration: 8s;
    animation-delay: 1.5s;
    background: rgba(157, 78, 221, 0.25);
}

.floating-element:nth-child(3) {
    top: 70%;
    left: 70%;
    width: 65px;
    height: 65px;
    animation-duration: 6s;
    animation-delay: 3s;
    background: rgba(249, 199, 79, 0.25);
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0) translateX(0) scale(1);
    }
    25% {
        transform: translateY(-20px) translateX(10px) scale(1.05);
    }
    50% {
        transform: translateY(0) translateX(-10px) scale(1);
    }
    75% {
        transform: translateY(15px) translateX(15px) scale(0.95);
    }
}

/* 项目展示 */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(500px, 1fr));
    gap: 40px;
    margin-top: 40px;
}

.project-card {
    background: rgba(26, 31, 53, 0.7);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(0, 243, 255, 0.2);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 243, 255, 0.15);
    border-color: var(--color-accent);
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--color-accent), var(--color-accent2));
}

.project-header {
    padding: 20px;
    border-bottom: 1px solid rgba(0, 243, 255, 0.1);
}

.project-title {
    font-size: 1.6rem;
    margin-bottom: 8px;
    color: var(--color-accent);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.project-platform {
    font-size: 0.85rem;
    background: rgba(0, 243, 255, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
    color: var(--color-accent);
}

.project-description {
    color: var(--color-text-secondary);
    margin-bottom: 0;
    font-size: 0.95rem;
}

.project-features {
    padding: 20px;
}

.project-features h4 {
    color: var(--color-accent3);
    margin-bottom: 12px;
    font-size: 1.2rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

@media (max-width: 576px) {
    .features-grid {
        grid-template-columns: 1fr;
    }
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    position: relative;
    transition: all 0.3s cubic-bezier(0.17, 0.89, 0.32, 1.28);
    overflow: hidden;
    padding: 8px 0;
}

.feature-item:hover {
    transform: translateY(-3px);
    text-shadow: 0 10px 20px rgba(0, 243, 255, 0.2);
}

.feature-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.7s;
}

.feature-item:hover::after {
    left: 100%;
}

.feature-icon {
    color: var(--color-accent);
    font-size: 1.1rem;
    margin-top: 2px;
}

.feature-item strong {
    font-size: 0.95rem;
    display: block;
}

.feature-item p {
    font-size: 0.85rem;
    margin: 2px 0 0 0;
}

.project-links {
    display: flex;
    gap: 12px;
    padding: 0 20px 20px;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(0, 243, 255, 0.1);
    color: var(--color-accent);
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    transition: background 0.3s;
}

.project-link:hover {
    background: rgba(0, 243, 255, 0.2);
}

/* 未来展望 */
.future-section {
    background: linear-gradient(to bottom, rgba(26, 31, 53, 0.5), rgba(10, 14, 23, 0.8));
    border-radius: 10px;
    padding: 50px;
    margin-top: 50px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(0, 243, 255, 0.2);
}

.future-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 30% 30%, rgba(0, 243, 255, 0.05), transparent 70%);
}

.future-content {
    position: relative;
    z-index: 1;
}

.future-item {
    margin-bottom: 30px;
    padding-left: 30px;
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: default;
}

.future-item:hover {
    transform: translateX(6px);
    background: rgba(157, 78, 221, 0.05);
    padding: 5px 10px 5px 20px;
    border-radius: 8px;
}

.future-item::before {
    content: '▸';
    position: absolute;
    left: 12px;
    color: var(--color-accent);
    font-size: 1.2rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); /* 使用更自然的缓动函数 */
    transform: scale(1);
    opacity: 0.8;
}

.future-item:hover::before {
    color: var(--color-accent2);
    transform: scale(0.2);
    left: 5px;
    opacity: 1;
}

.future-item h4 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--color-accent2);
    transition: color 0.3s cubic-bezier(0.17, 0.89, 0.32, 1.28);
}

.future-item:hover h4 {
    color: var(--color-accent);
}

/* 联系区域 */
footer {
    background: rgba(10, 14, 23, 0.9);
    padding: 60px 0 30px;
    border-top: 1px solid rgba(0, 243, 255, 0.2);
}

.contact-container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 40px;
}

.contact-info {
    flex: 1;
    min-width: 300px;
}

.contact-info h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--color-accent);
    position: relative;
    display: inline-block;
    transition: all 0.3s cubic-bezier(0.17, 0.89, 0.32, 1.28);
    overflow: hidden;
}

.contact-info h3:hover {
    transform: translateY(-3px);
    text-shadow: 0 10px 20px rgba(0, 243, 255, 0.3);
}

.contact-info h3::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.7s;
}

.contact-info h3:hover::after {
    left: 100%;
}

.contact-info p {
    position: relative;
    transition: all 0.3s cubic-bezier(0.17, 0.89, 0.32, 1.28);
    overflow: hidden;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.contact-info p:hover {
    transform: translateY(-2px);
    text-shadow: 0 5px 15px rgba(0, 243, 255, 0.2);
}

.contact-info p::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    transition: left 0.7s;
}

.contact-info p:hover::after {
    left: 100%;
}

.social-links {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: rgba(0, 243, 255, 0.1);
    color: var(--color-accent);
    border-radius: 50%;
    font-size: 1.5rem;
    transition: transform 0.3s, background 0.3s;
    /* 去掉下划线 */
    text-decoration: none;
    /* 去掉轮廓线（点击时） */
    outline: none;
}

.social-link:hover {
    transform: translateY(-5px);
    background: rgba(0, 243, 255, 0.2);
}

.social-link[data-tooltip] {
    position: relative;
}

.social-link[data-tooltip]::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 130%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-accent);
    color: #9d4edd;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 14px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.social-link[data-tooltip]::after {
    content: '';
    position: absolute;
    bottom: 115%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: var(--color-accent) transparent transparent transparent;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.social-link[data-tooltip]:hover::before,
.social-link[data-tooltip]:hover::after {
    opacity: 1;
    visibility: visible;
}

.copyright {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--color-text-secondary);
    font-size: 0.9rem;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .about-content {
        flex-direction: column;
    }

    .hero h1 {
        font-size: 2.8rem;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .section {
        padding: 70px 0;
    }

    .project-title {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .project-platform {
        align-self: flex-start;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 400px) {
    .project-title {
        font-size: 1.6rem;
    }
}

/* 滚动动画 */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.17, 0.89, 0.32, 1.28), transform 0.8s cubic-bezier(0.17, 0.89, 0.32, 1.28);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}