* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Change the style of the scroll bar */
::-webkit-scrollbar {
    width: 5px;
}

::-webkit-scrollbar-thumb {
    background-color: darkgrey;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background-color: grey;
    cursor: pointer;
}

.show-mobile {
    display: none;
}

html,
body {
    height: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: Verdana, Geneva, Tahoma, sans-serif;
    display: flex;
    flex-direction: column;
    background-color: rgba(0, 0, 0, 0.9);
    color: white;
    overflow-x: hidden;
}

header>nav {
    position: fixed;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    background-color: black;
    color: white;
    width: 100%;
    padding: 20px;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
    transition: all 0.2s ease-in;
    z-index: 1;
}

header>nav.scroll {
    background-color: rgba(255, 0, 0, 0.8);
    padding: 15px 20px;
}

/* The first child is the title */
header>nav>a:first-child {
    font-size: 2rem;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-weight: bold;
    letter-spacing: 1.5px;
    margin-right: auto;
    color: white;
    text-decoration: none;
    cursor: pointer;
}

header>nav>a:not(:first-child) {
    position: relative;
    font-weight: bold;
    font-size: 1.2rem;
    text-decoration: none;
    color: white;
    margin: 10px;
    transition: opacity 0.2s ease-in-out;
    cursor: pointer;

    &:hover::before {
        width: 100%;
    }

    &:active {
        opacity: 0.8;
    }
}

header>nav>i {
    font-size: 2.5rem;
    cursor: pointer;
    margin-left: 5px;
    transition: transform 0.2s ease-in-out;

    &:hover {
        transform: scale(1.1);
    }
}

/* pseudo element */
header>nav>a::before {
    content: "";
    position: absolute;
    width: 0;
    height: 100%;
    left: 0;
    top: calc(50% + 2px);
    transform: translateY(-50%);
    border-bottom: 2px solid white;
    transition: width 0.25s ease-in-out;
}

.switch {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 5px;
}

.switch[title]::after {
    content: attr(title);
    position: absolute;
    left: 0;
    bottom: -5px; /* 5px margin to the top */
    transform-origin: center top;
    transform: scale(0.1) translate(-50%, 100%);
    width: 150px;
    background-color: rgb(50, 50, 50);
    padding: 5px;
    border-radius: 10px;
    opacity: 0;
    transition: 0.3s ease-out;
}

.switch[title]:hover::after {
    transform: scale(1) translate(-50%, 100%);
    opacity: 1;
}

.switch {
    position: relative;
    display: inline-block;
    background-color: rgb(50, 50, 50);
    width: 60px;
    height: 40px;
    border-radius: 30px;
    margin: 0 5px;
    transition: box-shadow 0.3s;

    &:hover {
        box-shadow: 0 0 3px white;
    }
}

.switch>input {
    position: absolute;
    width: 100%;
    height: 100%;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    z-index: 1;
    cursor: pointer;
}

.switch>span {
    display: inline-block;
    position: absolute;
    height: 100%;
    aspect-ratio: 1 / 1;
    left: 50%;
    top: 50%;
    transform: translate(-100%, -50%);
    background-color: grey;
    border-radius: 50%;
    transition: all 0.3s;
}

.switch>input:checked + span {
    background-color: lightskyblue;
    transform: translate(0, -50%);
}

#mobile-burger {
    position: fixed;
    width: 80%;
    height: 100%;
    text-align: center;
    right: -100%;
    top: 0;
    background-color: black;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
    visibility: hidden;
    transition: 0.3s ease-in-out;
    z-index: 1;
}

#mobile-burger.active {
    visibility: visible;
    right: 0;
}

#mobile-burger i {
    position: relative;
    font-size: 2.5rem;
    color: white;
    padding: 5px;
    width: 100%;
    text-align: right;
    cursor: pointer;
}

#mobile-burger>ul {
    list-style: none;
}

#mobile-burger>ul>li {
    font-size: 1.5rem;
    padding: 20px 0;
    cursor: pointer;
}

#mobile-burger>ul>li>a {
    color: white;
    text-decoration: none;
}

footer {
    position: relative;
    background-color: black;
    color: white;
    width: 100%;
    text-align: center;
    padding: 10px;
    margin-top: auto;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

footer a {
    color: white;
    text-decoration: underline;
    transition: opacity 0.3s;

    &:hover {
        opacity: 0.8;
    }
}

@media only screen and (max-width: 768px) {
    .hide-mobile {
        display: none;
    }

    .show-mobile {
        display: block;
    }
}