:root {
    --primary-color: #214835;
    --secondary-color: #e8e6e1;
    --text-color: #333;
    --light-text: #f5f5f5;
    --bg-color: #ffffff;
    --card-bg: #f9f9f9;
    --border-color: #e0e0e0;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s ease;
}

.dark-mode {
    --primary-color: #3a7d5c;
    --secondary-color: #2c2c2c;
    --text-color: #e8e6e1;
    --bg-color: #1a1a1a;
    --card-bg: #222;
    --border-color: #444;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
    transition: var(--transition);
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect width="100" height="100" fill="none" stroke="%23214835" stroke-width="0.5" opacity="0.1"/></svg>');
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 导航栏样式 - Liquid Glass 液态玻璃效果 */
header {
    position: fixed;
    top: 10px;
    left: 12px;
    right: 12px;
    width: calc(100% - 24px);
    z-index: 1000;
    background: radial-gradient(
        ellipse 120% 200% at 50% 0%,
        rgba(255, 255, 255, 0.151) 10%,
        rgba(255, 255, 255, 0.295) 50%,
        rgba(255, 255, 255, 0.616) 100%
    );
    backdrop-filter: blur(5px) saturate(140%);
    -webkit-backdrop-filter: blur(5px) saturate(140%);
    padding: 14px 20px;
    border-radius: 16px;
    box-shadow: 0 4px 8px rgba(255,255,255,0.6) inset, 0 -2px 4px rgba(0,0,0,0.03) inset, 0 2px 4px rgba(0,0,0,0.02) inset, 0 4px 24px rgba(0,0,0,0.06), 0 1px 0 rgba(255,255,255,0.5);
    transition: all 0.5s cubic-bezier(0.25,0.46,0.45,0.94);
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.25);
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 8px;
    right: 8px;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.507) 20%, rgba(255,255,255,0.767) 50%, rgba(255,255,255,0.555) 80%, transparent 100%);
    pointer-events: none;
}

header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 6px;
    right: 6px;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(0,0,0,0.06) 20%, rgba(0,0,0,0.1) 50%, rgba(0,0,0,0.06) 80%, transparent 100%);
    pointer-events: none;
}

.dark-mode header {
    background: radial-gradient(ellipse 120% 200% at 50% 0%, rgba(30,30,30,0.15) 0%, rgba(25,25,25,0.3) 50%, rgba(20,20,20,0.5) 100%);
    backdrop-filter: blur(5px) saturate(150%);
    -webkit-backdrop-filter: blur(5px) saturate(150%);
    border: 1px solid rgba(255,255,255,0.06);
    box-shadow: 0 1px 2px rgba(255,255,255,0.06) inset, 0 -1px 2px rgba(0,0,0,0.1) inset, 0 2px 6px rgba(0,0,0,0.04) inset, 0 4px 24px rgba(0,0,0,0.25), 0 1px 0 rgba(255,255,255,0.04);
}

.dark-mode header::before {
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.12) 20%, rgba(255,255,255,0.2) 50%, rgba(255,255,255,0.12) 80%, transparent 100%);
}

header.scrolled {
    top: 6px;
    left: 16px;
    right: 16px;
    width: calc(100% - 32px);
    padding: 10px 20px;
    background: radial-gradient(ellipse 120% 200% at 50% 0%, rgba(255,255,255,0.18) 0%, rgba(255,255,255,0.32) 50%, rgba(255,255,255,0.55) 100%);
    box-shadow: 0 1px 2px rgba(255,255,255,0.5) inset, 0 -1px 2px rgba(0,0,0,0.03) inset, 0 2px 4px rgba(0,0,0,0.02) inset, 0 8px 32px rgba(0,0,0,0.1), 0 1px 0 rgba(255,255,255,0.4);
}

.dark-mode header.scrolled {
    background: radial-gradient(ellipse 120% 200% at 50% 0%, rgba(30,30,30,0.2) 0%, rgba(25,25,25,0.38) 50%, rgba(20,20,20,0.58) 100%);
    box-shadow: 0 1px 2px rgba(255,255,255,0.05) inset, 0 -1px 2px rgba(0,0,0,0.12) inset, 0 2px 6px rgba(0,0,0,0.05) inset, 0 8px 32px rgba(0,0,0,0.35), 0 1px 0 rgba(255,255,255,0.03);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 30px;
}

.nav-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
    opacity: 0.4;
}

.nav-divider::after {
    content: '|';
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 400;
    position: relative;
    padding: 5px 0;
    transition: var(--transition);
}

