@font-face {
  font-family: 'Lora';
  src: url('./fonts/lora/variable/lora-latin-wght-normal.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: 'Geist-Mono';
  src: url('./fonts/geist-mono/variable/geist-mono-latin-ext-wght-normal.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  /* https://github.com/Sequoia-Theme/color-palette/blob/main/palettes.scss */
  color-scheme: light dark;

  --bg: light-dark(#fdf6e3, #0f1014ff);
  --text: light-dark(#1f1f24ff, #e2e4edff);
  --text-muted: #999eb2ff;
  --link: light-dark(#8eb6f5ff, #626983ff);
  --link-visited: light-dark(#8eb6f5ff, #626983ff);
  --link-hover: light-dark(#c58fffff, #7c829dff);
  --link-active: light-dark(#f58ee0ff, #626983ff);
  --border: light-dark(#9898a6ff, #43444dff);
  --button-bg: light-dark(#fdfdfeff, #1f1f24ff);
  --button-text: light-dark(#1f1f24ff, #868690ff);
  --button-hover-bg: light-dark(#ffbb88ff, #575861ff);
  --code-bg: light-dark(#fdfdfeff, #1a1b1fff);
  --code-text: light-dark(#0f1014ff, #868690ff);
}

/*base page styles*/
body {
  margin: 0;
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Lora', sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  font-size: 18px;
  @media (max-width: 641px) {
      margin: 1ch;
  }
}

header {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  max-width: 100%;
  
  @media (max-width: 480px) {
      gap: 0.4rem;
  }
  
  @media (max-width: 641px) {
      gap: 0.75rem;
  }
}

header h1 {
    font-size: 48px;
}

header nav {
    font-size: 22px;
    @media (max-width: 641px) {
        display: flex;
        justify-content: center;
        align-items: center;
        flex-wrap: wrap;
    }
}

.page-content {
  width: 100%;
  max-width: 70ch;
  min-width: 0;
  overflow-wrap: break-word;
}

/*text elements*/
a {
  color: var(--link);
  text-decoration: none;
}

a:visited {
  color: var(--link-visited);
}

a:active {
  color: var(--link-active);
}

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

pre {
  background-color: var(--code-bg) !important;
  border: 1px solid var(--border);
  padding: 1rem;
  border-radius: 1rem;
  font-family: 'Geist-Mono', monospace;
  max-width: 100%;
  overflow-x: auto;
  white-space: pre;
}

blockquote {
    border-left: 4px solid var(--border);
    padding-left: 4px;
    color: var(--text-muted);
}

pre span {
  color: var(--code-text) !important;
}

em {
  color: var(--text-muted);
}

/*post elements*/
img,
video,
iframe {
  max-width: 100%;
  height: auto;
}

.post-item {
    border: 1px solid var(--border);
    border-radius: 1rem;
    margin-bottom: 1rem;
    padding: 1rem;
}

#prev-next {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  margin-top: 40px;
}

figure {
  align-self: center;
  text-align: center;
  font-style: italic;
}

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