:root {
  --hmn-ink: #151515;
  --hmn-muted: #666b73;
  --hmn-line: #d9dde4;
  --hmn-soft: #f5f6f8;
  --hmn-paper: #ffffff;
  --hmn-accent: #b4232a;
  --hmn-accent-dark: #84191f;
  --hmn-blue: #244f7a;
  --hmn-green: #4f6f52;
  --hmn-max: 1180px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--hmn-ink);
  background: var(--hmn-paper);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
  line-height: 1.7;
  word-break: keep-all;
}

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

a:hover {
  color: var(--hmn-accent);
}

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

.wrap {
  width: min(calc(100% - 32px), var(--hmn-max));
  margin-inline: auto;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.topline {
  border-bottom: 1px solid var(--hmn-line);
  background: #111822;
  color: #f6f7f9;
  font-size: 13px;
}

.topline__inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 7px 0;
}

.masthead {
  display: grid;
  grid-template-columns: 48px 1fr minmax(220px, 310px);
  align-items: center;
  gap: 20px;
  min-height: 112px;
}

.brand {
  text-align: center;
}

.brand__name,
.footer-logo {
  font-family: "Noto Serif KR", "Nanum Myeongjo", Georgia, serif;
  font-size: clamp(34px, 5vw, 58px);
  font-weight: 900;
  line-height: 1.1;
}

.custom-logo-link {
  display: inline-flex;
  justify-content: center;
}

.custom-logo {
  max-height: 76px;
  width: auto;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--hmn-line);
  background: #fff;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle span:not(.screen-reader-text) {
  width: 20px;
  height: 2px;
  background: var(--hmn-ink);
}

.header-search {
  display: flex;
  height: 42px;
  border: 1px solid var(--hmn-line);
  background: #fff;
}

.header-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  padding: 0 12px;
  font: inherit;
}

.header-search button {
  border: 0;
  border-left: 1px solid var(--hmn-line);
  background: var(--hmn-ink);
  color: #fff;
  padding: 0 14px;
  font-weight: 700;
}

.primary-nav {
  border-top: 2px solid var(--hmn-ink);
  border-bottom: 1px solid var(--hmn-line);
}

.primary-menu,
.footer-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}

.primary-menu a {
  display: block;
  padding: 14px 18px;
  font-weight: 800;
  border-right: 1px solid var(--hmn-line);
}

.front-hero {
  padding: 34px 0 28px;
  border-bottom: 1px solid var(--hmn-line);
}

.hero-story {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.85fr);
  gap: 32px;
  align-items: center;
}

.hero-story__image,
.news-card__image {
  display: grid;
  place-items: center;
  background: var(--hmn-soft);
  color: var(--hmn-muted);
  overflow: hidden;
}

.hero-story__image {
  aspect-ratio: 16 / 9;
}

.hero-story__image img,
.news-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.kicker {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  background: var(--hmn-accent);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}

.hero-story h1,
.article-header h1,
.page-content h1 {
  font-family: "Noto Serif KR", "Nanum Myeongjo", Georgia, serif;
  letter-spacing: 0;
}

.hero-story h1 {
  margin: 14px 0 14px;
  font-size: clamp(32px, 4.5vw, 54px);
  line-height: 1.18;
}

.lead,
.article-subtitle {
  color: #3e444c;
  font-size: 19px;
  line-height: 1.65;
}

.article-meta,
.article-byline {
  color: var(--hmn-muted);
  font-size: 14px;
}

.front-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 42px;
  padding: 40px 0 54px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 2px solid var(--hmn-ink);
  margin-bottom: 20px;
}

.section-heading h2,
.sidebar-block h2,
.related-posts h2 {
  margin: 0;
  font-size: 21px;
  line-height: 1.35;
}

.section-heading a {
  color: var(--hmn-muted);
  font-size: 14px;
  font-weight: 800;
}

.card-grid,
.archive-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px 22px;
}

.archive-grid {
  padding-bottom: 54px;
}

.news-card {
  border-bottom: 1px solid var(--hmn-line);
  padding-bottom: 18px;
}

.news-card__image {
  aspect-ratio: 1.58 / 1;
  margin-bottom: 14px;
}

.news-card h2 {
  margin: 9px 0 8px;
  font-size: 20px;
  line-height: 1.38;
}

.news-card p {
  margin: 0 0 12px;
  color: #4b5057;
  font-size: 15px;
}

