:root {
  --page-width: 1072px;
  --page-top: 128px;
  --content-width: 640px;
  --page-bottom: 48px;

  --font-heading: "Lexend", sans-serif;
  --font-text: "Inter", sans-serif;;
  --font-cursive: "Metal", serif;

  --footer-height: 48px; 
}

[data-theme='light'] {
  --background-color: #f1f1f1;
  --text-color: #333;
}

[data-theme='dark'] {
  --background-color: #1a1a1a;
  --text-color: #ffffff;
}

body {
  min-height: 100vh;
  text-rendering: optimizeLegibility;
  background-color: var(--background-color);
  color: var(--text-color);
  font-family: var(--font-text);
  letter-spacing: -0.5px;
  line-height: 1.4;
  font-weight: 400;
  font-size: 16px;
  font-optical-sizing: auto;
  transition: color ease-in-out 0.2s;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}


i, em {
  font-family: var(--font-cursive);
  font-size: 19.3px;
}

/* main content at the center */
.main-area>* {
  grid-column: 2;
  grid-column-start: 2;
  grid-column-end: auto;
}

/* font adjustments */
/* - dpi adjust */
/* Scale up font size for high pixel density screens */
@media screen and (min-resolution: 2dppx),
screen and (-webkit-min-device-pixel-ratio: 2) {
  html {
    font-size: 110%;
  }
}

/* Slightly reduce font size for smaller screens */
@media (max-width: 768px) {
  html {
    font-size: 90%;
  }
}

/* Text alignment and spacing */
p,
li {
  line-height: 28px;
  letter-spacing: normal;
  margin-bottom: 28px;
}

/* Headings */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 400;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
  letter-spacing: 0.03em;
  word-spacing: normal;
  line-height: 1.1;
}

a {
  text-decoration: none;
  color: color-mix(in srgb, var(--text-color) 60%, var(--background-color) 20%);
  cursor: pointer;
  border-bottom: 1px solid color-mix(in srgb, var(--text-color) 40%, var(--background-color) 10%);
  transition: all ease-in-out 0.2s;
}

a.black {
  color: color-mix(in srgb, var(--text-color) 60%, rgb(255, 94, 0) 20%);
}

a:hover {
  color: var(--text-color);
  border-bottom: 1px solid var(--text-color);
}