﻿:root {
  color-scheme: light;
  --bg: #f7faf6;
  --bg-accent: #edf6ea;
  --panel: #ffffff;
  --text: #1d2a1f;
  --muted: #526357;
  --line: #d5e4d3;
  --accent: #4a7a54;
  --accent-strong: #376543;
  --tag-bg: #edf6ea;
  --shadow: 0 16px 30px rgba(40, 66, 46, 0.08);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #101612;
  --bg-accent: #16201a;
  --panel: #1a241d;
  --text: #e7efe8;
  --muted: #a9b8ab;
  --line: #2b3b2f;
  --accent: #8fc79a;
  --accent-strong: #9fd9ac;
  --tag-bg: #223126;
  --shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  color: var(--text);
  background:
    radial-gradient(720px 320px at 85% -12%, var(--bg-accent) 0%, transparent 65%),
    linear-gradient(180deg, var(--bg-accent) 0%, var(--bg) 260px);
  font-family: "Pretendard Variable", "Noto Sans KR", "Apple SD Gothic Neo", "Segoe UI", sans-serif;
  line-height: 1.7;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(10px);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.left-group {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.logo {
  text-decoration: none;
  color: var(--text);
  font-weight: 900;
  letter-spacing: 0.14em;
  font-size: 23px;
  white-space: nowrap;
}

.nav {
  display: flex;
  gap: 14px;
}

.nav a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 650;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
}

.nav a:hover,
.nav a.active {
  color: var(--text);
  border-bottom-color: var(--accent);
}

.theme-toggle {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 650;
  cursor: pointer;
}

.theme-toggle:hover {
  border-color: var(--accent);
}

.page {
  max-width: 1080px;
  margin: 0 auto;
  padding: 24px 20px 56px;
  display: grid;
  gap: 16px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 24px;
}

.hero {
  overflow: hidden;
  position: relative;
}

.hero::after {
  content: "";
  position: absolute;
  right: -120px;
  top: -120px;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  pointer-events: none;
}

.eyebrow {
  margin: 0;
  color: var(--accent-strong);
  font-weight: 800;
  letter-spacing: 0.1em;
  font-size: 12px;
}

.hero h1 {
  margin: 10px 0 8px;
  font-size: 38px;
  line-height: 1.2;
  max-width: 760px;
}

.subtext {
  margin: 0;
  color: var(--muted);
  max-width: 760px;
}

.actions {
  margin-top: 18px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-primary,
.btn-secondary,
.btn-link,
.small-link {
  text-decoration: none;
  font-weight: 700;
}

.btn-primary {
  display: inline-block;
  color: #fff;
  background: var(--accent);
  border-radius: 11px;
  padding: 10px 14px;
}

.btn-primary:hover {
  background: var(--accent-strong);
}

.btn-secondary {
  display: inline-block;
  color: var(--accent-strong);
  border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line));
  border-radius: 11px;
  padding: 10px 14px;
  background: var(--tag-bg);
}

.btn-secondary:hover {
  border-color: var(--accent);
}

.btn-link,
.small-link {
  color: var(--accent-strong);
}

.btn-link:hover,
.small-link:hover {
  text-decoration: underline;
}

.card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.card-head h1,
.card-head h2 {
  margin: 0;
}

.muted {
  margin: 8px 0 0;
  color: var(--muted);
}

.meta {
  color: var(--muted);
  font-size: 14px;
}

.preview-card,
.post-card {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--panel) 88%, var(--bg-accent)) 0%, var(--panel) 100%);
}

.preview-card h3,
.post-card h3 {
  margin: 0 0 8px;
  font-size: 24px;
  line-height: 1.3;
}

.preview-card h3 a,
.post-card h3 a {
  color: var(--text);
  text-decoration: none;
}

.preview-card h3 a:hover,
.post-card h3 a:hover {
  text-decoration: underline;
}

.preview-card p,
.post-card p {
  margin: 0;
  color: var(--muted);
}

.post-grid {
  margin-top: 14px;
  display: grid;
  gap: 12px;
}

.article-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.article-title {
  margin: 0;
  font-size: 34px;
  line-height: 1.2;
}

.article {
  margin-top: 8px;
}

.toc {
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--panel) 90%, var(--bg-accent)) 0%, var(--panel) 100%);
  padding: 14px 16px;
}

.toc-title {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.toc-list,
.toc-list ul {
  margin: 0;
  padding-left: 18px;
}

.toc-list > li {
  margin: 6px 0;
}

.toc-list ul li {
  margin: 4px 0;
}

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

.toc a:hover {
  text-decoration: underline;
}

.article h1,
.article h2,
.article h3 {
  margin: 24px 0 12px;
  line-height: 1.35;
  scroll-margin-top: 92px;
}

.article h1 {
  font-size: 34px;
}

.article h2 {
  font-size: 26px;
}

.article h3 {
  font-size: 21px;
}

.article p {
  margin: 12px 0;
}

.article ul,
.article ol {
  margin: 10px 0 12px;
  padding-left: 22px;
}

.article ul ul,
.article ol ol,
.article ul ol,
.article ol ul {
  margin-top: 6px;
  padding-left: 20px;
}

.article li {
  margin: 4px 0;
}

.article li > strong:first-child {
  color: var(--text);
}

.article a {
  color: var(--accent-strong);
  text-underline-offset: 2px;
}

.article a:hover {
  text-decoration-thickness: 2px;
}

.article code {
  background: var(--tag-bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2px 6px;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.94em;
}

.article pre {
  overflow-x: auto;
  border-radius: 10px;
  background: #0f172a;
  color: #dce5ff;
  padding: 14px;
}

.about p {
  margin: 10px 0;
}

@media (max-width: 820px) {
  .header-inner {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .left-group {
    width: 100%;
    justify-content: space-between;
  }

  .theme-toggle {
    margin-left: auto;
  }

  .hero h1,
  .article-title {
    font-size: 29px;
  }

  .card {
    padding: 18px;
  }
}
