#layout {
    display: flex;
    width: 100%;
}

#sidebarDimming {
    position: fixed;
    top: 0px;
    left: 0px;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    pointer-events: none;
    z-index: 9;
    transition: 0.2s var(--ease-in-out-quad);
}

#sidebar {
    position: sticky;
    top: 0px;
    height: 100dvh;
    max-width: 250px;
    width: 100%;
    background: var(--c-bg-surface);
    border-right: 1px solid var(--c-border-default);
    flex-shrink: 0;
    transition: margin-left 0.2s var(--ease-in-out-quad);
}

@media (min-width: 1000px) {
    .sidebarHidden #sidebar {
        margin-left: -250px;
    }
}

@media (max-width: 1000px) {
    #sidebar {
        position: fixed;
        top: 0px;
        left: 0px;
        margin-left: -250px;
        z-index: 10;
    }

    .sidebarOpen #sidebar {
        margin-left: 0px;
    }

    .sidebarOpen #sidebarDimming {
        opacity: 1;
        pointer-events: all;
    }
}

#sidebar .top {
    padding: 32px 8px;
}

#sidebar .scroll {
    padding: 0px 8px;
    overflow-y: auto;
    height: 100%;
}

#sidebar .header {
    padding: 8px;
    padding-bottom: 4px;
}

#topbar {
    height: 54px;
    padding: 8px 16px;
    position: sticky;
    top: 0px;
    z-index: 1;
}

body.scrolled #topbar {
    border-bottom: 1px solid var(--c-border-default);
    background: var(--c-bg-base);
}

#content {
    min-height: 100dvh;
    width: 100%;
    display: flex;
    flex-direction: column;
}

main {
    position: relative;
    width: 1000px;
    height: 100%;
    margin: 0px auto;
    padding: 24px 16px;
    flex-grow: 1;
    container-type: inline-size;
}

/* Home page */

main#page-home {
    padding: 24px;
    width: 800px;
}

/* About page */

#page-about .top .image {
    max-width: 250px;
    border-radius: 32px;
    box-shadow: 8px 8px 0px 0px var(--c-accent-80);
    transform: rotate(-5deg);
    margin: 16px;
    flex-shrink: 0;
    align-self: center;
}

@container (max-width: 750px) {
    #page-about .top {
        flex-direction: column;
        align-items: center;
    }

    #page-about .top .text {
        margin: 0px;
        text-align: center;
    }

    #page-about .socials {
        justify-content: center;
    }
}

#page-about .projects {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 8px;
}

#page-about .projects .logo {
    width: 32px;
    height: 32px;
}

#page-about .projects .card {
    padding: 12px;
}