* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: #222;
  background: #f9f9f9;
}

/* Header */
header {
  background: #fff;
  border-bottom: 1px solid #e8e8e8;
  padding: 0 1.5rem;
}

header .inner {
  max-width: 780px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

header .site-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #222;
  text-decoration: none;
  letter-spacing: -0.3px;
}

header .site-desc {
  font-size: 0.8rem;
  color: #999;
}

/* Nav */
.site-nav {
  display: flex;
  gap: 0.2rem;
}

.nav-link {
  font-size: 0.85rem;
  color: #666;
  text-decoration: none;
  padding: 0.3rem 0.7rem;
  border-radius: 6px;
  transition: background 0.1s;
}

.nav-link:hover {
  background: #f0f0f0;
  color: #222;
}

/* Main */
main {
  max-width: 780px;
  margin: 2.5rem auto;
  padding: 0 1.5rem;
}

/* Topic tabs */
.topic-tabs {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
}

.tab {
  padding: 0.45rem 1rem;
  border: 1px solid #e0e0e0;
  border-radius: 20px;
  background: #fff;
  font-size: 0.85rem;
  color: #666;
  cursor: pointer;
  transition: all 0.15s;
}

.tab:hover {
  border-color: #aaa;
  color: #222;
}

.tab.active {
  background: #222;
  border-color: #222;
  color: #fff;
}

/* Topic badge */
.post-meta-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.3rem;
}

.topic-badge {
  font-size: 0.7rem;
  padding: 0.1rem 0.5rem;
  border-radius: 4px;
  font-weight: 600;
}

.topic-it-뉴스, .topic-it뉴스 {
  background: #e8f4fd;
  color: #1a6fa8;
}

.topic-경제금융 {
  background: #e8f8e8;
  color: #2a7a2a;
}

.topic-정치사회 {
  background: #fdf0e8;
  color: #a84a1a;
}

/* Post list */
.post-list {
  list-style: none;
}

.post-list li {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  padding: 1.4rem 1.6rem;
  margin-bottom: 1rem;
  transition: box-shadow 0.15s;
}

.post-list li:hover {
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
}

.post-date {
  font-size: 0.78rem;
  color: #aaa;
  margin-bottom: 0.3rem;
}

.post-list a {
  font-size: 1.05rem;
  font-weight: 600;
  color: #222;
  text-decoration: none;
  line-height: 1.4;
}

.post-list a:hover {
  color: #0066cc;
}

/* Post page */
.post-header {
  margin-bottom: 2rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid #e8e8e8;
}

.post-title {
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.5px;
  margin-bottom: 0.6rem;
}

.post-meta {
  font-size: 0.82rem;
  color: #aaa;
}

/* Post content */
.post-content h2 {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 2rem 0 0.8rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid #f0f0f0;
  color: #222;
}

.post-content p {
  margin-bottom: 1rem;
  color: #333;
}

.post-content a {
  color: #0066cc;
  text-decoration: none;
}

.post-content a:hover {
  text-decoration: underline;
}

.post-content ul, .post-content ol {
  margin: 0.5rem 0 1rem 1.4rem;
}

.post-content li {
  margin-bottom: 0.3rem;
}

.post-content strong {
  font-weight: 600;
  color: #111;
}

/* Back link */
.back-link {
  display: inline-block;
  font-size: 0.85rem;
  color: #888;
  text-decoration: none;
  margin-bottom: 1.8rem;
}

.back-link:hover {
  color: #0066cc;
}

/* Tags & Categories */
.tag-chip {
  display: inline-block;
  font-size: 0.78rem;
  color: #0066cc;
  background: #f0f6ff;
  border: 1px solid #cce0ff;
  border-radius: 20px;
  padding: 0.2rem 0.65rem;
  text-decoration: none;
  transition: background 0.1s;
}

.tag-chip:hover {
  background: #ddeeff;
}

.tag-chip span {
  color: #aaa;
  font-size: 0.72rem;
}

.tag-chip.small {
  font-size: 0.72rem;
  padding: 0.15rem 0.55rem;
}

.tag-chip.gray {
  color: #888;
  background: #f5f5f5;
  border-color: #e0e0e0;
}

.tag-chip.gray:hover {
  background: #ebebeb;
  color: #555;
}

.category-chip {
  color: #7c3aed;
  background: #f5f0ff;
  border-color: #ddd6fe;
}

.category-chip:hover {
  background: #ede9fe;
}

.post-tags {
  margin-top: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.meta-sep {
  margin: 0 0.3rem;
  color: #ccc;
}

/* Taxonomy pages */
.taxonomy-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 1.2rem;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
  padding: 1.2rem;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
}

.taxonomy-section {
  margin-bottom: 2.5rem;
}

.taxonomy-section-title {
  font-size: 1rem;
  font-weight: 700;
  color: #444;
  margin-bottom: 0.8rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid #f0f0f0;
}

/* Post navigation */
.post-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e8e8e8;
}

.post-nav-item {
  display: flex;
  flex-direction: column;
  max-width: 48%;
  text-decoration: none;
  padding: 0.9rem 1.1rem;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  transition: box-shadow 0.15s;
}

.post-nav-item:hover {
  box-shadow: 0 2px 10px rgba(0,0,0,0.07);
}

.post-nav-item.next {
  margin-left: auto;
  text-align: right;
}

.post-nav-item.disabled {
  color: #ccc;
  font-size: 0.85rem;
  align-self: center;
  border: none;
  padding: 0;
}

.nav-label {
  font-size: 0.75rem;
  color: #aaa;
  margin-bottom: 0.3rem;
}

.nav-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #222;
  line-height: 1.4;
}

@media (max-width: 600px) {
  .post-nav { flex-direction: column; }
  .post-nav-item { max-width: 100%; }
  .post-nav-item.next { margin-left: 0; text-align: left; }
}

/* Footer */
footer {
  text-align: center;
  font-size: 0.78rem;
  color: #bbb;
  padding: 2rem 1rem 3rem;
}

/* Empty state */
.empty {
  text-align: center;
  color: #aaa;
  padding: 4rem 0;
  font-size: 0.95rem;
}

@media (max-width: 600px) {
  .post-title { font-size: 1.3rem; }
  main { margin: 1.5rem auto; }
}
