/* 리셋 + 공통 레이아웃 (헤더/컨테이너/푸터) */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
    system-ui, Roboto, "Helvetica Neue", "Segoe UI", "Apple SD Gothic Neo",
    "Noto Sans KR", "Malgun Gothic", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: -0.01em;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

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

input,
textarea,
select {
  font: inherit;
  color: inherit;
}

::selection {
  background: var(--primary-weak);
  color: var(--primary-weak-text);
}

/* ---------- 헤더 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.site-header .inner {
  max-width: 860px;
  height: 100%;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.site-logo .dot {
  color: var(--primary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.icon-btn {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--text-sub);
  transition: background 0.15s ease, color 0.15s ease;
}

.icon-btn:hover {
  background: var(--bg-elevated);
  color: var(--text);
}

.icon-btn svg {
  width: 20px;
  height: 20px;
}

/* 테마 토글: 현재 테마에 맞는 아이콘만 표시 */
[data-theme="dark"] .icon-sun {
  display: block;
}
[data-theme="dark"] .icon-moon {
  display: none;
}
.icon-sun {
  display: none;
}
.icon-moon {
  display: block;
}

/* ---------- 본문 컨테이너 ---------- */
.container {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding: 0 20px;
  flex: 1;
}

/* ---------- 푸터 ---------- */
.site-footer {
  margin-top: 80px;
  padding: 32px 20px 48px;
  text-align: center;
  color: var(--text-weak);
  font-size: 13px;
  border-top: 1px solid var(--border);
}

.site-footer a {
  color: var(--text-sub);
  font-weight: 600;
}

.site-footer a:hover {
  color: var(--primary);
}
