@font-face {
    font-family: "Inter";
    src: url(/fonts/InterVariable.woff2)
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
a,
a:active,
a:focus{
    outline: none;
    text-decoration: none;
    color: var(--text);
}
a:hover{
    text-decoration: underline;
}

::selection {
    background-color: #5ba6e6;
    color: var(--bg);
}

:root{
    --dark-bg: #0a0a0a;
    --dark-text: #ffffffcc;
    --dark-text-primary: white;
    --dark-card-bg: #242424;
    --dark-card-head: white;
    --dark-card-text: #d8d8d8;
    --dark-logo-top: white;
    --dark-logo-bottom: #eeeeee;
    --dark-pre-bg: #000000;
    --dark-pre-border: #ffffff30;
    --dark-code-bg: #1a1a1a;

    --light-bg: #f3f3f3;
    --light-text: #1a1a1a;
    --light-text-primary: black;
    --light-card-bg: white;
    --light-card-head: #333333;
    --light-card-text: #292929;
    --light-logo-top: #1a1a1a;
    --light-logo-bottom: #4d4d4d;
    --light-pre-bg: #0000000f;
    --light-pre-border: #00000026;
    --light-code-bg: #0000000f;
}

body.theme-light, body.theme-auto{
    --bg: var(--light-bg);
    --text: var(--light-text);
    --text-primary: var(--light-text-primary);
    --text-secondary: #4e4e4e;
    --quote-bar: #00000030;
    --card-bg: var(--light-card-bg);
    --card-head: var(--light-card-head);
    --card-text: var(--light-card-text);
    --logo-top: var(--light-logo-top);
    --logo-bottom: var(--light-logo-bottom);
    --pre-bg: var(--light-pre-bg);
    --pre-border: var(--light-pre-border);
    --code-bg: var(--light-code-bg);
    --scrollbar: #00000011;

    --imba-searchbar-outline-width: 1px;
    --imba-searchbar-outline-style: solid;
    --imba-searchbar-outline-color: #00000022;
}

@media (prefers-color-scheme: dark) {
    body.theme-auto{
        --bg: var(--dark-bg);
        --text: var(--dark-text);
        --text-primary: var(--dark-text-primary);
        --text-secondary: #919191;
        --quote-bar: #ffffff61;
        --card-bg: var(--dark-card-bg);
        --card-head: var(--dark-card-head);
        --card-text: var(--dark-card-text);
        --logo-top: var(--dark-logo-top);
        --logo-bottom: var(--dark-logo-bottom);
        --pre-bg: var(--dark-pre-bg);
        --pre-border: var(--dark-pre-border);
        --code-bg: var(--dark-code-bg);
        --scrollbar: #ffffff11;
        --imba-searchbar-outline-style: none;
    }
}

body.theme-dark{
    --bg: var(--dark-bg);
    --text: var(--dark-text);
    --text-primary: var(--dark-text-primary);
    --text-secondary: #919191;
    --quote-bar: #ffffff61;
    --card-bg: var(--dark-card-bg);
    --card-head: var(--dark-card-head);
    --card-text: var(--dark-card-text);
    --logo-top: var(--dark-logo-top);
    --logo-bottom: var(--dark-logo-bottom);
    --pre-bg: var(--dark-pre-bg);
    --pre-border: var(--dark-pre-border);
    --code-bg: var(--dark-code-bg);
    --scrollbar: #ffffff11;

    --imba-searchbar-outline-style: none;
}

body{
    background-color: var(--bg);
    font-family: Inter, sans-serif;
}

.vert-scroller::-webkit-scrollbar {
    margin-left:12px;
    width: 6px;
}

.vert-scroller:hover::-webkit-scrollbar-thumb {
  background-color: rgb(from var(--scrollbar) r g b / 0.2);
}

.vert-scroller::-webkit-scrollbar-thumb {
  background-color: var(--scrollbar);
  border-radius: 20px;
}

.vert-scroller::-webkit-scrollbar-thumb:active {
  background-color: rgba(3,122,255,0.8);
}


nav {
    font-family: Inter;
    max-width: 672px;
    margin: auto;
    height: 6rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#notes-nav {
    display: grid;
    grid-template-columns: repeat(28, 1fr);
    width: 1344px;
    max-width: none;
    grid-column: 8 / 22;
}

@media screen and (max-width: 1367px) {
    #notes-nav {
        width: 95%;
    }
}

