/* Raw elements */

:root {
    --theme-color: #6b6e4c;
    --theme-color-lighter: #bbb584;
    --theme-color-variation: #ede622;
}

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

body {
    background-color: black;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    font-size: 1em;
    color: white;
}

a {
    transition: 0.2s;
    color: lightgray;
    text-decoration: none;
}

a:hover {
    color: var(--theme-color-lighter);
}

li {
    list-style-type:circle;
    margin-left: 1em;
}

dt::before {
    content: "-> ";
}

dd {
    margin-inline-start: 2em;
}

dl {
    margin-bottom: 1em;
}

select {
    background-color: transparent;
    color: white;
    border: none;
    font-size: 1em;
}

header {
    display: flex;
    border-bottom: thick solid rgba(255, 255, 255, 0.1);
    width: 100%;
    box-shadow: 2px 7px 5px rgba(0, 0, 0, 0.3), 0px -4px 10px rgba(0, 0, 0, 0.3);
    background-color: rgba(0, 0, 0, 0.15);
}

header div {
    padding: 1rem;
}

header ul {
    transition: 0.2s;
    font-size: larger;
    margin: auto 0 auto 0;
    padding: 0;
    opacity: 0.6;
    text-align: right;
}

header ul a {
    transition: 0.2s;
    color: white;
}

header ul a:hover {
    color: var(--theme-color);
}

header ul:hover {
    opacity: 1;
}

main {
    margin-bottom: 2em;
}

h1,
h2,
h3 {
    text-shadow: 2px 7px 5px rgba(0, 0, 0, 0.3), 0px -4px 10px rgba(0, 0, 0, 0.3);
}

blockquote,
main p {
    margin-bottom: 1em;
}

main h1,
main h2 {
    margin-bottom: 0.2em;
}

main h2 {
    margin-top: 1em;
}

b {
    color: var(--theme-color-lighter);
    font-weight: 600;
}

blockquote {
    margin-left: 2.8em;
}

hr {
    border-bottom: thick solid rgba(255, 255, 255, 0.1);
    box-shadow: 2px 7px 5px rgba(0, 0, 0, 0.3), 0px -4px 10px rgba(0, 0, 0, 0.3);
    /* margin: .5em 0; */
    margin-bottom: 1em;
}

h2 {
    font-weight: normal;
    color: var(--theme-color-lighter);
}

textarea,
input,
button {
    border: medium solid var(--theme-color-lighter);
    background-color: black;
    color: white;
    padding: 0.6em;
}

hs {
    border-bottom: thin solid white;
}

input[type="checkbox"] {
    border: thick solid white;
}

input[type="range"] {
    width: 100%;
    border: none;
    padding: 0;
}

input[type="range"]::-webkit-slider-thumb,
input[type="range"]::-moz-range-thumb {
    background-color: black;
    transition: 0.2s;
    border-radius: 0;
    border: medium solid white;
    height: 1.2em;
}

input[type="range"]:hover::-webkit-slider-thumb,
input[type="range"]:hover::-moz-range-thumb {
    height: 2em;
    background-color: white;
    border-width: thin;
}

input[type="range"]::-webkit-slider-runnable-track,
input[type="range"]::-moz-range-track {
    background-color: white;
    height: 1em;
}

aside.metromenu {
    z-index: 2;
    position: fixed;
    top: 0;
    right: 0;
    width: 30vw;
    background-color: black;
    height: 100vh;
    transition: transform 0.6s cubic-bezier(0.19, 1, 0.22, 1);
    padding: 2em;
}

aside.metromenu.closed {
    transform: translateX(100%);
}

aside.metromenu h2 {
    font-size: xx-large;
}

aside.metromenu p {
    margin-bottom: 0.4em;
}

aside.metromenu .optionsToggle {
    margin-bottom: 1em;
}

aside.metromenu #content {
    display: flex;
    flex-direction: column;
    gap: 1em;
}

/* Global classes and IDs */

.notificationBox {
    transition: transform 1s cubic-bezier(0.19, 1, 0.22, 1);
    width: fit-content;
    position: fixed;
    bottom: 2em;
    left: 0;
    background-color: black;
    transform: translateX(-100%);
    padding: 1em;
    outline: thin solid var(--theme-color);
    margin-right: 8em;
    max-width: 40em;
}

.notificationBox.shown {
    transform: none;
}

.notificationBox h1 {
    font-size: x-large;
}

li.inlineList {
    display: inline;
}

.box {
    border: thick solid rgba(255, 255, 255, 0.1);
    padding: 1em;
    background-color: rgba(0, 0, 0, 0.15);
}

.box *:last-child {
    margin-bottom: 0;
}

