:root {
    --blog-sans: "Inter", "Noto Sans KR", system-ui, -apple-system, "Segoe UI", sans-serif;
    --blog-heading: "Manrope", "Noto Sans KR", system-ui, -apple-system, "Segoe UI", sans-serif;
    --blog-korean: "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
    --blog-mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
    --bs-body-font-family: var(--blog-sans);
    --default-font: var(--blog-sans);
    --heading-font: var(--blog-heading);
    --nav-font: var(--blog-sans);
}

html {
    font-synthesis: none;
}

body {
    font-family: var(--blog-sans);
    font-size: 1rem;
    line-height: 1.7;
    letter-spacing: -0.006em;
    text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4,
h5,
h6,
.h1,
.h2,
.h3,
.h4,
.h5,
.h6 {
    font-family: var(--blog-heading);
    line-height: 1.3;
    letter-spacing: -0.032em;
}

button,
input,
select,
textarea,
.btn,
.navbar,
.nav {
    font-family: var(--blog-sans);
}

code,
kbd,
pre,
samp {
    font-family: var(--blog-mono);
    letter-spacing: -0.015em;
}

.header {
    font-family: var(--blog-sans);
}

.header .logo h1 {
    font-family: var(--blog-heading);
    font-size: 1.45rem;
    letter-spacing: -0.045em;
}

.navmenu a,
.navmenu a:focus {
    font-family: var(--blog-sans);
    font-size: 0.94rem;
    letter-spacing: -0.012em;
}

.header #searchInput {
    font-size: 0.82rem;
    letter-spacing: -0.01em;
}

header.masthead .page-heading .subheading,
header.masthead .site-heading .subheading,
header.masthead .post-heading .subheading,
header.masthead .post-heading .meta {
    font-family: var(--blog-sans);
}

header.masthead .site-heading h1,
header.masthead .site-heading h2,
header.masthead .site-heading h3,
header.masthead .post-heading h1,
header.masthead .post-heading h2 {
    font-family: var(--blog-heading);
    letter-spacing: -0.045em;
}

@media (min-width: 992px) {
    header.masthead .post-heading {
        width: min(86vw, 58rem);
        max-width: calc(100vw - 4rem);
        margin-left: 50%;
        transform: translateX(-50%);
    }
}

header.masthead .post-heading h2 {
    max-width: 100%;
    margin: 0 0 0.9rem;
    font-size: clamp(1.85rem, 4vw, 2.55rem);
    font-weight: 700;
    line-height: 1.22;
    text-wrap: pretty;
}

header.masthead .post-heading .meta {
    font-size: 0.85rem;
    font-style: normal;
    font-weight: 400;
    letter-spacing: 0;
}

.post-card-body .post-title {
    font-family: var(--blog-heading);
    font-size: 1.08rem;
    font-weight: 700;
    line-height: 1.38;
    letter-spacing: -0.025em;
}

.post-card-body .post-subtitle {
    font-family: var(--blog-sans);
    font-size: 0.88rem;
    font-weight: 400;
    line-height: 1.58;
    letter-spacing: -0.008em;
}

.post-preview > .post-meta,
.post-meta-sm,
.post-tag {
    font-family: var(--blog-sans);
    letter-spacing: 0;
}

.main-content {
    color: #27313b;
    font-family: var(--blog-sans);
    font-size: 1.025rem;
    line-height: 1.8;
    letter-spacing: -0.008em;
    overflow-wrap: break-word;
}

.main-content a {
    color: #159c78;
    text-decoration: none;
    text-underline-offset: 0.18em;
    transition: color 0.16s ease, text-decoration-color 0.16s ease;
}

.main-content a:hover {
    color: #0f7f62;
    text-decoration: underline;
    text-decoration-color: rgba(15, 127, 98, 0.32);
}

.main-content p {
    margin: 1.4rem 0;
}

.main-content li {
    margin: 0.34rem 0;
}

.main-content h1,
.main-content h2,
.main-content h3,
.main-content h4,
.main-content h5,
.main-content h6 {
    color: #17202a;
    margin-top: 2.65rem;
    margin-bottom: 0.85rem;
    font-family: var(--blog-heading);
    font-weight: 700;
    line-height: 1.38;
    letter-spacing: -0.035em;
    text-wrap: pretty;
}

.main-content h2 {
    font-size: 1.72rem;
}

.main-content h3 {
    font-size: 1.38rem;
}

.main-content h4 {
    position: relative;
    margin-top: 2.15rem;
    margin-bottom: 0.72rem;
    padding-left: 0.82rem;
    color: #253545;
    font-size: 1.08rem;
    font-weight: 700;
    line-height: 1.42;
    letter-spacing: -0.026em;
}

