/*
  Global styles

  Low-specificity, global styles that apply to the whole project: https://cube.fyi/css.html
*/

html {
  block-size: 100%;
  background-color: var(--color1);
  color: var(--color8);
}

body {
  font: var(--font-base);
  font-size: var(--step-0);
  background-color: var(--color-neutral-9);
  color: var(--color-neutral-1);
  /* or set to system defaults */
  /* font-family:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif; */
  line-height: 1.4;
  /* letter-spacing: var(--tracking); */
  font-variant-ligatures: normal;
  font-feature-settings: "liga" 1, "dlig" 1, "hlig" 1, "clig" 1, "calt" 1;
}

/* Base typesetting */
h1,
h2,
h3,
h4,
h5,
h6 {
  line-height: 1;
  /* font-family: "Verdana"; */
  /* letter-spacing: var(--tracking-s); */
}

h1 {
  font-size: var(--step-6);
  line-height: 1;
  font-weight: 500;
}

h2 {
  font-size: var(--step-5);
  font-weight: 500;
}

h3 {
  font-size: var(--step-4);
  /* line-height: 1.2; */
}

h6 {
  font-size: var(--step-0);
  /* line-height: 1.2; */
  margin: 1em 0 0 0;
  font-weight: 200;
}

p {
  line-height: 1.5;
}

/* Set line lengths */
/* p, */
li,
blockquote:not([class]) {
  max-width: 50ch;
}

h1,
h2,
h3 {
  max-width: 20ch;
}

/* More generic elements */
blockquote:not([class]) {
  /* font-family: var(--font-serif); */
  font-size: var(--step-2);
}

/* Markdown blockquuote:not([class])s aren't ideal, so we're presuming the person quoted is the last p */
blockquote:not([class]) p:last-of-type {
  /* font-family: var(--font-base); */
  font-weight: normal;
}

svg {
  height: 2ex;
  width: auto;
  flex: none;
}

[role='list'] {
  padding: 0;
}

/* Base interactive elements */

a {
  color: currentcolor;
  /* color: var(--color-secondary-1); */
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-decoration-thickness: .1em;
  text-underline-offset: .15em;
  text-decoration-color: var(--color-secondary-1);
}

p > a[href^="mailto"],
p > a[href^="http"] {
  color: var(--color-secondary-1);
  text-decoration: underline;
  text-decoration-thickness: .1em;
  text-underline-offset: .15em;
  text-decoration-color: var(--color-secondary-1);
}

p > a[href^="http"]::after {
  content: " ";
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='red' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M10 5H8.2c-1.12 0-1.68 0-2.108.218a1.999 1.999 0 0 0-.874.874C5 6.52 5 7.08 5 8.2v7.6c0 1.12 0 1.68.218 2.108a2 2 0 0 0 .874.874c.427.218.987.218 2.105.218h7.606c1.118 0 1.677 0 2.104-.218c.377-.192.683-.498.875-.874c.218-.428.218-.987.218-2.105V14m1-5V4m0 0h-5m5 0l-7 7'%3E%3C/path%3E%3C/svg%3E");
  background-size: 16px 16px;
  height: 13px;
  width: 14px;
  margin: 0 0 0.4rem 0;
  display: inline-block;
}

:target {
  scroll-margin-top: 2ex;
}

main:focus {
  outline: none;
}
