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

body {
    --white-wash: #f9f9f9;
    --lighter-grey: #f0f0f0;
    --light-grey: #d9d9d9;
    --grey: #888888;
    --dark-grey: #323232;
    --darker-grey: #111111;
    --black-wash: #090909;
    --font-text: Helvetica, sans-serif;
    --font-code: Courier, monospace;

    line-height: 1.6;
    letter-spacing: 0.7px;
    margin: 0;
    padding: 0;
    font-family: var(--font-text);
    color: var(--text-color);
    background-color: var(--background-color);
    
    /* Light theme */
    --background-color: var(--white-wash);
    --subtler-color: var(--lighter-grey);
    --subtle-color: var(--light-grey);
    --text-color: var(--grey);
    --highlight-color: var(--black-wash);
}

h1 {
    font-size: 2em;
    font-weight: 600;
    color: var(--highlight-color);
}

h2 {
    font-size: 1.1rem;
    font-weight: 300;
    color: var(--highlight-color);
}

h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--highlight-color);
}

h4 {
    font-size: 1rem;
    font-weight: 300;
}

h5 {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--highlight-color);
}

h6 {
    font-size: 0.9rem;
    font-weight: 400;
}

p {
    font-size: 0.85rem;
    font-weight: 400;
}

a {
    font-size: 0.9rem;
    font-weight: 400;
    cursor: pointer;
    text-decoration: none;
    border-bottom: 0.5px solid;
}

a:hover {
    opacity: 0.85;
}

pre {
    overflow-x: scroll;
}

.highlight {
    color: var(--highlight-color);
}

.subtle {
    color: var(--text-color);
}

.underline {
    border-bottom: 1px solid;
}

.bold {
    font-weight: 500;
}

.hide-on-desktop {
    display: none;
}

header {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--background-color);
    z-index: 9;
}

nav {
    list-style: none;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1280px;
    padding: 1rem 2rem;
    border: 0.5px solid var(--subtle-color);
    gap: 1.5rem
}

nav .logo-container {
    display: flex;
    flex-direction: row;
    gap: 0.2rem;
}

nav a {
    border: none;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
}

nav a:hover {
    opacity: 1;
}

nav ul {
    display: flex;
    flex-direction: row;
    list-style: none;
    align-items: center;
    justify-content: center;
    gap: 1.5em;
}

.right-nav {
    margin-left: auto;
}

nav ul li a {
    border: none;
    text-decoration: none;
    font-size: 0.9rem;
}

nav ul li a:hover {
    opacity: 0.9;
}

main {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    flex-direction: row;
    overflow-y: scroll;
}

menu {
    position: fixed;
    padding: 5rem 1rem;
    min-width: 200px;
    border: 0.5px solid var(--subtle-color);
    height: 100%;
    background-color: var(--background-color);
    z-index: 0;
}

menu h5 {
    padding: 0.25rem 0.5rem;
    margin-bottom: 0.5rem;
}

menu ul {
    display: flex;
    flex-direction: column;
    list-style: none;
    gap: 0.2rem;
    width: 100%;
}

menu ul a {
    width: 100%;
    border-radius: 6px;
    cursor: pointer;
    border: none;
}

menu ul a li {
    font-weight: 300;
    text-decoration: none;
    border: none;
    color: var(--highlight-color);
    padding: 0.25rem 0.5rem;
    width: 100%;
}

menu ul a:hover {
    background-color: var(--subtle-color);
    opacity: 1;
}

menu ul a .selected {
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    background-color: var(--subtle-color);
    border-radius: 6px;
    width: 100%;
}

.submenu {
    padding-left: 1rem;
    padding-top: 0.5rem;
}

.submenu li a {
    color: var(--text-color);
}

.submenu li a:hover {
    color: var(--highlight-color);
    text-decoration: none;
    border: none;
    background-color: var(---background-color);
}

.container {
    width: 100%;
    padding: 6rem 2rem 2rem 15rem;
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    flex-direction: column;
    border: 0.5px solid var(--subtle-color);
    gap: 0.5em;
}

