body {
    margin: 0;
    padding: 0;
    font-family: var(--font-body);
    background-color: var(--background-dark);
    color: var(--text-primary);
}

.projects-main {
    padding: 50px 50px;
    text-align: center;
}

.projects-main a {
    text-decoration: none;
}

.projects-title {
    font-family: var(--font-heading);
    color: var(--accent-purple);
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.projects-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.project-item {
    flex: 0 0 280px;
    width: 280px; /* Adjusted width for consistency */
    height: auto; /* Adjusted to accommodate the content */
    background-color: var(--background-dark);
    border-radius: 10px;
    text-align: center;
    padding: 20px; /* Increased padding for better spacing */
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Ensures that image, title, and text are evenly spaced */
    align-items: center;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden; /* Prevents content overflow */
}

.project-item img {
    width: 100%; /* Ensures the image fills the container */
    height: 150px; /* Fixed height for images */
    object-fit: cover; /* Ensures the image fits without distortion */
    border-radius: 10px;
    margin-bottom: 15px; /* Increased space between image and text */
    transition: transform 0.3s ease;
}

.project-item h2 {
    font-size: 1.2rem;
    font-family: var(--font-heading);
    color: var(--text-primary);
    margin-bottom: 10px; /* Space between title and the rest of the content */
    text-align: center;
}

.project-tools {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 15px; /* Space between tools and description */
}

.project-tools .skill {
    font-size: 0.9rem;
    color: var(--accent-purple);
    background-color: var(--background-light);
    border-radius: 5px;
    padding: 5px 10px;
    text-align: center;
}

.project-item p {
    font-size: 0.9rem;
    color: var(--text-primary);
    line-height: 1.4;
    margin-bottom: 10px;
}

.project-item:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
}
