body, hero {
  position: relative;
  min-height: 200vh;
  margin: 0;
}

footer {
  position: relative;
  bottom: 0;
  width: 100%;
  height: 100px; /* Set your footer height */
  background-color: #f2f2f2;
  text-align: center;
  padding: 20px;
  box-sizing: border-box;
}

/* A wrapper to center content */
.wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    min-height: 100vh;
}

/* Grid layout for project items */

.project-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 equal columns */
    gap: 30px;
    max-width: 1000px;
    margin: auto;
    padding: 20px;
}

.project-container > div:nth-child(7) {
  grid-column: 2 / 3; 
}

/* Each project block */
.project {
    position: relative;
    cursor: pointer;
    width: 100%;
    aspect-ratio: 4 / 3; /* Ensures uniform shape */
    overflow: hidden;
}

/* Image styling */
.project img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

/* Hover overlay */
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    border-radius: 10px;
}

.project:hover .overlay {
    opacity: 1;
}

/* Certificates section styling */
.cert-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 80vh;
    gap: 20px;
    padding: 20px;
}

.cert {
    width: 100%;
    max-width: 600px;
    text-align: center;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #fff;
    box-shadow: 0 0 28px rgba(46, 210, 255, 1);
}

.cert a.main {
    text-decoration: none;
    color: black;
    font-weight: bold;
    font-size: 1.2em;
    transition: color 0.3s;
}

.cert:hover {
    color: black;
    background-color: #ADD8E6;
    font-weight: bolder;
    font-size: 1.2em;
}

@media (max-width: 1024px) {
body, hero {
  min-height: 250vh;
}
    .project-container {
        grid-template-columns: 1fr;
    }

    /* Reset the 7th project's grid placement */
    .project-container > div:nth-child(7) {
        grid-column: auto;
    }

    .project {
        aspect-ratio: 4 / 3;
        width: 100%;
        margin: auto;
    }

    .project img {
        width: 100%;
        height: 100%;
    }
}
