@charset "utf-8";

:root
{
    --font-color-0: #CF4B4B;
    --font-color-1: #252525;
    --font-color-2: #444;
    --font-color-3: #777;
    --font-landing: 'Lexend', -apple-system, 'PingFang SC', 'Noto Sans SC', 'Helvetica Neue', sans-serif;
    --bg-color-1: #F4F5F6;
    --line-1: #EAEAEA;
    --line-2: #E0E0E0;
}
p
{
    word-wrap: break-word;
}

html
{
    scrollbar-gutter: stable;
    scroll-padding-top: 72px; /* 导航栏高度 + 8px 余量 */
}
@media (max-width: 768px) {
    html {
        scroll-padding-top: 52px;
    }
}
body
{
    font-family: "Montserrat", "SF UI Text", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Helvetica, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
    font-size: 16px;
    line-height: 1.75;
    letter-spacing: 0.6px;
    color: var(--font-color-2);
}
a
{
    text-decoration: none;
    color: var(--font-color-3);
    transition: color .2s ease;
}
a:hover
{
    color: var(--font-color-0);
}

.paper-main
{
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 48px 40px 24px;
}
.paper-main--landing {
    padding: 0 13px;
}

.header-sticky
{
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line-1);
}
.header
{
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 40px;
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-items: center;
}

.logo {
    font-size: 2rem;
    font-weight: 600;
    color: var(--font-color-1);
    flex: 0 0 auto;
    margin-bottom: 0;
    line-height: 0;
}

.logo img {
    vertical-align: middle;
}

.header nav {
    flex: 1;
}

.nav
{
    margin: 0;
    margin-left: 32px;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-content: center;
}
.nav li
{
    padding: 0;
    margin-right: 24px;
}
.nav li:last-of-type
{
    margin-right: 0;
}
.nav li a
{
    display: block;
    padding: 2px 0 4px;
    color: var(--font-color-2);
    font-size: 0.875rem;
    letter-spacing: 0;
    opacity: 0.6;
    transition: opacity .2s ease, color .2s ease;
    position: relative;
}
.nav li a::after
{
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: transparent;
    background-image: none;
    transition: background .2s ease;
}
.nav li a:hover
{
    opacity: 1;
    color: var(--font-color-0);
}
/* 外链菜单项的 ↗ 标识（继承文字色与 hover） */
.nav-external-icon {
    display: inline-block;
    margin-left: 3px;
    vertical-align: middle;
    transform: translateY(-1px);
}

/* Language Switcher */
.lang-switch {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    letter-spacing: 0.3px;
    color: var(--font-color-3);
    text-decoration: none;
    transition: color 0.2s ease;
    margin-left: 24px;
    flex-shrink: 0;
}
.lang-switch:hover {
    color: var(--font-color-2);
}
.lang-switch span {
    opacity: 0.65;
    font-weight: 400;
    transition: opacity 0.2s ease;
}
.lang-switch .lang-active {
    opacity: 1;
    font-weight: 600;
    color: var(--font-color-1);
}
.lang-switch .lang-sep {
    opacity: 0.3;
    font-weight: 300;
}

.post-header
{
    margin-bottom: 48px;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-content: center;
}
.post-header .logo
{
    font-size: 2rem;
}
.post-header .go-home
{
    display: block;
    padding: 10px 20px 8px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid #eee;
    margin: 8px 0;
    transition: background ease-in-out .5s;
}
.post-header .go-home:hover
{
    background: var(--bg-color-1);
    transition: background ease-in-out .5s;
}
.post-header .go-home svg
{
    transform: translateX(0);
    transition: transform ease-in-out .5s;
}
.post-header .go-home:hover svg
{
    transform: translateX(-4px);
    transition: transform ease-in-out .5s;
}

/* /blog 文章列表顶部的「按年份归档」入口 */
.blog-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 28px;
}
.blog-archive-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
    color: var(--font-color-3);
    transition: color .2s ease;
}
.blog-archive-link:hover {
    color: var(--font-color-0);
}
.post-list
{
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: stretch;
}
.post
{
    display: block;
    width: 100%;
    padding-bottom: 48px;
    margin-bottom: 48px;
    border-bottom: 1px dashed var(--line-2);
    text-decoration: none;
    color: inherit;
}
.post:hover .post-title
{
    color: var(--font-color-0);
}
.post-title
{
    font-size: 1.6rem;
    font-weight: 600;
    line-height: 1.5;
    margin-bottom: 12px;
    color: var(--font-color-1);
    transition: color .2s ease;
}
.post-except
{
    word-break: break-all;
    margin-bottom: 12px;
    color: var(--font-color-2);
}
.post-date
{
    font-size: 0.875rem;
    color: var(--font-color-3);
}

/* 桌面端分页 */
.paginator-pc
{
    font-size: 0.875rem;
    width: 100%;
    margin: 0 auto 24px;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    gap: 4px;
}
.paginator-pc .page-number,
.paginator-pc .space,
.paginator-pc .extend
{
    display: block;
    padding: 6px 12px;
    border-radius: 4px;
    background: transparent;
    border: none;
    color: var(--font-color-3);
}
.paginator-pc .space
{
    padding: 6px 4px;
}
.paginator-pc a.page-number,
.paginator-pc a.extend
{
    color: var(--font-color-2);
    transition: color .2s ease, background .2s ease;
}
.paginator-pc a.page-number:hover,
.paginator-pc a.extend:hover
{
    color: var(--font-color-0);
    background: rgba(207, 75, 75, 0.05);
}
.paginator-pc .current
{
    color: #fff;
    background: var(--font-color-0);
    font-weight: 600;
}
.paginator-pc .prev
{
    margin-right: 4px;
}
.paginator-pc .next
{
    margin-left: 4px;
}

/* 移动端分页 */
.paginator-mobile
{
    display: none;
    width: 100%;
    margin: 0 auto 24px;
    align-items: center;
    justify-content: space-between;
}
.paginator-mobile-btn
{
    display: block;
    padding: 10px 20px;
    font-size: 0.875rem;
    color: var(--font-color-2);
    border: 1px solid var(--line-1);
    border-radius: 4px;
    text-decoration: none;
    transition: color .2s ease, border-color .2s ease;
}
.paginator-mobile-btn:hover
{
    color: var(--font-color-0);
    border-color: var(--font-color-0);
}
.paginator-mobile-btn.disabled
{
    color: var(--font-color-3);
    opacity: 0.4;
    pointer-events: none;
}
.paginator-mobile-info
{
    font-size: 0.875rem;
    color: var(--font-color-3);
}

@media screen and (max-width: 768px) {
    .paginator-pc { display: none; }
    .paginator-mobile { display: flex; }
}

.footer
{
    padding: 48px 0 24px;
    font-size: 13px;
    color: var(--font-color-3);
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.footer-dot
{
    color: var(--line-2);
}
.footer a
{
    color: var(--font-color-3);
    transition: color .2s ease;
}
.footer a:hover
{
    color: var(--font-color-0);
}

.post-main
{
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 24px;
}
.post-main-title
{
    display: block;
    flex: 0 0 100%;
    margin-bottom: 12px;
    font-size: 1.6rem;
    font-weight: 600;
    line-height: 1.5;
    color: var(--font-color-1);
    text-decoration: none;
}
.post-main-title a
{
    color: inherit;
    text-decoration: none;
}
.post-main-title:hover,
.post-main-title a:hover
{
    color: var(--font-color-0);
}
.post-meta
{
    font-size: 0.875rem;
    color: var(--font-color-3);
    flex: 0 0 100%;
    margin-bottom: 28px;
}
.post-meta a {
    transition: color .2s ease;
}
.post-meta a:hover {
    color: var(--font-color-0);
}
.post-category {
    display: inline-block;
    padding: 2px 10px;
    margin-left: 4px;
    font-size: 0.8125rem;
    color: var(--font-color-3);
    background: var(--bg-color-1);
    border-radius: 100px;
    transition: color 0.15s, background 0.15s;
}
.post-category:hover {
    color: var(--font-color-0);
    background: #f0e0e0;
}

/* Post tags (pill style) */
.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 32px 0 16px;
}
.post-tag {
    display: inline-block;
    padding: 4px 12px;
    font-size: 0.8125rem;
    color: var(--font-color-3);
    background: var(--bg-color-1);
    border-radius: 100px;
    transition: color 0.15s, background 0.15s;
}
.post-tag:hover {
    color: var(--font-color-0);
    background: #f0e0e0;
}

/* 分类/归档页头部 */
.archive-header {
    margin-bottom: 48px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--line-1);
}
.archive-header-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--font-color-0);
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}
.archive-header-title {
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--font-color-1);
    margin: 0 0 8px;
    line-height: 1.4;
}
.archive-header-count {
    font-size: 0.875rem;
    color: var(--font-color-3);
    margin: 0;
}

/* 文章分类 */
.tags {
    margin-bottom: 32px;
}

.tags a {
    display: inline-block;
    box-sizing: border-box;
    padding: 0 1em;
    height: 28px;
    line-height: 28px;
    border-radius: 28px;
    background-color:#000;
    color: #fff;
    text-decoration: none
}

.tags a+a {
    margin-left: .2em
}

