/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* Layout */
.container { max-width: 820px; margin: 0 auto; padding: 0 20px; }

/* Navigation */
.site-nav {
  border-bottom: 2px solid #f0f0f0;
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-inner {
  display: flex;
  align-items: center;
  gap: 0;
  max-width: 820px;
  margin: 0 auto;
  padding: 0 20px;
  height: 56px;
}
.nav-logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-right: 28px;
  white-space: nowrap;
}
.nav-links { display: flex; gap: 4px; flex-wrap: wrap; }
.nav-links a {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.9rem;
  color: #555;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.nav-links a:hover { background: #f5f5f5; color: #111; }
.nav-links a.active { font-weight: 600; color: #111; }

/* Category badge colors */
.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #fff;
}
.badge-it      { background: #4CAF50; }
.badge-life    { background: #2196F3; }
.badge-finance { background: #FF9800; }
.badge-health  { background: #E91E63; }
.badge-review  { background: #9C27B0; }

/* Post Card */
.card-list { display: flex; flex-direction: column; gap: 0; }
.card {
  display: flex;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid #f0f0f0;
  align-items: flex-start;
}
.card:last-child { border-bottom: none; }
.card-thumb {
  width: 160px;
  min-width: 160px;
  height: 90px;
  border-radius: 8px;
  overflow: hidden;
  background: #f0f0f0;
}
.card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.card-body { flex: 1; }
.card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.card-date { font-size: 0.78rem; color: #999; }
.card-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 6px;
  color: #1a1a1a;
}
.card-title:hover { color: #4CAF50; }
.card-desc { font-size: 0.85rem; color: #666; line-height: 1.5; }

/* Page header */
.page-header {
  padding: 40px 0 24px;
  border-bottom: 2px solid #f0f0f0;
  margin-bottom: 32px;
}
.page-header h1 { font-size: 1.6rem; font-weight: 700; }
.page-header p { color: #666; margin-top: 6px; }

/* Post content */
.post-header { padding: 32px 0 24px; }
.post-header h1 { font-size: 1.75rem; font-weight: 800; line-height: 1.3; }
.post-meta { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.post-date { font-size: 0.82rem; color: #999; }
.post-updated { font-size: 0.78rem; color: #bbb; margin-top: 6px; }

.post-thumb {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 32px;
}
.post-thumb img { width: 100%; height: auto; }

.post-content h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 36px 0 12px;
  padding-bottom: 6px;
  border-bottom: 2px solid #f0f0f0;
  color: #1a1a1a;
}
.post-content h3 { font-size: 1.05rem; font-weight: 700; margin: 24px 0 8px; }
.post-content p { margin-bottom: 16px; }
.post-content ul, .post-content ol { margin: 12px 0 16px 24px; }
.post-content li { margin-bottom: 6px; }
.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 0.9rem;
}
.post-content th {
  background: #f8f8f8;
  padding: 10px 14px;
  text-align: left;
  border: 1px solid #e0e0e0;
  font-weight: 700;
}
.post-content td {
  padding: 10px 14px;
  border: 1px solid #e0e0e0;
}
.post-content tr:nth-child(even) td { background: #fafafa; }
.post-content strong { font-weight: 700; }
.post-content a { color: #2196F3; text-decoration: underline; }
.post-content blockquote {
  border-left: 4px solid #e0e0e0;
  padding: 12px 20px;
  margin: 16px 0;
  background: #fafafa;
  color: #555;
  border-radius: 0 8px 8px 0;
}

/* Related posts */
.related-posts { margin-top: 48px; padding-top: 32px; border-top: 2px solid #f0f0f0; }
.related-posts h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 16px; }
.related-grid { display: flex; flex-direction: column; gap: 0; }

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  padding: 40px 0;
}
.pagination a, .pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 6px;
  font-size: 0.9rem;
  border: 1px solid #e0e0e0;
  color: #555;
}
.pagination a:hover { background: #f5f5f5; }
.pagination .current { background: #333; color: #fff; border-color: #333; font-weight: 700; }
.pagination .prev-next { width: auto; padding: 0 14px; }

/* Category page */
.category-hero {
  padding: 32px 24px;
  border-radius: 12px;
  margin-bottom: 32px;
  color: #fff;
}
.category-hero h1 { font-size: 1.6rem; font-weight: 800; }
.category-hero p { margin-top: 6px; opacity: 0.85; font-size: 0.9rem; }

.cat-it      .category-hero { background: linear-gradient(135deg, #2D5016, #4CAF50); }
.cat-life    .category-hero { background: linear-gradient(135deg, #1A237E, #2196F3); }
.cat-finance .category-hero { background: linear-gradient(135deg, #E65100, #FF9800); }
.cat-health  .category-hero { background: linear-gradient(135deg, #880E4F, #E91E63); }
.cat-review  .category-hero { background: linear-gradient(135deg, #4A148C, #9C27B0); }

/* CTA Button */
.cta-wrap { margin: 32px 0; text-align: center; }
.cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 17px 36px;
  border-radius: 12px;
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  transition: filter 0.15s, transform 0.12s, box-shadow 0.15s;
  box-shadow: 0 4px 14px rgba(0,0,0,0.18);
  min-width: 240px;
}
.cta-btn:hover { filter: brightness(1.12); transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,0.22); color: #fff; }
.cta-btn:active { transform: translateY(0); filter: brightness(0.97); }

/* 카테고리별 버튼 색상 */
.cta-cat-it      { background: linear-gradient(135deg, #2D5016, #4CAF50); }
.cta-cat-life    { background: linear-gradient(135deg, #1A237E, #2196F3); }
.cta-cat-finance { background: linear-gradient(135deg, #E65100, #FF9800); }
.cta-cat-health  { background: linear-gradient(135deg, #880E4F, #E91E63); }
.cta-cat-review  { background: linear-gradient(135deg, #4A148C, #9C27B0); }

.cta-icon { font-size: 1.15rem; flex-shrink: 0; }
.cta-text { line-height: 1.2; }

@media (max-width: 600px) {
  .cta-btn { width: 100%; min-width: unset; padding: 16px 20px; font-size: 1rem; }
}

/* Footer */
.site-footer {
  border-top: 1px solid #f0f0f0;
  padding: 32px 0;
  margin-top: 60px;
  font-size: 0.85rem;
  color: #999;
  text-align: center;
}
.footer-links { display: flex; justify-content: center; gap: 20px; margin-bottom: 12px; }
.footer-links a { color: #999; }
.footer-links a:hover { color: #333; }

/* Responsive */
@media (max-width: 600px) {
  .nav-links { display: none; }
  .card { flex-direction: column; }
  .card-thumb { width: 100%; height: 180px; min-width: unset; }
  .post-header h1 { font-size: 1.4rem; }
}
