@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css");

:root {
  --bg: #fcfbf8;
  --paper: #ffffff;
  --text: #1a1a1a;
  --muted: #625d56;
  --line: #ddd6cb;
  --strong-line: #cbbfb0;
  --accent: #7f6c58;
  --accent-soft: #efe8de;
  --shadow: 0 18px 36px rgba(112, 94, 74, 0.08);
  --max-width: 1360px;
  --reading-width: 1040px;
  --media-width: 1160px;
  --result-width: 1240px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: linear-gradient(180deg, #fefdfb 0%, var(--bg) 100%);
  color: var(--text);
  font-size: 16.5px;
  font-family: "Pretendard", "Noto Sans KR", "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.site-header {
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(6px);
}

.site-header-inner,
.page,
.site-footer-inner {
  width: min(calc(100% - 48px), var(--max-width));
  margin: 0 auto;
}

.site-header-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  padding: 24px 0 18px;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  padding: 12px 0 0;
  font-size: 0.98rem;
  background: transparent;
  border: 0;
  border-top: 1px solid var(--line);
}

.site-nav a {
  color: var(--muted);
  padding: 8px 0;
  border-radius: 0;
  border-bottom: 1px solid transparent;
  transition: color 160ms ease, border-color 160ms ease;
}

.site-nav a:hover {
  text-decoration: none;
  color: var(--text);
}

.site-nav a.current {
  color: var(--text);
  font-weight: 700;
  background: transparent;
  box-shadow: none;
  border-bottom-color: var(--accent);
}

.page {
  padding: 48px 0 82px;
}

.hero {
  padding-bottom: 26px;
  border-bottom: 1px solid var(--strong-line);
  position: relative;
}

.hero::before {
  content: "";
  display: block;
  width: 42px;
  height: 2px;
  margin: 0 auto 18px;
  background: var(--accent-soft);
}

.hero-home {
  text-align: center;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.76rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

h1,
h2,
h3,
h4 {
  margin-top: 0;
  color: var(--text);
  line-height: 1.35;
  font-family: "Pretendard", "Noto Sans KR", "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
  font-weight: 700;
}

h1 {
  font-size: clamp(2.45rem, 4vw, 3.9rem);
  margin-bottom: 18px;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 1.72rem;
  margin-bottom: 16px;
}

h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
}

h4 {
  font-size: 1.06rem;
  margin-bottom: 10px;
}

.doc-section > h2,
.subsection-block > h3,
.nested-block > h4 {
  position: relative;
  padding-left: 20px;
}

.doc-section > h2::before,
.subsection-block > h3::before,
.nested-block > h4::before {
  content: "";
  position: absolute;
  left: 0;
  border-radius: 999px;
  background: rgba(141, 84, 43, 0.9);
}

.doc-section > h2::before {
  top: 0.78em;
  width: 12px;
  height: 3px;
}

.subsection-block > h3::before {
  top: 0.74em;
  width: 10px;
  height: 2px;
}

.nested-block > h4::before {
  top: 0.72em;
  width: 8px;
  height: 2px;
  background: rgba(141, 84, 43, 0.7);
}

p,
li,
td,
th {
  margin: 0 0 12px;
  line-height: 1.84;
  word-break: keep-all;
}

.hero-home h1 {
  max-width: 1040px;
  margin-left: auto;
  margin-right: auto;
}

.hero-meta {
  margin-bottom: 4px;
  color: var(--muted);
}

.hero-meta:first-of-type {
  margin-top: 10px;
  color: var(--text);
  font-weight: 600;
}

.paper-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 18px;
  font-size: 1rem;
}

.paper-links a {
  color: var(--text);
  border-bottom: 1px solid var(--line);
}

.keyword-line {
  margin-top: 18px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1rem;
}

.keyword-line strong {
  color: var(--text);
  font-weight: 600;
}

section {
  margin-top: 40px;
}

.doc-section {
  padding-top: 2px;
}

.doc-section + .doc-section {
  border-top: 1px solid var(--line);
  padding-top: 34px;
}

