:root {
  color-scheme: light;
  --bg: #f7f8f4;
  --paper: #ffffff;
  --ink: #1d2520;
  --muted: #66736b;
  --line: #dfe5dd;
  --accent: #007f73;
  --accent-ink: #035b52;
  --soft: #edf4f1;
  --mark: #e6b43c;
  font-family: Pretendard, "Noto Sans KR", "Apple SD Gothic Neo", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.72;
}

a {
  color: var(--accent-ink);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
}

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

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
}

.brand {
  display: grid;
  gap: 2px;
}

.brand strong {
  font-size: 24px;
  letter-spacing: 0;
}

.brand span {
  color: var(--muted);
  font-size: 13px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 15px;
}

.main {
  padding: 46px 0 64px;
}

.intro {
  display: grid;
  gap: 14px;
  margin-bottom: 36px;
}

.intro h1,
.article h1,
.page h1 {
  margin: 0;
  line-height: 1.22;
  letter-spacing: 0;
}

.intro h1 {
  max-width: 780px;
  font-size: clamp(34px, 5vw, 56px);
}

.intro p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 28px 0 22px;
}

.search {
  width: min(420px, 100%);
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 14px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.count {
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.post-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.post-card img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: var(--soft);
}

.post-card-body {
  display: grid;
  gap: 10px;
  padding: 18px;
}

.post-card h2 {
  margin: 0;
  font-size: 19px;
  line-height: 1.42;
}

.post-card p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.62;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.pill {
  border-radius: 999px;
  background: var(--soft);
  padding: 2px 10px;
  color: var(--accent-ink);
}

.article,
.page {
  max-width: 850px;
  margin: 0 auto;
}

.article-header,
.page-header {
  display: grid;
  gap: 14px;
  margin-bottom: 28px;
}

.article h1,
.page h1 {
  font-size: clamp(30px, 4vw, 48px);
}

.article-description {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
}

.entry-content {
  border-top: 1px solid var(--line);
  padding-top: 28px;
}

.entry-content h2 {
  margin: 40px 0 12px;
  font-size: 28px;
  line-height: 1.34;
}

.entry-content h3 {
  margin: 30px 0 10px;
  font-size: 22px;
  line-height: 1.38;
}

.entry-content p,
.entry-content ul,
.entry-content ol,
.entry-content table {
  margin: 16px 0;
}

.entry-content img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 22px auto;
  border-radius: 8px;
}

.entry-content figure {
  margin: 26px 0;
}

.entry-content figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.entry-content table {
  display: block;
  width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
}

.entry-content th,
.entry-content td {
  border: 1px solid var(--line);
  padding: 10px;
}

.article-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 46px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 26px 0 42px;
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 820px) {
  .header-inner,
  .toolbar,
  .article-nav {
    align-items: flex-start;
    flex-direction: column;
  }

  .post-grid {
    grid-template-columns: 1fr;
  }

  .main {
    padding-top: 32px;
  }
}
