/* Nord Color Palette */
:root {
  /* Polar Night */
  --nord0: #2e3440;
  --nord1: #3b4252;
  --nord2: #434c5e;
  --nord3: #4c566a;
  
  /* Snow Storm */
  --nord4: #d8dee9;
  --nord5: #e5e9f0;
  --nord6: #eceff4;
  
  /* Frost */
  --nord7: #8fbcbb;
  --nord8: #88c0d0;
  --nord9: #81a1c1;
  --nord10: #5e81ac;
  
  /* Aurora */
  --nord11: #bf616a; /* Red */
  --nord12: #d08770; /* Orange */
  --nord13: #ebcb8b; /* Yellow */
  --nord14: #a3be8c; /* Green */
  --nord15: #b48ead; /* Purple */

  /* Sizes */
  --content-width: 800px;
  --header-height: 6rem;
  --footer-height: 6rem;

  /* Topography */
  --serif-font-families: Baskerville, serif;
  --sans-serif-font-families: Oxygen, sans-serif;
  --monospace-font-families: "SF Mono", Monaco, "Cascadia Code", monospace;
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-weight: 100;
}

html {
  font-size: 22px;
  line-height: 1.6;
}

body {
  font-family: var(--serif-font-families);
  background-color: var(--nord0);
  color: var(--nord4);
  display: flex;
  flex-direction: column;
}

/***************************************************************************************
 *                                   Core Elements                                     *
 ***************************************************************************************/
a {
  font-family: var(--sans-serif-font-families);
  color: var(--nord8);
  text-decoration: none;
  transition: color 0.2s ease;
}
a:hover {
  color: var(--nord7);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--sans-serif-font-families);
  color: var(--nord6);
  margin-top: 2rem;
  margin-bottom: 1rem;
  line-height: 1.3;
  scroll-margin-top: calc(var(--header-height) + 1rem);
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }

p {
  margin-bottom: 1rem;
}

/* Code */
code {

  font-family: var(--monospace-font-families);
  background-color: var(--nord1);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.9em;
}

pre {
  background-color: var(--nord1);
  padding: 1rem;
  border-radius: 6px;
  overflow-x: auto;
  margin-bottom: 1rem;
}

pre code {
  background: none;
  padding: 0;
}

/* Lists */
ul, ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

ul {
  list-style: none;
}

ul > li::before {
  content: "–";
  position: absolute;
  left: -1rem;
}

li {
  margin-bottom: 0.25rem;
  position: relative;
}

/* Blockquote */
blockquote {
  border-left: 3px solid var(--nord9);
  padding-left: 1rem;
  margin: 1rem 0;
  color: var(--nord7);
}
blockquote > :last-child {
  margin-bottom: 0;
  padding-bottom: 0;
}

/* Images */
img {
  max-width: 100%;
  height: auto;
}


/***************************************************************************************
 *                                      Utilities                                      *
 ***************************************************************************************/
.error-text {
  color: var(--nord11);
}

.warning-text {
  color: var(--nord12);
}

.success-text {
  color: var(--nord14);
}

.horizontally-centered {
  display: flex;
  width: 100%;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100%;
}


/***************************************************************************************
 *                                      Sections                                       *
 ***************************************************************************************/

/* Header */
.nav-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: var(--nord0);
  max-width: var(--content-width);
  height: var(--header-height);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  z-index: 100;
}

.nav-title {
  font-size: 1.25rem;
  color: var(--nord6);
  flex-grow: 1;
}

/* Main Content */
.content {
  display: flex;
  flex-direction: column;
  justify-content: start;
  align-items: start;
  max-width: var(--content-width);
  width: 100%;
  min-height: calc(100vh - var(--header-height) - var(--footer-height));
  margin: 0 auto;
  padding: 2rem 1.5rem;
  padding-top: calc(var(--header-height) + 2rem);
  padding-bottom: calc(var(--footer-height) + 2rem);
}


/* Footer */
.site-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--footer-height);
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: var(--nord0);
  color: var(--nord3);
  font-size: 0.875rem;
  z-index: 100;
}

/* Post List */
.post-list {
  list-style: none;
  padding: 0;
}

.post-list li {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--nord2);
}

.post-list li:last-child {
  border-bottom: none;
}

.post-meta {
  color: var(--nord3);
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
}

.post-title {
  font-size: 1.25rem;
  margin: 0;
}

/* 404 Page */
.error-page {
  height: 100%;
  text-align: center;
}


/* Footnotes */
.footnotes {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--nord3);
  font-size: 0.9rem;
  color: var(--nord4);
}

.footnotes ol {
  padding-left: 1.5rem;
}

.footnotes li {
  margin-bottom: 0.5rem;
}