:root {
  --color-primary: #705D00; /* Aged gold */
  --color-bg-primary: #F8F8F6; /* Ablaster */
  --color-bg-accent: #FBF3E3;
  --color-text: #1C1C1E; /* Iron ink */
  --color-parchment: #E9E2D2; /* I wan't inspired for the variable name */
  --color-primary-lower: #8E8B82; /* I need help with naming please */
  --color-success: #3E533B;
  --color-error: #8C3A3A;

  --easing: cubic-bezier(0.65, 0, 0.35, 1);
}

@font-face {
  font-family: "Newsreader";
  src: 
    url("/fonts/Newsreader/ttf/Newsreaders.ttf") format("ttf-variations"),
    url("/fonts/Newsreader/woff/Newsreader.woff") format("woff-variations"),
    url("/fonts/Newsreader/woff2/Newsreader.woff2") format("woff2-variations");
  font-weight: 125 950;
  font-stretch: 75% 125%;
  font-style: normal;
}

@font-face {
  font-family: "Newsreader";
  src: 
    url("/fonts/Newsreader/ttf/Newsreaders-Italic.ttf") format("ttf-variations"),
    url("/fonts/Newsreader/woff/Newsreader-Italic.woff") format("woff-variations"),
    url("/fonts/Newsreader/woff2/Newsreader-Italic.woff2") format("woff2-variations");
  font-weight: 125 950;
  font-stretch: 75% 125%;
  font-style: italic;
}

@font-face {
  font-family: "JetBrainsMono";
  src:
    url("/fonts/JetBrainsMono/JetBrainsMono.ttf") format("ttf-variations"),
    url("/fonts/JetBrainsMono/JetBrainsMono.woff2") format("woff2-variations");
  font-weight: 125 900;
  font-stretch: 50% 150%;
  font-style: normal;
}

@font-face {
  font-family: "JetBrainsMono";
  src:
    url("/fonts/JetBrainsMono/JetBrainsMono-Italic.ttf") format("ttf-variations"),
    url("/fonts/JetBrainsMono/JetBrainsMono-Italic.woff2") format("woff2-variations");
  font-weight: 125 900;
  font-stretch: 50% 150%;
  font-style: italic;
}

@font-face {
  font-family: "LiberationSerif";
  src:
    url("/fonts/LiberationSerif/LiberationSerif.ttf"),
    url("/fonts/LiberationSerif/LiberationSerif.woff2");
  font-weight: 500;
  font-style: normal;
}

* {
  box-sizing: border-box;
}

html {
  background-color: var(--color-bg-primary);
  color: var(--color-text);
  font-size: clamp(18px, 1.2vw, 22px);
}

body {
  font-family: "Newsreader";
  line-height: 1.6;
}

main {
  width: 100%;
  padding: clamp(10px, 5vw, 2rem);
  margin: auto;
}

section {
  margin-block-end: 2.5rem;
  box-sizing: border-box;
}

h1, h2 {
  margin-bottom: 1rem;
  line-height: 1.2;
}

h3, h4 {
  margin-bottom: 0.2rem;
}

h5, h6 {
  margin-bottom: 0.1rem;
}

h1 {
  font-size: clamp(2.6rem, 5vw, 3.5rem);
  font-weight: 500;
}

h2 {
  font-size: clamp(2rem, 3vw, 2.5rem);
  font-weight: 450;
}

h3 {
  font-size: clamp(1.25rem, 2vw, 2rem);
  font-weight: 400;
}

h4 {
  font-size: clamp(1.25rem, 2vw, 2rem);
  font-style: italic;
  font-weight: 350;
}

h5 {
  font-size: clamp(1.1rem, 1.5vw, 1.4rem);
  font-weight: 400;
  text-transform: uppercase;
}

h6 {
  font-size: clamp(1.1rem, 1.5vw, 1.4rem);
  font-weight: 350;
  font-style: italic;
}

p {
  margin-bottom: 1rem;
}

hr {
  height: 1px;
  background: linear-gradient(
    to left,
    transparent 0%,
    var(--color-primary) 20%,
    var(--color-primary) 80%,
    transparent 100%
  );
  width: 100%;
  border: none;
  margin: 2.5rem auto;
  opacity: 60%;
}