.pageHeaderBox {
    border-bottom: 0;
}

.headerSquare,
#defaultSquare {
    transition: 0.4s;
    border: medium solid white;
    height: 7vh;
    overflow: hidden;
    width: 10vh;
    opacity: 0.4;
    padding: 0.4em;
    cursor: pointer;
    user-select: none;
}

.headerSquare img,
#defaultSquare img {
    width: 100%;
    height: auto;
}

.headerSquare:hover,
#defaultSquare {
    z-index: 1;
}

.headerSquare.selected,
#defaultSquare.selected {
    opacity: 1;
    height: 10vh;
    box-shadow: 2px 7px 5px rgba(0, 0, 0, 0.4), 0px -4px 10px rgba(0, 0, 0, 0.4);
    background-color: rgba(0, 0, 0, 0.3);
}

.youtubeCardHolderHelper {
    display: flex;
    justify-content: center;
}

div.hs {
    display: none;
}

div.hs.selected {
    display: unset;
}

.ytembed {
    display: block;
    margin: auto;
}

.margarinaColor {
    color: #ff85e1;
}

.hsProjects {
    gap: 0.6em;
    display: flex;
    flex-direction: column;
}

.hsProject {
    margin-bottom: 0.4em;
    border: medium solid rgba(255, 255, 255, 0.6);
    width: 100%;
    height: fit-content;
    transition: 0.2s;
    display: flex;
    flex-direction: column;
    gap: 1em;
    box-shadow: 2px 7px 5px rgba(0, 0, 0, 0.4), 0px -4px 10px rgba(0, 0, 0, 0.4);
    background-color: rgba(0, 0, 0, 0.2);
}

.hsProjectHeader {
    transition: 0.2s;
    display: flex;
    height: 7em;
    border-bottom: medium solid rgba(255, 255, 255, 0.6);
    padding: 1em;
}

.hsProjectHeaderIcon {
    transition: 0.2s;
    fill: white;
    stroke: white;
    height: 50%;
    width: auto;
    margin: auto 0;
    opacity: 0.6;
}

.hsProjectHeaderIcon img {
    height: 100%;
}

.hsProject:hover {
    border-color: white;
}

.hsProject:hover .hsProjectHeader {
    border-color: white;
}

.hsProject:hover .hsProjectHeaderIcon {
    opacity: 1;
}

.hsProjectImage {
    width: 100%;
    max-height: 100%;
}

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

.hsProjectContent {
    padding: 1em;
}

.invertedc {
    filter: invert();
}

.ellipsis-loader {
    animation: 1.8s infinite ellipsis-loader;
    display: inline-block;
    height: 8px;
    overflow: hidden;
    position: relative;
    width: 140px;
    margin: auto;
}

.ellipsis-loader__dot {
    animation: 1.8s infinite ellipsis-loader__dot;
    background: #fff;
    border-radius: 50%;
    float: left;
    height: 8px;
    position: absolute;
    width: 8px;
}

.ellipsis-loader__dot:nth-child(1) {
    animation-delay: 0.15s;
    left: -13px;
}

.ellipsis-loader__dot:nth-child(2) {
    animation-delay: 0.3s;
    left: -26px;
}

.ellipsis-loader__dot:nth-child(3) {
    animation-delay: 0.45s;
    left: -39px;
}

.ellipsis-loader__dot:nth-child(4) {
    animation-delay: 0.6s;
    left: -52px;
}

.checkbox {
    display: flex;
}

.checkbox p {
    flex-grow: 1;
}

.optionsToggle {
    cursor: pointer;
}

.fadeIn {
    animation: fadeIn 0.5s ease-in 1 forwards;
}

.fadeOut {
    opacity: 1;
    animation: fadeOut 0.5s ease-out 1 forwards;
}

.oneLineClamp {
    overflow: hidden;
    width: 100%;
    display: -webkit-box;
    line-clamp: 1;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}

.drawerSong {
    position: relative;
    overflow: hidden;
}

.drawerSong img {
    transition: 0.4s;
    width: 5em;
    height: 100%;
    object-fit: cover;
    object-position: left top;
    opacity: 0.4;
    filter: grayscale(1);
}

.drawerSong p {
    position: absolute;
    top: 0;
    left: 0;
    display: inline;
}

.drawerSong:hover img,
.drawerSong.selected img {
    opacity: 1;
    overflow: hidden;
    width: 10em;
}

.drawerSong.selected img {
    filter: none;
}

.drawerSong.selected {
    width: 10em;
}

.playlistTitle {
    background-color: white;
    color: black;
}

.playingSong {
    font-size: larger;
}

.hidden {
    display: none;
}

.invisible {
    opacity: 0;
}