.nav-links a:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--primary-color);
    transition: var(--transition);
}

.nav-links a:hover:after {
    width: 100%;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.theme-toggle {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--text-color);
    transition: var(--transition);
}

.theme-toggle:hover {
    color: var(--primary-color);
    transform: rotate(20deg);
}


.hero {
    padding: 160px 0 100px;
    text-align: center;
    position: relative;
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hero .container {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0 20px;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(33, 72, 53, 0.1), transparent);
    z-index: -1;
}

.hero h1 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 20px;
    letter-spacing: 2px;
}

.hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 40px;
    color: var(--text-color);
    opacity: 0.8;
}

.typed-text {
    color: var(--primary-color);
    font-weight: 600;
}

.hero-btns {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

.btn {
    padding: 12px 30px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    display: inline-block;
    border: 1px solid var(--primary-color);
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.section {
    padding: 100px 0;
}

.section-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 60px;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: var(--primary-color);
}

.about-content {
    display: flex;
    align-items: center;
    gap: 50px;
}

.about-img {
    flex: 1;
    position: relative;
}

.portrait {
    width: 100%;
    max-width: 400px;
    border-radius: 5px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 10px solid var(--bg-color);
    outline: 1px solid var(--border-color);
}

.about-img::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    width: 100%;
    height: 100%;
    border: 1px solid var(--primary-color);
    z-index: -1;
    opacity: 0.3;
    transition: var(--transition);
}

.about-text {
    flex: 1;
}

.about-text h3 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.about-text h4 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.about-text p {
    margin-bottom: 20px;
    text-align: justify;
}

.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
}

.skill-card {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 5px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.skill-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.skill-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.skill-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    font-family: 'Cormorant Garamond', serif;
}

.skill-card p {
    color: var(--text-color);
    opacity: 0.8;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 40px;
}

