#project {
    padding: 100px 0;
    background: linear-gradient(135deg, #f9f5f0 0%, #f0e6d6 100%);
}

/* Stack scroll effect */
.stack-wrapper {
    position: relative;
    /* height: 100vh; */
}

.stack-card {
    position: sticky;
    top: 100px;
    height: 550px;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    border-radius: var(--radius, 12px);
    background-color: var(--white, #ffffff);
    border: 1px solid rgba(139, 69, 19, 0.1);
    box-shadow: 0 15px 35px rgba(139, 69, 19, 0.1);
    overflow: hidden;
    transition: transform 0.6s ease, opacity 0.6s ease;
    z-index: var(--i);
}

.stack-card.inactive {
    transform: scale(0.9) translateY(50px);
    opacity: 0.4;
}

/* Image side */
.project-img-wrapper {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.project-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.stack-card:hover .project-img {
    transform: scale(1.08);
}

/* Content side */
.project-content {
    flex: 1.2;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.project-title {
    color: var(--primary-brown, #6b4e3e);
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    position: relative;
}

.project-cluster {
    color: var(--primary-brown, #6b4e3e);
    font-weight: 800;
    position: relative;
}

.project-title::after {
    content: "";
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--secondary-brown, #a0522d);
    border-radius: 2px;
    transition: width 0.4s ease;
}

.stack-card:hover .project-title::after {
    width: 80px;
}

.project-subtitle {
    color: var(--gray-700);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* Detail tag styling */
.detail-tag {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, var(--light-brown, #f5e9d9), #f0e6d6);
    color: var(--primary-brown, #6b4e3e);
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin: 6px 6px 0 0;
    box-shadow: 0 4px 6px rgba(139, 69, 19, 0.1);
}

.detail-tag i {
    margin-right: 6px;
}

/* Button styling */
.detail-unit-btn {
    background-color: var(--primary-brown, #6b4e3e);
    color: white;
    padding: 12px 20px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: 100%;
}

.detail-unit-btn:hover {
    background-color: var(--secondary-brown, #a0522d);
}

.detail-unit-btn:focus {
    outline: none;
}

/* Responsive */
@media (max-width: 1024px) {
    .stack-card {
        height: 480px;
    }
}

@media (max-width: 768px) {
    .stack-card {
        flex-direction: column;
        height: auto;
    }

    .project-img-wrapper {
        height: 280px;
    }

    .project-content {
        padding: 1.5rem;
    }
}
