/* --- TeX Gyre Pagella (Palatino) + Math --- */

@font-face {
  font-family: "TeX Gyre Pagella";
  src: url("/fonts/tex-gyre/texgyrepagella-regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "TeX Gyre Pagella";
  src: url("/fonts/tex-gyre/texgyrepagella-italic.otf") format("opentype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "TeX Gyre Pagella";
  src: url("/fonts/tex-gyre/texgyrepagella-bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "TeX Gyre Pagella";
  src: url("/fonts/tex-gyre/texgyrepagella-bolditalic.otf") format("opentype");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "TeX Gyre Pagella Math";
  src: url("/fonts/tex-gyre/texgyrepagella-math.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --font-body: "TeX Gyre Pagella", serif;
  --font-math: "TeX Gyre Pagella Math", math;
  --color-text: #444;
  --color-link: #444;
  --color-margin: #bbb;
  --color-heading: #000;
  --line-thickness: 2px;
  --line-thickness-hovered: 4px;
  --max-width: 42rem;
}

body {
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 1rem;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 4rem 1rem 2rem 1rem;
}

h1,
h2,
h3 {
  color: var(--color-heading);
  font-weight: bold;
  text-wrap: balance;
}

h1 {
  font-size: 6rem;
  line-height: 6rem;
  margin: 10rem 0 6rem 0;
  font-style: italic;
  overflow-wrap: break-word;
  font-weight: normal;
}

h2 {
  font-size: 4rem;
  line-height: 4rem;
  margin: 6rem 0 2rem 0;
}

@media (max-width: 54rem) {
  h1 {
    font-size: 3rem;
    line-height: 3rem;
    margin: 5rem 0 3rem 0;
  }

  h2 {
    font-size: 2rem;
    line-height: 2rem;
    margin: 3rem 0 1rem 0;
  }
}

p,
li,
h3,
blockquote {
  line-height: 2rem;
}

p,
ul,
h3,
hr {
  margin: 0 0 2rem 0;
}

ul {
  padding-left: 0rem;
  list-style: none;
  text-wrap: balance;
}

strong {
  font-weight: 700;
}

blockquote {
  margin: 0 0 2rem 2rem;
}

h3 {
  font-size: 1rem;
  margin-bottom: 0;
}

@media (min-width: 54rem) {
  section {
    display: grid;
    grid-template-columns: 0 1fr;
  }

  section > h3,
  section > h2 {
    color: var(--color-margin);
    width: 10rem;
    transform: translateX(-11rem);
    text-align: right;
    align-self: start;
    overflow: visible;
    font-style: italic;
  }

  section > h2 {
    width: 9rem;
    height: calc(100% - 2rem);
    border-right: var(--line-thickness) solid var(--color-margin);
    padding-right: 1rem;
    margin: 0;
  }
}

section > h3,
section > h3 a {
  color: var(--color-margin);
  font-weight: normal;
  text-decoration: none;
}

nav {
  margin-bottom: 2rem;
}

a {
  color: var(--color-link);
  text-decoration: underline;
  text-underline-offset: 0.4rem;
  text-decoration-thickness: 0.2rem;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 0.35rem;
  text-decoration-thickness: 0.3rem;
}

section > h3 a:hover {
  text-underline-offset: 0.4rem;
  text-decoration-thickness: 0.1rem;
}

math {
  font-family: var(--font-math);
}

img {
  max-width: 100%;
  height: auto;
}
