/* Works Page Specific Styles */

.works-hero {
    padding-top: 220px;
    padding-bottom: 120px;
}

.works-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    column-gap: 80px;
    row-gap: 120px;
    margin-top: 40px;
    padding-bottom: 160px;
}

/* Staggered Layout */
.work-item:nth-child(even) {
    margin-top: 160px;
}

.work-item {
    cursor: pointer;
    display: block;
    text-decoration: none;
    position: relative;
    /* Ensure z-index works if needed */
}

.work-img-container {
    width: 100%;
    aspect-ratio: 4/5;
    /* Portrait for more elegance */
    background-color: #1a1a1a;
    overflow: hidden;
    margin-bottom: 32px;
    position: relative;
}

.work-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
    will-change: transform;
}

.work-item:hover .work-img-container img {
    transform: scale(1.08);
}

.work-meta {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    /* Light mode default, check if we need dark/light */
    padding-bottom: 24px;
    position: relative;
}

/* Animated line on hover */
.work-meta::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 0%;
    height: 1px;
    background-color: #000;
    transition: width 0.4s ease;
}

.work-item:hover .work-meta::after {
    width: 100%;
}

.work-info h3 {
    font-size: 2.2rem;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--color-text);
    letter-spacing: -0.02em;
}

.work-info span {
    color: #666;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: block;
}

.work-year {
    color: #333;
    font-size: 1rem;
    font-weight: 500;
}

/* Bottom Navigation */
.next-project-link {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding-top: 60px;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 120px;
}

.next-project-link p {
    font-size: 1.1rem;
    color: #999;
    font-weight: 400;
}

.big-link {
    font-family: var(--font-heading);
    font-size: 4rem;
    color: var(--color-text);
    text-decoration: none;
    font-weight: 500;
    letter-spacing: -0.02em;
    display: inline-flex;
    align-items: center;
    gap: 20px;
    transition: opacity 0.3s ease;
}

.big-link span {
    transition: transform 0.3s ease;
}

.big-link:hover {
    opacity: 0.7;
}

.big-link:hover span {
    transform: translateX(10px);
}

@media (max-width: 1024px) {
    .works-grid {
        column-gap: 40px;
        row-gap: 80px;
    }

    .work-item:nth-child(even) {
        margin-top: 80px;
    }

    .big-link {
        font-size: 3rem;
    }
}

@media (max-width: 768px) {
    .works-hero {
        padding-top: 140px;
        padding-bottom: 60px;
    }

    .works-grid {
        grid-template-columns: 1fr;
        row-gap: 60px;
        column-gap: 0;
    }

    .work-item:nth-child(even) {
        margin-top: 0;
    }

    .work-img-container {
        aspect-ratio: 4/3;
        /* Back to landscape for mobile usually better, or keep portrait */
    }

    .next-project-link {
        flex-direction: column;
        gap: 20px;
    }

    .big-link {
        font-size: 2.5rem;
    }
}