@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css");
@import url("https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600&display=swap");

:root {
  --navy-950: #030b16;
  --navy-900: #071426;
  --navy-850: #0a1a30;
  --navy-800: #0d213b;
  --navy-700: #153452;
  --white: #f7f9fc;
  --muted: #a9b5c6;
  --faint: #728096;
  --line: rgba(247, 249, 252, .78);
  --line-soft: rgba(247, 249, 252, .16);
  --accent: #8ec8ff;
  --accent-2: #7fe0c3;
  --shadow: 0 28px 70px rgba(0, 0, 0, .28);
  --content: 1180px;
  --article: 780px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--navy-950);
  color: var(--white);
  font-family: Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  word-break: keep-all;
}
body.menu-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { color: inherit; }
img { max-width: 100%; height: auto; }

.skip-link {
  position: fixed; top: 12px; left: 12px; z-index: 999;
  padding: 10px 14px; background: var(--white); color: var(--navy-950);
  transform: translateY(-160%);
}
.skip-link:focus { transform: translateY(0); }
.site-shell { min-height: 100vh; background:
  radial-gradient(circle at 80% 5%, rgba(45, 111, 165, .18), transparent 26rem),
  var(--navy-900); }

.site-header {
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(7, 20, 38, .88);
  backdrop-filter: blur(16px);
}
.header-inner {
  width: min(calc(100% - 48px), var(--content));
  height: 82px; margin: auto;
  display: flex; align-items: center; justify-content: space-between;
}
.brand { display: inline-flex; align-items: center; gap: 13px; }
.brand-mark {
  width: 42px; height: 42px; display: grid; place-items: center;
  border: 1px solid var(--line); color: var(--white);
  font-family: "JetBrains Mono", monospace; font-weight: 600;
}
.brand-copy { display: grid; line-height: 1.15; }
.brand-copy strong { font-size: 17px; letter-spacing: .01em; }
.brand-copy small {
  margin-top: 7px; color: var(--muted);
  font: 500 9px/1 "JetBrains Mono", monospace; letter-spacing: .15em;
}
.desktop-nav { display: flex; align-items: center; gap: 34px; margin-left: auto; margin-right: 34px; }
.desktop-nav a {
  position: relative; color: var(--muted); font-size: 14px;
  transition: color .2s ease;
}
.desktop-nav a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: -8px;
  height: 1px; background: var(--white); transition: right .2s ease;
}
.desktop-nav a:hover { color: var(--white); }
.desktop-nav a:hover::after { right: 0; }
.menu-toggle {
  width: 48px; height: 48px; padding: 0;
  display: grid; place-content: center; gap: 5px;
  border: 1px solid var(--line); background: transparent; cursor: pointer;
  transition: background .2s ease, color .2s ease;
}
.menu-toggle:hover { background: var(--white); color: var(--navy-950); }
.menu-toggle span { display: block; width: 19px; height: 1px; background: currentColor; }
.menu-toggle span:nth-child(2) { width: 13px; margin-left: auto; }

