:root {
    font-family: "Karla", sans-serif;
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
}

body {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100vh;

    min-height: 54rem;
    background-color: #fff;

    overflow: auto;
}

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

img {
    margin-bottom: 0.5rem;
    width: 100%;
    height: auto;
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 5;
    height: 3rem;
    pointer-events: none;
}

.header-text {
    align-self: end;
    margin: 0 1rem;
    font-size: 2rem;
    font-weight: bolder;
    white-space: nowrap;
}

.main-container {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.split-section {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: filter 0.3s, background-color 0.3s;
}

.split-section:hover,
.split-section:focus {
    background-color: #71abc6;
}

.split-section.active {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: box-shadow 0.3s ease;
}

.split-section:not(.active) {
    filter: brightness(0.75);
}

.split-section:not(.active) .outer-container {
    filter: blur(1px);
}

.left-section {
    background-color: rgb(98, 157, 184);
    clip-path: polygon(
        0 0,
        100% 0,
        100% calc((100% / 3) - 2% + 1px),
        0 calc((100% / 3) + 2% + 1px)
    );
    z-index: 10;
}

.mid-section {
    background-color: rgb(84, 147, 177);
    clip-path: polygon(
        0 calc((100% / 3) + 2%),
        100% calc((100% / 3) - 2%),
        100% calc((100% / 3 * 2) - 2%),
        0 calc((100% / 3 * 2) + 2%)
    );
    z-index: 5;
}

.right-section {
    background-color: rgb(74, 136, 166);
    clip-path: polygon(
        0 calc((100% / 3 * 2) + 2% - 1px),
        100% calc((100% / 3 * 2) - 2% - 1px),
        100% 100%,
        0 100%
    );
    z-index: 0;
}

.outer-container {
    position: absolute;
    width: min-content;
}

.outer-container,
.inner-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.left-section .outer-container {
    top: 6%;
    left: 0%;
}

.mid-section .outer-container {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.right-section .outer-container {
    bottom: 1%;
    right: 0;
}

.inner-container {
    width: 10rem;
    margin: 0 1rem;
}

.section-title {
    text-align: center;
    margin: 0.25rem 0 0.5rem 0;
    font-size: 1.25rem;
    color: #e2e2e2;
    font-weight: bold;
    white-space: nowrap;
}

.button {
    display: flex;
    justify-content: center;
    text-align: center;
    width: 100%;
    padding: 0.5rem 0;
    margin: 0.25rem 0;
    border: 2px solid #fff;
    border-radius: 0.75rem;
    color: #fff;
    font-size: 1rem;
    white-space: nowrap;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease,
        border-color 0.3s ease;
}

.button.active:hover,
.button.active:focus {
    background-color: #fff;
    color: #000;
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.button:not(.active) {
    cursor: default;
    pointer-events: none;
}

.button.active:hover .github-path,
.button.active:focus .github-path {
    fill: #000;
    transition: fill 0.3s ease;
}

.inner-container .github-svg {
    width: 1rem;
    height: auto;
    margin-left: 0.33rem;
}

.header-button-wrap,
.header-button {
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
}

.header-button-wrap {
    height: 2rem;
    margin-right: 1rem;
}

.header-button-wrap,
.header-button-wrap * {
    aspect-ratio: 1;
    width: auto;
}

.header-button,
.header-button .github-svg {
    height: 100%;
}

.header-button .github-svg {
    padding: 15%;
    border: 2px solid #e2e2e2;
    border-radius: 25%;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.header-button .github-path {
    fill: #e2e2e2;
    transition: fill 0.3s ease;
}

.header-button:hover .github-svg,
.header-button:focus .github-svg {
    border-color: #fff;
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.header-button:hover .github-path,
.header-button:focus .github-path {
    fill: #fff;
}

@media screen and (min-width: 64rem) and (min-height: 56.25rem) {
    img {
        margin-bottom: 1.5rem;
    }

    .site-header {
        height: 6rem;
    }

    .header-text {
        margin: 0 5rem;
        font-size: 4rem;
    }

    .inner-container .github-svg {
        width: 1.33rem;
        margin-left: 0.6rem;
    }

    .header-button-wrap {
        height: 4rem;
    }

    .header-button .github-svg {
        border-width: 4px;
    }
}

@media screen and (min-width: 48rem) and (min-height: 37.5rem),
    (min-height: 30rem) and (min-aspect-ratio: 2) {
    .site-header {
        height: 3.5rem;
    }

    .header-text {
        margin: 0 2rem;
        font-size: 2.5rem;
    }

    .outer-container {
        width: 33%;
    }

    .header-button-wrap {
        height: 2.5rem;
    }

    .header-button .github-svg {
        border-width: 3px;
    }
}

@media screen and (min-width: 56.25rem) and (min-height: 41.875rem),
    (min-height: 37.5rem) and (min-aspect-ratio: 2.5) {
    .site-header {
        height: 5rem;
    }

    .header-text {
        margin: 0 4rem;
        font-size: 3rem;
    }

    .header-button-wrap {
        height: 3rem;
        margin-right: 2rem;
    }
}

@media screen and (min-height: 56rem) {
    .left-section {
        clip-path: polygon(
            0 0,
            100% 0,
            100% calc((100% / 3) - 5% + 1px),
            0 calc((100% / 3) + 5% + 1px)
        );
    }

    .mid-section {
        clip-path: polygon(
            0 calc((100% / 3) + 5%),
            100% calc((100% / 3) - 5%),
            100% calc((100% / 3 * 2) - 5%),
            0 calc((100% / 3 * 2) + 5%)
        );
    }

    .right-section {
        clip-path: polygon(
            0 calc((100% / 3 * 2) + 5% - 1px),
            100% calc((100% / 3 * 2) - 5% - 1px),
            100% 100%,
            0 100%
        );
    }
}

@media screen and (min-width: 37.5rem) and (max-height: 48rem) {
    body {
        position: static;
        height: 100vh;
        min-height: 100vh;
        overflow: hidden;
    }

    .split-section {
        position: fixed;
    }

    .left-section {
        clip-path: polygon(
            0 0,
            calc((100% / 3) + 5% + 1px) 0,
            calc((100% / 3) - 5% + 1px) 100%,
            0 100%
        );
    }

    .mid-section {
        clip-path: polygon(
            calc((100% / 3) + 5%) 0,
            calc((100% / 3 * 2) + 5%) 0,
            calc((100% / 3 * 2) - 5%) 100%,
            calc((100% / 3) - 5%) 100%
        );
    }

    .right-section {
        clip-path: polygon(
            calc((100% / 3 * 2) + 5% - 1px) 0,
            100% 0,
            100% 100%,
            calc((100% / 3 * 2) - 5% - 1px) 100%
        );
    }

    .left-section .outer-container {
        top: 15%;
    }

    .mid-section .outer-container {
        top: 50%;
        transform: translate(-50%, -50%);
    }

    .right-section .outer-container {
        bottom: 15%;
    }
}

@media screen and (min-height: 48rem) and (min-aspect-ratio: 0.75) {
    body {
        position: static;
        height: 100vh;
        min-height: 100vh;
        overflow: hidden;
    }

    .split-section {
        position: fixed;
    }

    .left-section {
        clip-path: polygon(
            0 0,
            calc((100% / 3) + 10% + 1px) 0,
            calc((100% / 3) - 10% + 1px) 100%,
            0 100%
        );
    }

    .mid-section {
        clip-path: polygon(
            calc((100% / 3) + 10%) 0,
            calc((100% / 3 * 2) + 10%) 0,
            calc((100% / 3 * 2) - 10%) 100%,
            calc((100% / 3) - 10%) 100%
        );
    }

    .right-section {
        clip-path: polygon(
            calc((100% / 3 * 2) + 10% - 1px) 0,
            100% 0,
            100% 100%,
            calc((100% / 3 * 2) - 10% - 1px) 100%
        );
    }

    .left-section .outer-container {
        top: 15%;
    }

    .mid-section .outer-container {
        top: 50%;
        transform: translate(-50%, -50%);
    }

    .right-section .outer-container {
        bottom: 15%;
    }
}

@media screen and (min-aspect-ratio: 2) and (max-height: 30rem) {
    .left-section .outer-container {
        bottom: 15%;
        top: initial;
    }

    .mid-section .outer-container {
        bottom: 15%;
        top: initial;
        transform: translateX(-50%);
    }

    .right-section .outer-container {
        bottom: 15%;
        top: initial;
    }
}

@media screen and (min-width: 48rem) and (min-height: 48rem),
    (min-height: 64rem) and (max-aspect-ratio: 1),
    (min-width: 48rem) and (min-height: 22.5rem) and (min-aspect-ratio: 1.5) {
    .inner-container {
        width: 12rem;
    }

    .section-title {
        margin: 0.25rem 0 0.5rem 0;
        font-size: 1.25rem;
    }

    img {
        margin-bottom: 0.75rem;
    }

    .button {
        padding: 0.5rem 0;
        margin: 0.5rem 0;
        font-size: 1.125rem;
    }

    .inner-container .github-svg {
        width: 1.125rem;
        margin-left: 0.4rem;
    }
}

@media screen and (min-width: 56.25rem) and (min-height: 56.25rem),
    (min-width: 56.25rem) and (min-height: 30rem) and (min-aspect-ratio: 1.5) {
    .inner-container {
        width: 14rem;
    }

    .section-title {
        margin: 0.5rem 0 1rem 0;
        font-size: 1.5rem;
    }

    .button {
        padding: 0.75rem 0;
        margin: 0.5rem 0;
        border-radius: 1rem;
        font-size: 1.25rem;
    }
}

@media screen and (min-width: 75rem) and (min-height: 56.25rem),
    (min-height: 37.5rem) and (min-aspect-ratio: 2) {
    .inner-container {
        width: 18rem;
    }

    .section-title {
        margin: 1rem 0 2rem 0;
        font-size: 2rem;
    }

    .button {
        padding: 1rem 0;
        margin: 0.75rem 0;
        font-size: 1.33rem;
    }
}