.project-card {
    background: var(--card-bg);
    border-radius: 5px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.project-img {
    width: 100%;
    height: 250px;
    background: linear-gradient(45deg, #214835, #3a7d5c);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
}

.project-content {
    padding: 25px;
}

.project-content h3 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.project-tags {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.tag {
    background: rgba(33, 72, 53, 0.1);
    color: var(--primary-color);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
}

.contact-container {
    display: flex;
    gap: 50px;
}

.contact-info {
    flex: 1;
}

.contact-info h3 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.8rem;
    margin-bottom: 30px;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: rgba(33, 72, 53, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    color: var(--primary-color);
    font-size: 1.2rem;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--card-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    transition: var(--transition);
    border: 1px solid var(--border-color);
    text-decoration: none;
}

.social-link:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-5px);
    text-decoration: none;
}

.contact-form {
    flex: 1;
}

.form-group {
    margin-bottom: 20px;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    background: var(--card-bg);
    color: var(--text-color);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(33, 72, 53, 0.2);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

footer {
    background: var(--card-bg);
    padding: 50px 0 30px;
    text-align: center;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

.footer-logo {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    display: block;
}

.copyright {
    font-size: 0.9rem;
    opacity: 0.7;
    margin-top: 30px;
}

.ornament {
    position: absolute;
    font-size: 8rem;
    opacity: 0.03;
    z-index: -1;
    color: var(--primary-color);
}

.ornament-1 {
    top: 10%;
    left: 5%;
}

.ornament-2 {
    top: 40%;
    right: 5%;
    transform: rotate(180deg);
}

.ornament-3 {
    bottom: 20%;
    left: 10%;
    transform: rotate(90deg);
}

@media (max-width: 992px) {
    .about-content {
        flex-direction: column;
    }
    .contact-container {
        flex-direction: column;
    }
    .hero h1 {
        font-size: 3rem;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 260px;
        height: 100vh;
        background: var(--bg-color);
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding-top: 80px;
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease;
        z-index: 999;
    }
    .nav-links.active {
        right: 0;
    }
    .nav-links li {
        margin: 0;
        width: 100%;
        text-align: center;
    }
    .nav-links li a {
        display: block;
        padding: 15px 20px;
        font-size: 1.1rem;
        border-bottom: 1px solid var(--border-color);
    }
    .nav-links a:after {
        display: none;
    }
    .nav-divider {
        display: block !important;
        height: 1px;
        background: var(--border-color);
        margin: 8px 20px !important;
        border-bottom: none !important;
    }
    .nav-links li .alangue {
        color: var(--primary-color);
        font-weight: 600;
        background: var(--card-bg);
        margin: 10px 20px;
        border-radius: 6px;
        border: 1px solid var(--primary-color);
        border-bottom: 1px solid var(--border-color);
        width: calc(100% - 40px);
    }
    .hero h1 {
        font-size: 2.5rem;
    }
    .hero-btns {
        flex-direction: column;
        align-items: center;
    }
    .projects-grid {
        grid-template-columns: 1fr;
    }
    header {
        top: 8px;
        left: 8px;
        right: 8px;
        width: calc(100% - 16px);
        padding: 10px 16px;
        border-radius: 12px;
    }
    header.scrolled {
        top: 6px;
        left: 10px;
        right: 10px;
        width: calc(100% - 20px);
        padding: 8px 16px;
    }
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeInUp 0.8s ease forwards;
}
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }

/* 时间轴容器 */
.timeline-container {
    position: relative;
    width: 100%;
    margin: 60px 0 100px;
    padding: 40px 0;
}
.timeline-line {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), transparent);
    transform: translateY(-50%);
    z-index: 1;
}
.events-wrapper {
    position: relative;
    overflow: hidden;
    padding: 20px 0;
}
.events-container {
    display: flex;
    overflow-x: auto;
    padding: 40px 0;
    scrollbar-color: var(--primary-color) transparent;
    scroll-behavior: smooth;
    position: relative;
    z-index: 2;
    overflow-y: hidden;   /* 强制隐藏垂直方向溢出 */
}
.events-container::-webkit-scrollbar {
	height: 8px;
}
.events-container::-webkit-scrollbar-track {
    background: transparent;
}
.events-container::-webkit-scrollbar-thumb {
    background-color: var(--primary-color);
    border-radius: 4px;
}
.fade-overlay {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 100px;
    z-index: 3;
    pointer-events: none;
}
.fade-left {
    left: 0;
    background: linear-gradient(to right, var(--bg-color) 0%, transparent 100%);
}
.fade-right {
    right: 0;
    background: linear-gradient(to left, var(--bg-color) 0%, transparent 100%);
}
.event-card {
    flex: 0 0 320px;
    background: var(--card-bg);
    border-radius: 10px;
    margin: 0 25px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 380px;
}
.event-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}
.event-color {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 8px;
}
.event-content {
    padding: 30px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.event-header {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px dashed var(--border-color);
}
.event-version {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--primary-color);
}
.event-date {
    font-size: 1rem;
    color: var(--text-color);
    opacity: 0.8;
    display: flex;
    align-items: center;
}
.event-date i {
    margin-right: 8px;
    color: var(--primary-color);
}
.event-description {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-top: auto;
    padding-top: 20px;
}
.event-decoration {
    position: absolute;
    bottom: -20px;
    right: -20px;
    font-size: 8rem;
    opacity: 0.05;
    color: var(--primary-color);
    z-index: -1;
    transform: rotate(15deg);
}
.timeline-nav {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
}
.nav-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1.2rem;
    color: var(--primary-color);
}
.nav-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
}
/* 禁用按钮样式 */
.nav-btn.disabled {
    opacity: 0.4;
    pointer-events: none;
    cursor: default;
    transform: none;
    background: var(--card-bg);
    color: var(--text-color);
}

.alangue {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    position: relative;
    padding: 3px 10px;
    border: 1px solid var(--primary-color);
    border-radius: 4px;
    transition: var(--transition);
}
.alangue:after { display: none; }
.alangue:hover:after { display: none; }
.alangue:hover {
    color: var(--bg-color);
    background: var(--primary-color);
}

/* 模态框 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(68, 68, 68, 0.552);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    backdrop-filter: blur(10px);
}
.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}
.modal-content {
    width: 90%;
    max-width: 500px;
    background: var(--card-bg);
    border-radius: 10px;
    padding: 40px;
    box-shadow: var(--shadow);
    transform: translateY(20px);
    transition: transform 0.4s;
    border: 1px solid var(--border-color);
    text-align: center;
    position: relative;
}
.modal-overlay.active .modal-content {
    transform: translateY(0);
}
.modal-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--primary-color);
}
.modal-text {
    margin-bottom: 30px;
    line-height: 1.6;
}
.modal-btn {
    padding: 12px 30px;
    border-radius: 30px;
    border: none;
    background: var(--primary-color);
    color: white;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1rem;
    font-family: inherit;
}
.modal-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}
.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-color);
    transition: var(--transition);
}
.modal-close:hover {
    color: var(--primary-color);
}

.downloadcv-btn :hover{
	cursor:wait;
}
