* { box-sizing: content-box; }

.is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)) { max-width: var(--max-width-wide) !important; }

@media screen and (min-width: 769px) {
    @supports (padding: max(0px)) {
        body .col.post-content > *:not([class*="-fullbleed"]),
        body .footer-info {
            padding-left: max(var(--general-page-padding), env(safe-area-inset-left)) !important;
            padding-right: max(var(--general-page-padding), env(safe-area-inset-right)) !important;
        }
        
        body .col.post-content > header.local-nav {
            padding-right: max( calc( var(--general-page-padding) + 4px ), calc( env(safe-area-inset-right) + 16px ), env(safe-area-inset-right)) !important;
        }
    }
}

@media screen and (max-width: 768px) {
    @supports (padding: max(0px)) {
        header.local-nav p.has-theme-font-family {
            padding-left: max(var(--page-padding-wide), env(safe-area-inset-left)) !important;
        }
        header.local-nav {
            padding-left: 0 !important;
            padding-right: max(0px, env(safe-area-inset-right)) !important;
        }
    }
}

@media screen and ( max-width: 576px ) {
    @supports (padding: max(0px)) {
        header.local-nav p.has-theme-font-family {
            padding-left: max(var(--page-padding-default), env(safe-area-inset-left)) !important;
        }
        header.local-nav {
            padding-left: 0 !important;
            padding-right: max(var(--page-padding-default), env(safe-area-inset-right)) !important;
        }
    }
}

.post-content > *:not(header.local-nav) { max-width: var(--max-width-fullwidth) !important; }
.post-content h1 { margin-bottom: 0 !important; font-weight: 400; }

figure.figure { z-index: -1; pointer-events: none; margin: 0; }

.footer-info { padding-left: var(--general-page-padding) !important; padding-right: var(--general-page-padding) !important; }

.is-style-wide { max-width: var(--max-width-wide) !important; }
.is-style-expanded { max-width: var(--max-width-expanded) !important; }

.wp-block-button a { box-sizing: border-box !important; }

.overview { gap: var(--grid-gap-large) !important; margin-bottom: 0; }

.overview .content { display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; gap: var(--content-spacing-medium); }
.overview .content p { margin-left: 0 !important; }
.overview .content p:first-child { font-size: var(--font-size-p-highlight-2); }
.overview .content p:last-child { margin-bottom: 0; }

html:lang(en-US) .overview p { line-height: var(--line-height-paragraph-en-l); }
html:lang(zh-CN) .overview p { line-height: var(--line-height-paragraph-zh-l); }

.post-date { display: none; }

@media screen and ( max-width: 576px ) {
    .hide-on-mobile { display: none !important; }
}

.post-content .chapter, .post-content .chapter + .chapter { margin-bottom: 0; overflow: hidden; }
.post-content .chapter .wrapper { border-top: 1px solid var(--border-table-td-border-secondary); margin-top: 0; margin-bottom: 128px; position: relative; }
.post-content .chapter .wrapper h2.heading { font-size: var(--font-size-heading-medium); font-weight: 400; margin-left: 0 !important; }
.post-content .chapter .wrapper h2.heading.large { font-size: var(--font-size-heading-large); font-weight: 200; margin-top: var(--content-spacing-large); margin-bottom: 0; }
html:lang(en-US) .post-content .chapter .wrapper h2.heading { line-height: var(--line-height-paragraph-en-s); }
html:lang(zh-CN) .post-content .chapter .wrapper h2.heading { line-height: var(--line-height-paragraph-zh-s); }
.post-content .chapter .wrapper h2 + h2 { margin-top: var(--content-spacing-xsmall) !important; }

.post-content .chapter .wrapper h2.heading + div { margin-top: 64px; z-index: 0; }

.post-content .chapter .wrapper .content p { max-width: var(--max-width-default); }
html:lang(en-US) .post-content .chapter .wrapper .content p { line-height: var(--line-height-paragraph-en-l); }
html:lang(zh-CN) .post-content .chapter .wrapper .content p { line-height: var(--line-height-paragraph-zh-l); }

.post-content .chapter .wrapper .content p.is-style-portfolio-highlight-3 { font-size: var(--font-size-p-highlight-3); }

.post-content figure.windows-98-paint { margin-right: -25%; }
.post-content figure.imac { margin-left: -25%; margin-right: -25%; }
.post-content figure.imac + p,
.post-content figure.imac + p + p { padding-top: 48px; }