@media screen and (max-width: 767px) {
    #notes-nav {
        width: 90%;
    }
}

.nav-group {
    display: flex;
    align-items: center;
}

.nav-group > *:not(:first-child) {
    margin-left: 2.5rem;
}

nav select {
    align-self: flex-end;
    text-decoration: none;
    text-transform: uppercase;
    background: none;
    color: var(--text);
    font-family: monospace;
    font-size: inherit;
    font-weight: 700;
    border: none;
}

#sun {
    width: 24px;
    margin-top: 6px;
    fill: var(--text);
    cursor: pointer;
}

#pg {
    height: 24px ;
    margin-bottom: -6px;
}

#pg #top{
    fill: var(--logo-top);
}

#pg #bottom{
    fill: var(--logo-bottom);
}

#pg:hover path {
    fill: #B554E3;
}

nav a{
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
}

nav a:hover{
    text-decoration: underline;
    color: var(--text);
    font-weight: 500;
}

#latest-posts{
    margin-top: 3rem;
}

#latest-posts {
    color: var(--text);
}

#latest-posts a:hover{
    text-decoration: underline;
    color: var(--text);
}

#latest-posts-viewall {
    font-weight: 500;
    font-size: 16px;
}


#latest-posts h2{
    margin: 1.2rem 0;
    font-size: 24px;
    font-weight: 600;
}

#latest-posts h3{
    font-size: 18px;
    font-weight: 500;
    margin: 0.2rem 0;
}

#latest-posts p{
    font-weight: 400;
    line-height: 1.3;
    color: var(--text-secondary);
}

#latest-posts-list {
    margin-bottom: 1.5rem;
    
}

#latest-posts-list > div{
    display: flex;
    justify-content: space-between;
    margin: 1rem 0;
}

#latest-posts-list > div > p{
    white-space: nowrap;
    padding-left: 1.8rem;
}

footer {
    height: 7rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

footer p{
    font-family: Inter;
    font-size: 14px;
    color: var(--text);
}

footer svg{
    width:18px;
    transform:translateY(4px);
    margin-right:4px;
    fill: var(--text);
}

footer p a{
    color: inherit;
    text-decoration: underline;
}

@media only screen and (max-width: 767px){
    nav {
        width: 90%;
    }
}

#intro{
    margin-top: 1rem;
}

#intro a{
    color: inherit;
    font-weight: 500;
    text-decoration: underline;
}

.container{
    margin: 0 auto;
    position: relative;
    max-width: 672px;
}

.sidebar-layout-container{
  display: flex;
}

.sidebar-layout-main-content {
  width: 672px;
}

.shadow-box{
    background-color: var(--card-bg);
    border-radius: 24px;
    box-shadow: 0 3px 12px rgba(0,0,0,0.1);
    margin: 0 auto;
    position: relative;
}

#sec-404 {
    margin-top: 5rem;
    margin-bottom: 0rem;
    min-height: calc(100vh - 10rem - 7rem);
}

#sec-404 h2{
    padding: 6rem;
    text-align: center;
    color: rgba(0,0,0,0.4);
    font-size: 6rem;
}


#sec-404 h1{
    top: -2rem;
    left: -4rem;
    font-size: 3rem;
}

@media only screen and (max-width: 768px){
    #sec-404 h1 {
        display: none;
    }
}


.intro-text{
    color: var(--card-text);
    padding: 1rem 1.9rem;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    line-height: 1.5;
    background-color: var(--card-bg);
    border-radius: 18px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.075);
    margin: 0 auto;
}

.intro-text p {
    margin: 0.9rem 0rem;
}

#notes-list > div {
  display: flex;
  justify-content: space-between;
  margin: 16px 0;
}

.tag-group {
  display:flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;

}

.tag-group span{
  font-size: 14px;
  border: 1px;
  background-color: var(--card-bg);
  padding: 4px 12px;
  border-radius: 36px;
}


@media only screen and (max-width: 767px){

    /* move date to the top of the post title and removing the left padding */ 
    #latest-posts-list > div{
        flex-direction: column;
    }

    #latest-posts-list > div > p{
        white-space: nowrap;
        padding-left: 0rem;
    }

    #latest-posts-list > div > div{
        order: 2;
    }

    .container{
        width: 90%;
    }
    
    .page-section{
        margin-bottom: 5rem;
    }

    .section-text{
        padding-bottom: 0rem;
    }

}

