:root {
  --bg: #f3efe6;
  --paper: rgba(255, 252, 245, 0.92);
  --paper-strong: #fffdf8;
  --text: #1d241f;
  --muted: #57645d;
  --line: rgba(103, 89, 68, 0.16);
  --accent: #255d4f;
  --accent-strong: #173f35;
  --accent-soft: #dbe8dd;
  --sand: #e8dcc7;
  --shadow: 0 20px 55px rgba(36, 29, 16, 0.08);
  --shadow-soft: 0 12px 28px rgba(36, 29, 16, 0.05);
  --radius: 28px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  font-family: "Avenir Next", "SUIT Variable", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(255, 248, 231, 0.9), transparent 28%),
    radial-gradient(circle at 100% 20%, rgba(214, 233, 220, 0.75), transparent 24%),
    linear-gradient(180deg, #faf5eb 0%, var(--bg) 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.narrow {
  width: min(760px, 100%);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(16px);
  background: rgba(250, 245, 235, 0.8);
  border-bottom: 1px solid rgba(103, 89, 68, 0.12);
}

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

.brand,
.footer-brand {
  font-family: "Iowan Old Style", "Palatino Linotype", "Noto Serif KR", serif;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.brand {
  font-size: 1.35rem;
}

.nav,
.footer-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.96rem;
}

.nav a,
.footer-links a,
.text-link {
  position: relative;
}

.nav a::after,
.footer-links a::after,
.text-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.2s ease;
}

.nav a:hover::after,
.footer-links a:hover::after,
.text-link:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.hero {
  padding: 92px 0 72px;
}

.hero-home {
  padding-top: 88px;
}

.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.75fr);
  gap: 28px;
  align-items: start;
}

.hero-copy-block,
.hero-panel,
.page-hero,
.article-shell,
.card,
.post-card,
.note-box {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow-soft);
}

.hero-copy-block,
.page-hero {
  padding: clamp(28px, 4vw, 44px);
}

.hero-panel,
.card,
.post-card,
.note-box {
  padding: 26px;
}

.eyebrow,
.label,
.post-type,
.meta-chip,
.panel-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Iowan Old Style", "Palatino Linotype", "Noto Serif KR", serif;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.hero h1,
.page-hero h1,
.article-header h1 {
  margin-top: 12px;
  font-size: clamp(2.8rem, 7vw, 5.2rem);
  line-height: 0.95;
  max-width: 11ch;
}

.page-hero h1 {
  max-width: 13ch;
}

.article-header h1 {
  max-width: 14ch;
  font-size: clamp(2.4rem, 6vw, 4.4rem);
}

.hero-copy,
.page-lead,
.article-lead,
.card p,
.post-card p,
.site-footer p,
.article-body p,
.article-body li,
.panel-note {
  color: var(--muted);
  line-height: 1.8;
}

.hero-copy,
.page-lead,
.article-lead {
  margin: 18px 0 0;
  font-size: 1.05rem;
  max-width: 58ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 19px;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary {
  background: var(--accent);
  color: #fff;
}

.button.secondary {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.45);
}

.metric-list,
.checklist,
.meta-list,
.inline-list {
  padding: 0;
  margin: 0;
  list-style: none;
}

.metric-list {
  display: grid;
  gap: 18px;
  margin-top: 20px;
}

.metric-list li {
  display: grid;
  gap: 4px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.metric-list li:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.metric-list strong {
  font-family: "Iowan Old Style", "Palatino Linotype", "Noto Serif KR", serif;
  font-size: 2rem;
  font-weight: 700;
}

.section {
  padding: 68px 0;
}

.section.alt {
  background: rgba(255, 252, 245, 0.52);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-heading {
  margin-bottom: 24px;
}

.section-heading h2 {
  margin-top: 10px;
  font-size: clamp(2rem, 4vw, 3.1rem);
  line-height: 1.05;
  max-width: 12ch;
}

.inline-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.grid {
  display: grid;
  gap: 18px;
}

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card h3,
.post-card h3,
.article-body h2,
.article-body h3 {
  margin-bottom: 12px;
}

.card h3,
.post-card h3 {
  font-size: 1.24rem;
}

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

.post-card {
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.post-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.post-card.featured {
  background:
    linear-gradient(135deg, rgba(255, 252, 245, 0.96), rgba(230, 240, 232, 0.92)),
    var(--paper);
}

.archive-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 18px;
}

.archive-sidebar {
  align-self: start;
  position: sticky;
  top: 96px;
}

.meta-list {
  display: grid;
  gap: 10px;
}

.meta-list li {
  padding: 14px 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid var(--line);
  color: var(--muted);
}

.page-stack,
.article-stack {
  display: grid;
  gap: 18px;
}

.breadcrumbs {
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 0.92rem;
}

.breadcrumbs a {
  color: var(--accent-strong);
}

.article-shell {
  padding: clamp(26px, 3vw, 42px);
}

.article-header {
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.meta-chip {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(37, 93, 79, 0.08);
  letter-spacing: 0.08em;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: 24px;
  margin-top: 28px;
}

.article-body {
  min-width: 0;
}

.article-body h2 {
  margin-top: 34px;
  font-size: 2rem;
}

.article-body h3 {
  margin-top: 26px;
  font-size: 1.35rem;
}

.article-body ul,
.article-body ol {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  display: grid;
  gap: 10px;
}

.article-body strong {
  color: var(--text);
}

.toc,
.note-box {
  align-self: start;
  position: sticky;
  top: 100px;
}

.toc h2,
.note-box h2 {
  font-size: 1.2rem;
  margin-bottom: 12px;
}

.toc ol {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 10px;
  color: var(--muted);
}

.callout {
  margin: 26px 0;
  padding: 20px 22px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(219, 232, 221, 0.78), rgba(255, 255, 255, 0.7));
  border: 1px solid rgba(37, 93, 79, 0.14);
}

.checklist {
  display: grid;
  gap: 10px;
  color: var(--muted);
}

.checklist li {
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.52);
  border: 1px solid var(--line);
}

.checklist.ordered {
  list-style: decimal;
  padding-left: 20px;
}

.checklist.ordered li {
  background: transparent;
  border: 0;
  padding: 2px 0;
}

.post-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid var(--line);
}

.post-table th,
.post-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.post-table tr:last-child td {
  border-bottom: 0;
}

.post-table th {
  background: rgba(232, 220, 199, 0.34);
  color: var(--text);
}

.post-table td {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.46);
}

.site-footer {
  padding: 8px 0 24px;
  border-top: 1px solid var(--line);
}

.site-footer p {
  margin: 0;
}

@media (max-width: 980px) {
  .hero-layout,
  .archive-layout,
  .article-layout,
  .grid.two,
  .grid.three,
  .post-grid,
  .system-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .archive-sidebar,
  .toc,
  .note-box {
    position: static;
  }

  .inline-heading,
  .header-inner,
  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding: 14px 0;
  }

  .hero h1,
  .page-hero h1,
  .article-header h1,
  .section-heading h2 {
    max-width: none;
  }
}

@media (max-width: 640px) {
  body {
    background:
      radial-gradient(circle at top left, rgba(255, 248, 231, 0.8), transparent 40%),
      linear-gradient(180deg, #faf5eb 0%, var(--bg) 100%);
  }

  .container {
    width: min(100% - 28px, 1120px);
  }

  .hero,
  .section {
    padding: 56px 0;
  }

  .hero-home {
    padding-top: 54px;
  }

  .hero-copy-block,
  .hero-panel,
  .page-hero,
  .article-shell,
  .card,
  .post-card,
  .note-box {
    padding: 22px;
    border-radius: 24px;
  }
}
