/* Container */
#projects-container {
    margin: 0 auto;
    padding: 10px 20px;
    background-color: var(--bs-white);
}

/* Grid Container */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 20px;
    margin: 0 auto;
}

/* Project Card */
.project-card {
    background: var(--bs-white);
    border-radius: 8px;
    box-shadow: 0 0.125rem 0.25rem rgba(var(--bs-dark-rgb), 0.075);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Image Container */
.project-image {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    overflow: hidden;
}

/* Image Styling */
.project-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Maintains aspect ratio while filling container */
    transition: transform 0.3s ease;
}

/* Optional hover effect */
.project-image:hover img {
    transform: scale(1.05);
}

/* Content Area */
.project-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

/* Project Title */
.project-title {
    margin: 0 0 1rem;
    font-size: 1.25rem;
}

.project-title a {
    color: var(--bs-body-color);
    text-decoration: none;
}

.project-title a:hover {
    color: var(--bs-gray-700);
}

/* Tags */
.project-tags {
    margin-bottom: 1rem;
}

.project-tag {
    display: inline-block;
    background: var(--bs-gray-200);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.875rem;
    margin: 0 0.5rem 0.5rem 0;
}

/* Description */
.project-description {
    max-width: 65ch;  /* Optimal line length for readability */
    margin-bottom: 1.5rem;
    color: var(--bs-gray-700);
    line-height: 1.6;
}

/* Meta Section */
.project-meta {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Project Links */
.project-links {
    display: flex;
    gap: 0.75rem;
}

.project-link {
    padding: 0.5rem 1rem;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.875rem;
    transition: background-color 0.2s;
}

.project-live-link {
    background: var(--bs-primary);
    color: white;
}

.project-github-link {
    background: var(--bs-dark);
    color: white;
}

.project-live-link:hover {
    background: var(--bs-primary-dark);
}

.project-github-link:hover {
    background: var(--bs-gray-700);
}

/* Date */
.project-date {
    color: var(--bs-gray-600);
    font-size: 0.875rem;
}

/* Section Spacing */
.projects-section {
    margin-bottom: 3rem;
}

#featured-projects {
    margin-top: 2rem;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    #projects-container {
        padding: 10px;
    }
    
    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1rem;
        padding: 10px;
    }

    .project-content {
        padding: 1rem;
    }
    
    .project-title {
        font-size: 1.1rem;
    }
}