:root {
  /* Font families */
  --main-font: 'EB Garamond', Georgia, 'Times New Roman', Times, serif;
  --main-font: Georgia, 'Times New Roman', Times, serif;
  --secondary-font: system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Avenir, Helvetica, Arial, sans-serif;
  --font-monospace: ui-monospace, monospace;

  /* Colors */
  --bg-color: #e8ddd0;
  --bg-color: #f2ede7;
  --bg-color: #faf9f5;
  --bg-sunk: rgb(232, 232, 225);
  --bg-sunk: #efede7;
  --bg-light-color: #ddcebb;
  --bg-dark-color: #223144;

  --rule: #cdb598;
  --rule-soft: #c9c5bc;
  --shadow-color: rgba(0, 0, 0, 0.05);

  --ink: #1a1a1a;
  --ink-soft: rgb(111, 111, 111);
  --ink-faint: rgb(154, 150, 142);

  --base-color: #324a67;
  --secondary-color: #223144;
  --muted-color: #666;
  --accent-color: #ab5854;
  --accent-hover: #7a3b2e;
  --accent-muted-color: #a97a78;
  --title-color: #2d2d2d;
  --light-color: #eee6dd;

  /* Font sizes */
  --text-3xl: 2.625rem;
  --text-2xl: 2.125rem;
  --text-xl: 1.625rem;
  --text-lg: 1.5rem;
  --text-sml: 1.313rem;
  --text-ml: 1.25rem;
  --text-md: 1.088rem;
  --text-smd: 0.939rem;
  --text-sm: 0.875rem;
  --text-xs: 0.833rem;
  --text-xxs: 0.75rem;

  --text-line-height: 1.75;

  --space-xs: 0.313rem;
  --space-xsm: 0.675rem;
  --space-sm: 0.875rem;
  --space-md: 1.125rem;
  --space-lg: 1.2rem;
  --space-xl: 1.5rem;
  --space-sxl: 1.75rem;
  --space-mxl: 2rem;
  --space-xxl: 2.5rem;
  --space-xxxl: 4rem;
  --space-3xl: 80px;

  --border-radius: 4px;
  --step-number-width: 40px;
  --container-max-width: 820px;
  --container-medium-width: 540px;

  --letter-spacing-condensed: -0.01em;
  --letter-spacing-light: 0.02em;
  --letter-spacing-subtle: 0.12em;
  --letter-spacing-gap: 0.12em;
  --letter-spacing-large: 0.2em;

  --line-height-s: 1.65;
}

* { box-sizing: border-box; padding: 0; margin: 0; }
html {
  height: 100%;
  min-height: 100%;
  line-height: var(--text-line-height);
}

body {
  height: 100%;
  background-color: var(--bg-color);
  color: var(--base-color);
  font-family: var(--main-font);
  font-size: var(--text-md);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "liga", "kern";
}

h1,h2,h3,h4,h5,h6 { font-weight: 500; margin: var(--space-mxl) 0 var(--space-sm); color: var(--secondary-color); line-height: 1.25; letter-spacing: var(--letter-spacing-condensed); }
h1 { font-size: var(--text-3xl); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-sml); }
h5 { font-size: var(--text-smd); text-transform: uppercase; color: var(--ink-soft); letter-spacing: .14em; }
h6 { font-size: var(--text-xs); text-transform: uppercase; font-style: italic; color: var(--ink-faint); letter-spacing: .18em; }

p {
  margin-top: -4px;
  margin-bottom: 18px;
  color: var(--ink);
  line-height: 2em;
}

a { color: var(--accent-color); text-decoration: none;  }

strong, b { font-weight: 600; color: var(--ink); }
em, i { font-style: italic; }

small {
  font-size: var(--text-sm);
  color: var(--ink-faint);
  letter-spacing: var(--letter-spacing-light);
}

p code, li code, td code, dd code {
  background: var(--bg-sunk);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--accent-color);
  font-family: var(--font-monospace);
  font-size: var(--text-smd);
  letter-spacing: var(--letter-spacing-condensed);
}

blockquote {
  margin: var(--space-sxl) 0; 
  padding: var(--space-xs) 0 var(--space-xs) var(--space-sxl);

  border-left: 1px solid var(--rule);
  color: var(--ink-soft);
  font-style: italic;
  font-size: var(--text-md);
  line-height: 1.5;
}

