* {
    transition: background-color 0.55s ease-out, color 0.55s ease-in;
}

:where(h1) {
    margin-block: 0.67em;
    font-size: 2em;
    line-height: 1.2em;
}

h2 {
    font-size: 1.5em;
    line-height: 1.2em;
    margin: 0;
    font-size: 1.75em;
    font-weight: 500;
}

h3 {
    font-size: 1.25em;
    line-height: 1.2em;
}

hr {
    height: 0;
    width: 80%;
    max-width: 1000px;
    border: 2px solid var(--background-alt);
    border-radius: 4px;
    box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.15);
}

b {
    font-weight: bold;
}

a {
    color: var(--dark);
    transition: color 0.2s ease;
}

a:hover {
    color: var(--secondary);
}

.no-select {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.no-scroll {
    overflow: hidden;
}

.clickable {
    transition: transform 0.2s ease;
}

footer {
    display: flex;
    flex-direction: row;
    background-color: var(--background-alt);
    box-shadow: 0px 0px 24px rgba(0, 0, 0, 0.3);
    text-align: center;
    justify-content: space-evenly;
    padding: 52px 0;
}

footer > p {
    margin: 0;
    text-align: right;
}

footer > div, .contact-me {
    display: flex;
    flex-direction: column;
    gap: 16px;
    text-align: left;
}

footer h3, .contact-me h3 {
    margin: 0;
    font-size: 1.375em;
    font-weight: 500;
}

footer a, .contact-me a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text);
    font-weight: 450;
}

footer span {
    transition: color 0.2s ease;
}

.contact-me {
    text-align: center;
}

button:focus {
    transform: scale(1.12);
}

@media (max-width: 768px) {
    #navMenu {
        position: absolute;
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        pointer-events: none;
        gap: 5px;
        opacity: 0;
        transform: translateY(60px);
        z-index: -1;
        transition: transform 0.5s ease, opacity 0.5s ease, z-index 0s 0.3s;
    }

    #navMenu.open {
        transform: translateY(80px);
        opacity: 1;
        pointer-events: auto;
        z-index: 98;
        transition: transform 0.5s ease, opacity 0.5s ease, z-index 0s;
    }

    #navMenu a {
        display: block;
        width: 90%;
        font-size: 1.125em;
        font-weight: 500;
        text-align: center;
        text-decoration: none;
        color: var(--dark);
        background-color: var(--primary);
        padding: 10px;
        border: 2px solid var(--secondary);
        border-radius: 8px;
        box-shadow: 6px 6px 8px rgba(0, 0, 0, 0.1);
    }

    footer > p {
        display: none;
    }
}

@media (prefers-reduced-motion: no-preference) and (hover: hover) and (pointer: fine) {
    #navbar a:hover {
        transform: scale(1.12);
    }
    
    #navToggle:hover {
        transform: scale(1.12);
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0ms !important;
        scroll-behavior: auto !important;
    }
}