.post-content .wrapper-childhood-photo,
.post-content .wrapper-flight-log { display: flex; flex-direction: row; align-items: flex-end; justify-content: stretch; gap: var(--content-spacing-medium) !important; }
.post-content .wrapper-childhood-photo > figure,
.post-content .wrapper-childhood-photo > p { width: 100%; }

.post-content .wrapper-flight-log > figure { flex-basis: 75%; }
.post-content .wrapper-flight-log > p { flex-basis: 25%; }

.post-content .chapter .wrapper .content p.is-style-portfolio-caption-1 { font-size: var(--font-size-p-caption-1); color: var(--text-color-secondary); }

.post-content .chapter.fujian .wrapper::before { content: ''; position: absolute; background-image: url('https://media.chiawei.com/images/fujian_coastline@light.svg'); background-repeat: no-repeat; width: 941px; height: 965px; background-size: contain; top: 0; right: -12%; z-index: -1; }
@media (prefers-color-scheme: dark) {
    .post-content .chapter.fujian .wrapper::before {
        background-image: url('https://media.chiawei.com/images/fujian_coastline@dark.svg');
    }
}

@media screen and (max-width: 1140px) {
    .post-content .chapter.fujian .wrapper::before { width: 840px; right: -5%; }
}

@media screen and (max-width: 860px) {
    .post-content .chapter .wrapper h2.heading.large { font-size: var(--font-size-64); }
    
    .post-content .chapter .wrapper h2.heading + div { margin-top: var(--content-spacing-large); }
    
    .post-content .chapter.paint .content > div:first-child { grid-column: 1 / 5; }
    .post-content .chapter.paint .content .windows-98-paint { grid-column: 5 / 7; }
    .post-content .chapter.paint figure.imac { margin-left: -50%; margin-right: -50%; margin-top: var(--content-spacing-small); }
    .post-content .chapter.paint figure.imac + p { grid-column: 4 / 7; padding-top: var(--content-spacing-medium); }
    .post-content .chapter.paint figure.imac + p + p { grid-column: 2 / 7; padding-top: var(--content-spacing-medium); }
    
    .post-content .chapter.fujian .wrapper::before { top: -20px; right: -2%; width: 640px; }
    
    .post-content .chapter.internet .content > div,
    .post-content .chapter.literary-club .content > div,
    .post-content .chapter.startup .content > div,
    .post-content .chapter.boston .content > p,
    .post-content .chapter.working-in-the-us .content > p { grid-column: 1 / 6; }
    .post-content .chapter.fujian .wrapper-childhood-photo { margin-bottom: var(--content-spacing-medium); }
    .post-content .chapter.boston .wrapper-flight-log,
    .post-content .chapter.working-in-the-us .apartment { grid-column: 2 / 7; margin-top: var(--content-spacing-medium); margin-bottom: var(--content-spacing-medium); }
    
    .post-content .chapter .wrapper h2.heading + h2.heading { font-weight: 300; line-height: var(--line-height-paragraph-en-m); }
    html:lang(en-US) .post-content .chapter .wrapper h2.heading + h2.heading { line-height: var(--line-height-paragraph-en-m); }
    html:lang(zh-CN) .post-content .chapter .wrapper h2.heading + h2.heading { line-height: var(--line-height-paragraph-zh-m); }
}

@media screen and (max-width: 768px) {
    .post-content .overview .portrait { max-width: 320px; }
    .post-content .chapter.fujian .content { margin-top: var(--content-spacing-xlarge) !important; }
    .post-content .chapter.fujian .wrapper-childhood-photo,
    .post-content .chapter.boston .wrapper-flight-log { flex-direction: column; gap: var(--content-spacing-xsmall) !important; }
    .post-content .chapter.boston figure.flight-log { width: 100%; }
}

.post-content .chapter .wrapper .content p.is-style-portfolio-highlight { font-size: var(--font-size-p-highlight); }
.post-content .chapter.internet p.is-style-portfolio-highlight { font-weight: bold; font-style: italic; }
html:lang(en-US) .post-content .chapter.internet p.is-style-portfolio-highlight { line-height: var(--line-height-paragraph-en-s); }

.post-content .chapter.internet .quote { gap: var(--content-spacing-small) !important; }

.post-content .chapter.literary-club h2:first-child::first-letter { display: inline-block; }
html:lang(en-US) .post-content .chapter.literary-club h2:first-child::first-letter { margin-left: -0.28em; }
html:lang(zh-CN) .post-content .chapter.literary-club h2:first-child::first-letter { margin-left: -0.4em; }
.post-content .chapter.literary-club .fenyangxi-newspaper { width: 100%; }
