@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;700&display=swap');

:root {
  --ink: #000000;
  --paper: #ffffff;
  --line: #000000;
  --soft: #e4e4e4;
  --mute: #5a5a5a;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding-bottom: 82px;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Noto Sans KR', system-ui, -apple-system, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  font-weight: 400;
}

h1, h2, h3 {
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.22;
}

p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

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

a { color: var(--ink); }

/* ---------- 底部固定条 ---------- */
.bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.55rem 1rem;
  background: var(--paper);
  border-top: 1px solid var(--line);
}

.brand {
  position: relative;
  z-index: 2;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
  padding: 0.55rem 0.2rem;
  transition: color 0.2s ease;
}

.bar-right {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cta {
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  padding: 0.62rem 1.05rem;
  border-radius: 4px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  transition: background 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

.cta:hover { background: var(--paper); color: var(--ink); outline: 1px solid var(--ink); }

.burger {
  font: inherit;
  font-size: 1rem;
  min-height: 44px;
  padding: 0.55rem 0.9rem;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

body.nav-open .burger { background: var(--ink); color: var(--paper); border-color: var(--paper); }
body.nav-open .brand { color: var(--paper); }
body.nav-open .cta { opacity: 0; visibility: hidden; }

/* ---------- 全屏遮罩菜单 ---------- */
.nav {
  position: fixed;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--paper);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

body.nav-open .nav { opacity: 1; visibility: visible; }

.nav p {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem 0.9rem;
  max-width: 36rem;
  margin: 0;
  padding: 1.2rem 1.2rem 4.5rem;
}

.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0.7rem 1.1rem;
  color: var(--paper);
  text-decoration: none;
  font-size: 1.1rem;
  border: 1px solid #3d3d3d;
  border-radius: 4px;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.nav a:hover,
.nav a:focus-visible { background: var(--paper); color: var(--ink); border-color: var(--paper); }

/* ---------- 顶部大图 ---------- */
.hero {
  position: relative;
  min-height: 45vh;
  display: grid;
  place-items: center;
  text-align: center;
  overflow: hidden;
  background: var(--ink);
  color: var(--paper);
  padding: 3.2rem 1.25rem 5rem;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 92%);
}

.hero-img {
  position: absolute;
  top: -12%;
  left: 0;
  width: 100%;
  height: 124%;
  object-fit: cover;
  opacity: 0.45;
  will-change: transform;
}

.hero-in {
  position: relative;
  z-index: 1;
  max-width: 36rem;
}

.hero h1 {
  font-size: clamp(1.85rem, 5.2vw, 3.1rem);
  margin-bottom: 1.1rem;
}

.hero h1::after {
  content: '';
  display: block;
  width: 56px;
  height: 4px;
  margin: 1.15rem auto 0;
  background: var(--paper);
}

.hero-desc {
  margin: 0 0 1.5rem;
  font-weight: 300;
  color: #ededed;
}

.hero-act a {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0.7rem 1.5rem;
  border: 1px solid var(--paper);
  border-radius: 4px;
  color: var(--paper);
  text-decoration: none;
  font-weight: 500;
  transition: background 0.2s ease, color 0.2s ease;
}

.hero-act a:hover { background: var(--paper); color: var(--ink); }

/* ---------- 主网格 ---------- */
.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 1.25rem 5rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 245px;
  gap: 2.5rem;
  align-items: start;
}

.col { min-width: 0; }

/* ---------- 正文 ---------- */
.prose > article {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1.7rem 1.4rem;
  margin: 0 0 2rem;
  scroll-margin-top: 1.5rem;
  transition: border-color 0.22s ease;
}

.prose > article:last-child { margin-bottom: 0; }

.prose h2 {
  font-size: 1.45rem;
  margin-bottom: 0.8rem;
}

.prose h3 {
  font-size: 1.15rem;
  margin: 1.6rem 0 0.5rem;
}

.prose p { margin: 0 0 1rem; }

.prose ul, .prose ol { margin: 0 0 1rem; padding-left: 1.25rem; }
.prose li { margin-bottom: 0.4rem; }

.prose a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: background 0.2s ease, color 0.2s ease;
}

