/* Projects Section */
#projects {
    padding: 100px 0;
    text-align: center;
}

#projects h2 {
    font-size: 2.5rem;
    color: #E4ECFF;
    margin-bottom: 3rem;
    font-family: 'Inter', sans-serif;
    font-weight: bold;
}

#projects h2 span {
    color: #CBACF9;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.project-card {
    display: grid; /* Use grid to size outer container to inner */
    /* Visual styles are moved to the inner wrapper */
}

.project-card .card-content-wrapper {
    background-color: #1A1A2E;
    border-radius: 23px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    text-align: left;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    grid-area: 1 / 1;
    height: 100%;
    box-sizing: border-box;
}

.project-card:hover .card-content-wrapper {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

#projects .parallax-card {
    transition: transform 0.1s ease-out;
    will-change: transform;
}

.project-image {
    width: 100%;
    height: 300px; /* Or a suitable fixed height */
    object-fit: cover;
    border-radius: 15px;
    margin-bottom: 1.5rem;
}

.project-card h3 {
    font-size: 1.5rem;
    color: #E4ECFF;
    font-family: 'Inter', sans-serif;
    margin-bottom: 0.5rem;
}

.project-card p {
    font-size: 1rem;
    color: #A9A9D0;
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    min-height: 5em; /* Ensures consistent height */
}

.project-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto; /* Pushes footer to the bottom */
}

.tech-icons {
    display: flex;
    gap: 0.5rem;
}

.tech-icon {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    object-fit: contain;
}

.icon-wrapper {
    position: relative;
    display: inline-block;
}

.icon-wrapper::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    z-index: 10;
}

.icon-wrapper:hover::after {
    opacity: 1;
    visibility: visible;
}

.project-link {
    color: #E4ECFF;
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    transition: color 0.3s ease;
}

.project-link::after {
    content: ' →';
    transition: transform 0.3s ease;
    display: inline-block;
}

.project-link:hover {
    color: #CBACF9;
}

.project-link:hover::after {
    transform: translateX(5px);
}

@media (max-width: 768px) {
    #projects {
        padding-top: 0;
        padding-bottom: 0;
    }

    .projects-grid {
        grid-template-columns: 1fr; /* Stack cards in a single column */
    }

    #projects h2 {
        font-size: 30px; /* Reduce font size for mobile */
        max-width: 300px; /* Force text to wrap */
        margin-left: auto;
        margin-right: auto;
    }
}