.bg.invisible {
    opacity: 0 !important;
}

.blogpostYoutubeVideo {
    user-select: none;
    box-shadow: 2px 7px 5px rgba(0, 0, 0, 0.3), 0px -4px 10px rgba(0, 0, 0, 0.3);
    position: relative;
    display: inline-block;
    background-color: black;
    border: medium solid var(--theme-color-lighter);
    transition: 0.2s;
}

.blogpostYoutubeVideo .goLabel {
    transition: 0.2s;
    opacity: 0;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    font-size: 4em;
    background-color: var(--theme-color);
    padding: 0.2em;
    border-radius: 6px;
    font-weight: bold;
}

.blogpostYoutubeVideo:hover .goLabel {
    opacity: 1;
}

.blogpostYoutubeVideo:hover {
    border-color: var(--theme-color);
}

.blogpostYoutubeVideo img {
    width: 100%;
    display: block;
    opacity: 0.8;
    transition: 0.2s;
}

.blogpostYoutubeVideo .videoHeader {
    transition: 0.2s;
    position: absolute;
    bottom: 0;
    left: 0;
    padding: 0.4em 1em;
    z-index: 1;
    background-color: rgba(0, 0, 0, 0.6);
    width: 100%;
    padding: 1em;
}

.blogpostYoutubeVideo * {
    margin: 0;
}

.blogpostYoutubeVideo:hover::after {
    opacity: 0;
}

.blogpostYoutubeVideo:hover .videoHeader {
    opacity: 0;
}

.blogpostYoutubeVideo .videoHeader .alsoAvailable {
    font-weight: bold;
}

.blogpostYoutubeVideo:hover img {
    opacity: 1;
}

.i88x31 {
    transition: 0.2s;
    image-rendering: pixelated;
    width: 88px;
    height: 31px;
}

.i88x31.selected {
    transform: scale(2);
}

/* Section: Page-specific */

#music {
    padding: 0;
    display: flex;
    gap: 0.4em;
    inline-size: fit-content;
    height: 1.4em;
    margin-top: auto;
    opacity: 0.6;
}

#music:hover {
    opacity: 1;
}

#everythingHelper {
    position: relative;
}

#everythingHelper .bg {
    position: absolute;
    top: 0;
    left: 0;
    z-index: -1;
    opacity: 0.5;
    width: 100%;
    height: auto;
    -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 90%, rgba(0, 0, 0, 0) 100%);
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-size: 100% 100%;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 40%, rgba(0, 0, 0, 0) 100%);
    mask-repeat: no-repeat;
    mask-size: 100% 100%;
    user-select: none;
    transition: 0.4s;
    -webkit-user-drag: none;
}

#mainHelper {
    padding-top: 3rem;
    max-width: 50vw;
    margin: auto;
    display: flex;
}

#headerSubtitle {
    color: white;
    opacity: 0.6;
}

#fixedHint {
    position: fixed;
    top: 0;
    left: 0;
    background-color: black;
    z-index: 10;
    padding: .2em;
    outline: thin solid var(--theme-color);
}

#sound {
    filter: invert();
}

#sound:hover {
    cursor: pointer;
}

#linksHelper {
    margin: auto 1em auto auto;
    display: flex;
    flex-direction: column;
    gap: 0.2em;
}

#linksHelper:hover {
    opacity: 1;
}

#headerLinks {
    user-select: none;
}

#headerLinks a {
    color: white;
}

#headerLinks a {
    margin-right: 0.2em;
    margin-left: 0.2em;
}

#headerLinks:last-child {
    margin-left: 0;
}

#headerLinks a:first-child {
    margin-left: 0;
}

#headerLinks a:last-child {
    margin-right: 0;
}

header div:first-child {
    margin-bottom: 0;
}

#headerSquareMusic img,
#headerSquareVideo img,
#headerSquareCode img,
#defaultSquare img {
    filter: invert();
}

#homeSquares {
    display: flex;
    flex-direction: column;
    transition: 0.4s;
    width: fit-content;
    height: fit-content;
    margin-right: 3vw;
    margin-bottom: 3rem;
    gap: 10px;
}

.hsMusicCard .youtubeCardHolder {
    width: 50%;
}

#hsCode {
    flex-direction: column;
}

#hsCode.selected {
    display: flex;
}

#telnetSimulation {
    display: flex;
    width: 100%;
    gap: 10px;
}

#telnetSimulation div {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: 100%;
}

#telnetSimulation div textarea {
    width: 100%;
    resize: none;
    height: 300px;
}

#telnetSimulationInput {
    display: flex;
}

#telnetSimulationLoadingHolder {
    text-align: center;
    margin: 10px;
    display: none;
    flex-direction: column;
}