.home {
    padding: 5rem 2rem;
}

.hero {
    padding-top: 2rem;
    max-width: 620px;
}

.button-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    padding: 1rem 0;
}

.navigation {
    display: flex;
    flex-direction: row;
    gap: 0.5em;
}

.preview, .usage {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 0.5rem;
    margin: 1rem 0;
}

.code-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
}

.code-content {
    width: 100%;
}

.codebox {
    border-radius: 6px;
    border: 0.5px solid var(--subtle-color);
    background-color: var(--subtler-color);
    padding: 1.5rem;
    font-family: var(--font-code);
    margin: 1rem 0;
    width: 100%;
}

.pagination-container {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    width: 100%;
}

/* Card */
.card {
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid var(--subtle-color);
    border-radius: 6px;
    padding: 8vw;
    margin: 1rem 0;
    height: 100%;
}

/* Accordion */
.accordion {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 1rem 0;
}

.togglebox {
    border-bottom: 0.5px solid var(--text-color);
    cursor: pointer;
}

input[type='radio'] {
    position: absolute;
    opacity: 0;
}

label {
    position: relative;
    display: block;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 400;
    text-align: left;
    color: var(--highlight-color);
    padding: 1rem 0;
}

.togglebox p {
    color: var(--highlight-color);
}

section {
    height: 0;
    transition: 0.3s all;
    overflow: hidden;
}

#toggle1:checked ~ #content1,
#toggle2:checked ~ #content2,
#toggle3:checked ~ #content3 {
    height: calc(20vh - 8vw);
}

/* Button */
button, .button {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    border: 0.5px solid;
    border-radius: 6px;
    text-decoration: none;
    cursor: pointer;
    padding: 0.8em 1.2em;
    gap: 0.5em;
}

button:hover {
    opacity: 0.9;
}

.primary {
    background-color: var(--highlight-color);
    color: var(--background-color);
    border-color: var(--highlight-color);
}

.secondary {
    background-color: var(--subtle-color);
    color: var(--highlight-color);
    border-color: var(--subtle-color);
}

.outline {
    background-color: transparent;
    color: var(--highlight-color);
    border-color: var(--subtle-color);
}

.ghost {
    background-color: transparent;
    color: var(--highlight-color);
    border-color: transparent;
}

.ghost:hover {
    background-color: var(--subtler-color);
    border-color: var(--subtler-color);
}

.icon {
    background-color: transparent;
    border-color: var(--subtle-color);
    padding: 0.8em;
}

.icon img {
    height: 28px;
    width: 28px;
}

.outline:hover, .icon:hover {
    background-color: var(--subtler-color);
}

.with-icon {
    background-color: var(--highlight-color);
    color: var(--background-color);
    border-color: var(--highlight-color);
}

.button img, button img {
    height: 18px;
    width: 18px;
}

.with-icon img {
    stroke: var(---background-color);
}

#primary, #secondary, #outline, #ghost, #icon, #with-icon {
    scroll-margin-top: 5rem;
}

/* Tooltip */
.tooltip-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tooltip {
    visibility: hidden;
    background-color: transparent;
    color: var(--highlight-color);
    border: 0.5px solid var(--subtle-color);
    text-align: center;
    padding: 0.5rem;
    border-radius: 6px;

    position: absolute;
    bottom: 120%;
    z-index: 1;

    opacity: 0;
    transition: opacity 0.5s;

    font-size: 0.8rem;
    font-weight: 300;
    width: 130px;
}

.tooltip-container:hover .tooltip {
    visibility: visible;
    opacity: 1;
}

/* Checkbox */
.checkbox-container {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 0.7rem;
}

input[type="checkbox"] {
    display: none;
}

.checkbox span {
    width: 18px; 
    height: 18px; 
    border: 1.5px solid var(--highlight-color); 
    background-color: transparent; 
    display: inline-block;
    border-radius: 4px;
    position: relative;
    transition: background-color 0.2s ease;
}
  
