.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin: 50px 0;
}

.portfolio-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    height: 450px; /* Fixed height for all items */
}

.portfolio-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.portfolio-item:hover .portfolio-image {
    transform: scale(1.05);
}

.portfolio-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: white;
    padding: 25px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

/* Show content always at bottom */
.portfolio-content {
    transform: translateY(0);
    background: rgba(0,0,0,0.7);
}

/* OR use this for hover effect instead */
/*
.portfolio-item:hover .portfolio-content {
    transform: translateY(0);
}
*/

.portfolio-title {
    font-size: 1.3rem;
    margin-bottom: 12px;
    color: white;
}

.portfolio-description {
    color: rgba(255,255,255,0.9);
    margin-bottom: 20px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.portfolio-link {
    display: inline-block;
    color: #4a90e2;
    font-weight: 600;
    text-decoration: none;
    background: white;
    padding: 8px 15px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.portfolio-link:hover {
    background: #f0f0f0;
    color: #3a7bc8;
}

.text-center {
    text-align: center;
}

@media (max-width: 768px) {
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
    
    .portfolio-item {
        height: 300px;
    }
}