:root {
  color-scheme: light;
  --blue: #3182f6;
  --blue-dark: #1b64da;
  --blue-wash: #edf5ff;
  --ink: #191f28;
  --muted: #667085;
  --subtle: #8b95a1;
  --line: #e5eaf0;
  --surface: #f8fafc;
  --paper: #fff;
  --focus: #1b64da;
  --shadow: 0 1px 2px rgb(15 23 42 / 5%), 0 12px 32px rgb(15 23 42 / 6%);
  --radius: 14px;
  --content: 1160px;
  font-family: "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-size: 16px; line-height: 1.65; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }
::selection { background: #cfe4ff; color: #0b3b81; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 20; left: 1rem; top: .75rem; padding: .5rem .8rem; border-radius: 8px; background: var(--ink); color: #fff; transform: translateY(-180%); transition: transform .16s ease; }
.skip-link:focus { transform: translateY(0); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; box-shadow: 0 0 0 4px rgb(49 130 246 / 18%); }

.site-shell { min-height: 100vh; display: flex; flex-direction: column; }
.site-header { position: sticky; z-index: 10; top: 0; background: rgb(255 255 255 / 94%); border-bottom: 1px solid rgb(229 234 240 / 85%); backdrop-filter: blur(14px); }
.header-inner { width: min(100% - 2rem, var(--content)); min-height: 72px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .65rem; font-size: 1rem; font-weight: 750; letter-spacing: -.03em; white-space: nowrap; }
.brand-mark { display: block; width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 50%; object-fit: cover; }
.primary-nav { display: flex; align-items: center; gap: 1.35rem; color: var(--muted); font-size: .92rem; font-weight: 600; }
.primary-nav a { min-height: 44px; display: inline-flex; align-items: center; transition: color .16s ease; }
.primary-nav a:hover { color: var(--blue-dark); }
.github-link svg { width: 22px; height: 22px; fill: currentColor; }
.nav-search { display: flex; align-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); transition: border-color .16s ease, box-shadow .16s ease; }
.nav-search:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgb(49 130 246 / 14%); }
.nav-search-input { width: clamp(112px, 17vw, 190px); min-height: 40px; border: 0; padding: .45rem .2rem .45rem .72rem; outline: 0; background: transparent; color: var(--ink); font-size: .86rem; }
.nav-search-input::placeholder { color: var(--subtle); }
.nav-search-button { display: grid; width: 40px; height: 40px; flex: 0 0 40px; place-items: center; border: 0; background: transparent; color: var(--muted); }
.nav-search-button:hover { color: var(--blue-dark); }
.nav-search-button svg { width: 19px; height: 19px; fill: currentColor; }
.menu-button { display: none; min-width: 44px; min-height: 44px; border: 0; background: transparent; color: var(--ink); font-size: 1.3rem; }
.mobile-menu { border-top: 1px solid var(--line); padding: .5rem 1rem 1rem; }
.mobile-link { display: block; padding: .65rem .3rem; color: var(--muted); font-size: .95rem; }