.checkbox span::after {
    content: "";
    position: absolute;
    width: 5px;
    height: 11px;
    border: solid var(--background-color);
    border-width: 0 1px 1px 0;
    transform: rotate(45deg);
    left: 5px;
    opacity: 0;
    transition: opacity 0.2s ease;
}
  
input[type="checkbox"]:checked + span {
    background-color: var(--highlight-color);
}
  
input[type="checkbox"]:checked + span::after {
    color: var(---background-color);
    opacity: 1;
}

#checkbox-label {
    font-size: 1rem;
    font-weight: 300;
    color: var(--highlight-color);
    padding: 0;
}

/* Dropdown */
.dropdown-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.dropdown {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: center;
    border-radius: 6px;
}
  
select {
    display: inline-block;
    padding: 0.8rem 1rem;
    font-size: 1em;
    color: var(--highlight-color);
    background-color: transparent;
    border: 1px solid var(--subtle-color);
    border-radius: 6px;
    cursor: pointer;
}
  
.dropdown::after {
    position: absolute;
    right: 0;
    font-size: 1em;
    color: var(--highlight-color);
    cursor: pointer;
}
  
select:focus {
    border: 0.5px solid var(--highlight-color);
    outline: none;
}

/* Toggle */
.toggle {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.toggle-label {
    cursor: pointer;
    display: inline-block;
    padding: 0.8em;
    border: 0.5px solid transparent;
    background-color: transparent;
    border-radius: 6px;
    text-decoration: none;
    cursor: pointer;
    color: var(--text-color);
    transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}

.toggle-label:hover {
    opacity: 0.6;
}

.toggle:checked ~ .toggle-label {
    background-color: var(--subtler-color);
    color: var(--highlight-color);
    border-color: var(--subtler-color);
    opacity: 1;
}

footer {
    position: block;
    right: 0;
    bottom: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9;
    background-color: var(--background-color);
}

footer container {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: flex-start;
    max-width: 1280px;
    width: 100%;
    padding: 2rem;
    border: 0.5px solid var(--subtle-color);
    border-top: none;
    background-color: var(--background-color);
    z-index: 9;
}

footer p, a {
    color: var(--text-color);
}

/* SVG Icons */
.logo-icon {
    display: inline-block;
    width: 1.3rem;
    height: 1.3rem;
    mask-image: url('media/logo.svg');
    -webkit-mask-image: url('media/logo.svg');
    mask-size: contain;
    -webkit-mask-size: contain;
    mask-repeat: no-repeat;
    -webkit-mask-repeat: no-repeat;
    background-color: var(--highlight-color);
}

.menu-icon {
    display: inline-block;
    width: 1.3rem;
    height: 1.3rem;
    mask-image: url('media/icons/menu.svg');
    -webkit-mask-image: url('media/icons/menu.svg');
    mask-size: contain;
    -webkit-mask-size: contain;
    mask-repeat: no-repeat;
    -webkit-mask-repeat: no-repeat;
    background-color: var(--highlight-color);
}

.gitlab-icon {
    display: inline-block;
    width: 1.3rem;
    height: 1.3rem;
    mask-image: url('media/icons/gitlab.svg');
    -webkit-mask-image: url('media/icons/gitlab.svg');
    mask-size: contain;
    -webkit-mask-size: contain;
    mask-repeat: no-repeat;
    -webkit-mask-repeat: no-repeat;
    background-color: var(--highlight-color);
}

.plus-icon {
    display: inline-block;
    width: 1.2rem;
    height: 1.2rem;
    mask-image: url('media/icons/plus.svg');
    -webkit-mask-image: url('media/icons/plus.svg');
    mask-size: contain;
    -webkit-mask-size: contain;
    mask-repeat: no-repeat;
    -webkit-mask-repeat: no-repeat;
    background-color: var(--highlight-color);
}

.chevron-left-icon {
    display: inline-block;
    width: 1.2rem;
    height: 1.2rem;
    mask-image: url('media/icons/chevron-left.svg');
    -webkit-mask-image: url('media/icons/chevron-left.svg');
    mask-size: contain;
    -webkit-mask-size: contain;
    mask-repeat: no-repeat;
    -webkit-mask-repeat: no-repeat;
    background-color: var(--highlight-color);
}

.chevron-right-icon {
    display: inline-block;
    width: 1.2rem;
    height: 1.2rem;
    mask-image: url('media/icons/chevron-right.svg');
    -webkit-mask-image: url('media/icons/chevron-right.svg');
    mask-size: contain;
    -webkit-mask-size: contain;
    mask-repeat: no-repeat;
    -webkit-mask-repeat: no-repeat;
    background-color: var(--highlight-color);
}

.on-off-icon {
    display: inline-block;
    width: 1.2rem;
    height: 1.2rem;
    mask-image: url('media/icons/on-off.svg');
    -webkit-mask-image: url('media/icons/on-off.svg');
    mask-size: contain;
    -webkit-mask-size: contain;
    mask-repeat: no-repeat;
    -webkit-mask-repeat: no-repeat;
    background-color: var(--highlight-color);
}

.italic-icon {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    mask-image: url('media/icons/italic.svg');
    -webkit-mask-image: url('media/icons/italic.svg');
    mask-size: contain;
    -webkit-mask-size: contain;
    mask-repeat: no-repeat;
    -webkit-mask-repeat: no-repeat;
    background-color: var(--highlight-color);
}

.invert-color {
    background-color: var(--background-color);
}

@media (prefers-color-scheme: dark) {
    /* Dark theme */
    body {
        --background-color: var(--black-wash);
        --subtler-color: var(--darker-grey);
        --subtle-color: var(--dark-grey);
        --text-color: var(--grey);
        --highlight-color: var(--white-wash);
    }
}

@media (max-width: 780px) {
    h1 {
        font-size: 1.7rem;
        margin: 0.75rem 0 0.25rem 0;
        line-height: 1.2;
    }

    h2 {
        font-size: 1.05rem;
    }

    h3 {
        font-size: 1rem;
    }

    h4 {
        font-size: 0.95rem;
    }

    h5 {
        font-size: 1rem;
    }

    h6 {
        font-size: 0.8rem;
    }

    p {
        font-size: 0.8rem;
    }

    a {
        font-size: 0.8rem;
    }

    .hero {
        padding-top: 1rem;
    }

    .hide-on-desktop {
        display: inline;
    }

    .hide-on-mobile {
        display: none;
    }

    nav {
        justify-content: space-between;
        padding: 1rem;
    }

    .menu-button {
        display: flex;
    }

    menu {
        position: fixed;
        bottom: -100%;
        left: 50%;
        transform: translate(-50%, 100%);
        height: 150vh;
        width: 100%;
        background: var(--background-color);
        padding: 2rem 1.5rem;
        border-radius: 10px 10px 0 0;
        transition: transform 0.5s ease-in-out;
        overflow-y: scroll;
        z-index: 999;
    }

    menu h5 {
        padding: 0.25rem 0;
    }

    menu ul {
        gap: 0.75rem;
        padding: 0.25rem 0;
    }

    menu a {
        font-size: 1rem;
        text-decoration: none;
        border: none;
    }

    .menu-container {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.6);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out;
        z-index: 999;
    }

    #menu:target {
        visibility: visible;
        opacity: 1;
    }

    #menu:target menu {
        transform: translate(-50%, 0);
    }

    .absolute-link {
        position: absolute;
        width: 100%;
        height: 100%;
        top: 0;
        left: 0;
        z-index: 999;
    }

    .container {
        padding: 5rem 1rem;
        border-bottom: none;
    }

    .preview {
        min-height: 55vh;
    }

    footer {
        position: relative;
        height: 15vh;
        z-index: -1;
    }

    footer container {
        justify-content: center;
        text-align: center;
        padding: 2rem 1rem;
        border-top: 0.5px solid var(--subtle-color);
        z-index: -1;
    }
}