/* General reset */
* {

    box-sizing: border-box;
}

/* Background and Global Styles */
html, body {
    height: 100%; /* Ensure html and body stretch to the full height */
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background-image: url('../images/ios-13-stock-ipados-blue-black-background-amoled-ipad-hd-5120x5120-795.jpg');
    background-repeat: no-repeat;
    background-size: cover;
    background-attachment: fixed;
    background-position: center;
    color: #f8f8f8;
    scroll-behavior: smooth;
}

/* Ensure the body stretches to fit the content */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Ensure the body stretches to the viewport height */
}

/* Projects Section */
.projects {
    flex: 1; /* Allow the projects section to take up available space */
    padding: 60px 20px;
    text-align: center;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 columns */
    gap: 20px;
    margin: 0 auto; /* Center the grid horizontally */
    max-width: 1200px; /* Limit the grid width */
}

.project {
    background: rgba(0, 0, 0, 0.6); /* Dark background for the box */
    border: 1px solid rgba(255, 255, 255, 0.2); /* Subtle border */
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    padding: 0px; /* Adjusted padding for consistency */
}

.project:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.5);
}

.project img {
    width: 100%;
    height: 200px; /* Adjusted height for consistency */
    object-fit: cover;
    border-radius: 5px; /* Add slight rounding to the image */
}

.project-title {
    margin-top: 15px; /* Increased spacing between the image and the title */
    color: rgb(204, 204, 204);
    text-align: center;
    padding: 15px 0; /* Increased padding for the title box */
    font-size: 1.5rem; /* Increased font size for the title */
    font-weight: bold;
    border-radius: 5px; /* Match the rounding of the image */
}

.project h3 {
    margin: 0;
}

/* Footer */
.footer {
    margin-top: auto; /* Push the footer to the bottom */
    text-align: center;
    padding: 15px; /* Consistent padding */
    background: rgba(0, 0, 0, 0.6); /* Semi-transparent black background */
    color: white;
    font-size: 0.9rem;
    width: 100%;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.3); /* Subtle shadow for consistency */
    display: flex;
    flex-direction: column; /* Ensure content stacks vertically */
    gap: 10px; /* Add spacing between text and buttons */
}

/* Social Buttons */
.social-buttons {
    margin-top: 20px;
    display: flex;
    gap: 15px;
    justify-content: center;
}

.social-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(39, 39, 39, 0.3);
    color: white;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: bold;
    padding: 8px 15px;
    border-radius: 9999px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    transition: background 0.3s ease, transform 0.2s ease;
}

.social-button img {
    width: 20px;
    height: 20px;
    object-fit: cover;
}

.social-button:hover {
    background: rgba(49, 73, 211, 0.568);
    transform: translateY(-2px);
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .project-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columns for smaller screens */
        gap: 15px;
    }

    .project {
        padding: 15px; /* Reduce padding for smaller screens */
    }

    .project img {
        height: 150px; /* Reduce image height for smaller screens */
    }

    .project-title {
        font-size: 1.2rem; /* Reduce font size for smaller screens */
    }

    .social-buttons {
        flex-wrap: wrap;
        gap: 10px;
    }

    .social-button {
        font-size: 0.8rem;
        padding: 6px 12px;
    }
}

@media screen and (max-width: 480px) {
    .project-grid {
        grid-template-columns: 1fr; /* 1 column for very small screens */
        gap: 10px;
    }

    .project {
        padding: 10px; /* Further reduce padding for very small screens */
    }

    .project img {
        height: 120px; /* Further reduce image height */
    }

    .project-title {
        font-size: 1rem; /* Further reduce font size */
    }

    .footer {
        font-size: 0.8rem;
        padding: 15px;
    }

    .social-button {
        font-size: 0.7rem;
        padding: 5px 10px;
    }
}