.tags .new {
    --color: #3778FF;
    color: #fff
}

.tags .update {
    --color: #E016C4;
    color: #fff
}

.tags .fix,.tags .bugfix {
    --color: #FF4772;
    color: #fff
}

/* 汉堡菜单 */
.hamburger {
    display: none;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: var(--font-color-1);
}

.hamburger-line {
    transition: transform .3s ease, opacity .3s ease;
    transform-origin: center;
}

.hamburger.active .hamburger-line-1 {
    transform: translateY(6px) rotate(45deg);
}
.hamburger.active .hamburger-line-2 {
    opacity: 0;
}
.hamburger.active .hamburger-line-3 {
    transform: translateY(-6px) rotate(-45deg);
}

/* 当前页面菜单高亮 */
.nav li a.nav-active {
    color: var(--font-color-1);
    opacity: 1;
}
.nav li a.nav-active::after {
    background: var(--font-color-1);
}

@media (max-width: 768px) {
    .header {
        flex-wrap: wrap;
        padding: 12px 20px;
    }

    /* 文章内容与移动端导航共用同一条 20px 水平基线，扩大正文可读宽度。 */
    body[data-page-section="post"] .paper-main {
        padding-inline: 20px;
    }

    .logo {
        flex: 1;
    }

    .lang-switch {
        margin-left: 0;
        margin-right: 12px;
        order: 2;
    }

    .hamburger {
        display: flex;
        order: 3;
        width: 36px;
        height: 36px;
        border-radius: 50%;
        background: var(--bg-color-1);
    }

    .header nav {
        order: 4;
        flex: 0 0 100%;
    }

    /* 浮动卡片菜单 */
    .nav {
        margin: 0;
        margin-left: 0;
        flex-direction: column;
        background: var(--bg-color-1);
        border-radius: 16px;
        padding: 0 8px;
        height: 0;
        overflow: hidden;
        opacity: 0;
        transform: translateY(-6px);
        transition: height .3s cubic-bezier(0.4, 0, 0.2, 1),
                    opacity .2s ease,
                    transform .2s ease;
    }

    .nav.active {
        margin: 8px 0 4px;
        padding: 8px;
        opacity: 1;
        transform: translateY(0);
    }

    .nav li {
        margin-right: 0;
        padding: 0;
    }

    .nav li {
        text-align: center;
    }

    .nav li a {
        display: inline-block;
        padding: 10px 16px;
        font-size: 17px;
        font-weight: 600;
        border-radius: 10px;
        border-bottom: none;
        color: var(--font-color-1);
        opacity: 1;
    }

    .nav li a::after {
        left: 16px;
        right: 16px;
    }

    .nav li a:hover,
    .nav li a.nav-active {
        background: var(--bg-color-2);
        opacity: 1;
    }
}

/* TOC 目录 */
.toc-container {
    display: none;
    background: #f8f8f8;
    border-radius: 8px;
    padding: 16px 20px;
}

.toc-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--font-color-1);
    user-select: none;
}

.toc-content {
    overflow: hidden;
    max-height: 600px;
    opacity: 1;
    margin-top: 16px;
}

.toc-container ol {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-container li {
    margin: 0;
    padding: 0;
}

/* 隐藏 Hexo 自动生成的序号，避免与标题自带序号重复 */
.toc-container .toc-number {
    display: none;
}

.toc-container .toc-item {
    position: relative;
    padding: 8px 0 8px 16px;
    border-left: 2px solid var(--line-1);
    transition: all 0.2s ease;
}

.toc-container .toc-item:hover {
    border-left-color: var(--font-color-3);
}

.toc-container .toc-item-active {
    border-left-color: var(--font-color-0) !important;
    background: rgba(207, 75, 75, 0.05);
    border-radius: 0 4px 4px 0;
}

.toc-container a {
    display: block;
    min-width: 0;
    overflow: hidden;
    font-size: 14px;
    line-height: 1.6;
    color: var(--font-color-2) !important;
    transition: color 0.2s ease;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
    word-break: normal;
}

.toc-container .toc-item:hover a {
    color: var(--font-color-1) !important;
}

.toc-container .toc-item-active a {
    color: var(--font-color-0) !important;
    font-weight: 600;
}

/* TOC 子级缩进 */
.toc-container .toc-child {
    margin-left: 8px;
}

.toc-container .toc-child .toc-item {
    padding: 6px 0 6px 10px;
}

.toc-container .toc-child a {
    font-size: 13px;
}

/* 文章正文 + TOC 布局容器 */
.post-body-wrapper {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
}

/* 移动端：右侧贴边入口 + 目录抽屉 */
.toc-sidebar {
    order: -1;
    margin-bottom: 32px;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

.toc-edge-trigger,
.toc-backdrop,
.toc-close,
.toc-total {
    display: none;
}

@media screen and (max-width: 1023px) {
    .toc-open {
        overflow: hidden;
    }

    .toc-edge-trigger {
        position: fixed;
        top: 50%;
        right: 0;
        z-index: 115;
        display: inline-flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 5px;
        width: 36px;
        min-width: 36px;
        min-height: 76px;
        padding: 9px 7px 10px;
        border: 1px solid var(--line-1);
        border-right: 0;
        border-radius: 12px 0 0 12px;
        background: rgba(255, 255, 255, .94);
        color: var(--font-color-2);
        font: inherit;
        font-size: 12px;
        font-weight: 600;
        box-shadow: -3px 3px 12px rgba(37, 37, 37, .08);
        cursor: pointer;
        transform: translateY(-50%);
        transition: color .2s ease, background .2s ease, transform .2s ease;
    }

    .toc-edge-trigger svg {
        display: block;
        flex: 0 0 auto;
    }

    .toc-edge-trigger span {
        position: static;
        width: auto;
        height: auto;
        margin: 0;
        overflow: visible;
        clip: auto;
        white-space: nowrap;
        writing-mode: vertical-rl;
        text-orientation: upright;
        letter-spacing: .1em;
        line-height: 1;
    }

    .toc-edge-trigger:focus-visible {
        color: var(--font-color-1);
        background: #fff;
        transform: translateY(-50%);
    }

    @media (hover: hover) {
        .toc-edge-trigger:hover {
            color: var(--font-color-0);
            background: #fff;
            transform: translateY(-50%) translateX(-2px);
        }
    }

    .toc-edge-trigger:focus-visible,
    .toc-close:focus-visible {
        outline: 3px solid rgba(207, 75, 75, .2);
        outline-offset: 2px;
    }

    .toc-backdrop {
        position: fixed;
        inset: 0;
        z-index: 240;
        display: block;
        width: 100%;
        padding: 0;
        border: 0;
        background: rgba(20, 18, 18, .12);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity .28s ease, visibility .28s ease;
    }

    .toc-backdrop.open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .toc-sidebar {
        position: fixed;
        top: 50%;
        right: 0;
        z-index: 241;
        order: initial;
        width: min(340px, calc(100vw - 32px));
        height: auto;
        max-width: none;
        max-height: min(680px, calc(100dvh - 32px));
        margin: 0;
        padding: 16px max(20px, env(safe-area-inset-right)) 18px 20px;
        overflow: hidden;
        background: #fdfdfc;
        border-left: 1px solid var(--line-1);
        border-top: 1px solid var(--line-1);
        border-bottom: 1px solid var(--line-1);
        border-radius: 8px 0 0 8px;
        box-shadow: -8px 6px 28px rgba(37, 37, 37, .07);
        visibility: hidden;
        transform: translate3d(102%, -50%, 0);
        transition: transform .34s cubic-bezier(.22, 1, .36, 1), visibility .34s ease;
    }

    .toc-sidebar.open {
        visibility: visible;
        transform: translate3d(0, -50%, 0);
    }

    .toc-sidebar .toc-container {
        display: flex !important;
        flex-direction: column;
        min-height: 0;
        max-height: min(646px, calc(100dvh - 66px));
        padding: 0;
        background: transparent;
    }

    .toc-sidebar .toc-toggle {
        flex: 0 0 auto;
        min-height: 46px;
        margin-bottom: 12px;
        border-bottom: 1px solid var(--line-1);
        color: var(--font-color-1);
        font-size: 15px;
        letter-spacing: .02em;
        cursor: default;
    }

    .toc-toggle-title {
        display: flex;
        align-items: baseline;
        gap: 8px;
    }

    .toc-total {
        display: inline;
        color: var(--font-color-0);
        font-size: 11px;
        font-weight: 600;
        font-variant-numeric: tabular-nums;
        letter-spacing: .04em;
    }

    .toc-close {
        display: inline-grid;
        place-items: center;
        width: 32px;
        height: 32px;
        padding: 0;
        border: 0;
        border-radius: 50%;
        background: transparent;
        color: var(--font-color-2);
        cursor: pointer;
    }

    .toc-close:hover {
        color: var(--font-color-0);
        background: var(--bg-color-1);
    }

    .toc-sidebar .toc-content {
        flex: 0 1 auto;
        min-height: 0;
        max-height: none;
        margin-top: 0;
        overflow-y: auto;
        overscroll-behavior: contain;
        scrollbar-width: thin;
        scrollbar-color: var(--line-2) transparent;
        opacity: 1;
    }

    .toc-sidebar .toc-item {
        padding: 8px 0 8px 12px;
        border-left-color: transparent;
        min-width: 0;
        overflow: hidden;
    }

    .toc-sidebar .toc-container a {
        width: 100%;
        overflow: hidden;
        color: #4b4b4b !important;
        font-size: 13px;
        line-height: 1.55;
        text-overflow: ellipsis;
        white-space: nowrap;
        word-break: normal;
    }

    .toc-sidebar .toc-item-active {
        border-left-color: var(--font-color-0) !important;
        border-radius: 0;
        background: transparent;
    }

    .toc-sidebar .toc-item-active > a {
        color: var(--font-color-0) !important;
    }

    .toc-sidebar .toc-child {
        margin-left: 10px;
    }
}

.toc-container {
    padding: 14px 16px;
    box-sizing: border-box;
    word-break: break-word;
}

.toc-content {
    margin-top: 12px;
}

.toc-container .toc-item {
    padding: 6px 0 6px 12px;
}

.toc-container a {
    font-size: 13px;
}

/* PC 端（≥1024px）：TOC 与正文并排，sticky 吸顶 */
@media screen and (min-width: 1024px) {
    /* 文章页仅在真有 TOC 侧栏时才放宽容器，额外宽度给目录，不挤压正文；
       无 TOC（标题≤3，post.ejs 不渲染 toc-sidebar）时回落到默认 1200，正文 flex:1 占满 */
    .paper-main:has(.toc-sidebar) {
        max-width: 1240px;
    }

    .post-body-wrapper {
        flex-direction: row;
        align-items: flex-start;
        gap: 48px;
    }

    .post-body-wrapper .post-md {
        flex: 1;
        min-width: 0;
    }

    .toc-sidebar {
        order: 1;
        flex-shrink: 0;
        width: 240px;
        position: sticky;
        top: 80px;
        align-self: flex-start;
        max-height: calc(100vh - 100px);
        overflow-y: auto;
        overflow-x: hidden;
        margin: 0;
        /* Firefox */
        scrollbar-width: thin;
        scrollbar-color: transparent transparent;
    }

    .toc-sidebar:hover {
        scrollbar-color: rgba(0,0,0,0.15) transparent;
    }

    /* Webkit */
    .toc-sidebar::-webkit-scrollbar { width: 4px; }
    .toc-sidebar::-webkit-scrollbar-track { background: transparent; }
    .toc-sidebar::-webkit-scrollbar-thumb { background: transparent; border-radius: 4px; }
    .toc-sidebar:hover::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); }
    .toc-sidebar::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.3); }

    .toc-sidebar .toc-container {
        background: transparent;
        padding: 0;
        border-radius: 0;
    }

    /* PC 端：显示标题，隐藏折叠箭头 */
    .toc-sidebar .toc-toggle {
        cursor: default;
        font-size: 13px;
        font-weight: 600;
        letter-spacing: 0.1em;
        text-transform: uppercase;
        color: var(--font-color-3);
        border-left: 2px solid var(--font-color-0);
        padding-left: 10px;
        margin-bottom: 16px;
    }

    .toc-sidebar .toc-toggle-icon {
        display: none;
    }

    .toc-sidebar .toc-content {
        max-height: none !important;
        opacity: 1 !important;
        margin-top: 0;
    }

    .toc-sidebar .toc-content.collapsed {
        max-height: none !important;
        opacity: 1 !important;
    }
}

