/* ===== 민호네 공통 스타일 ===== */
:root {
  --bg: #fff8ec;
  --paper: #ffffff;
  --ink: #2f2a26;
  --muted: #7a6f66;
  --line: #f0e4d2;
  --accent: #ff7a59;
  --accent-dark: #e05f3f;
  --sky: #5ab4e5;
  --leaf: #7cc96b;
  --sun: #ffd166;
  --radius: 20px;
  --shadow: 0 6px 18px rgba(80, 50, 20, 0.08);
  --font-title: "Jua", "Noto Sans KR", sans-serif;
  --font-body: "Gowun Dodum", "Noto Sans KR", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 19px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--font-title); font-weight: 400; line-height: 1.25; margin: 0 0 0.4em; }
h1 { font-size: 2.2rem; }
h2 { font-size: 1.7rem; }
h3 { font-size: 1.3rem; }
button { font-family: inherit; font-size: inherit; cursor: pointer; }
input, textarea { font-family: inherit; font-size: inherit; }

.container { width: min(960px, 100% - 32px); margin: 0 auto; }

/* ===== 헤더 ===== */
.site-header {
  background: var(--paper);
  border-bottom: 4px solid var(--sun);
  position: sticky; top: 0; z-index: 20;
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 10px 0; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-title); font-size: 1.5rem; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand img { width: 44px; height: 44px; border-radius: 50%; background: var(--sun); }
.nav { display: flex; gap: 6px; flex-wrap: wrap; }
.nav a {
  padding: 8px 14px; border-radius: 999px; color: var(--ink);
  font-family: var(--font-title); font-size: 1.1rem;
}
.nav a:hover { background: var(--line); text-decoration: none; }
.nav a.active { background: var(--accent); color: #fff; }

main { padding: 28px 0 48px; }

/* ===== 푸터 ===== */
.site-footer { text-align: center; color: var(--muted); padding: 24px 0 40px; font-size: 0.9rem; }

/* ===== 홈: 소개 ===== */
.hero {
  display: grid; grid-template-columns: 180px 1fr; gap: 28px; align-items: center;
  background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 28px;
}
.hero .avatar {
  width: 180px; height: 180px; border-radius: 50%; background: var(--sun);
  border: 6px solid #fff; box-shadow: var(--shadow); object-fit: cover;
}
.hero h1 { margin-bottom: 6px; }
.hero .greeting { color: var(--accent-dark); font-family: var(--font-title); font-size: 1.3rem; margin: 0 0 8px; }
.hero p { margin: 0 0 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.chips li {
  background: var(--bg); border: 2px solid var(--line); border-radius: 999px;
  padding: 4px 14px; font-size: 1rem;
}

.section { margin-top: 40px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-head .more { font-family: var(--font-title); }

/* ===== 기사 카드 ===== */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.card {
  background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow);
  overflow: hidden; color: var(--ink); display: flex; flex-direction: column;
  transition: transform 0.15s;
}
.card:hover { transform: translateY(-3px); text-decoration: none; }
.card .thumb { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; background: var(--line); }
.card .card-body { padding: 14px 18px 18px; }
.card .meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.card .date { color: var(--muted); font-size: 0.95rem; }
.card .comment-badge {
  background: var(--sun); color: var(--ink); border-radius: 999px;
  padding: 2px 10px; font-size: 0.85rem; font-family: var(--font-title); white-space: nowrap;
}
.card h3 { margin: 4px 0 0; }
.empty { color: var(--muted); text-align: center; padding: 40px 0; }

/* ===== 기사 상세 ===== */
.article-head { margin-bottom: 20px; }
.article-head .date { color: var(--muted); }
.article-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
.original {
  background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 14px; position: sticky; top: 90px;
}
.original img { width: 100%; border-radius: 12px; cursor: zoom-in; }
.original .hint { text-align: center; color: var(--muted); font-size: 0.9rem; margin: 8px 0 0; }
.digital {
  background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 24px 28px; font-size: 1.25rem; line-height: 1.8;
}
.digital p { margin: 0 0 1em; }
.digital .byline { font-family: var(--font-title); color: var(--accent-dark); margin-bottom: 12px; }
.digital .note {
  margin-top: 20px; padding: 12px 16px; background: var(--bg); border-left: 5px solid var(--sun);
  border-radius: 8px; font-size: 1rem; color: var(--muted);
}
.article-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
.article-nav a {
  background: var(--paper); border-radius: 999px; padding: 10px 18px; box-shadow: var(--shadow);
  font-family: var(--font-title); color: var(--ink);
}
.article-nav a:hover { text-decoration: none; background: var(--sun); }

/* ===== 댓글 ===== */
.comments { margin-top: 40px; background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px 28px; }
.comment-list { list-style: none; padding: 0; margin: 0 0 20px; }
.comment-list li { border-bottom: 2px dashed var(--line); padding: 12px 0; }
.comment-list li:last-child { border-bottom: 0; }
.comment-list .who { font-family: var(--font-title); color: var(--accent-dark); }
.comment-list .when { color: var(--muted); font-size: 0.85rem; margin-left: 8px; }
.comment-list .text { margin: 4px 0 0; white-space: pre-wrap; }
.comment-form { display: grid; gap: 10px; }
.comment-form input, .comment-form textarea {
  width: 100%; border: 2px solid var(--line); border-radius: 12px; padding: 10px 14px; background: var(--bg);
}
.comment-form textarea { min-height: 90px; resize: vertical; }
.comment-form input:focus, .comment-form textarea:focus { outline: none; border-color: var(--sky); }
.btn {
  background: var(--accent); color: #fff; border: 0; border-radius: 999px; padding: 10px 22px;
  font-family: var(--font-title); font-size: 1.1rem; justify-self: start;
}
.btn:hover { background: var(--accent-dark); }
.btn:disabled { opacity: 0.6; cursor: wait; }
.notice { color: var(--muted); background: var(--bg); border-radius: 12px; padding: 14px 16px; }
.notice.error { color: #b23a2b; }

/* ===== 갤러리 ===== */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.gallery-item {
  background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
  border: 0; padding: 0; text-align: left; color: var(--ink); width: 100%;
}
.gallery-item img { aspect-ratio: 1; object-fit: cover; width: 100%; background: var(--line); }
.gallery-item .meta { padding: 10px 14px 14px; }
.gallery-item .meta .date { color: var(--muted); font-size: 0.9rem; }
.gallery-item h3 { margin: 0; font-size: 1.15rem; }

/* ===== 라이트박스 ===== */
.lightbox {
  position: fixed; inset: 0; background: rgba(30, 20, 10, 0.88); z-index: 50;
  display: none; align-items: center; justify-content: center; padding: 20px; cursor: zoom-out;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 100%; max-height: 85vh; border-radius: 12px; box-shadow: 0 10px 40px rgba(0,0,0,0.5); }
.lightbox .caption { position: absolute; bottom: 20px; left: 0; right: 0; text-align: center; color: #fff; font-size: 1.1rem; }
.lightbox .close {
  position: absolute; top: 16px; right: 16px; width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: #fff; font-size: 1.4rem; line-height: 1;
}

/* ===== 반응형 ===== */
@media (max-width: 720px) {
  body { font-size: 17px; }
  h1 { font-size: 1.8rem; }
  .hero { grid-template-columns: 1fr; text-align: center; padding: 22px; }
  .hero .avatar { margin: 0 auto; width: 140px; height: 140px; }
  .chips { justify-content: center; }
  .article-layout { grid-template-columns: 1fr; }
  .original { position: static; }
  .digital { padding: 20px; font-size: 1.15rem; }
  .comments { padding: 20px; }
}
