:root {
  --font-size: 1.8rem;
  --font-size-small: 1.6rem;
}

/* Minimal CSS Reset */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  font-size: 62.5%;
}

body {
  background-color: var(--c-bg);
  font-family: var(--font-family-serif);
  font-size: var(--font-size);
  font-weight: normal;
  line-height: 2.6rem;
  color: var(--c-text);
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

input,
button,
textarea,
select {
  font: inherit;
}

pre {
  font-family: var(--font-family-ui-mono);
  font-size: var(--font-size-small);
  margin-bottom: var(--su);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-family-serif);
  font-size: var(--font-size);
  font-weight: normal;
  overflow-wrap: break-word;
}

i, em {
  font-family: var(--font-family-serif-italic);
  font-style: italic;
}

b, strong {
  font-family: var(--font-family-serif-bold);
  font-style: normal;
}

b i, b em,
em b, em strong, 
strong i, strong em, 
i em, i b {
  font-family: var(--font-family-serif-bold-italic);
  font-style: italic;
}

ul {
  list-style: none;
}
ol {
  list-style: decimal inside;
  counter-reset: custom-counter;
  margin-left: 0;
}
ol > li {
  position: relative;
  counter-increment: custom-counter;
  margin-bottom: calc(var(--su) / 2);
}
ol > li::marker {
  color: var(--c-text-faded, #888);
  font-size: var(--font-size-small);
  font-family: var(--font-family-sans, monospace);
}


/* Links */
a {
  /* color is text color */
  color: var(--c-text);
  /* underline color is accent color */
  text-decoration: underline;
  text-decoration-color: var(--c-text-accent);
  text-decoration-thickness: 0.15rem;
  text-underline-offset: 0.3rem;
}

a:hover {
  color: var(--c-text-accent);
}

a.active {
  text-decoration: none;
}

a:focus-visible {
  outline: 2px solid var(--c-text-accent);
  outline-offset: 2px;
}


a[target="_blank"]:after,
:is(article, .mentioned-in) a[href*="/writing"]:after,
:is(article, .mentioned-in) a[href*="/references"]:after,
:is(article, .mentioned-in) a[href*="/projects"]:after,
:is(article, .mentioned-in) a[href*="/notes"]:after {
  font-size: 1rem;
  font-weight: bold;
  letter-spacing: 0.1rem;
  line-height: 1rem;
  color: var(--c-text-subtle);
  vertical-align: super;
  display: inline;
  border-bottom: none;
  white-space: nowrap;
}
:is(article, .mentioned-in) a[href*="/writing"]:after { content: " /W"; }
:is(article, .mentioned-in) a[href*="/references"]:after { content: " /R"; }
:is(article, .mentioned-in) a[href*="/projects"]:after { content: " /P"; }
:is(article, .mentioned-in) a[href*="/notes"]:after { content: " /N"; }
a[target="_blank"]:after {
  content: " ↗︎";
  font-size: 1.6rem;
}
/* hover */
:is(article, .mentioned-in) a[href*="/writing"]:hover:after { color: var(--c-text-faded); }
:is(article, .mentioned-in) a[href*="/references"]:hover:after { color: var(--c-text-faded); }
:is(article, .mentioned-in) a[href*="/projects"]:hover:after { color: var(--c-text-faded); }
:is(article, .mentioned-in) a[href*="/notes"]:hover:after { color: var(--c-text-faded); }
a[target="_blank"]:hover:after { color: var(--c-text-faded); }

a p {
  text-decoration: none;
}

small,
p.small {
  font-size: var(--font-size-small);
  line-height: 1.33;
}

/* subtle border on images for it to be visible in white background */
img {
  outline: 1px solid var(--c-line);
}