/* Project page specific styles */
.project-header {
    padding: 3rem;
    margin: 0 auto;
}

.project-title {
    font-family: var(--font-primary);
    font-size: 5rem;
    font-weight: 200;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: 2px;
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: 12px;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.intro-content {
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: start;
}

.intro-left {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.intro-left h2 {
    margin-bottom: 3rem; /* Increased from 2rem */
}

.intro-text {
    font-size: 1.1rem;
    line-height: 1.6;
}

.intro-text p {
    margin-bottom: 2.5rem; /* Increased from 1.5rem */
}

.keywords {
    margin-top: 3rem; /* Increased from auto */
    padding-top: 3rem; /* Increased from 2rem */
    border-top: 1px solid rgba(0,0,0,0.1); /* Added separator line */
    font-size: 0.9rem;
}

.intro-image {
    height: 100%;
}

.intro-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.pdf-button {
    height: 6rem;
    width: 45%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 3rem;
    padding: 1rem 2rem;
    background-color: #646977;
    color: white;
    border: none;
    border-radius: 100px;
    font-size: 1rem;
    transition: all 0.3s ease;
    min-width: 200px;
    cursor: pointer;
}

.pdf-button:hover {
    background-color: #4e5461;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Full-width, edge-to-edge image */
.full-width-image {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    margin-top: 3rem;
    margin-bottom: 3rem;
    display: block;
    overflow: hidden;
    border-radius: 12px;
}

.full-width-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* Tablet breakpoint */
@media (max-width: 1024px) {
    .intro-content {
        gap: 3rem;
    }
}

/* Mobile breakpoint */
@media (max-width: 768px) {
    .intro-content {
        grid-template-columns: 1fr;
    }

    .intro-image {
        order: -1;
        margin-bottom: 2rem;
    }

    .intro-image img {
        max-height: 500px;
    }

    .pdf-button {
        height: 6rem;
        width: 85%;
    }
}

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

.overview-item h3 {
    font-family: var(--font-primary);
    font-size: 1.2rem;
    font-weight: 200;
    margin-bottom: 0.5rem;
}

.overview-item p {
    font-size: 1.1rem;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .overview-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

.description-images {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin: 2rem 0;
}

.description-images img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
    .description-images {
        grid-template-columns: 1fr;
    }

    .description-images img {
        height: 250px;
    }
}

.story-comic {
    max-height: 85vh;
    height: auto;
    display: block;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Simple dropdown for "My Works" */
.nav-links li.projects {
    position: relative;
    display: inline-block;
}

.nav-links .projects-dropdown {
    /* remove display:none so opacity/transform can transition */
    position: absolute;
    z-index: 200;
    top: 100%;
    left: -0.5rem;
    min-width: 220px;
    box-sizing: border-box;
    padding: 0rem .5rem;
    border-radius: 4px;

    opacity: 0;
    transform: translateY(-6px);
    visibility: hidden;
    pointer-events: none;

    background-color: var(--snow-100);

    /* 0.2s transition for show/hide */
    transition: opacity 200ms ease, transform 200ms ease, visibility 200ms;
}

.nav-links .projects-dropdown li {
    list-style: none;
    margin: 0.25rem 0;
}

.nav-links .projects-dropdown a {
    display: block;
    box-sizing: border-box;
    white-space: nowrap;       /* 强制单行 */
    overflow: hidden;          /* 隐藏溢出 */
    text-overflow: ellipsis;   /* 超出显示省略号 */
}


/* show on hover and keyboard focus: animate in */
.nav-links li.projects:hover .projects-dropdown,
.nav-links li.projects:focus-within .projects-dropdown {
    /* display:block removed so transition works */
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
    pointer-events: auto;
}

/* responsive fallback */
@media (max-width: 700px) {
    .nav-links .projects-dropdown {
        position: static;
        box-shadow: none;
        background: transparent;
        padding: 0;
        opacity: 1;
        transform: none;
        visibility: visible;
        pointer-events: auto;
        transition: none;
    }
    .nav-links .projects-dropdown a {
        padding-left: 1.25rem;
    }
}