#app { width: min(100% - 2rem, var(--content)); margin: 0 auto; flex: 1; }
.page-section { padding: clamp(2.8rem, 6vw, 5.5rem) 0 6rem; }
.category-strip { display: flex; gap: .55rem; flex-wrap: wrap; padding: 0 0 2.75rem; }
.category-chip { min-height: 38px; display: inline-flex; align-items: center; padding: .34rem .85rem; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: .86rem; transition: border-color .16s ease, color .16s ease, background .16s ease; }
.category-chip:hover { border-color: #a9cafa; background: var(--blue-wash); color: var(--blue-dark); }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.55rem; }
.page-title { margin: 0; font-size: clamp(1.28rem, 2.5vw, 1.72rem); line-height: 1.3; letter-spacing: -.045em; word-break: keep-all; }
.home-block + .home-block { margin-top: clamp(3rem, 6vw, 5rem); }
.section-back-link { display: inline-flex; min-height: 44px; align-items: center; margin-bottom: 1rem; color: var(--muted); font-size: .88rem; font-weight: 650; }
.section-back-link:hover { color: var(--blue-dark); }
.post-grid { display: grid; grid-template-columns: repeat(1, minmax(0, 1fr)); gap: .9rem; }
.post-card { min-width: 0; padding: 1.25rem 1.3rem 1.35rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.post-card:hover { border-color: #c5daf8; box-shadow: var(--shadow); transform: translateY(-2px); }
.post-card-top { min-height: 24px; display: flex; align-items: center; }
.post-card-pinned { border-color: #bdd7fb; background: linear-gradient(180deg, var(--blue-wash) 0, var(--paper) 42%); }
.pin-label { margin-left: auto; padding: .1rem .45rem; border-radius: 999px; background: #dcebff; color: var(--blue-dark); font-size: .7rem; font-weight: 750; }
.category-label { color: var(--blue-dark); font-size: .78rem; font-weight: 750; }
.post-card-link { display: block; }
.post-card-title { margin: .58rem 0 0; font-size: clamp(1.02rem, 1.8vw, 1.19rem); line-height: 1.42; letter-spacing: -.035em; word-break: keep-all; }
.post-card-summary { display: -webkit-box; overflow: hidden; margin: .62rem 0 0; color: var(--muted); font-size: .88rem; line-height: 1.55; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.post-meta { display: flex; align-items: center; flex-wrap: wrap; gap: .42rem; margin-top: .85rem; color: var(--subtle); font-size: .76rem; letter-spacing: .01em; }
.meta-separator { color: #cbd5e1; }
.tag-row, .article-tags { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .95rem; }
.tag { display: inline-flex; min-height: 28px; align-items: center; padding: .16rem .55rem; border-radius: 6px; background: var(--surface); color: var(--muted); font-size: .73rem; }
.tag:hover { background: var(--blue-wash); color: var(--blue-dark); }
.more-wrap { display: flex; justify-content: center; padding-top: 2.2rem; }
.button { min-height: 44px; border-radius: 8px; padding: .55rem 1.15rem; font-weight: 700; }
.button-secondary { border: 1px solid var(--line); background: var(--paper); color: var(--ink); }
.button-secondary:hover { border-color: #9fc3f8; background: var(--blue-wash); color: var(--blue-dark); }

.search-page { max-width: 800px; }
.search-form { display: flex; gap: .55rem; margin-bottom: 2.3rem; }
.search-input { flex: 1; min-width: 0; min-height: 48px; border: 1px solid var(--line); border-radius: 9px; padding: .65rem .9rem; color: var(--ink); background: var(--paper); }
.search-input::placeholder { color: var(--subtle); }
.search-input:focus { border-color: var(--blue); outline: 0; box-shadow: 0 0 0 4px rgb(49 130 246 / 15%); }
.search-button { min-width: 64px; min-height: 48px; border: 0; border-radius: 9px; background: var(--blue); color: #fff; font-weight: 700; }
.search-button:hover { background: var(--blue-dark); }

.article-page { width: min(100%, 780px); margin: 0 auto; padding: clamp(3rem, 7vw, 5.5rem) 0 6rem; }
.article-header { padding-bottom: 2.2rem; border-bottom: 1px solid var(--line); }
.article-title { max-width: 720px; margin: .8rem 0 0; font-size: clamp(1.58rem, 3.4vw, 2.16rem); line-height: 1.34; letter-spacing: -.055em; word-break: keep-all; }
.article-header .post-meta { margin-top: .85rem; }
.article-ai-summary { margin-top: 1.5rem; padding: 1.1rem 1.2rem; border-radius: 12px; background: var(--blue-wash); }
.article-ai-summary-title { margin: 0; color: var(--blue-dark); font-size: .88rem; letter-spacing: -.02em; }
.article-ai-summary-copy { margin: .48rem 0 0; color: #344054; font-size: .94rem; line-height: 1.65; word-break: keep-all; }
.article-content { padding-top: 2.3rem; overflow-wrap: anywhere; word-break: keep-all; }
.article-content p { margin: 0 0 1.2rem; }
.article-content h2 { margin: 2.8rem 0 .85rem; font-size: 1.45rem; line-height: 1.4; letter-spacing: -.04em; }
.article-content h3 { margin: 2rem 0 .7rem; font-size: 1.18rem; line-height: 1.45; letter-spacing: -.035em; }
.article-content ul, .article-content ol { margin: .6rem 0 1.3rem; padding-left: 1.35rem; }
.article-content li + li { margin-top: .35rem; }
.article-content blockquote { margin: 1.5rem 0; padding: .8rem 1rem; border-left: 3px solid var(--blue); background: var(--blue-wash); color: var(--muted); }
.article-content pre { overflow-x: auto; margin: 1.4rem 0; padding: 1rem 1.05rem; border-radius: 10px; background: #17202b; color: #edf2f7; font: .84rem/1.65 "SFMono-Regular", Consolas, monospace; white-space: pre; word-break: normal; }
.article-content code { padding: .12rem .3rem; border-radius: 4px; background: var(--surface); color: #245ca7; font: .9em "SFMono-Regular", Consolas, monospace; }
.article-content pre code { padding: 0; background: transparent; color: inherit; }
.article-content a { color: var(--blue-dark); text-decoration: underline; text-underline-offset: 3px; }
.article-content img { height: auto; margin: 1.4rem auto; border-radius: 10px; }
.article-content table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; margin: 1.4rem 0; font-size: .9rem; }
.article-content th, .article-content td { min-width: 120px; padding: .55rem .7rem; border: 1px solid var(--line); text-align: left; }
.article-content th { background: var(--surface); }
.back-link { display: inline-flex; min-height: 44px; align-items: center; margin-top: 2.8rem; color: var(--blue-dark); font-size: .9rem; font-weight: 700; }

.state-box { display: flex; min-height: 180px; flex-direction: column; align-items: center; justify-content: center; gap: .75rem; padding: 2rem; border: 1px dashed var(--line); border-radius: var(--radius); background: var(--surface); text-align: center; }
.state-message { margin: 0; color: var(--muted); }
.loading-list { display: grid; grid-template-columns: repeat(1, minmax(0, 1fr)); gap: .9rem; }
.skeleton-card { height: 188px; padding: 1.25rem; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(100deg, #f3f5f7 20%, #fff 40%, #f3f5f7 60%); background-size: 300% 100%; animation: shimmer 1.3s ease-in-out infinite; }
.skeleton-line { display: block; height: .8rem; margin-bottom: 1rem; border-radius: 5px; background: #e9eef3; }
.skeleton-small { width: 28%; height: .65rem; }
.skeleton-title { width: 78%; height: 1.25rem; margin-top: 1.3rem; }
.skeleton-copy { width: 92%; margin-top: 1.1rem; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }

.site-footer { margin-top: auto; border-top: 1px solid var(--line); color: var(--muted); font-size: .78rem; }
.footer-inner { width: min(100% - 2rem, var(--content)); min-height: 92px; margin: 0 auto; display: flex; align-items: center; flex-wrap: wrap; gap: .55rem; }
.footer-inner a { color: var(--ink); font-weight: 650; }
.footer-inner a:hover { color: var(--blue-dark); }
.footer-divider { color: var(--line); }

@media (min-width: 768px) {
  .header-inner, #app, .footer-inner { width: min(100% - 4rem, var(--content)); }
  .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
  .loading-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1200px) {
  .header-inner, #app, .footer-inner { width: min(100% - 6rem, var(--content)); }
  .post-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.1rem; }
  .loading-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .primary-nav > a:not(.github-link) { display: none; }
  .header-inner { gap: .45rem; }
  .brand > span:last-child { display: none; }
  .primary-nav { gap: .35rem; }
  .nav-search-input { width: 105px; }
  .menu-button { display: block; }
  .page-heading { align-items: start; flex-direction: column; gap: .3rem; }
  .article-title { font-size: 1.55rem; }
  .article-content { font-size: .97rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
