:root {
  --background-color: #f4f1de;
  --text-primary-color: #000;
  --text-secondary-color: #9ca3af;
  --title-logo-color: #3d405b;
  --transition-duration: 0.3s;
}

:root.dark-theme {
  --background-color: #1f2937;
  --text-primary-color: #e5e7eb;
  --text-secondary-color: #9ca3af;
  --title-logo-color: #b5e5ce;
}

body {
  background-color: var(--background-color);
  color: var(--text-primary-color);
  transition: background-color var(--transition-duration), color var(--transition-duration);

  max-width: 640px;

  margin: 2.5rem auto 0;
  padding: 0 1rem;

  font-family: "Open Sans", Arial, sans-serif;
  font-weight: 400;
  line-height: 1.8;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Merriweather", serif;
  font-weight: 400;
  transition: color var(--transition-duration);
}

a {
  color: inherit;
  text-decoration-color: var(--text-primary-color);
  text-underline-offset: 0.3rem;
  text-decoration-line: underline;
}

header > a {
  text-decoration: none;
}

main {
  padding: 1rem 0;
}

footer {
  padding: 1rem 0;

  display: flex;
  justify-content: space-between;
  align-items: center;
}

.post-list {
  list-style-type: none;
  padding-left: 0;
}

.post-list article {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
}

.post-list article a {
  text-decoration: none;

  &:hover {
    text-decoration: underline;
  }
}

.post-list .title {
  margin: 0;
}

.post-list li {
  margin-bottom: 1rem;
}

.post-list li:last-child {
  margin-bottom: 0;
}

.date {
  font-size: 0.875rem;
  text-align: right;
  white-space: nowrap;
  color: var(--text-secondary-color);
}

.title-logo {
  font-size: 2.25rem;
  font-family: "Pacifico", cursive;
  color: var(--title-logo-color);
}

.latest-posts h2 {
  margin: 0.25rem 0;
}

.post-content a::after {
  opacity: 1;
  background-color: var(--text-primary-color);
}

.post-content h2 {
  margin: 0.25rem 0;
}

.post-content img {
  max-width: 100%;
  max-height: 500px;
  margin: 0 auto;
  display: block;
  height: auto;
}

.post-content pre {
  padding: 1rem;
  border-radius: 0.75rem;
  overflow-x: auto;
  background-color: rgba(0, 0, 0, 0.1);
}

.theme-toggle {
  border: none;
  border-radius: 50%;
  width: 2.5rem;
  height: 2.5rem;
  font-size: 1.2rem;
  cursor: pointer;
  transition: background-color 0.3s;
  background-color: var(--title-logo-color);
}

.theme-toggle:hover {
  opacity: 0.8;
}
