/* 基础样式重置与变量定义 */
:root {
    --primary-color: #00FFFF; /* 主色调*/
    --secondary-color: #E6E6FA; /* 辅助色 */
    --dark-bg: #121212; /* 深色背景 */
    --darker-bg: #0A0A0A; /* 更深色背景 */
    --text-light: #E0E0E0; /* 浅色文本 */
    --text-muted: #9E9E9E; /* 次要文本 */
    --border-radius: 8px; /* 统一圆角 */
    --transition-speed: 0.3s; /* 过渡动画速度 */
}

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

body {
    background-color: var(--dark-bg);
    color: var(--text-light);
    line-height: 1.6;
    scroll-behavior: smooth; /* 平滑滚动 */
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 导航栏样式 */
.navbar {
    background-color: rgba(18, 18, 18, 0.9);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    color: var(--text-light);
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    transition: color var(--transition-speed);
}

.logo:hover {
    color: var(--primary-color);
}

.menu {
    display: flex;
    gap: 2rem;
}

.menu a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-speed);
    position: relative;
}

.menu a:hover {
    color: var(--primary-color);
}

.menu a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--primary-color);
    transition: width var(--transition-speed);
}

.menu a:hover::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* 数字主题动态背景动画 */
@keyframes dotPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.7;
    }
    50% {
        transform: scale(1.5);
        opacity: 1;
    }
}

@keyframes dotMove {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }
    25% {
        transform: translate(20px, -20px) rotate(90deg);
    }
    50% {
        transform: translate(0, -40px) rotate(180deg);
    }
    75% {
        transform: translate(-20px, -20px) rotate(270deg);
    }
    100% {
        transform: translate(0, 0) rotate(360deg);
    }
}

@keyframes colorShift {
    0% {
        background-color: var(--primary-color);
    }
    25% {
        background-color: #4ad45f;
    }
    50% {
        background-color: #5fc084;
    }
    75% {
        background-color: #3aca4d;
    }
    100% {
        background-color: var(--primary-color);
    }
}

/* 数字主题背景容器 */
.digital-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

/* 波点元素 */
.dot {
    position: absolute;
    border-radius: 50%;
    background-color: var(--primary-color);
    animation: dotPulse 3s infinite ease-in-out, dotMove 8s infinite linear, colorShift 10s infinite;
}

/* 不同大小的波点 */
.dot.small {
    width: 4px;
    height: 4px;
}

.dot.medium {
    width: 6px;
    height: 6px;
}

.dot.large {
    width: 8px;
    height: 8px;
}

/* 英雄区域样式 */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 80px; /* 避免被导航栏遮挡 */
    background: linear-gradient(135deg, var(--darker-bg), var(--dark-bg));
    position: relative;
    overflow: hidden;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero .highlight {
    color: var(--primary-color);
}

.hero .tagline {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    transition: all var(--transition-speed);
    border: none;
    cursor: pointer;
}

.primary-btn {
    background-color: var(--primary-color);
    color: white;
}

.primary-btn:hover {
    background-color: var(--secondary-color);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(108, 99, 255, 0.3);
}

.secondary-btn {
    background-color: transparent;
    color: var(--text-light);
    border: 1px solid var(--text-muted);
    margin-left: 1rem;
}

.secondary-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* 关于我页面样式 */
.about-section {
    padding: 8rem 0 3rem;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--primary-color);
}

.section-description {
    color: var(--text-muted);
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3rem;
    font-size: 1.1rem;
}

.about-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 3rem;
}

