:root {
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --nav-height: 70px;
    --side-padding: 150px;
    --transition: all 0.3s ease;
    --cursor-size: 20px;
    --cursor-trail-size: 8px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    line-height: 1.6;
    background-color: var(--bg-color);
    color: var(--text-color);
    position: relative;
    overflow-x: hidden;
    cursor: none;
}

/* 浅色模式的背景装饰 */
body[data-theme="light"]::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: var(--gradient-dots);
    background-size: 30px 30px;
    opacity: 0.3;
    pointer-events: none;
    z-index: -1;
    animation: backgroundFloat 150s linear infinite;
}

body[data-theme="light"]::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: var(--gradient-mesh);
    background-size: 50px 50px;
    opacity: 0.1;
    pointer-events: none;
    z-index: -1;
    animation: backgroundFloat 120s linear infinite reverse;
}

@keyframes backgroundFloat {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }
    25% {
        transform: translate(10px, -10px) rotate(1deg);
    }
    50% {
        transform: translate(-5px, 5px) rotate(-1deg);
    }
    75% {
        transform: translate(-10px, -5px) rotate(1deg);
    }
    100% {
        transform: translate(0, 0) rotate(0deg);
    }
}

/* 添加渐变光晕效果 */
.main-grid::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center,
        rgba(var(--bg-color-rgb), 0) 30%,
        rgba(var(--accent-color-rgb), 0.03) 50%,
        rgba(var(--bg-color-rgb), 0) 70%);
    transform-origin: center;
    animation: rotateGradient 30s linear infinite;
    pointer-events: none;
    z-index: -1;
}

@keyframes rotateGradient {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background-color: rgba(var(--bg-color-rgb), 0.95);
    backdrop-filter: blur(10px);
    z-index: 100;
    transition: var(--transition);
    border-bottom: 1px solid var(--card-border);
}

.navbar.scrolled {
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.3);
}

.nav-content {
    max-width: 1200px;
    height: 100%;
    margin: 0 auto;
    padding: 0 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
}

.nav-links {
    display: flex;
    flex: 1;
    justify-content: center;
    gap: 30px;
}

.nav-item {
    color: var(--heading-color);
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition);
    position: relative;
}

.nav-item::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.3s ease;
}

.nav-item:hover {
    color: var(--primary-color);
}

.nav-item:hover::after {
    transform: scaleX(1);
}

.nav-item.active {
    color: var(--primary-color);
}

.nav-item.active::after {
    transform: scaleX(1);
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
}

.nav-controls::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--gradient-accent);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.nav-controls:hover::after {
    transform: scaleX(1);
}

.language-switch {
    display: flex;
    align-items: center;
    gap: 8px;
}

.lang-btn {
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    padding: 4px 8px;
    font-size: 14px;
    transition: var(--transition);
}

.lang-btn.active {
    color: var(--primary-color);
}

.theme-btn {
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    padding: 8px;
    font-size: 18px;
    transition: var(--transition);
}

.theme-btn:hover {
    color: var(--primary-color);
}

.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 0 var(--side-padding);
    padding-top: calc(var(--nav-height) + 50px);
}

.hero-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 50px;
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.hero-title {
    font-size: clamp(40px, 8vw, 80px);
    line-height: 1.1;
    margin-bottom: 20px;
}

.greeting {
    color: var(--heading-color);
    display: block;
    font-size: 0.5em;
    margin-bottom: 20px;
}

.name {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
    animation: gradientFlow 8s linear infinite;
}

@keyframes gradientFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.name::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 100%;
    height: 2px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.name:hover::after {
    transform: scaleX(1);
}

.hero-subtitle {
    color: var(--heading-color);
    font-size: clamp(20px, 4vw, 30px);
    margin-bottom: 20px;
}

.hero-description {
    max-width: 540px;
    font-size: 18px;
    margin-bottom: 30px;
}

.section {
    padding: 100px var(--side-padding);
    padding-top: calc(100px + var(--nav-height));
    margin-top: calc(-1 * var(--nav-height));
}

.section-title {
    color: var(--heading-color);
    font-size: clamp(26px, 5vw, 32px);
    margin-bottom: 40px;
}

@media (max-width: 768px) {
    :root {
        --side-padding: 50px;
    }

    .nav-content {
        padding: 0 15px;
    }

    .nav-links {
        display: none;
    }

    .hero-carousel {
        width: 100%;
    }
}

@media (max-width: 480px) {
    :root {
        --side-padding: 25px;
    }
}

