/* =====================
   기본 리셋 & 변수
===================== */
:root {
  --point-color: [##_var_point-color_##];
  --bg: #f8fafc;
  --card-bg: #ffffff;
  --text: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --radius: 10px;
  --shadow: 0 2px 12px rgba(0,0,0,0.07);
}

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

body {
  font-family: 'Noto Sans KR', 'Apple SD Gothic Neo', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 15px;
}

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

/* =====================
   레이아웃
===================== */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

.main-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 30px;
  padding-top: 30px;
  padding-bottom: 60px;
}

/* =====================
   헤더
===================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.3s;
}

.site-header.scrolled {
  box-shadow: 0 2px 16px rgba(0,0,0,0.10);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 20px;
}

/* 헤더 로고 이미지 */
.header-logo a {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-logo-img {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

.header-logo-img img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: contain;
}

.header-logo-text {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--point-color);
}

/* 검색창 */
.header-search { flex: 1; max-width: 320px; }

.search-form {
  display: flex;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  background: var(--bg);
  transition: border-color 0.2s;
}

.search-form:focus-within {
  border-color: var(--point-color);
}

.search-input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 7px 14px;
  font-size: 13px;
  outline: none;
  color: var(--text);
}

.search-btn {
  background: none;
  border: none;
  padding: 0 12px;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
}

.search-btn:hover { color: var(--point-color); }

/* 네비게이션 */
.header-nav { margin-left: auto; }

.header-nav ul {
  display: flex;
  gap: 6px;
}

.header-nav ul li a {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  transition: background 0.2s, color 0.2s;
}

.header-nav ul li a:hover {
  background: var(--bg);
  color: var(--point-color);
}

/* 모바일 메뉴 버튼 */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--text);
  margin-left: auto;
}

.mobile-nav {
  display: none;
  background: #fff;
  border-top: 1px solid var(--border);
  padding: 10px 20px;
}

.mobile-nav.open { display: block; }

.mobile-nav ul { display: flex; flex-direction: column; gap: 4px; }

.mobile-nav ul li a {
  display: block;
  padding: 10px 0;
  font-size: 15px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

/* =====================
   페이지 타이틀 바
===================== */
.page-title-bar {
  background: var(--point-color);
  color: #fff;
  padding: 18px 0;
}

.page-title-bar h2 {
  font-size: 1.1rem;
  font-weight: 600;
}

/* =====================
   글 카드
===================== */
.main-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.post-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
}

.post-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 24px rgba(0,0,0,0.11);
}

.post-thumb img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.post-body { padding: 20px; }

.post-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
}

.post-category {
  background: var(--point-color);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
}

.post-date {
  font-size: 12px;
  color: var(--text-muted);
}

.post-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.4;
}

.post-title a:hover { color: var(--point-color); }

.post-summary {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-muted);
}

.read-more {
  background: var(--point-color);
  color: #fff;
  padding: 5px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  transition: opacity 0.2s;
}

.read-more:hover { opacity: 0.85; }

/* =====================
   페이지네이션
===================== */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 10px 0;
}

.pagination a {
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
  color: var(--text-muted);
  transition: background 0.2s, color 0.2s;
}

.pagination a:hover {
  background: var(--point-color);
  color: #fff;
  border-color: var(--point-color);
}

/* =====================
   사이드바
===================== */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sidebar-widget {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}

.widget-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--point-color);
}

/* =====================
   프로필 위젯
===================== */
.profile-widget {
  padding: 0;
  overflow: hidden;
}

.profile-box {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* 로고 상단 배경 영역 */
.profile-logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  background: linear-gradient(135deg, #e8f0fe 0%, #f0f7ff 100%);
  padding: 15px 0;
}

.profile-logo {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  overflow: hidden;
  background: #fff;
  border: 3px solid #fff;
  box-shadow: 0 4px 16px rgba(0,0,0,0.10);
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 5px;
}

/* 텍스트 영역 */
.profile-info {
  padding: 14px 18px 6px;
  width: 100%;
}

.profile-title {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.profile-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
  word-break: keep-all;
}

/* 구독 버튼 */
.profile-subscribe-btn {
  display: block;
  width: calc(100% - 36px);
  margin: 14px 18px 18px;
  padding: 9px 0;
  background: var(--point-color);
  color: #fff;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  transition: opacity 0.2s, transform 0.1s;
}

.profile-subscribe-btn:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}

/* 방문자수 */
.visitor-stats {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stat-item {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}

.stat-item:last-child { border-bottom: none; }

.stat-label { color: var(--text-muted); }

.stat-value {
  font-weight: 700;
  color: var(--point-color);
}

/* 카테고리 */
.category-list li a {
  display: flex;
  justify-content: space-between;
  padding: 7px 0;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  transition: color 0.2s;
}

.category-list li:last-child a { border-bottom: none; }

.category-list li a:hover { color: var(--point-color); }

/* 최근 글 */
.recent-posts li a {
  display: block;
  padding: 7px 0;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.2s;
}

.recent-posts li:last-child a { border-bottom: none; }

.recent-posts li a:hover { color: var(--point-color); }

/* 태그 클라우드 */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-cloud a {
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--text-muted);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.tag-cloud a:hover {
  background: var(--point-color);
  color: #fff;
  border-color: var(--point-color);
}

/* =====================
   푸터
===================== */
.site-footer {
  background: #1e293b;
  color: #94a3b8;
  padding: 28px 0;
  text-align: center;
  font-size: 13px;
}

.site-footer a {
  color: #cbd5e1;
  margin: 0 6px;
}

.site-footer a:hover { color: #fff; }

/* =====================
   반응형
===================== */
@media (max-width: 900px) {
  .main-layout {
    grid-template-columns: 1fr;
  }
  .sidebar {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  .header-nav { display: none; }
  .header-search { display: none; }
  .mobile-menu-btn { display: block; }
  .sidebar { grid-template-columns: 1fr; }
  .post-thumb img { height: 160px; }
}