html {
    margin: 0;
    width: 100%;
}

body {
    margin: 0;
    font-family: sans-serif;
    line-height: 1.5;
    background: #f5f5f5;
    color: black;
}

.container {
    margin: 0 auto;
    width: 90%;
    display: grid;
    grid-template-columns: 1fr 3fr;
    grid-gap: 2%;
    padding-top: 2%;
    padding-bottom: 2%;
}

.sidebar {
    width: 20%;
    height: 90%;
    margin: 0 auto;
    position: fixed;
    padding-top: 8%;
    overflow: hidden;
}


@font-face {
    font-family: "Lekton";
    src: url("./Lekton/Lekton-Regular.ttf") format('truetype');
}

.name {
    display: inline-block;
}

h1 {
    font-family: Lekton;
    font-size: 36px;
    font-style: normal;
    font-variant: normal;
    font-weight: 700;
    line-height: 40px;

    border-right: 3px solid;
    width: 100%;
    white-space: nowrap; 
    overflow: hidden;
    animation: 
        typing 1.5s steps(10),
        cursor .4s step-end infinite alternate;
}

@keyframes cursor {
    50% { border-color: transparent; }
}

@keyframes typing {
    from { width: 0.1% }
}

h2 {
    font-family: Lekton;
    font-size: 30px;
    font-style: normal;
    font-variant: normal;
    font-weight: 700;
    line-height: 50px;
}


h3 {
    font-family: Lekton;
    font-size: 25px;
    font-style: normal;
    font-variant: normal;
    font-weight: 700;
    line-height: 23px;
}

p,
li,
button {
    font-family: Lekton;
    font-size: 16px;
    font-style: normal;
    font-variant: normal;
    font-weight: 400;
    line-height: 23px;
    background: #f5f5f5;
}

h6 {
    font-family: Lekton;
    font-size: 16px;
    font-style: normal;
    font-variant: normal;
    font-weight: 700;
    line-height: 23px;
}

blockquote {
    font-family: Lekton;
    font-size: 17px;
    font-style: normal;
    font-variant: normal;
    font-weight: 400;
    line-height: 23px;
}

pre {
    font-family: Lekton;
    font-size: 11px;
    font-style: normal;
    font-variant: normal;
    font-weight: 400;
    line-height: 23px;
}

button,
input[type="submit"],
input[type="reset"] {
    color: inherit;
    border: none;
    border-radius: 5px;
    padding: 5px;
    font: inherit;
    cursor: pointer;
    outline: inherit;
    display: inline-block;
    transition: background-color 0.3s ease, color 0.3s ease;
}

button.selected {
    background-color: #e3e3e3;
}

a {
    transition: .2s ease;
    color: black;
    text-decoration: none;
    line-height: 30px;
    padding: 2%;
    font-size: 16px;
    transition: font-size 0.2s ease-in-out;
}

a:hover {
    background-color: #e3e3e3;
    border-radius: 8px;
    font-size: 18px;
}

a.img {
    line-height: 0;
    padding: 0;
    transition: none;

}

a.img:hover {
    background-color: transparent;
}

.scontainer {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-gap: 1%;
    padding-bottom: 2%;
    width: 100%;
    scroll-snap-type: y proximity;
}

.sicontainer {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-gap: 4%;
    margin-bottom: 8%;
    padding-top: 12%;
    width: 100%;
    scroll-snap-type: y proximity;
}

.dcontainer {
    display: grid;
    grid-template-columns: 1fr;
    padding-top: 12%;
    width: 90%;
    margin-left: 5%;
}

.tricontainer {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    grid-gap: 4%;
    width: 100%;
    padding-bottom: 2%;
    padding-top: 2%;
}

.fourcontainer {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Two columns */
    grid-template-rows: auto auto; /* Two rows */
    grid-gap: 2%;
    width: 100%;
    padding-bottom: 2%;
    padding-top: 2%;
}

.proj {
    scroll-snap-align: start;
    position: relative;
}

.proj-i {
    opacity: 1;
    display: block;
    height: 16vw;
    width: 100%;
    object-fit: cover;
    transition: .2s ease;
    backface-visibility: hidden;
}

.proj-ii {
    opacity: 1;
    display: block;
    height: auto;
    width: 100%;
    object-fit: cover;
    padding-bottom: 2%;
}

.proj-iii {
    opacity: 1;
    display: block;
    height: 100%;
    width: 100%;
    padding-bottom: 20%;
    object-fit: cover;
    padding-bottom: 4%;
}

.proj-iv {
    opacity: 1;
    display: block;
    width: 50%;
    height: auto;
    padding-bottom: 20%;
    object-fit: cover;
    padding-bottom: 4%;
}

.proj:hover .proj-i {
    opacity: 0.2;
}

.proj:hover .desc {
    opacity: 1;
}

.desc {
    transition: .5s ease;
    opacity: 0;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    -ms-transform: translate(-50%, -50%);
    text-align: center;
}

.desc-text {
    color: #212121;
    padding: 0px 12px;
}

.projcontainer {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    grid-gap: 4%;
    width: 100%;
    margin-bottom: 50%;
}

.smallscreen-nav {
    display: none;
}

.largescreen-nav {
    display: block;
}

figure {
    text-align: center;
    margin: 0px;
}

figcaption {
    font-style: italic;
    color: gray;
    padding-bottom: 2%;
}

.video-container {
    position: relative;
    width: 100%; /* Make it fill the width of the parent container */
    padding-top: 56.25%; /* 16:9 aspect ratio (9 / 16 = 0.5625 * 100) */
    overflow: hidden;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

@media only screen and (max-width: 900px) {
    .container {
        width: 94%;
        grid-template-columns: 1fr;
    }

    .scontainer {
        padding-top: 0px;
    }

    .sidebar {
        position: relative;
        width: 100%;
        height: 100%;
        overflow: auto;
    }

    .smallscreen-nav {
        display: block;
        text-align: center;

    }

    .largescreen-nav {
        display: block;
    }

    .tabs {
        text-align: center;
    }

    .proj-i {
        padding: 0;
        height: 30vh;
    }
}

@media only screen and (max-width: 600px) {
    .scontainer,
    .sicontainer {
        grid-template-columns: 1fr;
    }

    .tricontainer {
        grid-template-columns: 1fr;
        margin-bottom: 30%;
    }

    .proj-iii {
        width: 100%;
        height: auto;
        object-fit: cover;
    }

    .sidebar {
        height: 150%;
    }

    .proj:hover .proj-i {
        opacity: 1;
    }
}