div:has(> blockquote) {
  border-left: 1px solid var(--color-primary);
  background-color: var(--color-bg-accent);
  padding: 1.5rem 2rem 1.5rem 3rem;
  margin: 1.5rem auto 2rem;
  width: 100%;
}

blockquote {
  font-style: italic;
  font-size: 1.2rem;
  margin-bottom: 1.4rem;
  position: relative;
}

blockquote:before {
  content: "“";
  font-family: "LiberationSerif";
  font-size: 4rem;
  color: var(--color-primary);
  opacity: 20%;
  position: absolute;
  left: -2.5rem;
  top: -1rem;
  line-height: 1;
}

div:has(> blockquote) cite {
  color: var(--color-primary);
  opacity: 60%;
  text-transform: uppercase;
  font-family: "JetBrainsMono";
  font-style: italic;
  font-size: 1rem;
  margin-top: 1rem;
}

div:has(> blockquote) cite:before {
  content: "-";
  margin-right: 0.5rem;
}

ol, ul, menu {
  padding-left: 3rch;
  margin-bottom: 1rem;
}

ol {
  list-style-type: lower-roman;
}

ul, menu {
  list-style-type: "✧";
}

ol li, ul li, menu li {
  padding-left: 0.5rem; 
}

ol li::marker {
  color: var(--color-primary);
  font-style: italic;
}

ul li::marker, menu li::marker {
  color: var(--color-primary);
}

dl {
  margin-bottom: 1rem;
}

dl dt {
  font-weight: 600;
  letter-spacing: 0.1rch;
}

dl dt:before {
  content: "✧";
  color: var(--color-primary);
  padding: 0 0.5rem;
  margin-right: 0.5rem;
  opacity: 80%;
  position: relative;
  top: 1px;
}

dl dd {
  padding-left: 2rem;
  margin-bottom: 0.5rem;
}

figure {
  text-align: center;
  margin-bottom: 1rem;
}

figure img {
  border: 0.25rem solid var(--color-parchment);
}

figcaption {
  font-style: italic;
  color: var(--color-primary-lower);
}

a {
  color: var(--color-primary);
  position: relative;
  transition: color 0.4s var(--easing);
}

a:hover {
  cursor: pointer;
  color: oklch(from var(--color-primary) calc(l + 0.2) c h );
}

abbr {
  color: var(--color-primary);
}

b, strong {
  font-weight: 650;
}

em {
  text-decoration-line: underline;
  text-decoration-color: var(--color-primary);
}

i {
  font-style: italic;
}

code, pre:has(>code) {
  background-color: var(--color-bg-accent);
  border: 1px solid oklch(from var(--color-bg-accent) calc(l - 0.2) c h);
  padding: 0.2rem;
}

pre code {
  background-color: none;
  padding: 0;
  border: none;
}

mark {
  background-color: var(--color-bg-accent);
  padding: 0.2rem;
}

samp, var {
  font-family: "JetBrainsMono";
  font-weight: 450;
}

small {
  font-size: 0.6rem;
  font-family: "JetBrainsMono";
}

sub {
  vertical-align: sub;
}

sup {
  vertical-align: super;
}

u, s {
  text-decoration-color: oklch(from var(--color-primary) calc(l + 0.2) c h);
}

del {
  padding: 0 0.1rem;
  background-color: oklch(from var(--color-success) calc(l + 0.2) calc(c + 0.1) h);
}

ins {
  padding: 0 0.1rem;
  background-color: oklch(from var(--color-error) calc(l + 0.2) calc(c + 0.1) h);
}

table {
  padding: 0.5rem 0;
  width: 100%;
  margin: 1rem 0;
}

thead {
  border-bottom: 1px solid oklch(from var(--color-primary) l c h / 0.6);
  padding: 0.5rem 0;
}

thead tr {
  color: var(--color-primary);
  font-style: italic;
}

tbody tr {
  border-bottom: 1px solid oklch(from var(--color-primary) l c h / 0.2);
}

th, td {
  padding: 0.6rem 1rem 0.4rem;
  text-align: left;
}

@media (min-width: 320px) {
  main {
    width: clamp(320px, 80vw, 920px);
  }
}