blockquote cite {
  display: flex;
  align-items: center;
  margin-top: var(--space-sm);
  font-size: var(--text-smd);
  font-style: normal;
  color: var(--ink-faint);
  letter-spacing: .04em;
}
blockquote cite:before {
  content: "";
  display: block;
  width: var(--space-sm);
  height: 1px;
  background-color: var(--rule);
  margin-right: var(--space-xs);
}

mark {
  background: #ede3c9;
  color: var(--ink);
  padding: 2px 6px;
  border-radius: 4px;
}

del, s {
  text-decoration: line-through;
  text-decoration-color: currentcolor;
  text-decoration-color: var(--ink-faint);
  color: var(--ink-faint);
}

ins {
  text-decoration: none;
  background: #ecddb2;
  padding: 0 2px;
}

abbr {
  border-bottom: 2px dotted var(--ink-faint);
  text-decoration: none;
  cursor: help;
  padding-bottom: 2px;
}

kbd {
  display: inline-block;
  padding: 1px 7px;
  border: 1px solid var(--rule);
  border-bottom-width: 2px;
  border-radius: 3px;
  background: var(----bg-color);
  font-size: var(--text-sm);
  color: var(--ink);
  line-height: 1.4;
  vertical-align: 1px;
  font-family: var(--font-monospace);
}

time {
  font-family: var(--font-monospace);
  font-size: var(--text-sm);
  color: var(--ink-faint)
}

ul, ol {
  margin: var(--space-sm) 0 var(--space-lg) 1.3em;
  color: var(--ink);
}

ul {
  list-style: none;
}

ul li {
  padding-left: 0;
  display: flex;
  align-items: center;
}

ul li::before {
  content: "—";
  width: var(--space-xl);
  color: var(--ink-faint);
}

ol {
  list-style: none;
  counter-reset: ol;
}

ol li {
  counter-increment: ol;
  display: flex;
  align-items: center;
}

ol li::before {
  content: counter(ol, upper-roman) ".";
  font-family: var(--font-monospace);
  font-size: var(--text-xxs);
  color: var(--ink-faint);
  letter-spacing: .05em;
  width: var(--space-mxl);

  /* margin-left: calc(var(--space-mxl) * -1); */
}

dl {
  margin: var(--space-sm) 0 var(--space-md);
}

dl > div {
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: var(--space-xl);
  align-items: baseline;
}

dl > div:last-child {
  border-bottom: none;
}

dt {
  font-size: var(--text-xs);
  letter-spacing: var(--letter-spacing-gap);
  text-transform: uppercase;
  color: var(--ink-faint);
}

dd {
  color: var(--ink-soft);
  font-size: var(--text-md);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-smd);
}

table caption {
  text-align: left;
  font-style: italic;
  color: var(--ink-faint);
  font-size: var(--text-xs);
  letter-spacing: var(--letter-spacing-subtle);
  text-transform: uppercase;
  padding-bottom: var(--space-sm);
}

thead th {
  text-align: left;
  font-weight: 500;
  font-size: var(--text-xs);
  letter-spacing: var(--letter-spacing-gap);
  text-transform: uppercase;
  color: var(--ink-faint);
  padding: var(--space-xsm) var(--space-sm) var(--space-xsm) 0;
  border-bottom: 1px solid var(--ink);
}
tbody td {
  padding: var(--space-sm) var(--space-sm) var(--space-sm) 0;
  border-bottom: 1px solid var(--rule);
  color: var(--ink-soft);
  vertical-align: top;
}

tbody td:first-child {
  color: var(--ink);
}

tfoot td {
  padding: var(--space-sm) var(--space-sm) var(--space-xs) 0;
  font-size: var(--text-xs);
  color: var(--ink-faint);
  font-style: italic;
  border-top: 1px solid var(--ink);
}

figure {
  margin: var(--space-xl) 0;
  text-align: center;
}

figcaption {
  margin-top: var(--space-sm);
  font-size: var(--text-sm);
  color: var(--ink-faint);
  font-style: italic;
  letter-spacing: var(--letter-spacing-light);
}

