@import url("https://cdn.jsdelivr.net/gh/fonts-archive/Paperlogy/subsets/Paperlogy-dynamic-subset.css");

@font-face {
  font-family: "Moonrising";
  src: url("../assets/fonts/Moonrising.ttf") format("truetype"),
       url("../assets/fonts/Moonrising.otf") format("opentype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

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

:root {
  --bg: #f8f6ff;
  --ink: #171223;
  --muted: #6d6386;
  --brand: #6434ee;
  --brand-dark: #3b1e69;
  --line: rgba(58, 33, 103, .12);
  --surface: rgba(255, 255, 255, .82);
  --surface-strong: #ffffff;
  --soft: #eee9ff;
}

html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 0%, rgba(165,153,238,.42), transparent 34rem),
    radial-gradient(circle at 88% 4%, rgba(100,52,238,.18), transparent 28rem),
    var(--bg);
  font-family: "Moonrising", "Paperlogy", -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR", sans-serif;
  line-height: 1.7;
  word-break: keep-all;
  overflow-wrap: break-word;
}

a { color: inherit; }

.latin {
  font-family: "Moonrising", sans-serif;
  letter-spacing: .14em;
}

.brand-word {
  font-family: "Moonrising", sans-serif;
  font-weight: normal;
  letter-spacing: .14em;
}

.container {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(248,246,255,.78);
  border-bottom: 1px solid rgba(58,33,103,.08);
  backdrop-filter: blur(18px);
}

.nav {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-weight: 800;
}

.logo img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
}

.logo span {
  font-family: "Moonrising", sans-serif;
  letter-spacing: .18em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-size: .95rem;
  font-weight: 700;
}

.nav-links a {
  text-decoration: none;
}

.nav-cta,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 12px;
  color: #fff;
  background: var(--brand);
  text-decoration: none;
  font-weight: 800;
  box-shadow: 0 12px 32px rgba(100,52,238,.22);
}

.button.secondary {
  color: var(--brand-dark);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: none;
}

.hero {
  padding: 72px 0 54px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 42px;
  align-items: center;
}

.eyebrow {
  color: var(--brand);
  font-family: "Moonrising", "Paperlogy", sans-serif;
  font-size: .9rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

h1 {
  max-width: 760px;
  font-size: clamp(2.45rem, 6vw, 4.6rem);
  line-height: 1.08;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 620px;
  margin-top: 20px;
  color: var(--muted);
  font-size: 1.12rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.feature-panel {
  min-height: 360px;
  padding: 28px;
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(59,30,105,.98), rgba(100,52,238,.82));
  color: #fff;
  box-shadow: 0 34px 90px rgba(59,30,105,.24);
}

.feature-panel h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  line-height: 1.2;
  margin-bottom: 16px;
}

.feature-panel p {
  color: #d9d0ff;
}

.topic-list {
  display: grid;
  gap: 10px;
  margin-top: 28px;
  list-style: none;
}

.topic-list li {
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.12);
}

.section {
  padding: 50px 0;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.section-head h2 {
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  line-height: 1.2;
}

.section-head p {
  max-width: 560px;
  color: var(--muted);
}

.category-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 22px;
}

.category-tabs button {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255,255,255,.62);
  font: inherit;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}

.category-tabs button.active {
  color: #fff;
  background: var(--brand);
  border-color: var(--brand);
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.article-card {
  min-height: 245px;
  display: flex;
  flex-direction: column;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  text-decoration: none;
  box-shadow: 0 18px 44px rgba(58,33,103,.07);
}

.article-card.featured {
  grid-column: span 2;
  background: #fff;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--brand);
  font-size: .88rem;
  font-weight: 800;
  margin-bottom: 14px;
}

.article-card h3 {
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  line-height: 1.35;
  margin-bottom: 12px;
}

.article-card p {
  color: var(--muted);
}

.article-card .read-more {
  margin-top: auto;
  color: var(--brand-dark);
  font-weight: 800;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 760px) 280px;
  gap: 52px;
  align-items: start;
  padding: 54px 0 80px;
}

.article {
  padding: 44px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-strong);
  box-shadow: 0 22px 70px rgba(58,33,103,.08);
}

.article h1 {
  font-size: clamp(2.1rem, 5vw, 3.5rem);
  margin-bottom: 18px;
}

.article .lead {
  color: var(--muted);
  font-size: 1.12rem;
  margin-bottom: 34px;
}

.article h2 {
  margin-top: 34px;
  margin-bottom: 10px;
  font-size: 1.55rem;
  line-height: 1.35;
}

.article p,
.article li {
  color: #413750;
}

.article ul {
  display: grid;
  gap: 8px;
  padding-left: 20px;
}

.article-cta,
.sidebar-box {
  padding: 24px;
  border-radius: 16px;
  background: var(--soft);
  border: 1px solid var(--line);
}

.article-cta {
  margin-top: 36px;
}

.article-cta p {
  margin: 8px 0 18px;
}

.sidebar {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 14px;
}

.sidebar-box h2 {
  font-size: 1.1rem;
  margin-bottom: 10px;
}

.sidebar-box a {
  display: block;
  color: var(--muted);
  text-decoration: none;
  font-weight: 800;
  margin-top: 10px;
}

.footer {
  padding: 38px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

@media (max-width: 860px) {
  .container { width: min(100% - 28px, 1120px); }
  .nav { align-items: flex-start; flex-direction: column; padding: 16px 0; }
  .nav-links { width: 100%; gap: 12px; overflow-x: auto; padding-bottom: 4px; }
  .hero-grid,
  .article-layout { grid-template-columns: 1fr; }
  .section-head { display: block; }
  .section-head p { margin-top: 10px; }
  .article-grid { grid-template-columns: 1fr; }
  .article-card.featured { grid-column: auto; }
  .article { padding: 28px 22px; }
  .sidebar { position: static; }
}
