* {
    --tint-color: #FD5C48;
}

body {
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-family: Vollkorn, serif;
    /* here because I cannot overwrite it when it is in @font-face and I need that for -.- */
    -webkit-font-feature-settings: 'hist' 1; font-feature-settings: 'hist' 1;
    line-height: 1.5;
    width: 100%;
}

h1, h2, h3, h4, h5, h6 {
    font-family: SpaceGrotesk, sans-serif;
    margin-top: 0px;
    margin-bottom: 0.0pt;
}

@media (prefers-color-scheme: dark) {
    body {
        background-color: #24232b;
        color: #e8e6e3;
    }
}

a {
    color: var(--tint-color);
}

.badlink {
    color: #888;
}

/*a:visited {*/
/*    color: hsl(from var(--tint-color) h s calc(l - 20%));*/
/*}*/

a:hover {
    color: hsl(from var(--tint-color) h s calc(l + 15%));
}

a h1, a h2, a h3 {
/*    text-decoration: none;*/
    font-style: normal !important;
}

body a {
    font-style: italic;
    text-decoration: none;
}

body p a {
    text-decoration: underline;
}

code {
    font-family: "IBM Plex Mono", monospace;
    font-size: 88%;
}

header {
    position: sticky;
    top: 0;
    background-image: linear-gradient(110deg, #ff2c55ee, #fd6e42ee);
/*    background-image: linear-gradient(110deg, #fc530abb, #ff0a42bb);*/
    color: white;
    -webkit-backdrop-filter: blur(1rem)  brightness(150%) saturate(150%);
    backdrop-filter: blur(1rem)  brightness(150%) saturate(150%);
    width: 100vw;
    font-family: SpaceGrotesk, sans-serif;
    /* font feature ss01 is closed a */
    -webkit-font-feature-settings: 'ss01' 1;
    font-feature-settings: 'ss01' 1;
    font-size: 20pt;
    padding-left: 0.666ex;
    box-sizing: border-box;
    box-shadow: 0 -2ex 1ex 2ex #FD5C4888;
}

header > * {
    display: inline-block;
    vertical-align: middle;
    height: 2.5ex;
}

header > a, header > a:hover, header > a:visited {
    color: white;
    text-decoration: none;
    font-weight: bold;
    font-style: normal;
}

header > span {
    float: right;
    margin: 0.666ex;
    height: calc(min(2.5ex, 7.5vw));
}

header .icon {
    margin-left: 0.666ex;
    height: 100%;
}

main {
    width: min(775px, 100vw - max(4rem, 4vw));
/*    padding: 2rem;*/
    margin-top: 2ex;
}

main p:first-of-type {
    margin-top: 0pt;
}

.home-link {
    width: 100%;
    display: block;
}

.more-link {
    margin-left: 1em;
}

body > .home-link {
    width: calc(100% - 4em);
}

figure {
    width: 100%;
    margin: 0pt;
}

figure > img {
    --width: min(100vw - 4rem, calc(100% + min(10rem, 7.5%)));
    width: var(--width);
    margin-left: calc((100% - var(--width)) * 0.5);
    margin-right: calc((100% - var(--width)) * 0.5);
    border-radius: 1ex;
}

figcaption {
    opacity: 0.75;
    display: block;
    font-size: smaller;
}

.post-date {
    font-style: italic;
    opacity: 0.75;
}

h1 {
    font-size: 150%;
}

h2 {
    font-size: 100%;
}

abbr .real-caps {
    display: none;
}

abbr .small-caps {
    display: inline;
    font-variant: small-caps;
    letter-spacing: .02em;
}

body a abbr, em abbr {
    /* Vollkorn does not support italic small caps */
    font-style: oblique;
    font-weight: bold;
    font-size: 110%;
    letter-spacing: .07em;
}

.article-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

main {
    display: flex;
}

main > * {
/*    display: inline-block;*/
    height: 100%;
    width: 100%;
    flex: 1;
}

footer {
    margin-bottom: 2ex;
    margin-top: 2ex;
}

footer span {
    text-align: center;
    display: block;
    margin-top: 0ex;
    margin-bottom: 0ex;
}

hr {
    /*    opacity: 33.33%;*/
    border: none;
    text-align: center;
}

hr::after {
    content: '⋅⋅⋅ -.- ⋅⋅⋅';
    color: var(--tint-color);
    font-weight: lighter;
    font-size: 20pt;
    line-height: 0pt;
    -webkit-font-feature-settings: 'hist' 0; font-feature-settings: 'hist' 0;
    -webkit-font-feature-settings: 'dlig' 1; font-feature-settings: 'dlig' 1;
}

.obfuscator {
    display: none;
}

aside {
    max-width: 200px;
    flex-basis: 100%;
    padding-right: 2rem;
    text-align: center;
}

@media(max-width: 500px) {
    main {
        display: block;
    }
    main > * {
        display: block;
        width: 100%;
        max-width: 100%;
    }
}

.app-preview {
    display: flex;
}

.app-preview-flavor {
    max-width: 200px;
    flex-basis: 100%;
    padding-right: 2rem;
    text-align: center;
}

.app-preview > div{
    flex: 1;
}

@media(max-width: 500px) {
    .app-preview {
        display: block;
    }
    .app-preview > * {
        display: block;
        width: 100%;
        max-width: 100%;
    }
}

.appicon {
    border-radius: 20%;
    width: min(100%, 200px);
    /*box-shadow: 0px 0px 20px #ffffff22;*/
}

.appstore-badges img {
    height: 40px;
}

.asb-left2 {
    display: flex;
    flex-direction: column;
}

.asb-left {
    visibility: hidden;
    width: 100%;
    text-align: center;
    height: 0px;
}
.asb-right {
    visibility: visible;
    float: right;
    max-width: 66%;
    text-align: right;
}
.asb-right img {
    margin-left: 10px;
}
@media(max-width: 600px) {
    .asb-left {
        visibility: visible;
        height: auto;
    }
    .asb-right {
        visibility: hidden;
        height: 0px;
    }
}
.asb-bottom {
    text-align: center;
}
.asb-bottom img {
    margin-left: 5px;
    margin-right: 5px;
}

/* https://stackoverflow.com/a/8160532 */
.tex sub, .latex sub, .latex sup {
  text-transform: uppercase;
}
.tex sub, .latex sub {
  vertical-align: -0.5ex;
  margin-left: -0.1667em;
  margin-right: -0.125em;
}
.tex, .latex, .tex sub, .latex sub {
  font-size: 1em;
}
.latex sup {
  font-size: 0.85em;
  vertical-align: 0.15em;
  margin-left: -0.36em;
  margin-right: -0.15em;
}

.dlig {
    -webkit-font-feature-settings: 'hist' 0; font-feature-settings: 'hist' 0;
    -webkit-font-feature-settings: 'dlig' 1; font-feature-settings: 'dlig' 1;
}

.profilepic {
    width: 50%;
    border-radius: 20px;
    float: right;
    margin-bottom: 10px;
    margin-left: 10px;
}

@media(max-width: 450px) {
    .profilepic {
        width: 100%;
        margin-left: 0px;
    }
}

/*---------------------*/

pre {
/*    border: 1px solid gray;*/
    border-radius: 1em;
    padding: 1em;
    overflow-x: scroll;
}

code .c { font-style: italic } /* Comment */
code .ch { font-style: italic } /* Comment.Hashbang */
code .cm { font-style: italic } /* Comment.Multiline */
code .cp { font-style: italic } /* Comment.Preproc */
code .cpf { font-style: italic } /* Comment.PreprocFile */
code .c1 { font-style: italic } /* Comment.Single */
code .cs { font-style: italic } /* Comment.Special */

/*---------------------*/

/* pygments xcode light colors, modified by me */

pre {
    box-shadow: 0em 0em 1em #ccc;
    background: #ffffff;
}

code .c { color: #5D6C79 } /* Comment */
code .err { color: #000000 } /* Error */
code .k { color: #A90D91 } /* Keyword */
code .l { color: #A167E6 } /* Literal */
code .n { color: #000000 } /* Name */
code .o { color: #000000 } /* Operator */
code .ch { color: #5D6C79 } /* Comment.Hashbang */
code .cm { color: #5D6C79 } /* Comment.Multiline */
code .cp { color: #5D6C79 } /* Comment.Preproc */
code .cpf { color: #5D6C79 } /* Comment.PreprocFile */
code .c1 { color: #5D6C79 } /* Comment.Single */
code .cs { color: #5D6C79 } /* Comment.Special */
code .kc { color: #FC5FA3 } /* Keyword.Constant */
code .kd { color: #A90D91 } /* Keyword.Declaration */
code .kn { color: #A90D91 } /* Keyword.Namespace */
code .kp { color: #A90D91 } /* Keyword.Pseudo */
code .kr { color: #A90D91 } /* Keyword.Reserved */
code .kt { color: #A90D91 } /* Keyword.Type */
code .ld { color: #A167E6 } /* Literal.Date */
code .m { color: #A167E6 } /* Literal.Number */
code .s { color: #C41A16 } /* Literal.String */
code .na { color: #836C28 } /* Name.Attribute */
code .nb { color: #A90D91 } /* Name.Builtin */
code .nc { color: #3F6E75 } /* Name.Class */
code .no { color: #000000 } /* Name.Constant */
code .nd { color: #000000 } /* Name.Decorator */
code .ni { color: #000000 } /* Name.Entity */
code .ne { color: #000000 } /* Name.Exception */
code .nf { color: #326D74 } /* Name.Function */
code .nl { color: #000000 } /* Name.Label */
code .nn { color: #000000 } /* Name.Namespace */
code .nx { color: #000000 } /* Name.Other */
code .py { color: #000000 } /* Name.Property */
code .nt { color: #000000 } /* Name.Tag */
code .nv { color: #000000 } /* Name.Variable */
code .ow { color: #000000 } /* Operator.Word */
code .mb { color: #A167E6 } /* Literal.Number.Bin */
code .mf { color: #A167E6 } /* Literal.Number.Float */
code .mh { color: #1C01CE } /* Literal.Number.Hex */
code .mi { color: #1C01CE } /* Literal.Number.Integer */
code .mo { color: #1C01CE } /* Literal.Number.Oct */
code .sa { color: #C41A16 } /* Literal.String.Affix */
code .sb { color: #C41A16 } /* Literal.String.Backtick */
code .sc { color: #2300CE } /* Literal.String.Char */
code .dl { color: #C41A16 } /* Literal.String.Delimiter */
code .sd { color: #C41A16 } /* Literal.String.Doc */
code .s2 { color: #C41A16 } /* Literal.String.Double */
code .se { color: #C41A16 } /* Literal.String.Escape */
code .sh { color: #C41A16 } /* Literal.String.Heredoc */
code .si { color: #C41A16 } /* Literal.String.Interpol */
code .sx { color: #C41A16 } /* Literal.String.Other */
code .sr { color: #C41A16 } /* Literal.String.Regex */
code .s1 { color: #C41A16 } /* Literal.String.Single */
code .ss { color: #C41A16 } /* Literal.String.Symbol */
code .bp { color: #5B269A } /* Name.Builtin.Pseudo */
code .fm { color: #6C36A9 } /* Name.Function.Magic */
code .vc { color: #000000 } /* Name.Variable.Class */
code .vg { color: #000000 } /* Name.Variable.Global */
code .vi { color: #000000 } /* Name.Variable.Instance */
code .vm { color: #6C36A9 } /* Name.Variable.Magic */
code .il { color: #1C01CE } /* Literal.Number.Integer.Long */

/* custom xcode dark colors, picked and mapped from xcode app manually */

@media (prefers-color-scheme: dark) {
    pre {
        box-shadow: 0em 0em 1em #111;
        background: #1F1F24;
    }
    code .c { color: #6C7986 } /* Comment */
    code .err { color: #FC5FA3 } /* Error */
    code .k { color: #FC5FA3 } /* Keyword */
    code .l { color: #FC6A5D } /* Literal */
    code .n { color: #ffffff } /* Name */
    code .o { color: #ffffff } /* Operator */
    code .ch { color: #6C7986 } /* Comment.Hashbang */
    code .cm { color: #6C7986 } /* Comment.Multiline */
    code .cp { color: #FD8F3F } /* Comment.Preproc */
    code .cpf { color: #FD8F3F } /* Comment.PreprocFile */
    code .c1 { color: #6C7986 } /* Comment.Single */
    code .cs { color: #6C7986 } /* Comment.Special */
    code .kc { color: #FC5FA3 } /* Keyword.Constant */
    code .kd { color: #FC5FA3 } /* Keyword.Declaration */
    code .kn { color: #FC5FA3 } /* Keyword.Namespace */
    code .kp { color: #FC5FA3 } /* Keyword.Pseudo */
    code .kr { color: #FC5FA3 } /* Keyword.Reserved */
    code .kt { color: #5DD8FF } /* Keyword.Type */
    code .ld { color: #1C01CE } /* Literal.Date */
    code .m { color: #D0BF69 } /* Literal.Number */
    code .s { color: #FC6A5D } /* Literal.String */
    code .na { color: #A167E6 } /* Name.Attribute */
    code .nb { color: #A167E6 } /* Name.Builtin */
    code .nc { color: #A167E6 } /* Name.Class */
    code .no { color: #ffffff } /* Name.Constant */
    code .nd { color: #ffffff } /* Name.Decorator */
    code .ni { color: #ffffff } /* Name.Entity */
    code .ne { color: #ffffff } /* Name.Exception */
    code .nf { color: #67B7A4 } /* Name.Function */
    code .nl { color: #ffffff } /* Name.Label */
    code .nn { color: #ffffff } /* Name.Namespace */
    code .nx { color: #ffffff } /* Name.Other */
    code .py { color: #ffffff } /* Name.Property */
    code .nt { color: #ffffff } /* Name.Tag */
    code .nv { color: #ffffff } /* Name.Variable */
    code .ow { color: #ffffff } /* Operator.Word */
    code .mb { color: #D0BF69 } /* Literal.Number.Bin */
    code .mf { color: #D0BF69 } /* Literal.Number.Float */
    code .mh { color: #D0BF69 } /* Literal.Number.Hex */
    code .mi { color: #D0BF69 } /* Literal.Number.Integer */
    code .mo { color: #D0BF69 } /* Literal.Number.Oct */
    code .sa { color: #FC6A5D } /* Literal.String.Affix */
    code .sb { color: #FC6A5D } /* Literal.String.Backtick */
    code .sc { color: #A167E6 } /* Literal.String.Char */
    code .dl { color: #FC6A5D } /* Literal.String.Delimiter */
    code .sd { color: #FC6A5D } /* Literal.String.Doc */
    code .s2 { color: #FC6A5D } /* Literal.String.Double */
    code .se { color: #FC6A5D } /* Literal.String.Escape */
    code .sh { color: #FC6A5D } /* Literal.String.Heredoc */
    code .si { color: #FC6A5D } /* Literal.String.Interpol */
    code .sx { color: #FC6A5D } /* Literal.String.Other */
    code .sr { color: #FC6A5D } /* Literal.String.Regex */
    code .s1 { color: #FC6A5D } /* Literal.String.Single */
    code .ss { color: #FC6A5D } /* Literal.String.Symbol */
    code .bp { color: #A167E6 } /* Name.Builtin.Pseudo */
    code .fm { color: #67B7A4 } /* Name.Function.Magic */
    code .vc { color: #ffffff } /* Name.Variable.Class */
    code .vg { color: #ffffff } /* Name.Variable.Global */
    code .vi { color: #ffffff } /* Name.Variable.Instance */
    code .vm { color: #67B7A4 } /* Name.Variable.Magic */
    code .il { color: #A167E6 } /* Literal.Number.Integer.Long */
}

/*---------------------*/

@font-face {
    font-family: "SpaceGrotesk";
    src: url("/fonts/sg/SpaceGrotesk-Bold.woff2")format("woff2");
    font-weight: bold;
    font-style: normal;
}

@font-face {
    font-family: "SpaceGrotesk";
    src: url("/fonts/sg/SpaceGrotesk-Medium.woff2")format("woff2");
    font-weight: normal;
    font-style: normal;
}

/*---------------------*/

@font-face {
    font-family: "Vollkorn";
    src: url("/fonts/vk/Vollkorn-Bold.woff2")format("woff2");
    font-weight: bold;
    font-style: normal;
}

@font-face {
    font-family: "Vollkorn";
    src: url("/fonts/vk/Vollkorn-Medium.woff2")format("woff2");
    font-weight: normal;
    font-style: normal;
}

/*@font-face {
    font-family: "Vollkorn";
    src: url("/fonts/vk/Vollkorn-Regular.woff2")format("woff2");
    font-weight: lighter;
    font-style: normal;
}*/

@font-face {
    font-family: "Vollkorn";
    src: url("/fonts/vk/Vollkorn-BoldItalic.woff2")format("woff2");
    font-weight: bold;
    font-style: italic;
}

@font-face {
    font-family: "Vollkorn";
    src: url("/fonts/vk/Vollkorn-MediumItalic.woff2")format("woff2");
    font-weight: normal;
    font-style: italic;
}

/*@font-face {
    font-family: "Vollkorn";
    src: url("/fonts/vk/Vollkorn-RegularItalic.woff2")format("woff2");
    font-weight: lighter;
    font-style: italic;
}*/

/*---------------------*/

@font-face {
    font-family: "IBM Plex Mono";
    src: url("/fonts/pm/IBMPlexMono-Medium.woff2")format("woff2");
    font-weight: normal;
    font-style: normal;
}
