:root {
  --primary-color: #2D6CCC;
  --background-color: #fafafa;
  --header-color: #282828;
  --text-color: #3A3A3A;
  --text-muted: #636363;
  --border-muted: #eee;
  --tag-background-color: #e0e0e0;
  --pre-background-color: #282c34;
  --pre-text-color: #abb2bf;
}

body{
  background-color:var(--background-color);
  font-family: Didot, 'Bodoni MT', 'Noto Serif Display', 'URW Palladio L', P052, Sylfaen, serif;
  font-weight: normal;
  font-size: clamp(17px, 1rem + 0.5vw, 21px);
  line-height: clamp(26px, 0.72vi + 22.75px, 48px);
  max-width:700px;
  width:100%;
  margin:0 auto;
  padding:2rem;
  color:var(--text-color);

  display:grid;
  gap:20px;
  grid-template-areas:
    "header"
    "nav"
    "main"
    "paginate"
    "footer";
  box-sizing:border-box;
  overflow-x:hidden;
  overflow-wrap:break-word;
}

header, nav, main, .paginate, footer{
  min-width:0;
}

img, table, pre, code {
  max-width:100%;
  height:auto;
}

header       {grid-area: header;  }
nav          {grid-area: nav;     }
main         {grid-area: main;    }
nav.paginate {grid-area: paginate;}
footer       {grid-area: footer;  }

h1, h2, h3 {
  color:var(--header-color);
  line-height: clamp(26px, 0.72vi + 34.75px, 48px);
  margin-top: 2rem;
}

h1 {
  border-bottom: 2px solid var(--border-muted);
  padding-bottom: 0.5rem;
}

a {
  color:var(--primary-color);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.tags {
  margin-top: 2rem;
}

.tag {
  display: inline-block;
  background:var(--tag-background-color);
  padding: 0.2em 0.4em;
  border-radius: 3px;
  font-size: 0.85rem;
  margin-right: 0.5rem;
  line-height: initial;
}

nav ul {
  display: flex;
  padding: 0;
  gap: 10px;
}

nav li {
  list-style-type: none;
}

code {
  background: var(--background-color);
  padding: 0.2em 0.4em;
  border-radius: 3px;
  font-size: 0.9em;
}

pre {
  background:var(--pre-background-color);
  color:var(--pre-text-color);
  padding: 1rem;
  overflow-x: auto;
  border-radius: 8px;
}

pre code {
  background: none;
  padding: 0;
  color: inherit;
}

article img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

blockquote {
  border-left: 4px solid var(--primary-color);
  margin-left: 0;
  padding-left: 1rem;
  color: var(--text-muted);
  font-style: italic;
}

footer {
  padding: 0.75rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 1rem;
}

nav.paginate {
  justify-content: center;
}

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

.item {
  display: flex;
  gap: .25rlh;
  align-items: first baseline;
  transition-property: gap;
  position: relative;
  color: var(--text-color);
  & hr {
    flex: 1 1 auto;
    height: 1px;
    background: none;
    border: none;
    border-top-width: medium;
    border-top-style: none;
    border-top-color: var(--text-muted);
    border-top: 1px dotted var(--text-muted);
    opacity: .3;
    min-width: 1rlh;
    transition-property: border;
  }
  & p {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition-property: color;
    margin: 6px 0;
  } 
  & time, & span {
    transition-property: color;
  }
}

.header {
  display: flex;
  justify-content: space-between;
  align-content: center;
  align-items: end;
  gap: 12px;
  border-bottom: 2px solid var(--border-muted);
  padding-bottom: 0.5rem;
  & h1 {
    margin: 2rem 0 0.2rem 0;
    border-bottom: none;
    padding-bottom: 0;
  }
}

.container {
  color: #333;
  margin: 0 auto;
  text-align: center;
}

