:root {
    --primary-color: #121212;
    --text-color: 255, 255, 255;
    --gradient: radial-gradient(at 40px, #000022 80%, #011033 20%);
    --text-accent-color: rgb(255, 136, 0);
}

@media (prefers-color-scheme: light) {
    :root {
        --primary-color: #f2f2f2;
        --text-color: 0, 0, 0;
        --gradient: radial-gradient(at 40px, #358be8 80%, #7d97e9 20%);
        --text-accent-color: #fff;
    }
}

[color-mode="light"] {
    --primary-color: #f2f2f2;
    --text-color: 0, 0, 0;
    --gradient: radial-gradient(at 40px, #358be8 80%, #7d97e9 20%);
    --text-accent-color: #fff;
}

[color-mode="dark"] {
    --primary-color: #121212;
    --text-color: 255, 255, 255;
    --gradient: radial-gradient(at 40px, #000022 80%, #011033 20%);
    --text-accent-color: rgb(255, 136, 0);
}

body {
    margin: 0;
    padding: 0;
    font-family: "Montserrat", system-ui, sans-serif;
    background-color: var(--primary-color);
    color: rgb(var(--text-color));
}

#info, #top_header {
    background-color: black;
    background-image: var(--gradient);
    background-attachment: fixed;
}

#topname {
    float: left;
    font-size: 2rem;
    text-align: center;
    padding-left: 16px;
}

.heading_name {
    font-size: 3.5rem;
    margin-top: 0;
    margin-bottom: 2rem;
}

.heading_project {
    font-size: 2.5rem;
    margin-top: 0;
}

#description {
    text-align: justify;
    font-size: 1.4rem;
    line-height: 1.6;
}

#info {
    text-align: center;
    height: 100vmin;
    max-height: calc(100vh - 5rem);
    min-height: 40rem;
}

#info_main {
    display: flex;
    flex-direction: column;
    width: 50%;
    margin: auto;
    height: 100%;
}

#info_main h2 {
    margin-top: 4.25rem;
}

.info_footer {
    margin: auto auto 1rem;
    display: grid;
    justify-content: center;
    align-self: flex-end;
}

.mouse {
    position: relative;
    height: 40px;
    width: 20px;
    border: solid 2px;
    border-radius: 20px;
    margin: auto;
}

.wheel {
    position: relative;
    display: block;
    width: 5px;
    height: 5px;
    background-color: currentColor;
    border-radius: 10px;
    margin: 5px auto;
    animation: wheel_movement 1.3s ease-in-out infinite;
}

@keyframes wheel_movement {
    0% {
        top: 0px;
    }
    100% {
        top: 22px;
        opacity: 0;
    }
}

#top_header {
    overflow: hidden; 
    border-bottom: solid 1px;
    border-color: currentColor;
    width: 100%;
}

#nav { 
    float: right;
}

#navlist {
    width: inherit;
    height: 100%;
    display: inline-block;
    vertical-align: middle;
    list-style-type: none;
    margin: 1rem 0;
    padding: 0px;
    text-align: center;
}

#mobile_nav {
    flex-direction: column;
    width: 80%;
    display: none;
    text-align: center;
    padding: 0;
    margin: auto;
}

#mobile_nav.visible {display: flex;}

#menu_button.hidden {visibility: hidden;}
#close_menu_button.hidden {visibility: visible;}

.navitem {
    float: right;
    display: block;
    font-size: 1.1rem;
    margin-top: auto;
    border-radius: 5px;
}

#navlist a, #navlist span {
    display: block;
    padding: 14px 16px;
}

.mobile {
    border-top: solid 1px;
    border-radius: 0;
    border-color: rgba(var(--text-color), 0.4);
}

.navitem:hover {
    cursor: pointer;
    color: var(--text-accent-color)
}

#menu_button, #close_menu_button {
    display: none;
    font-size: 28px;
}

.menu_button {
    position: absolute;
    top: 0;
    right: 0;
    width: min-content;
    border: none;
    padding: 1.35rem 1rem;
}

a {
    text-decoration: none;
    color: inherit;
}

.highlight:hover {
    background-color: rgba(255,255,255,0.4);
}

#socials {
    position: absolute;
    top: 40%;
    left: 0;
}

#socials_list {
    background-color: rgba(0,0,0,0.4);
    display: flex;
    flex-direction: column;
    list-style-type: none;
    padding-left: 0;
    border-radius: 5px;
}

.social_list_item {
    display: block;
    text-align: center;
    padding: 14px 16px;
}

