/* General Page Styling */
body {
    background-color: #f8f9fa;
    font-family: 'Inter', 'Roboto', sans-serif;
    color: #333;
}

/* Page Header */
h1 {
    font-size: 3rem;
    font-weight: 700;
    color: #1e293b;
    text-align: center;
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Project Grid: Centered, with fixed-width cards */
.grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* Centers the cards */
    gap: 2rem; /* Space between cards */
    padding: 2rem 0;
}

/* Project Card: Fixed width (~1/3 screen), ensuring 2 per row */
.project-card {
    background-color: white;
    width: calc(33.33vw - 2rem); /* ~1/3 of viewport width, adjusting for gap */
    max-width: 500px; /* Prevents cards from getting too large */
    min-width: 300px; /* Ensures minimum size */
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* Project Image */
.project-card img {
    width: 100%;
    height: 250px; /* Fixed height */
    object-fit: cover; /* Prevents stretching */
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

/* Project Content */
.project-content {
    padding: 1.5rem;
    flex-grow: 1;
}

.project-title {
    font-size: 1.6rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.project-description {
    font-size: 1rem;
    text-align: justify !important;
    color: #555;
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* View Project Button */
.project-button {
    display: inline-block;
    background-color: #007acc;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    padding: 12px 18px;
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
    transition: background-color 0.3s ease-in-out;
}

.project-button:hover {
    background-color: #005f99;
}

/* Home Icon Link (Top Right Corner) */
.home-icon {
    position: absolute;
    top: 20px;
    left: 30px;
    font-size: 28px; /* Adjust icon size */
    color: #007acc; /* Matches theme */
    transition: transform 0.3s ease-in-out, color 0.3s ease-in-out;
}

/* Hover Effect */
.home-icon:hover {
    transform: scale(1.2);
    color: #005f99; /* Slightly darker on hover */
}

