:root[data-theme="dark"] {
    --bg-dark: hsl(0, 0%, 3.9%);
    --bg: hsl(0, 0%, 10.6%);
    --bg-light: hsl(0, 0%, 17%);
    --bg-modal: hsla(0, 0%, 0%, 0.75);
    --text: hsl(0, 0%, 95.7%);
    --text-muted: hsl(0, 0%, 73.7%);
    --stoke: hsl(0, 0%, 44.7%);
    --highlight: hsl(21, 97%, 49%);
    --highlightDarker: hsl(253, 81%, 24%);
    --danger: hsl(354, 76%, 44%);
    --lg-bg-color: rgba(255, 255, 255, 0.25);
    --lg-highlight: rgba(255, 255, 255, 0.75);
    --lg-hover-glow: rgba(255, 255, 255, 0.4);
    --lg-red: #fb4268;
    --lg-grey: #5b5b5b;
}

:root[data-theme="light"] {
    --bg-dark: hsl(0, 0%, 83%);
    --bg: hsl(0, 0%, 89.4%);
    --bg-light: hsl(0, 0%, 96.1%);
    --bg-modal: hsla(0, 0%, 100%, 0.75);
    --text: hsl(0, 0%, 4.3%);
    --text-muted: hsl(0, 0%, 26.3%);
    --stoke: hsl(0, 0%, 55.3%);
    --highlight: hsl(30, 96%, 50%);
    --highlightDarker: hsl(253, 81%, 76%);
    --danger: hsl(354, 92%, 66%);
    --lg-bg-color: rgba(255, 255, 255, 0.25);
    --lg-highlight: rgba(255, 255, 255, 0.75);
    --lg-hover-glow: rgba(255, 255, 255, 0.4);
    --lg-red: #fb4268;
    --lg-grey: #5b5b5b;
}

/* ========== BASE LAYOUT ========== */
body {
    margin: 0;
    padding: 2rem 0;
    min-height: calc(100vh - 4rem);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: sans-serif;
}

/* ========== BACKGROUND IMAGE ========== */
.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -4;
}

.app-header {
    position: fixed;
    bottom: 30px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ========== CONTAINER ========== */
.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.container--inline {
    flex-direction: row;
}

/* ========== GLASS CONTAINER ========== */
.glass-container {
    position: relative;
    display: flex;
    background: transparent;
    border-radius: 2rem;
    box-shadow: 0 6px 6px rgba(0, 0, 0, 0.2), 0 0 20px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 2.2);
}

.glass-container--large {
    width: auto;
}

.navbar {
    display: flex;
    align-items: center;
    width: 100%;
    flex: 1 1 auto;
    justify-content: space-between;
}

.navbar__thumb {
    display: flex;
    flex-direction: row;
    gap: 5px;
    align-items: center;
    justify-content: center;
    margin-left: 0.5rem;
}

/* ========== GLASS LAYERS ========== */
.glass-filter {
    position: absolute;
    inset: 0;
    z-index: 0;
    backdrop-filter: blur(0px);
    filter: url(#lg-dist);
    isolation: isolate;
    border-radius: 2rem;
}

.glass-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: var(--lg-bg-color);
    border-radius: 2rem;
}

.glass-specular {
    position: absolute;
    inset: 0;
    z-index: 2;
    border-radius: inherit;
    overflow: hidden;
    box-shadow: inset 1px 1px 0 var(--lg-highlight), inset 0 0 5px var(--lg-highlight);
    border-radius: 2rem;
}

.glass-content {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 1rem 1.5rem 0.9rem;
}

.glass-content--inline {
    padding: 0.25rem 2rem 0.25rem 0.75rem;
    flex: 1 1 auto;
    justify-content: space-between;
}

/* ========== ICONS AND IMAGES ========== */
.glass-content a {
    display: inline-block;
    position: relative;
    padding: 1px;
    border-radius: 1.2rem;
}

.glass-content img {
    opacity: 0.7;
}

.glass-content img,
.glass-content .dock-icon {
    border-radius: 19px;
    width: 75px;
    height: 75px;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 2.2);
    box-shadow: 0 6px 6px rgba(0, 0, 0, 0.2), 0 0 20px rgba(0, 0, 0, 0.1);
}

.glass-content a img:hover,
.glass-content .dock-icon:hover {
    transform: scale(0.95);
}

