@charset "utf-8";

/* colors */
:root {
  --background-color: light-dark(#ffffff, #1b3156);
  --text-color: light-dark(#000000, #dce7f3);
  --primary-color: light-dark(#115ca1, #66b3ff);
  --secondary-color: light-dark(#cd0e0e, #ff6666);
  --header-color: light-dark(#1b3156, #96afda);
  --faded-color: light-dark(#7b8894, #aec3d6);
  --border-color: light-dark(#adbac7, #819bb4);
  --code-background-color: light-dark(#eee, #2a3f64);
  --code-block-background-color: #fff;
  --code-block-text-color: #000;
  --table-background-color: light-dark(#fafafa, #243552);
  --table-border-color: light-dark(#ddd, #384c6b);
  --pre-shadow: light-dark(rgba(255, 255, 255, 0.0), rgba(0, 0, 0, 0.2));
  --hr-shadow: light-dark(var(--border-color), #0b1a33);
  color-scheme: light dark;

  &:not([data-initial-load="true"]) {
    transition-duration: 300ms;
    transition-property: background-color, color, border-color, box-shadow;
  }

  @media screen and (prefers-reduced-motion: reduce), (update: slow) {
    transition-duration: none;
  }

  &[data-theme="dark"]  { color-scheme: dark; }
  &[data-theme="light"] { color-scheme: light; }
}

/* general style */
html    { background: var(--background-color); }
body    { font: 17px/25px 'Merriweather', serif;
          margin: 0; padding: 0; font-weight: 400; color: var(--text-color); }
a       { color: var(--primary-color); font-weight: 400; }
a:hover { color: var(--secondary-color); }

/* theme selector */
p.theme-selector {
  input                { display: none; }
  label                { cursor: pointer; margin: 0; text-decoration: none; }
  label:hover          { text-decoration: underline; }
  input:checked + span { text-decoration: underline; }
}

/* headlines */
h1, h2, h3, h4, h5, h6      { font-family: 'Lora', sans-serif;
                              font-weight: 500; color: var(--header-color) }
h1 a, h2 a, h3 a, h4 a,
h5 a, h6 a                  { text-decoration: none; }
h1 a:hover, h2 a:hover,
h3 a:hover, h4 a:hover      { text-decoration: underline; }
h1                          { margin: 15px 0 25px 0; }
h2                          { margin: 25px 0 10px 0; }
h3                          { margin: 35px 0 10px 0; }
h1                          { font-size: 52px; line-height: 56px; }
h2                          { font-size: 42px; line-height: 44px; }
h3                          { font-size: 36px; line-height: 38px; }

h1 em                       { color: black; font-size: 32px; display: block;
                              margin-left: 25px; margin-top: -15px; }

/* layout elements */
div.container               { max-width: 860px; margin: 48px auto; padding: 0 40px; }
div.header                  { float: left; }
div.header a:before         { content: ""; background: url(/static/avatar-tiny.jpg) no-repeat;
                              background-size: 32px; width: 32px; height: 32px;
                              display: block; float: left; margin-right: 12px;
                              margin-top: -4px; border: 1px solid var(--primary-color); border-radius: 50%;
                              box-shadow: 0 0 7px var(--hr-shadow); }
div.header a:hover:before   { border-color: var(--secondary-color); }
div.navigation              { float: right; }
div.header, div.navigation  { height: 25px; margin-bottom: 42px; }
div.navigation ul           { margin: 0; padding: 0; list-style: none; }
div.navigation ul li        { display: inline; margin: 0 2px; padding: 0; }
div.body                    { clear: both; margin: 0 30px; line-height: 1.7; }
div.footer                  { margin-top: 55px; font-size: 16px;
                              text-align: right; color: var(--faded-color); }
div.footer p                { margin: 0; }
div.footer a                { color: var(--faded-color); }

/* margins and stuff */
p, div.line-block, ul, ol, pre,
    table                       { margin: 15px 0 15px 0; }
dt                              { margin: 25px 0 16px 0; padding: 0; }
dd                              { margin: 16px 0 25px 40px; padding: 0; }
ul ol, ol ul, ul ul, ol ol      { margin: 10px 0; padding: 0 0 0 40px; }
li                              { padding: 0; }
h1 + p.date                     { margin-top: -25px; font-style: italic; }
blockquote                      { font-style: italic; }

/* code formatting.  no monospace because of webkit (bug?) */
pre, code, tt   { font-family: 'Ubuntu Mono', 'Consolas', 'Deja Vu Sans Mono',
                  'Bitstream Vera Sans Mono', 'Monaco', 'Courier New', monospace;
                  font-size: 0.9em; }
pre             { line-height: 1.5; background: var(--code-block-background-color);
                  color: var(--code-block-text-color); padding: 8px 30px; width: 100%; overflow-x: auto;
                  margin: -8px -30px -8px -30px; border-radius: 2px; box-shadow: 0 0 3px var(--pre-shadow); }
code, tt        { background: var(--code-background-color); }

/* tables */
table           { border: 1px solid var(--table-border-color); border-collapse: collapse;
                  background: var(--table-background-color); }
td, th          { padding: 2px 12px; border: 1px solid #ddd; }

/* footnotes */
table.footnote          { margin: 25px 0; background: transparent; border: none; }
table.footnote + table.footnote { margin-top: -35px; }
table.footnote td       { border: none; padding: 9px 0 0 0; font-size: 15px; }
table.footnote td.label { padding-right: 10px; }
table.footnote td p     { margin: 0; }
table.footnote td p + p { margin-top: 15px; }

/* blog overview */
div.entry-overview                  { margin: 25px 122px 25px 102px; }
div.entry-overview h1,
div.entry-overview div.summary,
div.entry-overview div.summary p    { display: inline; line-height: 25px; }
div.entry-overview h1               { margin: 0; font-size: 17px;
                                      font-family: 'Merriweather', serif; }
div.entry-overview h1:after         { content: " —"; color: var(--text-color); }
div.entry-overview div.summary,
div.entry-overview div.date,
div.entry-overview div.summary p    { margin: 0; padding: 0; }
div.entry-overview div.detail       { margin-left: 140px; }
div.entry-overview div.date         { float: left; width: 120px; color: var(--faded-color);
                                      text-align: right; font-style: italic;
                                      font-size: 14px; }

@media only screen and (max-width: 900px) {
    div.entry-overview { margin: 25px 10px 25px 0; }
    div.entry-overview div.detail { margin-left: 130px; }
}

/* other alignment things */
img.align-center                    { margin: 15px auto; display: block; }
img.align-right                     { margin: 5px 0 5px 15px; display: block; float: right; }
.figure.align-center                { text-align: center; }
.figure p.caption                   { font-size: 14px; margin-top: 0; }

/* pagination */
div.pagination          { margin: 36px 0 0 0; text-align: center; }
div.pagination strong   { font-weight: normal; font-style: italic; }

/* tags */
p.tags          { text-align: right; margin-top: 35px; }
ul.tagcloud     { font-size: 16px; margin: 36px 0; padding: 0;
                  list-style: none; line-height: 1.45; text-align: justify }
ul.tagcloud li  { margin: 0; padding: 0 10px; display: inline; }

/* latex math */
span.math img   { margin-bottom: -7px; }

/* strikethrough */
span.strike     { text-decoration: line-through; }

/* lines */
hr { border: none; border-bottom: 1px solid var(--border-color); height: 10px;
     margin: 10px auto 25px auto; width: 90%;
     box-shadow: 0 7px 7px -4px var(--hr-shadow); }

/* mobile */
@media only screen and (max-width: 800px) {
    div.body { padding: 0; margin: 0; }
    div.container { padding: 12px; margin: 0; }
    div.header { height: auto; margin: 0; }
    div.navigation { margin-bottom: 20px; }
    h1 { font-size: 42px; line-height: 44px; }
    h2 { font-size: 36px; line-height: 38px; }
    h3 { font-size: 28px; line-height: 30px; }
}

/* pygments fixes */
.w { text-decoration: none; }

/* expandables */
details {
    background: #eee;
    padding: 5px 15px;
}
details summary { cursor: pointer; }
details summary:hover { text-decoration: underline; color: var(--secondary-color); }
