:root {
  --background-body: #fff;
  --text-main: #36393b;
  --text-secondary: #6b6f72;
  --primary-color: #bdd747;
  --font-family-serif: Merriweather, Georgia, "Times New Roman", serif;
  --font-family-sans: "Fira Sans", system-ui, -apple-system, sans-serif;
  --theme-accent: #bdd747;
  --theme-code-inline-bg: #f0f0f0;
  --theme-code-inline-text: #36393b;
  --ep-max: 42em;
}

:root.theme-dark {
  --background-body: #202122;
  --text-main: #fff;
  --text-secondary: #ccc;
  --primary-color: #bdd747;
  --theme-code-inline-bg: #2a2b2c;
  --theme-code-inline-text: #fff;
}

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

body {
  margin: 0;
  font-family: var(--font-family-serif);
  font-size: 16px;
  line-height: 1.6;
  background-color: var(--background-body);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-family-sans);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 0.5em;
}

h1 {
  font-family: var(--font-family-serif);
  font-size: 3em;
  margin: 0 0 1em;
}

h2 {
  margin: 1.6em 0 0;
  font-size: 1.8em;
}

h3 {
  font-size: 1.5em;
}

p,
ul,
ol {
  font-size: 1.3rem;
  line-height: 1.75em;
  margin: 1.2em 0;
}

a {
  color: inherit;
  transition: color 0.15s linear;
}

a:hover {
  color: var(--primary-color);
}

.entry p a,
.content p a {
  text-decoration: none;
  box-shadow: inset 0 -0.12em 0 var(--primary-color);
  transition: box-shadow 0.2s ease-in-out, color 0.2s ease-in-out;
}

.entry p a:hover,
.content p a:hover {
  box-shadow: inset 0 -1.5em 0 var(--primary-color);
  color: #fff;
}

img,
video {
  max-width: 100%;
  height: auto;
}

hr {
  padding: 0;
  border: 0;
  height: 10px;
  margin: 40px auto;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg width='20' height='10' viewBox='0 0 20 10' xmlns='http://www.w3.org/2000/svg' fill-rule='evenodd' clip-rule='evenodd' stroke-miterlimit='10'%3e%3cpath fill='none' d='M0 0h20v10H0z'/%3e%3cclipPath id='a'%3e%3cpath d='M0 0h20v10H0z'/%3e%3c/clipPath%3e%3cg clip-path='url(%23a)'%3e%3cpath d='M20 7.384c-4.999-.001-5-4.768-9.999-4.768C5 2.616 5 7.384 0 7.384' fill='none' stroke-width='3' stroke='%23BDD747'/%3e%3c/g%3e%3c/svg%3e");
}

code {
  font-family: "SF Mono", menlo, inconsolata, monospace;
  font-size: calc(1em - 2px);
  padding: 0.2em 0.4em;
  border-radius: 2px;
}

pre {
  border-radius: 8px;
  margin: 1.2em 0;
  padding: 1.2em;
  overflow-x: auto;
  background: var(--theme-code-inline-bg);
}

pre code {
  padding: 0;
}

blockquote {
  border-left: 4px solid #ccc;
  font-size: 1.4em;
  font-style: italic;
  margin: 2rem 0;
  padding-left: 2rem;
}

figure {
  margin: 0 0 3em;
}

figcaption {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 0.5em;
}

.site-layout {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.site-main {
  flex: 1;
  margin: 0 auto;
  max-width: 1400px;
  padding: 1em 2em;
  width: 100%;
}

.container {
  margin: 0 auto;
  max-width: var(--ep-max);
  width: 100%;
}

.site-header {
  display: flex;
  margin: 0 auto;
  max-width: 1400px;
  padding: 2em;
  width: 100%;
  align-items: center;
  justify-content: space-between;
}

.site-brand {
  font-size: 1.5rem;
  font-family: var(--font-family-sans);
  font-weight: 700;
  text-decoration: none;
  transition: all 0.25s ease-in-out;
}

.site-brand:hover {
  padding-left: 1rem;
  padding-right: 1rem;
  color: var(--background-body);
  background-color: var(--text-main);
  border-radius: 10px;
}

.site-header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.site-lang-switcher {
  display: flex;
  gap: 0.5rem;
}

.site-lang-link {
  text-decoration: none;
  font-size: 1.25rem;
  opacity: 0.6;
}

.site-lang-link.is-active {
  opacity: 1;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  padding: 0.33em 0.67em;
  gap: 0.6em;
  border-radius: 99em;
  background-color: var(--theme-code-inline-bg);
}

.theme-toggle label {
  color: var(--theme-code-inline-text);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.5;
  cursor: pointer;
}

.theme-toggle label.checked {
  color: var(--theme-accent);
  opacity: 1;
}

.theme-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.post-item h2,
.post-item-footer {
  font-family: var(--font-family-sans);
  font-weight: 700;
}

.post-item h2 a {
  text-decoration: none;
}

.post-item-date {
  color: var(--text-secondary);
  text-transform: uppercase;
  font-size: 0.85rem;
}

.post-item figure {
  margin: 0 0 1em;
}

.post-item figure img {
  width: 100%;
  border-radius: 4px;
}

.entry-single header {
  text-align: center;
}

.entry-single header p {
  color: var(--text-secondary);
  text-transform: uppercase;
  font-family: var(--font-family-sans);
  font-weight: 600;
  font-size: 0.9rem;
}

.entry-single header h1 {
  margin-bottom: 0.7em;
  font-size: 2.5em;
}

.entry-single header hr {
  min-width: 100px;
  width: 30%;
}

.author-bio {
  align-items: center;
  display: flex;
  gap: 20px;
  margin-top: 2em;
}

.author-bio img {
  width: 100px;
  height: 100px;
  border-radius: 100px;
}

.author-bio p {
  font-size: 1.125rem;
  margin: 0;
}

.site-footer {
  color: var(--text-secondary);
  font-size: 0.8em;
  margin: 1em auto;
  max-width: 1400px;
  padding: 1em 2em;
  text-align: center;
  width: 100%;
}

.site-footer a {
  color: inherit;
}

.archive-header h1 {
  font-size: 2.5em;
}

@media (max-width: 1020px) {
  h1 {
    font-size: 2.4em;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 14px;
  }

  p,
  ul,
  ol {
    font-size: 1.2rem;
  }
}
