:root {
  --bg: #0b1020;
  --bg-soft: #121931;
  --card: rgba(17, 24, 39, 0.84);
  --line: rgba(148, 163, 184, 0.18);
  --text: #e5edf8;
  --muted: #94a3b8;
  --primary: #7c9cff;
  --primary-strong: #5f83ff;
  --tag-bg: rgba(124, 156, 255, 0.12);
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --max-width: 1240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(circle at top, rgba(124, 156, 255, 0.14), transparent 28%),
    linear-gradient(180deg, #08101f 0%, #0b1020 50%, #0a0f1b 100%);
  color: var(--text);
  font-family: "Inter", "Noto Sans KR", sans-serif;
  line-height: 1.7;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.site-shell { min-height: 100vh; }

.hero {
  padding: 40px 20px 20px;
}

.hero-inner,
.topbar-inner,
.layout,
.site-footer {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
}

.hero-inner {
  padding: 30px 34px;
  border: 1px solid var(--line);
  border-radius: 32px;
  background: linear-gradient(145deg, rgba(17, 24, 39, 0.92), rgba(15, 23, 42, 0.7));
  box-shadow: var(--shadow);
}

.hero-eyebrow,
.section-label {
  margin: 0 0 10px;
  color: #9db3ff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.site-title {
  margin: 0;
  font-size: clamp(34px, 6vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.site-desc {
  max-width: 760px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 16px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(14px);
  background: rgba(6, 10, 20, 0.68);
  border-top: 1px solid rgba(255,255,255,0.04);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 20px;
}

.category-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.category-nav li { position: relative; }
.category-nav li a,
.category-nav li .link_tit,
.category-nav li .c_cnt { vertical-align: middle; }

.category-nav li a,
.category-nav li .link_tit {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  background: transparent;
  transition: all 0.18s ease;
}

.category-nav li a:hover,
.category-nav li .link_tit:hover {
  color: var(--text);
  border-color: var(--line);
  background: rgba(255,255,255,0.04);
}

.category-nav li .c_cnt {
  margin-left: 6px;
  color: #9db3ff;
  font-size: 12px;
  font-weight: 700;
}

.category-nav li ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  padding-left: 0;
  width: 100%;
}

.category-nav li ul li a,
.category-nav li ul li .link_tit {
  min-height: 32px;
  padding: 0 12px;
  border-color: rgba(148, 163, 184, 0.12);
  background: rgba(255,255,255,0.02);
  font-size: 13px;
}

.search-box { display: block; flex-shrink: 0; }
.search-box input {
  width: 220px;
  height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,0.03);
  color: var(--text);
  outline: none;
}
.search-box button {
  height: 42px;
  margin-left: 8px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.layout {
  display: block;
  padding: 24px 20px 80px;
}

.content-area,
.content-full {
  min-width: 0;
  max-width: var(--max-width);
  margin: 0 auto;
}

.article-card,
.empty-state {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--card);
  box-shadow: var(--shadow);
}

.post-grid {
  display: grid;
  gap: 16px;
}

.post-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,0.02);
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}
.post-card:hover {
  transform: translateY(-3px);
  border-color: rgba(124, 156, 255, 0.34);
  background: rgba(124, 156, 255, 0.05);
}
.post-card-body { padding: 20px 24px; }

.post-meta,
.article-meta,
.post-footer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(148, 163, 184, 0.7);
}

.post-card h3,
.article-title {
  margin: 10px 0 8px;
  line-height: 1.35;
  letter-spacing: -0.03em;
}

.post-card h3 {
  font-size: clamp(24px, 3vw, 34px);
}

.post-card p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-footer { margin-top: 8px; }

.article-card {
  margin-top: 8px;
  padding: 28px;
}

.article-head {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.article-head-simple { padding-bottom: 16px; }

.article-title {
  font-size: clamp(24px, 3.4vw, 40px);
}

.article-summary {
  padding-top: 18px;
}

.article-summary p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.summary-thumb {
  overflow: hidden;
  display: block;
  margin-bottom: 18px;
  border-radius: 18px;
}

.read-more {
  display: inline-flex;
  margin-top: 16px;
  color: #a9bcff;
  font-weight: 700;
}

.entry-content {
  padding-top: 24px;
}

.entry-content,
.entry-content * {
  color: var(--text);
}

.entry-content p,
.entry-content li,
.entry-content blockquote,
.entry-content span,
.entry-content div,
.entry-content strong,
.entry-content em {
  color: var(--text) !important;
}

.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4 {
  line-height: 1.3;
  letter-spacing: -0.03em;
  color: #f4f7ff !important;
}

.entry-content p,
.entry-content li,
.entry-content blockquote {
  font-size: 16px;
}

.entry-content a {
  color: #a9bcff !important;
}

.entry-content hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 28px 0;
}

.entry-content img {
  border-radius: 16px;
}

.entry-content pre,
.entry-content pre code,
.entry-content code,
.entry-content .hljs,
.entry-content .codeblock,
.entry-content .tt_article_useless_p_margin pre {
  font-family: Consolas, Monaco, monospace;
}

