/* HTML and Body Reset */
body, html {
    width: 100%;
    height: 100%;
    margin: 0;
    background-color: #202020ff;
    display: grid;
    grid-auto-flow: column;
}

/* Repositioning Pages */
#home, #about, #contact, #projects, #resume {
    scroll-margin-top: 129px;
}

/* Left Sidebar */
.left-div {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: fixed;
    width: 30%;
    height: 100%;
}

/* Main Content */
main {
    width: 50%;
    margin-left: 30%;
}

/* Tablet and Mobile Layout */
@media (max-width: 768px) {
    body,
    html {
        display: block;
        width: 100%;
        height: auto;
        min-height: 100%;
    }

    .left-div {
        position: relative;
        width: 100%;
        height: auto;
    }

    main {
        width: 90%;
        margin: 0 auto;
        padding: 20px 0;
        box-sizing: border-box;
    }

    footer {
        display: none;
    }

    #home,
    #about,
    #contact,
    #projects,
    #resume {
        scroll-margin-top: 20px;
    }

    .main-block {
        width: 100%;
        max-width: 100%;
        margin: 0 auto;
        box-sizing: border-box;
    }

    .project-grid,
    .service-grid,
    .process-grid,
    .contact-grid,
    .approach-grid {
        grid-template-columns: 1fr;
    }

    img {
        max-width: 100%;
        height: auto;
    }
}

@media (max-width: 400px) {
    main {
        width: 94%;
    }
}