:root {
    --primary-bg: #0f2027;
    --secondary-bg: #203a43;
    --accent-bg: #2c5364;
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --accent-color: #00cec9;
    --gradient-primary: linear-gradient(45deg, #00cec9, #6c5ce7);
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --main-bg-color: #ffffff;
    --main-text-color: #000000;
    --gradient: linear-gradient(120deg, #bd34fe, #e0321b 30%, #41d1ff 60%);
    --purple-text-color: #747bff;
    --text-bg-color: rgb(240 243 247);
    --item-bg-color: rgb(247 247 247);
    --item-hover-color: rgba(244, 245, 246, 0.5);
    --card-filter: 0px;
    --back-filter: 0px;
    --back-filter-color: #00000000;
}

[data-theme="dark"] {
    --main-bg-color: #2a2b30;
    --main-text-color: #ffffff;
    --gradient: linear-gradient(120deg, #bd34fe, #f76cc6 30%, #41d1ff 60%);
    --purple-text-color: #a78bfa;
    --text-bg-color: rgba(167, 139, 250, 0.15);
    --item-bg-color: rgba(255, 255, 255, 0.1);
    --item-hover-color: rgba(255, 255, 255, 0.15);
    --glass-bg: rgba(255, 255, 255, 0.12);
    --glass-border: rgba(255, 255, 255, 0.15);
    --card-filter: 0px;
    --back-filter: 0px;
    --back-filter-color: #000000;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: url('./img/background.jpg');  /* 浅色模式背景 */
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* 深色模式背景 */
[data-theme="dark"] body {
    background: url('./img/background2.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
}

/* Loading Animation */
#loading {
    position: fixed;
    width: 100%;
    height: 100%;
    background: var(--primary-bg);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

.filter {
    position: fixed;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: -1;
}

/* Main Layout */
.main {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    gap: 2rem;
}

/* Left Section */
.left-section {
    width: 300px;
    position: sticky;
    top: 2rem;
    height: fit-content;
}

.logo {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto 2rem;
}

.logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.logo .logo-frame {
    position: absolute;
    top: -20%;
    left: -15%;
    width: 130%;
    height: 130%;
}

.left-div {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.location-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
}

.location-item svg {
    width: 20px;
    height: 20px;
    fill: var(--text-primary);
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.tag-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.tag-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Timeline */
.timeline ul {
    list-style: none;
    position: relative;
}

.timeline ul::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 2px;
    height: 100%;
    background: var(--glass-border);
}

.timeline li {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 1.5rem;
}

.timeline .focus {
    position: absolute;
    left: -5px;
    top: 50%;
    width: 12px;
    height: 12px;
    background: var(--accent-color);
    border-radius: 50%;
    transform: translateY(-50%);
}

/* Right Section */
.right-section {
    flex: 1;
}

header {
    text-align: center;
    margin-bottom: 3rem;
}

.header-logo {
    position: relative;
    width: 150px;
    height: 150px;
    margin: 0 auto 1rem;
}

.header-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.header-logo .logo-frame {
    position: absolute;
    top: -20%;
    left: -15%;
    width: 130%;
    height: 130%;
}

.welcome {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.description {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.purple-text {
    color: #6c5ce7;
}

.highlight {
    background: rgba(108, 92, 231, 0.1);
    padding: 0.2rem 0.5rem;
    border-radius: 5px;
}

/* Social Links */
.social-container {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
}

.social-item {
    position: relative;
    width: 40px;
    height: 40px;
    background: var(--glass-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-item:hover {
    transform: translateY(-3px);
    background: var(--glass-border);
}

.tooltip {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--glass-bg);
    padding: 0.3rem 0.8rem;
    border-radius: 5px;
    font-size: 0.8rem;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
}

.social-item:hover .tooltip {
    opacity: 1;
    bottom: -40px;
}

/* Theme Switch */
.theme-switch {
    position: relative;
    width: 60px;
    height: 30px;
}

.theme-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.theme-switch label {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--glass-bg);
    border-radius: 15px;
    transition: all 0.3s ease;
}

.theme-switch label::before {
    content: '';
    position: absolute;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--accent-color);
    top: 2px;
    left: 2px;
    transition: all 0.3s ease;
}

.theme-switch input:checked + label::before {
    transform: translateX(30px);
}

/* Projects Section */
.section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    font-size: 1.5rem;
    font-weight: bold;
}

.section-title svg {
    width: 24px;
    height: 24px;
    fill: var(--text-primary);
}

.section-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
    margin-right: 0.5rem;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.project-card {
    background: var(--glass-bg);
    border-radius: 15px;
    overflow: hidden;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    background: var(--glass-border);
}

.project-content {
    padding: 1.5rem;
}

.project-image img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.skill-item {
    background: var(--glass-bg);
    padding: 1rem;
    border-radius: 10px;
}

.skill-name {
    margin-bottom: 0.5rem;
}

.skill-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.skill-bar::before {
    content: '';
    display: block;
    height: 100%;
    background: var(--gradient-primary);
    width: var(--level);
    transition: width 1s ease;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    margin-top: 3rem;
}

/* QR Code Modal */
.qr-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: var(--glass-bg);
    padding: 2rem;
    border-radius: 15px;
    max-width: 300px;
}

.qr-image {
    width: 100%;
    height: auto;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .main {
        flex-direction: column;
    }

    .left-section {
        width: 100%;
        position: static;
    }

    .header-logo {
        display: block;
        width: 150px;
        height: 150px;
    }

    .logo {
        display: none;
    }
}

@media (max-width: 768px) {
    .main {
        padding: 1rem;
    }

    .welcome {
        font-size: 2rem;
    }

    .project-grid {
        grid-template-columns: 1fr;
    }
}

.tanChiShe {
    width: 85%;
    margin: 0 auto;
}

.tanChiShe img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 添加装饰容器的样式 */
.decoration {
    width: 100%;
    margin: 2rem 0;
}

/* 调整深色模式下的背景遮罩 */
[data-theme="dark"] .filter {
    background: rgba(0, 0, 0, 0.2);
}

/* 调整深色模式下的卡片样式 */
[data-theme="dark"] .project-card,
[data-theme="dark"] .skill-item,
[data-theme="dark"] .left-div {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* 调整深色模式下的文字颜色 */
[data-theme="dark"] .description {
    color: rgba(255, 255, 255, 0.9);
}

/* 调整深色模式下的技能条样式 */
[data-theme="dark"] .skill-bar::before {
    background: linear-gradient(90deg, #a78bfa, #41d1ff);
}

/* 调整深色模式下的标签样式 */
[data-theme="dark"] .tag-item {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .tag-item:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* 调整深色模式下的时间轴样式 */
[data-theme="dark"] .timeline ul::before {
    background: rgba(255, 255, 255, 0.2);
} 