#socials img {
    max-height: 6vmin;
    width: auto;
}

#projects, #theses {
    width: 80%;
    margin: auto;
}

.projects_info {
    text-align: center;
    padding-top: 3rem;
}

.projects_container {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
}

.project {
    margin: 1vw;
    display: flex;
    flex-direction: column;
    margin-bottom: 10vmin;
    width: 45%;
    height: fit-content;
    background-color: rgba(var(--text-color),0.05);
    border: solid 0.5px rgba(var(--text-color),0.1);
    border-radius: 10px;
}

.project_header {
    display: flex;
    flex-direction: row;
    align-items: center;
    margin-top: 1.5rem;
}

.project_github_link {
    padding: 5px;
    border: solid 1px rgb(var(--text-color));
    border-radius: 5px;
    font-weight: 500;
}

.project_github_link:hover {
    color: var(--primary-color);
    background-color: rgb(var(--text-color))
}

.project_subsequent_link {
    margin-left: .5rem;
}

.project_content {margin-inline: 0.5vmax;}

.project_title {
    margin: 0 0.5rem 0;
    font-size: 1.5rem;
}

.project_description {
    font-family: "Roboto";
    line-height: 1.7;
    font-size: 1.125rem;
    margin-left: 0.5rem;
}

.project_skills {
    padding: 1.3rem;
    border-top: solid 0.5px rgba(var(--text-color),0.4);
    display: flex;
    flex-wrap: wrap;
    row-gap: 1rem;
    justify-content: center;
}

.skill {
    color: var(--primary-color);
    font-weight: 600;
    padding: 8px;
    margin-inline: 10px;
    background-color: rgb(var(--text-color));
    border-radius: 20px;
}

.project_image {
    width: 95%;
    margin: .9rem auto 0 auto;
    border-radius: 5px;
}

#theses > .projects_container {
    justify-content: space-evenly;
}

.thesis {
    width: 80%;
    overflow-wrap: break-word;
    text-align: justify;
}

.thesis_title {
    font-size: 2rem;
    margin-right: 1rem;
}

.thesis_descriptions {
    width: 95%;
    margin-right: auto;
}

#abstract_block {
    display: inline-flex;
    margin-bottom: -10px;
}

.hidden {
    display: none;
}

.thesis_descriptions * {
    hyphens: auto;
}

.thesis_h {
    margin-left: 0.5rem;
    font-size: 1.33rem;
}

.thesis_h4 {
    margin-bottom: 0;
    font-size: 1.2rem;
}

.buttons {
    height: fit-content;
    background: none;
    color: var(--text-color);
    display: block;
    font-size: .8rem;
    padding: 8px 10px;
    margin: auto 1rem;
    border: solid 1px rgb(var(--text-color));
    border-radius: 5px;
}

.buttons:hover {
    cursor: pointer;
    background-color:rgba(var(--text-color), 0.4);
}

.footer {
    background-color: #000;
    color: #fff;
    width: 100%;
    margin-top: 3rem;
    overflow: hidden;
    padding-top: 10px;
}

.footer_element {
    width: 80%;
    margin: auto;
    padding: 10px 10px;
}

.footer_lower {
    border-top: solid 1px white;
}

@media screen and (max-width: 768px) {
    html {
        font-size: 75%;
    }
    .social_list_item {
        padding: 6px 7px;
    }
    #navlist, .info_footer {
        display: none;
    }
    #menu_button {
        display: block;
    }
    #close_menu_button {
        display: block;
        visibility: hidden;
    }
    #top_header {
        display: flex;
        flex-direction: column;
    }
    .navitem {
        font-size: 2rem;
        padding: 14px 16px;
    }
    #info {
        position: relative;
        height: 105vmin;
    }
    #info_main {
        width: 80%;
    }
    .projects_container {
        flex-direction: column;
    }
    .project {
        display: flex;
        flex-direction: column;
        width: 100%;
        margin-inline: auto;
    }
    .project_description {
        font-size: 1.33rem;
    }
    #topname {
        flex: 1;
    }
    #socials {
        top: 90%;
        left: 40%;
        width: fit-content;
    }
    #socials_list {
        margin: 0;
        flex-direction: row;
    }
    #theses {
        width: 85%;
    }
    .thesis {
        width: 100%;
        text-align: initial;
    }
    .thesis_title {
        font-size: 1.7rem;
    }
    .project_title {
        margin-right: 0.8rem;
    }
}
