:root {
  --background: #f4f3ef;
  --card: #fffefa;
  --ink: #252a26;
  --muted: #68706a;
  --line: #d9ddd7;
  --accent: #477b57;
  --accent-dark: #2f5d3e;
  --header: #21342a;
  --code: #eff1ed;
  --shadow: 0 8px 24px rgb(35 48 39 / 6%);
  color-scheme: light;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
  line-height: 1.65;
}

* {
  box-sizing: border-box;
}

body {
  background: var(--background);
  color: var(--ink);
  margin: 0;
}

p,
ul,
ol {
  margin-bottom: 0.85rem;
  margin-top: 0.85rem;
}

a {
  color: var(--accent-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
  transition: color 120ms ease;
}

a:hover,
a:focus {
  color: var(--accent);
}

.skip-link {
  background: var(--card);
  left: 1rem;
  padding: 0.5rem 0.75rem;
  position: absolute;
  top: -5rem;
  z-index: 10;
}

.skip-link:focus {
  top: 1rem;
}

.site-header {
  background: var(--header);
  border-top: 4px solid #729f7f;
  box-shadow: 0 2px 12px rgb(25 38 30 / 12%);
  color: #ffffff;
}

.site-header-content,
.site-main,
.site-footer {
  margin: 0 auto;
  max-width: 800px;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.site-header-content {
  padding-bottom: 1rem;
  padding-top: 1.25rem;
}

.site-title {
  color: #ffffff;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: clamp(1.55rem, 4vw, 2.15rem);
  font-weight: 720;
  letter-spacing: -0.025em;
  line-height: 1.1;
  text-decoration: none;
}

.site-title:hover,
.site-title:focus {
  color: #ffffff;
}

.tagline {
  color: #c8d2ca;
  font-size: 0.9rem;
  margin: 0.25rem 0 0.8rem;
}

nav {
  display: flex;
  flex-wrap: wrap;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  gap: 0.35rem 1.1rem;
}

.site-header nav a {
  color: #ffffff;
  font-size: 0.76rem;
  font-weight: 650;
  letter-spacing: 0.075em;
  text-decoration: none;
  text-transform: uppercase;
}

.site-header nav a:hover,
.site-header nav a:focus {
  color: #79c267;
}

.site-main {
  padding-bottom: 3rem;
  padding-top: 1.75rem;
}

.page-heading,
.page,
.post,
.post-card,
.comments,
.archive-year {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 9px;
  box-shadow: var(--shadow);
  margin-bottom: 1.15rem;
  padding: clamp(1.1rem, 3vw, 1.8rem);
}

.page-heading {
  background: linear-gradient(135deg, #fffefa, #f8faf6);
  border-left: 4px solid var(--accent);
}

h1,
h2,
h3 {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #202722;
  line-height: 1.22;
}

h1 {
  font-size: clamp(1.45rem, 3.5vw, 2rem);
  letter-spacing: -0.025em;
  margin: 0 0 0.75rem;
}

h2 {
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  margin-top: 0;
}

h3 {
  font-size: 1rem;
}

.page-heading h1 {
  font-size: clamp(1.3rem, 3vw, 1.7rem);
}

.page-heading p {
  font-size: 0.95rem;
}

.post-card h2 a {
  color: var(--ink);
  text-decoration: none;
}

.post-card h2 {
  margin-bottom: 0.35rem;
}

.post-card h2 a:hover,
.post-card h2 a:focus {
  color: var(--accent-dark);
}

.post-date,
.categories {
  color: var(--muted);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.78rem;
}

.read-more {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.82rem;
  font-weight: 650;
}

.post-content {
  font-size: 1rem;
  max-width: 68ch;
  overflow-wrap: anywhere;
}

.post-content img {
  height: auto;
  max-width: 100%;
}

pre,
code {
  background: var(--code);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.78rem;
}

code {
  overflow-wrap: anywhere;
  padding: 0.1em 0.25em;
  white-space: pre-wrap;
}

pre {
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 5px;
  line-height: 1.55;
  overflow-x: auto;
  padding: 0.85rem 1rem;
  white-space: pre-wrap;
}

pre code {
  padding: 0;
}

blockquote {
  background: #f8f9f6;
  border-left: 3px solid var(--accent);
  color: var(--muted);
  margin-left: 0;
  padding: 0.35rem 1rem;
}

.comments h2 {
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.55rem;
}

.comment {
  border-left: 2px solid var(--line);
  margin: 1rem 0;
  padding-left: 0.9rem;
}

.comment header {
  color: var(--muted);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.78rem;
}

.comment-depth-1,
.comment-depth-2,
.comment-depth-3 {
  margin-left: clamp(0.5rem, 4vw, 2rem);
}

.archive-year ul {
  list-style: none;
  padding: 0;
}

.archive-year li {
  border-top: 1px solid var(--line);
  padding: 0.45rem 0;
}

.archive-year time {
  color: var(--muted);
  display: inline-block;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.78rem;
  width: 4.5rem;
}

.pagination {
  align-items: center;
  justify-content: space-between;
  margin-top: 2rem;
}

.pagination span {
  color: var(--muted);
  font-size: 0.8rem;
}

.site-footer {
  color: var(--muted);
  font-size: 0.75rem;
  padding-bottom: 2rem;
  text-align: center;
}

@media (max-width: 520px) {
  :root {
    font-size: 15px;
  }

  .site-header-content,
  .site-main,
  .site-footer {
    padding-left: 0.9rem;
    padding-right: 0.9rem;
  }

  .site-main {
    padding-top: 1rem;
  }

  .pagination {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media print {
  .site-header nav,
  .skip-link,
  .pagination,
  .site-footer {
    display: none;
  }

  body,
  .page,
  .post,
  .post-card,
  .comments,
  .archive-year {
    background: #ffffff;
    border: 0;
  }
}
