:root {
   /* --accent: #2D9CDB; */
    --accent: #E2711D;
    --grey: #444;
    --light-grey: #6F6E69;
    --cream: #FFFCF0;
    --text: #231f20;
    --image-radius: 6px;
    --color-tx: #231f20;
    --color-tx-faint: #B7B5AC;
    --color-eames-gold: #fca103;
    --color-eames-orange: #fd3637;
    --color-eames-green: #1ca444;
    --color-eames-light-blue: #0293bc;
    --font-small: 0.875em;
    --font-fallback: Inter, san-serif;
}

.muted {
    color: var(--color-tx-faint);
}

.small {
    font-size: var(--font-small);
}

html {
    font-size:  100%;
    scroll-behavior: smooth;
    background-color: var(--cream);
}

@font-face {
    font-family: "HexFranklin";
    src: url("/assets/HEX_Franklin_v0.3_Variable.woff2") format("woff2 supports variations"),
    url("/assets/HEX_Franklin_v0.3_Variable.woff2") format("woff2-variations");
    font-weight: 400 800;
}

@font-face {
    font-family: "Crimson";
    src: url("/assets/CrimsonPro-VariableFont_wght.ttf");
    font-weight: 200 300 400 800;
}

body {
    font-family: Inter, sans-serif;
    line-height: 1.65;
    
    display: flex;
    flex-direction: column;
    min-height: 100vh;

    margin: 0 24px;
    color: var(--color-tx);
}

@media only screen and (max-width: 468px) {
    .page-header {
        flex-direction: column;
    }
}

.page-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
}

.page-header nav a:not(:hover):not(:focus) {
    color: currentColor;
    text-decoration: none;
}

nav a {
    margin: 0 12px;
    font-size: 1.25em;
}

main {
    flex-grow: 1;
    max-width: 60ch;
    width: 100%;
    margin: 0 auto;
}

.page-footer {
    text-align: center;
    margin-bottom: 8px;
}

a[href] {
    color: var(--text);
}

a[href]:hover {
    text-decoration: underline;
    color: var(--accent);
}

a[href]:focus {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
}

a[href*="//"]::after {
    content: '';
    overflow: visible;
    display: inline-block;
    width: .9em;
    height: 1em;
    margin-left: 0.25em;
    background-size: 100%;
    background-image: url(/assets/external-link.svg);
}

.footnotes {
    font-size: 0.8em;
}

/* Typography */
p {
    margin-bottom: 1.15rem;
}

h1, h2, h3, h4, h5 {
  margin: 2.75rem 0 1.05rem;
  font-weight: 400;
  line-height: 1.15;
}

h1 {font-size: 3.052em;}

h2 {font-size: 2.441em;}

h3 {font-size: 1.953em;}

h4 {font-size: 1.563em;}

h5, .larger {font-size: 1.25em;}

small {font-size: 0.8em;}

/* backlinks */
.backlinks-title {
    margin-bottom: 0;
}

.backlinks-container {
    margin-top: 0;
}

.backlinks-default {
    margin-top: 0;
    margin-left: 16px;
    color: var(--grey);
}

.backlink__preview {
    display: none;
    
    position: absolute;
    bottom: 8px;
    left: 100%;
    background-color: #fff;
    border-radius: 4px;
    padding: 4px;
    box-shadow: 0 0 4px 2px rgba(0, 0, 0, 0.25);
    width: 348px;
    max-height: 148px;
    overflow: hidden;
}
.backlink__preview::after {
    content: "";
    position: absolute;
    bottom: 0;
    background: linear-gradient(transparent, white);
    width: 100%;
    height: 24px;
}

.backlink__preview h1 {
    font-size: 1.2rem;
    margin-top: 8px;
    font-weight: bold;
}

.backlink {
    width: fit-content;
    position: relative;
}

.backlink:hover {
    padding-right: 4px; /* Allow mouse to travel between link and modal */
}

.backlink:hover .backlink__preview {
    display: block;
}

img {
    border-radius: var(--image-radius);
    max-width: 100%;
    height: auto;
}

.breakout {
    min-width: 125%;
    margin-left: -12.5%;
}

/*
.breakout {
    min-width: 125%;
    margin-left: -12.5%;
}
*/

ul li::marker {
    color: var(--color-tx-faint);
}

h1, h2, h3 {
    font-family: "HexFranklin";
    font-weight: 700;
    font-variation-settings: "wdth" 80;
}

h4 {
    font-family: "HexFranklin";
    font-weight: 600;
    font-variation-settings: "wdth" 90;
}

.franklin {
    font-family: "HexFranklin";
    font-weight: 600;
    font-variation-settings: "wdth" 90;
}

.crimson {
    font-family: "Crimson";
    font-weight: 400;
}

img + em {
    font-family: "Crimson", serif;
    font-size: 1.15em;
    font-weight: 300;
    line-height: 1.33;
    margin: 0px;
    color: var(--color-tx-faint);
}

blockquote {
    font-family: "Crimson", serif;
    font-size: 1.25em;
    font-weight: 300;
    color: var(--color-tx);
    border-left: 1.5px var(--color-eames-orange) solid;
    margin-left: 2em;
    hanging-punctuation: first;
}

blockquote > p {
    margin-left: 1em;
}