.main-content h4::before {
    content: "";
    position: absolute;
    top: 0.2em;
    left: 0;
    width: 3px;
    height: 1.05em;
    border-radius: 999px;
    background: linear-gradient(180deg, #15b886, #2a7fb8);
}

.main-content strong {
    font-weight: 700;
}

.main-content pre {
    margin: 1.7rem 0;
    padding: 1rem 1.05rem;
    border: 1px solid #dce5ee;
    border-radius: 12px;
    background: #f6f8fa;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
    overflow-x: auto;
    font-size: 0.9rem !important;
    line-height: 1.62;
}

.main-content pre code {
    padding: 0;
    background: transparent;
    font-size: 0.9rem !important;
}

.main-content :not(pre) > code {
    padding: 0.14rem 0.34rem;
    border-radius: 6px;
    background: #eef4f8;
    color: #1e3a4a;
    font-size: 0.86em;
}

.main-content blockquote,
.main-content aside {
    font-style: normal;
    line-height: 1.76;
}

.main-content blockquote {
    position: relative;
    margin: 2rem 0;
    padding: 1.05rem 1.18rem 1.05rem 1.35rem;
    border: 1px solid rgba(21, 184, 134, 0.16);
    border-left: 0;
    border-radius: 14px;
    background:
        linear-gradient(135deg, rgba(21, 184, 134, 0.1), rgba(42, 127, 184, 0.055));
    color: #465867;
    font-weight: 400;
    box-shadow: 0 12px 28px rgba(39, 49, 59, 0.055);
}

.main-content blockquote::before {
    content: "";
    position: absolute;
    top: 0.85rem;
    bottom: 0.85rem;
    left: 0;
    width: 4px;
    border-radius: 999px;
    background: linear-gradient(180deg, #15b886, #2a7fb8);
}

.main-content blockquote > :first-child {
    margin-top: 0;
}

.main-content blockquote > :last-child {
    margin-bottom: 0;
}

.main-content blockquote p {
    margin: 0.65rem 0;
    font-weight: 400;
}

.main-content blockquote strong {
    color: #1f2d3a;
    font-weight: 600;
}

.main-content blockquote cite,
.main-content blockquote footer {
    display: block;
    margin-top: 0.75rem;
    color: #66717d;
    font-size: 0.88em;
    font-style: normal;
}

.main-content figcaption,
.main-content .caption {
    color: #66717d;
    font-family: var(--blog-sans);
    font-size: 0.8rem !important;
    line-height: 1.55;
    letter-spacing: -0.005em;
}

.main-content figure.post-media {
    margin: 1.8rem auto;
}

.main-content figure.post-media video,
.main-content figure.post-media img {
    margin: 0 auto 0.55rem;
}

.main-content figure.post-media figcaption {
    max-width: 58rem;
    margin: 0 auto;
}

.main-content img,
.main-content video {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 1.8rem auto;
    border-radius: 12px;
}

.main-content table {
    width: 100%;
    margin: 2rem 0;
    border: 1px solid #dbe4ee;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 12px 26px rgba(39, 49, 59, 0.045);
    overflow: hidden;
    font-size: 0.88rem;
    line-height: 1.55;
}

.main-content th,
.main-content td {
    padding: 0.72rem 0.82rem;
    border: 0;
    border-right: 1px solid #e5edf4;
    border-bottom: 1px solid #e5edf4;
    text-align: left;
    vertical-align: top;
}

.main-content th:last-child,
.main-content td:last-child {
    border-right: 0;
}

.main-content tr:last-child > th,
.main-content tr:last-child > td {
    border-bottom: 0;
}

.main-content thead th {
    background: #f4f8fb;
    color: #1d2c3a;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.main-content tbody tr:nth-child(even) td {
    background: #fbfdff;
}

.main-content td img,
.main-content th img {
    display: block;
    max-width: 100%;
    margin: 0 auto;
}

.toc {
    font-family: var(--blog-sans);
    font-size: 0.74rem;
    letter-spacing: -0.01em;
}

html[lang="ko"] body {
    font-family: var(--blog-korean);
    letter-spacing: -0.014em;
}

html[lang="ko"] h1,
html[lang="ko"] h2,
html[lang="ko"] h3,
html[lang="ko"] h4,
html[lang="ko"] h5,
html[lang="ko"] h6,
html[lang="ko"] .post-card-body .post-title,
html[lang="ko"] header.masthead .post-heading h2 {
    font-family: var(--blog-korean);
    letter-spacing: -0.04em;
    word-break: keep-all;
}

html[lang="ko"] .main-content,
.main-content.is-korean-content {
    font-family: var(--blog-korean);
    font-size: 1.025rem;
    line-height: 1.8;
    letter-spacing: -0.018em;
    word-break: keep-all;
}

html[lang="ko"] .main-content h2,
html[lang="ko"] .main-content h3,
html[lang="ko"] .main-content h4,
.main-content.is-korean-content h2,
.main-content.is-korean-content h3,
.main-content.is-korean-content h4 {
    font-family: var(--blog-korean);
    line-height: 1.38;
    letter-spacing: -0.045em;
    word-break: keep-all;
}

html[lang="ko"] .main-content p,
.main-content.is-korean-content p {
    margin: 1.4rem 0;
}

html[lang="ko"] .post-card-body .post-subtitle {
    line-height: 1.68;
    letter-spacing: -0.018em;
    word-break: keep-all;
}

@media (max-width: 575.98px) {
    .main-content,
    html[lang="ko"] .main-content {
        font-size: 1rem;
    }

    .main-content {
        line-height: 1.78;
    }

    html[lang="ko"] .main-content,
    .main-content.is-korean-content {
        line-height: 1.78;
    }

    .main-content h2 {
        font-size: 1.55rem;
    }

    .main-content h3 {
        font-size: 1.28rem;
    }

    .main-content h4 {
        font-size: 1.05rem;
    }

    .main-content table {
        display: block;
        max-width: 100%;
        overflow-x: auto;
    }

    header.masthead .post-heading h2 {
        font-size: clamp(1.65rem, 8vw, 2.1rem);
    }
}

html[data-theme="dark"] .main-content {
    color: #c9d3df;
}

html[data-theme="dark"] .main-content h1,
html[data-theme="dark"] .main-content h2,
html[data-theme="dark"] .main-content h3,
html[data-theme="dark"] .main-content h4,
html[data-theme="dark"] .main-content h5,
html[data-theme="dark"] .main-content h6 {
    color: #e8eef6;
}

html[data-theme="dark"] .main-content a {
    color: #4dd7b4;
}

html[data-theme="dark"] .main-content a:hover {
    color: #94f1d8;
    text-decoration-color: rgba(148, 241, 216, 0.35);
}

html[data-theme="dark"] .main-content strong {
    color: #eef4fb;
}

html[data-theme="dark"] .main-content :not(pre) > code {
    background: rgba(77, 215, 180, 0.1);
    color: #aaf0dc;
}

html[data-theme="dark"] .main-content pre,
html[data-theme="dark"] .main-content pre[class*="language-"] {
    border-color: #263241;
    background: #111820;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

html[data-theme="dark"] .main-content code[class*="language-"],
html[data-theme="dark"] .main-content pre[class*="language-"] {
    color: #c9d3df;
    text-shadow: none;
}

html[data-theme="dark"] .main-content .token.comment,
html[data-theme="dark"] .main-content .token.prolog,
html[data-theme="dark"] .main-content .token.doctype,
html[data-theme="dark"] .main-content .token.cdata {
    color: #8290a1;
}

html[data-theme="dark"] .main-content .token.punctuation {
    color: #aab6c4;
}

html[data-theme="dark"] .main-content .token.property,
html[data-theme="dark"] .main-content .token.tag,
html[data-theme="dark"] .main-content .token.boolean,
html[data-theme="dark"] .main-content .token.number,
html[data-theme="dark"] .main-content .token.constant,
html[data-theme="dark"] .main-content .token.symbol,
html[data-theme="dark"] .main-content .token.deleted {
    color: #ffb4a8;
}

html[data-theme="dark"] .main-content .token.selector,
html[data-theme="dark"] .main-content .token.attr-name,
html[data-theme="dark"] .main-content .token.string,
html[data-theme="dark"] .main-content .token.char,
html[data-theme="dark"] .main-content .token.builtin,
html[data-theme="dark"] .main-content .token.inserted {
    color: #8debd3;
}

html[data-theme="dark"] .main-content .token.operator,
html[data-theme="dark"] .main-content .token.entity,
html[data-theme="dark"] .main-content .token.url,
html[data-theme="dark"] .main-content .language-css .token.string,
html[data-theme="dark"] .main-content .style .token.string {
    color: #d0b7ff;
    background: transparent;
}

html[data-theme="dark"] .main-content .token.atrule,
html[data-theme="dark"] .main-content .token.attr-value,
html[data-theme="dark"] .main-content .token.keyword {
    color: #8fb8ff;
}

html[data-theme="dark"] .main-content .token.function,
html[data-theme="dark"] .main-content .token.class-name {
    color: #ffd580;
}

html[data-theme="dark"] .main-content .token.regex,
html[data-theme="dark"] .main-content .token.important,
html[data-theme="dark"] .main-content .token.variable {
    color: #f2a6d3;
}

html[data-theme="dark"] .main-content blockquote {
    border-color: rgba(77, 215, 180, 0.2);
    background:
        linear-gradient(135deg, rgba(77, 215, 180, 0.12), rgba(79, 143, 205, 0.075));
    color: #c8d3df;
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.18);
}

html[data-theme="dark"] .main-content blockquote strong {
    color: #f2f7fc;
    font-weight: 600;
}

html[data-theme="dark"] .main-content blockquote cite,
html[data-theme="dark"] .main-content blockquote footer,
html[data-theme="dark"] .main-content figcaption,
html[data-theme="dark"] .main-content .caption {
    color: #93a2b3;
}

html[data-theme="dark"] .main-content table {
    border-color: #263241;
    background: #111820;
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.2);
}

html[data-theme="dark"] .main-content th,
html[data-theme="dark"] .main-content td {
    border-color: #263241;
}

html[data-theme="dark"] .main-content thead th {
    background: #172130;
    color: #e8eef6;
}

html[data-theme="dark"] .main-content tbody tr:nth-child(even) td {
    background: #141d29;
}

html[data-theme="dark"] header.masthead .post-heading .meta {
    color: rgba(255, 255, 255, 0.76);
}