#youtubeVideo p {
    font-size: 2vh;
}

#youtubeVideoImage {
    width: 100%;
    transition: 0.3s;
    box-shadow: 2px 7px 5px rgba(0, 0, 0, 0.3), 0px -4px 10px rgba(0, 0, 0, 0.3);
}

#youtubeVideoImage:hover {
    opacity: 0.8;
}

#languageList {
    font-size: 2vh;
}

#languageList li {
    margin-bottom: 0.5em;
}

#languageList li a {
    transition: 1s;
}

.languagesHighlightedLink {
    color: var(--theme-color-variation);
}

#songDrawer {
    display: flex;
    height: 10em;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 0.2em;
}

#playlist {
    transition: 0.2s;
    max-height: 10em;
    overflow: auto;
    border: medium solid white;
}

#playlist p {
    cursor: pointer;
    padding: 0 0.4em;
}

#playlist p:first-child {
    padding-bottom: 0.2em;
}

#linksHelper hs {
    margin: 0.2em 0;
    opacity: 0.6;
}

#linkshelper:hover hs {
    opacity: 1;
}

#postHeader * {
    margin-bottom: 0;
}

#postHeader {
    margin-bottom: 1em;
}

/* Page: misc/favorites */

.favoritesTextBox {
    border-top: none;
}

.favoritesDivider {
    margin-bottom: 0;
}

.favoritesDefinitionListItem dt {
    font-size: large;
}

.favoritesDefinitionListItem dt::before {
    content: "";
}

.favoritesDefinitionListItem {
    margin-bottom: 2em;
}

.favorites88x31Box {
    width: fit-content;
    height: fit-content;
    border-right: none;
    border-top: none;
    border-bottom: none;
    padding: 0;
    padding-left: 1em;
    margin-bottom: 1em;
}

.favorites88x31Box img {
    margin: 0;
}

.favorite88x31Box {
    margin-top: .2em;
}

/* Animations */

@keyframes ellipsis-loader {
    0%, 25% { transform: translateX(0); }
    100% { transform: translate(20px); }
}

@keyframes ellipsis-loader__dot {
    0% {
        animation-timing-function: cubic-bezier(0.23, 1, 0.32, 1);
        transform: translateX(0);
    }
    55% {
        animation-timing-function: cubic-bezier(0.785, 0.135, 0.15, 0.86);
        opacity: 1;
        transform: translateX(98px);
    }
    75%, 100% {
        transform: translateX(212px);
    }
    90% {
        opacity: 0.2;
    }
}

@keyframes fadeIn {
    to { opacity: 1; }
}

@keyframes fadeOut {
    to { opacity: 0; }
}

/* Media queries */

@media screen and (max-width: 1280px) {
    body { font-size: 2vh; }

    header {
        padding-top: 1.4rem;
        text-align: center;
        flex-direction: column;
    }

    header ul {
        margin: auto;
        margin-bottom: 1.4rem;
    }

    main { max-width: 90vw; }

    main h1 { font-size: 3vh; }

    #headerLinks {
        text-align: center;
        width: 100%;
    }

    #homeTitle { font-size: 4vh; }

    #linksHelper { margin: 0 auto 0 auto; }

    #mainHelper {
        flex-direction: column;
        max-width: 90vw;
    }

    #homeSquares {
        flex-direction: row;
        align-content: center;
        justify-content: center;
        width: 40vw;
        margin-left: auto;
        margin-right: auto;
    }

    .headerSquare,
    #defaultSquare {
        aspect-ratio: 1/1;
        height: 100%;
        flex-grow: 1;
    }

    .headerSquare.selected,
    #defaultSqaure.selected {
        height: unset !important;
    }

    #languageList { font-size: 2.5vh; }

    .hsProjectHeader {
        height: fit-content;
        flex-direction: column;
        gap: 1em;
    }

    .hsProjectImage {
        max-height: 5em;
        margin: auto;
        width: fit-content;
    }

    .hsProjectImage img {
        height: 100%;
        max-height: inherit;
    }

    .hsProjectHeaderIcon {
        margin: auto;
    }

    aside.metromenu { width: 50%; }

    .blogpostYoutubeVideo .videoHeader { font-size: small; }

    .homeBadgesBox {
        display: flex;
        justify-content: center;
        gap: 4px;
        flex-wrap: wrap;
    }

    .misc88x31Page h2 { text-align: center; }
}

@media screen and (max-width: 800px) {
    #homeSquares { width: 60vw; }

    aside.metromenu { width: 100%; }

    .hsMusicCard .youtubeCardHolder { width: 100%; }
}

@media screen and (max-width: 720px) {
    #homeSquares { width: 80vw; }
}