:root {
    --bg: #08080a;
    --bg-soft: #0d0d10;
    --panel: #111115;
    --panel-2: #16161b;
    --text: #f7f7f8;
    --muted: #9a9aa4;
    --line: rgba(255,255,255,.09);
    --line-strong: rgba(255,255,255,.16);
    --silver: #cfd0d4;
    --accent: #ffffff;
    --radius: 22px;
    --radius-sm: 14px;
    --shadow: 0 24px 80px rgba(0,0,0,.36);
    --wrap: 1240px;
    --article: 780px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background:
        radial-gradient(circle at 85% -10%, rgba(255,255,255,.06), transparent 28rem),
        var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}
body.menu-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input { font: inherit; }
button { color: inherit; }
.wrap { width: min(calc(100% - 40px), var(--wrap)); margin-inline: auto; }
.site-main { min-height: 65vh; }

.site-header {
    position: sticky;
    top: 16px;
    z-index: 50;
    height: auto;
    padding-inline: 14px;
    background: transparent;
    transition: .25s ease;
}
.site-header.is-scrolled { top: 12px; }
.header-inner {
    min-height: 86px;
    display: flex;
    align-items: center;
    gap: 28px;
    padding-inline: 18px;
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 24px;
    background: rgba(8,8,10,.58);
    backdrop-filter: blur(18px) saturate(130%);
    box-shadow: 0 20px 40px rgba(0,0,0,.20), inset 0 1px 0 rgba(255,255,255,.05);
    transition: border-color .25s ease, background .25s ease, box-shadow .25s ease, transform .25s ease;
}
.site-header.is-scrolled .header-inner {
    border-color: rgba(255,255,255,.14);
    background: rgba(8,8,10,.72);
    box-shadow: 0 24px 60px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.06);
}
.brand { display: inline-flex; align-items: center; gap: 0; font-weight: 750; letter-spacing: -.035em; font-size: 1.05rem; }
.brand-mark { height: 60px; width: auto; display: flex; align-items: center; overflow: visible; }
.brand-mark img { width: auto; height: 100%; max-width: 220px; object-fit: contain; }
.brand-name { white-space: nowrap; }
.desktop-nav { margin-left: auto; }
.nav { margin: 0; padding: 0; list-style: none; display: flex; align-items: center; gap: 8px; }
.nav a { display: block; padding: 9px 12px; color: var(--muted); font-size: .9rem; font-weight: 550; border-radius: 10px; transition: .2s ease; }
.nav a:hover, .nav-current a { color: var(--text); background: rgba(255,255,255,.055); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn, .menu-btn { border: 1px solid var(--line); background: rgba(255,255,255,.03); width: 42px; height: 42px; border-radius: 12px; cursor: pointer; display: grid; place-items: center; transition: .2s ease; }
.icon-btn:hover, .menu-btn:hover { border-color: var(--line-strong); background: rgba(255,255,255,.07); }
.icon-btn svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.menu-btn { display: none; gap: 5px; align-content: center; }
.menu-btn span { width: 17px; height: 1.5px; background: currentColor; transition: .2s ease; }
.mobile-panel { display: none; }

.hero { position: relative; overflow: hidden; min-height: 600px; border-bottom: 1px solid var(--line); }
.hero-grid-bg {
    position: absolute; inset: 0; opacity: .32; pointer-events: none;
    background-image:
        linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(to bottom, black, transparent 95%);
}
.hero:before { content: ""; position: absolute; width: 660px; height: 660px; right: -160px; top: -180px; background: radial-gradient(circle, rgba(255,255,255,.10), transparent 68%); filter: blur(10px); }
.hero-inner { min-height: 600px; display: grid; grid-template-columns: 1.15fr .85fr; align-items: center; gap: 70px; padding-block: 70px; position: relative; }
.hero-inner-single { grid-template-columns: minmax(0, 860px); justify-content: start; }
.section-kicker, .eyebrow { text-transform: uppercase; letter-spacing: .12em; font-weight: 700; font-size: .72rem; color: #b9bac1; }
.hero h1 { margin: 22px 0 22px; font-size: clamp(3rem, 6vw, 5.8rem); line-height: .95; letter-spacing: -.065em; max-width: 820px; }
.hero-copy > p { margin: 0; max-width: 760px; color: var(--muted); font-size: clamp(1rem, 1.6vw, 1.16rem); line-height: 1.75; }
.hero-actions { display: flex; gap: 12px; margin-top: 34px; flex-wrap: wrap; }
.btn { min-height: 48px; padding: 0 19px; display: inline-flex; align-items: center; justify-content: center; border-radius: 13px; border: 1px solid var(--line); cursor: pointer; font-weight: 650; font-size: .92rem; transition: transform .2s ease, background .2s ease, border-color .2s ease; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: #f3f3f4; color: #09090b; border-color: #f3f3f4; }
.btn-primary:hover { background: #fff; }
.btn-secondary { background: rgba(255,255,255,.035); }
.btn-secondary:hover { border-color: var(--line-strong); background: rgba(255,255,255,.07); }
.hero-emblem { display: grid; place-items: center; position: relative; min-height: 410px; }
.emblem-glow { position: absolute; width: 75%; aspect-ratio: 1; border-radius: 50%; background: rgba(255,255,255,.08); filter: blur(55px); }
.emblem-frame {
    position: relative; width: min(380px, 90%); aspect-ratio: 1; display: grid; place-items: center; border-radius: 38px;
    background: linear-gradient(145deg, rgba(255,255,255,.09), rgba(255,255,255,.015));
    border: 1px solid rgba(255,255,255,.12); box-shadow: inset 0 1px 0 rgba(255,255,255,.12), var(--shadow);
    transform: rotate(2deg);
}
.emblem-frame:after { content: ""; position: absolute; inset: 12px; border: 1px solid rgba(255,255,255,.055); border-radius: 29px; }
.emblem-frame img { width: 68%; max-height: 68%; object-fit: contain; filter: drop-shadow(0 22px 28px rgba(0,0,0,.6)); }

.section { padding-block: 78px; }
.featured-section { padding-bottom: 20px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.section-heading h2 { margin: 7px 0 0; font-size: clamp(1.7rem, 3vw, 2.45rem); letter-spacing: -.045em; }
.small-search { border: 1px solid var(--line); background: rgba(255,255,255,.025); border-radius: 13px; color: var(--muted); padding: 11px 12px 11px 15px; display: inline-flex; align-items: center; gap: 24px; cursor: pointer; }
.small-search:hover { border-color: var(--line-strong); color: var(--text); }
kbd { padding: 4px 7px; border: 1px solid var(--line); border-bottom-color: rgba(255,255,255,.22); border-radius: 7px; font-family: inherit; font-size: .74rem; color: #b6b6bf; background: rgba(255,255,255,.04); }
.post-grid, .featured-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.featured-grid .post-card:first-child { grid-column: span 2; }
.featured-grid .post-card:first-child .post-card-media { aspect-ratio: 16 / 7.2; }
.post-card { min-width: 0; }
.post-card-link { height: 100%; display: flex; flex-direction: column; border: 1px solid var(--line); background: linear-gradient(160deg, rgba(255,255,255,.045), rgba(255,255,255,.018)); border-radius: var(--radius); overflow: hidden; transition: transform .28s ease, border-color .28s ease, box-shadow .28s ease; }
.post-card-link:hover { transform: translateY(-5px); border-color: rgba(255,255,255,.2); box-shadow: 0 24px 60px rgba(0,0,0,.25); }
.post-card-media { position: relative; aspect-ratio: 16 / 9.2; overflow: hidden; background: #0b0b0e; border-bottom: 1px solid var(--line); }
.post-card-media > img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.post-card-link:hover .post-card-media > img { transform: scale(1.035); }
.post-card-placeholder { width: 100%; height: 100%; display: grid; place-items: center; background: radial-gradient(circle at 50% 40%, rgba(255,255,255,.07), transparent 42%), #0a0a0c; }
.post-card-placeholder:before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px); background-size: 28px 28px; }
.post-card-placeholder img { width: 92px; opacity: .8; position: relative; }
.featured-badge { position: absolute; top: 14px; left: 14px; padding: 7px 10px; border-radius: 999px; background: rgba(7,7,9,.78); border: 1px solid var(--line-strong); backdrop-filter: blur(12px); font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; }
.post-card-body { display: flex; flex-direction: column; flex: 1; padding: 22px; }
.post-card-body h2 { font-size: 1.25rem; line-height: 1.23; letter-spacing: -.035em; margin: 10px 0 11px; }
.post-card-body p { margin: 0; color: var(--muted); line-height: 1.62; font-size: .92rem; }
.post-card-meta { margin-top: auto; padding-top: 24px; display: flex; align-items: center; gap: 9px; color: #85858e; font-size: .78rem; }
.meta-separator { width: 3px; height: 3px; border-radius: 50%; background: #606069; }
.card-arrow { margin-left: auto; font-size: 1rem; color: #b7b7bf; transition: transform .2s ease; }
.post-card-link:hover .card-arrow { transform: translate(2px,-2px); }
.pagination-wrap { margin-top: 38px; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 18px; color: var(--muted); }
.pagination a { padding: 10px 14px; border: 1px solid var(--line); border-radius: 11px; color: var(--text); }

.archive-header { padding-top: 110px; padding-bottom: 25px; text-align: center; max-width: 800px; }
.archive-header h1 { font-size: clamp(3rem, 8vw, 5rem); margin: 12px 0 16px; letter-spacing: -.06em; }
.archive-header p { color: var(--muted); font-size: 1.08rem; line-height: 1.7; margin: 0 auto; max-width: 650px; }
.author-avatar { width: 90px; height: 90px; border-radius: 26px; object-fit: cover; margin: 0 auto 24px; border: 1px solid var(--line-strong); }
.archive-section { padding-top: 32px; }

.reading-progress { position: fixed; z-index: 80; top: 0; left: 0; width: 100%; height: 2px; background: transparent; }
.reading-progress span { display: block; width: 0; height: 100%; background: #fff; box-shadow: 0 0 12px rgba(255,255,255,.7); }
.article-header { padding-top: 90px; padding-bottom: 48px; }
.article-narrow { max-width: calc(var(--article) + 40px); }
.back-link { display: inline-flex; color: #8c8c95; font-size: .85rem; margin-bottom: 38px; transition: color .2s ease; }
.back-link:hover { color: #fff; }
.article-tag { display: inline-block; margin-bottom: 16px; }
.article-header h1 { margin: 0; font-size: clamp(2.7rem, 6vw, 5.2rem); line-height: .98; letter-spacing: -.06em; }
.article-excerpt { color: var(--muted); font-size: 1.12rem; line-height: 1.72; margin: 24px 0 0; }
.article-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 20px; margin-top: 28px; color: #86868f; font-size: .84rem; }
.author-mini { display: inline-flex; align-items: center; gap: 8px; color: #c6c6cc; }
.author-mini img { width: 28px; height: 28px; object-fit: cover; border-radius: 50%; }
.article-cover { width: min(calc(100% - 40px), 920px); margin-top: 12px; margin-bottom: 52px; }
.article-cover img { width: 100%; aspect-ratio: 16 / 9; max-height: 500px; object-fit: cover; border-radius: 24px; border: 1px solid var(--line); box-shadow: var(--shadow); }
.article-cover figcaption { text-align: center; margin-top: 10px; color: #777780; font-size: .78rem; }
.article-layout { display: grid; grid-template-columns: 210px minmax(0, var(--article)); justify-content: center; gap: 58px; align-items: start; }
.article-aside { position: sticky; top: 110px; }
.toc-card { border-left: 1px solid var(--line-strong); padding-left: 17px; }
.toc-title { display: block; font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; color: #777780; margin-bottom: 13px; }
.toc-card nav { display: flex; flex-direction: column; gap: 8px; }
.toc-card a { color: #82828b; font-size: .78rem; line-height: 1.4; transition: color .2s ease; }
.toc-card a:hover { color: #fff; }
.toc-card .toc-sub { padding-left: 10px; font-size: .74rem; }

.gh-content { min-width: 0; font-size: 1.04rem; line-height: 1.82; color: #d6d6db; }
.gh-content > *:first-child { margin-top: 0; }
.gh-content h2, .gh-content h3, .gh-content h4 { color: #fff; line-height: 1.2; letter-spacing: -.035em; scroll-margin-top: 110px; }
.gh-content h2 { margin: 2.4em 0 .7em; font-size: 2rem; }
.gh-content h3 { margin: 2em 0 .6em; font-size: 1.45rem; }
.gh-content p { margin: 1.25em 0; }
.gh-content a { color: #fff; text-decoration: underline; text-decoration-color: #61616a; text-underline-offset: 3px; }
.gh-content strong { color: #fff; }
.gh-content hr { border: 0; height: 1px; background: var(--line); margin: 3em 0; }
.gh-content blockquote { margin: 1em 0; padding: 10px 14px; border-left: 3px solid #e8e8ea; background: rgba(255,255,255,.035); border-radius: 0 12px 12px 0; color: #ededf0; }
.gh-content blockquote > :first-child { margin-top: 0; }
.gh-content blockquote > :last-child { margin-bottom: 0; }
.gh-content blockquote p { margin: .3em 0; }
.gh-content code { font-family: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: .86em; padding: .22em .42em; border: 1px solid var(--line); border-radius: 6px; background: #121217; color: #ececf0; }
.gh-content pre { position: relative; overflow: auto; margin: 2em 0; padding: 22px; border: 1px solid var(--line); border-radius: 16px; background: #0b0b0e; box-shadow: inset 0 1px 0 rgba(255,255,255,.03); }
.gh-content pre code { padding: 0; border: 0; background: transparent; font-size: .82rem; line-height: 1.75; }
.copy-code { position: absolute; top: 10px; right: 10px; border: 1px solid var(--line); color: #b9b9c0; background: rgba(21,21,26,.92); border-radius: 8px; padding: 5px 8px; font-size: .7rem; cursor: pointer; }
.gh-content img { border-radius: 16px; }
.gh-content figure { margin: 2em 0; }
.gh-content figcaption { color: #777780; font-size: .78rem; text-align: center; margin-top: 8px; }
.gh-content table { width: 100%; border-collapse: separate; border-spacing: 0; margin: 2em 0; font-size: .9rem; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; }
.gh-content th, .gh-content td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; }
.gh-content th { color: #fff; background: rgba(255,255,255,.04); }
.gh-content tr:last-child td { border-bottom: 0; }
.gh-content .kg-card { margin-top: 2em; margin-bottom: 2em; }
.gh-content .kg-callout-card { border: 1px solid var(--line) !important; border-radius: 14px !important; padding: 12px 14px !important; margin-top: 1em !important; margin-bottom: 1em !important; }
.gh-content .kg-callout-card .kg-callout-text { line-height: 1.55; }
.gh-content .kg-bookmark-card a { border: 1px solid var(--line) !important; border-radius: 16px !important; overflow: hidden; background: #101014; }
.gh-content .kg-button-card .kg-btn { background: #fff; color: #09090b; border-radius: 12px; font-weight: 700; }
.gh-content .kg-width-wide { width: min(100vw - 40px, 1060px); margin-left: 50%; transform: translateX(-50%); }
.gh-content .kg-width-full { width: 100vw; margin-left: 50%; transform: translateX(-50%); border-radius: 0; }

.article-footer { margin-top: 60px; padding-bottom: 70px; }
.tag-list { display: flex; gap: 8px; flex-wrap: wrap; }
.tag-list a { padding: 8px 11px; border: 1px solid var(--line); border-radius: 999px; color: #b1b1b8; font-size: .78rem; }
.article-end-mark { display: grid; place-items: center; padding-top: 65px; }
.article-end-mark img { width: 56px; opacity: .38; }
.related-section { border-top: 1px solid var(--line); }

.page-header { text-align: center; }
.page-header .article-excerpt { max-width: 650px; margin-inline: auto; }
.error-page { min-height: 68vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding-block: 90px; }
.error-code { font: 600 clamp(5rem, 20vw, 12rem)/1 "JetBrains Mono", "SFMono-Regular", Consolas, monospace; color: #1d1d22; letter-spacing: -.08em; }
.error-page h1 { margin: -20px 0 10px; font-size: 2rem; }
.error-page p { color: var(--muted); margin: 0 0 28px; }

.site-footer { border-top: 1px solid var(--line); margin-top: 40px; }
.footer-inner { min-height: 165px; display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.footer-brand { display: flex; align-items: center; gap: 13px; }
.footer-logo { height: 54px; width: auto; display: flex; align-items: center; }
.footer-logo img { width: auto; height: 100%; max-width: 200px; object-fit: contain; }
.footer-meta { color: #66666f; display: flex; align-items: center; gap: 8px; font-size: .76rem; }
.footer-dot { color: #3f3f46; }

@media (max-width: 980px) {
    .desktop-nav { display: none; }
    .menu-btn { display: grid; }
    .header-actions { margin-left: auto; }
    .mobile-panel { display: block; position: fixed; top: 102px; left: 20px; right: 20px; max-height: 0; overflow: hidden; background: rgba(8,8,10,.92); backdrop-filter: blur(18px); border: 1px solid transparent; border-radius: 22px; box-shadow: 0 20px 45px rgba(0,0,0,.24); transition: max-height .3s ease, border-color .3s ease, padding .3s ease; }
    .mobile-panel.is-open { max-height: 430px; border-color: var(--line); }
    .mobile-nav { padding-block: 14px 24px; }
    .mobile-nav .nav { flex-direction: column; align-items: stretch; }
    .mobile-nav .nav a { padding: 12px 4px; font-size: 1rem; }
    .hero-inner { grid-template-columns: 1fr; gap: 20px; }
    .hero-emblem { order: -1; min-height: 250px; }
    .emblem-frame { width: 230px; border-radius: 30px; }
    .hero-copy { text-align: center; }
    .hero-copy > p { margin-inline: auto; }
    .hero-actions { justify-content: center; }
    .post-grid, .featured-grid { grid-template-columns: repeat(2, 1fr); }
    .featured-grid .post-card:first-child { grid-column: auto; }
    .featured-grid .post-card:first-child .post-card-media { aspect-ratio: 16 / 9.2; }
    .article-layout { grid-template-columns: minmax(0, var(--article)); }
    .article-aside { display: none; }
}

@media (max-width: 680px) {
    .wrap { width: min(calc(100% - 28px), var(--wrap)); }
    .site-header { height: 68px; }
    .site-header { top: 12px; padding-inline: 10px; }
    .header-inner { min-height: 72px; padding-inline: 14px; border-radius: 20px; }
    .mobile-panel { top: 92px; left: 14px; right: 14px; }
    .brand-mark { height: 46px; width: auto; }
    .brand-mark img { max-width: 165px; }
    .hero, .hero-inner { min-height: auto; }
    .hero-inner { padding-block: 46px 58px; }
    .hero h1 { font-size: clamp(2.8rem, 15vw, 4.5rem); }
    .hero-copy > p { font-size: .98rem; }
    .emblem-frame { width: 190px; }
    .hero-emblem { min-height: 205px; }
    .section { padding-block: 55px; }
    .section-heading { align-items: flex-start; flex-direction: column; }
    .small-search { width: 100%; justify-content: space-between; }
    .post-grid, .featured-grid { grid-template-columns: 1fr; }
    .post-card-body { padding: 19px; }
    .article-header { padding-top: 60px; }
    .article-header h1 { font-size: clamp(2.5rem, 12vw, 4rem); }
    .article-cover { width: min(calc(100% - 28px), 920px); margin-bottom: 38px; }
    .article-cover img { max-height: 360px; border-radius: 18px; }
    .gh-content { font-size: 1rem; line-height: 1.75; }
    .gh-content h2 { font-size: 1.7rem; }
    .footer-inner { flex-direction: column; align-items: flex-start; justify-content: center; padding-block: 35px; }
    .footer-meta { flex-wrap: wrap; }
}
