:root {
  --gradient1-color: #fe8019;
  --gradient2-color: #fabd2f;
}

@import "highlight-native.css";

@font-face {
  font-family: 'EB Garamond';
  font-style: normal;
  font-weight: 400;
  src: url(/font/ebgaramond.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

html {
  padding: 0;
  margin: 0;
}

body {
  margin: 0;

  color: #282828;
  background-color: #fbf1c7;

  font-family: "EB Garamond";
  font-size: 1.2rem;
}

header h1 {
  padding-top: 0;
  margin-top: 1em;
  text-align: center;
  padding-bottom: 0;
  margin-bottom: 0;
  font-size: 4rem;
}

header::before,
header::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  z-index: -1;
  opacity: 0.75;
}

header::before {
  top: 0;
  left: 50%;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, var(--gradient1-color), #ebdbb2);
  transform: translate(-450px, -350px);
}

header::after {
  top: 0;
  left: 50%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--gradient2-color), #ebdbb2);
  transform: translate(-50px, -50px);
}

footer {
  padding: 2em 0 2em 0;
  text-align: center;
}

nav ul {
  margin: 0;
}

code {
  font-size: 0.9rem;
}

#page-list {
  list-style: none;
  text-align: center;
  padding: 0;
  padding-top: 0.5em;
  padding-bottom: 0.5em;
}

#page-list li {
  display: inline-block;
}

#page-list li a {
  margin: 0 1em;
  text-decoration: none;
  color: #1d2021;
}

#page-list li a:hover {
  text-decoration: underline;
}

main {
  line-height: 1.3;
  max-width: 50rem;
  margin: 4em auto 4em auto;
}

#art-list {
  padding: 0;
  list-style: none;
}

#art-list li {
  margin-top: 5ch;
  cursor: pointer;
}

#art-list li a {
  color: #3c3836;

  text-decoration: none;
}

#art-list hr {
  height: 2px;

  margin: 0;
  padding: 0;

  background-color: #3c3836;
  color: #3c3836;
  
  border-style: solid;
}

#art-list a #title {
  margin-top: 100ch;
  display: grid;
  grid-template-columns: 0ch auto 2ch 25ch;
  padding: 0;
  margin: 0;
  text-align: left;
  transition: 0.2s;
}

#art-list #post-tags {
  font-size: 0.8rem;
  margin: 0;
  color: #504945;
}

#art-list a h1 {
  margin: 0;
  padding: 0;

  font-size: 28px;

  transition: 0.2s;
}

#art-list a:hover #title {
  grid-template-columns: 1ch auto 0ch 25ch;
}

#art-list .post-meta {
  text-align: right;
  font-size: 0.85em;
  margin: 0;
}

#art-list p {
  margin: 0;
  padding-top: 1ch;
}

p {
  text-indent: 2ch;
  text-align: justify;
}

.no-indent {
  text-indent: 0ch !important;
}

p strong {
  background-color: #d5c4a1;
}

#post-title {
  margin-bottom: 8ch;
}

#post-title * {
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}

#post-title h1 {
  margin-bottom: 0;
}

#post-title pre {
  margin-top: 0;
}

main h2 {
  text-decoration: underline;
}

main ul li {
  text-align: justify;

}

main figure {
  display: block;
  max-width: 90% !important;
  margin: 6ch auto 6ch auto;
  text-align:center;
}

main figure p {
  display: block;
  max-width: 90% !important;
  margin: 6ch auto 6ch auto;
  text-align:center;
}

figure * {
  margin: 0;
  width: fill;
}

main figure code {
  display: block;
  width: fill;
  padding: 3ch;
  text-align: left;
  border-radius: 1ch;
}

main figure img {
  margin-bottom: 2ch;
}

main figure figcaption {
  max-width: 70%;
  margin: 0 auto 0 auto;
}

main figure table {
  margin-left: auto;
  margin-right: auto;
}

main figure table th {
  background-color: #ebdbb2;
}

main figure table th, td {
  padding-left: 1em;
  padding-right: 1em;
  padding-top: 0.5em;
  padding-bottom: 0.5em;
}

main input {
  background-color: #d5c4a1;
  color: #282828;
  border-color: #282828;
  border-radius: 0;
  margin: 0.5em;
}

main input:hover {
  background-color: #bdae93;
  cursor: pointer;
}

canvas {
  border: 3px dashed #212121;
  margin: auto;
}

main a {
  color: #458588;
}

main ul {
  list-style: square;
}

main blockquote {
  padding-top: 0.001em;
  padding-bottom: 0.001em;
  padding-right: 1em;
  padding-left: 1em;
  background-color: #ebdbb2;
}

table {
  border-collapse: collapse;
}

table, td, th {
  border: 1px solid;
}

.MathJax {
  font-size: 1.5em;
}

#pre-footer {
  display: none;
  color: #ebdbb2;
  background-color: #458588;
  padding: 2em;
  max-width: 70ch;
}

#pre-footer-content {
  text-align: center;
}

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

@media (pointer:none), (pointer:coarse) {
  main {
    line-height: 1.3;
    width: 92.5%;
    max-width: 92.5%;
    margin: 1em auto 1em auto;
  }

  #pre-footer {
    max-width: 90%;
  }

  header::before {
    top: 0 !important;
    left: 50% !important;
    width: 1000px !important;
    height: 1000px !important;
    /*background: radial-gradient(circle, var(--gradient1-color), #ebdbb2) !important;*/
    background: #ebdbb2;
    transform: translate(-700px, -350px) !important;
  }

  header::after {
    top: 0 !important;
    left: 50% !important;
    width: 600px !important;
    height: 600px !important;
    /*background: radial-gradient(circle, var(--gradient2-color), #ebdbb2) !important;*/
    background: #ebdbb2;
    transform: translate(-150px, 100px) !important;
  }

  header h1 {
    font-size: 6em !important;
  }

  #art-list a h1 {
    font-size: 3em !important;
  }

  h1 {
    font-size: 4em !important;
  }

  h2 {
    font-size: 2.5em !important;
  }

  h3 {
    font-size: 1.5em !important;
  }

  #page-list li {
    font-size: 3em !important;
  }

  #page-list li a {
    padding: 0.5em !important;
  }

  #page-list li a:hover {
    text-decoration: underline;
  }

  #art-list li {
    margin-bottom: 15ch !important;
  }
  
  #art-list a #title {
    grid-template-columns: 100% !important;
    grid-template-rows: auto auto auto auto !important;
  }

  main figure {
    font-size: 2.0em;
  }

  main figure input {
    width: 95% !important;
    font-size: 2rem !important;
    overflow-x: auto !important;
  }

  main figure input[type="checkbox"] {
    width: 1.5em !important;
    height: 1.5em !important;
  }

  main figure figcaption {
    font-size: 1rem !important;
  }

  main figure canvas {
    width: 100%;
  }

  main figure img {
    width: 100%;
  }

  #rssimg {
    width: 7.5rem;
  }

  .MathJax {
    font-size: 2.5em !important;
  }

  mjx-container[display="true"] {
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
  }
}
