:root {
    --bg_0: #fef3da;
    --bg_1: #f0e4cc;
    --bg_2: #d6cbb4;
    --dim_0: #8f9894;
    --fg_0: #52666d;
    --fg_1: #384c52;
    --unused_0: #0e4956;
    --unused_1: #053d48;
    --red: #d4212b;
    --orange: #c75d20;
    --magenta: #cb4c99;
    --green: #539100;
    --cyan: #009c8f;
    --blue: #0073d2;
    --yellow: #b38800;
    --violet: #7d64c5;
    --sm-text: 0.6rem;
    --md-text: 0.8rem;
    --lg-text: 1rem;
}

* {
    box-sizing: border-box;
}

html {
    overflow-y: scroll;
}

html,
body {
    margin: 0;
    padding: 0;
}

html,
body {
    height: 100vh;
    width: 100%;
    font-family: sans-serif;
    background-color: var(--bg_0);
    color: var(--fg_1);
}

h1,
h2,
h3,
h4 {
    margin: 1rem 0 0.2rem;
}

main h2 {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

h1 + p,
h2 + p,
h3 + p,
h4 + p {
    margin: 0;
}

p {
    margin: 1rem 0 0;
    line-height: 1.5rem;
}

.blog-list,
#search-list,
#about-list {
    list-style-type: none;
    margin-block-start: 0;
    margin-block-end: 0;
    padding-inline-start: 0;
}

a {
    color: var(--blue);
    text-decoration: none;
    font-weight: 600;
}

a:hover {
    color: var(--cyan);
    text-decoration: underline;
}

a:active,
a:visited {
    color: var(--magenta);
}

.til-list-item > article > p:first-of-type,
.search-list-item > p:first-of-type {
    margin-block-start: 0;
}

.til-list-item-header,
.search-list-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.published {
    display: inline-block;
    margin-top: 0.2rem;
}

.search-list-item-category,
.til-date,
.published {
    font-style: italic;
    background-color: var(--bg_1);
    padding: 0.4rem;
    border-radius: 0.2rem;
}

.search-list-item-category > a {
    text-decoration: none;
    color: var(--fg_1);
}

.blog-list-item a:active {
    color: var(--fg_1);
}

.blog-list-item p {
    margin: 0;
}

#about-list {
    padding-inline-start: 0;
}

#content-wrapper {
    width: 66ch;
    flex-grow: 1;
    padding: 1em;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.image-wrapper {
    aspect-ratio: 1 / 1;
    width: calc(66ch - 2em);
    margin-top: 1rem;
    background-color: var(--bg_1);
    overflow: hidden;
}

.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

strong:not(p > strong) {
    display: inline-block;
    margin-top: 0.5rem;
}

@keyframes fade {
    0% {
        opacity: 0;
    }
    75% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

.fade-animation {
    animation: 0.5s fade;
}

sup {
    display: inline;
    font-size: 1em;
    line-height: inherit;
    vertical-align: baseline;
    color: var(--fg_1);
    text-decoration: none;
}

.footnote-ref::before {
    content: "[";
}

.footnote-ref::after {
    content: "]";
}

main {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

footer {
    margin: 4em 0 0;
    font-style: italic;
    font-size: var(--md-text);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.icon {
    height: 16px;
    width: 16px;
    fill: var(--blue);
}

.icon-ctr {
    display: flex;
    align-items: flex-end;
}

.search-term {
    font-style: italic;
    font-weight: bold;
    color: var(--yellow);
}

header {
    display: flex;
    flex-wrap: wrap-reverse;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
}

nav {
    flex: 1;
    padding: 1em 0 1em;
}

nav > ul {
    list-style-type: none;
    padding-inline-start: 0;
    margin-block-start: 0;
    margin-block-end: 0;
    display: flex;
}

nav > ul > li {
    margin-right: 1em;
}

#search-form > button {
    align-items: center;
    background-color: var(--bg_1);
    border: 2px solid var(--dim_0);
    border-radius: 0.2em;
    color: var(--fg_1);
    display: flex;
    font-size: var(--lg-text);
    font-weight: bold;
    height: 2.5em;
    justify-content: center;
    padding: 0.5em 1em;
}

#search-form > button:hover,
button:active {
    background-color: var(--bg_2);
}

#search-form {
    display: flex;
    width: 300px;
    padding: 1em 0 1em;
}

#search-form > input {
    font-size: var(--lg-text);
    background-color: var(--bg_1);
    border: 2px solid var(--dim_0);
    border-radius: 0.2em;
    color: var(--fg_1);
    font-weight: bold;
    height: 2.5em;
    margin-right: 0.5em;
    padding: 0.5em;
    width: 100%;
}

input:-webkit-autofill {
    background-color: var(--bg_1) !important;
    color: var(--fg_1) !important;
    box-shadow: 0 0 0px 1000px var(--bg_1) inset;
    transition: background-color 5000s ease-in-out 0s;
}

#search-form > input:placeholder {
    color: var(--dim_0);
}

.material-symbols-outlined {
    font-variation-settings:
        "FILL" 0,
        "wght" 400,
        "GRAD" 0,
        "opsz" 24;
}

#footer-details {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    width: 100%;
}

blockquote {
    border-left: solid var(--dim_0) 4px;
    background-color: var(--bg_1);
    margin: 1rem 0 0 1rem;
    padding: 1rem;
}

blockquote > p {
    margin: 0;
}

pre {
    background-color: var(--bg_1);
    overflow-x: auto;
    border: solid var(--dim_0) 2px;
    padding: 1em 0.4em 1em 0.4em;
}

code {
    font-size: var(--md-text);
}

code:not(pre code) {
    background: var(--bg_1);
    font-size: var(--md-text);
    padding: 0 0.5rem;
    border-radius: 0.2rem;
    white-space: nowrap;
}

::-webkit-scrollbar {
    height: 12px;
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--bg_1);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb {
    background: var(--blue);
    border-radius: 6px;
    border: 2px solid var(--bg_1);
}

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

* {
    scrollbar-width: thin;
    scrollbar-color: var(--dim_0) var(--bg_1);
}

.anchor {
    color: var(--bg_2);
    transition-duration: 2ms;
    text-decoration: none;
}

.anchor:hover {
    color: var(--fg_0);
}

#feed {
    display: flex;
    align-items: flex-end;
}

#feed img {
    height: 14px;
    width: 14px;
    margin-right: 0.25rem;
}

#to-top {
    display: block;
    width: 100%;
    text-align: right;
}

@media (max-width: 650px) {
    #search-form {
        padding: 1em 0 0;
        width: 100%;
    }

    #content-wrapper {
        width: 100%;
    }

    .image-wrapper {
        width: 100%;
    }

    main {
        overflow-y: auto;
    }

    #footer-details {
        justify-content: space-around;
    }
}