/* Projects */
.project-showcase-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin: 6px 0 32px;
}

.post-md .project-showcase {
    display: flex;
    min-width: 0;
    min-height: 166px;
    flex-direction: row;
    overflow: hidden;
    color: var(--font-color-2);
    border: 1px solid var(--line-1);
    border-radius: 12px;
    text-decoration: none;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.post-md .project-showcase:hover {
    color: var(--font-color-2);
    border-color: var(--line-2);
    text-decoration: none;
    transform: translateY(-2px);
}

.project-preview {
    display: block;
    flex: 0 0 42%;
    overflow: hidden;
    background: var(--bg-color-1);
    border-right: 1px solid var(--line-1);
}

.post-md .project-preview img {
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.project-showcase:hover .project-preview img {
    transform: scale(1.015);
}

.project-showcase-body {
    display: flex;
    min-width: 0;
    flex: 1;
    flex-direction: column;
    justify-content: center;
    padding: 16px 18px;
}

.project-showcase-heading {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.project-showcase-heading strong {
    min-width: 0;
    color: var(--font-color-1);
    font-size: 0.98rem;
    font-weight: 600;
    line-height: 1.35;
}

.project-showcase-heading .project-tag {
    flex: 0 0 auto;
    margin-left: auto;
}

.project-showcase .description {
    display: block;
    margin-top: 7px;
    color: var(--font-color-3);
    font-size: 0.84rem;
    line-height: 1.55;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 12px;
    margin-top: 4px;
    margin-bottom: 8px;
}

.post-md .project-block {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: var(--bg-color-1);
    padding: 16px 18px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--font-color-2);
    transition: background 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid transparent;
}

.project-block:hover {
    background: #fff;
    border-color: var(--line-2);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    text-decoration: none;
}

.project-icon {
    font-size: 1.5rem;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 2px;
}

.project-icon img {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: block;
}

.project-info {
    flex: 1;
    min-width: 0;
}

.project-block strong {
    color: var(--font-color-1);
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.3;
    display: inline;
}

.project-tag {
    display: inline-block;
    font-size: 0.7rem;
    color: var(--font-color-3);
    background: rgba(0,0,0,0.04);
    padding: 1px 6px;
    border-radius: 3px;
    margin-left: 6px;
    vertical-align: middle;
    font-weight: 400;
}

.project-block .description {
    display: block;
    color: var(--font-color-3);
    font-size: 0.85rem;
    line-height: 1.5;
    margin-top: 4px;
}

.project-archived {
    opacity: 0.55;
}

.project-archived:hover {
    opacity: 0.75;
}

@media (max-width: 768px) {
    .project-showcase-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 20px;
        margin-bottom: 28px;
    }

    .post-md .project-showcase {
        min-height: 0;
        flex-direction: column;
    }

    .project-preview {
        flex: none;
        width: 100%;
        aspect-ratio: 10 / 7;
        border-right: 0;
        border-bottom: 1px solid var(--line-1);
    }

    .post-md .project-preview img {
        object-fit: contain;
    }

    .project-showcase-body {
        padding: 16px;
    }

    .project-showcase-heading {
        align-items: flex-start;
        flex-wrap: wrap;
        gap: 8px;
    }

    .project-showcase-heading strong {
        flex: 1 1 180px;
        font-size: 1rem;
        overflow-wrap: anywhere;
    }

    .project-showcase-heading .project-tag {
        margin-left: 0;
    }

    .project-showcase .description,
    .project-block .description {
        font-size: 0.9375rem;
        line-height: 1.65;
        overflow-wrap: anywhere;
    }

    .project-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .project-block strong {
        overflow-wrap: anywhere;
    }
}

.post-md .project-showcase:focus-visible,
.post-md .project-block:focus-visible {
    outline: 2px solid var(--font-color-1);
    outline-offset: 3px;
}

/* Phones use compact text cards; picture sources avoid screenshot downloads. */
@media (max-width: 600px) {
    .project-preview,
    .project-block .project-icon {
        display: none;
    }

    .project-showcase-grid {
        gap: 12px;
    }

    .post-md .project-showcase,
    .post-md .project-block {
        background: var(--bg-color-1);
        border: 1px solid var(--line-1);
        border-radius: 12px;
        box-shadow: none;
        opacity: 1;
    }

    .post-md .project-showcase:hover,
    .post-md .project-block:hover {
        background: var(--bg-color-1);
        border-color: var(--line-2);
        box-shadow: none;
    }

    .project-showcase-body,
    .post-md .project-block {
        padding: 18px;
    }

    .project-info {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: start;
        column-gap: 8px;
    }

    .project-block strong {
        font-size: 1rem;
        line-height: 1.35;
    }

    .project-info .project-tag {
        margin-left: 0;
    }

    .project-block .description {
        grid-column: 1 / -1;
        margin-top: 7px;
    }
}

.project-preview picture {
    display: block;
    width: 100%;
    height: 100%;
}

@media (hover: none) {
    .post-md .project-showcase:hover,
    .project-showcase:hover .project-preview img {
        transform: none;
    }

    .post-md .project-showcase:active,
    .post-md .project-block:active {
        border-color: var(--font-color-3);
    }
}

@media (prefers-reduced-motion: reduce) {
    .post-md .project-showcase,
    .post-md .project-preview img {
        transition: none;
    }
}

.stack-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 8px;
}

.stack-item {
    background: var(--bg-color-1);
    padding: 12px;
    border-radius: 10px;
    text-align: left;
    color: var(--font-color-2);
    text-decoration: none;
    transition: background 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid transparent;
}

.stack-item:hover {
    background: #fff;
    border-color: var(--line-2);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

[data-page-section="stack"] .post-md .project-icon img,
.post-md .stack-item img {
    border: 0;
    padding: 0;
}

[data-page-section="stack"] .project-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    overflow: hidden;
}

