@import url('https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,700&display=swap');

:root {
    --sidebarsize: 13.5vw;
    --primaryaccent: #1f1815;
    --secondaryaccent: #1F1D15;
    --thirdaryaccent: #15100e;

    --primarytextcolor: #787878;
}

#ProjectsMenu {
    transition: left 0.3s ease-in-out;
}

#Sidebar {
    transition: left 0.3s;
}

html, body, div, span, applet, object,
iframe, h1, h2, h3, h4, h5, h6, p, blockquote,
pre, a, abbr, acronym, address, big, cite,
code, del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var, b,
u, i, center, dl, dt, dd, ol, ul, li, fieldset,
form, label, legend, table, caption, tbody,
tfoot, thead, tr, th, td, article, aside,
canvas, details, embed, figure, figcaption,
footer, header, hgroup, menu, nav, output, ruby,
section, summary, time, mark, audio, video {
    margin: 0;
    padding: 0;
    border: 0;
    vertical-align: baseline;
}

/* 16:9 Aspect */
/* Global Styles */

body {
    visibility: hidden;
    font-family: "Font Awesome 5 Free", "Source Sans Pro", sans-serif;
    font-weight: 100;
    line-height: 3em;
    background-color: #f2f0e4;
    scroll-behavior: smooth;
    color: var(--primarytextcolor);
}

h1, h2{
    font-weight: 500;
}

a {
    color: #189600;
    text-decoration: none;
    cursor: pointer;
}

ul {
    margin-left: 4ch;
}

button {
    font-family: "Font Awesome 5 Free", "Source Sans Pro", sans-serif;
    font-weight: 400;
    background-color: transparent;
    cursor: pointer;
    display: block;
    margin-top: 1em;
    border-radius: 0.5em;
    border-color: var(--secondaryaccent);
    width: 10em;
    height: 2.5em;
    font-size: clamp(1em, 1.8em, 3em);
}

/* Miscellaneous */

.ProfilePicture img {
    width: 60%;
    height: auto;
    border-radius: 50%;
    margin-bottom: 2em;
}

/* Layout */

.MainLayout {
    display: flex;
    flex-direction: row;
    height: 100vh;
}

div.Content {
    transition: opacity 0.5s ease, right 0.5s ease;
    margin-left: var(--sidebarsize);
    flex: 1;
}

Div.ContentGrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(48%, 2fr));
    grid-gap: 1.5em;
    padding: 1em;
}

.ContentGrid div {
    display: grid;
}

.ContentGrid img {
    width: 100%;
    height: auto;
    align-self: end;
    border-radius: 0.5em;
    bottom: 0;
}

.parallax {
    background-image: url('../../images/banner.jpg');
    height: 20vh;
    background-attachment: fixed;
    background-position: center center;

    background-repeat: no-repeat;
    background-size: cover;
}

.ContentGrid h2 {
    font-size: clamp(1em, 1.5em, 2em);
    margin: 0 !important;
}

.ContentGrid p {
    font-size: clamp(0.8em, 1.2em, 1.5em);
    line-height: 1.5em;
}

/* Header */

.MainHeader {
    position: relative;
}

.MainHeader img {
    width: 100%;
    height: 25%;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-size: cover;
}

.HeaderContent {
    width: 100%;
    position: absolute;
    font-family: "Cascadia Code", monospace;
    top: 35%;
}

.HeaderContent h1 {
    font-size: clamp(2.5em, 2.75em, 3em);
    max-font-size: 3em;
}

.HeaderContent h2 {
    font-size: clamp(1.5em, 1.75em, 2em);
    max-font-size: 2em;
}

.HeaderContent h1, .HeaderContent h2 {
    text-shadow:
            -2px -2px 0 black,
            2px -2px 0 black,
            -2px  2px 0 black,
            2px  2px 0 black;
    text-align: center;
    color: white;
}

/* Sidebar */

.Sidebar {
    position:fixed;
    width: var(--sidebarsize);
    height: 100vh;
    background-color: var(--primaryaccent);
    padding: 4em 0 0 0;
    border-right: 0.3em solid var(--secondaryaccent);
    color: white;
    text-align: center;
    z-index: 1;
}

.Sidebar h1 {
    font-size: clamp(1.5em, 2em, 3.5em);
    max-font-size: 2.5em;
    margin: 0.25em;
    font-weight: 200;
}
.Sidebar h2 {
    font-size: clamp(1em, 1.25em, 4em);
    word-break: break-word;
    max-font-size: 2em;
    font-weight: 200;
    margin-bottom: 2em;
    opacity: 0.65;
}