.doc-section > h2,
.doc-section > p,
.doc-section > ul,
.doc-section > ol,
.reading-block {
  width: min(100%, var(--reading-width));
}

.reading-block > :last-child {
  margin-bottom: 0;
}

.hero p,
.muted {
  color: var(--muted);
}

.lead {
  font-size: 1.1rem;
  color: var(--text);
}

.abstract-block,
.callout,
.asset-placeholder,
.info-card,
.metric-card {
  box-shadow: var(--shadow);
}

.abstract-block {
  margin-top: 8px;
  padding: 26px 30px 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(250, 247, 242, 0.98) 100%);
  border: 1px solid rgba(203, 191, 176, 0.92);
  border-left: 3px solid var(--accent);
}

.abstract-block p:last-child,
.callout p:last-child,
.info-card p:last-child,
.metric-card p:last-child,
.asset-placeholder p:last-child {
  margin-bottom: 0;
}

.callout {
  padding: 18px 20px 16px;
  background: linear-gradient(180deg, #fffdf8 0%, #f7f2eb 100%);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
}

.section-grid,
.metric-grid,
.formula-grid {
  display: grid;
  gap: 22px;
}

.section-grid {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.metric-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.formula-grid {
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
}

.info-card,
.metric-card {
  padding: 22px;
  background: var(--paper);
  border: 1px solid var(--line);
}

.formula-card {
  margin-top: 22px;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.formula-title {
  margin-bottom: 10px;
  color: var(--text);
  font-weight: 700;
}

.formula-note {
  margin-top: 10px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.formula-math .katex-display,
.formula-card .katex-display {
  margin: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 6px 0;
  font-size: clamp(1.34rem, 1.55vw, 1.8rem);
}

.formula-card:not(.formula-table) .formula-title,
.formula-card:not(.formula-table) .formula-note {
  display: none;
}

.formula-table {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.formula-table-group + .formula-table-group {
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.formula-table-heading {
  margin-bottom: 6px;
  color: var(--text);
  font-weight: 600;
}

.formula-table .formula-math {
  font-size: 1rem;
}

.subsection-block {
  margin-top: 46px;
  padding-left: 0;
  border-left: 0;
}

.subsection-block:first-of-type {
  margin-top: 0;
}

.subsection-block > h3,
.subsection-block > p,
.subsection-block > ul,
.subsection-block > ol {
  max-width: var(--reading-width);
}

.nested-block {
  margin-top: 34px;
  padding-left: 22px;
  border-left: 1px solid rgba(203, 191, 176, 0.55);
}

.nested-block > h4,
.nested-block > p,
.nested-block > ul,
.nested-block > ol {
  max-width: calc(var(--reading-width) - 12px);
}

.formula-stack {
  display: grid;
  gap: 22px;
  margin-top: 28px;
}

.paper-table-wrap {
  width: min(100%, var(--media-width));
  margin: 30px auto 0;
  overflow-x: auto;
}

.paper-table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
  font-size: 1.06rem;
}

.paper-table caption {
  caption-side: top;
  margin-bottom: 14px;
  color: var(--text);
  font-weight: 700;
  text-align: left;
  font-size: 1.12rem;
}

.paper-table thead th {
  padding: 12px 14px;
  color: var(--text);
  font-weight: 700;
  text-align: left;
  border-top: 1.5px solid var(--strong-line);
  border-bottom: 1px solid var(--strong-line);
}

.paper-table tbody td,
.paper-table tbody th {
  padding: 11px 14px;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

.paper-table tbody tr:last-child td,
.paper-table tbody tr:last-child th {
  border-bottom: 1.5px solid var(--strong-line);
}

.paper-figure {
  width: min(100%, var(--media-width));
  margin: 30px auto 0;
}

.paper-figure img {
  display: block;
  width: 100%;
  height: auto;
}

.paper-figure-wide {
  width: min(100%, var(--result-width));
}

.subsection-block > .formula-card,
.subsection-block > .formula-stack,
.nested-block > .formula-card,
.nested-block > .formula-stack {
  width: min(100%, var(--media-width));
  margin-left: auto;
  margin-right: auto;
}

.metric-card {
  background: linear-gradient(180deg, #fffdfa 0%, #f9f5ee 100%);
}

.metric-value {
  margin-bottom: 4px;
  font-size: 2.3rem;
  line-height: 1.1;
  font-weight: 700;
  color: var(--text);
}

.metric-label {
  margin-bottom: 6px;
  color: var(--text);
  font-weight: 600;
}

.metric-detail {
  color: var(--muted);
  font-size: 0.98rem;
}

.asset-placeholder {
  margin-top: 18px;
  padding: 18px 20px 16px;
  background: repeating-linear-gradient(
    -45deg,
    rgba(239, 232, 222, 0.5),
    rgba(239, 232, 222, 0.5) 14px,
    rgba(255, 255, 255, 0.94) 14px,
    rgba(255, 255, 255, 0.94) 28px
  );
  border: 1px dashed var(--strong-line);
}

.asset-label {
  margin-bottom: 4px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.asset-hint {
  color: var(--muted);
  font-size: 0.92rem;
}

.toggle-block {
  margin-top: 18px;
  border: 1px solid var(--line);
  background: #fffdfa;
}

.toggle-block summary {
  cursor: pointer;
  padding: 14px 16px;
  font-weight: 600;
  color: var(--text);
  list-style: none;
}

.toggle-block summary::-webkit-details-marker {
  display: none;
}

.toggle-block summary::after {
  content: "열기";
  float: right;
  color: var(--muted);
  font-weight: 500;
}

.toggle-block[open] summary::after {
  content: "닫기";
}

.toggle-content {
  padding: 0 16px 16px;
  border-top: 1px solid var(--line);
}

.section-list,
.link-list,
.download-list,
.plain-list,
.reference-list {
  margin: 0;
  padding-left: 28px;
}

.section-list li,
.link-list li,
.download-list li,
.plain-list li,
.reference-list li {
  margin-bottom: 10px;
}

.link-list.compact,
.download-list.compact {
  list-style: none;
  padding-left: 0;
}

.link-list.compact li,
.download-list.compact li {
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.link-list.compact li:last-child,
.download-list.compact li:last-child {
  border-bottom: 1px solid var(--line);
}

.table-wrap {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  border-top: 1px solid var(--strong-line);
  border-bottom: 1px solid var(--strong-line);
  font-size: 1rem;
}

.data-table th,
.data-table td {
  padding: 10px 12px;
  vertical-align: top;
  border-top: 1px solid var(--line);
}

.data-table thead th {
  border-top: 0;
  color: var(--text);
  font-weight: 700;
  text-align: left;
  background: #faf6ef;
}

.status-pill {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border: 1px solid var(--line);
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 0.78rem;
  font-weight: 600;
  vertical-align: middle;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
}

.site-footer-inner {
  padding: 20px 0 36px;
  color: var(--muted);
  font-size: 0.94rem;
}

@media (max-width: 720px) {
  .site-header-inner,
  .page,
  .site-footer-inner {
    width: min(calc(100% - 24px), var(--max-width));
  }

  .site-header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-home {
    text-align: left;
  }

  .hero::before {
    margin-left: 0;
    margin-right: 0;
  }

  .hero-home h1 {
    margin-left: 0;
    margin-right: 0;
  }

  .paper-links {
    justify-content: flex-start;
  }

  .keyword-line {
    text-align: left;
  }

  .metric-value {
    font-size: 1.7rem;
  }

  .subsection-block {
    margin-top: 38px;
  }

  .nested-block {
    padding-left: 16px;
  }

  .doc-section > h2,
  .subsection-block > h3,
  .nested-block > h4 {
    padding-left: 16px;
  }

  .doc-section > h2::before {
    width: 10px;
  }

  .subsection-block > h3::before,
  .nested-block > h4::before {
    width: 8px;
  }

  .paper-table {
    min-width: 680px;
  }
}