[data-page-section="stack"] .post-md .project-icon img {
    width: 100%;
    height: 100%;
    border-radius: 0;
    margin: 0;
    object-fit: contain;
    transform: scale(var(--gear-icon-scale, 1.1));
}

/* Opaque source images need an inset to match the 42px artwork of app icons. */
[data-page-section="stack"] .project-icon:has(img:is(
    [src$="/Claude.png"], [src$="/Gemini.png"], [src$="/CodeX.png"],
    [src$="/Antigravity.png"], [src$="/GitHub.png"], [src$="/Figma.png"]
)) {
    clip-path: inset(3px round 9px);
}

/* Match the visible artwork across icons with different source padding. */
[data-page-section="stack"] .project-icon img:is(
    [src$="/HandBrake.png"], [src$="/TidyLink.png"]
) {
    --gear-icon-scale: 0.9;
}

[data-page-section="stack"] .project-icon img:is(
    [src$="/AltTab.png"], [src$="/GitHub.png"], [src$="/raycast.png"]
) {
    --gear-icon-scale: 0.95;
}

[data-page-section="stack"] .project-icon img:is(
    [src$="/Cloudflare.png"], [src$="/LuLu.png"], [src$="/Pictogram.png"],
    [src$="/PopClip.png"], [src$="/Soulver.png"], [src$="/Things3.png"],
    [src$="/calendars.png"], [src$="/ppduck.png"], [src$="/sourcetree.png"]
) {
    --gear-icon-scale: 1;
}

[data-page-section="stack"] .project-icon img:is(
    [src$="/CleanShotX.png"], [src$="/Muxy.png"], [src$="/OpenInTerminal.png"],
    [src$="/Spotify.png"], [src$="/sketch.png"], [src$="/zerion.png"],
    [src$="/Figma.png"], [src$="/Gemini.png"]
) {
    --gear-icon-scale: 1.05;
}

[data-page-section="stack"] .project-icon img:is(
    [src$="/Downie.png"], [src$="/Timing.png"], [src$="/snippetslab.png"],
    [src$="/dropbox.png"]
) {
    --gear-icon-scale: 1.15;
}

[data-page-section="stack"] .project-icon img:is(
    [src$="/FinalCutPro.png"], [src$="/Claude.png"]
) {
    --gear-icon-scale: 1.2;
}

[data-page-section="stack"] .project-icon img:is(
    [src$="/pushover.png"], [src$="/zeabur.png"]
) {
    --gear-icon-scale: 1.25;
}

[data-page-section="stack"] .project-icon img:is(
    [src$="/OverSight.png"], [src$="/Antigravity.png"]
) {
    --gear-icon-scale: 1.3;
}

.post-md .stack-item img {
    width: 100%;
    height: auto;
    border-radius: 6px;
    margin-bottom: 8px;
}

.stack-item strong {
    display: block;
    color: var(--font-color-1);
    font-weight: 600;
    font-size: 0.85rem;
    line-height: 1.3;
}

.stack-price {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--font-color-0);
    margin: 4px 0;
}

.stack-item .description {
    display: block;
    color: var(--font-color-3);
    font-size: 0.8rem;
    line-height: 1.4;
    margin-top: 2px;
}

@media (max-width: 768px) {
    .stack-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .stack-grid {
        grid-template-columns: 1fr;
    }
}

  
/* Archive */
.category-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.category-item {
    margin-bottom: 6px;
}

.category-link {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 20px;
    background-color: var(--bg-color-1);
    color: var(--font-color-2);
    text-decoration: none;
    font-size: 13px;
    transition: background-color 0.2s, color 0.2s;
}

.category-link:hover {
    background-color: var(--font-color-0);
    color: white;
}

.category-link.active {
    background-color: var(--font-color-0);
    color: white;
}

.custom-archive-year {
    opacity: 0.2;
    margin-left: 20px;
}

.custom-archive-item {
    margin-left: 20px;
    margin-bottom: 10px;
}

.custom-archive-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 5px;
}

.custom-archive-title a {
    font-weight: 600;
}


.custom-archive-date {
    display: block;
    color: var(--font-color-3);
    font-size: 13px;
}

.custom-archive-hr {
    border: none;
    height: 1px;
    background: var(--line-1);
    margin: 10px 0;
}

/* Links */
.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 10px;
    margin-top: 4px;
    margin-bottom: 8px;
}

.post-md .link-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-color-1);
    padding: 12px 14px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--font-color-2);
    transition: background 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid transparent;
}

.link-card:hover {
    background: #fff;
    border-color: var(--line-2);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    text-decoration: none;
}

.link-avatar {
    display: block;
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    box-sizing: border-box;
    object-fit: cover;
    border: 1px solid var(--line-2);
    border-radius: 50%;
    background: var(--bg-color-0);
    padding: 3px;
}

.link-info {
    flex: 1;
    min-width: 0;
}

.link-info strong {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--font-color-1);
    line-height: 1.3;
}

.link-info span {
    display: block;
    font-size: 0.8rem;
    color: var(--font-color-3);
    line-height: 1.4;
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .links-grid {
        grid-template-columns: 1fr;
    }

    .link-avatar {
        flex-basis: 36px;
        width: 36px;
        height: 36px;
    }
}

/* stack App list */

  .product-list {
    margin-top: 20px;
  }
  
  .post-md .product-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    text-decoration: none;
    color: #333 !important;
    background-color: #f5f5f5;
    border-radius: 8px;
    transition: background-color 0.3s ease;
  }
  
  .product-item:hover {
    background-color: #e0e0e0; /* 悬停时的背景颜色 */
  }
  
  .post-md .product-icon {
    width: 70px;
    height: 70px;
    margin-right: 20px;
    border-radius: 8px;
    border: none !important;
    padding: 0 !important;
    box-sizing: content-box !important;
  }
  
  .product-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  
  .product-title {
    display: block;
    font-size: 1.2em;
    margin-bottom: 4px;
    color: #000 !important; /* 强制标题颜色为黑色 */
    margin: 0px !important; /* 强制覆盖全局 margin 设置 */
  }
  
  .product-details .description {
    font-size: 1em;
    color: #555 !important; /* 强制描述文字颜色为灰色 */
    margin: 0px !important; /* 强制覆盖全局 margin 设置 */
  }
  
  .tags {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    justify-content: flex-end; /* 右对齐 */
  }
  
  .tag {
    background-color: #444; /* 标签背景色 */
    color: #fff; /* 标签文字颜色 */
    padding: 2px 6px; /* 缩小标签大小 */
    border-radius: 4px;
    font-size: 0.8em; /* 减小字体大小 */
    margin-left: 8px; /* 标签间距 */
  }
  
  .separator {
    height: 1px;
    background-color: #f5f5f5; /* 灰色分隔符 */
    margin: 15px 0;
  }
  
  /* 适配移动端 */
  @media (max-width: 768px) {
    .tags {
      display: none; /* 在移动端隐藏标签 */
    }
  }

/* About 职业经历列表样式 */
.post-md .career-list {
    list-style: none;
    padding-left: 0;
}

.post-md .career-list li {
    margin-bottom: 2em;
    margin-top: 0;
    display: flex;
    align-items: flex-start;
    flex-direction: row;
    line-height: 1.6;
}

.post-md .career-list li::marker {
    color: transparent;
}

.post-md .career-list .year-range {
    font-size: 14px;
    color: #888888;
    width: 125px;
    flex-shrink: 0;
    text-align: right;
    margin-right: 1.5em;
    line-height: 1.5;
    padding-top: 0.15em;
    white-space: nowrap;
}

.post-md .career-list strong {
    color: #111111;
    font-size: 18px;
}

.post-md .career-list div {
    font-size: 16px;
    color: #555555;
    line-height: 1.6;
    min-width: 0;
}

.post-md .career-list div strong {
    display: block;
    margin-bottom: 0.8em;
}

/* 子项列表 */
.post-md .career-list .career-detail {
    list-style: none;
    padding-left: 0;
    margin: 1.2em 0 0 0;
}

.post-md .career-list .career-detail li {
    display: block;
    margin-bottom: 1em;
    padding-left: 1.1em;
    position: relative;
    line-height: 1.8;
}

.post-md .career-list .career-detail li:last-child {
    margin-bottom: 0;
}

.post-md .career-list .career-detail li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #ccc;
}

/* 产品子列表（二级缩进） */
.post-md .career-list .career-sublist {
    list-style: none;
    padding-left: 0;
    margin: 0.4em 0 0 0;
}

.post-md .career-list .career-sublist li {
    display: block;
    margin-bottom: 0.35em;
    padding-left: 1.1em;
    position: relative;
    font-size: 14px;
    color: #777;
}

.post-md .career-list .career-sublist li:last-child {
    margin-bottom: 0;
}

.post-md .career-list .career-sublist li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #ddd;
}

.post-md .career-list a {
    color: var(--font-color-0);
    text-decoration: none;
}

.post-md .career-list a:hover {
    color: #A63C3C;
}

/* 移动端适配 */
@media screen and (max-width: 768px) {
    .post-md .career-list li {
        flex-direction: column;
        align-items: flex-start;
    }

    .post-md .career-list .year-range {
        width: auto;
        margin-right: 0;
        margin-bottom: 0.5em;
        text-align: left;
    }

    .post-md .career-list div {
        font-size: 16px;
    }
}


