:root {
  /* Keep critical visual variables independent from runtime JS/CDN execution. */
  --default-bg: url(/img/background.png);
  --darkmode-bg: url(/img/background.png);
  --mobileday-bg: url(/img/background.png);
  --mobilenight-bg: url(/img/background.png);
  --theme-color: rgb(57, 197, 187);
  --text-bg-hover: rgba(57, 197, 187, 0.7);
  --high-trans-color: rgba(57, 197, 187, 0.5);
  --trans-light: rgba(253, 253, 253, 0.95);
  --trans-dark: rgba(25, 25, 25, 0.95);
  --blur-num: blur(0px) saturate(120%);
  --backdrop-filter: none;
}

#site-title {
  display: inline-block;
  max-width: none;
  margin: 0 auto;
  padding: 0;
  border-radius: 0;
  font-size: clamp(2.6rem, 3.8vw, 4.6rem) !important;
  line-height: 1.1;
  letter-spacing: 0.02em;
  text-align: center;
  text-wrap: balance;
  white-space: nowrap;
  background: transparent;
  backdrop-filter: none;
  box-shadow: none;
  text-shadow: 0 10px 28px rgba(0, 0, 0, 0.16);
}

#site-subtitle {
  margin-top: 18px;
  min-height: 1.6em;
  font-size: clamp(1.25rem, 2vw, 1.8rem);
  font-weight: 600;
  text-align: center;
  text-shadow: 0 4px 16px rgba(0, 0, 0, 0.16);
}

#site-info {
  width: 100%;
  max-width: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-bottom: 84px;
}

#blog_name #site-name {
  font-size: 1.15rem;
  font-weight: 700;
  text-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}

#nav .menu_word,
#nav .menu_icon,
#nav i,
#nav-right a,
#site_social_icons a {
  text-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}

#name-container {
  display: none;
}

#aside-content > .card-widget.card-info {
  overflow: hidden;
  border-radius: 24px;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.38), rgba(255, 255, 255, 0.82)),
    url(/img/article/chuyinyuntian.png) !important;
  background-size: cover !important;
  background-position: center !important;
  box-shadow: 0 18px 48px rgba(80, 113, 146, 0.18);
}

[data-theme="dark"] #aside-content > .card-widget.card-info {
  background-image:
    linear-gradient(rgba(17, 24, 39, 0.42), rgba(17, 24, 39, 0.78)),
    url(/img/article/chuyinyuntian.png) !important;
}

#aside-content > .card-widget.card-info .author_top {
  padding-top: 12px;
}

#aside-content > .card-widget.card-info .avatar-img {
  width: 118px;
  height: 118px;
  border: 4px solid rgba(255, 255, 255, 0.75);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

#aside-content > .card-widget.card-info .avatar-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#aside-content > .card-widget.card-info .author-info__name {
  margin-top: 6px;
  font-size: 2.05rem;
  color: #1b1b1b;
  text-shadow: 0 2px 8px rgba(255, 255, 255, 0.45);
}

[data-theme="dark"] #aside-content > .card-widget.card-info .author-info__name {
  color: #f8fbff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

#aside-content > .card-widget.card-info .author-info__description {
  margin-top: 4px;
  font-size: 1rem;
  color: rgba(15, 23, 42, 0.86);
}

[data-theme="dark"] #aside-content > .card-widget.card-info .author-info__description {
  color: rgba(248, 251, 255, 0.88);
}

#aside-content > .card-widget.card-info > #card-info-btn {
  width: calc(100% - 44px);
  margin: 18px auto 12px;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, 0.72) !important;
  color: #1f2937 !important;
  box-shadow: 0 8px 24px rgba(68, 94, 120, 0.16);
}

[data-theme="dark"] #aside-content > .card-widget.card-info > #card-info-btn {
  background: rgba(15, 23, 42, 0.62) !important;
  color: #f8fbff !important;
}

#aside-content > .card-widget.card-info .card-info-social-icons {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  padding: 6px 12px 4px;
}

#aside-content > .card-widget.card-info .card-info-social-icons .social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  margin: 0 auto;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.78);
  color: #2d3748;
  box-shadow: 0 8px 18px rgba(68, 94, 120, 0.16);
}

#aside-content > .card-widget.card-info .card-info-social-icons .social-icon img {
  width: 1.18rem;
  height: 1.18rem;
  object-fit: contain;
}

[data-theme="dark"] #aside-content > .card-widget.card-info .card-info-social-icons .social-icon {
  background: rgba(15, 23, 42, 0.66);
  color: #f8fbff;
}

#welcome-info {
  margin-top: 12px;
  border-radius: 10px;
  padding: 12px 14px;
  line-height: 1.8;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(94, 166, 229, 0.18);
}

#welcome-info .welcome-line {
  margin-top: 6px;
}

#welcome-info .welcome-line:first-child {
  margin-top: 0;
}