.entry-content pre,
.entry-content .hljs,
.entry-content .codeblock,
.entry-content .tt_article_useless_p_margin pre {
  overflow-x: auto;
  margin: 22px 0;
  padding: 18px;
  border: 1px solid rgba(124, 156, 255, 0.18);
  border-radius: 18px;
  background: #0a1120 !important;
  color: #dbe7ff !important;
}

.entry-content pre *,
.entry-content .hljs *,
.entry-content .codeblock * {
  background: transparent !important;
}

.entry-content :not(pre) > code {
  padding: 2px 8px;
  border-radius: 8px;
  background: rgba(124, 156, 255, 0.12) !important;
  color: #cfe0ff !important;
}

.entry-content blockquote {
  margin: 22px 0;
  padding: 18px 20px;
  border-left: 4px solid var(--primary);
  border-radius: 0 16px 16px 0;
  background: rgba(124, 156, 255, 0.08) !important;
  color: #dbe7ff !important;
}

.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
}

.entry-content th,
.entry-content td {
  padding: 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  background: rgba(255,255,255,0.02) !important;
  color: var(--text) !important;
}

.tag-wrap {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  flex-wrap: wrap;
  margin-top: 32px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.tag-items a {
  display: inline-flex;
  margin: 0 8px 8px 0;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--tag-bg);
  color: #bfd0ff;
  font-size: 14px;
}

.empty-state {
  margin-top: 18px;
  padding: 42px 26px;
  text-align: center;
}

.empty-state h3 { margin: 0 0 6px; }
.empty-state p,
.site-footer p { color: var(--muted); }

.paging {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
}
.page-btn,
.page-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,0.03);
  color: var(--text);
}
.page-numbers {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.no-more-prev,
.no-more-next {
  opacity: 0.35;
  pointer-events: none;
}

.site-footer {
  padding: 0 20px 60px;
  text-align: center;
}

@media (max-width: 820px) {
  .hero { padding-top: 24px; }
  .hero-inner, .article-card { padding: 22px; }
  .topbar-inner {
    flex-direction: column;
    align-items: stretch;
  }
  .search-box input { width: calc(100% - 86px); }
}

@media (max-width: 520px) {
  .site-title { font-size: 34px; }
  .post-card h3 { font-size: 22px; }
  .article-title { font-size: 28px; }
  .search-box input {
    width: 100%;
    margin-bottom: 8px;
  }
  .search-box button {
    width: 100%;
    margin-left: 0;
  }
}


.hero-github {
  margin-top: 16px;
}

.github-hero-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: #eaf1ff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  transition: all 0.2s ease;
}

.github-hero-link:hover {
  background: rgba(124, 146, 255, 0.16);
  border-color: rgba(124, 146, 255, 0.42);
  transform: translateY(-1px);
}

.github-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #8ea2ff;
  box-shadow: 0 0 10px rgba(142, 162, 255, 0.45);
  flex-shrink: 0;
}

.github-text {
  color: #eaf1ff;
}


.layout-with-sidebar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: start;
}

.content-area {
  min-width: 0;
}

.sidebar-area {
  position: sticky;
  top: 88px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

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

.sidebar-card h3 {
  margin: 0 0 12px;
  font-size: 20px;
  line-height: 1.3;
}

.sidebar-desc {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.sidebar-github-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
}

.guide-list {
  margin: 0;
  padding-left: 18px;
  color: var(--text);
}

.guide-list li + li {
  margin-top: 10px;
}

.article-card {
  margin-top: 0;
}

.content-area > .article-card + .article-card {
  margin-top: 16px;
}

.article-title {
  font-size: clamp(22px, 2.8vw, 32px);
}

.article-summary p {
  -webkit-line-clamp: 3;
}

.article-summary {
  padding-top: 16px;
}

@media (max-width: 980px) {
  .layout-with-sidebar {
    grid-template-columns: 1fr;
  }

  .sidebar-area {
    position: static;
    top: auto;
  }
}


.layout-with-sidebar .content-area {
  max-width: var(--max-width);
}

.comment-section {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.comment-section-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.comment-section-head h3 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.02em;
}

.comment-write {
  margin-bottom: 22px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.comment-login-state {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
}

.comment-guest-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.comment-write input,
.comment-textarea textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,0.03);
  color: var(--text);
  outline: none;
}

.comment-textarea textarea {
  min-height: 72px;
  resize: vertical;
}

