:root {
  color-scheme: light;
  --ink: #18191b;
  --muted: #575b64;
  --line: #dedfe4;
  --paper: #f8f8fa;
  --accent: #2447ed;
  --graphic: #aabaff;
  font-family: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", "맑은 고딕", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; font-size: 1rem; line-height: 1.65; word-break: keep-all; overflow-wrap: anywhere; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.shell { width: min(1080px, calc(100% - 96px)); margin-inline: auto; }
.skip-link { position: absolute; z-index: 2; inset: 8px auto auto 8px; padding: 10px 14px; color: white; background: var(--accent); transform: translateY(-160%); }
.skip-link:focus { transform: none; }

.header-link { display: inline-flex; align-items: center; min-height: 44px; font-size: .875rem; color: var(--muted); }
.header-link:hover { color: var(--accent); }


:root[data-theme="dark"] { color-scheme: dark; background: #121313; }
:root[data-theme="light"] { color-scheme: light; background: #f8f8f6; }

.public-site, .article-preview {
  --code-bg: #fdfdfb;
  --code-border: #d3d4d0;
  --code-rim: #ffffff;
  --code-ink: #393a36;
  --syntax-keyword: #151613;
  --syntax-string: #53544e;
  --syntax-comment: #666761;
  --syntax-name: #272823;
  --syntax-number: #20211e;
  --inline-code: #ededeb;
}
.public-site {
  --paper: #f8f8f6;
  --ink: #1b1c1b;
  --muted: #555653;
  --line: #dedfdb;
  --accent: #252623;
  --quiet: #646560;
  --active: #ebebe7;
  --control: #dfdfdb;
  --feature-surface: #f1f1ee;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
}
[data-theme="dark"] .public-site {
  --paper: #121313;
  --ink: #f3f3f0;
  --muted: #b2b2af;
  --line: #2d2e2e;
  --accent: #eeeeeb;
  --quiet: #a2a2a0;
  --active: #222323;
  --control: #292a2a;
  --feature-surface: #191a1a;
  --code-bg: #171818;
  --code-border: #3c3d3c;
  --code-rim: #ffffff22;
  --code-ink: #d5d5d2;
  --syntax-keyword: #fafaf7;
  --syntax-string: #bdbdb9;
  --syntax-comment: #a3a39f;
  --syntax-name: #e7e7e2;
  --syntax-number: #f0f0ea;
  --inline-code: #282929;
}
.public-site :focus-visible { outline-color: var(--quiet); }
.public-site .shell { width: min(1200px, calc(100% - 64px)); }
.public-site main.shell { padding-block: clamp(24px, 3.6vw, 46px) 54px; }

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 16px;
  min-height: 64px;
  border-bottom: 1px solid var(--line);
}
.site-nav, .site-settings, .site-switch { display: flex; align-items: center; }
.site-nav { gap: 3px; }
.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 13px;
  border-radius: 6px;
  color: var(--muted);
  font-size: .9375rem;
  white-space: nowrap;
}
.site-nav a[aria-current] { color: var(--ink); background: var(--active); font-weight: 700; }
.site-nav a:hover { color: var(--ink); }
.site-settings { gap: 7px; }
.site-switch { padding: 2px; border: 1px solid var(--line); border-radius: 7px; }
.site-switch button, .code-language button { color: inherit; cursor: pointer; }
.site-switch button {
  min-height: 27px;
  padding: 0 7px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--quiet);
  font-size: .75rem;
  white-space: nowrap;
}
.site-switch button[aria-pressed="true"] { background: var(--control); color: var(--ink); }

.home-lead { padding-block: clamp(12px, 3vw, 40px) clamp(4px, 1.5vw, 18px); }
.home-lead h1, .post-section h1, .about-page h1, .article-title {
  margin: 0;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -.065em;
}
.home-lead h1 { margin-bottom: 16px; font-size: clamp(3.1rem, 8vw, 5.7rem); }
.home-intro { max-width: 35ch; margin: 0; color: var(--muted); font-size: clamp(1rem, 2vw, 1.17rem); line-height: 1.75; }

