:root {
  --ratio: 1.5;
  --s-5: calc(var(--s-4) / var(--ratio));
  --s-4: calc(var(--s-3) / var(--ratio));
  --s-3: calc(var(--s-2) / var(--ratio));
  --s-2: calc(var(--s-1) / var(--ratio));
  --s-1: calc(var(--s0) / var(--ratio));
  --s0: 1rem;
  --s1: calc(var(--s0) * var(--ratio));
  --s2: calc(var(--s1) * var(--ratio));
  --s3: calc(var(--s2) * var(--ratio));
  --s4: calc(var(--s3) * var(--ratio));
  --s5: calc(var(--s4) * var(--ratio));
}

html {
  font-size: 18px;
}

/*h1s will overspill on mobile */

/* BASIC TEXT FILE */

/* GOAL: to get up a text-based blogpost asap, with an elegant and traditional look */

* {
  box-sizing: border-box;
}

body {
  background-color:#fcf9f0;
  font-family: "Source Serif Pro", serif;
  line-height: 1.5;
  /*font-size: calc(20px + 0.390625vw);*/
  font-size: var(--s0);
}

article {
  max-width: 80ch;
  margin-left: auto;
  margin-right: auto;
  padding:15px;
}

section, footer {
  padding-bottom: 1.5em;
}

p {
  text-align: justify;
  text-indent: 1em;
}

h3 { /*alternative for section if the document doesn't generate sections */
  padding-top: 1em;
  text-align: center;
}

h2 { /*ditto */
  padding-top: 1.5em;
}

/* TEXT TYPES */

h2, h3, h4, h5, h6 {
  font-family: "Headland One", Times, serif;
  font-weight: normal;
}

section h1, h1 {
  font-size: 3em;
  font-family: 'Macondo Swash Caps', Times, serif;
}

footer a {
  display: block;
  text-align: center;
}

h2 {
  text-align: center;
  display: block;
  border-bottom: green dotted 5px;
  margin-bottom: 1.5em;
}

h4 {
  font-size: 1.25em;
  font-variant-caps: small-caps; 
}

ul {
  list-style-type: '◆ ';
}

li {
  margin-bottom: 8px;
}


img, figure {
  max-width:60ch;
  margin-left: auto;
  margin-right: auto;
 
}


a {
  color: green;
  text-decoration: underline dotted; 
  font-variant-caps: small-caps;
  font-size: 1.25em;
}

dl {
	max-width:60ch;
	margin-left: auto;
	margin-right: auto;
}

/* Blockquotes */

blockquote {
  font-family: 'Libre Baskerville';
  font-size: 0.8em;
}

blockquote cite {
  font-weight: bold;
  text-align: right;
  margin-top: 0.5em;
}

blockquote, ul, ol {
  margin: 2.5em;
}


/* FANCY QUOTES */

blockquote {
  border:none;
}

blockquote:before{
    content: ""; /* This is necessary for the pseudo element to work. */ 
    display: block; /* This will put the pseudo element on its own line. */
    margin: 0 auto; /* This will center the border. */
    width: 50%; /* Change this to whatever width you want. */
    margin-bottom: 1em;
    border-bottom: 5px double black; 
}

blockquote:after {
    content: "";
    display: block;
    margin: 0 auto;
    width: 50%; 
    padding-top: 1em;
    border-bottom: 5px double black; 
}

/* Attractive Quotes */

q::before {
  content: "‘"
}

q::after {
  content: "’"
}

q {
  font-style: italic;
}

  /* Title of a book or film */

q-t, cite, dt {
  text-decoration: underline dotted orangered;
  font-variant-caps: small-caps;
}

 
  /* FIGURES */
  figure {
    margin-left:auto;
    margin-right:auto;
    max-width:100%;
  }
  
  figure img {
    max-height:90vh;
  
  }
  
  figcaption {
    text-align:center;
    font-style:italic;
    padding:0.5em;
  }
    
  img {
    display:block;
    margin-left:auto;
    margin-right:auto;
    max-width:100%;
  }
/* Admonitions */

/* from http://boundedinfinity.github.io/2017/09/admonitions-in-css/ */

aside {
  display: block;
  padding: 15px;
  margin: 2em;
  border-left: 10px solid transparent;
}

aside h4 {
  margin: 0;
  text-transform: uppercase;
  padding-left: 3px;
  border: 1px solid;
  border-style: hidden hidden solid;
}

aside p {
  padding-left: .75em;
  padding-right: .75em;
  padding-top: 0.5em;
  margin-left: 0;
  border-left: 0;
  border-top: 0;
  min-height: 0;
}

.hint {
  border-color: olive;
  background-color: #f6fffe;
}

.hint h4 {
  color: olive;
  border-color: olive;
}

.note {
  border-color: orangered;
  background-color: #fffeec;
}

.note h4 {
  color: orangered;
  border-color: orangered;
}

/*
.tip {
  border-color: blue;
  background-color: #f6fcff;
}

.tip .title {
  color: blue;
  border-color: blue;
}


.important {
  border-color: red;
  background-color: #fffbfb;
}

.important .title {
  color: red;
  border-color: red;
}
*/