/* 社交媒体图标样式 */

.social-icons {
  display: flex;
  gap: 15px;
}

.social-icons a img,
.social-icons .email-icon img,
.social-icons .wechat-icon > img {
  width: 30px;
  height: 30px;
  transition: transform 0.3s ease;
  cursor: pointer;
}

.social-icons a:hover img,
.social-icons .email-icon img:hover,
.social-icons .wechat-icon > img:hover {
  transform: scale(1.2);
}



/* 归档页面 */
.custom-archive-list {
  margin-top: 20px;
}

.custom-archive-year {
  font-size: 32px;
  font-weight: bold;
  margin-bottom: 10px;
  margin-top: 40px; /* 每个年份的间距 */
  opacity: 0.2; /* 设置年份的透明度 */
}

.custom-archive {
  list-style-type: none;
  padding: 0;
  margin: 0;
}

.custom-archive-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px; /* 每篇文章的间距 */
}

/* 让内容撑满整行，横线（custom-archive-hr）随之拉到页面最大宽度，而不是收缩到标题宽度 */
.custom-archive-content {
  flex: 1;
  min-width: 0;
}

.custom-archive-title a {
  font-size: 18px;
  color: #000;
  text-decoration: none;
  font-weight: bold; /* 设置标题加粗 */
}

.custom-archive-title a:hover {
  text-decoration: underline; /* 鼠标悬停效果 */
}

.custom-archive-date {
  color: #b0b0b0; /* 日期的颜色 */
  font-size: 14px;
  flex-shrink: 0;
}

/* 文章底部 Follow 区域 */
.post-follow {
    flex: 0 0 100%;
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--line-1);
}

.post-follow-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 药丸按钮（带文字）: Follow me on X, RSS */
.follow-pill {
    display: inline-flex;
    align-items: center;
    height: 40px;
    padding: 0 14px;
    border-radius: 9999px;
    background: rgba(0, 0, 0, 0.02);
    transition: background .2s ease;
    cursor: pointer;
    text-decoration: none;
    color: var(--font-color-1);
    position: relative;
}
.follow-pill:hover {
    background: rgba(0, 0, 0, 0.08);
    color: var(--font-color-1);
}
.follow-pill svg {
    flex-shrink: 0;
}
.follow-pill span {
    margin-left: 8px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

/* 圆形图标按钮: Telegram, GitHub */
.follow-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 9999px;
    background: rgba(0, 0, 0, 0.02);
    transition: background .2s ease;
    color: var(--font-color-1);
}
.follow-icon:hover {
    background: rgba(0, 0, 0, 0.08);
    color: var(--font-color-1);
}
.follow-wechat {
    cursor: pointer;
    position: relative;
}

/* Shared WeChat overlay component */
[data-wechat-popup] {
    cursor: pointer;
}
.wechat-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(0, 0, 0, 0.3);
    justify-content: center;
    align-items: center;
}
.wechat-overlay.show {
    display: flex;
}
.wechat-card {
    position: relative;
    background: #fff;
    border-radius: 10px;
    padding: 28px 24px;
    width: 280px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    animation: wechatCardIn .2s ease-out;
}
.wechat-card-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    cursor: pointer;
    color: rgba(0, 0, 0, 0.3);
    padding: 4px;
    line-height: 0;
    transition: color 0.15s;
}
.wechat-card-close:hover {
    color: rgba(0, 0, 0, 0.6);
}
@keyframes wechatCardIn {
    from { opacity: 0; transform: scale(0.95); }
    to   { opacity: 1; transform: scale(1); }
}
.wechat-popup-title {
    font-size: 16px;
    font-weight: 600;
    color: rgba(0, 0, 0, 0.9);
    margin-bottom: 4px;
}
.wechat-popup-desc {
    font-size: 13px;
    color: rgba(0, 0, 0, 0.45);
    margin-bottom: 16px;
    line-height: 1.4;
}
.wechat-popup-qr {
    display: block;
    margin: 0 auto;
    width: 200px;
    height: 200px;
    border: none !important;
    padding: 0 !important;
    border-radius: 0 !important;
}
.wechat-popup-copy {
    display: block;
    width: 100%;
    margin-top: 12px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 500;
    font-family: inherit;
    background: #000;
    color: #fff;
    border: none;
    cursor: pointer;
    transition: background .2s ease;
}
.wechat-popup-copy:hover {
    background: rgba(0, 0, 0, 0.8);
}

/* 相关文章 */
.related-posts {
    flex: 0 0 100%;
    min-width: 0;
    overflow: hidden;
    margin-top: 64px;
    margin-bottom: 48px;
}
.related-posts-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--font-color-1);
    margin-bottom: 24px;
}
.related-posts-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.related-posts-list li {
    margin: 0;
}
.related-posts-list li + li {
    margin-top: 16px;
}
.related-posts-item {
    display: block;
    text-decoration: none;
    min-width: 0;
    overflow: hidden;
}
.related-posts-item-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--font-color-1);
    margin: 0 0 4px;
    transition: color .2s ease;
    text-align: left;
}
.related-posts-item:hover .related-posts-item-title {
    color: var(--font-color-0);
}
.related-posts-item-desc {
    font-size: 13px;
    color: #666;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.6;
}
.related-posts-item time {
    display: block;
    font-size: 12px;
    color: rgba(0, 0, 0, 0.4);
    margin-top: 8px;
}

/* 评论图标入口与响应式抽屉 */
.comment-section {
    margin: 0;
}
.comment-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-width: 40px;
    height: 40px;
    padding: 0 13px;
    border: 0;
    border-radius: 9999px;
    background: rgba(0, 0, 0, 0.02);
    color: var(--font-color-1);
    font: inherit;
    cursor: pointer;
    transition: color .2s ease, background .2s ease, transform .2s ease;
}
.comment-trigger:hover {
    background: rgba(0, 0, 0, 0.08);
    color: var(--font-color-0);
}
.comment-trigger:active {
    transform: scale(.94);
}
.comment-trigger:focus-visible,
.comment-close:focus-visible {
    outline: 3px solid rgba(207, 75, 75, 0.22);
    outline-offset: 3px;
}
.comment-trigger-count {
    min-width: 1ch;
    color: var(--font-color-0);
    font-size: 13px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}
.comment-trigger-text {
    color: var(--font-color-2);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}
.comment-trigger-mobile-text {
    display: none;
}
.comments-open {
    overflow: hidden;
}
.comment-overlay {
    position: fixed;
    inset: 0;
    z-index: 300;
    visibility: hidden;
    pointer-events: none;
}
.comment-overlay.open {
    visibility: visible;
    pointer-events: auto;
}
.comment-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    border: 0;
    padding: 0;
    background: rgba(20, 18, 18, 0.32);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    opacity: 0;
    cursor: default;
    transition: opacity .28s ease;
}
.comment-overlay.open .comment-backdrop {
    opacity: 1;
}
.comment-dialog {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    width: min(560px, 94vw);
    height: 100dvh;
    background: #fff;
    box-shadow: -24px 0 64px rgba(32, 26, 26, 0.15);
    transform: translate3d(102%, 0, 0);
    transition: transform .34s cubic-bezier(.22, 1, .36, 1);
    outline: none;
}
.comment-overlay.open .comment-dialog {
    transform: translate3d(0, 0, 0);
}
.comment-dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 0 0 auto;
    min-height: 88px;
    padding: max(18px, env(safe-area-inset-top)) 28px 18px;
    border-bottom: 1px solid var(--line-1);
    background: rgba(255, 255, 255, .92);
}
.comment-dialog-eyebrow {
    display: block;
    margin-bottom: 2px;
    color: var(--font-color-0);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .12em;
}
.comment-dialog-header h2 {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0;
    color: var(--font-color-1);
    font-size: 22px;
    line-height: 1.3;
    letter-spacing: -.02em;
}
#comment-dialog-count:not(:empty) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 24px;
    padding: 0 7px;
    border-radius: 9999px;
    background: rgba(207, 75, 75, .09);
    color: var(--font-color-0);
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}
.comment-close {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: var(--bg-color-1);
    color: var(--font-color-2);
    cursor: pointer;
    transition: color .2s ease, background .2s ease, transform .2s ease;
}
.comment-close:hover {
    background: #eceeef;
    color: var(--font-color-0);
}
.comment-close:active {
    transform: scale(.94);
}
.comment-dialog-content {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 24px 28px 28px;
    scrollbar-gutter: stable;
}
.comment-composer-footer {
    flex: 0 0 auto;
    padding: 10px 20px max(10px, env(safe-area-inset-bottom));
    border-top: 1px solid var(--line-1);
    background: #fff;
    box-shadow: 0 -8px 24px rgba(37, 37, 37, .035);
}
.comment-composer-footer[hidden] {
    display: none;
}
.comment-composer-open {
    display: grid;
    grid-template-columns: 19px 1fr auto;
    align-items: center;
    gap: 9px;
    width: 100%;
    min-height: 50px;
    padding: 6px 6px 6px 13px;
    border: 1.5px solid rgba(207, 75, 75, .72);
    border-radius: 11px;
    background: #fff;
    color: var(--font-color-3);
    font: inherit;
    text-align: left;
    cursor: pointer;
    box-shadow: 0 3px 12px rgba(207, 75, 75, .12);
    transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}
