/* RESET */

/**
 * Eric Meyer's Reset Stylesheet
 *
 * v2.0
 * 2011-01-26
 * Author: Eric Meyer - http://meyerweb.com/eric/tools/css/reset/
 */

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
  display: block;
}
body {
  line-height: 1;
}
ol, ul {
  list-style: none;
}
blockquote, q {
  quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
  content: '';
  content: none;
}
table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* LAYOUT */

body > header, body > footer, body > main {
  max-width: 40rem;
  width:96%;
  margin: 0 auto;
}

/* STYLE */

/* global */

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 18px;
}

body {
  /* https://github.com/system-fonts/modern-font-stacks#transitional */
  font-family: Helvetica, sans-serif;
  border-top: 0;
}

em {
  font-style: italic;
}

a {
  text-decoration: underline;
}

h1 a {
  text-decoration: none;
}

h1 a:hover {
  text-decoration: underline;
}

/* site header */

body > header {
  margin-top: 0.5rem;
  margin-bottom: 3rem;
  display: flex;
  gap: 1rem;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
}

body > header h1, body > header nav, body > header ul {
  margin: 0;
}

body > header nav a {
  font-size: 1rem;
  text-decoration: underline;
}

body > header nav a:hover {
  text-decoration: underline;
}

body > header ul {
  list-style: none;
}

body > header li {
  display: inline;
  margin-right: 0.5rem;
}

body > header h1, body > header {
  font-size: 1.5rem;
}

.site-logo {
  max-height: 2.5rem;
  vertical-align: middle;
  display: inline-block;
}

.light-logo {
  display: inline-block;
}

.dark-logo {
  display: none;
}

@media (prefers-color-scheme: dark) {
  .light-logo {
    display: none;
  }
  
  .dark-logo {
    display: inline-block;
  }
}

/* page list */

.archive li time {
  margin-right: 0.25rem;
  width: 6ch;
  display: inline-block;
}

.archive li {
  margin-bottom: 0.25rem;
}

.archive a:hover {
  text-decoration: underline;
}

h2.archive {
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}

/* breadcrumbs */

.breadcrumbs ul, .breadcrumbs li, .breadcrumbs a, .breadcrumbs h1 {
display: inline
}

.breadcrumbs h1 {
  font-size: 1rem;
}

.breadcrumbs {
  margin-bottom: 1rem;
}

/* articles */

p, ol, ul, a, pre {
  line-height: 1.5;
}

article header h1, article header h1 a {
  line-height: 1.2;
}

article header h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

p, ul, ol, h1, h2, h3, h4, h5, h6, img, iframe, object, article li {
  font-size: 1rem;
  font-weight: normal;
  margin-bottom: 0.2rem;
  word-wrap: break-word;
}

article p {
    margin-bottom: 1.5rem !important;
}

h1 {
  font-size: 1.5rem;
  font-weight: bold;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

h2 {
  font-size: 1.25rem;
  font-weight: bold;
  margin-top: 1.8rem;
  margin-bottom: 1rem;
}

h3 {
  font-size: 1rem;
  margin-top: 1rem;
  margin-bottom: 0.8rem;
  font-weight: bold;
}

h4 {
  font-style: italic;
}

h5 {
  font-weight: bold;
  font-size: 0.5rem;
}

h6 {
  font-style: italic;
  font-size: 0.5rem;
}

img {
  height: auto;
}

img, iframe, object {
  max-width: 99%;
}

iframe {
  display: block;
}

pre {
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
  font-family: monospace;
  padding: 1rem;
  overflow: auto;
  border-radius: 10px;
  border-width: 1px;
}

article li {
  margin-left: 1.25rem;
  font-weight:normal;
  list-style-type: disc;
}

article ul {
  padding-bottom: 0.5rem;
}

article > footer {
  font-size: 0.75rem;
  font-weight: normal;
  margin-top: 1.5rem;
  border-bottom-width: 1px;
  padding-bottom: 0.25rem;
  width: 100%;
}
article {
  margin-bottom: 3rem !important;
}

/* Site footer */

body > footer {
  margin-top: 6rem;
  margin-bottom: 2.5rem;
}

body > footer a {
  text-decoration: underline;
  font-style: italic;
}

body > footer .links li {
  margin-right: 1rem;
}

body > footer .links li {
  display: inline;
}

body > footer .links {
  margin-bottom: 1.5rem;
}

/* COLORS */

:root {
   /* Colors taken from https://tailwindcss.com/docs/colors#default-color-palette-reference with MIT license */

  /* Gray scale */
  --gray-50: #fafafa;
  --gray-100: #f5f5f5;
  --gray-200: #e5e5e5;
  --gray-300: #d4d4d4;
  --gray-400: #a3a3a3;
  --gray-500: #737373;
  --gray-600: #525252;
  --gray-700: #404040;
  --gray-800: #262626;
  --gray-900: #171717;
  --gray-950: #0a0a0a;
  
  /* Orange colors */
  --orange-50: #fff7ed;
  --orange-100: #ffedd5;
  --orange-200: #fed7aa;
  --orange-300: #fdba74;
  --orange-400: #fb923c;
  --orange-500: #f97316;
  --orange-600: #ea580c;
  --orange-700: #c2410c;
  --orange-800: #9a3412;
  --orange-900: #7c2d12;
  --orange-950: #431407;

  
  --blue-50: oklch(97% 0.014 254.604);
  --blue-100: oklch(93.2% 0.032 255.585);
  --blue-200: oklch(88.2% 0.059 254.128);
  --blue-300: oklch(80.9% 0.105 251.813);
  --blue-400: oklch(70.7% 0.165 254.624);
  --blue-500: oklch(62.3% 0.214 259.815);
  --blue-600: oklch(54.6% 0.245 262.881);
  --blue-700: oklch(48.8% 0.243 264.376);
  --blue-800: oklch(42.4% 0.199 265.638);
  --blue-900: oklch(37.9% 0.146 265.522);
  --blue-950: oklch(28.2% 0.091 267.935);
  
  --highlight: var(--orange-400);

  /* Light theme */
  --background: var(--gray-50);
  --background-highlights: var(--gray-100);
  --code-background: var(--gray-800);
  --primary: var(--gray-700);
  --secondary: var(--gray-500);
}

@media (prefers-color-scheme: dark) {
  :root {
    /* Dark theme */
    --background: var(--gray-900);
    --background-highlights: var(--gray-800);
    --primary: var(--gray-300);
    --secondary: var(--gray-400);
  }
}

/* background */
body {
  background-color: var(--background);
}

code {
  color: var(--primary);
  background-color: var(--background-highlights) !important;
}

pre code {
  color: var(--gray-200);
  background-color: var(--code-background) !important;
}

code {
    padding: 2px;
    border-radius: 3px;
}

/* primary */
body > header h1 a,
body > header nav a,
article header h1 a,
h1, h2, h3, h4, h5, h6, p, li,
.archive a {
  color: var(--primary);
}

/* secondary */
article > footer a,
body > footer a,
article > footer,
body > footer a {
  color: var(--secondary);
}
article > footer {
  border-bottom-color: var(--secondary);
}
pre {
  border-color: var(--secondary);
}

/* highlight */
a {
  color: var(--highlight);
}
