/* themes */
:root {
  color-scheme: light dark;
  --primary-color: light-dark(#333, #888);
  --primary-background: light-dark(#fff8e8, #121212);
  --secondary-background: light-dark(#d1d9d9, #222223);
  --tertiary-background: light-dark(#535657, #403131);
  --highlight-color: rgb(217, 70, 91);
}

/* reduce the margins around paragraphs */
p {
    margin: 5px;
}

html, body {
    /* margin: 0; */
    /* padding: 0; */
    color: var(--primary-color);
    background-color: var(--primary-background);
    word-wrap: break-word;
}

.content {
    max-width: 700px;
    margin: auto;
    margin-top: 15px;
}

.main-title, .desc, .date {
    margin: auto;
    width: fit-content;
    display: block;
    text-align: center;
}
.date {
    font-style: italic;
}

.navbar {
    margin: auto;
    max-width: 400px;
    display: flex;
    justify-content: space-evenly;
    font-size: 19px;
    padding: 10px;
    align-items: center;
}


/* style for lists of references like the archive or blog section */
.list-item {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
}


/* style for album covers */
.collage {
    display: flex;
    flex-flow: row;
    flex-wrap: wrap;
    justify-content: center;
    font-size: 12px;
}
.collage img {
    border: 1px solid red;
    margin: 3px;
    justify-content: center;
}
.collage .card {
    max-width: 150px;
    display: flex;
    flex-flow: column;
    margin: 5px;
}
/* .collage .card span { */
/*     overflow: hidden; */
/*     white-space: nowrap; */
/*     text-overflow: ellipsis; */
/* } */
.collage .card-image:hover {
    border-color: blue;
    cursor: pointer;
}
.card-title {
    color: rgb(175, 39, 39);
}


/* otherwise images overflow out of screen */
img, svg, video {
    max-width: 100%;
    margin: auto;
}

/* make src blocks horizontally scrollable */
pre {
    overflow-x: auto;
}

/* block styling */
.fancy-block {
    /* background-color: var(--secondary-background); */
    /* border: solid 1px #3498db; */
    padding-left: 5px;
}
.fancy-before, .fancy-after {
    font-weight: bold;
    font-style: italic;
}
.fancy-before {
    display: inline;
    margin-left: 5px;
}
.fancy-container {
    position: relative;
    border-left: 3px solid var(--tertiary-background); /* Adjust border width and color */
    margin: 5px;
    padding-left: 5px;
}
.fancy-container::before {
    content: "";
    position: absolute;
    left: -9px; /* Adjust according to border width */
    width: 15px;
    height: 15px;
    background-color: var(--tertiary-background);
    transform: rotate(45deg);
}
/* org inserts data-before into a paragraph which results in odd alignment, fix it */
.fancy-before p {
    display: inline;
    margin: 0px;
    padding: 0px;
}
.fancy-container p {
    margin: 0px;
    padding: 0px;
}


a {
    color: rgb(217, 70, 91);
    text-decoration: none;
}

#darkModeToggle {
  font-size: 25px;
  cursor: pointer;
}

:root.dark .org-latex {
    filter: invert(70%) sepia(10%) saturate(300%) hue-rotate(86deg) brightness(118%) contrast(119%);
}
:root.dark svg {
    filter: invert(70%) sepia(10%) saturate(300%) hue-rotate(86deg) brightness(118%) contrast(119%);
}
:root.dark .svg {
    filter: invert(70%) sepia(10%) saturate(300%) hue-rotate(86deg) brightness(118%) contrast(119%);
}

/* code block styling */
.org-src-container {
    position: relative;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 20px;
    padding-top: 40px;
    margin: 20px 0;
    font-family: 'Courier New', Courier, monospace;
}
.org-src-container::before, .org-src-container::after {
    content: '';
    font-size: 0.9em;
    color: #555;
    position: absolute;
    padding: 0 5px;
    top: 20px;
    background-color: #f5f5f5;
}
.org-src-container::before {
    content: 'code';
    left: 20px;
}
.org-src-container::after {
    content: attr(data-language);
    right: 20px;
}
code {
    color: #DD6F48;
}

.equation {
    max-width: 100%;
    display: block;
}
.equation svg {
    display: block !important;
    margin: auto;
}
.org-latex-block, .equation svg {
    padding-top: 5px;
    padding-bottom: 5px;
}

/* search page */
.search-container {
    width: fit-content;
    margin: auto;
}
.search {
    min-width: 300px;
    height: 23px;
}
.search-results-container {
    width: 90%;
    margin: auto;
}
.search-result-container {
    border-bottom: solid var(--highlight-color) 1px;
}
.search-result {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 10px;
}

/* plus button, https://codepen.io/LukeRFP/pen/XMbeRL */
.plus-button:before {
    color: var(--highlight-color);
    cursor: pointer;
    content: "+";
    font-size: 30px;
}
.minus-button:before {
    font-size: 30px;
    cursor: pointer;
    color: var(--highlight-color);
    content: "-";
}

.separated-row {
    display: flex;
    justify-content: space-between;
    margin: 0px 20px;
}

.popup {
    position: absolute;
    max-width: 400px;
    background-color: var(--secondary-background);
    padding: 5px;
    border: 1px solid var(--tertiary-background);
}

p#search-numbers {
    text-align: center;
}
#search-numbers-results {
  color: var(--highlight-color);
}


/* anchor link icon */
.copy-btn {
    display: inline-flex;
    align-items: center;
    background-color: transparent;
    border: none;
    color: blue;
    cursor: pointer;
    margin-left: 5px;
    /* font-size: 1em; */
}
.copy-btn i {
    margin-right: 5px; /* space between icon and text */
}
.copy-btn:hover {
    color: darkblue;
}
.feather-16 {
    width: 16px;
    height: 16px;
}


/* table of contents */
.toc {
    padding: 10px;
    background-color: var(--secondary-background);
    position: fixed;
    right: 10px;
    border-radius: 0.2em;
    z-index: 1; /* for it to be above .content */
    top: 130px;
    overflow-y: scroll;
    max-height: 80%;
    max-width: 60%;
    ul {
        padding-left: 15px;
        margin-top: 0px;
        margin-bottom: 0px;
        li {
            a {
                text-transform: none;
                display: inline-block;
                transform-origin: left;
                transition: transform 0.4s linear;
                &.active {
                    font-weight: bold;
                }
            }
        }
    }
}
.toc:hover .hides {
    display: block;
}
.hides {
    display: none;
}
.toc-title-container {
    text-align: center;
    vertical-align: center;
    display: inline-flex;
    align-items: center;
}
.toc-title {
    margin-left: 7px;
}

/* otherwise the embedded images are too small? */
table {
    width: 100%;
}
th {
  text-align: left;
}

.caption {
    display: block;
    text-align: center;
}