.menu-backdrop {
  position: fixed; inset: 0; z-index: 80; visibility: hidden; opacity: 0;
  background: rgba(1, 6, 14, .7); backdrop-filter: blur(4px);
  transition: opacity .3s ease, visibility .3s ease;
}
.side-menu {
  position: fixed; z-index: 90; top: 0; right: 0;
  width: min(460px, 100%); height: 100dvh; padding: 34px;
  overflow-y: auto; border-left: 1px solid var(--line);
  background: var(--navy-850); transform: translateX(102%);
  transition: transform .34s cubic-bezier(.22,.61,.36,1);
}
body.menu-open .menu-backdrop { visibility: visible; opacity: 1; }
body.menu-open .side-menu { transform: translateX(0); }
.side-menu-head { display: flex; justify-content: space-between; align-items: flex-start; }
.side-menu-head strong { display: block; margin-top: 8px; font-size: 22px; }
.menu-close {
  width: 44px; height: 44px; border: 1px solid var(--line);
  background: transparent; font-size: 28px; line-height: 1; cursor: pointer;
}
.eyebrow {
  color: var(--accent); font: 600 10px/1.3 "JetBrains Mono", monospace;
  letter-spacing: .18em;
}
.menu-search { margin: 44px 0 28px; }
.menu-search label { display: block; margin-bottom: 10px; color: var(--muted); font-size: 12px; }
.search-row { display: flex; border-bottom: 1px solid var(--line); }
.search-row input {
  flex: 1; min-width: 0; padding: 14px 0; border: 0; outline: 0;
  color: var(--white); background: transparent;
}
.search-row input::placeholder { color: var(--faint); }
.search-row button { width: 42px; border: 0; background: transparent; cursor: pointer; font-size: 20px; }
.mobile-quick-links { border-top: 1px solid var(--line-soft); }
.mobile-quick-links a {
  display: flex; align-items: center; gap: 18px; padding: 15px 0;
  border-bottom: 1px solid var(--line-soft); font-size: 20px;
}
.mobile-quick-links span { color: var(--faint); font: 500 10px "JetBrains Mono", monospace; }
.category-panel { margin-top: 34px; }
.category-panel .tt_category { margin: 14px 0 0; padding: 0; list-style: none; }
.category-panel ul { padding-left: 0; list-style: none; }
.category-panel li { margin: 8px 0; }
.category-panel li ul { padding-left: 16px; border-left: 1px solid var(--line-soft); }
.category-panel a { color: var(--muted); font-size: 14px; }
.category-panel a:hover { color: var(--white); }
.category-panel .c_cnt { color: var(--faint); font-size: 11px; }
.menu-note { margin: 40px 0 0; color: var(--faint); font-size: 13px; }

.hero {
  width: min(calc(100% - 48px), var(--content)); min-height: 610px;
  margin: 32px auto 0; padding: clamp(42px, 7vw, 86px);
  display: grid; grid-template-columns: 1.5fr .7fr; align-items: end; gap: 64px;
  border: 1px solid var(--line);
  background:
    linear-gradient(rgba(247,249,252,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(247,249,252,.045) 1px, transparent 1px),
    linear-gradient(135deg, var(--navy-800), var(--navy-950));
  background-size: 54px 54px, 54px 54px, auto;
  box-shadow: var(--shadow);
}
.hero h1 {
  max-width: 760px; margin: 23px 0 22px;
  font-size: clamp(40px, 5.2vw, 72px); line-height: 1.16; letter-spacing: -.045em;
}
.hero-copy > p { margin: 0; color: var(--muted); font-size: 17px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 38px; }
.button {
  min-width: 154px; height: 50px; padding: 0 19px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); cursor: pointer; transition: .2s ease;
}
.button-primary { color: var(--navy-950); background: var(--white); }
.button-primary:hover { background: var(--accent); border-color: var(--accent); }
.button-outline { background: transparent; }
.button-outline:hover { color: var(--navy-950); background: var(--white); }
.hero-status { padding: 25px; border: 1px solid var(--line-soft); background: rgba(3, 11, 22, .46); }
.hero-status > span { color: var(--faint); font: 500 10px "JetBrains Mono", monospace; letter-spacing: .16em; }
.hero-status ul { margin: 18px 0 0; padding: 0; list-style: none; }
.hero-status li { display: flex; align-items: center; gap: 10px; padding: 8px 0; color: var(--muted); font-size: 13px; }
.hero-status i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent-2); box-shadow: 0 0 10px var(--accent-2); }