.Sidebar h1, h2 {
    color: white;
    text-overflow: clip;
}

.Sidebar .buttonList div {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.Sidebar a {
    width: 100%;
    color: white;
    border: none;
    font-size: clamp(1em, 1.4em, 3em);
    max-font-size: 3em;
    height: 5em;
    cursor: pointer;
    text-align: center;
    align-content: center;
    display: block;
}

.Sidebar a:hover {
    background-color: var(--thirdaryaccent);
    color: white;
    text-decoration: none;
}

.SidebarHamburger {
    position: fixed;
    top: 1em;
    left: 1em;
    z-index: 2;
    width: 3em;
    height: 3em;
    background-color: var(--primaryaccent);
    border: white 0.15em solid;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
}

.SidebarHamburger img {
    display: block;
}

Div.Socials {
    display: inline-flex;
    position: absolute;
    justify-content: center;
    align-items: center;
    text-align: center;
    bottom: 7.5%;
    left: 50%;
    transform: translateX(-50%);
    padding: 0;
    width: 75%;
}

.Socials img{
    display: inline-block;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    height: auto;
}

.Socials a {
    width: 100%;
    height: 100%;
    padding: 3.5%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Home Page */

div.Main {
    width: 50%;
    Margin: 10% 5%;
}

.Main h1 {
    color: black;
    font-size: clamp(24px, 40px, 60px);
    margin: 1.5em 0 0.5em auto;
}

.Main h2 {
    color: black;
    font-size: clamp(18px, 30px, 40px);
    margin: 1.5em 0 0.5em auto;
}

.Main p {
    font-size: clamp(14px, 20px, 30px);
}

/* Projects Menu */

.ProjectsMenu {
    position: fixed;
    padding: 0;
    left: calc(var(--sidebarsize) * -2);
}

.ProjectsMenu img {
    width: 100%;
    height: auto;
    padding: 0.25em 0;
}

.ProjectsMenu button {
    color: white;
    width: 100%;
    background-color: var(--secondaryaccent);
    padding: 0;
    margin: 0;
    border: none;
    align-items: center;
    justify-content: center;
}

.ProjectsMenu a {
    vertical-align: center;
}

.ProjectsMenu a:hover {
    background-color: transparent;
    color: white;
    text-decoration: none;
}

.Projects img.SampleImg {
    height: unset;
    width: unset;
}

.Projects img {
    width: 100%;
    height: auto;
    border-radius: 0.5em;
    margin-bottom: 1em;
}

div.Footer {
    margin-top: 10em;
    background: var(--secondaryaccent);
}

.Footer div {
    padding: 1em 0;
    margin-left: 2em;
}

.Footer p {
    line-height: 1.5em;
}

/* Utils */

.LineBorder {
    border-bottom: 2px solid darkgray;
    padding-top: 4em;
    padding-bottom: 2em;
}

.CloseMenu {
    left: calc(var(--sidebarsize) * -2);
}

.OpenMenu {
    left: 0;
}

.Visible {
    visibility: visible;
}

.FadeOutSite {
    right: calc(var(--sidebarsize) - 100vw);
    opacity: 0;
}

.FadeInSite {
    right: 0;
    opacity: 1;
}


/* Aspect ratio of 8:9 */

@media (max-aspect-ratio: 8/9) {

    :root {
        --sidebarsize: 30vw;
    }
    div.Main {
        width: 100%;
    }

    div.Socials {
        width: 100%;
    }

    .Sidebar {
        width: var(--sidebarsize);
    }
}

@media (max-width: 768px) {

    #ProjectsMenu {
        left: -100%;
    }

    #Sidebar {
        left: -100%;
    }

    .Sidebar {
        width: 100%;
    }

    div.Main {
        width: 100%;
        margin: 0;
        box-sizing: border-box;
        padding: 1em;
    }

    .SidebarHamburger {
        display: flex;
    }

    Div.Content {
        margin-left: 0;
    }

    .ProfilePicture img{
        width: 25%;
    }

    div.Socials {
        width: 50%;
    }

    .ProjectsMenu {
        position: fixed;
        padding: 0;
    }

    .ProjectsMenu img {
        width: 100%;
        height: auto;
    }

    .ProjectsMenu a {
        display: flex;
        height: 6.5em;
    }

    .CloseMenu {
        left: -100%;
    }

    .OpenMenu {
        left: 0;
    }
}