/* Global styling */
: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;
    --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;
    --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;
    --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;
    --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;
    --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;
    --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);
}

li {
    list-style: none;
}

a {
    text-decoration: none;
}

h1,
h2 {
    font-weight: 700;
}

body {
    background-color: var(--background-color);
    color: var(--body-text);
    font-family: var(--font-mono);
    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 {
    background-color: var(--editor-background);
}
.nav-item:not(:nth-of-type(3)) {
    margin-right: 0.1rem;
}

.nav-item:nth-of-type(2),
.nav-item:nth-of-type(3) {
    background-color: var(--inactive-navbar-background);
}

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

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

/* Main */
main {
    font-weight: 500;
}

.editor {
    padding: 2rem 8ch 5rem;
    background-color: var(--editor-background);
    line-height: 1.5;
}

.header {
    display: flex;
}

.header-paragraph {
    opacity: 90%;
}

.hidden-header-paragraph {
    display: none;
}

.profile-pic {
    object-fit: cover;
    margin-right: 1rem;
    width: 17.5ch;
    height: 10.5rem;
}

.header-text h1 {
    font-size: 1.3rem;
}

.occupation {
    padding-bottom: 1.5rem;
    color: var(--secondary-text);
}

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

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

.line-break {
    display: flex;
    opacity: 80%;
    overflow: hidden !important;
    margin: 1.5rem 0;
    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;
}

.section-header {
    padding-bottom: 1.5rem;
    font-size: 1.125rem;
}

article {
    display: flex;
    padding-bottom: 1rem;
}

.article-img {
    margin-right: 1rem;
    width: 17.5ch;
    height: 6rem;
}

.article-title a {
    color: var(--body-text);
    font-size: 1.125rem;
    font-weight: 700;
}

.article-title a:hover {
    color: var(--accent-hover);
}

.article-description {
    opacity: 90%;
    min-height: 3rem;
}

.date-published {
    color: var(--secondary-text);
    font-size: 0.8rem;
}

.more-articles {
    display: inline-block;
    color: var(--body-text);
    font-weight: 700;
}

.arrow {
    vertical-align: top;
    color: var(--accent);
    font-size: 2rem;
}

.more-articles:hover,
.more-articles:hover .arrow {
    color: var(--accent-hover);
}

.project-img {
    margin-right: 1rem;
    width: 10ch;
    height: 6rem;
}

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

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

.mobile-title {
    display: 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-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-list {
        flex: 0 0 auto;
    }

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

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

    .editor {
        padding-left: 5ch;
        padding-right: 2ch;
    }
    .editor-content {
        max-width: 40ch;
        line-height: 1.5rem;
    }

    .profile-pic {
        width: 3.9rem;
        height: 3.9rem;
    }

    .header-paragraph {
        display: none;
    }
    .hidden-header-paragraph {
        display: block;
        opacity: 90%;
        line-height: 1.5rem;
    }

    .header-text h1 {
        font-size: 1.09rem;
    }

    .occupation {
        max-width: 20ch;
    }
    p,
    .more-articles,
    .project-link-mobile,
    footer {
        font-size: 0.875rem;
    }

    article {
        flex-direction: column;
    }

    .article-img {
        object-fit: contain;
        width: 18.6rem;
        max-width: 100%;
        height: 10rem;
        background-color: var(--background-color);
    }

    .article-description {
        min-height: 0;
    }

    .date-published {
        padding-bottom: 0.5rem;
        font-size: 0.71rem;
    }

    .project-img {
        width: 2.6rem;
        height: 2.6rem;
    }

    .project-title {
        display: none;
    }

    .project-link {
        display: none;
    }

    .flex-mobile-title {
        display: flex;
    }

    .mobile-title {
        display: block;
        padding-bottom: 1rem;
    }

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

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

    .section-header,
    .article-title a {
        font-size: 0.99rem;
    }

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

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

    .bullet {
        display: none;
    }

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