/* ============================================
   hELLO-inspired Hugo Theme — Light Mode Only
   마루부리 폰트 + 클린 미니멀 레이아웃
   ============================================ */

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

html {
  line-height: 1.8;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  font-family: "Maru Buri", ui-sans-serif, system-ui, -apple-system, sans-serif;
}

body {
  background-color: #fff;
  color: #1e1f21;
  min-height: 100vh;
}

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

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

/* --- Layout --- */
.site-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.site-main {
  flex: 1;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* --- Header --- */
.site-header {
  border-bottom: 1px solid #e6e6e9;
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.2rem;
  font-weight: 700;
  color: #1e1f21;
  letter-spacing: -0.02em;
}

.logo-img {
  width: auto;
  height: 48px;
  border-radius: 4px;
}

.logo-text {
  transition: color 0.2s;
}

.site-logo:hover .logo-text {
  color: #5a6ded;
}

.site-nav {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.nav-link {
  font-size: 0.9rem;
  color: #66666e;
  transition: color 0.2s;
}

.nav-link:hover,
.nav-link.active {
  color: #1e1f21;
}

.theme-toggle {
  display: none; /* 라이트 모드 전용이므로 숨김 */
}

/* --- Home / List Page --- */
.list-page {
  padding-top: 1rem;
}

.list-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #1e1f21;
}

.home-intro {
  color: #66666e;
  font-size: 0.95rem;
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #e6e6e9;
}

/* --- Post List --- */
.post-list {
  display: flex;
  flex-direction: column;
}

.post-item {
  padding: 1.5rem 0;
  border-bottom: 1px solid #e6e6e9;
}

.post-item:first-child {
  padding-top: 0;
}

.post-link {
  display: block;
}

.post-link:hover .post-title {
  color: #5a6ded;
}

.post-meta {
  font-size: 0.85rem;
  color: #9999a1;
  margin-bottom: 0.4rem;
}


.post-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #1e1f21;
  line-height: 1.5;
  transition: color 0.2s;
  margin-bottom: 0.4rem;
}

.post-desc {
  font-size: 0.9rem;
  color: #66666e;
  line-height: 1.7;
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.tag {
  font-size: 0.8rem;
  color: #5a6ded;
  background: #f4f4f6;
  padding: 0.15rem 0.6rem;
  border-radius: 4px;
  transition: background 0.2s;
}

.tag:hover {
  background: #e6e6e9;
}

/* --- Single Post --- */
.post-single {
  padding-top: 1rem;
}

.post-header {
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #e6e6e9;
}

.post-header .post-title {
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 0.75rem;
  color: #1e1f21;
  word-break: keep-all;
}

.post-header .post-meta {
  font-size: 0.85rem;
  color: #9999a1;
  margin-bottom: 0.75rem;
}

.post-header .post-tags {
  margin-top: 0.5rem;
}

/* --- Post Content (본문) --- */
.post-content {
  font-size: 1rem;
  line-height: 1.9;
  color: #353438;
  word-break: keep-all;
}

.post-content h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: #1e1f21;
  margin: 2.5rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e6e6e9;
}

.post-content h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #1e1f21;
  margin: 2rem 0 0.75rem;
}

.post-content h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #353438;
  margin: 1.5rem 0 0.5rem;
}

.post-content p {
  margin-bottom: 1.25rem;
}

.post-content a {
  color: #5a6ded;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.post-content a:hover {
  color: #3d4fd9;
}

.post-content strong {
  font-weight: 700;
  color: #1e1f21;
}

.post-content blockquote {
  border-left: 3px solid #5a6ded;
  padding: 0.75rem 1.25rem;
  margin: 1.5rem 0;
  background: #f8f8fa;
  color: #353438;
  font-size: 0.95rem;
}

.post-content blockquote p:last-child {
  margin-bottom: 0;
}

.post-content ul,
.post-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}

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

.post-content hr {
  border: none;
  border-top: 1px solid #e6e6e9;
  margin: 2.5rem 0;
}

.post-content code {
  font-family: "D2Coding", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.88rem;
  background: #f4f4f6;
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  color: #353438;
}

.post-content pre {
  background: #f4f4f6;
  padding: 1.25rem;
  border-radius: 6px;
  overflow-x: auto;
  margin: 1.5rem 0;
}

.post-content pre code {
  background: none;
  padding: 0;
  font-size: 0.85rem;
  line-height: 1.6;
}

/* --- Tables (가격 테이블, 일정 테이블) --- */
.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0;
  font-size: 0.9rem;
}

.post-content th {
  text-align: left;
  font-weight: 700;
  color: #1e1f21;
  padding: 0.6rem 0.75rem;
  border-bottom: 2px solid #1e1f21;
  background: #f8f8fa;
}

.post-content td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid #e6e6e9;
  color: #353438;
}

.post-content tr:hover td {
  background: #f8f8fa;
}

/* --- Post Navigation --- */
.post-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 0;
}

.nav-prev, .nav-next {
  flex: 1;
  padding: 1rem;
  border: 1px solid #e6e6e9;
  border-radius: 8px;
  transition: border-color 0.2s;
}

.nav-prev:hover, .nav-next:hover {
  border-color: #5a6ded;
}

.nav-next {
  text-align: right;
}

.nav-label {
  display: block;
  font-size: 0.8rem;
  color: #9999a1;
  margin-bottom: 0.25rem;
}

.nav-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #1e1f21;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* --- Comments (giscus) --- */
.post-comments {
  margin-top: 2rem;
  padding-top: 0;
}

/* --- Footer --- */
.site-footer {
  border-top: 1px solid #e6e6e9;
  margin-top: 2rem;
}

.footer-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  text-align: center;
  font-size: 0.8rem;
  color: #9999a1;
}

/* --- Pagination --- */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  padding: 2rem 0 1rem;
  list-style: none;
}

.page-item .page-link {
  display: inline-block;
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
  color: #66666e;
  border: 1px solid #e6e6e9;
  border-radius: 4px;
  transition: all 0.2s;
}

.page-item .page-link:hover {
  border-color: #5a6ded;
  color: #5a6ded;
}

.page-item.active .page-link {
  background: #1e1f21;
  color: #fff;
  border-color: #1e1f21;
}

.page-item.disabled .page-link {
  color: #ccc;
  pointer-events: none;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .site-main {
    padding: 1.5rem 1rem;
  }

  .header-inner {
    padding: 1rem;
    flex-wrap: wrap;
  }

  .site-nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
    white-space: nowrap;
    gap: 1rem;
    padding-top: 0.5rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .site-nav::-webkit-scrollbar {
    display: none;
  }

  .nav-link {
    font-size: 0.85rem;
    flex-shrink: 0;
  }

  .post-header .post-title {
    font-size: 1.3rem;
  }

  .post-content h2 {
    font-size: 1.2rem;
  }

  .post-nav {
    flex-direction: column;
  }

  .nav-next {
    text-align: left;
  }
}