.news-sidebar,
.article-aside {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.sidebar-block {
  border-top: 2px solid var(--hmn-ink);
  padding-top: 16px;
}

.sidebar-block p {
  margin: 10px 0 0;
  color: var(--hmn-muted);
}

.category-list {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
}

.category-list li {
  border-bottom: 1px solid var(--hmn-line);
}

.category-list a {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 11px 0;
  font-weight: 800;
}

.category-list em {
  color: var(--hmn-accent);
  font-style: normal;
}

.archive-header,
.article-header {
  padding: 42px 0 24px;
}

.archive-header h1,
.article-header h1 {
  margin: 12px 0 0;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.18;
}

.article-byline {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  margin-top: 18px;
  padding-top: 15px;
  border-top: 1px solid var(--hmn-line);
}

.article-featured {
  margin-top: 4px;
}

.article-featured img {
  width: 100%;
}

.article-featured figcaption {
  margin-top: 8px;
  color: var(--hmn-muted);
  font-size: 14px;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 760px) 300px;
  gap: 52px;
  padding: 34px 0 62px;
}

.article-summary {
  border-top: 3px solid var(--hmn-accent);
  border-bottom: 1px solid var(--hmn-line);
  padding: 18px 0;
  margin-bottom: 28px;
}

.article-summary strong {
  display: block;
  margin-bottom: 7px;
  color: var(--hmn-accent);
}

.article-summary p {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.entry-content {
  font-size: 18px;
}

.entry-content > *:first-child {
  margin-top: 0;
}

.entry-content h2,
.entry-content h3 {
  margin-top: 1.8em;
  line-height: 1.35;
}

.entry-content blockquote {
  margin: 28px 0;
  padding: 4px 0 4px 22px;
  border-left: 4px solid var(--hmn-accent);
  color: #30363d;
  font-family: "Noto Serif KR", "Nanum Myeongjo", Georgia, serif;
  font-size: 21px;
  font-weight: 700;
}

.entry-content a {
  color: var(--hmn-blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.source-note,
.article-footer {
  margin-top: 34px;
  color: var(--hmn-muted);
  font-size: 14px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.tag-list a {
  padding: 5px 9px;
  background: var(--hmn-soft);
  color: #333;
}

.related-posts ol {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
}

.related-posts li {
  border-bottom: 1px solid var(--hmn-line);
  padding: 12px 0;
}

.related-posts a {
  display: block;
  font-weight: 800;
  line-height: 1.45;
}

.related-posts span {
  display: block;
  margin-top: 5px;
  color: var(--hmn-muted);
  font-size: 13px;
}

.page-content {
  padding: 48px 0 70px;
}

.pagination {
  padding-bottom: 56px;
}

.pagination ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.pagination a,
.pagination span {
  display: grid;
  min-width: 38px;
  min-height: 38px;
  place-items: center;
  border: 1px solid var(--hmn-line);
  padding: 6px 10px;
  font-weight: 800;
}

.pagination .current {
  background: var(--hmn-ink);
  color: #fff;
}

.empty-state {
  border: 1px solid var(--hmn-line);
  padding: 34px;
  background: var(--hmn-soft);
}

.muted {
  color: var(--hmn-muted);
}

.site-footer {
  background: #171717;
  color: #f7f7f7;
  padding: 34px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 26px;
}

.footer-logo {
  display: block;
  font-size: 30px;
}

.site-footer p,
.copyright {
  color: #b9bdc4;
  font-size: 14px;
}

.footer-menu {
  justify-content: flex-end;
  gap: 14px;
}

.copyright {
  border-top: 1px solid #333;
  margin-top: 24px;
  padding-top: 18px;
}

@media (max-width: 980px) {
  .masthead {
    grid-template-columns: 44px 1fr;
  }

  .menu-toggle {
    display: flex;
  }

  .header-search {
    grid-column: 1 / -1;
  }

  .primary-menu {
    display: none;
    padding: 8px 0;
  }

  .primary-menu.is-open {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .primary-menu a {
    border: 0;
    border-bottom: 1px solid var(--hmn-line);
  }

  .hero-story,
  .front-layout,
  .article-layout {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 640px) {
  .wrap {
    width: min(calc(100% - 24px), var(--hmn-max));
  }

  .topline__inner {
    flex-direction: column;
    gap: 3px;
  }

  .masthead {
    min-height: 92px;
    gap: 12px;
  }

  .brand {
    text-align: left;
  }

  .brand__name {
    font-size: 32px;
  }

  .primary-menu.is-open,
  .card-grid,
  .archive-grid {
    grid-template-columns: 1fr;
  }

  .front-hero {
    padding-top: 24px;
  }

  .hero-story {
    gap: 18px;
  }

  .hero-story h1,
  .article-header h1,
  .archive-header h1 {
    font-size: 31px;
  }

  .lead,
  .article-subtitle,
  .entry-content,
  .article-summary p {
    font-size: 16px;
  }

  .front-layout,
  .article-layout {
    padding-top: 28px;
  }

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

  .footer-menu {
    justify-content: flex-start;
  }
}
