:root {
    --text-color: rgb(17, 17, 17);
    --text-max-width: 1080px;
    --bg-color: rgb(251, 251, 251);
    
    --nav-bg-color: rgb(245, 245, 245); /* whitesmoke */
    --nav-font-size: 1rem;
    --lang-icon-size: 0.9rem;
    --navbar-height: 4rem;
    --navbar-gap: 0.5rem;
    --nav-list-gap: 0.3rem;

    --nav-hover-color-0: hsla(0, 0%, 100%, 0);
    /* --nav-hover-color-map: hsla(31, 76%, 70%, 0.8); */
    --nav-hover-color-map: hsla(271, 66%, 60%, 0.6);
    --lang-hover-color-0: hsla(91, 90%, 60%, 0);
    --lang-hover-color: hsla(91, 90%, 60%, 0.6);
}

*,
::before,
::after {
    box-sizing: border-box;
}

body {
    font-family: system-ui, sans-serif;
    line-height: 1.6;
    margin: 0 auto;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    min-height: 100svh;
}

@media screen and (min-width: 520px) {
    :root {
        --nav-font-size: 1rem;
        --lang-icon-size: 0.9rem;
        --navbar-gap: 1rem;
        --nav-list-gap: 0.4rem;
    }
}

@media screen and (min-width: 800px) {
    :root {
        --nav-font-size: 1.2rem;
        --lang-icon-size: 1.1rem;
        --navbar-gap: 2rem;
        --nav-list-gap: 0.8rem;
    }
}

/* ------------ Chat GPT - modified --------- */
.navbar {
    display: flex;
    flex-direction: column;
    min-height: var(--navbar-height);
    align-items: center;
    column-gap: var(--navbar-gap);
    /* flex-wrap: wrap;
    row-gap: 0.5rem; */
    line-height: 100%;
    padding: 0.5rem 0.6rem;
    font-size: var(--nav-font-size);
    background-color: var(--nav-bg-color);
    /* overflow-x: auto; */
}

@media screen and (min-width: 520px) {
    .navbar {
        flex-direction: row;
    }
}

.no-script {
    text-align: center;
    color: crimson;
    font-weight: bold;
    font-size: 1.3rem;
}

.navbar a {
    color: black !important;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent !important;
}

#site-title {
    padding: 0.3rem 0.4rem 0.4rem 0.4rem;
    font-weight: bold;
    margin-right: auto;
}
@media screen and (min-width: 800px) {
    #site-title {
        padding: 0.3rem 0.9rem 0.4rem 0.9rem;
    }
}

#site-title a:not(.active a) {
    text-decoration: underline;
    text-decoration-thickness: 4px;
    text-underline-offset: 3px;
    text-decoration-color: var(--nav-hover-color-0);
    transition: text-decoration-color 300ms;
}

#site-title a:not(.active a):hover {
    text-decoration-color: var(--nav-hover-color-map);
}

.navbar .active a {
    color: #555 !important;
    /* text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    text-decoration-color: darkgray; */
}

.nav-list {
    display: flex;
    align-items: center;
    column-gap: var(--nav-list-gap);
    list-style: none;
    margin: 0;
    /* margin-left: auto; */
    margin-right: auto;
    padding: 0;
}

.nav-list li {
    padding: 0.3rem 0.9rem 0.4rem 0.9rem;
    background-color: var(--nav-hover-color-0);
    border-radius: 99999px;
    transition: background-color 300ms;
}

.nav-list li:not(.active):hover {
    background-color: var(--nav-hover-color-map);
}

.nav-right {
    /* margin-left: auto; */
    margin-right: auto;
    list-style: none;
}

.nav-right {
    padding: 0.3rem 0.4rem 0.4rem 0.4rem;
    background-color: var(--lang-hover-color-0);
    border-radius: 99999px;
    transition: background-color 300ms;
}

@media screen and (min-width: 520px) {
    .nav-right {
        margin-right: 0;
    }
}
@media screen and (min-width: 800px) {
    .nav-right {
        padding: 0.3rem 0.9rem 0.4rem 0.9rem;
    }
}

.nav-right li {
    border-radius: 99999px;
    transition: background-color 500ms;
}

.nav-right:hover {
    background-color: var(--lang-hover-color);
}

.lang-switcher {
    position: relative;
}

.lang-summary {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    gap: 0.15rem;
    cursor: pointer;
    list-style: none;
	-webkit-tap-highlight-color: transparent !important;
}

/* remove default marker */
.lang-summary::-webkit-details-marker {
    display: none;
}

/* focus ring (keyboard only) */
.lang-summary:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
    border-radius: 2px;
}

/* open state styling */
.lang-switcher[open] .lang-summary {
    opacity: 0.65;
}

/* dropdown */
.lang-menu {
    position: absolute;
    right: -0.9rem;
    top: 100%;
    background: white;
    padding: 0.5rem 0.9rem;
    margin: 0;
    list-style: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10000;
}

.lang-menu li {
    padding: 0;
}

.lang-menu li:hover {
    background-color: var(--lang-hover-color);
}

/* links */
.lang-menu a {
    display: block;
    margin: 0.5rem 0.5rem;
    padding: 0.15rem 0.5rem 0.3rem 0.5rem;
    color: inherit;
}

.lang-menu a:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
    border-radius: 2px;
}

/* current language */
.lang-menu a[aria-current="true"] {
    font-weight: 600;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* ------------ my additions ------------ */

.lang-summary::before {
    content: "";
    width: var(--lang-icon-size);
    height: var(--lang-icon-size);
    background: url("/assets-map/lang-icon.svg") no-repeat center / contain;
    flex-shrink: 0;
    vertical-align: -0.35em;
}
