@import url("https://fonts.googleapis.com/css2?family=Exo+2:ital,wght@0,100..900;1,100..900&family=Shantell+Sans:ital,wght,INFM@1,300..800,18&family=Stalinist+One&display=swap");

:root {
    --background: #32302f;
    --soft-background: #504945;
    --foreground: #ddc7a1;
    --red: #ea6962;
    --soft-red: #f6a3a4;
    --green: #89b482;
    --soft-blue: #8ec5ff;
    --blue: #279afe;
}

.theme-light {
    --background: #f8f8f8;
    --soft-background: #ffffff;
    --foreground: #333333;
    --red: #d32f2f;
    --soft-red: #ff6666;
    --green: #388e3c;
    --soft-blue: #42a5f5;
    --blue: #1976d2;
}

.theme-catppuccin-mocha {
    --background: #1e1e2e;
    --soft-background: #45475a;
    --foreground: #cdd6f4;
    --red: #f38ba8;
    --soft-red: #eba0ac;
    --green: #f9e2af;
    --soft-blue: #74c7ec;
    --blue: #89b4fa;
}

.theme-tokyonight {
    --background: #1a1b26;
    --soft-background: #283457;
    --foreground: #c0caf5;
    --red: #f7768e;
    --soft-red: #ff899d;
    --green: #9ece6a;
    --soft-blue: #7dcfff;
    --blue: #7aa2f7;
}

* {
    background-color: var(--background);
    box-sizing: border-box;
}

body {
    font-family: "Exo 2", serif;
    font-weight: 500;
    margin: 0;
    padding: 0 20px;
    background-color: var(--background);
    color: var(--foreground);
    text-align: center;
}

nav {
    padding: 1rem;
}

main {
    padding: 0 0 2rem;
}

/* Typography classes */
.homepage-title {
    font-size: 3em;
    font-weight: 400;
    text-shadow: 2px 2px var(--red);
}

.homepage-subtitle {
    font-size: 2em;
    font-style: italic;
    font-weight: 400;
    margin-bottom: 1em;
}

.intro {
    max-width: 80ch;
    overflow-wrap: break-word;
    margin: 0 auto 3em auto;
    text-align: center;
}

/* Link styles */
a {
    color: var(--foreground);
    text-decoration: none;
    border-bottom: 1px dashed var(--foreground);
    transition: all 0.2s ease-in-out;
}

a:hover {
    color: var(--red);
    border-bottom: 1px solid var(--red);
}

/* Lists */
ul {
    list-style: none;
    padding: 0;
    margin: 0 auto;
}

li {
    margin: 15px 0;
}

/* Ordered Lists */
ol {
    list-style: decimal;
    padding-left: 1.5em;
    margin: 1em auto;
    max-width: 80ch;
    text-align: left;
}

ol li {
    margin: 0.5em 0;
    padding-left: 0.3em;
}

/* If you want custom counter styling instead of browser default */
ol.custom-counter {
    list-style: none;
    counter-reset: list-counter;
    padding-left: 0;
}

ol.custom-counter li {
    counter-increment: list-counter;
    margin: 0.5em 0;
    padding-left: 1.5em;
    position: relative;
}

ol.custom-counter li::before {
    content: counter(list-counter) ".";
    position: absolute;
    left: 0;
    color: var(--blue);
    font-weight: bold;
}

/* Font utils */
.stalinist-one-regular {
    font-family: "Stalinist One", serif;
    font-weight: 400;
    font-style: normal;
}

.shantell-sans-normal {
    font-family: "Shantell Sans", sans-serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: italic;
    font-variation-settings:
        "BNCE" 0,
        "INFM" 18,
        "SPAC" 0;
}

/* Footer padding */
.contact {
    padding-top: 2em;
}

/* Site-wide footer */
.site-footer {
    padding: 2em 1em;
    font-size: 0.9em;
    color: var(--foreground);
    text-align: center;
    margin-top: 4em;
}

.site-footer a {
    color: var(--green);
    border-bottom: 1px dotted var(--green);
}

.site-footer a:hover {
    border-bottom: 1px solid var(--red);
}

/* post page */
.post-title {
    font-family: "IBM Plex Mono", monospace;
    font-weight: 700;
    font-style: normal;
    font-size: 1.4rem;
    color: var(--green);
    margin: 0;
}

.post-body {
    max-width: 80ch;
    margin-left: auto;
    margin-right: auto;
}

.post-body img {
    display: block;
    max-width: 100%;
    max-height: 60ch;
    height: auto;
    margin: 1.5em auto;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.post-body img:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
}

.post-body p {
    font-family: "IBM Plex Mono", sans-serif;
    font-weight: 400;
    font-style: normal;
    text-align: center;
    margin-top: 0;
}

.post-body li {
    font-family: "IBM Plex Mono", sans-serif;
    font-weight: 400;
    font-style: normal;
    margin-top: 0;
}

.post-body code span {
    background: none;
}

.post-body code {
    font-family: "Google Sans Code", monospace;
    /* font-style: italic; */
}

.post-body code:not(pre code) {
    background-color: var(--soft-background);
}

.post-body pre {
    text-align: left;
}

.post-body h1 {
    margin: 0;
    padding: 0;
    text-align: left;
    color: var(--soft-red);
    font-family: "Shantell Sans", sans-serif;
    font-size: 1.2rem;
}

.post-body h2 {
    margin: 0;
    padding: 0;
    text-align: left;
    color: var(--red);
    font-family: "Shantell Sans", sans-serif;
    font-size: 1rem;
}

.post-body ul li::before {
    content: "• ";
}

.post-toc h3 {
    color: var(--blue);
    font-family: "Shantell Sans", sans-serif;
    margin: 0;
    padding-top: 1rem;
}

.post-toc {
    list-style: none;
    margin: 2em auto;
    padding: 1em;
    max-width: 40ch;
    text-align: left;
}

.post-toc a {
    color: var(--soft-blue);
    margin: 0;
    padding: 0;
    border: none;
}

.post-toc a:hover {
    color: var(--blue);
}

.post-toc>li {
    font-weight: bold;
    margin-bottom: 0.5em;
}

.post-toc ul {
    list-style: none;
    margin: 0.25em 0 0 1em;
    padding: 0;
    border-left: 2px solid var(--soft-background);
}

.post-toc ul li {
    font-weight: normal;
    margin: 0.25em 0;
    padding-left: 0.5em;
}

.post-toc ul li::before {
    content: "• ";
    color: #666;
}

.ttr {
    font-size: 1rem;
    color: var(--soft-blue);
}

.header-wrapper {
    position: relative;
    display: inline-block;
}

.rss-wrapper {
    position: absolute;
    left: 110%;
    top: 0;
    white-space: nowrap;
}

/* index page buttons */
.buttons {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
    gap: 2px;
    justify-content: center;
    max-width: 640px;
    margin-top: 1rem;
    margin-left: auto;
    margin-right: auto;
}

.buttons img {
    image-rendering: pixelated;
    border: 1px solid #333;
}

.buttons a:hover img {
    filter: brightness(1.2);
    border: none;
}

.buttons a {
    border: none;
}

.nav-container {
    margin-bottom: 0.2rem;
    text-align: left;
    display: flex;
    align-items: center;
}

.nav-container>div:last-child {
    margin-left: auto;
}

.nav-button {
    color: var(--green);
    margin-right: 0.3rem;
    text-decoration: none;
    border: none;
}