.comment-submit-wrap {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

.comment-submit {
  min-width: 120px;
  height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.comment-list ul,
.comment-reply-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.comment-item {
  padding: 18px 0;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.comment-item:first-child {
  border-top: 0;
}

.comment-item.reply {
  margin-top: 14px;
  margin-left: 22px;
  padding: 16px 18px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 16px;
  background: rgba(255,255,255,0.02);
}

.comment-item-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 8px;
}

.comment-author {
  font-size: 15px;
}

.comment-date,
.comment-actions a {
  color: var(--muted);
  font-size: 13px;
}

.comment-body,
.comment-body * {
  color: var(--text) !important;
}

.comment-actions {
  display: flex;
  gap: 12px;
  margin-top: 10px;
}

@media (max-width: 820px) {
  .comment-guest-grid {
    grid-template-columns: 1fr;
  }
}


.comment-submit-wrap input,
.comment-submit-wrap button,
.comment-submit-wrap .submit {
  min-width: 120px;
  height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

/* Tistory author/namecard block hide */
.tt-box-namecard,
.tt_box_namecard,
.namecard-wrap,
.name-card-wrap,
.author-info,
.article-author,
.writer-info,
.entry-content + .tt-box-namecard,
.entry-content + .tt_box_namecard {
  display: none !important;
}


/* Extra hide rules for author/profile cards injected by Tistory */
.area_profile,
.article_profile,
.box-profile,
.box_profile,
.tt_profile,
.writer-card,
.post-cover + .area_profile,
.post-btn + .area_profile,
.entry-content + .area_profile,
.tt_article_useless_p_margin + .area_profile {
  display: none !important;
}


/* comment form compact layout */
.comment-write form {
  display: flex;
  align-items: flex-end;
  gap: 14px;
}

.comment-write .comment-textarea {
  flex: 1;
}

.comment-write .comment-submit-wrap {
  margin-top: 0;
  flex-shrink: 0;
}

.comment-write .comment-submit,
.comment-write .comment-submit-wrap input,
.comment-write .comment-submit-wrap button,
.comment-write .comment-submit-wrap .submit {
  min-width: 120px;
  height: 46px;
}

@media (max-width: 820px) {
  .comment-write form {
    display: block;
  }

  .comment-write .comment-submit-wrap {
    margin-top: 10px;
  }
}

/* Category other-posts box: force clean rectangle corners */
.another_category,
.another_category table,
.another_category .box,
.another_category .list,
.related-articles,
.related-articles table {
  border-radius: 0 !important;
  overflow: visible !important;
}

.another_category table {
  border-collapse: collapse !important;
}


/* comment form: textarea left, button fixed on right */
.comment-write {
  display: flex;
  align-items: flex-end;
  gap: 14px;
}

.comment-form-fields {
  flex: 1;
  min-width: 0;
}

.comment-textarea textarea {
  min-height: 64px;
}

.comment-submit-wrap {
  margin-top: 0;
  flex-shrink: 0;
  align-self: flex-end;
}

@media (max-width: 820px) {
  .comment-write {
    display: block;
  }

  .comment-submit-wrap {
    margin-top: 10px;
  }
}

/* Category other-posts box inner padding */
.another_category table th,
.another_category table td {
  padding-top: 8px !important;
  padding-bottom: 8px !important;
}

.another_category table th:first-child,
.another_category table td:first-child {
  padding-left: 14px !important;
}

.another_category table th:last-child,
.another_category table td:last-child {
  padding-right: 14px !important;
}


/* fix8: comment button matches textarea height */
.comment-write {
  align-items: stretch;
}

.comment-textarea textarea {
  min-height: 86px;
  height: 86px;
  resize: none;
}

.comment-submit-wrap {
  display: flex;
  align-self: stretch;
}

.comment-submit,
.comment-submit-wrap input,
.comment-submit-wrap button,
.comment-submit-wrap .submit,
.comment-write .comment-submit,
.comment-write .comment-submit-wrap input,
.comment-write .comment-submit-wrap button,
.comment-write .comment-submit-wrap .submit {
  min-width: 120px;
  height: 100%;
  min-height: 86px;
  border-radius: 20px;
}

@media (max-width: 820px) {
  .comment-textarea textarea {
    min-height: 76px;
    height: 76px;
  }

  .comment-submit-wrap,
  .comment-submit,
  .comment-submit-wrap input,
  .comment-submit-wrap button,
  .comment-submit-wrap .submit {
    min-height: 48px;
    height: 48px;
  }
}

/* fix11: index thumbnails sit on the right like mobile cards */
.article-summary {
  padding-top: 16px;
}

.article-summary::after {
  content: "";
  display: block;
  clear: both;
}

.article-summary .summary-thumb {
  float: right;
  width: 168px;
  height: 104px;
  margin: 2px 0 12px 18px;
  border-radius: 16px;
  overflow: hidden;
  display: block;
}

.article-summary .summary-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-summary p {
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-summary .read-more {
  display: inline-flex;
  clear: both;
  margin-top: 14px;
}

@media (max-width: 820px) {
  .article-summary .summary-thumb {
    width: 132px;
    height: 84px;
    margin: 0 0 10px 14px;
    border-radius: 14px;
  }

  .article-summary p {
    -webkit-line-clamp: 2;
    font-size: 15px;
  }

  .article-summary .read-more {
    margin-top: 10px;
    font-size: 14px;
  }
}

@media (max-width: 520px) {
  .article-summary .summary-thumb {
    width: 120px;
    height: 76px;
    margin-left: 12px;
  }
}