.comment-composer-open:hover:not(:disabled) {
    border-color: var(--font-color-0);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(207, 75, 75, .09), 0 5px 16px rgba(37, 37, 37, .075);
}
.comment-composer-open:focus-visible {
    outline: 3px solid rgba(207, 75, 75, .16);
    outline-offset: 2px;
}
.comment-composer-open:disabled {
    cursor: wait;
    opacity: .55;
}
.comment-composer-open svg {
    color: var(--font-color-0);
}
.comment-composer-open span {
    color: #444;
    font-size: 13px;
    font-weight: 500;
}
.comment-composer-open strong {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 54px;
    height: 34px;
    padding: 0 12px;
    border-radius: 8px;
    background: var(--font-color-0);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    transition: background .2s ease, transform .2s ease;
}
.comment-composer-open:hover:not(:disabled) strong {
    background: #b83e3e;
}
.comment-composer-open:active strong {
    transform: scale(.96);
}
.comment-loading {
    display: none;
    align-items: center;
    gap: 8px;
    justify-content: center;
    min-height: 180px;
    color: var(--font-color-3);
    font-size: 14px;
}
.comment-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid var(--line-1);
    border-top-color: var(--font-color-3);
    border-radius: 50%;
    animation: comment-spin .6s linear infinite;
}
@keyframes comment-spin {
    to { transform: rotate(360deg); }
}
.comment-body {
    display: none;
}
.comment-body.open {
    display: block;
}

@media (max-width: 640px) {
    .post-follow-links {
        gap: 5px;
    }
    body[data-page-section="post"] .comment-trigger {
        position: fixed;
        right: max(16px, env(safe-area-inset-right));
        bottom: max(16px, env(safe-area-inset-bottom));
        z-index: 120;
        height: 46px;
        gap: 6px;
        padding: 0 16px;
        border: 1px solid rgba(255, 255, 255, .18);
        background: var(--font-color-1);
        color: #fff;
        box-shadow: 0 8px 24px rgba(37, 37, 37, .2);
    }
    body[data-page-section="post"] .comment-trigger:hover {
        background: var(--font-color-0);
        color: #fff;
    }
    body[data-page-section="post"] .comment-trigger-text,
    body[data-page-section="post"] .comment-trigger-mobile-text,
    body[data-page-section="post"] .comment-trigger-count {
        color: inherit;
    }
    body[data-page-section="post"] .comment-trigger-text {
        display: none;
    }
    body[data-page-section="post"] .comment-trigger-mobile-text {
        display: inline;
        font-size: 13px;
        font-weight: 600;
        white-space: nowrap;
    }
    .comment-trigger-count {
        font-size: 12px;
    }
    .comment-dialog {
        top: auto;
        bottom: 0;
        width: 100%;
        height: min(92dvh, 860px);
        border-radius: 18px 18px 0 0;
        box-shadow: 0 -18px 52px rgba(32, 26, 26, 0.18);
        transform: translate3d(0, 102%, 0);
    }
    .comment-dialog::before {
        content: '';
        position: absolute;
        top: 8px;
        left: 50%;
        width: 36px;
        height: 4px;
        border-radius: 2px;
        background: var(--line-2);
        transform: translateX(-50%);
    }
    .comment-dialog-header {
        min-height: 78px;
        padding: 22px 18px 14px;
    }
    .comment-dialog-header h2 {
        font-size: 20px;
    }
    .comment-dialog-content {
        padding: 18px 18px 22px;
        scrollbar-gutter: auto;
    }
    .comment-composer-footer {
        padding: 8px 10px max(8px, env(safe-area-inset-bottom));
    }
}

@media (prefers-reduced-motion: reduce) {
    .comment-dialog,
    .comment-backdrop,
    .comment-trigger,
    .toc-sidebar,
    .toc-backdrop,
    .toc-edge-trigger {
        transition-duration: .01ms;
    }
}

/* RSS 弹出框 */
.rss-popup {
    display: none;
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) scale(0.9);
    opacity: 0;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: 4px;
    padding: 16px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.04);
    z-index: 50;
    width: 280px;
}
.rss-popup.show {
    display: block;
    opacity: 1;
    transform: translateX(-50%) scale(1);
    animation: rssPopupIn .15s ease-out;
}
@keyframes rssPopupIn {
    from { opacity: 0; transform: translateX(-50%) scale(0.9) translateY(10px); }
    to { opacity: 1; transform: translateX(-50%) scale(1) translateY(0); }
}
.rss-popup-title {
    font-size: 15px;
    font-weight: 500;
    color: rgba(0, 0, 0, 0.9);
    margin-bottom: 8px;
}
.rss-popup-desc {
    font-size: 13px;
    color: rgba(0, 0, 0, 0.8);
    line-height: 1.6;
    margin-bottom: 12px;
}
.rss-popup-copy {
    display: block;
    width: 100%;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 500;
    font-family: inherit;
    background: #000;
    color: #fff;
    border: none;
    cursor: pointer;
    transition: background .2s ease;
}
.rss-popup-copy:hover {
    background: rgba(0, 0, 0, 0.8);
}

/* Follow & 相关文章移动端适配 */
@media screen and (max-width: 768px) {
    .post-follow {
        margin-top: 32px;
        padding-top: 24px;
    }
    .post-follow-links {
        flex-wrap: wrap;
        gap: 5px;
    }
    .follow-pill {
        width: 34px;
        height: 34px;
        padding: 0;
        justify-content: center;
    }
    .follow-pill span {
        display: none;
    }
    .follow-icon {
        width: 34px;
        height: 34px;
    }
    .related-posts {
        margin-top: 40px;
        margin-bottom: 32px;
    }
    .related-posts-title {
        font-size: 18px;
        margin-bottom: 16px;
    }
    .related-posts-item-title {
        font-size: 13px;
    }
    .related-posts-item-desc {
        font-size: 12px;
    }
    .related-posts-item time {
        font-size: 11px;
        margin-top: 6px;
    }
    .related-posts-list li + li {
        margin-top: 12px;
    }
}

/* ===========================
   Landing Page
   =========================== */

.paper-main--landing {
    max-width: none;
    padding: 0;
}

.paper-main--landing .footer {
    max-width: none;
    margin: 0;
    padding: 32px 40px;
    background: #252830;
    color: rgba(255,255,255,0.4);
}
.paper-main--landing .footer a {
    color: rgba(255,255,255,0.5);
}
.paper-main--landing .footer a:hover {
    color: #fff;
}

.landing-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

/* Reveal animation — hero(首屏)默认立即可见，保证 LCP 选中大标题、首屏秒显；
   仅下方 section 滚动淡入 */
.landing-section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.landing-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Section heading */
.landing-heading {
    font-family: var(--font-landing);
    font-size: 1rem;
    font-weight: 600;
    color: var(--font-color-1);
    margin: 0 0 12px;
}
.landing-subheading {
    font-size: 0.875rem;
    font-weight: 300;
    color: rgba(0,0,0,0.8);
    margin: 0 0 48px;
    line-height: 1.7;
    letter-spacing: 0.02em;
    max-width: 640px;
}

/* 移动端专属几何（桌面隐藏） */
.landing-hero-mobile-geo {
    display: none;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: visible;
}

/* ---- Hero ---- */
.landing-hero {
    padding: 80px 0 72px;
    position: relative;
    overflow: hidden;
}
/* Hero abstract background */
.landing-hero-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}
.hero-el { position: absolute; }

/* Warm glow */
.hero-glow {
    width: 480px; height: 480px;
    right: 2%; top: 50%; transform: translateY(-50%);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(207,75,75,0.08) 0%, rgba(207,75,75,0.03) 45%, transparent 70%);
    animation: h-breathe 10s ease-in-out infinite alternate;
}
/* Broken arcs */
.hero-ring-lg {
    width: 320px; height: 320px;
    right: 8%; top: 50%; transform: translateY(-50%);
    border-radius: 50%;
    border: 1.2px solid rgba(207,75,75,0.1);
    border-color: rgba(207,75,75,0.1) rgba(207,75,75,0.1) transparent transparent;
    animation: h-rotate 35s linear infinite;
}
.hero-ring-md {
    width: 180px; height: 180px;
    right: 14%; top: 50%; transform: translateY(-50%);
    border-radius: 50%;
    border: 1px solid rgba(207,75,75,0.09);
    border-color: transparent transparent rgba(207,75,75,0.09) rgba(207,75,75,0.09);
    animation: h-rotate 25s linear infinite reverse;
}

/* ══ Geometry particles ══ */
.hg { animation: h-float-a 8s ease-in-out infinite alternate; }
.hg:nth-child(odd) { animation-name: h-float-b; }
.hg:nth-child(3n) { animation-duration: 10s; }
.hg:nth-child(4n) { animation-duration: 6s; animation-direction: alternate-reverse; }
.hg:nth-child(5n) { animation-duration: 12s; }

