body,
html {
    margin: 0;
    padding: 0;
    background-color: #f4ecd8;
    font-family: "Helvetica Neue", Helvetica, Arial, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Serif SC", STSong, serif;
    color: #4a3b32;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

.global-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 80px;
    background: rgba(244, 236, 216, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #d4c4b7;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 50px;
    box-sizing: border-box;
    z-index: 9999;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
}

.nav-left {
    display: flex;
    align-items: center;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 15px;
    transition: transform 0.3s ease;
}

.logo-link:hover {
    transform: scale(1.02);
}

.nav-logo {
    height: 60px;
    width: auto;
    object-fit: contain;
    border-radius: 4px;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.15));
}

.nav-brand {
    font-size: 1.4rem;
    font-weight: bold;
    color: #8b2b2b;
    letter-spacing: 3px;
    font-family: "Noto Serif SC", STSong, serif;
}

.nav-right {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-item {
    text-decoration: none;
    color: #4a3b32;
    font-size: 1.05rem;
    font-weight: bold;
    letter-spacing: 2px;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    padding: 8px 18px;
    border-radius: 6px;
    overflow: hidden;
    font-family: "Noto Serif SC", STSong, serif;
}

.nav-item:hover {
    color: #f9f6ef;
    background-color: #a84b4b;
    transform: scale(1.05);
}

.nav-petal {
    position: absolute;
    width: 6px;
    height: 6px;
    background: #ffcce5;
    border-radius: 10px 0 10px 0;
    pointer-events: none;
    z-index: 10;
}

.bg-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
}

.bg-layer {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6;
}

.sidebar-nav {
    position: fixed;
    top: 100px;
    left: 40px;
    width: 280px;
    box-sizing: border-box;
    max-height: calc(100vh - 140px);
    background-color: #f9f6ef;
    border: 2px solid #8b2b2b;
    padding: 20px 10px;
    z-index: 90;
    box-shadow: 5px 5px 0px rgba(139, 43, 43, 0.15);
    animation: floatSidebar 6s ease-in-out infinite;
    display: flex;
    flex-direction: column;
}

@keyframes floatSidebar {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }

    100% {
        transform: translateY(0);
    }
}

.sidebar-nav::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 6px;
    right: 6px;
    bottom: 6px;
    border: 1px dashed #d4c4b7;
    pointer-events: none;
    z-index: 20;
}

.nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    position: relative;
    z-index: 1;
    overflow-y: auto;
    overflow-x: hidden;
    flex-grow: 1;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.nav-list::-webkit-scrollbar {
    display: none;
}

.nav-list li {
    margin: 10px 0;
    text-align: center;
    position: relative;
}

.nav-list a {
    display: block;
    padding: 10px 16px;
    margin: 0 10px;
    color: #4a3b32;
    text-decoration: none;
    font-size: 1.05rem;
    font-weight: bold;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    border-radius: 6px;
    white-space: nowrap;
}

.nav-list a:hover {
    color: #f9f6ef;
    background-color: #a84b4b;
    transform: scale(1.05);
}

.nav-list a.active {
    color: #f9f6ef;
    background-color: #8b2b2b;
    transform: scale(1.05);
}

.sidebar-illustration {
    position: relative;
    width: calc(100% - 20px);
    margin: 20px auto 0 auto;
    border-radius: 4px;
    overflow: hidden;
    z-index: 1;
    flex-shrink: 0;
}

.sidebar-illustration img {
    width: 100%;
    display: block;
    opacity: 0.95;
}

.petal {
    position: absolute;
    width: 8px;
    height: 8px;
    background: #ffcce5;
    border-radius: 10px 0 10px 0;
    pointer-events: none;
    z-index: 10;
}

.gallery-wrapper {
    max-width: 1100px;
    margin: 100px 40px 80px 380px;
}

.intro-section {
    text-align: center;
    margin-bottom: 60px;
    background: rgba(244, 236, 216, 0.85);
    padding: 40px;
    border-radius: 8px;
    border: 1px dashed #d4c4b7;
}

.intro-section h2 {
    font-size: 2.5rem;
    color: #8b2b2b;
    margin-bottom: 20px;
    letter-spacing: 2px;
}

.intro-section p {
    font-size: 1.15rem;
    color: #4a3b32;
    line-height: 1.8;
    max-width: 800px;
    margin: 0 auto;
}

.cards-container {
    display: flex;
    flex-direction: column;
    gap: 60px;
}

.team-card {
    display: block;
    position: relative;
    background: rgba(250, 246, 235, 0.95);
    border: 1px solid #d4c4b7;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    opacity: 0;
    transform: translateY(40px);
    scroll-margin-top: 120px;
}

.team-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(139, 43, 43, 0.15);
    border-color: #ffb7c5;
}

.card-content {
    padding: 45px 60px;
    /* 增加左右内边距，让纯文本排版更有呼吸感 */
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
}

.team-meta {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 15px;
    border-bottom: 2px solid #8b2b2b;
    padding-bottom: 10px;
}

