/* Zen theme — simple, clean, elegant */

:root {
  --bg: #f3f5f1;
  --surface: #f8faf7;
  --text: #2e3431;
  --muted: #66706a;
  --line: #d7ddd8;
  --accent: #4e6a60;
  --accent-soft: #9bb0a6;
  --heading: #1f2a26;
  --heading-soft: #3f5149;
  --code-bg: #edf2ee;
  --code-border: #d5ddd8;
}

html {
  scroll-behavior: smooth;
}

body,
body.vsc-dark {
  background: var(--bg) !important;
  color: var(--text) !important;
  font-family: "Charter", "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif !important;
  font-weight: 400 !important;
  line-height: 1.76 !important;
  letter-spacing: 0.002em !important;
  font-size: 18px !important;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.markdown-body {
  background: var(--surface) !important;
  border: 1px solid var(--line) !important;
  border-radius: 10px !important;
  padding: 2.2rem 2.4rem !important;
  max-width: 860px;
  margin: 2.5rem auto !important;
  box-shadow: 0 8px 28px rgba(23, 39, 31, 0.06) !important;
}

body h1,
body h2,
body h3,
body h4,
body h5,
body h6 {
  color: var(--heading) !important;
  font-family: "Avenir Next", "Segoe UI", "Inter", "Helvetica Neue", Arial, sans-serif !important;
  font-weight: 550 !important;
  letter-spacing: 0.015em !important;
  line-height: 1.28 !important;
  margin-top: 1.65em !important;
  margin-bottom: 0.55em !important;
}

body h1 {
  font-size: clamp(1.95rem, 3.2vw, 2.3rem) !important;
  border-bottom: 1px solid var(--line) !important;
  padding-bottom: 0.5rem !important;
}

body h2 {
  font-size: clamp(1.35rem, 2.2vw, 1.62rem) !important;
  border-bottom: 1px solid #e1e8e3 !important;
  padding-bottom: 0.3rem !important;
}

body h3 {
  font-size: clamp(1.12rem, 1.8vw, 1.28rem) !important;
}

body h4,
body h5,
body h6 {
  color: var(--heading-soft) !important;
}

body h4 { font-size: 1.03rem !important; }
body h5 { font-size: 0.96rem !important; }
body h6 { font-size: 0.9rem !important; }

body p,
body li {
  color: var(--text) !important;
}

body p {
  margin-bottom: 1.05em !important;
  max-width: 88ch;
}

body a {
  color: var(--accent) !important;
  text-decoration: none !important;
  border-bottom: 1px solid transparent !important;
  transition: color 0.2s ease, border-color 0.2s ease;
}

body a:hover {
  color: #3e554d !important;
  border-bottom-color: var(--accent-soft) !important;
}

body hr {
  border: 0 !important;
  border-top: 1px solid var(--line) !important;
  width: 100% !important;
  margin: 2.1rem 0 !important;
}

body blockquote {
  margin: 1.4rem 0 !important;
  padding: 0.5rem 1rem !important;
  border-left: 2px solid var(--accent-soft) !important;
  color: var(--muted) !important;
  background: transparent !important;
}

body pre,
body code {
  font-family: "SFMono-Regular", Menlo, Consolas, monospace !important;
}

body code {
  background: var(--code-bg) !important;
  color: #31413b !important;
  border: 1px solid var(--code-border) !important;
  border-radius: 5px !important;
  padding: 0.1em 0.35em !important;
}

body pre {
  background: #eff4f0 !important;
  border: 1px solid var(--code-border) !important;
  border-radius: 8px !important;
  padding: 0.95rem 1.1rem !important;
}

body pre code {
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
}

body ul,
body ol {
  padding-left: 1.35em !important;
  max-width: 88ch;
}

body li {
  margin-bottom: 0.35em !important;
}

body strong,
body b {
  color: #24312d !important;
  font-weight: 600 !important;
}

body em,
body i {
  color: #586560 !important;
}

body table {
  border-collapse: collapse !important;
  width: 100% !important;
}

body th,
body td {
  border: 1px solid #d8dfda !important;
  padding: 0.55rem 0.7rem !important;
}

body th {
  background: #edf2ee !important;
  color: #2b3833 !important;
}

body tr:nth-child(even) {
  background: #f4f8f5 !important;
}

body ::selection {
  background: rgba(78, 106, 96, 0.2) !important;
  color: #1d2824 !important;
}

@media (max-width: 760px) {
  body {
    font-size: 16.5px !important;
    line-height: 1.72 !important;
  }

  .markdown-body {
    padding: 1.4rem 1.1rem !important;
    margin: 1rem !important;
    border-radius: 8px !important;
  }
}
