@import url('https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Anton&display=swap');

/* It seems fonts must start at the bottom or do not work.
 */

body
{
    max-width: min(800px, 100vw - 2rem);
    margin: 0 auto;
    padding: 6em 1em 0;
}

img
{
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto 2rem;
}

img.article-hero
{
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    margin: 1.5rem auto 2.5rem;
    border: 3px solid #fff;
    outline: 1px solid #ddd;
}

.article-explanation
{
    font-size: 0.8rem;
    color: #444444;
    text-align: center;
    margin: -1.5rem auto 2rem;
    max-width: 700px;
    padding: 0 1rem;
}

.article-inline-image
{
    max-width: 80%;
    height: auto;
    display: block;
    margin: 0 auto 1.8rem;
}

/*
 * Logo
 */

div.logo {
    position: fixed;
    top: 1em;
    left: 1em;
    z-index: 1000;
}

span.logo
{
    font-family: "Anton", sans-serif;
    font-size: 2.5rem;
    position: relative;
    display: inline-block;
}

a.logo {
    position: relative;
    display: inline-block;
}

a.logo::before {
    content: "";
    position: absolute;
    top: 0;
    left: -0.3em;
    right: -0.3em;
    height: 50%;
    background: gold;
    z-index: -1;
}

a.logo,
a.logo:hover,
a.logo:active {
  text-decoration: none;
  background-color: transparent;
  padding: 0;
  margin: 0;
  border: none;
}

/* Article Title
 */
h1.article-title
{
    font-family: "Anton", sans-serif;
    font-size: 2.5rem;
    text-align: center;
    margin: 0 0 0.25rem 0;
}

.article-authors
{
    text-align: center;
    margin: 0 0 1rem 0;
    font-family: "Open Sans", sans-serif;
    font-size: 0.9rem;
    color: #666;
}

/* Markdown h1
 */
h1
{
    font-family: "Anton", sans-serif;
    font-size: 2rem;
}

/* Category names
 */
h2
{
    font-family: "Anton", sans-serif;
    font-size: 1.5rem;
}

/* Article links */
a
{
    text-decoration: none;
    color: black;
    font-family: "Anton", sans-serif;
}

/* Bullets */
ul
{
    list-style: disc;
    padding-left: 1.5em;
    font-family: "Open Sans", sans-serif;
    font-size: 1rem;
}

p
{
  font-family: "Open Sans", sans-serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
  font-variation-settings: "wdth" 100;
}

p.article-date-time
{
    font-style: italic;
}

p.quote
{
    font-style: italic;
}

a
{
    text-decoration: none;
    color: black;
}

a:hover
{
    text-decoration: none;
    background-color: gold;
}

a:visited
{
    text-decoration: none;
    color: black;
}

a:visited:hover
{
    text-decoration: none;
    background-color: gold;
}

/* PDF links icon */
a[href$=".pdf"]::before
{
    content: "";
    display: inline-block;
    width: 16px;
    height: 20px;
    background-image: url(/icons/pdf.svg);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    margin-right: 0.3em;
    vertical-align: -4px;
}

/*
 * Index page specific styles
 */

body.index-page {
    max-width: none;
    margin: 0;
    padding: 0;
}

.hero-wrapper {
    position: relative;
    width: 100%;
}

.hero-image {
    width: 100%;
    height: auto;
    display: block;
    margin: 0;
    padding: 0;
}

.hero-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.05);
    pointer-events: none;
}

.hero-wrapper::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 8px;
    background-color: rgba(0, 0, 0, 0.4);
    pointer-events: none;
}

.index-logo a.logo,
.index-logo span.logo,
.index-logo div.logo {
    color: white;
}

.index-logo a.logo::before {
    background: gold;
}

.toc-container {
    max-width: min(800px, 100vw - 2rem);
    margin: 0 auto;
    padding: 2em 1em;
}
