:root {
  color-scheme: light;
  --bg: #fbfbf8;
  --text: #1e2025;
  --muted: #6c7280;
  --line: #d9d8d1;
  --link: #096b72;
  --link-hover: #0d4f56;
  --surface: #ffffff;
  --code-bg: #eff1ec;
  --max-width: 760px;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
}

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

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

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

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 0 18px;
  border-bottom: 1px solid var(--line);
}

.site-title {
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 700;
  text-decoration: none;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.94rem;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--text);
}

.site-main {
  padding: 64px 0;
}

.intro {
  margin-bottom: 56px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.2;
}

h1 {
  max-width: 12ch;
  font-size: clamp(2.4rem, 8vw, 4.8rem);
}

h2 {
  margin-bottom: 24px;
  font-size: 1.25rem;
}

h3 {
  font-size: 1.28rem;
}

.intro p:last-child {
  max-width: 58ch;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 1.12rem;
}

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

.post-preview {
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.post-preview time,
.post-header time,
.archive-item time {
  display: block;
  color: var(--muted);
  font-size: 0.88rem;
}

.post-preview h3 {
  margin-top: 8px;
}

.post-preview h3 a {
  color: var(--text);
  text-decoration: none;
}

.post-preview h3 a:hover {
  color: var(--link);
}

.post-preview p {
  margin: 10px 0 0;
  color: var(--muted);
}

.post-header,
.page-header {
  margin-bottom: 40px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.post-header h1,
.page-header h1 {
  max-width: 760px;
  margin-top: 10px;
  font-size: clamp(2rem, 6vw, 3.4rem);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.tags span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 10px;
  color: var(--muted);
  font-size: 0.82rem;
}

.content {
  font-size: 1.06rem;
}

.content > * + * {
  margin-top: 1.1em;
}

.content h2,
.content h3 {
  margin-top: 2em;
}

.content p,
.content ul,
.content ol {
  margin-bottom: 0;
}

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

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

code {
  border-radius: 4px;
  background: var(--code-bg);
  padding: 0.12em 0.3em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
}

pre {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 16px;
}

pre code {
  background: transparent;
  padding: 0;
}

.archive-list {
  border-top: 1px solid var(--line);
}

.archive-item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.archive-item a {
  color: var(--text);
  text-decoration: none;
}

.archive-item a:hover {
  color: var(--link);
}

.not-found {
  text-align: center;
}

.not-found h1 {
  max-width: none;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 22px 0 32px;
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 620px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .site-main {
    padding: 42px 0;
  }

  .archive-item {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}
