/* Blur only the homepage backdrop, leaving the content sharp. */
body:has(#page-header.full_page) #web_bg {
  background-image: linear-gradient(rgba(15, 23, 42, .18), rgba(15, 23, 42, .18)), url('/img/home-background.png');
  background-position: center;
  background-size: cover;
  filter: blur(8px);
  transform: scale(1.04);
}
body:has(#page-header.full_page) #page-header {
  background-image: none !important;
  background-color: transparent;
}
#page-header.full_page { isolation: isolate; overflow: hidden; }
#page-header.full_page::before {
  content: '';
  position: absolute;
  inset: -20px;
  z-index: -1;
  width: auto;
  height: auto;
  background: linear-gradient(rgba(20, 23, 42, .28), rgba(20, 23, 42, .28)), url('/img/home-background.png') center / cover;
  filter: blur(8px);
}
html[data-theme='dark'] #page-header.full_page::before {
  background: linear-gradient(rgba(20, 23, 42, .38), rgba(20, 23, 42, .38)), url('/img/home-background.png') center / cover;
}
#page-header.full_page #site-info #site-title::before {
  background: none;
  -webkit-text-fill-color: #fff1f8;
  color: #fff1f8;
  text-shadow: 0 2px 12px rgba(20, 20, 40, .6);
}
#page-header.full_page #site-subtitle { color: #fff; text-shadow: 0 2px 8px rgba(20, 20, 40, .65); }

/* Article backgrounds sit behind the layout; the article card stays unchanged. */
body:has(#body-wrap.post) #web_bg {
  background-image: linear-gradient(rgba(255, 240, 246, .22), rgba(255, 240, 246, .22)), url('/img/banner.jpg');
  background-position: center;
  background-size: cover;
  filter: blur(8px);
  transform: scale(1.04);
}

/* Warm rose accents match the pink article wallpaper. */
html:has(#body-wrap.post) {
  --theme-color: #b66e88;
  --default-bg-color: #b66e88;
  --btn-bg: #b66e88;
  --btn-hover-color: #9d5872;
  --card-bg: rgba(255, 250, 252, .93);
  --font-color: #51454c;
  --site-card-border: rgba(225, 195, 207, .65);
  --card-box-shadow: 0 6px 24px rgba(104, 63, 80, .08);
}
html[data-theme='dark']:has(#body-wrap.post) {
  --card-bg: rgba(38, 38, 46, .95);
  --font-color: #eee7ec;
  --theme-color: #d7a4ba;
  --site-card-border: rgba(192, 171, 190, .25);
}
/* Let the site handle its colors instead of automatic browser inversion. */
html { color-scheme: only light; }
/* Site dark colors are explicit CSS; keep browser auto-darkening disabled in both modes. */
html[data-theme='dark'] { color-scheme: only light; }
html[data-theme='dark']:has(#body-wrap.post) #web_bg::before {
  background-color: rgba(25, 25, 33, .3);
}
html[data-theme='dark'] #body-wrap.post #page-header.post-bg {
  background: linear-gradient(120deg, #40333e, #35333f);
}
html[data-theme='dark'] #body-wrap.post #page-header #post-info .post-title,
html[data-theme='dark'] #body-wrap.post #page-header #post-meta,
html[data-theme='dark'] #body-wrap.post #page-header #post-meta a,
html[data-theme='dark'] #body-wrap.post #page-header #nav a,
html[data-theme='dark'] #body-wrap.post #page-header #nav .site-page { color: #f0e6ed; }
html[data-theme='dark'] #body-wrap.post #article-container a,
html[data-theme='dark'] #body-wrap.post #article-container .edu-period code { color: #e4b2c8; }
html[data-theme='dark'] #body-wrap.post .bio-table th { background: #34323b; color: #eee7ec; }
html[data-theme='dark'] #body-wrap.post .bio-table th,
html[data-theme='dark'] #body-wrap.post .bio-table td { border-color: #55505c; }
#body-wrap.post #page-header.post-bg {
  background: linear-gradient(120deg, #f4d9e3, #ecd9e4 60%, #e4dce9);
}
#body-wrap.post #page-header::before { background: transparent; }
#body-wrap.post #page-header #post-info .post-title,
#body-wrap.post #page-header #post-meta,
#body-wrap.post #page-header #post-meta a,
#body-wrap.post #page-header #nav a,
#body-wrap.post #page-header #nav .site-page {
  color: #604653;
  text-shadow: none;
}
#body-wrap.post #article-container a { color: #a75b79; }
#body-wrap.post #aside-content .card-info #card-info-btn {
  background: linear-gradient(110deg, #c68a9f, #b48ba8);
}
#body-wrap.post #aside-content .card-info #card-info-btn:hover { background: #a86d89; }
body:has(#body-wrap.post) #rightside > div > button { background: #b77e96; }
#body-wrap.post #article-container .edu-period code {
  color: #a75b79;
  background: rgba(190, 130, 153, .12);
}
#body-wrap.post #article-container hr { border-color: #dfc9d3; }