.home-recent { margin-top: clamp(24px, 4vw, 45px); }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.section-heading h2 { margin: 0; font-size: clamp(1.3rem, 2.4vw, 1.75rem); line-height: 1.3; letter-spacing: -.045em; }
.home-posts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 2.6vw, 32px); }
.home-feature {
  display: grid;
  align-content: start;
  grid-template-rows: 1fr auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--feature-surface);
}
.home-feature:only-child { grid-column: 1 / -1; }
.home-feature img { display: block; width: 100%; height: 100%; min-height: 0; aspect-ratio: 2.45; object-fit: cover; filter: saturate(.58); }
.home-feature-caption { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; padding: 15px 18px; }
.home-feature-caption strong { font-size: clamp(1rem, 2.3vw, 1.2rem); letter-spacing: -.035em; }
.home-feature:is(:hover, :focus-visible) strong { text-decoration: underline; text-underline-offset: 4px; }
.home-posts .post-list { display: grid; grid-auto-rows: 1fr; }
.home-posts .post-row { align-content: center; min-height: 58px; height: 100%; }
.site-link { display: inline-flex; align-items: center; min-height: 40px; color: var(--accent); font-size: .875rem; font-weight: 600; }
.site-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.post-list { padding: 0; margin: 0; list-style: none; border-top: 1px solid var(--line); }
.post-list li { border-bottom: 1px solid var(--line); }
.post-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: baseline;
  gap: 5px 17px;
  min-height: 53px;
  padding: 14px 0;
}
.post-row strong { font-size: .9375rem; font-weight: 600; }
.post-row:is(:hover, :focus-visible) strong { text-decoration: underline; text-underline-offset: 4px; }
.post-row time, .home-feature time, .article-meta { color: var(--quiet, var(--muted)); font: .8125rem/1.5 Consolas, "Malgun Gothic", monospace; font-variant-numeric: tabular-nums; white-space: nowrap; }
.empty-posts { margin: 0; padding: 20px 0; color: var(--muted); border-block: 1px solid var(--line); }
.post-section, .about-page { padding-top: 5px; }
.post-section { max-width: 936px; margin-inline: auto; }
.post-section h1, .about-page h1 { margin-bottom: 28px; font-size: clamp(2.3rem, 6vw, 3.65rem); }
.about-page, .reader { max-width: 666px; margin-inline: auto; }
.about-page p { margin: 0; padding-top: 19px; border-top: 1px solid var(--line); }
.site-announcer { position: absolute; width: 1px; height: 1px; margin: 0; overflow: hidden; clip-path: inset(50%); }

.reader { padding: 5px 0 36px; }
.back-link { margin-bottom: 10px; }
.article-title { font-size: clamp(2rem, 5.6vw, 3.35rem); }
.article-meta { margin: 10px 0 0; }
.article-body { margin-top: 22px; padding-top: 21px; border-top: 1px solid var(--line); font-size: 1rem; line-height: 1.8; }
.article-body p { margin: 0 0 1.25em; }
.article-body :is(h2, h3, h4, h5, h6) { margin: 1.5em 0 .55em; line-height: 1.35; }
.article-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.article-body ul, .article-body ol { margin: 0 0 1.4em; padding-inline-start: 1.7em; }
.article-body blockquote { margin: 0 0 1.4em; border-inline-start: 2px solid var(--line); padding: 4px 0 4px 1em; color: var(--muted); }
.article-body blockquote p { margin: 0; }
.article-body :not(pre) > code { padding: .1em .27em; border-radius: 3px; background: var(--inline-code); font: .91em Consolas, "Malgun Gothic", monospace; }
.article-body hr { margin-block: 2em; border: 0; border-top: 1px solid var(--line); }
.post-photo { margin: clamp(23px, 5vw, 40px) 0 0; }
.post-photo img { display: block; width: 100%; height: auto; border-radius: 7px; }
.post-photo figcaption { margin-top: 6px; color: var(--muted); font-size: .8125rem; }
.code-block {
  min-width: 0;
  margin-block: 0 1.15em;
  border: 1px solid var(--code-border);
  border-radius: 7px;
  background: var(--code-bg);
  box-shadow: inset 0 1px 0 var(--code-rim);
  color: var(--code-ink);
}
.code-language {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  padding: 4px 10px 4px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font: .8125rem/1.5 Consolas, "Malgun Gothic", monospace;
}
.code-language button { min-width: 52px; min-height: 29px; padding: 2px 7px; border: 1px solid var(--code-border); border-radius: 5px; background: transparent; color: var(--code-ink); font: inherit; }
.code-language button:is(:hover, [data-i18n="copied"]) { background: var(--control); color: var(--ink); }
.code-block pre { margin: 0; padding: 14px 14px 16px; overflow: auto; word-break: normal; overflow-wrap: normal; font: .875rem/1.75 Consolas, "Malgun Gothic", monospace; }
.code-block code { font: inherit; }
.syntax-keyword { color: var(--syntax-keyword); font-weight: 700; }
.syntax-string { color: var(--syntax-string); }
.syntax-comment { color: var(--syntax-comment); font-style: italic; }
.syntax-name { color: var(--syntax-name); }
.syntax-number { color: var(--syntax-number); }
.article-preview .reader { padding: 20px 18px 32px; }
.article-preview .article-title { font-size: clamp(1.625rem, 6vw, 2.75rem); }

@media (max-width: 740px) {
  .public-site .shell { width: calc(100% - 36px); }
  .home-posts { grid-template-columns: minmax(0, 1fr); }
  .home-feature img { aspect-ratio: 2.15; }
}
@media (max-width: 560px) {
  .home-lead h1 { margin-bottom: 8px; }
}
@media (max-width: 450px) {
  .site-header { padding-block: 7px; }
  .site-nav a { padding-inline: 10px; }
  .post-row { grid-template-columns: minmax(0, 1fr); padding-block: 9px 11px; gap: 1px; }
  .home-feature-caption { padding: 12px 14px; }
}
@media (pointer: coarse) {
  .site-nav a, .site-switch button, .code-language button { min-height: 44px; }
}