figure .placeholder {
  aspect-ratio: 16 / 9;
  background: var(--bg-sunk);
  border: 1px solid var(--rule-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-faint);
  font-style: italic;
  font-size: var--(text-sm);
  letter-spacing: .1em;
  text-transform: uppercase;
}

aside {
  background: var(--bg-sunk);
  padding: var(--space-sxl) var(--space-mxl);
  margin: var(--space-sxl) 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  font-size: var(--text-smd);
  color: var(--ink-soft);
  line-height: 1.55;
}

aside div:first-of-type {
  font-size: var(--text-xxs);
  letter-spacing: var(--letter-spacing-large);
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: var(--space-xsm);
}

address {
  font-style: normal;
  font-size: var(--text-smd);
  color: var(--ink-soft);
  padding: var(--space-lg) var(--space-xl);
  border-left: 1px solid var(--rule);
  margin: var(--space-lg) 0 var(--space-sxl);
  line-height: var(--line-height-s);
}

address strong {
  display: block;
  margin-bottom: var(--space-xs);
}

pre {
  background: var(--bg-sunk);
  border: 1px solid var(--rule---rule-soft);
  border-left: 2px solid var(--ink);
  padding: var(--space-lg) var(--space-xl);
  margin: var(--space-lg) 0 var(--space-sxl);
  overflow-x: auto;
  font-size: var(--text-xs);
  line-height: var(--line-height-s);
  color: var(--ink);
}

pre code {
  background: transparent;
  padding: 0;
  color: inherit;
  font-size: inherit;
}

button {
  font-family: inherit;
  font-size: var(--text-sm);
  padding: var(--space-xsm) var(--space-lg);
  cursor: pointer;
  border: 1px solid transparent;
  letter-spacing: .02em;
  transition: background .2s, color .2s, border-color .2s;
  background: transparent;
  color: inherit;
}

button[data-level="primary"] {
  background: var(--ink);
  color: var(--bg-color);
}
button[data-level="primary"]:hover { background: var(--accent-color); }

button[data-level="secondary"] {
  border: 1px solid var(--ink); color: var(--ink);
}
button[data-level="secondary"]:hover { background: var(--ink); color: var(--bg-color); }

button[data-level="tertiary"] {
    padding: var(--space-xsm) 0;
    border: none;
    border-bottom: 1px solid var(--rule);
    color: var(--ink-soft);
    font-style: italic;
}
button[data-level="tertiary"]:hover { color: var(--accent-color); border-color: var(--ink); }

button:disabled {
  opacity: .4; cursor: not-allowed;
}

progress, meter {
  width: 100%;
  height: 2px;
  appearance: none;
  -webkit-appearance: none;
  border: none;
  background: var(--rule);
  display: block;
}
progress::-webkit-progress-bar, meter::-webkit-meter-bar { background: var(--rule); height: 2px; }
progress::-webkit-progress-value { background: var(--ink); }
progress::-moz-progress-bar { background: var(--ink); }
meter::-webkit-meter-optimum-value { background: var(--ink); }
meter::-moz-meter-bar { background: var(--ink); }

details {
  border-bottom: 1px solid var(--rule);
  padding: var(--space-md) 0;
}
details:first-of-type { border-top: 1px solid var(--rule); }
summary {
  cursor: pointer;
  list-style: none;
  font-size: var(--text-md);
  color: var(--ink);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  transition: color .2s;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+";
  font-family: var(--font-monospace);
  font-size: var(--text-md);
  color: var(--ink-faint);
  transition: transform .3s, color .2s;
}
details[open] summary::after { content: "–"; color: var(--accent); }
summary:hover { color: var(--accent); }
details p {
  padding: var(--space-md) 0 var(--space-xs);
  color: var(--ink-soft);
  font-size: var(--text-smd);
  line-height: var(--line-height-s);
}
/****************************** Custom class **************************************/

.flex { display: flex; }
.flex-column { display: flex; flex-direction: column; }

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin: var(--space-md) 0 var(--space-xl);
  align-items: center;
}


/****************************** Home page **************************************/

body > section {
  display: flex;
  height: 80vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: auto;
  text-align: center;

  width: 100%;
  max-width: 550px;
}

