/* General styling */
* {
    font-family: "DM Sans", sans-serif;
    scroll-behavior: smooth;
    font-optical-sizing: auto;
}

body {
    margin: 0;
    background-color: white;
    font-family: "DM Sans", sans-serif;
    display: flex;
    flex-direction: column;
    font-optical-sizing: auto;
}

/* Nav styling */

nav {
    position: fixed;
    z-index: 2;
    right: 0;
    width: 20%;
    margin-top: 2em;
    display: flex;
    flex-direction: column;
}

nav > a, .nav-contactlink {
    margin: 0.5em 0;
    font-size: 150%;
}

/* Main styling */

main {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1em 0.5em;
    width: 75%;
}

#main-nametext{
    font-size: 3.5em;
    font-weight: 600;
    text-align: center;
    letter-spacing: 0.2em;
    color: black;
}

#main-logo {
    height: 10vh;
    width: auto;
}

#main-portfoliotext {
    font-size: 1.17em;
    font-weight: 700;
    margin: 1em 0;
}

/* Projects styling */

.main-project{
    width: 95%;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: rgba(245, 245, 245);
    border: 1px solid rgba(245, 245, 245, 0.8);
    border-radius: 10px;
    margin: 1em 0 1em 0;
    padding: 1em;
}

.main-project-header {
    font-size: 130%;
}

.main-project-mid {
    width: 100%;
    display: flex;
    align-items: flex-start;
}

.main-project-mid-left, .main-project-mid-right{
    width: 50%;
    flex: 1;
}

.main-project-mid-left {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.main-project-mid-left-img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    display: block;
}

.downsize-image {
    max-width: 100%;
    width: auto;
    height: auto;
}

#scribeLogo {
    padding: 1em;
    background-color: #232323;
    width: 60%;
    margin: auto;
}

.main-project-mid-right {
    padding: 1em;
}

.project-subheading {
    font-size: 1em;
    font-weight: 700;
    margin: 1.33em 0;
}

.project-tech {
    font-size: 1.17em;
    font-weight: 700;
    margin: 1em 0;
}

.main-project-bottom {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1em;
}

.main-project-bottom > * {
    margin: 0 0.5em 0 0.5em;
}

/* WordPress Websites styling */
.main-project-sites-site {
    display: flex;
    margin: 1em 0;
    padding-bottom: 0.5em;
}

.main-project-sites-site:not(:last-of-type) {
    border-bottom: 1px solid rgba(245, 245, 245, 0.6);
}

.main-project-sites-site-left, .main-project-sites-site-right {
    width: 50%;
}

.main-project-sites-site-left-img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    display: block;
}

.main-project-sites-site-right {
    padding: 1em;
}

/* Footer styling */

footer {
    display: flex;
    flex-direction: column;
    width: 100%;
    align-items: center;
    justify-content: center;
    padding-bottom: 1em;
}

footer > p {
    margin: 0.5em;
}

/* Button general styling */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    color: white;
    background-color: black;
    border: 1px solid black;
    border-radius: 12px;
    padding: 0.5em;
    transition: color 0.25s, background-color 0.25s, border 0.25s, box-shadow 0.25s, -webkit-box-shadow 0.25s, -moz-box-shadow 0.25s;
    font-size: 110%;
}

.btn:hover {
    color: black;
    background-color: white;
    opacity: 1;
    cursor: pointer;
    -webkit-box-shadow: 5px 8px 20px 0px rgba(0, 0, 0, 0.2);
    -moz-box-shadow: 5px 8px 20px 0px rgba(0, 0, 0, 0.2);
    box-shadow: 5px 8px 20px 0px rgba(0, 0, 0, 0.2);
}

a {
    text-decoration: none;
    color: black;
    transition: opacity 0.25s;
}

a:hover {
    opacity: 0.8;
}

.btn i {
    font-size: 140%;
    margin-right: 0.2em;
    min-width: 1em;
    text-align: center;
}

.btn span {
    margin: 0;
}

#floxtMicrosoftStoreDownload {
    padding-top: 0.5em;
}