/* 轮播图样式 */
.carousel-container {
    position: relative;
    margin: 0 auto;
    overflow: hidden;
    background: var(--card-bg);
    border-radius: 10px;
    border: 1px solid var(--card-border);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.05);
    height: 500px;
    perspective: 1000px;
}

.carousel {
    display: flex;
    transition: transform 0.5s ease;
    transform-style: preserve-3d;
    height: 100%;
}

.carousel-item {
    min-width: 100%;
    padding: 20px;
    opacity: 0.3;
    transform: scale(0.8);
    transition: all 0.5s ease;
}

.carousel-item.active {
    opacity: 1;
    transform: scale(1);
}

.experience-card {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 30px;
    max-height: 450px;
    overflow-y: auto;
    border: 1px solid var(--card-border);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
    perspective: 1000px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.experience-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

/* 自定义滚动条样式 */
.experience-card::-webkit-scrollbar {
    width: 6px;
}

.experience-card::-webkit-scrollbar-track {
    background: var(--card-bg);
    border-radius: 3px;
}

.experience-card::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

.experience-card::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
    opacity: 0.8;
}

.experience-card:hover {
    transform: translateY(-5px) rotateX(5deg) rotateY(5deg);
    box-shadow: var(--glow-effect);
    animation: cardFloat 3s ease-in-out infinite;
}

@keyframes cardFloat {
    0%, 100% { transform: translateY(-5px); }
    50% { transform: translateY(-15px); }
}

.experience-card:hover::before {
    transform: scaleX(1);
}

.experience-card h3 {
    color: var(--primary-color);
    font-size: 24px;
    margin-bottom: 25px;
}

.timeline {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.timeline-item {
    padding-left: 20px;
    padding-bottom: 5px;
    border-left: 2px solid transparent;
    border-image: var(--gradient-primary);
    border-image-slice: 1;
    position: relative;
    opacity: 0;
    transform: translateX(-20px);
    animation: slideIn 0.5s ease forwards;
}

@keyframes slideIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--gradient-primary);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.timeline-item h4 {
    color: var(--heading-color);
    font-size: 18px;
    margin-bottom: 5px;
}

.timeline-period,
.company,
.period {
    color: var(--primary-color);
    font-size: 14px;
    margin-bottom: 5px;
}

.timeline-description {
    font-size: 14px;
    color: var(--text-color);
}

/* 轮播图控制按钮 */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(var(--primary-color-rgb), 0.1);
    border: 1px solid var(--card-border);
    color: var(--primary-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.carousel-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: var(--gradient-primary);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
    z-index: -1;
}

.carousel-btn:hover::before {
    width: 150%;
    height: 150%;
}

.carousel-btn.prev {
    left: 20px;
}

.carousel-btn.next {
    right: 20px;
}

/* 轮播图指示器 */
.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 10px;
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    z-index: 2;
}

.indicator {
    width: 30px;
    height: 4px;
    border-radius: 2px;
    border: none;
    background: rgba(var(--primary-color-rgb), 0.2);
    cursor: pointer;
    transition: var(--transition);
}

.indicator.active {
    background: var(--primary-color);
    width: 50px;
}

.indicator::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(
        from 0deg,
        transparent 0%,
        var(--gradient-primary) 25%,
        transparent 50%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
    animation: rotate 2s linear infinite;
}

