/* Projects Page Specific Styles */
.projects-page {
    padding-top: 120px;
    padding-bottom: 80px;
}

.projects-section {
    margin-bottom: 5rem;
}

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

/* FROM UIVERSE.IO BY GHARSH11032000 - ADAPTED FOR THEME */
.card {
    position: relative;
    width: 100%; /* Scale to grid */
    height: 250px; /* Increased height for better description fit */
    background-color: rgba(30, 41, 59, 0.4);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    perspective: 1000px;
    box-shadow: 0 0 0 2px rgba(111, 168, 255, 0.1);
    transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(111, 168, 255, 0.2);
}

.card svg {
    width: 60px; /* Slightly larger */
    fill: var(--primary);
    transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    filter: drop-shadow(0 0 10px rgba(111, 168, 255, 0.3));
}

.card:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
    border-color: var(--primary);
}

.card__content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 24px;
    box-sizing: border-box;
    background-color: rgba(10, 15, 25, 0.95); /* Deeper dark on hover */
    transform: rotateX(-90deg);
    transform-origin: bottom;
    transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    justify-content: center;
    z-index: 10;
}

.card:hover .card__content {
    transform: rotateX(0deg);
}

.card__title {
    margin: 0;
    font-size: 1.5rem;
    color: var(--primary);
    font-weight: 700;
    font-family: 'Orbitron', sans-serif;
}

.card:hover svg {
    scale: 0;
}

.card__description {
    margin: 12px 0 0;
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Future Image Integration */
.card__img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    opacity: 1;
}

/* Hide SVG if an image is present (assuming manual selection or JS, 
   but for now we'll just handle it by z-index or explicit hide) */
.card:has(.card__img[src*="."]) svg {
    display: none;
}

/* Responsiveness */
@media screen and (max-width: 1100px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

@media screen and (max-width: 640px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .projects-page {
        padding-top: 100px;
    }
    
    .card {
        height: 220px;
    }
}
