:root {
  --bg: #f6f1e8;
  --surface: rgba(255, 252, 247, 0.9);
  --surface-strong: #fffaf2;
  --ink: #1f2933;
  --muted: #5d6a72;
  --line: rgba(69, 83, 96, 0.14);
  --brand: #0f766e;
  --brand-strong: #125b67;
  --accent: #d97706;
  --shadow: 0 18px 48px rgba(31, 41, 51, 0.08);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(15, 118, 110, 0.12), transparent 32%),
    radial-gradient(circle at top right, rgba(217, 119, 6, 0.12), transparent 24%),
    linear-gradient(180deg, #f7f3eb 0%, #f4efe6 50%, #efe9df 100%);
  font-family: "Instrument Sans", "Noto Sans KR", sans-serif;
}

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

a {
  color: inherit;
}

.page-shell {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 24px 0 48px;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 28px;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 251, 244, 0.78);
  backdrop-filter: blur(18px);
  position: sticky;
  top: 14px;
  z-index: 20;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  text-decoration: none;
}

.brand img {
  width: 44px;
  height: 44px;
  border-radius: 14px;
}

.brand strong {
  display: block;
  font-size: 15px;
}

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

.top-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.top-nav a {
  text-decoration: none;
  color: var(--muted);
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 14px;
}

.top-nav a:hover {
  background: rgba(15, 118, 110, 0.08);
  color: var(--brand-strong);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 28px;
  align-items: stretch;
  margin-bottom: 34px;
}

.hero-copy,
.hero-panel,
.section,
.site-footer {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero-copy {
  padding: 42px;
}

.hero-copy h1,
.section-heading h1,
.section-heading h2,
.article-hero h1,
.center-message h1 {
  margin: 0;
  font-family: "Noto Serif KR", serif;
  line-height: 1.25;
  letter-spacing: 0;
}

.hero-copy h1 {
  font-size: clamp(2.2rem, 5vw, 4.1rem);
  margin-bottom: 18px;
}

.hero-copy p,
.section-heading p,
.site-footer p,
.topic-card p,
.post-card p,
.article-meta,
.search-status,
.prose {
  color: var(--muted);
  line-height: 1.8;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--brand-strong);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.search-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  margin-top: 26px;
}

.search-form input,
.search-form button,
.button {
  min-height: 56px;
  border-radius: 16px;
  border: 1px solid transparent;
  font: inherit;
}

.search-form input {
  padding: 0 18px;
  background: #fffdf9;
  border-color: rgba(15, 118, 110, 0.12);
}

.search-form button,
.button {
  padding: 0 22px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--brand) 0%, #1d8d81 100%);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.button.secondary {
  background: #fffaf2;
  color: var(--ink);
  border-color: var(--line);
}

.hero-panel {
  overflow: hidden;
}

.hero-panel img {
  width: 100%;
  height: 380px;
  object-fit: cover;
}

.hero-note {
  padding: 22px 24px 26px;
}

.hero-note strong {
  display: block;
  margin-bottom: 8px;
}

.section {
  padding: 30px;
  margin-bottom: 26px;
}

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

.section-heading h1,
.section-heading h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  margin-bottom: 10px;
}

.section-heading.compact {
  margin-bottom: 18px;
}

.topic-grid,
.post-grid {
  display: grid;
  gap: 18px;
}

.topic-grid {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.post-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.topic-card,
.post-card {
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface-strong);
  text-decoration: none;
  overflow: hidden;
}

.topic-card {
  padding: 22px;
}

.topic-card strong {
  display: block;
  margin: 8px 0 10px;
  font-size: 18px;
}

.topic-card-count,
.search-type,
.post-card time {
  display: inline-flex;
  color: var(--brand-strong);
  font-size: 12px;
  font-weight: 700;
}

.post-card-image img {
  width: 100%;
  aspect-ratio: 1.15;
  object-fit: cover;
}

.post-card-body {
  padding: 20px;
}

.post-card h3 {
  margin: 10px 0 12px;
  font-family: "Noto Serif KR", serif;
  font-size: 1.15rem;
  line-height: 1.45;
}

.post-card h3 a {
  text-decoration: none;
}

.article-layout {
  display: grid;
  gap: 20px;
}

.article-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.article-hero img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  border-radius: var(--radius-lg);
}

.article-hero h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  margin-bottom: 12px;
}

.article-body,
.page-content .prose {
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: rgba(255, 253, 249, 0.96);
  box-shadow: var(--shadow);
}

.prose {
  font-size: 16px;
}

.prose h2,
.prose h3,
.prose h4 {
  color: var(--ink);
  margin-top: 1.9em;
  margin-bottom: 0.7em;
  font-family: "Noto Serif KR", serif;
}

.prose p,
.prose li {
  margin: 0 0 1em;
}

.prose img {
  border-radius: 18px;
  margin: 22px auto;
}

.trust-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 20px;
  align-items: center;
}

.search-status {
  margin-bottom: 18px;
}

.center-message {
  text-align: center;
  padding: 64px 28px;
}

.button-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.site-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  padding: 26px 30px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-content: flex-start;
  gap: 10px 16px;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
}

@media (max-width: 980px) {
  .site-header,
  .hero,
  .article-hero,
  .trust-band,
  .site-footer {
    grid-template-columns: 1fr;
  }

  .site-header {
    border-radius: 26px;
    position: static;
  }

  .top-nav {
    justify-content: flex-start;
  }
}

@media (max-width: 680px) {
  .page-shell {
    width: min(100vw - 20px, 100%);
    padding-top: 12px;
  }

  .hero-copy,
  .section,
  .article-hero,
  .article-body,
  .page-content .prose,
  .site-footer {
    padding: 22px;
  }

  .search-form {
    grid-template-columns: 1fr;
  }

  .hero-panel img {
    height: 280px;
  }
}
