/* Global styles */
:root,
:root.monokai {
    --background-color: #1e1f1c;
    --editor-background: #272822;
    --navbar-text: #ccccc7;
    --inactive-navbar-background: #34352f;
    --active-navbar-text: #ffffff;
    --body-text: #f8f8f2;
    --secondary-text: #cfcfc2;
    --editor-line-number: #90908a;
    --editor-line-number-hover: #c2c2bf;
    --highlighted-line: #3e3d32;
    --line-break: #88846f;
    --accent: #a6e22e;
    --accent-hover: #4e94ce;
    --color-focus: #75715e;
    --color-scrollbar-border: #7f7f7f4d;
    --color-scrollbar-thumb: #79797966;
    --color-scrollbar-thumb-hover: #646464b3;
    --color-scrollbar-thumb-active: #bfbfbf66;
    --color-scrollbar-shadow: #000000;
    --code-string: #e6db74;
    --text-selection-color: #878b9180;
    --font-sans: -apple-system, BlinkMacSystemFont, Segoe WPC, Segoe UI,
        system-ui, Ubuntu, sans-serif;
    --font-mono: Fira Code, monospace;
}

:root.dark-plus {
    --background-color: #252526;
    --editor-background: #1e1e1e;
    --navbar-text: #ffffff80;
    --inactive-navbar-background: #2d2d2d;
    --active-navbar-text: #ffffff;
    --body-text: #d4d4d4;
    --secondary-text: #bbbbbb;
    --editor-line-number: #858585;
    --editor-line-number-hover: #c6c6c6;
    --highlighted-line: transparent;
    --line-break: #6a9955;
    --accent: #4ec9b0;
    --accent-hover: #4e94ce;
    --color-focus: #007fd4;
    --color-scrollbar-border: #7f7f7f4d;
    --color-scrollbar-thumb: #79797966;
    --color-scrollbar-thumb-hover: #646464b3;
    --color-scrollbar-thumb-active: #bfbfbf66;
    --color-scrollbar-shadow: #000000;
    --code-string: #ce9178;
    --text-selection-color: #264f78;
    --font-sans: -apple-system, BlinkMacSystemFont, Segoe WPC, Segoe UI,
        system-ui, Ubuntu, sans-serif;
    --font-mono: Fira Code, monospace;
}
:root.light-plus {
    --background-color: #f3f3f3;
    --editor-background: #ffffff;
    --navbar-text: #333333b3;
    --inactive-navbar-background: #ececec;
    --active-navbar-text: #333333;
    --body-text: #000000;
    --secondary-text: #444444;
    --editor-line-number: #237893;
    --editor-line-number-hover: #0b216f;
    --highlighted-line: transparent;
    --line-break: #008000;
    --accent: #267f99;
    --accent-hover: #0000ff;
    --color-focus: #0090f1;
    --color-scrollbar-border: #7f7f7f4d;
    --color-scrollbar-thumb: #64646466;
    --color-scrollbar-thumb-hover: #646464b3;
    --color-scrollbar-thumb-active: #00000099;
    --color-scrollbar-shadow: #dddddd;
    --code-string: #a31515;
    --text-selection-color: #add6ff;
    --font-sans: -apple-system, BlinkMacSystemFont, Segoe WPC, Segoe UI,
        system-ui, Ubuntu, sans-serif;
    --font-mono: Fira Code, monospace;
}
:root.github-dark {
    --background-color: #1b1f23;
    --editor-background: #24292e;
    --navbar-text: #959da5;
    --inactive-navbar-background: #1f2428;
    --active-navbar-text: #e1e4e8;
    --body-text: #e1e4e8;
    --secondary-text: #959da5;
    --editor-line-number: #768390;
    --editor-line-number-hover: #e1e4e8;
    --highlighted-line: #2b3036;
    --line-break: #6a737d;
    --accent: #96d0ff;
    --accent-hover: #4e94ce;
    --color-focus: #005cc5;
    --color-scrollbar-border: #1b1f23;
    --color-scrollbar-thumb: #6a737d33;
    --color-scrollbar-thumb-hover: #6a737d44;
    --color-scrollbar-thumb-active: #6a737d88;
    --color-scrollbar-shadow: #00000088;
    --code-string: #9ecbff;
    --text-selection-color: #3392ff44;
    --font-sans: -apple-system, BlinkMacSystemFont, Segoe WPC, Segoe UI,
        system-ui, Ubuntu, sans-serif;
    --font-mono: Fira Code, monospace;
}