.team-name {
    font-size: 1.8rem;
    font-weight: bold;
    color: #8b2b2b;
}

.team-location {
    font-size: 1.1rem;
    color: #6d594f;
    font-style: italic;
    font-family: Georgia, serif;
}

.project-title {
    font-size: 1.4rem;
    margin: 10px 0 25px;
    color: #3e2f25;
}

.concept-block {
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.45);
    padding: 20px 24px;
    border-radius: 8px;
    border: 1px solid rgba(212, 196, 183, 0.6);
    box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.5), 0 2px 10px rgba(0, 0, 0, 0.02);
    transition: background 0.3s ease, border-color 0.3s ease;
}

.concept-block:hover {
    background: rgba(255, 255, 255, 0.75);
    border-color: #d4c4b7;
}

.concept-block h4 {
    margin: 0 0 12px 0;
    color: #8b2b2b;
    font-size: 1.05rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.concept-block h4::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    background-color: #8b2b2b;
    transform: rotate(45deg);
    opacity: 0.7;
}

.concept-block p {
    margin: 0;
    line-height: 1.6;
    font-size: 0.95rem;
    color: #4a3b32;
    text-align: justify;
}

.tags-wrapper {
    margin-top: 10px;
}

.tag {
    display: inline-block;
    padding: 6px 14px;
    background-color: #f4ecd8;
    border: 1px solid rgba(139, 43, 43, 0.3);
    color: #8b2b2b;
    border-radius: 20px;
    font-size: 0.85rem;
    margin-right: 10px;
    margin-bottom: 10px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.tag:hover {
    background-color: #8b2b2b;
    color: #f9f6ef;
}

.card-actions {
    margin-top: 25px;
    display: flex;
    gap: 15px;
}

.btn {
    padding: 10px 20px;
    font-size: 0.95rem;
    font-weight: bold;
    border-radius: 4px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-outline {
    background: transparent;
    border: 1px solid #8b2b2b;
    color: #8b2b2b;
}

.btn-outline:hover {
    background: #8b2b2b;
    color: #f9f6ef;
}

.btn-filled {
    background: #8b2b2b;
    border: 1px solid #8b2b2b;
    color: #f9f6ef;
}

.btn-filled:hover {
    background: #a84b4b;
    border-color: #a84b4b;
}

/* =========================================
   详情弹窗 (Modal) 样式
========================================= */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(62, 47, 37, 0.7);
    backdrop-filter: blur(12px);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.modal-overlay.is-active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    width: 96vw;
    max-width: 1600px;
    height: 96vh;
    background: rgba(250, 246, 235, 0.98);
    border: 1px solid rgba(212, 196, 183, 0.8);
    border-radius: 16px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
    position: relative;
    transform: translateY(40px) scale(0.98);
    transition: all 0.5s cubic-bezier(0.25, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-overlay.is-active .modal-content {
    transform: translateY(0) scale(1);
}

.modal-close-btn {
    position: absolute;
    top: 25px;
    right: 35px;
    background: rgba(244, 236, 216, 0.8);
    border: 1px solid #d4c4b7;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 2.5rem;
    color: #8b2b2b;
    cursor: pointer;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.modal-close-btn:hover {
    transform: rotate(90deg);
    background: #8b2b2b;
    color: #f9f6ef;
}

.modal-scroll-area {
    padding: 60px 8%;
    overflow-y: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.modal-scroll-area::-webkit-scrollbar {
    display: none;
}

.modal-header {
    text-align: center;
    margin-bottom: 40px;
}

.location-tag {
    font-size: 0.9rem;
    color: #8b2b2b;
    border: 1px solid #8b2b2b;
    padding: 6px 18px;
    border-radius: 20px;
    font-weight: bold;
    text-transform: uppercase;
}

.modal-header h2 {
    font-size: 3.5rem;
    color: #8b2b2b;
    margin: 20px 0 10px 0;
    letter-spacing: 2px;
}

.modal-header .project-title {
    font-size: 1.5rem;
    color: #4a3b32;
    margin-top: 0;
}

/* 头图（团队合照）保留宽屏横幅视觉，超出部分适度裁剪 */
.modal-hero-img {
    width: 100%;
    max-height: 60vh;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    margin-bottom: 50px;
}

/* 底部海报完全展示原始比例，有多大就展示多大，绝不裁剪 */
.modal-poster-img {
    width: 100%;
    height: auto;
    /* 高度自适应 */
    object-fit: contain;
    /* 保证画面完整包含在内 */
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    margin-bottom: 50px;
    /* 如果觉得竖版海报太宽导致过长，可以解除下面这行的注释来限制最大宽度 */
    /* max-width: 900px; margin-left: auto; margin-right: auto; display: block; */
}

.modal-text-section {
    max-width: 900px;
    margin: 0 auto;
}

.modal-text-section h3 {
    color: #8b2b2b;
    font-size: 1.6rem;
    border-bottom: 2px solid rgba(139, 43, 43, 0.2);
    padding-bottom: 15px;
    margin-top: 40px;
    margin-bottom: 20px;
}

.modal-text-section p {
    font-size: 1.15rem;
    line-height: 1.9;
    color: #4a3b32;
    text-align: justify;
    margin-bottom: 25px;
}

/* ================= 高阶下拉菜单样式 ================= */
.dropdown {
    position: relative;
    display: flex;
    align-items: center;
    height: 100%;
}

.dropdown .nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 纯 CSS 绘制精美小箭头 */
.dropdown-arrow {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
    transition: transform 0.3s ease;
}

.dropdown:hover .dropdown-arrow {
    transform: rotate(225deg) translate(-2px, -2px);
}

.dropdown-content {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    top: 60px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background-color: rgba(250, 246, 235, 0.95);
    min-width: 240px;
    box-shadow: 0px 15px 35px rgba(0, 0, 0, 0.12);
    z-index: 999;
    border-radius: 8px;
    border: 1px solid #d4c4b7;
    backdrop-filter: blur(12px);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.dropdown:hover .dropdown-content {
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.dropdown-content a {
    color: #4a3b32 !important;
    text-decoration: none !important;
    padding: 16px 20px;
    display: block;
    font-size: 0.95rem;
    font-weight: bold;
    text-align: center;
    transition: all 0.3s ease;
    border-bottom: 1px dashed rgba(212, 196, 183, 0.6);
}

.dropdown-content a:last-child {
    border-bottom: none;
}

.dropdown-content a:hover {
    background-color: #8b2b2b;
    color: #f9f6ef !important;
    letter-spacing: 0.5px;
}

/* ================= 全局导航栏移动端适配 ================= */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 10001;
    /* 确保按钮在最上层 */
}

.hamburger span {
    width: 28px;
    height: 3px;
    background-color: #8b2b2b;
    border-radius: 3px;
    transition: all 0.3s ease;
}

@media (max-width: 900px) {
    .global-nav {
        padding: 0 20px;
    }

    .hamburger {
        display: flex;
    }

    .nav-right {
        position: absolute;
        top: 80px;
        left: 0;
        width: 100vw;
        height: 0;
        overflow: hidden;
        flex-direction: column;
        background: rgba(250, 246, 235, 0.98);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        gap: 0;
        transition: height 0.4s ease;
        box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
        align-items: center;
    }

    /* 展开后的菜单 */
    .nav-right.is-active {
        height: 360px;
        padding: 10px 0;
    }

    .nav-item {
        width: 100%;
        text-align: center;
        padding: 15px 0;
        border-radius: 0;
    }

    .dropdown {
        width: 100%;
        flex-direction: column;
        height: auto;
    }

    .dropdown .nav-item {
        justify-content: center;
    }

    /* 移动端下拉菜单改为点击展开，非悬浮 */
    .dropdown-content {
        position: relative;
        top: 0;
        left: 0;
        transform: none;
        width: 100%;
        min-width: unset;
        box-shadow: none;
        border: none;
        background: rgba(139, 43, 43, 0.05);
        display: none;
        /* 默认隐藏 */
        opacity: 1;
        visibility: visible;
        border-radius: 0;
    }

    .dropdown-content.is-expanded {
        display: block;
    }

    .dropdown-content a {
        padding: 12px 20px;
        border-bottom: 1px solid rgba(212, 196, 183, 0.3);
    }

    /* 汉堡按钮变成叉号动画 */
    .hamburger.is-active span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }

    .hamburger.is-active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.is-active span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }
}

/* ================= 一城一景 移动端适配 ================= */
@media (max-width: 900px) {
    .gallery-wrapper {
        margin: 160px 20px 80px 20px;
    }

    /* 侧边栏变顶部横排滑动 */
    .sidebar-nav {
        position: absolute;
        top: 80px;
        left: 0;
        width: 100vw;
        height: auto;
        flex-direction: row;
        align-items: center;
        padding: 10px 15px;
        border: none;
        border-bottom: 2px solid #8b2b2b;
        border-radius: 0;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
        animation: none;
        z-index: 90;
    }

    .sidebar-nav::before,
    .sidebar-illustration {
        display: none;
    }

    .nav-list {
        display: flex;
        flex-direction: row;
        gap: 10px;
        overflow-x: auto;
        padding-bottom: 5px;
    }

    .nav-list li {
        margin: 0;
    }

    .nav-list a {
        padding: 8px 15px;
        font-size: 0.9rem;
        white-space: nowrap;
    }

    /* 卡片与弹窗自适应 */
    .intro-section {
        padding: 25px 20px;
        margin-bottom: 40px;
    }

    .intro-section h2 {
        font-size: 1.8rem;
    }

    .card-content {
        padding: 30px 20px;
    }

    .team-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .team-name {
        font-size: 1.5rem;
    }

    .modal-content {
        width: 95vw;
        height: 90vh;
    }

    .modal-scroll-area {
        padding: 40px 6%;
    }

    .modal-header h2 {
        font-size: 2.2rem;
    }

    .modal-close-btn {
        top: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
        font-size: 2rem;
    }
}