.prose a:hover { background: var(--ink); color: var(--paper); text-decoration: none; }

.prose img { border-radius: 4px; margin: 0 0 1rem; }

.prose blockquote {
  margin: 0 0 1rem;
  padding: 0.2rem 0 0.2rem 1.1rem;
  border-left: 4px solid var(--ink);
  font-weight: 300;
}

.prose table { width: 100%; border-collapse: collapse; margin: 0 0 1rem; }
.prose th, .prose td { border: 1px solid var(--soft); padding: 0.5rem 0.6rem; text-align: left; }

/* ---------- 侧栏 ---------- */
.side {
  position: sticky;
  top: 1.5rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1.2rem 1.1rem;
}

.side h2 { font-size: 1.05rem; }

.subtitle {
  font-weight: 300;
  color: var(--mute);
  margin: 0.25rem 0 1rem;
}

.side ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

.side li {
  opacity: 0;
  animation: rise 0.42s ease forwards;
}

.side li:nth-child(1) { animation-delay: 0.04s; }
.side li:nth-child(2) { animation-delay: 0.09s; }
.side li:nth-child(3) { animation-delay: 0.14s; }
.side li:nth-child(4) { animation-delay: 0.19s; }
.side li:nth-child(5) { animation-delay: 0.24s; }
.side li:nth-child(6) { animation-delay: 0.29s; }
.side li:nth-child(7) { animation-delay: 0.34s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.side a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0.5rem 0.2rem;
  text-decoration: none;
  border-bottom: 1px solid var(--soft);
  transition: padding 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.side li:last-child a { border-bottom: 0; }

.side a:hover { background: var(--ink); color: var(--paper); padding-left: 0.5rem; }

/* ---------- 页脚 ---------- */
footer {
  background: var(--ink);
  color: var(--paper);
  padding: 2.6rem 1.25rem 2rem;
}

footer article {
  max-width: 1200px;
  margin: 0 auto;
}

.foot-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1.6rem;
  margin-bottom: 1.2rem;
  border-bottom: 1px solid #333333;
}

.foot-cta h2 { font-size: clamp(1.55rem, 4.2vw, 2.3rem); }
.foot-cta .subtitle { color: #b4b4b4; margin: 0.35rem 0 0; }

.btn {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0.7rem 1.4rem;
  border: 1px solid var(--paper);
  border-radius: 4px;
  color: var(--paper);
  text-decoration: none;
  font-weight: 500;
  transition: background 0.2s ease, color 0.2s ease;
}

.btn:hover { background: var(--paper); color: var(--ink); }

.foot-end {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.copy { margin: 0; color: #cfcfcf; }

.foot-links {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.foot-links a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0.45rem 0.8rem;
  color: var(--paper);
  text-decoration: none;
  border: 1px solid #3d3d3d;
  border-radius: 4px;
  transition: background 0.2s ease, color 0.2s ease;
}

.foot-links a:hover { background: var(--paper); color: var(--ink); }

/* ---------- 响应式 ---------- */
@media (max-width: 880px) {
  .wrap {
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
    padding-top: 2.4rem;
  }
  .side { position: static; order: 2; }
  .side ol { display: grid; grid-template-columns: 1fr 1fr; gap: 0 0.8rem; }
  .side a { border-bottom: 1px solid var(--soft); }
  .side li { opacity: 1; animation: none; }
}

@media (max-width: 600px) {
  body { font-size: 16.5px; }
  .hero {
    min-height: 42vh;
    padding: 2.6rem 1.1rem 4.4rem;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 96%);
  }
  .hero h1::after { margin-top: 0.9rem; }
  .wrap { padding: 2.2rem 1rem 4rem; }
  .prose > article { padding: 1.3rem 1.05rem; }
  .side ol { grid-template-columns: 1fr; }
  .foot-cta { flex-direction: column; align-items: flex-start; }
  .foot-end { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-img { transform: none !important; }
  .side li { opacity: 1; animation: none; }
  * { transition-duration: 0.01ms !important; }
}

button[aria-expanded]{min-width:44px;min-height:44px}