:root.github-light {
    --background-color: #f6f8fa;
    --editor-background: #ffffff;
    --navbar-text: #6a737d;
    --inactive-navbar-background: #eff2f6;
    --active-navbar-text: #2f363d;
    --body-text: #24292e;
    --secondary-text: #6a737d;
    --editor-line-number: #1b1f234d;
    --editor-line-number-hover: #24292e;
    --highlighted-line: #f6f8fa;
    --line-break: #6a737d;
    --accent: #032f62;
    --accent-hover: #0000ff;
    --color-focus: #2188ff;
    --color-scrollbar-border: #ffffff;
    --color-scrollbar-thumb: #959da533;
    --color-scrollbar-thumb-hover: #959da544;
    --color-scrollbar-thumb-active: #959da588;
    --color-scrollbar-shadow: #6a737d33;
    --code-string: #032f62;
    --text-selection-color: #0366d625;
    --font-sans: -apple-system, BlinkMacSystemFont, Segoe WPC, Segoe UI,
        system-ui, Ubuntu, sans-serif;
    --font-mono: Fira Code, monospace;
}

:root.solarized-light {
    --background-color: #eee8d5;
    --editor-background: #fdf6e3;
    --navbar-text: #586e75;
    --inactive-navbar-background: #e4ddc9;
    --active-navbar-text: #333333;
    --body-text: #333333;
    --secondary-text: #586e75;
    --editor-line-number: #237893;
    --editor-line-number-hover: #567983;
    --highlighted-line: #eee8d5;
    --line-break: #93a1a1;
    --accent: #268bd2;
    --accent-hover: #0000ff;
    --color-focus: #d3af86;
    --color-scrollbar-border: #7f7f7f4d;
    --color-scrollbar-thumb: #64646466;
    --color-scrollbar-thumb-hover: #646464b3;
    --color-scrollbar-thumb-active: #00000099;
    --color-scrollbar-shadow: #dddddd;
    --code-string: #2aa198;
    --text-selection-color: #eee8d5;
    --font-sans: -apple-system, BlinkMacSystemFont, Segoe WPC, Segoe UI,
        system-ui, Ubuntu, sans-serif;
    --font-mono: Fira Code, monospace;
}
*,
*::before,
*::after {
    margin: 0;
    box-sizing: border-box;
    padding: 0;
}

*::-webkit-scrollbar-corner,
*::-webkit-scrollbar-button {
    display: none;
}

*::-webkit-scrollbar-thumb {
    background: var(--color-scrollbar-thumb);
}

*::-webkit-scrollbar-thumb:hover {
    background: var(--color-scrollbar-thumb-hover);
}

*::-webkit-scrollbar-thumb:active {
    background: var(--color-scrollbar-thumb-active);
}

*::selection {
    background-color: var(--text-selection-color);
}

a {
    text-decoration: none;
}

li {
    list-style: none;
}

body {
    background-color: var(--background-color);
    color: var(--body-text);
    font-family: var(--font-mono);
    font-weight: 500;
    line-height: 1.5rem;
}

body::-webkit-scrollbar {
    border-left: 1px solid var(--color-scrollbar-border);
    width: 14px;
}

.container {
    margin: 4.5rem auto;
    max-width: 81ch;
}

/* Header/Navbar */
.nav-list {
    display: flex;
    margin: 0 auto;
}

.nav-item {
    margin-right: 0.1rem;
    background-color: var(--inactive-navbar-background);
}

.nav-link {
    color: var(--navbar-text);
    font-family: var(--font-sans);
    font-size: 0.8rem;
}

.nav-link div {
    width: 7.5rem;
    padding: 0.3rem 0 0.3rem 0.5rem;
}

/* Main */
.editor {
    min-height: 100vh;
    padding: 2rem 8ch 5rem;
    background-color: var(--editor-background);
}

.main-header {
    padding-bottom: 1.5rem;
}

.title h1 {
    font-size: 1.25rem;
    font-weight: 700;
}