/* Dots */
.hg-dot {
    border-radius: 50%;
    background: rgba(207,75,75,0.14);
}
/* Crosses */
.hg-cross {
    width: 16px; height: 16px;
}
.hg-cross::before, .hg-cross::after {
    content: ''; position: absolute;
    background: rgba(207,75,75,0.12);
}
.hg-cross::before { width: 16px; height: 1.5px; top: 50%; transform: translateY(-50%); }
.hg-cross::after  { height: 16px; width: 1.5px; left: 50%; transform: translateX(-50%); }
/* Diamonds */
.hg-diamond {
    width: 12px; height: 12px;
    border: 1.5px solid rgba(207,75,75,0.12);
    transform: rotate(45deg);
}
/* Lines */
.hg-line {
    width: 32px; height: 1.5px;
    background: rgba(207,75,75,0.1);
}
/* Triangles */
.hg-tri {
    width: 0; height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 14px solid rgba(207,75,75,0.08);
}
/* Small rings */
.hg-ring {
    border-radius: 50%;
    border: 1px solid rgba(207,75,75,0.1);
}
/* Filled circles */
.hg-circle {
    border-radius: 50%;
    background: rgba(235,180,160,0.1);
}

/* ══ Animations ══ */
@keyframes h-breathe {
    from { transform: translateY(-50%) scale(1); }
    to   { transform: translateY(-50%) scale(1.06); }
}
@keyframes h-rotate {
    from { transform: translateY(-50%) rotate(0deg); }
    to   { transform: translateY(-50%) rotate(360deg); }
}
@keyframes h-float-a {
    from { transform: translate(0, 0); }
    to   { transform: translate(10px, -8px); }
}
@keyframes h-float-b {
    from { transform: translate(0, 0); }
    to   { transform: translate(-8px, 10px); }
}
.landing-hero .landing-inner {
    position: relative;
    z-index: 1;
}
.landing-hero-name-wrap {
    position: relative;
}
/* Geometric particles behind the name */
.hero-name-geo {
    position: absolute;
    inset: -20px -10%;
    pointer-events: none;
    z-index: 0;
}
.hng { position: absolute; display: block; }
.hng-dot {
    width: 4px; height: 4px; border-radius: 50%;
    background: rgba(207,75,75,0.25);
}
.hng-cross { width: 12px; height: 12px; }
.hng-cross::before, .hng-cross::after {
    content: ''; position: absolute;
    background: rgba(207,75,75,0.22);
}
.hng-cross::before { width: 12px; height: 1px; top: 50%; transform: translateY(-50%); }
.hng-cross::after  { height: 12px; width: 1px; left: 50%; transform: translateX(-50%); }
.hng-diamond {
    width: 8px; height: 8px;
    border: 1px solid rgba(207,75,75,0.24);
    transform: rotate(45deg);
}
.hng-line {
    width: 20px; height: 1px;
    background: rgba(207,75,75,0.2);
}
.hng-tri {
    width: 0; height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 8px solid rgba(207,75,75,0.18);
}
.landing-hero-name {
    position: relative;
    font-family: var(--font-landing);
    font-size: clamp(2.5rem, 6vw, 3.5rem);
    font-weight: 700;
    line-height: 1.15;
    color: var(--font-color-1);
    margin: 0 0 24px;
    letter-spacing: -0.02em;
}
.landing-hero-subtitle {
    font-size: 1rem;
    font-weight: 400;
    color: var(--font-color-2);
    margin: 0 0 2px;
    line-height: 1.5;
}
.landing-hero-subtitle:last-of-type {
    margin-bottom: 28px;
}
.landing-hero-bio {
    font-size: 1rem;
    color: var(--font-color-2);
    line-height: 1.85;
    margin: 0 0 36px;
    max-width: 600px;
}
.landing-hero-social {
    display: flex;
    align-items: center;
    gap: 8px;
}
.landing-hero-scroll {
    margin-top: 48px;
    color: var(--font-color-3);
    opacity: 0.4;
}
.landing-scroll-dot {
    animation: scroll-hint 1.5s ease-in-out infinite;
}
@keyframes scroll-hint {
    0%, 100% { transform: translateY(0); opacity: 1; }
    50% { transform: translateY(4px); opacity: 0.3; }
}

/* ---- Stats bar ---- */
.landing-stats {
    padding: 40px 0;
    border-bottom: 1px solid rgba(0,0,0,0.08);
}
.landing-stats-grid {
    display: flex;
    justify-content: flex-start;
    gap: 48px;
}
.landing-stat {
    display: flex;
    flex-direction: column;
}
.landing-stat-num {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--font-color-1);
    line-height: 1.2;
    letter-spacing: -0.02em;
}
.landing-stat-label {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--font-color-3);
    margin-top: 4px;
}
.landing-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    color: var(--font-color-3);
    transition: color 0.2s, background 0.2s;
}
.landing-social-link:hover {
    color: var(--font-color-1);
    background: var(--bg-color-1);
}
/* Shared email copy component */
[data-copy-email] {
    cursor: pointer;
    position: relative;
}
.copy-email-toast {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    font-size: 0.75rem;
    color: #fff;
    background: var(--font-color-1);
    padding: 4px 12px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s, transform 0.2s;
}
.copy-email-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.landing-section--dark .copy-email-toast {
    background: #fff;
    color: #252830;
}

/* ---- Sections ---- */
.landing-section {
    padding: 80px 0;
}
.landing-section--alt {
    background: #f3f4f6;
}
.landing-section--dark {
    background: #252830;
    color: #e2e8f0;
}
.landing-section--dark .landing-heading {
    color: #fff;
}
.landing-section--dark .landing-subheading {
    color: rgba(255,255,255,0.6);
}

/* ---- Projects Grid ---- */
/* Project filter tabs */
.landing-project-filters {
    display: flex;
    gap: 8px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}
.project-filter {
    padding: 5px 16px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--font-color-3);
    background: none;
    border: 1px solid var(--line-1);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
}
.project-filter:hover {
    border-color: var(--line-2);
    color: var(--font-color-1);
}
.project-filter.active {
    background: var(--font-color-1);
    border-color: var(--font-color-1);
    color: #fff;
}
/* Projects grid — caicai style */
.landing-projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.landing-project-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s;
}
.landing-project-hidden {
    display: none;
}
a.landing-project-card:hover {
    color: inherit;
}
a.landing-project-card:hover .landing-project-logo {
    transform: translateY(-4px);
}
/* Logo box */
.landing-project-logo {
    aspect-ratio: 10 / 7;
    overflow: hidden;
    background: #f3f4f6;
    border-radius: 8px;
    margin-bottom: 14px;
    transition: transform 0.2s;
}
.landing-project-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
/* Info */
.landing-project-info {
    padding: 0;
}
.landing-project-card:hover h3 {
    color: var(--font-color-0);
}
.landing-project-card h3 {
    font-family: var(--font-landing);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--font-color-1);
    transition: color 0.15s;
    margin: 0 0 4px;
    line-height: 1.4;
}
.landing-project-card p {
    font-size: 0.8125rem;
    font-weight: 400;
    color: var(--font-color-3);
    line-height: 1.65;
    margin: 0 0 10px;
}
.landing-project-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.landing-project-role {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 500;
    color: var(--font-color-0);
    background: rgba(207, 75, 75, 0.06);
    padding: 2px 8px;
    border-radius: 4px;
}
.landing-project-badge {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 500;
    color: var(--font-color-3);
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid var(--line-1);
}

/* ---- About ---- */
.landing-about-bio {
    margin: 0 0 48px;
    max-width: 900px;
}
.landing-about-bio p {
    font-size: 0.9375rem;
    font-weight: 400;
    color: var(--font-color-2);
    line-height: 2;
    margin: 0 0 4px;
}
.landing-bio-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--font-color-0);
    margin-right: 8px;
    vertical-align: middle;
    position: relative;
    top: -1px;
}
.landing-about-sub-label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--font-color-3);
    margin: 0 0 20px;
}
.landing-about-principles {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}
.landing-about-principle {
    padding: 22px 20px;
    background: #fff;
    border-radius: 10px;
    border: 1px solid rgba(0,0,0,0.04);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.landing-about-principle:hover {
    border-color: rgba(0,0,0,0.08);
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}
.landing-about-principle strong {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--font-color-1);
    margin-bottom: 6px;
}
.landing-about-principle strong::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--font-color-0);
    flex-shrink: 0;
    position: relative;
    top: -1px;
}
.landing-about-principle span {
    display: block;
    font-size: 0.75rem;
    color: rgba(0,0,0,0.45);
    line-height: 1.65;
    padding-left: 14px;
}

/* ---- Career ---- */
.landing-career-list {
    display: flex;
    flex-direction: column;
}
.landing-career-row {
    display: flex;
    gap: 24px;
    padding: 16px 0;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}
