:root {
    /* Catppuccin Mocha (Dark) */
    --base: #1e1e2e;
    --mantle: #181825;
    --crust: #11111b;
    --text: #cdd6f4;
    --subtext0: #a6adc8;
    --subtext1: #bac2de;
    --surface0: #313244;
    --surface1: #45475a;
    --surface2: #585b70;
    --overlay0: #6c7086;
    --blue: #1e66f5;
    --lavender: #b4befe;
    --pink: #ea76cb;
    --sky: #89dceb;
    --mauve: #cba6f7;
    --transition-speed: 0.3s;
}

@media (prefers-color-scheme: light) {
    :root {
        /* Catppuccin Latte (Light) */
        --base: #EFF1F5;
        --mantle: #e6e9ef;
        --crust: #dce0e8;
        --text: #4c4f69;
        --subtext0: #6c6f85;
        --subtext1: #5c5f77;
        --surface0: #ccd0da;
        --surface1: #bcc0cc;
        --surface2: #acb0be;
        --overlay0: #9ca0b0;
        --blue: #1e66f5;
        --lavender: #7287fd;
        --pink: #f5c2e7;
        --sky: #04a5e5;
        --mauve: #8839ef;
    }
}

/* ========================================
   BASE STYLES
   ======================================== */

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
}

body {
    background-color: var(--base);
    color: var(--text);
    font-family: "Newsreader", serif;
    font-size: 20px;
    font-weight: 400;
    transition: background-color var(--transition-speed) ease,
        color var(--transition-speed) ease;
}

/* ========================================
   TYPOGRAPHY
   ======================================== */

h1 {
    margin-bottom: 1em;
    padding: 0;
    font-family: "Noto Serif", serif;
    font-size: 50px;
    font-weight: 200;
    color: var(--text);
}

h2 {
    margin-top: 1.5em;
    margin-bottom: 0.75em;
    padding: 0;
    font-family: "Noto Serif", serif;
    font-size: 36px;
    font-weight: 300;
    color: var(--text);
}

h3 {
    margin-top: 1.25em;
    margin-bottom: 0.5em;
    padding: 0;
    font-family: "Noto Serif", serif;
    font-size: 28px;
    font-weight: 300;
    color: var(--text);
}

h4 {
    margin-top: 1em;
    margin-bottom: 0.5em;
    padding: 0;
    font-family: "Noto Serif", serif;
    font-size: 24px;
    font-weight: 400;
    color: var(--text);
}

h5 {
    margin-top: 1em;
    margin-bottom: 0.5em;
    padding: 0;
    font-family: "Noto Serif", serif;
    font-size: 20px;
    font-weight: 400;
    color: var(--subtext0);
}

h6 {
    margin-top: 1em;
    margin-bottom: 0.5em;
    padding: 0;
    font-family: "Noto Serif", serif;
    font-size: 18px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--subtext0);
}

li {
    margin-bottom: 0.5em;
    font-weight: 300;
}

code {
    font-family: "Source Code Pro", monospace;
    font-size: 0.85em;
    background-color: var(--text);
    color: var(--crust);
    padding: 1px 3px;
    border-radius: 3px;
}

/* ========================================
   BLOCKQUOTES
   ======================================== */

blockquote {
    margin: 5px 0;
    margin-left: 20px;
    padding: 10px 20px;
    border-left: 5px solid var(--surface1);
}

blockquote p {
    margin: 0;
}

@media (max-width: 600px) {
    blockquote {
        margin-left: 10px;
        padding: 10px 15px;
    }
}

/* ========================================
   LAYOUT
   ======================================== */

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
}

.intro h1 {
    margin-bottom: 0;
}

.intro h4 {
    margin-top: 0;
}

.header h3 {
    font-family: "Zalando Sans SemiExpanded", sans-serif;
}

/* ========================================
   LINKS
   ======================================== */

a:link {
    color: var(--lavender);
    text-decoration-color: var(--surface1);
    transition: color 0.2s, text-decoration-color 0.2s !important;
}

a:visited {
    color: var(--mauve);
    text-decoration-color: var(--surface1);
}

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

a:visited:hover {
    color: var(--mauve) !important;
    text-decoration-color: var(--mauve) !important;
}

#siteName a:link,
#siteName a:visited {
    color: var(--text);
}

/* ========================================
   POST STYLES
   ======================================== */

.post-list {
    margin-top: 2em;
}

.post-item {
    margin-bottom: 2em;
    padding-bottom: 2em;
    border-bottom: 1px solid var(--surface1);
}

.post-item:last-child {
    border-bottom: none;
}

.post-title {
    font-family: "Noto Serif", serif;
    font-size: 28px;
    font-weight: 200;
    margin-bottom: 0.5em;
    color: var(--text);
}

.post-title a {
    color: var(--text);
    text-decoration: underline;
    text-decoration-color: var(--surface1);
    text-underline-offset: 3px;
    transition: color 0.2s, text-decoration-color 0.2s;
}

.post-title a:visited {
    color: var(--text);
    text-decoration-color: var(--surface1);
}

.post-title a:active {
    text-decoration-color: var(--text);
}

.post-title a:hover {
    color: var(--text) !important;
    text-decoration-color: var(--text) !important;
}

.post-excerpt {
    font-size: 18px;
    line-height: 1.6;
    color: var(--text);
    margin: 0;
}

.info {
    font-size: 16px;
    color: var(--text);
    margin-top: 0.5em;
    font-family: "Noto Serif", serif;
}

/* ========================================
   FOOTER
   ======================================== */

.footer {
    background-color: var(--crust);
    color: var(--text);
    text-align: center;
    padding: 20px 10px;
    margin-top: 40px;
    font-family: "Zalando Sans SemiExpanded", sans-serif;
    font-size: 19px;
    font-weight: 300;
    border-top: 1px solid var(--surface0);
}

.footer p {
    margin: 0 0 10px;
}

.footer a {
    color: var(--lavender);
    text-decoration: underline;
    text-decoration-color: var(--overlay0);
    text-underline-offset: 2px;
    transition: color 0.2s, text-decoration-color 0.2s;
}

.footer a:visited {
    color: var(--mauve);
    text-decoration-color: var(--overlay0);
}

.footer a:hover {
    color: var(--lavender);
    text-decoration-color: var(--lavender);
}

/* ========================================
   SCROLL INDICATOR
   ======================================== */

.scroll-indicator {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    background: var(--crust);
    color: var(--text);
    font-family: "Zalando Sans SemiExpanded", sans-serif;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 1rem;
    pointer-events: none;
}

.scroll-indicator.at-top {
    opacity: 0.5;
}

.scroll-indicator.at-bottom {
    opacity: 0;
}

@media (max-width: 600px) {
    .scroll-indicator {
        bottom: 15px;
        right: 12px;
        padding: 11px 11px;
        font-size: 14px;
        min-width: 40px;
    }
}

/* ========================================
   UTILITY / MISC
   ======================================== */

.pull-quote {
    font-family: "Bitter", serif;
    font-size: 50px;
    text-align: center;
}

.badges a {
    text-decoration: none;
}