body > section h1 {
  font-size: 2rem;
  line-height: 1.25;
}
body > section p {
  font-size: 1rem;
  margin: 0 0 var(--space-lg);
  color: var(--base-color);
  line-height: 1.75em;
}

body > section small {
  font-size: var(--text-xs);
}



/****************************** Header **************************************/
body > header {
  padding: var(--space-xxl) var(--space-xxl) var(--space-md);
  max-width: var(--container-max-width);
  margin: auto;

  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-md);
  
  height: 90px;
}

body > header a {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  gap: var(--space-md);

  text-decoration: none;
  color: var(--base-color);
  letter-spacing: .03em;

  font-size: 1.1rem;
}

body > header nav {
  display: flex;
  flex-direction: row;
  gap: var(--space-xxl);
}
body > header nav a {
  /* font-size: var(--text-sm); */
  font-weight: 100;
  font-size: .95rem;
  color: var(--ink-soft);
}
body > header nav a:hover {
  color: var(--accent-hover);
}

/****************************** Footer **************************************/
footer {
  border-top: 1px solid var(--rule);
  padding: var(--space-xxl) 0 var(--space-xxxl);
  text-align: center;
  font-size: var(--text-sm);
  color: var(--ink-faint);
}
footer p {
  font-size: var(--text-sm);
  color: var(--ink-faint);
}

/****************************** Article header **************************************/

article header {
  padding: 110px 0 80px;
}
article hgroup {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 25px;
}
article header h1 {
  margin: 0;
}
article header hr {
  margin: auto;
}
article header p {
  font-size: var(--text-ml);
  font-style: italic;
  color: var(--ink-soft);
  font-weight: 100;
  max-width: var(--container-medium-width);
  margin: auto;
}
article header time {
  text-transform: uppercase;
  font-size: var(--text-xxs);
}

/****************************** Article table of contents **************************************/
article + nav {
  max-width: 600px;
  margin: auto;
}
article + nav ol {
  margin: auto;
  padding: 0 0 20px;
  columns: 2;
  column-gap: 40px;
  counter-reset: listCounter;
  list-style: none;
  font-family: var(--font-monospace);
  font-size: var(--text-xxs);
}
article + nav ol li {
  margin-bottom: 6px;
  break-inside: avoid;
  padding-left: 0;
  counter-increment: listCounter;
  display: block;
}
article + nav ol li::before {
  content: counters(listCounter, ".", upper-roman) " ";
  width: auto;
  letter-spacing: 0;
}

article + nav ol li a {
  color: var(--ink-soft);
}

/****************************** Page section **************************************/

main section {
  border-top: 1px solid var(--rule);
  padding: var(--space-xxxl) 0;
}

main section > h2:first-of-type {
  margin: 0 0 var(--space-md);
  color: var(--ink);
  font-size: var(--text-xxs);
  text-transform: uppercase;
  letter-spacing: .18em;
  text-align: center;
}

main section a {
  color: inherit;
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--rule);
  transition: border-color .2s, color .2s;
}
main section a[rel="external"]:after {
  content: " ↗";
  color: var(--ink-faint);
}

main section hr {
  margin: var(--space-xxl) auto;
}

main section article {
  display: flex;
  gap: var(--space-sxl);
}
main section article h2 {
  font-style: italic;
  font-weight: 400;
  font-size: var(--text-sml);
  display: inline;
  margin: 0;
}
main section article time {
  color: var(--ink);
}

/****************************** Article section **************************************/

main {
  margin: auto;
  padding: 0 var(--space-xxl);
  width: 100%;
  max-width: var(--container-max-width);
}


hr { 
  border: none;
  border-top: 1px solid var(--rule);
  width: var(--space-xxl);
  margin: 0 auto var(--space-lg);
}

cursor {
  position: fixed;
  pointer-events: none;
  z-index: 10;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255,255,255,0.85);
  transform: translate(-50%, -50%);
  mix-blend-mode: difference;
  backdrop-filter: blur(130px);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
  top: 50%;
  left: 50%;
  transition: 0.1s;
}

#background {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background-color: transparent;
  background-position: top;
  background-repeat: no-repeat;
  background-size: cover;
  z-index: -1;
  opacity: 0.1;
}