.article-content p {
    padding-bottom: 1.5rem;
}

table {
    margin-bottom: 1.5rem;
    border-color: inherit;
    border-collapse: collapse;
    text-indent: 0;
}

.data-input {
    width: 8ch;
    padding-right: 1ch;
}

input[type="text"] {
    display: inline;
    border: none;
    width: 100%;
    background-color: var(--editor-background);
    font-family: inherit;
    font-weight: inherit;
    font-size: inherit;
}

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

.string {
    color: var(--code-string);
}

input[type="text"]:focus,
input[type="text"]:active {
    outline: 1px solid var(--color-focus);
}

.table-break {
    position: relative;
    overflow: hidden;
    height: 1.5rem;
    padding-right: 1ch;
    color: var(--line-break);
}

.table-break span {
    position: absolute;
    top: 0;
    left: 0;
    font-variant-ligatures: none;
}

.article-link {
    border-bottom: 1px solid var(--accent);
    color: var(--accent);
}

.article-link:hover {
    border-bottom: 1px solid var(--accent-hover);
    color: var(--accent-hover);
}

.line-break {
    opacity: 80%;
    overflow: hidden !important;
    display: flex;
    margin: 0 0 1.5rem;
    border-width: 0px;
    height: 1.5rem;
    color: var(--line-break);
}

.line-break::before {
    content: "//";
    padding-right: 0.5rem;
}

.line-break::after {
    content: "-------------------------------------------------------";
    overflow-wrap: anywhere;
    font-variant-ligatures: none;
}

/* Footer */
footer {
    display: flex;
    justify-content: space-between;
}

.social-links {
    font-weight: 500;
}

.social-link {
    display: inline-block;
}

.social-link a {
    border-bottom: 1px solid var(--accent);
    color: var(--accent);
}

.social-link a:hover {
    border-bottom: 1px solid var(--accent-hover);
    color: var(--accent-hover);
}

.bullet {
    color: var(--secondary-text);
}

.color-theme-name {
    position: relative;
    cursor: pointer;
    white-space: nowrap;
}

.color-theme-name:focus-within {
    outline: 1px solid var(--color-focus) !important;
}

.arrow {
    font-size: 1rem;
    color: var(--accent);
}

.color-theme-name:hover,
.color-theme-name:hover .arrow {
    color: var(--accent-hover);
}

.theme-picker {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    -webkit-appearance: none;
    border: none;
    background: none;
    cursor: pointer;
    color: var(--body-text);
    font-size: 1rem;
    font-weight: 500;
    font-family: "Fira code", monospace;
}

.theme-picker:focus,
.theme-picker:active {
    outline: none;
}

.theme-picker > option {
    background-color: var(--background-color);
    color: var(--secondary-text);
}

/* Line numbers */
.lines {
    position: absolute;
    top: 8.5rem;
    padding: 0 1.5rem;
    color: var(--editor-line-number);
    text-align: right;
}

.lines-1:hover {
    cursor: pointer;
    color: var(--editor-line-number-hover);
}

.lines-1:active,
.lines-1:focus {
    color: var(--editor-line-number-hover);
}

/* Mobile view */
@media (max-width: 599px) {
    body::-webkit-scrollbar {
        display: none;
    }

    .container {
        margin-top: 1px;
    }

    nav {
        overflow: auto;
    }

    nav::-webkit-scrollbar {
        display: none;
    }

    .nav-list {
        flex: 0 0 auto;
    }

    .nav-item {
        flex: 0 0 auto;
        min-width: 25%;
    }

    .nav-link div {
        min-width: 0;
    }

    .editor {
        padding: 2rem 5ch 5rem;
    }
    .editor-content {
        max-width: 40ch;
    }

    .title h1 {
        font-size: 1.09rem;
    }

    p {
        line-height: 1.5rem;
    }

    p,
    footer {
        font-size: 0.875rem;
    }

    footer {
        flex-direction: column;
        min-height: 0;
    }

    .social-links {
        display: flex;
        flex-direction: column;
        padding-bottom: 1rem;
    }

    .bullet {
        display: none;
    }

    .lines {
        position: absolute;
        top: 4.1rem;
        padding-left: 1rem;
        color: var(--editor-line-number);
        text-align: right;
    }
}