#floxtMicrosoftStoreDownload img {
    width: 200px;
    height: auto;
    display: block;
}

/* Arrow Up Button styling */
#arrowUp {
    position: fixed;
    z-index: 2;
    bottom: 0.5em;
    right: 0.5em;
    font-size: 2.5em;
    padding: 0;
    color: inherit;
    transition: opacity 0.25s;
    display: none;
    opacity: 0;
    border: 1px solid rgba(245, 245, 245, 0.8);
    background-color: rgba(245, 245, 245, 0.8);
    backdrop-filter: blur(5px);
    border-radius: 100%;
    width: 2em;
    height: 2em;
    align-items: center;
    justify-content: center;
}

#arrowUp:hover {
    opacity: 0.5 !important;
    cursor: pointer;
}

/* Mobile open nav button */
#openNav {
    position: fixed;
    z-index: 4;
    top: 0.5em;
    right: 0.5em;
    font-size: 2.5em;
    padding: 0;
    color: inherit;
    transition: opacity 0.25s;
    display: none;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(245, 245, 245, 0.8);
    background-color: rgba(245, 245, 245, 0.8);
    backdrop-filter: blur(5px);
    border-radius: 100%;
    width: 2em;
    height: 2em;
}

#openNav:hover{
    cursor: pointer;
}

/* Responsive design queries */

@media only screen and (max-width: 1650px) {
    nav > a, .nav-contactlink {
        font-size: 120%;
    }
}

@media only screen and (max-width: 1340px) {
    nav > a, .nav-contactlink {
        font-size: 100%;
    }
}

@media only screen and (max-width: 1100px) {
    #openNav {
        display: flex;
    }

    nav {
        z-index: 3;
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100%;
        background-color: rgba(255, 255, 255, 0.9);
        backdrop-filter: blur(5px);
        margin-top: 0;
        padding-left: 2em;
        justify-content: center;
        display: none;
        transition: opacity 0.25s;
        opacity: 0;
    }

    nav > a, .nav-contactlink {
        font-size: 150%;
        margin: 0.2em 0;
    }

    main {
        width: 100%;
        padding: 1em 0;
    }

    .main-project {
        width: 90%;
    }

    .main-project-mid-right > p{
        padding-right: 0.5em;
    }

    body {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    footer {
        font-size: 120%;
    }
}

@media only screen and (min-width: 1101px) {
    nav {
        display: flex !important;
        opacity: 1 !important;
    }
}

@media only screen and (max-width: 1060px){
    .main-project-mid, .main-project-sites-site {
        flex-direction: column;
    }

    .main-project-mid-left, .main-project-mid-right, .main-project-sites-site-left, .main-project-sites-site-right{
        width: 100%;
    }

    .btn {
        font-size: 120%;
    }

    .main-project-sites-site-right {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
    }

    .main-project-mid-right, .main-project-sites-site-right {
        padding: 1em 0;
    }

    .main-project-sites-site-right > * {
        margin-right: 2em;
    }

    footer {
        padding-bottom: 5em;
    }
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
    body {
        background-color: black;
    }

    .btn {
        background-color: white;
        border: 1px solid white;
        color: black;
    }

    .btn:hover {
        background-color: black;
        color: white;
        -webkit-box-shadow: 5px 8px 20px 0px rgba(255, 255, 255, 0.2);
        -moz-box-shadow: 5px 8px 20px 0px rgba(255, 255, 255, 0.2);
        box-shadow: 5px 8px 20px 0px rgba(255, 255, 255, 0.2);
    }

    #arrowUp, #openNav, .main-project {
        background-color: rgba(30, 30, 30, 0.8);
        border: 1px solid rgba(30, 30, 30, 0.8);
    }

    nav {
        background-color: rgba(0, 0, 0, 0.9);
    }

    a, #main-nametext, body {
        color: white;
    }

    .main-project-sites-site:not(:last-of-type) {
        border-bottom: 1px solid rgba(45, 45, 45, 0.6);
    }
}