@charset "utf-8";


/* Fonts */

@font-face {
    font-family: "Aporetic Serif Mono";
    font-display: swap;
    font-weight:  700;
    font-stretch: normal;
    font-style:   normal;
    src: url('/fonts/aporetic-serif-mono-normalbolditalic.woff2') format('woff2');
}

@font-face {
    font-family: "Aporetic Serif Mono";
    font-display: swap;
    font-weight:  700;
    font-stretch: normal;
    font-style:   normal;
    src: url('/fonts/aporetic-serif-mono-normalboldupright.woff2') format('woff2');
}

@font-face {
    font-family: "Aporetic Serif Mono";
    font-display: swap;
    font-weight:  400;
    font-stretch: normal;
    font-style:   normal;
    src: url('/fonts/aporetic-serif-mono-normalregularitalic.woff2') format('woff2');
}

@font-face {
    font-family: "Aporetic Serif Mono";
    font-display: swap;
    font-weight:  400;
    font-stretch: normal;
    font-style:   normal;
    src: url('/fonts/aporetic-serif-mono-normalregularupright.woff2') format('woff2');
}

@font-face {
    font-family: "Aporetic Serif";
     font-display: swap;
    font-weight:  700;
    font-stretch: normal;
    font-style:   normal;
   src: url('/fonts/aporetic-serif-normalbolditalic.woff2') format('woff2');
}

@font-face {
    font-family: "Aporetic Serif";
    font-display: swap;
    font-weight:  700;
    font-stretch: normal;
    font-style:   normal;
    src: url('/fonts/aporetic-serif-normalboldupright.woff2') format('woff2');
}

@font-face {
    font-family: "Aporetic Serif";
    font-display: swap;
    font-weight:  400;
    font-stretch: normal;
    font-style:   normal;
    src: url('/fonts/aporetic-serif-normalregularitalic.woff2') format('woff2');
}

@font-face {
    font-family: "Aporetic Serif";
    font-display: swap;
    font-weight:  400;
    font-stretch: normal;
    font-style:   normal;
    src: url('/fonts/aporetic-serif-normalregularupright.woff2') format('woff2');
}


/* Variables */

:root {
    --font-serif-regular: "Aporetic Serif", serif;
    --font-serif-mono:    "Aporetic Serif Mono", monospace;
    --font-sans-regular:  "Aporetic Sans", sans-serif;
    --font-sans-mono:     "Aporetic Sans Mono", monospace;

    --default-fg: black;
    --default-bg: white;
    --default-family: var(--font-sans-regular);
    --default-size: 14pt;

    --header-family: var(--font-serif-regular);

    --link-fg: #3548cf;

    --body-margin: 0px;

    --divider-color: #9f9f9f; /* window-divider */

    --content-border: 2px solid var(--divider-color);
    --content-padding: 10px;

    --nav-height: 125px;
    --toc-nav-vspacing: 20px;
    --toc-base-padding: 5px;
    --toc-ul-padding-left: 20px;
    --toc-local-padding: 5px;
    --toc-extra-padding-x: 4px;

    --tbl-border-color: #193668; /* org-table */
    --tbl-border-size: 1px;

    --code-fg: #005f5f;
    --code-family: var(--font-serif-mono);
    --code-size:   var(--default-size);

    --example-family: var(--default-serif-mono);
    --example-size:   var(--default-size);

    --src-bg: #fbf9e7;
    --src-border-color: #7f7f7f;
    --src-border: 1px solid var(--src-border-color);
    --src-family: var(--default-serif-mono);

    --src-label-fg: var(--src-border-color);

    --src-builtin-fg: #8f0075;
    --src-builtin-weight: bold;

    --src-keyword-fg: #531ab6;
    --src-keyword-weight: bold;

    --src-variable-name-fg: #005e8b;

    --src-string-fg: #3548cf;

    --src-constant-fg: #0000b0;

    --src-function-name-fg: #721045;

    --src-comment-fg: #595959;
    --src-comment-style: italic;

    --src-comment-delimiter-fg: var(--src-comment-fg);
    --src-comment-delimiter-style: italic;

    --src-regexp-grouping-backslash-fg: var(--src-function-name-fg);
    --src-regexp-grouping-backslash-weight: bold;

    --src-regexp-grouping-construct-fg: #00663f;
    --src-regexp-grouping-construct-weight: bold;

    --src-doc-fg: #2a5045;
    --src-doc-style: italic;

    --src-type-fg: #005f5f;
    --src-type-weight: bold;
}


/* Dark overrides */

@media (prefers-color-scheme: dark) {
    :root {
	color-scheme: dark;

	--scrollbar-track-color:       #303030;
	--scrollbar-thumb-color:       #808080;
	--scrollbar-thumb-hover-color: #505050;
	--scrollbar-corner-color:      #404040;

	--default-fg: white;
	--default-bg: black;

	--link-fg: #79a8ff;

	--divider-color: #646464;
    }
}


/* Immutable */

* {
    color:            var(--default-fg);
    background-color: var(--default-bg);
    font-family:      var(--default-family);
    font-size:        var(--default-size);
}

a {
    color: var(--link-fg);
}

hr,
input {
    border: 1px solid var(--divider-color);
}
