/* Imports */
@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400..700;1,400..700&family=Pirata+One&display=swap');
@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400..800;1,400..800&display=swap');

/* Settings */
:root {
    --color-dark: #1b1d1c;
    --color-light: #fafafa;
    --color-primary: #ea1821;
    --size-step-0: clamp(1rem, 1.5vw, 1.5rem);
    --size-step-1: clamp(1.25rem, 2vw, 2.4rem);
    --size-step-2: clamp(1.5rem, 2.5vw, 2.8rem);
    --size-step-3: clamp(1.75rem, 3vw, 3.2rem);
    --size-step-4: clamp(2rem, 4vw, 3.6vw);
    --size-step-5: clamp(2.25rem, 5vw, 4rem);
    --spacing: clamp(1rem, 2.5vw, 2rem);
    --background-color: #1d1d1f;
    --background-text-color: #e3e3e3;
    --foreground-color: #292a2d;
    --foreground-text-color: #e8eaed;
    --link-color: #8ab4f8;

    --fonts-heading: 'Pirata One', system-ui;
    --fonts-body: 'Lora', serif;
}

/* HTML Styles */
body {
    background: var(--background-color);
    color: var(--foreground-text-color);
    padding: var(--spacing);
    padding-top: 0;
    font-family: var(--fonts-body);
    font-size: var(--size-step-0);
    line-height: 1.3;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
}

* {
    box-sizing: border-box;
}

header,
main,
footer {
    width: 100%;
}

header {
  padding-bottom: var(--spacing);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-family: var(--fonts-heading);
  position: sticky;
  top: 0;
  padding: var(--spacing) 0 calc(var(--spacing) / 1.5);
  z-index: 1;
  background-color: var(--background-color);
}

@media screen and (min-width: 600px) {
  header {
    flex-direction: row;
    gap: var(--spacing);
  }
}

main {
  max-width: 64ch;
  flex: 1;
  padding-bottom: calc(var(--spacing) * 2);
}

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

a:hover {
  text-decoration: underline;
  text-decoration-color: var(--foreground-text-color);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
  border: calc(var(--spacing) / 4) solid var(--color-dark);
}

h1,
h2,
h3,
h4,
h5 {
  font-weight: 400;
  line-height: 1;
  text-wrap: balance;
  font-family: var(--fonts-heading);
}

h1 {
  font-size: var(--size-step-4);
}

h2 {
  font-size: var(--size-step-4);
}

h3 {
  font-size: var(--size-step-3);
}

h4 {
  font-size: var(--size-step-2);
}

h5 {
  font-size: var(--size-step-1);
}

p,
ul,
ol,
blockquote,
.highlight {
  max-width: 64ch;
}

ul,
ol {
  -webkit-padding-start: var(--spacing);
  padding-inline-start: var(--spacing);
}

li {
  --flow-space: var(--spacing);
  margin-block-start: var(--flow-space, var(--spacing));
}

blockquote {
  -webkit-padding-start: var(--spacing);
  padding-inline-start: var(--spacing);
  -webkit-border-start: 0.3em solid;
  border-inline-start: 0.3em solid;
  font-style: italic;
  font-size: var(--size-step-1);
}

/* Line
lengths */
main,
header,
footer {
  margin-inline: auto;
}

blockquote {
  max-width: 50ch;
}

h1 {
  max-width: 32ch;
}

h2,
h3 {
  max-width: 36ch;
}

/* Bear Content */
.title {
  text-decoration: none;
}

.title h1 {
  font-size: var(--size-step-5);
  color: var(--color-light);
  margin: 0;
  white-space: nowrap;
  line-height: 1;
}

nav p {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing);
  row-gap: 0;
  font-size: var(--size-step-5);
  margin: 0;
  line-height: 0.9;
}

nav p a {
  line-height: 1;
}

ul.blog-posts {
  list-style-type: none;
  padding: unset;
}

time {
  opacity: 0.5;
  font-style: normal;
}

ul.blog-posts li {
  display: flex;
  flex-direction: column;
  font-size: var(--size-step-3);
  font-family: var(--fonts-heading);
}

@media screen and (min-width: 600px) {
  ul.blog-posts li {
    flex-direction: row;
    gap: calc(var(--spacing) / 2);
  }
}

ul.blog-posts li span {
  min-width: 11ch;
}

.highlight {
  padding: 1px var(--spacing);
  background-color: rgba(0, 0, 0, 0.1);
  overflow-x: auto;
  line-height: 1;
}

button {
  background-image: none;
  background-color: var(--color-primary);
  color: var(--color-light);
  border: none;
  padding: calc(var(--spacing) / 4) calc(var(--spacing) / 2);
  font-size: var(--size-step-0);
  font-family: var(--fonts-heading);
  cursor: pointer;
}

table {
  width: 100%;
}

th {
  text-align: left;
}

/* Extras */
.greenwall {
    font-family: "EB Garamond", serif;
    font-optical-sizing: auto;
    font-weight: 600;
    font-size: var(--size-step-2);
    color: #e3ab01;
}
