:root {
  color-scheme: light;
  --bg: #fbfaf7;
  --text: #1d1c19;
  --muted: #666158;
  --line: #ded8ce;
  --accent: #146c6c;
  --code: #f0ece4;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #171716;
  --text: #f0eee8;
  --muted: #b8b0a5;
  --line: #34312d;
  --accent: #6bc7bd;
  --code: #24221f;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #171716;
    --text: #f0eee8;
    --muted: #b8b0a5;
    --line: #34312d;
    --accent: #6bc7bd;
    --code: #24221f;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
  font-size: 18px;
  line-height: 1.65;
}

a {
  color: var(--accent);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 6px;
}

.post img {
  margin: 28px auto;
}

.site-header,
main {
  width: min(100% - 32px, 760px);
  margin: 0 auto;
}

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  padding: 28px 0 18px;
  border-bottom: 1px solid var(--line);
}

.site-title {
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
}

.theme-toggle {
  margin-left: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  padding: 8px 10px;
}

.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.intro {
  padding: 56px 0 36px;
}

.intro h1,
.post h1,
.post-list h1 {
  margin: 0 0 12px;
  font-size: clamp(2.1rem, 8vw, 4.6rem);
  line-height: 0.95;
}

.intro p,
.post-list article p {
  color: var(--muted);
}

.post-list {
  padding: 24px 0 72px;
}

.post-list article {
  padding: 24px 0;
  border-top: 1px solid var(--line);
}

.post-list h2 {
  margin: 0 0 4px;
  font-size: 1.45rem;
  line-height: 1.2;
}

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

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

.post {
  padding: 48px 0 88px;
}

.post header {
  margin-bottom: 36px;
}

.post h2,
.post h3 {
  margin-top: 2em;
  line-height: 1.2;
}

.post blockquote {
  margin: 28px 0;
  padding-left: 18px;
  border-left: 3px solid var(--accent);
  color: var(--muted);
}

.notion-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 24px;
  margin: 28px 0;
}

.notion-column > :first-child {
  margin-top: 0;
}

.notion-column > :last-child {
  margin-bottom: 0;
}

.post pre,
.post code {
  background: var(--code);
  border-radius: 5px;
}

.post code {
  padding: 0.08em 0.28em;
}

.post pre {
  overflow-x: auto;
  padding: 16px;
}

.post pre code {
  padding: 0;
}
