/*
Theme Name: 나루
Theme URI: https://blog.naru.today
Author: 나루
Author URI: https://naru.today
Description: naru.today 공식 블로그 테마. 인디고 밤하늘, 노을과 달.
Version: 1.0.4
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 8.1
Text Domain: naru
*/

:root {
  --indigo: #0e0a24;
  --indigo2: #1b1442;
  --sheet: #2c2160;
  --amber: #f4a94c;
  --coral: #ec7a5a;
  --cream: #ffe9c7;
  --dim: rgba(255, 255, 255, 0.62);
  --line: rgba(255, 255, 255, 0.12);
  --ink: #3a1d10;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, var(--indigo2), var(--indigo) 42%, #07050f);
  color: var(--cream);
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic",
    "Noto Sans KR", Roboto, "Helvetica Neue", sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
.wrap { width: min(1040px, calc(100% - 40px)); margin: 0 auto; }

/* header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(14, 10, 36, 0.72);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 62px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.4px;
}
.logo img { width: 30px; height: 30px; }
.site-header .wrap.nav { position: relative; }
.menu-toggle {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-left: auto;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 233, 199, 0.45);
  color: var(--cream);
  border-radius: 10px;
  width: 42px;
  height: 38px;
  padding: 0;
  cursor: pointer;
}
.menu-toggle span {
  display: block;
  width: 16px;
  height: 2px;
  background: var(--cream);
  border-radius: 1px;
}
.nav-list {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: 62px;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  margin: 0;
  padding: 8px 20px 16px;
  font-size: 14px;
  color: var(--dim);
  background: rgba(14, 10, 36, 0.96);
  border-bottom: 1px solid var(--line);
  list-style: none;
}
.nav-list.is-open { display: flex; }
.nav-list li { padding: 10px 0; }
.nav-list a:hover,
.nav-list .current-menu-item > a,
.nav-list .current-menu-item > a:hover { color: var(--cream); }
.nav-list .menu-item:last-child a {
  background: linear-gradient(135deg, var(--amber), var(--coral));
  color: var(--ink);
  font-weight: 800;
  padding: 9px 17px;
  border-radius: 999px;
  font-size: 14px;
  white-space: nowrap;
}
.nav-list .menu-item:last-child a:hover { color: var(--ink); }
.cta {
  background: linear-gradient(135deg, var(--amber), var(--coral));
  color: var(--ink);
  font-weight: 800;
  padding: 9px 17px;
  border-radius: 999px;
  font-size: 14px;
  white-space: nowrap;
}

/* hero */
.hero {
  position: relative;
  overflow: hidden;
  padding: 72px 0 64px;
  text-align: center;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("assets/img/bg.png") center/cover;
  opacity: 0.3;
  mask-image: linear-gradient(180deg, #000 20%, transparent);
}
.hero-in { position: relative; }
.mascots {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin: 0 0 22px;
}
.mascots img {
  width: clamp(88px, 16vw, 124px);
  filter: drop-shadow(0 12px 30px rgba(244, 169, 76, 0.28));
}
.hero h1 {
  font-size: clamp(32px, 6vw, 52px);
  line-height: 1.18;
  margin: 0 0 12px;
  letter-spacing: -1.4px;
  font-weight: 800;
}
.hero h1 span {
  background: linear-gradient(135deg, var(--amber), var(--coral));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p {
  color: var(--dim);
  font-size: clamp(15px, 2vw, 17px);
  max-width: 520px;
  margin: 0 auto;
}

/* archive header */
.archive-head {
  padding: 48px 0 8px;
}
.archive-head h1 {
  font-size: clamp(26px, 4vw, 36px);
  letter-spacing: -0.8px;
  margin: 0 0 8px;
}
.archive-head p { color: var(--dim); margin: 0; max-width: 560px; }

/* posts */
.feed { padding: 28px 0 80px; }
.post-list { display: grid; gap: 0; }
.post-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding: 28px 0;
  border-top: 1px solid var(--line);
}
.post-card:first-child { border-top: 0; }
.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  font-size: 13px;
  color: var(--dim);
}
.cat {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid rgba(244, 169, 76, 0.45);
  color: var(--amber);
}
.cat-news {
  border-color: rgba(236, 122, 90, 0.55);
  color: var(--coral);
}
.cat-story {
  border-color: rgba(255, 233, 199, 0.35);
  color: var(--cream);
}
.post-card h2 {
  font-size: clamp(22px, 3vw, 28px);
  letter-spacing: -0.6px;
  margin: 0;
  font-weight: 800;
  line-height: 1.3;
}
.post-card h2 a:hover { color: var(--amber); }
.post-card .excerpt {
  color: var(--dim);
  margin: 0;
  max-width: 68ch;
}
.thumb {
  border-radius: 14px;
  overflow: hidden;
  max-width: 420px;
}
.thumb img { width: 100%; object-fit: cover; aspect-ratio: 16/9; }

/* empty */
.empty {
  text-align: center;
  padding: 48px 0 80px;
  color: var(--dim);
}
.empty img {
  width: 96px;
  margin: 0 auto 18px;
  filter: drop-shadow(0 10px 24px rgba(244, 169, 76, 0.25));
}
.empty h2 { color: var(--cream); margin: 0 0 8px; font-size: 24px; }
.empty p { margin: 0 0 22px; }

/* single */
.article { padding: 48px 0 80px; }
.article-inner { max-width: 720px; margin: 0 auto; }
.article-inner h1 {
  font-size: clamp(28px, 4.4vw, 40px);
  letter-spacing: -1px;
  line-height: 1.25;
  margin: 12px 0 18px;
  font-weight: 800;
}
.article-content {
  font-size: 17.5px;
  line-height: 1.72;
  letter-spacing: -0.02em;
  max-width: 36em;
}
.article-content p { margin: 0 0 1.05em; }
.article-content p + p { margin-top: 0; }
.article-content h2 {
  font-size: 1.15em;
  margin: 2.4em 0 1em;
  font-weight: 800;
  letter-spacing: -0.5px;
}
.article-content h3 {
}
.article-content a { color: var(--amber); text-decoration: underline; text-underline-offset: 3px; }
.article-content img { border-radius: 14px; margin: 1.4em 0; }
.featured {
  margin: 8px 0 28px;
  border-radius: 16px;
  overflow: hidden;
  max-width: 420px;
}
.featured img { width: 100%; height: auto; display: block; }

/* page */
.page-body { padding: 48px 0 80px; max-width: 720px; }

/* 404 */
.notfound { text-align: center; padding: 80px 0; }
.notfound h1 { font-size: 40px; margin: 0 0 10px; }

/* footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px 0 40px;
  color: var(--dim);
  font-size: 14px;
}
.footer-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}
.site-footer a:hover { color: var(--cream); }

.pagination {
  display: flex;
  gap: 10px;
  justify-content: center;
  padding: 12px 0 40px;
}
.pagination a, .pagination span {
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--dim);
}
.pagination .current { color: var(--ink); background: var(--amber); border-color: var(--amber); }

@media (min-width: 721px) {
  .menu-toggle { display: none; }
  .nav-list {
    display: flex;
    position: static;
    flex-direction: row;
    align-items: center;
    gap: 18px;
    margin: 0 0 0 auto;
    padding: 0;
    background: none;
    border: 0;
  }
  .nav-list.is-open { display: flex; }
  .nav-list li { padding: 0; }
}