.navbar__thumb .dock-icon {
    backdrop-filter: blur(2px);
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    margin: 5px;
    cursor: pointer;
    position: relative;
}

/* ========== SITE LINK ========= */
.dock-icon.github-button:hover .icon {
    fill: var(--highlight);
    scale: 1.1;
    rotate: 360deg;
    filter: drop-shadow(0 0 5px var(--highlight)) drop-shadow(0 0 10px var(--highlightDarker));
}

.dock-icon.github-button .icon {
    fill: var(--text-muted);
    display: inline-block;
    width: 18px;
    height: 18px;
    margin-top: -3px;
    transition: all 1s ease;
}

.dock-icon.theme-button:hover label {
    scale: 1.1;
    rotate: 360deg;
}

.dock-icon.theme-button:hover label {
    width: 18px;
    height: 18px;
    margin-top: -3px;
    transition: all 1s ease;
}

.back {
    display: block;
    width: 40px;
    height: 40px;
    margin: 0;
    overflow: hidden;
    outline: none;
    background-color: transparent;
    cursor: pointer;
    border: 0;
    z-index: 1;
    position: relative; /* for pseudo elements */
}

.back:before,
.back:after {
    content: "";
    position: absolute;
    border-radius: 50%;
    inset: 7px;
}

.back:before {
    border: 2px solid var(--text-muted);
    transition: opacity 0.4s cubic-bezier(0.77, 0, 0.175, 1) 80ms,
        transform 0.5s cubic-bezier(0.455, 0.03, 0.515, 0.955) 80ms;
}

.back:after {
    border: 2px solid var(--highlight);
    transform: scale(1.3);
    transition: opacity 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    opacity: 0;
}

.back:hover:before,
.back:focus:before {
    opacity: 0;
    transform: scale(0.7);
    transition: opacity 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.back:hover:after,
.back:focus:after {
    opacity: 1;
    transform: scale(1);
    transition: opacity 0.4s cubic-bezier(0.77, 0, 0.175, 1) 80ms,
        transform 0.5s cubic-bezier(0.455, 0.03, 0.515, 0.955) 80ms;
}

.button-box {
    display: flex;
    position: absolute;
    top: 0;
    left: 0;
}

.button-elem {
    display: block;
    width: 10px;
    height: 10px;
    margin: 18px 31px 0 15px;
    transform: rotate(180deg);
    fill: var(--text-muted);
}

.dock-icon.back-button:hover .button-box,
.dock-icon.back-button:focus .button-box {
    transition: 0.4s;
    transform: translateX(-56px);
}

.dock-icon.info-button svg {
    stroke: var(--text-muted);
    transition: all 1s ease;
    width: 25px;
}

.dock-icon.info-button:hover svg {
    stroke: var(--highlight);
    transition: all 1s ease;
}

.dock-icon.theme-button:hover svg {
    fill: var(--highlight);
    transition: all 1s ease;
}

/* ======== MODAL ======== */
.container-modal {
    height: 340px;
    width: 411px;
}

.modal {
    height: 100%;
    width: 100%;
}

.explanation span {
    color: var(--text);
}

.glass-content.modal {
    position: relative;
    flex-direction: column;
    align-items: center;
    justify-content: end;
    transition: all 3s ease;
    border-radius: 2rem;
    box-sizing: border-box;
}

.close-modal {
    position: absolute;
    display: flex;
    top: 20px;
    left: 20px;
    height: 20px;
    width: 20px;
    border-radius: 1000px;
    border: none;
    background-color: #ff5f57;
    align-items: center;
    justify-content: center;
}

.close-modal .svg-x {
    display: none;
}

.close-modal svg {
    stroke: #720000;
    stroke-width: 5px;
}

.close-modal:hover .svg-x {
    display: flex;
}

.tooltip {
    content: "";
    position: absolute;
    top: -60px;
    padding: 5px 10px;
    background-color: var(--bg);
    color: var(--text-muted);
    display: flex;
    justify-content: center;
    align-items: center;
    border: none;
    border-radius: 5px;
    opacity: 0;
    transition: all 0.25s linear;
    z-index: 12;
}

.dock-icon.back-button:hover .tooltip,
.dock-icon.github-button:hover .tooltip,
.dock-icon.theme-button:hover .tooltip,
.dock-icon.info-button:hover .tooltip {
    opacity: 1;
}
