:root {
    --primary-colour: #1b386b;
    --secondary-colour: #14243e;
    --shadow-colour: #14243e20;
}

/* General */
body {
    margin: 0;
    padding: 0;
    background-color: #f0f0f0;
    width: 100%;
    font-family: 'Raleway', sans-serif;
}

button {
    margin-top: 2rem;
    align-items: center;
    justify-content: flex-start;
    background-color: var(--primary-colour);
    color: white;
    font-size: 1.2rem;
    padding: 0.2em 1.8em;
    border-radius: 50px;
    border: none;
    transition: background-color 0.3s;
    cursor: pointer;
}

button:hover {
    background-color: var(--secondary-colour);
}

a {
    text-decoration: none !important;
}

.center {
    text-align: center;
}

h1 {
    color: var(--primary-colour);
    padding-top: 10vh;
    font-size: 10em;
    font-weight: bold;
}

h1:before {
    content: attr(data-title);
    color: var(--shadow-colour);
    position: absolute;
    transform-origin: bottom;
    transform: skewX(-30deg) translateX(-0.15em);
}

/* Hero */
.hero {
    height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-color: #f0f0f0;
}

/* Adjust the zoom level for mobile devices and move up the section */
@media (max-width: 767px) {
    .hero {
        height: 20vh;
    }
}

/* About */
.container {
    overflow: hidden;
}

.card {
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
    transition: 0.3s;
}

.card:hover {
    box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.2);
}

.container {
    padding: 2px 16px;
}

img {
    border-radius: 5px 5px 0 0;
}

.wrapper {
    display: flex;
    padding-left: 15%;
    padding-right: 15%;
    padding-top: 5%;
}

.left {
    width: 30%;
}

.right {
    flex-grow: 1;
    padding: 5%; /* Adjust padding as needed */
}

.languages{
    font-style: italic;
    padding-top: -50%;
}

/* Projects Section */
#projects .item {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    margin-bottom: 5rem;
    position: relative; /* Added to create context for absolute positioning */
    overflow: hidden; /* Ensure no overflow */
}
#projects .item:nth-of-type(even) {
    flex-direction: row-reverse;
}
#projects .item .left {
    flex: 1;
    position: relative; /* Added to position image behind the text box */
    z-index: 1; /* Ensure the image is behind the text box */
}
#projects .item .right {
    margin-left: -150px;
    flex: 1;
    background-color: whitesmoke;
    padding: 5rem 3rem;
    border-radius: 12px;
    box-shadow: 0px 0px 20px #00000028;
    z-index: 2;
    max-width: 90%; /* Ensure the box doesn't overspill the page */
}
#projects .item:nth-of-type(even) .right {
    margin-left: 0;
}
#projects .item:nth-of-type(even) .left {
    margin-left: -150px;
}
#projects .item .left .img {
    height: 500px;
    overflow: hidden;
    border-radius: 12px;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1; /* Ensure the image is behind the text box */
}
#projects .item .left .img::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 100%;
    background-color: #5a24ed38;
    border-radius: 12px;
}
#projects .item .left .img img {
    object-fit: cover;
    width: 150%;
    height: 150%;
    transition: 0.3s ease transform;
}
#projects .item:hover .left .img img {
    transform: scale(1.1);
}
#projects .item .right .project-title {
    font-size: 3rem;
    font-family: 'Raleway';
    margin-bottom: 1rem;
}
#projects .item .right .project-sub-title {
    font-size: 1.2rem;
}
#projects .item .right .project-desc {
    color: var(--secondary-gray);
}
#projects .item .right .external-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: calc(0.6em - 4px) calc(1.6em - 4px);
}
#projects .item .right .external-link svg {
    width: 25px;
}

@media only screen and (max-width: 768px) {
    #projects .item:nth-of-type(even) .left {
        margin-left: 0px;
    }
    #projects .item {
        flex-direction: column;
    }
    #projects .item .left {
        width: 100%;
        margin-left: 0;
    }
    #projects .item .right {
        margin-left: 0;
        width: 90%;
        margin-top: 2rem;
        padding: 3rem 2rem;
    }
    #projects .item:nth-of-type(even) {
        flex-direction: column;
    }
    #projects .item .left .img {
        height: 300px;
    }
    #projects .item .right .project-title {
        font-size: 1.8rem; /* Adjusted font size */
    }
    #projects .item .right .project-sub-title {
        font-size: 1.2rem; /* Adjusted font size */
    }
    #projects .item .right .project-desc {
        font-size: 0.9rem; /* Adjusted font size */
    }
    #projects .item .right .external-link {
        font-size: 0.8rem; /* Adjusted font size */
    }
}
@media only screen and (max-width: 450px) {
    #projects .item:nth-of-type(even) .left {
        margin-left: 0px;
    }
    #projects .item .right .buttons {
        flex-direction: column;
    }
    #projects .item .right .buttons a {
        width: 100%;
        text-align: center;
    }
    #projects .item .left .img {
        height: 200px;
    }
    #projects .item .right .project-title {
        font-size: 1.5rem; /* Further adjusted font size */
    }
    #projects .item .right .project-sub-title {
        font-size: 1rem; /* Further adjusted font size */
    }
    #projects .item .right .project-desc {
        font-size: 0.8rem; /* Further adjusted font size */
    }
    #projects .item .right .external-link {
        font-size: 0
    }
}

@media (max-width: 767px) {
    .hero {
        height: 20vh;
    }

    h1 {
        font-size: 3em; /* Adjusted font size for mobile */
    }

    h2 {
        font-size: 1em; /* Adjusted font size for mobile */
    }
    
    h4{
        font-size: 0.6em;
    }

    p {
        font-size: 0.5em;
    }

    button {
        font-size: 0.75rem; /* Adjusted font size for mobile */
    }
    .wrapper {
        padding-left: 5%;
        padding-right: 5%;

    }
}