:root {
    font-family: "Karla", sans-serif;
    --carousel-img-w: min(50vw, 500px);
    --carousel-img-gap: calc(var(--carousel-img-w) / 4);
    --carousel-width: min(100vw, 1000px);
    --tile-shadow: 1px 2px 2px rgba(0, 0, 0, 0.33);
    --background-color: rgb(98, 157, 184);
    --dark-grey: #6a7282;
}

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

body {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100vh;
    background-color: var(--background-color);
    min-height: 20rem;
    overflow: auto;
}

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

button {
    background-color: transparent;
    border: none;
}

img {
    width: 100%;
    height: auto;
}

li {
    list-style: none;
}

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

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

.flex {
    display: flex;
}

.relative {
    position: relative;
}

.absolute {
    position: absolute;
}

.main-container {
    justify-content: center;
    align-items: center;
    width: 100%;
    flex: 1;
    z-index: 0;
}

#carousel-master {
    flex-direction: column;
    align-items: center;
    width: 100%;
    flex-grow: 1;
}

#slider-container {
    position: relative;
    height: 80%;
    max-width: var(--carousel-width);
}

#carousel-slider {
    overflow: hidden;
    gap: var(--carousel-img-gap);
    height: 100%;
    padding: 0 var(--carousel-img-w);
    z-index: 30;
}

.slider-item {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 0.5rem 0;
    min-width: var(--carousel-img-w);
}

.site-img {
    scroll-snap-align: center;
    border-radius: 1rem;
    filter: drop-shadow(var(--tile-shadow));
    overflow: hidden;
}

.buttons-container {
    flex-direction: column;
    gap: 0.25rem;
}

.carousel-gradient-overlay {
    position: absolute;
    top: 0;
    width: calc((100% - var(--carousel-img-w)) / 2);
    height: 100%;

    z-index: 60;
}

#gradient-overlay-left {
    left: 0;
    background-image: linear-gradient(to right, var(--background-color) 0%, transparent 100%);
}

#gradient-overlay-right {
    right: 0;
    background-image: linear-gradient(to left, var(--background-color) 0%, transparent 100%);
}

#carousel-chevron-container {
    justify-content: center;
    left: 0;
    top: 50%;
    width: 100%;
    transform: translateY(-50%);
    gap: var(--carousel-img-w);
    z-index: 70;
}

.carousel-chevron {
    display: flex;
    align-items: center;
    cursor: pointer;
    color: #fff;
}

#carousel-nav-back {
    margin-right: calc(var(--carousel-img-gap) / 2);
    transform: translateX(50%);
}

#carousel-nav-forward {
    margin-left: calc(var(--carousel-img-gap) / 2);
    transform: translateX(-50%);
}

#dot-container-spacer {
    justify-content: center;
    align-items: center;
    margin: 2rem 0;
    width: 100%;
    height: 20%;
}

#carousel-dot-container {
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: calc(infinity * 1px);
    background-color: #fff;
    transform: translateY(-0.25rem);
}

.carousel-dot {
    width: auto;
    height: 0.75rem;
    aspect-ratio: 1;
    border-radius: 50%;
    border: solid 2px var(--dark-grey);
    transition: background-color 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.carousel-dot.active {
    background-color: var(--dark-grey);
}

.site-title {
    text-align: center;
    font-size: 1.25rem;
    color: #e2e2e2;
    font-weight: bold;
}

.site-button {
    display: flex;
    justify-content: center;
    text-align: center;
    width: 100%;
    padding: 0.5rem 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;
}

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

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

.buttons-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;
    border-radius: 25%;
}

.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: 31.25rem) {
    .site-button {
        padding: 0.75rem 0;
        border-radius: 1rem;
        font-size: 1.25rem;
    }
}

@media screen and (max-width: 37.5rem) and (min-height: 31.25rem) {
    #carousel-master {
        padding-top: 15%;
    }
}

@media screen and (min-width: 35rem) {
    .site-button {
        padding: 0.75rem 0;
        border-radius: 1rem;
        font-size: 1.25rem;
    }
}

@media screen and (min-width: 37.5rem) and (min-height: 37.5rem) {
    .site-button {
        padding: 1rem 0;
        font-size: 1.33rem;
    }

    .site-title {
        font-size: 1.5rem;
    }
}

@media screen and (min-height: 37.5rem) {
    .buttons-container {
        gap: 1rem;
    }

    #dot-container-spacer {
        margin: 3rem 0;
    }
}

@media screen and (min-height: 48rem) {
    #dot-container-spacer {
        margin: 4rem 0;
    }
}

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

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

    .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) {
    header {
        min-height: 5rem;
    }

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

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

    .site-title {
        font-size: 1.5rem;
    }
}

@media screen and (min-width: 64rem) and (min-height: 56.25rem) {
    header {
        min-height: 6rem;
    }

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

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

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

    .site-title {
        font-size: 2rem;
    }
}