[data-theme="dark"] #welcome-info {
  background: rgba(25, 25, 25, 0.72);
  border-color: rgba(255, 255, 255, 0.08);
}

#aside-content .card-announcement .announcement_content {
  line-height: 1.9;
}

#aside-content .card-announcement .announcement_note {
  --announcement-accent: rgb(57, 197, 187);
  --announcement-accent-soft: rgba(57, 197, 187, 0.14);
  --announcement-text: rgba(22, 50, 79, 0.92);
  --announcement-muted: rgba(22, 50, 79, 0.7);

  position: relative;
  overflow: hidden;
  border-radius: 12px;
  padding: 14px;
  background:
    linear-gradient(135deg, rgba(57, 197, 187, 0.16), rgba(255, 255, 255, 0.86) 48%, rgba(102, 204, 255, 0.12)),
    rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(57, 197, 187, 0.22);
  color: var(--announcement-text);
  box-shadow: 0 12px 28px rgba(57, 197, 187, 0.1);
}

/* Announcement content uses semantic blocks so the sidebar stays readable on small screens. */
#aside-content .card-announcement .announcement_note::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--announcement-accent);
}

#aside-content .card-announcement .announcement_note__eyebrow {
  display: inline-flex;
  align-items: center;
  margin-bottom: 8px;
  border-radius: 999px;
  padding: 2px 9px;
  background: var(--announcement-accent-soft);
  color: var(--announcement-accent);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.6;
}

#aside-content .card-announcement .announcement_note__title {
  margin-bottom: 8px;
  color: var(--announcement-text);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.55;
}

#aside-content .card-announcement .announcement_note__desc {
  color: var(--announcement-muted);
  font-size: 0.9rem;
  line-height: 1.85;
}

#aside-content .card-announcement .announcement_note__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

#aside-content .card-announcement .announcement_note__tags span {
  border: 1px solid rgba(57, 197, 187, 0.28);
  border-radius: 999px;
  padding: 2px 8px;
  background: rgba(255, 255, 255, 0.62);
  color: rgba(22, 50, 79, 0.82);
  font-size: 0.76rem;
  line-height: 1.6;
}

#aside-content .card-announcement .announcement_note__footer {
  margin-top: 10px;
  border-top: 1px dashed rgba(57, 197, 187, 0.36);
  padding-top: 9px;
  color: var(--announcement-accent);
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.7;
}

[data-theme="dark"] #aside-content .card-announcement .announcement_note {
  --announcement-text: rgba(247, 251, 255, 0.92);
  --announcement-muted: rgba(247, 251, 255, 0.72);

  background:
    linear-gradient(135deg, rgba(57, 197, 187, 0.18), rgba(25, 25, 25, 0.82) 50%, rgba(102, 204, 255, 0.1)),
    rgba(25, 25, 25, 0.78);
  border-color: rgba(57, 197, 187, 0.28);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] #aside-content .card-announcement .announcement_note__tags span {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(247, 251, 255, 0.8);
}

#workboard {
  margin-top: 18px;
  text-align: center;
  font-size: 1.15rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.92);
}

#workboard div {
  font-size: 1.05rem !important;
}

.card-clock {
  overflow: hidden;
}

#gwen-clock-card {
  padding: 16px 18px !important;
}

#gwen-clock-card .item-headline {
  display: flex !important;
  align-items: center;
  gap: 6px;
}

#gwen-clock-card .item-headline .gwen-clock-title-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

#gwen-clock-card .item-headline .gwen-clock-title-icon svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

#gwen-clock-card .item-content {
  padding: 0 !important;
}

.gwen-clock {
  text-align: center;
  margin-top: 0;
  padding: 4px 0 0;
  background: transparent;
  border: none;
  line-height: 1.4;
}

.gwen-clock__meta-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.gwen-clock__meta-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  color: rgba(22, 50, 79, 0.82);
}

[data-theme="dark"] .gwen-clock__meta-item {
  color: rgba(247, 251, 255, 0.84);
}

.gwen-clock__meta-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  line-height: 1;
  flex-shrink: 0;
}

.gwen-clock__time {
  font-family: Consolas_1, "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 2.35rem;
  font-weight: 700;
  color: #16324f;
  letter-spacing: 0.08em;
  line-height: 1.1;
  text-align: center;
}

[data-theme="dark"] .gwen-clock__time {
  color: #f7fbff;
}

.gwen-clock__date,
.gwen-clock__weather {
  font-size: 0.82rem;
  color: inherit;
  text-align: center;
}

.gwen-clock__reminder {
  margin-top: 12px;
  font-size: 0.84rem;
  color: rgba(22, 50, 79, 0.72);
  line-height: 1.45;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

[data-theme="dark"] .gwen-clock__reminder {
  color: rgba(247, 251, 255, 0.72);
}

#rightside > div > button,
#rightside > div > a {
  box-shadow: 0 10px 24px rgba(53, 97, 130, 0.16);
}

#pagination .pagination .extend,
#pagination .pagination .page-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
}