.profile-image {
    flex: 1;
    min-width: 250px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.profile-name {
    text-align: center;
    margin-top: 1rem;
    font-size: 1.8rem;
}

.profile-info {
    flex: 2;
    min-width: 300px;
}

.profile-info h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.profile-description {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.7;
    max-width: 75%;
}

.personal-details {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 2rem;
}

.detail-item {
    display: flex;
    align-items: center;
    color: var(--text-muted);
    gap: 0.5rem;
    flex: 1;
    min-width: 200px;
}

.detail-item.full-width {
    flex: 1 1 100%;
    min-width: 100%;
}

.detail-item i {
    color: var(--primary-color);
}

.skills-section {
    margin-top: 5rem;
}

.section-subtitle {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    text-align: center;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    justify-content: center;
}

.skill-card {
    background-color: var(--darker-bg);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    text-align: center;
    transition: transform var(--transition-speed);
    width: 100%;
}

.skill-card:hover {
    transform: translateY(-5px);
}

.skill-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.skill-card h4 {
    margin-bottom: 0.5rem;
}

.skill-progress {
    height: 8px;
    background-color: #2D2D2D;
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background-color: var(--primary-color);
    border-radius: 4px;
}

/* 项目页面样式 */
.projects-section {
    padding: 8rem 0 3rem;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2.5rem;
}

.project-card {
    background-color: var(--darker-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.project-image {
    height: 200px;
    overflow: hidden;
}

.project-info {
    padding: 1.5rem;
}

.project-title {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.project-description {
    color: var(--text-muted);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.project-link {
    display: inline-flex;
    align-items: center;
    color: var(--primary-color);
    font-weight: 500;
    text-decoration: none;
    gap: 0.5rem;
}

.project-link i {
    transition: transform var(--transition-speed);
}

.project-link:hover i {
    transform: translateX(5px);
}

/* 项目详情页样式 */
.project-detail-section {
    padding: 8rem 0 3rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    color: var(--text-muted);
    text-decoration: none;
    margin-bottom: 2rem;
    transition: color var(--transition-speed);
}

.back-link:hover {
    color: var(--primary-color);
}

.back-link i {
    margin-right: 0.5rem;
}

.project-detail-title {
    font-size: 2.2rem;
    margin-bottom: 1rem;
}

.project-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #2D2D2D;
}

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

.meta-item a {
    color: var(--primary-color);
    text-decoration: none;
}

.meta-item a:hover {
    text-decoration: underline;
}

.project-gallery {
    margin-bottom: 3rem;
}

.main-project-image {
    height: 450px;
    margin-bottom: 1rem;
}

.project-thumbnails {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.project-detail-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.project-description,
.project-features,
.project-technologies {
    background-color: var(--darker-bg);
    padding: 2rem;
    border-radius: var(--border-radius);
}

.project-features h3,
.project-description h3,
.project-technologies h3 {
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.project-features ul {
    list-style: none;
}

.project-features li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 0.8rem;
    color: var(--text-muted);
}

.project-features i {
    color: var(--primary-color);
    margin-right: 0.8rem;
    margin-top: 4px;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.tech-tag {
    background-color: #2D2D2D;
    color: var(--text-light);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
}

/* 联系页面样式 */
.contact-section {
    padding: 8rem 0 3rem;
}

.contact-content {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3rem;
}

.contact-info {
    background-color: var(--darker-bg);
    padding: 2rem;
    border-radius: var(--border-radius);
    max-width: 600px;
    width: 100%;
}

.contact-details {
    margin-bottom: 2rem;
}

.contact-item {
    margin-bottom: 2rem;
    text-align: left;
}

.contact-label-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.contact-label-row i {
    color: var(--primary-color);
    font-size: 1.2rem;
    min-width: 20px;
}

.contact-label-row span {
    color: var(--text-light);
    font-weight: 500;
    font-size: 1rem;
}

.contact-value {
    margin-left: calc(20px + 0.75rem); /* 对齐到文字开头位置 */
    margin-top: 0.25rem;
}

.contact-value a,
.contact-value span {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
}

.contact-value a:hover {
    color: var(--primary-color);
}

.contact-text span {
    color: var(--text-muted);
    display: block;
    font-size: 0.9rem;
}

.contact-text a {
    color: var(--text-light);
    text-decoration: none;
}

.contact-text a:hover {
    color: var(--primary-color);
}

.contact-social {
    justify-content: center;
}

.contact-form {
    background-color: var(--darker-bg);
    padding: 2rem;
    border-radius: var(--border-radius);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.9rem;
    background-color: #2D2D2D;
    border: 1px solid #3D3D3D;
    border-radius: var(--border-radius);
    color: var(--text-light);
    font-size: 1rem;
    transition: border-color var(--transition-speed);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

.submit-btn {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
}

/* 页脚样式 */
.footer {
    background-color: var(--darker-bg);
    padding: 2rem 0;
    margin-top: 3rem;
}

.footer .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

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

.social-links a {
    color: var(--text-muted);
    font-size: 1.5rem;
    transition: color var(--transition-speed);
}

.social-links a:hover {
    color: var(--primary-color);
}

.footer p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background-color: var(--darker-bg);
        padding: 2rem;
        gap: 1.5rem;
    }

    .menu.active {
        display: flex;
    }

    .menu-toggle {
        display: block;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .cta-buttons {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .secondary-btn {
        margin-left: 0;
    }

    /* 响应式关于我页面 */
    .about-content {
        flex-direction: column;
        text-align: center;
    }

    .personal-details {
        justify-content: center;
    }

    /* 响应式项目详情页 */
    .project-detail-title {
        font-size: 1.8rem;
    }

    .main-project-image {
        height: 300px;
    }

    /* 响应式联系页面 */
    .contact-content {
        grid-template-columns: 1fr;
    }
}

/* 通用动画效果 */
.fade-in {
    animation: fadeIn 0.8s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 项目卡片悬停效果 */
.project-card img {
    transition: transform 0.5s ease;
}

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

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
}