.landing-career-row:first-child {
    border-top: 1px solid rgba(0,0,0,0.06);
}
.landing-career-year {
    flex-shrink: 0;
    width: 128px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--font-color-3);
    padding-top: 1px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.landing-career-body {
    flex: 1;
    min-width: 0;
}
.landing-career-body strong {
    display: block;
    font-family: var(--font-landing);
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--font-color-1);
    margin-bottom: 4px;
}
.landing-career-body p {
    font-size: 0.8125rem;
    font-weight: 400;
    color: var(--font-color-3);
    line-height: 1.7;
    margin: 0;
}
.landing-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 20px;
    padding: 0;
    border: none;
    background: none;
    font-family: inherit;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--font-color-0);
    cursor: pointer;
    transition: opacity 0.2s;
}
.landing-more-btn:hover { opacity: 0.7; }
.landing-more-btn svg { transition: transform 0.25s ease; }
.landing-about-link {
    display: inline-block;
    margin-top: 0.8em;
    font-size: 14px;
    color: #999;
    text-decoration: none;
    transition: color 0.2s;
}
.landing-about-link:hover {
    color: var(--accent-color, #A63C3C);
}

/* ---- Featured Posts ---- */
.landing-featured-list {
    display: flex;
    flex-direction: column;
}
.landing-featured-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 0;
    border-bottom: 1px solid var(--line-1);
    text-decoration: none;
    color: inherit;
    transition: padding-left 0.15s;
}
.landing-featured-item:first-child {
    border-top: 1px solid var(--line-1);
}
.landing-featured-item:hover {
    padding-left: 6px;
}
.landing-featured-text {
    flex: 1;
    min-width: 0;
}
.landing-featured-text h3 {
    font-family: var(--font-landing);
    font-size: 1rem;
    font-weight: 600;
    color: var(--font-color-1);
    margin: 0 0 4px;
    transition: color 0.15s;
}
.landing-featured-item:hover .landing-featured-text h3 {
    color: var(--font-color-0);
}
.landing-featured-text p {
    font-size: 0.8125rem;
    color: var(--font-color-3);
    margin: 0;
    line-height: 1.5;
}
.landing-featured-year {
    flex-shrink: 0;
    font-size: 0.8125rem;
    font-variant-numeric: tabular-nums;
    color: var(--font-color-3);
}

/* ---- Posts Grid ---- */
/* Posts grid */
.landing-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
.landing-post-card {
    display: flex;
    flex-direction: column;
    padding: 24px;
    background: #fff;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s, transform 0.2s;
}
.landing-post-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    transform: translateY(-2px);
    color: inherit;
}
.landing-post-card time {
    font-size: 0.75rem;
    color: var(--font-color-3);
    font-variant-numeric: tabular-nums;
    margin-bottom: 10px;
}
.landing-post-card h3 {
    font-family: var(--font-landing);
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--font-color-1);
    margin: 0 0 8px;
    line-height: 1.5;
    transition: color 0.15s;
}
.landing-post-card:hover h3 {
    color: var(--font-color-0);
}
.landing-post-card p {
    font-size: 0.8125rem;
    color: var(--font-color-3);
    line-height: 1.6;
    margin: 0;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.landing-more-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 20px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--font-color-3);
    text-decoration: none;
    transition: color 0.15s, gap 0.15s;
}
.landing-more-link:hover {
    color: var(--font-color-0);
    gap: 10px;
}

/* Show more */
.landing-show-more {
    display: block;
    margin: 24px auto 0;
    padding: 7px 24px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--font-color-3);
    background: none;
    border: 1px solid var(--line-1);
    border-radius: 20px;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}
.landing-show-more:hover {
    border-color: var(--line-2);
    color: var(--font-color-1);
}

/* ---- Now + Tools ---- */
.landing-now-tools {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
}
.landing-now-label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--font-color-3);
    margin: 0 0 16px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.landing-now-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.landing-now-list li {
    position: relative;
    padding: 10px 0 10px 20px;
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--font-color-2);
    line-height: 1.6;
    border-bottom: 1px solid rgba(0,0,0,0.08);
}
.landing-now-list li:last-child {
    border-bottom: none;
}
.landing-now-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 18px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--font-color-0);
}

/* ---- Tools ---- */
.landing-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.landing-tool-tag {
    display: inline-block;
    padding: 6px 16px;
    font-size: 0.8125rem;
    font-weight: 400;
    color: var(--font-color-2);
    background: #fff;
    border-radius: 6px;
    transition: box-shadow 0.15s;
}
.landing-tool-tag:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* ---- CTA ---- */
.landing-cta {
    text-align: center;
    padding: 100px 0;
}
.landing-cta-title {
    font-family: var(--font-landing);
    font-size: 1.5rem;
    font-weight: 600;
    color: #fff;
    margin: 0 0 14px;
    letter-spacing: -0.01em;
}
.landing-cta-desc {
    font-size: 0.875rem;
    font-weight: 400;
    color: rgba(255,255,255,0.5);
    margin: 0 0 36px;
    line-height: 1.6;
}
.landing-cta-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
}
.landing-cta-social {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8125rem;
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    transition: color 0.15s;
}
.landing-cta-social:hover {
    color: #fff;
}
.landing-cta-email-copy {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8125rem;
    color: rgba(255,255,255,0.6);
    cursor: pointer;
    position: relative;
    transition: color 0.15s;
}
.landing-cta-email-copy:hover {
    color: #fff;
}

/* ---- Responsive ---- */
@media screen and (max-width: 768px) {
    .landing-inner {
        padding: 0 20px;
    }
    .paper-main--landing .footer {
        padding: 32px 20px;
    }
    .landing-hero {
        padding: 48px 0 40px;
    }
    .landing-hero-bg,
    .hero-name-geo,
    .landing-hero-scroll {
        display: none;
    }
    .landing-hero-mobile-geo {
        display: block;
    }
    .landing-hero-subtitle {
        margin-bottom: 14px;
    }
    .landing-hero-subtitle:last-of-type {
        margin-bottom: 28px;
    }
    .landing-hero-name {
        font-size: 2rem;
    }
    .landing-section {
        padding: 56px 0;
    }
    .landing-about-bio p {
        margin: 0 0 12px;
    }
    .landing-about-principles {
        grid-template-columns: 1fr;
    }
    .landing-career-row {
        flex-direction: column;
        gap: 4px;
    }
    .landing-career-year {
        width: auto;
        font-size: 0.75rem;
    }
    .landing-projects-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .landing-posts-grid {
        grid-template-columns: 1fr;
    }
    .landing-cta-links {
        flex-wrap: wrap;
        gap: 16px;
    }
}

@media screen and (min-width: 769px) and (max-width: 1024px) {
}

@media screen and (min-width: 1200px) {
    .landing-hero {
        padding: 100px 0 88px;
    }
}

/* 搜索图标 + 浮层 */
.search-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    padding: 4px;
    margin-left: 20px;
    cursor: pointer;
    color: var(--font-color-3);
    flex-shrink: 0;
    transition: color 0.2s ease;
}
.search-toggle:hover {
    color: var(--font-color-0);
}

.search-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 0 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}
.search-overlay.show {
    opacity: 1;
    visibility: visible;
}
.search-panel {
    margin-top: 12vh;
    width: 100%;
    max-width: 600px;
    max-height: 70vh;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
    transform: translateY(-12px);
    transition: transform 0.2s ease;
}
.search-overlay.show .search-panel {
    transform: translateY(0);
}
.search-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--line-1);
}
.search-bar-icon {
    color: var(--font-color-3);
    flex-shrink: 0;
}
.search-input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    background: none;
    font-family: inherit;
    font-size: 16px;
    color: var(--font-color-1);
}
.search-input::placeholder {
    color: var(--font-color-3);
}
.search-close {
    flex-shrink: 0;
    border: none;
    background: none;
    padding: 2px;
    cursor: pointer;
    color: var(--font-color-3);
    transition: color 0.2s ease;
}
.search-close:hover {
    color: var(--font-color-0);
}
.search-status {
    padding: 14px 18px;
    font-size: 13px;
    color: var(--font-color-3);
}
.search-results {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}
.search-result {
    display: block;
    padding: 12px 18px;
    border-bottom: 1px solid var(--line-1);
    transition: background 0.15s ease;
}
.search-result:last-child {
    border-bottom: none;
}
.search-result:hover,
.search-result.is-active {
    background: var(--bg-color-1);
}
.search-result-title {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: var(--font-color-1);
    margin-bottom: 2px;
}
.search-result-snippet {
    display: block;
    font-size: 13px;
    line-height: 1.6;
    color: var(--font-color-3);
}
.search-result-date {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: var(--font-color-3);
    opacity: 0.7;
}
.search-result mark {
    background-color: rgba(207, 75, 75, 0.15);
    color: var(--font-color-0);
    padding: 0 2px;
    border-radius: 2px;
}
.search-footer {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 18px;
    flex-shrink: 0;
    padding: 10px 18px;
    border-top: 1px solid var(--line-1);
    font-size: 12px;
    color: var(--font-color-3);
}
.search-hint {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.search-footer kbd {
    display: inline-block;
    min-width: 18px;
    padding: 1px 5px;
    font-family: inherit;
    font-size: 11px;
    line-height: 1.5;
    text-align: center;
    color: var(--font-color-2);
    background: var(--bg-color-1);
    border: 1px solid var(--line-2);
    border-radius: 4px;
}
body.search-open {
    overflow: hidden;
}
@media (max-width: 768px) {
    .search-toggle {
        margin-left: 12px;
    }
    .search-panel {
        margin-top: 8vh;
        max-height: 80vh;
    }
    .search-footer {
        gap: 12px;
        font-size: 11px;
    }
}
