/* Global Box Sizing with Vendor Prefixes for Compatibility */
* {
    -webkit-box-sizing: border-box; /* Older Safari/Chrome */
    -moz-box-sizing: border-box;    /* Older Firefox */
    box-sizing: border-box;         /* Standard property */
}

/* Headings */
h1 {
    font-size: 3em;
    position: relative;
    z-index: 2;
    color: #2e2e2e;
}
h2 {
    font-size: 1.2em;
    position: relative;
    z-index: 2;
    color: #2e2e2e;
}

/* Paragraphs and List Items */
p, li {
    font-size: 1rem;
    position: relative;
    z-index: 2;
    color: #4b4b4b;
}

/* Info Container Styling */
.info-container {
    display: flex;
    justify-content: space-between;
    gap: 2rem; 
}

/* Bubble box styling */
.bubble {
    background-color: #f8f8f8; /* Light bubble background */
    border: 2px solid #e0e0e0;
    border-radius: 15px; /* Rounded corners */
    padding: 1.5rem; /* Padding inside bubble */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); /* Subtle shadow */
    width: 100%;
    max-width: 400px;
}

.student-info {
    font-weight: thin;
    font-size: 1.5rem;
    color: #2e2e2e;
    line-height: 1.6;
    margin: 0;
    text-align: left;
}

.connect {
    display: flex;
    flex-direction: column;
    text-align: left;
    align-self: center;

    padding-right: 12.5vw;
}

.connect p {
    font-size: 1.4rem;
    color: #4b4b4b;
    margin: 0;
}

.links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.links a {
    font-size: 1.8rem;
    color: #739072;
    transition: color 0.3s ease, transform 0.3s ease;
}

.links a:hover {
    color: #4b4b4b;
    transform: scale(1.1);
}

.links a::after {
    height: 0;
}

/* Hero Styling */
#hero {
    max-width: 100%;
    width: 100%;
    margin: 12.5rem 0 50px;
    position: relative;
    z-index: 1;
    line-height: 2em;
    font-size: 1.25em;
    color: #2e2e2e;
    text-align: left;
    padding: 0 10%;
}

#hero .hero-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

#hero .hero-info {
    text-align: left;
}

#hero .hero-title {
    font-weight: bold;
    font-size: 2.5rem;
    color: #2e2e2e;
    margin: 0;
}

#hero .hero-subtitle {
    font-size: 1.25rem;
    color: #4b4b4b;
    margin: 0.5rem 0;
}

#hero .connect-container {
    display: flex;
    justify-content: flex-start;
    gap: 1rem;
    margin-top: 1rem;
}

#hero .connect-container a {
    font-size: 1.5rem;
    color: #2e2e2e;
    text-decoration: none;
    transition: color 0.3s ease;
}

#hero .connect-container a:hover {
    color: #739072;
}

/* Header Container */
.container {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

/* Grid container */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    grid-gap: 2rem;
    position: relative;
    padding: 2rem;
}

/* Grid items */
.grid-item {
    background-color: #0d0d0d;
    border-radius: 15px;
    -webkit-border-radius: 15px;  /* Vendor prefix */
    padding: 20px;
    text-align: left;
    position: relative;
    overflow: hidden;
    line-height: 1.4rem;
    transition: all 0.3s ease;
    -webkit-transition: all 0.3s ease; /* Vendor prefix */
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
    border: 2px solid #2e2e3e;
    min-height: 400px;
}

.grid-item:hover {
    background-color: #141424;
    transform: translateY(-10px);
    -webkit-transform: translateY(-10px); /* Vendor prefix */
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
}

/* Image Container within grid item */
.grid-item .image-container {
    width: 100%;
    height: auto;
    overflow: hidden;
    border-radius: 10px;
    -webkit-border-radius: 10px; /* Vendor prefix */
    margin-bottom: 15px;
    max-height: 250px;
}

.grid-item .image-container img {
    width: 100%;
    height: auto;
    object-fit: contain;
    filter: grayscale(100%);
    transition: all 0.3s ease;
    -webkit-transition: all 0.3s ease; /* Vendor prefix */
    border-radius: 10px;
    -webkit-border-radius: 10px; /* Vendor prefix */
    max-width: 100%;
    max-height: 100%;
}

.grid-item:hover .image-container img {
    filter: grayscale(0%) contrast(120%);
    transform: scale(1.05);
    -webkit-transform: scale(1.05); /* Vendor prefix */
    object-fit: contain;
}

/* Grid item h3 and p */
.grid-item h3, .grid-item p {
    cursor: pointer;
    transition: color 0.3s;
    -webkit-transition: color 0.3s; /* Vendor prefix */
    position: relative;
    z-index: 2;
    color: #f8f8ff;
}

.grid-item:hover h3, .grid-item:hover p {
    color: #f8f8ff;
}

/* Buttons within grid item */
.grid-item .buttons {
    display: flex;
    gap: 15px;
    margin-top: auto;
    flex-wrap: wrap;
    justify-content: center;
}

.grid-item .buttons a {
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 5px;
    -webkit-border-radius: 5px; /* Vendor prefix */
    transition: background-color 0.3s ease, color 0.3s ease;
    -webkit-transition: background-color 0.3s ease, color 0.3s ease; /* Vendor prefix */
    font-weight: bold;
    border: 2px solid transparent;
    color: #739072;
}

.grid-item .buttons .github-btn {
    background-color: transparent;
    border: 2px solid #739072;
}

.grid-item .buttons .github-btn:hover {
    background-color: #739072;
    color: #ffffff;
}

.grid-item .buttons .live-demo-btn {
    background-color: #739072;
    color: #ffffff;
    border: 2px solid #739072;
}

.grid-item .buttons .live-demo-btn:hover {
    background-color: #ffffff;
    color: #739072;
}

/* Responsive adjustments for smaller screens */
@media screen and (max-width: 768px) {
    .info-container {
        flex-direction: column; 
        padding: 1rem;
        align-items: center;
    }

    .connect {
        padding-right: 0;
    }

    #hero {
        margin-top: 7rem;
    }

    .student-info {
        align-items: center;
        text-align: center !important;
    }

    .connect {
        align-items: center;
    }

    .bubble {
        max-width: 90%; /* Full width bubbles on small screens */
    }

    .links a {
        font-size: 1.5rem; /* Slightly smaller icons for mobile */
    }

    #hero {
        padding: 0 5%;
    }
    .grid-container {
        padding: 1rem;
        grid-gap: 1.5rem;
    }
    .grid-item {
        padding: 15px;
    }
    .grid-item .image-container {
        margin-bottom: 10px;
    }
    .grid-item h3 {
        font-size: 1.5rem;
    }
    .grid-item p {
        font-size: 0.9rem;
    }
}

@media (max-width: 500px) {
    .grid-item {
        padding: 10px;
        border-radius: 10px;
        -webkit-border-radius: 10px; /* Vendor prefix */
    }
    .grid-item .buttons a {
        padding: 8px 15px;
        font-size: 0.9rem;
    }
}