html, body {
    height: 100%;
    margin: 0;
    overflow-x: hidden; /* allow vertical scrolling */
}

body {
    display: flex;
    flex-direction: column;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background-color: #A7CCED;
}

body h1 {
    font-size: 40pt;
}

body #navbar h1 {
    font-size: 24pt;
}

body h2 {
    font-size: 28pt;
}

body h3 {
    font-size: 22pt;
}

body h4 {
    font-size: 17pt;
}

#show-menu {
    display: none;
}

#navbar {
    position: sticky;
    z-index: 9999;
    top: 0;
    background-color: #304D6D;
    padding-left: calc(15px + env(safe-area-inset-left));
    padding-right: calc(15px + env(safe-area-inset-right));
    padding-top: 10px;
    padding-bottom: 10px;
    display: grid;
    grid-template-columns: 3fr 1fr; 
}

#navbar * {
    color: #ffffff;
    margin-top: auto;
    margin-bottom: auto;
}

#navbar #navbar-links a {
    margin-left: 15px;
    margin-right: 15px;
}

#navbar a {
    text-decoration: none;
}

#bottom-bar a {
    text-decoration: none;
    color: #ffffff;
}

#dummy {
    display: none;
}

#navbar-links {
    display: flex;
    justify-content: space-between;
}

#intro {
    display: grid;
    grid-template-columns: 1fr 5fr;
    margin-left: -15px;
}

#intro > *:not(img) {
    margin-left: 15px;
    margin-right: 15px;
}

#intro > img {
    margin-top: auto;
    margin-bottom: auto;
    margin-left: auto;
    clip-path: circle();
    width: 80%;
    height: auto;
}

.nobreak {
    display: inline-flex;
}

#main-ctn {
    margin-top: 10px;
    margin-bottom: 10px;
    margin-left: auto;
    margin-right: auto;
    width: min(1000px, 100% - 30px - env(safe-area-inset-left) - env(safe-area-inset-right));
    flex: 1;
}

h5 {
    font-size: 14pt;
}

#bottom-bar {
    position: relative;
    background-color: #82A0BC;
    color: #ffffff;
    text-align: center;
    padding-top: 20px;
    margin-top: 20px;
    padding-bottom: 20px;
    bottom: 0;
}

.grid-img-ctr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding-top: 10px;
    padding-bottom: 10px;
}

.grid-img-ctr img {
    max-width: 100%;
    padding-left: 10px;
    padding-right: 10px;
    margin-top: 10px;
    margin-bottom: 10px;
}

.project_item img.shrinkdown {
    max-height: 500px;
    width: auto;
    margin-left: auto;
    margin-right: auto;
}

.project_item img.roundedcorner {
    clip-path: inset(0 round 40px);
}

#bottom-bar div {
    display: flex;
    height: auto;
    width: fit-content;
    margin-top: 10px;
    margin-left: auto;
    margin-right: auto;
}

#bottom-bar div img {
    margin-left: 20px;
    margin-right: 20px;
    height: 30px;
}

@media only screen and (max-width: 500px) {
    #intro {
        display:inline;
    }

    #intro * {
        margin-left: 0px;
        margin-right: 0px;
    }

    #intro > img {
        width: 90%;
        margin-left: auto;
        margin-right: auto;
    }

    #navbar {
        text-align: center;
        display: grid;
        grid-template-columns: repeat(22, 1fr);
        grid-template-rows: 48px 1fr;
        min-height: 68px;
        transition: all 0.4s;
    }

    #navbar-links {
        grid-row-start: 2;
        grid-row-end: 2;
        grid-column-start: 1;
        grid-column-end: 20;
        margin-bottom: auto;
        margin-top: 0;
        display: grid;
    }

    #show-menu-btn {
        opacity: 0;
        cursor: pointer;
        height: 20px;
        width: 20px;
        z-index: 2;
        grid-row: 1;
        grid-column: 1;
    }

    #navbar #show-menu:has(#show-menu-btn) ~ #navbar-links {
        visibility: hidden;
        opacity: 0;
        width: 0px;
        height: 0px;
    }

    #navbar #show-menu:has(#show-menu-btn) ~ #navbar-links:not(.suppress-animations) {
        transition: all 0.4s;
    }

    #navbar #show-menu:has(#show-menu-btn:checked) ~ #navbar-links:not(.suppress-animations) {
        visibility: visible;
        opacity: 1;
    }

    #menu-lines {
        display: flex;
        justify-content: space-between;
        flex-direction: column;
        width: 20px;
        height: 20px;
        opacity: 1;
        background-size: fill;
        grid-row: 1;
        grid-column: 1;
        z-index: 1;
    }

    #menu-lines > .line {
        height: 2px;
        width: 100%;
        background-color: white;
        border-radius: 10px;
        display: block;
        transition: all 0.4s;
    }

    #navbar #navbar-links a {
        margin-left: 0px;
    }

    #show-menu #show-menu-btn:checked ~ #menu-lines > .line.line1 {
        transform: rotate(45deg) translateY(5px) translateX(2px);
    }

    #show-menu #show-menu-btn:checked ~ #menu-lines > .line.line2 {
        transform: rotate(-45deg) translateY(-5px) translateX(2px);
    }

    #navbar h1 {
        grid-column-start: 2;
        grid-column-end: 22;
        grid-row-start: 1;
        grid-row-end: 1;
        text-align: center;
    }

    #navbar:has(#show-menu #show-menu-btn:checked) {
        min-height: 100vh;
        transition-delay: 0s;
    }

    #show-menu {
        display: grid;
        grid-column-start: 1;
        grid-column-end: 1;
        grid-row-start: 1;
        grid-row-end: 1;
    }

    #navbar-links a {
        font-size: large;
        margin-left: 0;
        margin-top: 20px;
        margin-bottom: 20px;
        padding-left: 0;
        margin-right: 0;
    }

    body:has(#navbar #show-menu #show-menu-btn:checked) {
        background-color: #304D6D;
        transition-delay: 0.4s;
    }
}

@media only screen and (max-width: 600px) {
    ul > li > b {
        display: block;
    }
}

.project_item {
    margin-top: 20px;
    margin-bottom: 20px;
}

.experience {
    display: flex;
    flex-direction: row;
    gap: 20px;
}

.logo {
    width: 60px;
    height: auto;
    align-self: baseline;
}

@media only screen and (min-width: 800px) {
    #experience-grid {
        display: flex;
        flex-direction: row;
        gap: 20px;
    }
}


#experience-grid > * {
    flex: 1;
}

.invert {
    -webkit-filter: invert(100%); /* safari 6.0 - 9.0 */
    filter: invert(100%);
}