/* Keep the theme's card appearance while separating the two sidebars. */
#left-sidebar .card-widget {
  padding: 22px 24px;
  margin-bottom: 20px;
  border-radius: 16px;
  background: var(--card-bg);
  box-shadow: var(--card-box-shadow);
}
#left-sidebar .item-headline { font-size: 1.2em; margin-bottom: 12px; }
#left-sidebar .item-headline i { margin-right: 8px; }
#left-sidebar .aside-list-item { padding: 6px 0; }
#left-sidebar .thumbnail { display: none; }
#left-sidebar .aside-list-item time { display: block; font-size: 12px; color: var(--font-color); opacity: .7; }
#left-sidebar .card-archive-list { padding: 0; list-style: none; }
#left-sidebar .card-archive-list-link { display: flex; justify-content: space-between; padding: 6px 0; }
#footer { background: var(--card-bg); }
#footer::before { display: none; }
#footer .footer-other { padding: 20px 24px; color: var(--font-color); }
#footer a { color: inherit; }
#footer a:hover { color: var(--theme-color); }
#footer .footer-copyright { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 24px; }
#footer .footer-copyright .framework-info { display: inline; }
#footer #site-statistics,
#site-statistics .webinfo { display: contents; }
#site-statistics .item-headline { display: none; }
#site-statistics .webinfo-item { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
@media (min-width: 1100px) {
  main.layout.split-sidebars { display: grid; grid-template-columns: 210px minmax(0, 1fr) 260px; gap: 16px; max-width: 1500px; align-items: start; }
  main.layout.split-sidebars > #left-sidebar,
  main.layout.split-sidebars > #aside-content,
  main.layout.split-sidebars > :not(.aside-content) { width: 100%; min-width: 0; margin: 0; }
  main.layout.split-sidebars > .aside-content { padding-left: 0; padding-right: 0; }
  main.layout.split-sidebars > #left-sidebar { display: block; }
  html.hide-aside main.layout.split-sidebars { grid-template-columns: minmax(0, 1fr); }
  html.hide-aside #left-sidebar { display: none; }
}
@media (max-width: 1099px) {
  main.layout.split-sidebars { flex-wrap: wrap; }
  #left-sidebar { width: 100%; order: 3; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 20px; }
}
@media (max-width: 600px) {
  #left-sidebar { grid-template-columns: minmax(0, 1fr); }
}
/* Shared palette and surfaces for both sidebars and the article area. */
:root {
  --theme-color: #7c83e8;
  --card-bg: rgba(255, 255, 255, .86);
  --font-color: #41465d;
  --card-box-shadow: 0 6px 24px rgba(56, 50, 100, .09);
  --card-hover-box-shadow: 0 10px 30px rgba(83, 76, 143, .14);
  --site-card-border: rgba(225, 224, 246, .8);
}
[data-theme='dark'] {
  --card-bg: rgba(30, 32, 49, .9);
  --font-color: #d8daeb;
  --site-card-border: rgba(144, 143, 193, .22);
}
body { line-height: 1.85; }
#article-container img.id-photo {
  width: 120px !important;
  height: 120px !important;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 65%;
}
/* The English school name already starts a new line; omit Markdown's extra break. */
#article-container .edu-en + br { display: none; }
/* The left sidebar is now the first child, so restore article padding explicitly. */
main.layout > #post { padding: 32px; }
html:not([data-theme='dark']) main.layout > #post {
  background: #fffdfd;
}
@media (max-width: 768px) {
  main.layout > #post { padding: 24px 20px; }
}
#post .post-copyright {
  margin: 20px 0 6px;
  padding: 8px 12px;
  font-size: 13px;
  line-height: 1.65;
}
#post .post-copyright > div { display: flex; align-items: baseline; }
#post .post-copyright-meta { flex-shrink: 0; }
#post .post-copyright-info { min-width: 0; }
#post .post-copyright__type .post-copyright-info a {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#post .tag_share .post-share { margin-top: 4px; }
#post .tag_share .post-share .social-share-icon {
  width: 24px;
  height: 24px;
  line-height: 24px;
  font-size: 14px;
}
#article-container .edu-period {
  margin: 1.5em 0 .7em;
  color: var(--font-color);
  font-size: 1.5em;
  font-weight: 600;
  line-height: 1.6;
}
#article-container .edu-period code {
  padding: 2px 5px;
  border-radius: 4px;
  color: #f47466;
  background: var(--code-background, rgba(27, 31, 35, .05));
  font-size: 1em;
  font-weight: 400;
}
#recent-posts .recent-post-item,
#aside-content .card-widget,
#left-sidebar .card-widget,
.layout > #post,
.layout > #page,
.layout > #archive,
.layout > #tag,
.layout > #category {
  border: 1px solid var(--site-card-border);
  border-radius: 16px;
  background: var(--card-bg);
  box-shadow: var(--card-box-shadow);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
#aside-content .card-widget,
#left-sidebar .card-widget { margin-bottom: 20px; padding: 22px 24px; }
#recent-posts .recent-post-item {
  height: auto;
  margin-bottom: 16px;
}
html:not([data-theme='dark']) #recent-posts .recent-post-item {
  background: rgba(255, 250, 253, .76);
}
#recent-posts .recent-post-item > .recent-post-info.no-cover {
  padding: 24px 28px;
}
@media (max-width: 768px) {
  #recent-posts .recent-post-item > .recent-post-info.no-cover { padding: 20px; }
}
#aside-content .item-headline,
#left-sidebar .item-headline { font-size: 1.08em; font-weight: 600; }
#aside-content .item-headline i,
#left-sidebar .item-headline i { color: var(--theme-color); }
#aside-content .card-info #card-info-btn {
  border-radius: 10px;
  background: linear-gradient(110deg, #748ee8, #a080d9);
}
#aside-content .card-info #card-info-btn:hover { background: #8c79d2; }
#footer { border-top: 1px solid var(--site-card-border); backdrop-filter: blur(12px); }
@media (max-width: 600px) {
  #aside-content .card-widget,
  #left-sidebar .card-widget { padding: 20px; }
}