#pagination .pagination .extend:hover,
#pagination .pagination .page-number:hover {
  transform: none;
}

.menu-expand-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 4px;
  font-size: 0.9rem;
  line-height: 1;
  transition: transform 0.3s ease;
}

#nav .menus_items .menus_item:hover > a > .menu-expand-arrow {
  transform: rotate(180deg);
}

.pagination-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1;
}

#nav .menus_items .menus_item .menus_item_child {
  left: 50% !important;
  right: auto !important;
  translate: -50% 0;
  transform-origin: top center;
}

@media screen and (max-width: 800px) {
  #nav .menus_items {
    position: static !important;
    width: auto !important;
    left: auto !important;
    transform: none !important;
  }

  #nav .menus_items .menus_item {
    padding-left: 0 !important;
  }

  #nav .menus_items .menus_item .menus_item_child {
    left: auto !important;
    right: 0 !important;
    translate: 0 0 !important;
    transform: none !important;
  }

  #nav #toggle-menu {
    padding-left: 8px !important;
  }

  #nav #toggle-menu a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
  }
}

.menu-toggle-icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.rightside-icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.page.page-with-aside .aside-content {
  display: block !important;
}

.page.page-with-aside #aside-content {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

@media screen and (min-width: 901px) {
  .page.page-with-aside #content-inner.layout {
    align-items: stretch;
    gap: 20px;
  }

  .page.page-with-aside #page {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
  }

  .page.page-with-aside #aside-content {
    flex: 0 0 300px;
    width: 300px;
    max-width: 300px;
    padding-left: 0;
    align-self: stretch;
  }
}

.page.page-with-aside #aside-content .card-widget {
  margin-top: 0;
}

.page.page-with-aside #aside-content > .card-widget:first-child {
  margin-top: 0;
}

.page.page-with-aside #aside-content .card-info {
  padding: 16px 18px;
}

.page.page-with-aside #aside-content .card-info .author_top {
  padding-top: 0;
}

.page.page-with-aside #aside-content .card-info .avatar-img {
  width: 84px;
  height: 84px;
  border-width: 3px;
}

.page.page-with-aside #aside-content .card-info .author-info__name {
  font-size: 1.15rem;
  margin-top: 8px;
}

.page.page-with-aside #aside-content .card-info .author-info__description {
  margin-top: 4px;
  font-size: 0.9rem;
  line-height: 1.7;
}

.page.page-with-aside #aside-content .card-info .card-info-data,
.page.page-with-aside #aside-content .card-info #card-info-btn,
.page.page-with-aside #aside-content .card-info .card-info-social-icons {
  display: none !important;
}

.page.page-with-aside #aside-content #gwen-clock-card .item-content {
  padding-top: 2px;
}

.page.page-with-aside #aside-content #card-toc .toc-content {
  margin: 10px 0 0;
  max-height: calc(100vh - 300px) !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

.page.page-with-aside #aside-content #card-toc .toc {
  padding-bottom: 4px;
}

.page.page-with-aside #aside-content .sticky_layout {
  position: sticky !important;
  top: 20px !important;
  align-self: flex-start;
  width: 100%;
}

.page.page-with-aside #aside-content #gwen-clock-card,
.page.page-with-aside #aside-content .card-webinfo {
  flex-shrink: 0;
}

@media screen and (max-width: 900px) {
  .page.page-with-aside #page {
    width: 100%;
  }
}

#catalog_magnet .magnet_link_context {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px !important;
}

#catalog_magnet .magnet_link_context > span:first-child {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  font-weight: 500 !important;
}

#catalog_magnet .magnet_link_context > span:last-child {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

#catalog_magnet .magnet_item:hover .magnet_link_context > span:last-child {
  background: rgba(255, 255, 255, 0.14);
}

#catalog_magnet .magnet_item .fas {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  font-style: normal;
  font-size: 15px;
  line-height: 1;
  flex-shrink: 0;
}

#catalog_magnet .magnet_item .fa-code::before {
  content: "💻";
}

#catalog_magnet .magnet_item .fa-brain::before {
  content: "🤖";
}

#catalog_magnet .magnet_item .fa-seedling::before {
  content: "🌱";
}

#catalog_magnet .magnet_item .fa-timeline::before {
  content: "🕰";
}

#catalog_magnet .magnet_item .fa-book-open-reader::before {
  content: "📚";
}

#catalog_magnet .magnet_item .fa-diagram-project::before {
  content: "🚀";
}

#catalog_magnet .magnet_item .fa-arrow-circle-right {
  width: 24px;
  height: 24px;
  background: transparent;
  box-shadow: none;
  font-size: 24px;
  transition: transform 0.2s ease;
}

#catalog_magnet .magnet_item .fa-arrow-circle-right::before {
  content: "›";
}

#catalog_magnet .magnet_item:hover .fa-arrow-circle-right {
  transform: translateX(3px);
}