.post-section, .content-frame {
  width: min(calc(100% - 48px), var(--content)); margin: 0 auto;
}
.post-section { padding: 110px 0; }
.section-heading {
  margin-bottom: 30px; display: flex; align-items: end; justify-content: space-between; gap: 24px;
}
.section-heading h2 { margin: 10px 0 0; font-size: clamp(28px, 3vw, 42px); letter-spacing: -.035em; }
.section-heading > a { color: var(--muted); font-size: 13px; }
.section-heading > a span { margin-left: 7px; color: var(--white); }
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.post-card { min-width: 0; min-height: 300px; border: 1px solid var(--line-soft); background: rgba(13, 33, 59, .4); }
.post-card-link { height: 100%; padding: 27px; display: flex; flex-direction: column; transition: .22s ease; }
.post-card-link:hover { background: var(--white); color: var(--navy-950); transform: translate(-5px, -5px); box-shadow: 6px 6px 0 var(--accent); }
.post-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; }
.post-category {
  max-width: calc(100% - 30px); overflow: hidden; color: var(--accent);
  font: 500 10px/1.4 "JetBrains Mono", monospace; letter-spacing: .06em;
  text-overflow: ellipsis; white-space: nowrap;
}
.post-arrow { font-size: 18px; }
.post-card-link:hover .post-category { color: #24537d; }
.post-card-copy { margin: auto 0; }
.post-card h2, .post-card h3 {
  margin: 28px 0 14px; display: -webkit-box; overflow: hidden;
  font-size: 23px; line-height: 1.35; letter-spacing: -.025em;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.post-card p {
  margin: 0; display: -webkit-box; overflow: hidden; color: var(--muted);
  font-size: 13px; line-height: 1.7; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
}
.post-card-link:hover p { color: #526277; }
.post-card time { margin-top: 25px; color: var(--faint); font: 500 10px "JetBrains Mono", monospace; }
.post-card-link:hover time { color: #526277; }

.content-frame { padding: 86px 0 120px; }
.page-heading { max-width: 800px; margin-bottom: 48px; }
.page-heading h1 { margin: 13px 0; font-size: clamp(38px, 5vw, 64px); line-height: 1.15; letter-spacing: -.045em; }
.page-heading p { color: var(--muted); }
.page-heading p strong { color: var(--white); }

.article-page { margin-top: 10px; }
.article-header { max-width: 920px; padding: 50px 0 56px; border-bottom: 1px solid var(--line); }
.article-category { color: var(--accent); font: 500 11px "JetBrains Mono", monospace; }
.article-header h1 { margin: 22px 0; font-size: clamp(40px, 6vw, 72px); line-height: 1.15; letter-spacing: -.05em; }
.article-meta { display: flex; gap: 24px; color: var(--faint); font: 500 11px "JetBrains Mono", monospace; }
.article-layout { display: grid; grid-template-columns: minmax(0, var(--article)) 240px; justify-content: space-between; gap: 64px; padding-top: 64px; }
.article-body { min-width: 0; color: #d9e0ea; font-size: 17px; line-height: 1.9; }
.article-body h2, .article-body h3, .article-body h4 { color: var(--white); letter-spacing: -.025em; scroll-margin-top: 110px; }
.article-body h2 { margin: 68px 0 22px; padding-bottom: 12px; border-bottom: 1px solid var(--line-soft); font-size: 30px; }
.article-body h3 { margin: 48px 0 18px; font-size: 23px; }
.article-body p { margin: 0 0 25px; }
.article-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.article-body blockquote { margin: 34px 0; padding: 20px 24px; border: 1px solid var(--line-soft); border-left: 3px solid var(--accent); background: var(--navy-850); color: var(--muted); }
.article-body pre {
  margin: 32px 0; padding: 24px; overflow-x: auto;
  border: 1px solid var(--line-soft); background: var(--navy-950) !important;
  font: 13px/1.75 "JetBrains Mono", monospace;
}
.article-body code { font-family: "JetBrains Mono", monospace; }
.article-body :not(pre) > code { padding: 2px 6px; color: #bfe3ff; background: var(--navy-800); }
.article-body table { width: 100%; margin: 32px 0; border-collapse: collapse; font-size: 14px; }
.article-body th, .article-body td { padding: 13px; border: 1px solid var(--line-soft); text-align: left; }
.article-body th { background: var(--navy-800); }
.article-body img { margin: 28px auto; display: block; border: 1px solid var(--line-soft); }
.article-aside { position: relative; }
.aside-box { position: sticky; top: 116px; padding: 20px; border: 1px solid var(--line-soft); }
.toc { margin-top: 16px; display: grid; gap: 9px; }
.toc a { color: var(--faint); font-size: 12px; line-height: 1.45; }
.toc a:hover { color: var(--white); }
.toc a.toc-h3 { padding-left: 12px; }
.article-footer { margin: 70px 0; padding: 30px 0; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.tags .eyebrow { display: block; margin-bottom: 14px; }
.tags a { display: inline-block; margin: 4px 5px 4px 0; padding: 7px 11px; border: 1px solid var(--line-soft); color: var(--muted); font-size: 12px; }
.related-posts { margin-top: 80px; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.related-grid a { min-height: 170px; padding: 22px; display: flex; flex-direction: column; border: 1px solid var(--line-soft); }
.related-grid a:hover { border-color: var(--line); }
.related-grid span { color: var(--accent); font-size: 10px; }
.related-grid strong { margin: 16px 0; }
.related-grid time { margin-top: auto; color: var(--faint); font-size: 10px; }
.comments { margin-top: 80px; }

.tag-cloud { display: flex; flex-wrap: wrap; gap: 10px; }
.tag-cloud a { padding: 10px 14px; border: 1px solid var(--line-soft); color: var(--muted); }
.tag-cloud a:hover { border-color: var(--line); color: var(--white); }
.pagination { margin-top: 70px; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line-soft); padding-top: 24px; }
.page-numbers { display: flex; gap: 7px; }
.pagination a { min-width: 34px; min-height: 34px; display: inline-grid; place-items: center; color: var(--muted); font-size: 12px; }
.pagination a:hover, .pagination .selected { color: var(--navy-950); background: var(--white); }

.site-footer {
  width: min(calc(100% - 48px), var(--content)); margin: auto; padding: 48px 0;
  display: flex; align-items: end; justify-content: space-between; gap: 30px;
  border-top: 1px solid var(--line);
}
.footer-brand { font-size: 22px; font-weight: 700; }
.site-footer p { margin: 7px 0 0; color: var(--faint); font: 500 10px/1.5 "JetBrains Mono", monospace; }

@media (max-width: 980px) {
  .desktop-nav { display: none; }
  .hero { min-height: 560px; grid-template-columns: 1fr; align-content: end; }
  .hero-status { max-width: 360px; }
  .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .article-layout { display: block; }
  .article-aside { display: none; }
}

@media (max-width: 640px) {
  body { word-break: normal; }
  .header-inner, .hero, .post-section, .content-frame, .site-footer { width: min(calc(100% - 28px), var(--content)); }
  .header-inner { height: 70px; }
  .brand-mark { width: 38px; height: 38px; }
  .brand-copy small { display: none; }
  .menu-toggle { width: 42px; height: 42px; }
  .side-menu { padding: 24px 20px; }
  .hero { min-height: calc(100dvh - 98px); margin-top: 14px; padding: 30px 22px; gap: 34px; background-size: 34px 34px, 34px 34px, auto; }
  .hero h1 { margin-top: 17px; font-size: clamp(37px, 11vw, 52px); }
  .hero-copy > p { font-size: 14px; }
  .desktop-only { display: none; }
  .hero-actions { display: grid; }
  .button { width: 100%; }
  .hero-status { display: none; }
  .post-section { padding: 78px 0; }
  .section-heading { align-items: flex-start; }
  .post-grid, .related-grid { grid-template-columns: 1fr; }
  .post-card { min-height: 265px; }
  .post-card-link { padding: 23px; }
  .content-frame { padding: 64px 0 90px; }
  .article-header { padding: 24px 0 38px; }
  .article-header h1 { font-size: 39px; }
  .article-layout { padding-top: 40px; }
  .article-body { font-size: 16px; line-height: 1.85; }
  .article-body h2 { font-size: 26px; }
  .article-body pre { margin-left: -14px; margin-right: -14px; padding: 18px 14px; }
  .site-footer { align-items: flex-start; flex-direction: column; }
  .page-numbers { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