.indicator.active::after {
    opacity: 1;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 响应式调整 */
@media (max-width: 1024px) {
    .hero-container {
        flex-direction: column;
        text-align: center;
    }

    .hero-content,
    .hero-carousel {
        max-width: 100%;
    }
}

/* 新的网格布局 */
.main-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    min-height: 100vh;
    padding: calc(var(--nav-height) + 2rem) 2rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* 左侧介绍部分 */
.intro-section {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.intro-content {
    max-width: 600px;
}

.intro-title {
    font-size: clamp(40px, 5vw, 60px);
    line-height: 1.1;
    margin-bottom: 1rem;
}

.intro-subtitle {
    color: var(--heading-color);
    font-size: clamp(20px, 3vw, 24px);
    margin-bottom: 1rem;
}

.intro-description {
    font-size: 18px;
    margin-bottom: 2rem;
    color: var(--text-color);
}

.about-content {
    margin-top: 2rem;
    padding: 2rem;
    background: var(--card-bg);
    border-radius: 8px;
    border: 1px solid var(--card-border);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
}

/* 右侧经历部分 */
.experience-section {
    display: flex;
    align-items: center;
}

.carousel-container {
    width: 100%;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* 响应式调整 */
@media (max-width: 1024px) {
    .main-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .intro-content {
        text-align: center;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .main-grid {
        padding: calc(var(--nav-height) + 1rem) 1rem 1rem;
    }
}

/* 添加背景动画效果 */
.main-grid::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, 
        var(--card-bg) 0%, 
        transparent 50%);
    opacity: 0.5;
    animation: backgroundPulse 10s ease-in-out infinite,
               colorShift 15s ease-in-out infinite;
    pointer-events: none;
}

@keyframes backgroundPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

@keyframes colorShift {
    0%, 100% {
        filter: hue-rotate(0deg);
    }
    50% {
        filter: hue-rotate(30deg);
    }
}

/* 添加鼠标跟随效果 */
.main-grid::after {
    content: '';
    position: fixed;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle at center,
        var(--accent-color) 0%,
        transparent 70%);
    opacity: 0.1;
    pointer-events: none;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s ease;
    z-index: -1;
}

body[data-theme="light"] .experience-card::after {
    content: '';
    position: absolute;
    inset: -1px;
    background: linear-gradient(
        120deg,
        transparent,
        rgba(var(--accent-color-rgb), 0.1),
        transparent
    );
    mask: 
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

body[data-theme="light"] .experience-card:hover::after {
    opacity: 1;
}

body[data-theme="light"] .carousel-btn {
    backdrop-filter: blur(8px);
    border: 1px solid rgba(var(--accent-color-rgb), 0.2);
    box-shadow: 
        0 4px 12px rgba(var(--accent-color-rgb), 0.1),
        inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

body[data-theme="light"] .carousel-btn:hover {
    box-shadow: 
        0 6px 16px rgba(var(--accent-color-rgb), 0.15),
        inset 0 0 0 1px rgba(255, 255, 255, 0.8);
    transform: translateY(-50%) scale(1.05);
}

/* 自定义鼠标样式 */
body {
    cursor: none;
}

.cursor-dot,
.cursor-outline {
    pointer-events: none;
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 9999;
    transition: opacity 0.3s ease;
}

.cursor-dot {
    width: var(--cursor-trail-size);
    height: var(--cursor-trail-size);
    background: var(--primary-color);
    mix-blend-mode: difference;
    filter: blur(1px);
}

.cursor-outline {
    width: var(--cursor-size);
    height: var(--cursor-size);
    background: rgba(var(--primary-color-rgb), 0.1);
    backdrop-filter: blur(2px);
    transition: all 0.08s ease-out;
}

/* 鼠标经过可点击元素时的效果 */
.clickable {
    cursor: none;
}

.clickable:hover ~ .cursor-dot {
    transform: translate(-50%, -50%) scale(2);
    background: var(--accent-color);
}

.clickable:hover ~ .cursor-outline {
    transform: translate(-50%, -50%) scale(1.5);
    border-color: var(--accent-color);
}

/* 鼠标点击时的效果 */
.cursor-dot.clicking {
    transform: translate(-50%, -50%) scale(0.5);
    background: var(--secondary-color);
}

.cursor-outline.clicking {
    transform: translate(-50%, -50%) scale(0.8);
    border-color: var(--secondary-color);
}

/* 社交按钮样式 */
.social-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 2rem;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.social-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.social-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--glow-effect);
    border-color: transparent;
}

.social-btn:hover::before {
    opacity: 0.1;
}

.btn-icon {
    font-size: 1.2rem;
    z-index: 2;
}

.btn-text {
    font-size: 0.9rem;
    font-weight: 500;
    z-index: 2;
}

/* 响应式调整 */
@media (max-width: 480px) {
    .social-buttons {
        grid-template-columns: 1fr;
    }
}

/* 联系方式弹窗样式 */
.contact-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.contact-modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--bg-color);
    padding: 2rem;
    border-radius: 12px;
    position: relative;
    width: 90%;
    max-width: 400px;
    border: 1px solid var(--card-border);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.contact-modal.active .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-color);
    cursor: pointer;
    padding: 0.5rem;
    line-height: 1;
    transition: all 0.3s ease;
}

.modal-close:hover {
    color: var(--primary-color);
    transform: rotate(90deg);
}

.email-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
    padding: 1rem;
    background: var(--card-bg);
    border-radius: 8px;
    border: 1px solid var(--card-border);
}

.email {
    font-family: monospace;
    font-size: 1.1rem;
    color: var(--primary-color);
}

.copy-btn {
    padding: 0.5rem 1rem;
    background: var(--primary-color);
    color: var(--bg-color);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.copy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.copy-status {
    text-align: center;
    min-height: 20px;
    margin-top: 0.5rem;
}

.copy-status.success {
    color: var(--accent-color);
}

.copy-status.error {
    color: #ff4d4d;
} 