@font-face {
  font-family: "IBMPlexSansKR-Regular";
  src: url("/fonts/IBMPlexSansKR-Regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Hack";
  src: url("/fonts/Hack.woff2") format("woff2"),
    url("/fonts/Hack.woff") format("woff"),
    url("/fonts/Hack.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "ShadowsIntoLight";
  src: url("/fonts/ShadowsIntoLight.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #181818;
  --surface: #181818;
  --surface-2: #1f1f1f;
  --surface-3: #2a2a2a;
  --text: #ffffff;
  --muted: #b9b9b9;
  --accent: #8a91b5;
  --outline: #2a2e44;
}

* {
  box-sizing: border-box;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "IBMPlexSansKR-Regular", "Apple SD Gothic Neo", "Malgun Gothic",
    sans-serif;
  font-weight: 500;
  letter-spacing: 0.3px;
}

a {
  color: inherit;
  text-decoration: none;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 0.95em;
}

th,
td {
  border: 1px solid #2a2a2a;
  padding: 8px 10px;
  text-align: left;
}

thead th {
  background: #1f1f1f;
}

ul li::marker {
  content: "✶ ";
}

.appbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #1f1f1f;
  border-bottom: 1px solid #111;
}

.appbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 7px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.appbar-left {
  position: absolute;
  left: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.appbar-right {
  position: absolute;
  right: 20px;
  display: flex;
  align-items: center;
}

.search-btn {
  width: 36px;
  height: 36px;
  border: 1px solid #2a2a2a;
  background: #1f1f1f;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.search-btn:hover {
  background: #2a2a2a;
}

.search-icon {
  width: 16px;
  height: 16px;
  border: 2px solid #f2f2f2;
  border-radius: 50%;
  position: relative;
}

.search-icon::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 2px;
  background: #f2f2f2;
  right: -6px;
  bottom: -2px;
  transform: rotate(45deg);
  border-radius: 2px;
}

.search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.search-overlay.open {
  opacity: 1;
  visibility: visible;
}

.search-dialog {
  width: min(720px, 92vw);
  background: #242424;
  border: 1px solid #2f2f2f;
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  height: min(560px, 80vh);
  display: flex;
  flex-direction: column;
}

.search-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.search-title {
  font-size: 18px;
  font-weight: 600;
}

.search-close {
  background: transparent;
  border: 1px solid #2a2a2a;
  color: #f2f2f2;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
}

.search-input-wrap {
  position: relative;
  margin-bottom: 10px;
}

.search-input-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  border: 2px solid #cfcfcf;
  border-radius: 50%;
}

.search-input-icon::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 2px;
  background: #cfcfcf;
  right: -5px;
  bottom: -2px;
  transform: rotate(45deg);
  border-radius: 2px;
}

.search-input {
  width: 100%;
  background: #1b1b1b;
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  padding: 10px 12px 10px 36px;
  color: #f2f2f2;
  font-size: 14px;
  outline: none;
}

.search-results {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.search-item {
  display: block;
  padding: 10px 6px;
  border-bottom: 1px solid #2f2f2f;
}

.search-item:last-child {
  border-bottom: none;
}

.search-item-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
}

.search-item-excerpt {
  font-size: 13px;
  color: #bdbdbd;
  line-height: 1.5;
}

.search-empty {
  color: #9b9b9b;
  padding: 16px 4px;
  font-size: 13px;
}

.menu-btn {
  width: 36px;
  height: 36px;
  border: 1px solid #2a2a2a;
  background: #1f1f1f;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.menu-btn:hover {
  background: #2a2a2a;
}

.menu-icon,
.menu-icon::before,
.menu-icon::after {
  content: "";
  display: block;
  width: 18px;
  height: 2px;
  background: #f2f2f2;
  border-radius: 2px;
  position: relative;
}

.menu-icon::before {
  position: absolute;
  top: -6px;
  left: 0;
}

.menu-icon::after {
  position: absolute;
  top: 6px;
  left: 0;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

.social-link img {
  width: 22px;
  height: 22px;
  filter: brightness(0) invert(1);
  display: block;
}

.dot-sep {
  color: #ffffff;
  opacity: 0.6;
  font-size: 14px;
  line-height: 1;
}

.footer {
  border-top: 1px solid #111;
  background: #1f1f1f;
  padding: 12px 0 10px;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
}

.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease;
  z-index: 20;
}

.drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 280px;
  height: 100vh;
  background: #151515;
  border-right: 1px solid #222;
  transform: translateX(-100%);
  transition: transform 0.2s ease;
  z-index: 21;
  padding: 16px;
  overflow-y: auto;
}

.drawer-open .drawer {
  transform: translateX(0);
}

.drawer-open .drawer-overlay {
  opacity: 1;
  visibility: visible;
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.drawer-title {
  font-size: 18px;
  font-weight: 600;
}

.drawer-close {
  background: transparent;
  border: 1px solid #2a2a2a;
  color: #f2f2f2;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
}

.drawer-section {
  margin-top: 16px;
}

.drawer-section-title {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.drawer-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.appbar-title {
  font-family: "ShadowsIntoLight", "IBMPlexSansKR-Regular",
    "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  font-size: 30px;
  font-weight: 400;
  letter-spacing: 0.4px;
  color: var(--text);
}

.page {
  min-height: calc(100vh - 50px);
  padding-bottom: 90px;
}

.page-header {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 20px 6px;
}

.page-title {
  margin: 0 0 6px;
  font-size: 26px;
  font-weight: 700;
}

.page-subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 20px 40px;
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

.appbar + .page .grid {
  margin-top: 20px;
}

@media (min-width: 860px) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1200px) {
  .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.post-card {
  background: var(--surface-2);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #2a2a2a;
  display: flex;
  flex-direction: column;
}

.thumb {
  display: block;
  width: 100%;
  height: 0;
  padding-bottom: 56%;
  background: var(--surface-3);
  background-size: cover;
  background-position: center;
}

.post-body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
}

.post-title {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.35;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  align-items: center;
}

.post .post-meta {
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}

.post-tags {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}


.chip {
  border: 1px solid var(--outline);
  background: var(--surface-2);
  color: #d8d8d8;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
}

.chip--tag {
  background: #1f242f;
  color: #cdd4f5;
  border-color: #2f364f;
  padding-top: 2px;
  padding-bottom: 2px;
}

.drawer-chip {
  border-color: transparent;
}

.drawer-chip--category {
  background: #1c2736;
  color: #b9d7ff;
  border-color: #2a3b55;
}

.drawer-chip--category:hover {
  background: #243245;
  color: #e0efff;
}

.drawer-chip--tag {
  background: #2a1f2a;
  color: #f0c9ff;
  border-color: #4a2b4a;
}

.drawer-chip--tag:hover {
  background: #3a2740;
  color: #ffe6ff;
}

.more-wrap {
  text-align: center;
  padding: 16px 0 48px;
}

.more-btn {
  display: inline-block;
  background: #2d2d2d;
  color: #f2f2f2;
  border: 1px solid #3a3a3a;
  padding: 10px 18px;
  border-radius: 8px;
}

.more-btn:hover {
  background: #3a3a3a;
}

.hidden {
  display: none !important;
}

.post {
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 20px 40px;
  width: 100%;
}

.post-header {
  margin-bottom: 18px;
  max-width: 980px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

.post-header h1 {
  margin: 0 0 4px;
  font-size: 30px;
}

.post-meta-date {
  display: flex;
  gap: 10px;
  color: var(--muted);
  font-size: 17px;
}

.post-meta-tags {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 18px;
  border-bottom: 1px solid #5a5a5a;
  width: 100%;
}

.post-cover {
  width: 100%;
  height: 0;
  padding-bottom: 45%;
  margin-top: 16px;
  border-radius: 12px;
  background-size: cover;
  background-position: center;
  border: 1px solid #2a2a2a;
}

.post-content {
  font-size: 18px;
  line-height: 2;
  color: var(--text);
  max-width: 980px;
  margin-left: auto;
  margin-right: auto;
  padding-top: 18px;
  width: 100%;
}

.post-content hr {
  border: 0;
  height: 2px;
  background-image: radial-gradient(circle, #5a5a5a 1px, transparent 1.5px);
  background-size: 10px 2px;
  background-repeat: repeat-x;
  background-position: center;
  margin: 26px 0;
}

.post-content p,
.post-content ul,
.post-content ol {
  margin: 0 0 16px;
}

.post-content ul {
  list-style-type: disc;
}

.post-content ul,
.post-content ol {
  padding-left: 18px;
  margin-left: 0;
}

.post-content p + ul,
.post-content p + ol {
  margin-top: 6px;
}

.post-content ul + p,
.post-content ol + p {
  margin-top: 6px;
}

.post-content ul li,
.post-content ol li {
  margin: 0 0 6px;
}

.post-content ul li:last-child,
.post-content ol li:last-child {
  margin-bottom: 0;
}

.post-content ul ::marker {
  font-size: 0.75em;
  color: #ffffff;
}

.post-content h2,
.post-content h3 {
  margin: 0 0 16px;
}

.post-content h2 {
  font-size: 24px;
}

.post-content h3 {
  font-size: 20px;
}

.post-content h1,
.post-content h2 {
  position: relative;
  padding-left: 18px;
}

.post-content h1::before,
.post-content h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 0.9em;
  background: linear-gradient(180deg, #ffffff, #8a8a8a);
  border: 1px solid transparent;
  border-radius: 3px;
  box-shadow: none;
  opacity: 0.9;
}

.post-content .text-box {
  margin: 0 0 16px;
  padding: 16px 18px;
  background: linear-gradient(180deg, #222222, #1d1d1d);
  border: 1px solid #2a2a2a;
  border-radius: 10px;
  color: var(--muted);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.post-content .text-box p {
  margin: 0 0 8px;
}

.post-content .text-box p:last-child {
  margin-bottom: 0;
}

.post-content .text-box ul,
.post-content .text-box ol {
  margin: 0 0 8px;
  padding-left: 18px;
  margin-left: 0;
  list-style-position: inside;
}

.post-content .text-box li {
  margin: 0 0 6px;
  padding-left: 0;
}

.post-content .text-box li:last-child {
  margin-bottom: 0;
}

.post-content ul.text-box,
.post-content ol.text-box {
  padding-left: 18px;
  margin-left: 0;
  list-style-position: inside;
}

.post-content .text-box cite {
  display: block;
  margin-top: 8px;
  font-style: normal;
  color: #9c9c9c;
}

.post-content a {
  color: #9cc7ff;
}

.post-content pre,
.post-content code {
  font-family: "Hack", "IBMPlexSansKR-Regular", monospace;
}

.post-content pre {
  background: #212121;
  font-size: 14px;
}

.post-content .highlight,
.post-content .highlight pre,
.post-content .highlight code {
  background: #212121 !important;
}

.post-content .highlight {
  border-radius: 10px;
  overflow: hidden;
  margin: 0 0 16px;
}

.code-block {
  border: 1px solid #2a2a2a;
  border-radius: 10px;
  margin: 0 0 16px;
  background: #1b1b1b;
}

.code-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-bottom: 1px solid #2a2a2a;
  cursor: pointer;
  user-select: none;
}

.code-block-title {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.code-block-toggle {
  background: transparent;
  border: 1px solid #2a2a2a;
  color: #f2f2f2;
  padding: 4px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
}

.code-block-body {
  padding: 0;
}

.code-block.collapsed .code-block-body {
  display: none;
}

.post-content pre {
  margin: 0;
  padding: 14px;
  border-radius: 10px;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.post-content code {
  color: #d8e9ff;
}

.post-content :not(pre) > code {
  font-size: 14px;
  background: #212121;
  display: inline-block;
  padding: 1px 4px;
  border-radius: 4px;
}

.post-content img {
  max-width: 100%;
  border-radius: 10px;
  display: block;
  margin: 20px auto;
}

.video-embed {
  max-width: 800px;
  margin: 20px auto;
}

.video-embed-inner {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  border-radius: 10px;
  overflow: hidden;
  background: #111111;
  border: 1px solid #2a2a2a;
}

.video-embed-inner iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.btn-link {
  display: inline-block;
  margin: 0 0 16px;
  padding: 8px 14px;
  border-radius: 8px;
  background: #2a2a2a;
  border: 1px solid #3a3a3a;
  color: #ffffff;
  font-size: 14px;
}

.post-content .btn-link {
  color: #ffffff !important;
}

.post-content p + .btn-link {
  margin-top: 0;
}

.post-content .btn-link + p {
  margin-top: 0;
}

.btn-link:hover {
  background: #3a3a3a;
}
