/* thp.io "spring" theme, Copyright (c) 2023 Thomas Perl. All right reserved. */

@font-face {
  font-family: 'Source Sans Pro';
  font-style: normal;
  font-weight: 400;
  src: url(https://thp.io/2015/archive/webfonts/SourceSansPro.ttf) format('truetype');
}

@font-face {
  font-family: 'Questrial';
  font-style: normal;
  font-weight: 400;
  src: url(https://thp.io/2021/archive/questrial.ttf) format('truetype');
}

@font-face {
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 400;
  src: url(https://thp.io/2021/archive/opensans.ttf) format('truetype');
}

@font-face {
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 800;
  src: url(https://thp.io/2021/archive/opensans-bold.ttf) format('truetype');
}

@font-face {
  font-family: 'Open Sans';
  font-style: italic;
  font-weight: 400;
  src: url(https://thp.io/2021/archive/opensans-italic.ttf) format('truetype');
}

@font-face {
  font-family: 'Source Code Pro';
  font-style: normal;
  font-weight: 400;
  src: url(https://thp.io/2021/archive/sourcecodepro-regular.ttf) format('truetype');
}

@font-face {
  font-family: 'Source Code Pro';
  font-style: normal;
  font-weight: 800;
  src: url(https://thp.io/2021/archive/sourcecodepro-semibold.ttf) format('truetype');
}

@font-face {
  font-family: 'Oswald';
  src: url(https://thp.io/2023/archive/Oswald-Regular.ttf) format('truetype');
}

body {
    margin: 0px;
    background-color: #eee;
    font-family: 'Open Sans', sans-serif;
}

h1, h2, h3, h4 {
    font-family: 'Oswald';
    font-weight: normal;
    margin-left: 0px;
    margin-right: 0px;
    margin-bottom: 5pt;
    color: #333;
}

h2, h3, h4 {
    margin-top: 12pt;
    padding-top: 6pt;
}

h1 {
    margin-top: 0px;
    padding-top: 0px;
}

/* Baseline */
body { line-height: 160%; }

body { font-size: 11pt; }
h1 { font-size: 16pt; }
h2 { font-size: 15pt; }
h3 { font-size: 14pt; }
h4 { font-size: 13pt; }
code, pre { font-size: 9pt; }

:root {
    --font-scale-big: 1.15;
    --font-scale-medium: 1.1;

    --main-border-radius: 9px;
}

@media all and (min-width: 1001px) {
    body { line-height: 170%; }

    body { font-size: calc(11pt * var(--font-scale-big)); }
    h1 { font-size: calc(16pt * var(--font-scale-big)); }
    h2 { font-size: calc(15pt * var(--font-scale-big)); }
    h3 { font-size: calc(14pt * var(--font-scale-big)); }
    h4 { font-size: calc(13pt * var(--font-scale-big)); }
    code, pre { font-size: calc(9pt * var(--font-scale-big)); }
}

@media all and (min-width: 801px) and (max-width: 1000px) {
    body { line-height: 165%; }

    body { font-size: calc(11pt * var(--font-scale-medium)); }
    h1 { font-size: calc(16pt * var(--font-scale-medium)); }
    h2 { font-size: calc(15pt * var(--font-scale-medium)); }
    h3 { font-size: calc(14pt * var(--font-scale-medium)); }
    h4 { font-size: calc(13pt * var(--font-scale-medium)); }
    code, pre { font-size: calc(9pt * var(--font-scale-medium)); }
}

div.image-gallery {
    text-align: center;
    padding: 10px;
}

div.image-gallery img {
    padding: 5px;
    max-width: 80%;
    vertical-align: middle;
}

div.image-gallery img.image-quad {
    max-width: 22%;
}

div.image-gallery img.image-third {
    max-width: 30%;
}

div.image-gallery img.image-half {
    max-width: 45%;
}

div.image-gallery img.image-half-big {
    max-width: 45%;
}

div.appstore-badges {
    text-align: center;
    padding: 20px;
}

div.appstore-badges img {
    height: 50px;
}

@media all and (min-width: 801px) and (max-width: 1000px) {
    div.appstore-badges {
        padding: 10px;
    }

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

@media all and (max-width: 600px) {
    div.image-gallery img.image-quad {
        max-width: 45% !important;
    }
}

@media all and (max-width: 800px) {
    div.image-gallery img.image-third {
        max-width: 50% !important;
        display: block;
        margin-left: auto;
        margin-right: auto;
    }

    div.image-gallery img.image-half {
        max-width: 70% !important;
        display: block;
        margin-left: auto;
        margin-right: auto;
    }

    div.image-gallery img.image-half-big {
        max-width: 90% !important;
        display: block;
        margin-left: auto;
        margin-right: auto;
    }

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

@media all and (max-width: 500px) {
    div.appstore-badges img {
        margin-left: auto;
        margin-right: auto;
        height: 40px;
    }
}

div.blog-post-title-and-date h1 {
    margin-bottom: 0px;
}

div.blog-post-title-and-date p {
    margin-top: 0px;
    margin-bottom: 10px;
}

div.headline-and-tagline img {
    display: block;
    padding-bottom: 10px;
    margin-left: auto;
    margin-right: auto;
    max-height: 128px;
}

div.headline-and-tagline h1, div.headline-and-tagline-no-icon h1 {
    text-align: center;
    margin-bottom: 0px;
}

div.headline-and-tagline p, div.headline-and-tagline-no-icon p {
    margin-top: 0px;
    text-align: center;
}

a { color: #369; }
a:hover { color: #19334c; }

img { border-width: 0px; }

code {
    padding: 3px;
    margin: 2px;
}

code, pre {
    font-family: 'Source Code Pro';
    background-color: #f0f0f0;
    border-radius: 5px;
    color: #222;
}

pre {
    padding: 5px;
    border: 1px solid #ddd;
}

@media screen {
    pre {
        overflow: auto;
    }
}

pre > code {
    margin: 0px;
    padding: 0px;
}

hr {
    border: 0px;
    border-top: 1px solid #ddd;
    height: 0px;
    margin-top: 6px;
    margin-bottom: 6px;
    clear: both;
}

div#root {
    background-color: white;
    max-width: 800px;
    box-shadow: 0px 0px 3px #bbb;
    margin-top: 0px;
}

@media screen and (min-width: 1001px) {
    div#root { margin-left: 100px; }
}

@media screen and (min-width: 801px) {
    div#root {
        margin-top: 20px;
        margin-bottom: 20px;
        border-radius: var(--main-border-radius);
    }

    p#breadcrumbs {
        border-top-left-radius: var(--main-border-radius);
        border-top-right-radius: var(--main-border-radius);
    }

    address {
        border-bottom-left-radius: var(--main-border-radius);
        border-bottom-right-radius: var(--main-border-radius);
    }
}

@media all and (min-width: 801px) and (max-width: 1000px) {
    div#root {
        margin-left: auto;
        margin-right: auto;
    }
}

@media all and (max-width: 800px) {
    div#root {
        margin-top: 0px;
    }

    div.headline-and-tagline {
        margin-bottom: 20px;
    }

    div.headline-and-tagline img {
        float: left;
        padding-right: 10px;
        max-height: 45px;
    }

    div.headline-and-tagline h1 {
        text-align: left;
        margin-bottom: 0px;
    }

    div.headline-and-tagline p {
        margin-top: 0px;
        text-align: left;
    }

}

p#breadcrumbs {
    font-family: 'Oswald';
    margin: 0px;
    background-color: #333;
    padding: 10px;
    /* https://developer.mozilla.org/en/docs/CSS/text-overflow */
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

p#breadcrumbs, p#breadcrumbs a {
    color: #eee;
    text-decoration: none;
}

p#breadcrumbs a:hover, p#breadcrumbs #here {
    color: white;
}

p#breadcrumbs a:hover {
    background-color: inherit;
    text-decoration: none;
}

div#content {
    padding: 20px;
    margin: 0px;
}

address {
    text-align: right;
    background-color: #EEEDED;
    padding: 10px;
    font-style: normal;
}

address, address a:hover { color: #3A2F11; }

address a {
    text-decoration: none;
    color: #3A2F11;
}

img.pixelart {
    image-rendering: crisp-edges;
}

h2.blog-month {
    text-align: right;
}

h1.blog-years {
    text-align: center;
    overflow: hidden;
}

h1.blog-years a {
    text-decoration: none;
}

/* https://stackoverflow.com/a/14731123/1047040 */
h1.blog-years:before,
h1.blog-years:after {
  background-color: #333;
  content: "";
  display: inline-block;
  height: 1px;
  position: relative;
  vertical-align: middle;
  width: 50%;
}

h1.blog-years:before {
  right: 0.5em;
  margin-left: -50%;
}

h1.blog-years:after {
  left: 0.5em;
  margin-right: -50%;
}
