/*
 * Sijue Capital site layer
 * A restrained, responsive visual system on top of Sakurairo.
 */

:root {
  --fusion-ink: #0b1928;
  --fusion-muted: #626873;
  --fusion-subtle: #858a92;
  --fusion-paper: #ffffff;
  --fusion-canvas: #f5f3ed;
  --fusion-line: #ded8ca;
  --fusion-accent: #b48a3f;
  --fusion-accent-strong: #78571f;
  --fusion-accent-soft: #f3ead8;
  --fusion-navy: #071a2c;
  --fusion-shadow: 0 24px 70px rgba(7, 26, 44, 0.12);
  --fusion-shadow-soft: 0 12px 36px rgba(7, 26, 44, 0.08);
  --fusion-radius: 28px;
  --fusion-font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body,
body.serif {
  color: var(--fusion-ink);
  background: var(--fusion-canvas);
  font-family: var(--fusion-font) !important;
  font-weight: 400;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

a,
button,
input,
textarea,
select {
  font: inherit;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(180, 138, 63, 0.42);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 10001;
  top: 12px;
  left: 12px;
  padding: 10px 16px;
  color: #fff;
  background: var(--fusion-navy);
  border-radius: 10px;
  transform: translateY(-150%);
}

.skip-link:focus {
  color: #fff;
  transform: translateY(0);
}

/* Header */
.site-header {
  height: 76px;
  padding: 0 max(24px, calc((100vw - 1120px) / 2));
  gap: 18px;
  background: rgba(245, 243, 237, 0.88);
  border-bottom: 1px solid rgba(21, 23, 39, 0.07);
  -webkit-backdrop-filter: blur(18px) saturate(130%);
  backdrop-filter: blur(18px) saturate(130%);
  contain: none;
}

body.admin-bar .site-header {
  top: 32px;
}

.site-branding,
.nav-search-wrapper,
.user-menu-wrapper {
  height: auto;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  animation: none;
}

.site-branding {
  max-width: none;
}

.site-branding a {
  gap: 10px;
}

.site-title-logo,
.site-title-logo img {
  display: block;
  width: auto;
  max-width: 210px;
  height: auto;
  max-height: 46px;
  border-radius: 0;
}

.site-title {
  padding: 0;
  color: var(--fusion-ink);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.site-title:hover {
  color: var(--fusion-accent);
  background: transparent;
}

.nav-search-wrapper {
  max-width: none;
  margin-left: auto;
  overflow: visible;
  gap: 10px;
}

.nav-search-wrapper nav {
  height: auto;
}

.nav-search-wrapper nav ul {
  gap: 4px;
}

.nav-search-wrapper nav ul li a {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  padding: 9px 14px;
  color: #3c4055;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
}

.nav-search-wrapper nav ul li a:hover,
.nav-search-wrapper nav .current-menu-item > a {
  color: var(--fusion-accent-strong);
  background: var(--fusion-accent-soft);
}

.fusion-writing-link {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  gap: 8px;
  padding: 9px 15px;
  color: #fff;
  background: var(--fusion-navy);
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(7, 26, 44, 0.2);
  font-size: 14px;
  font-weight: 650;
  white-space: nowrap;
}

.fusion-writing-link:hover {
  color: #fff;
  background: #102f4b;
  transform: translateY(-1px);
}

.nav-search-divider {
  height: 20px;
  border-color: var(--fusion-line);
}

.searchbox,
.bg-switch,
.mo-nav-button,
.mo-toc-button {
  appearance: none;
  color: var(--fusion-ink);
  background: transparent;
  border: 0;
  cursor: pointer;
}

.searchbox {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  padding: 0;
  border-radius: 12px;
}

.searchbox:hover {
  color: var(--fusion-accent-strong);
  background: var(--fusion-accent-soft);
}

/* Main structure */
.site.wrapper {
  background: var(--fusion-canvas);
  animation: none;
}

.site-content {
  width: 100%;
}

.home .blank {
  display: none;
}

.home .site-content {
  max-width: 1120px;
  padding: 132px 28px 0;
}

/* Homepage hero */
.fusion-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  min-height: 520px;
  align-items: center;
  gap: clamp(48px, 8vw, 104px);
  overflow: hidden;
  padding: clamp(44px, 7vw, 80px);
  background:
    radial-gradient(circle at 12% 12%, rgba(180, 138, 63, 0.16), transparent 34%),
    linear-gradient(135deg, #ffffff 0%, #faf7ef 100%);
  border: 1px solid rgba(180, 138, 63, 0.2);
  border-radius: 36px;
  box-shadow: var(--fusion-shadow);
}

.fusion-hero::after {
  position: absolute;
  right: -90px;
  bottom: -120px;
  width: 340px;
  height: 340px;
  content: "";
  background: linear-gradient(145deg, rgba(180, 138, 63, 0.15), rgba(7, 26, 44, 0.06));
  border-radius: 48% 52% 60% 40%;
  transform: rotate(18deg);
}

.fusion-hero__content,
.fusion-hero__visual {
  position: relative;
  z-index: 1;
}

.fusion-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 22px;
  color: var(--fusion-accent-strong);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.fusion-eyebrow::before {
  width: 8px;
  height: 8px;
  content: "";
  background: var(--fusion-accent);
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(180, 138, 63, 0.14);
}

.home .fusion-hero h1 {
  max-width: 680px;
  margin: 0;
  color: var(--fusion-ink);
  font-size: clamp(62px, 8vw, 104px);
  font-weight: 780 !important;
  line-height: 0.98;
  letter-spacing: 0;
}

.fusion-brand-primary {
  font-family: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", serif;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.fusion-brand-secondary {
  display: inline-block;
  margin-left: 0.22em;
  color: var(--fusion-accent-strong);
  font-size: 0.4em;
  font-weight: 760;
  letter-spacing: 0.24em;
  vertical-align: 0.16em;
}

.fusion-hero__lead {
  max-width: 560px;
  margin: 28px 0 0;
  color: var(--fusion-muted);
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.85;
  letter-spacing: 0.01em;
}

.fusion-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.fusion-button {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 20px;
  color: #fff;
  background: var(--fusion-navy);
  border: 1px solid var(--fusion-navy);
  border-radius: 14px;
  font-size: 15px;
  font-weight: 700;
  box-shadow: 0 12px 24px rgba(7, 26, 44, 0.22);
}

.fusion-button:hover {
  color: #fff;
  background: #102f4b;
  transform: translateY(-2px);
}

.fusion-button--quiet {
  color: var(--fusion-ink);
  background: rgba(255, 255, 255, 0.72);
  border-color: var(--fusion-line);
  box-shadow: none;
}

.fusion-button--quiet:hover {
  color: var(--fusion-accent-strong);
  background: var(--fusion-paper);
}

.fusion-hero__visual {
  display: grid;
  justify-items: center;
}

.fusion-brand-shell {
  position: relative;
  box-sizing: border-box;
  min-width: 0;
  overflow: hidden;
  width: min(100%, 420px);
  padding: clamp(24px, 4vw, 46px);
  background: linear-gradient(145deg, #ffffff, #f7f1e4);
  border: 1px solid rgba(180, 138, 63, 0.34);
  border-radius: 30px;
  box-shadow: 0 28px 60px rgba(7, 26, 44, 0.16);
}

.fusion-brand-shell img {
  display: block;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0;
  height: auto !important;
  object-fit: contain;
}

.fusion-stat-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: min(100%, 360px);
  gap: 12px;
  margin: 22px 0 0;
}

.fusion-stat {
  min-width: 0;
  padding: 15px 17px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--fusion-line);
  border-radius: 16px;
  box-shadow: var(--fusion-shadow-soft);
}

.fusion-stat dt {
  margin-bottom: 4px;
  color: var(--fusion-subtle);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.fusion-stat dd {
  overflow: hidden;
  margin: 0;
  color: var(--fusion-ink);
  font-size: 18px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Latest posts */
.home #primary {
  padding-top: 104px;
}

.home .site-main {
  width: 100%;
}

.home h2.main-title,
.home h1.main-title {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin: 0 0 30px;
  padding: 0;
  color: var(--fusion-ink);
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 760;
  line-height: 1.15;
  letter-spacing: -0.04em;
  opacity: 1 !important;
  content-visibility: visible !important;
}

.home .main-title__meta {
  color: var(--fusion-subtle);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.home .post-list-thumb {
  display: grid !important;
  grid-template-columns: minmax(310px, 0.82fr) minmax(0, 1.18fr);
  grid-template-rows: auto auto minmax(0, 1fr);
  width: 100%;
  height: 330px;
  min-height: 330px;
  margin: 0 0 24px;
  overflow: hidden;
  color: var(--fusion-ink);
  background: var(--fusion-paper);
  border: 1px solid var(--fusion-line);
  border-radius: var(--fusion-radius);
  box-shadow: var(--fusion-shadow-soft);
  opacity: 1 !important;
  content-visibility: visible !important;
}

.home .post-list-thumb:hover {
  box-shadow: var(--fusion-shadow);
  transform: translateY(-4px);
}

.home .post-thumb,
.home .post-thumb:hover {
  position: relative;
  grid-column: 1;
  grid-row: 1 / 4;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.home .post-thumb a {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #e9eaff, #dce9f7);
}

.home .post-thumb img,
.home .post-thumb video,
.home .post-cover-placeholder {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home .post-thumb img {
  transform: scale(1.001);
}

.home .post-list-thumb:hover .post-thumb img {
  transform: scale(1.035);
}

.post-cover-placeholder {
  display: grid !important;
  place-items: center;
  color: rgba(70, 70, 189, 0.6);
  background:
    radial-gradient(circle at 75% 30%, rgba(98, 202, 164, 0.24), transparent 24%),
    linear-gradient(135deg, #ececff, #e5f2f8);
  font-size: 58px;
  font-weight: 800;
  letter-spacing: -0.08em;
}

.home .post-date {
  position: relative;
  top: auto;
  left: auto;
  grid-column: 2;
  grid-row: 1;
  align-self: center;
  width: auto;
  margin: 34px 170px 0 34px;
  padding: 0;
  color: var(--fusion-subtle);
  background: transparent;
  border: 0;
  border-radius: 0;
  font-size: 12px;
  font-weight: 650;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.home .post-date i,
.home .post-meta i {
  color: var(--fusion-accent);
}

.home .post-meta {
  position: relative;
  top: auto;
  right: auto;
  grid-column: 2;
  grid-row: 1;
  align-self: center;
  justify-self: end;
  max-width: 150px;
  margin: 34px 34px 0 0;
  padding: 0;
  gap: 10px;
  color: var(--fusion-subtle) !important;
  background: transparent;
  border: 0;
  border-radius: 0;
  font-weight: 650;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.home .post-meta a {
  color: var(--fusion-subtle);
}

.home .post-title {
  position: relative;
  bottom: auto;
  left: auto;
  grid-column: 2;
  grid-row: 2;
  width: auto;
  max-width: none;
  max-height: none;
  margin: 28px 34px 0;
  padding: 0;
  overflow: visible;
  background: transparent;
  border: 0;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.home .post-title:hover {
  background: transparent;
  box-shadow: none;
}

.home .post-list-thumb .post-title h3,
.home .post-list-thumb .post-title h3:hover {
  color: var(--fusion-ink);
  font-size: clamp(25px, 3vw, 34px);
  font-weight: 760;
  line-height: 1.28;
  letter-spacing: -0.035em;
}

.home .post-list-thumb .post-title a:hover h3 {
  color: var(--fusion-accent-strong);
}

.home .post-excerpt {
  position: relative;
  bottom: auto;
  left: auto;
  grid-column: 2;
  grid-row: 3;
  align-self: start;
  width: auto;
  max-height: none;
  margin: 22px 34px 32px;
  padding: 0;
  color: var(--fusion-muted);
  font-size: 15px;
  line-height: 1.85;
}

.home .post-excerpt p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--fusion-muted);
  line-height: 1.85;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.home .ai-excerpt-tip {
  display: none;
}

.fusion-empty-state {
  display: grid;
  min-height: 280px;
  place-items: center;
  align-content: center;
  gap: 12px;
  padding: 52px 28px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 0, rgba(91, 91, 214, 0.11), transparent 42%),
    var(--fusion-paper);
  border: 1px dashed rgba(91, 91, 214, 0.28);
  border-radius: var(--fusion-radius);
}

.fusion-empty-state__label {
  margin: 0;
  color: var(--fusion-accent-strong);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.fusion-empty-state h3 {
  margin: 0;
  color: var(--fusion-ink);
  font-size: clamp(24px, 4vw, 34px);
  font-weight: 760;
  letter-spacing: -0.035em;
}

.fusion-empty-state > p:not(.fusion-empty-state__label) {
  max-width: 520px;
  margin: 0 0 10px;
  color: var(--fusion-muted);
  line-height: 1.8;
}

.traditional-pagination {
  margin-top: 32px;
}

/* Footer and utility controls */
.site-footer,
.site-footer.show {
  position: relative;
  right: auto;
  bottom: auto;
  left: auto;
  width: calc(100% - 48px);
  max-width: 1070px;
  margin: 88px auto 24px;
  padding: 26px 0;
  background: transparent;
  border-top: 1px solid var(--fusion-line);
  border-radius: 0;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.site-info {
  padding: 0;
}

.footer-content {
  align-items: center;
}

.site-footer p,
.theme-info a {
  color: var(--fusion-muted);
}

.theme-info {
  display: none;
}

#changskin,
.skin-menu {
  display: none !important;
}

.search_close {
  appearance: none;
  padding: 0;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.search-form--modal .text-input {
  border-bottom: 2px solid var(--fusion-line);
}

/* Inner pages receive the same rhythm without forcing the homepage layout. */
body:not(.home) .site-content {
  padding-top: 42px;
}

body:not(.home) .post,
body:not(.home) .page,
body:not(.home) .comments {
  border-radius: 22px;
}

/* Dark mode */
body.dark {
  --fusion-ink: #f1f2fb;
  --fusion-muted: #b7bacb;
  --fusion-subtle: #9296aa;
  --fusion-paper: #1e2030;
  --fusion-canvas: #151722;
  --fusion-line: #303346;
  --fusion-accent: #c8a157;
  --fusion-accent-strong: #dfbd78;
  --fusion-accent-soft: rgba(200, 161, 87, 0.14);
  --fusion-navy: #102f4b;
  --fusion-shadow: 0 28px 72px rgba(0, 0, 0, 0.3);
  --fusion-shadow-soft: 0 12px 36px rgba(0, 0, 0, 0.22);
  background: var(--fusion-canvas);
}

body.dark .site.wrapper,
body.dark .wrapper {
  background: var(--fusion-canvas) !important;
}

body.dark .site-header,
body.dark .site-header.bg,
body.dark .site-header:hover {
  background: rgba(21, 23, 34, 0.84) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

body.dark .site-title,
body.dark .nav-search-wrapper nav ul li a {
  color: var(--fusion-ink);
}

body.dark .fusion-hero {
  background:
    radial-gradient(circle at 12% 12%, rgba(200, 161, 87, 0.14), transparent 34%),
    linear-gradient(135deg, #1e2030 0%, #1a1c29 100%);
  border-color: var(--fusion-line);
}

body.dark .fusion-brand-shell {
  background: rgba(255, 252, 244, 0.94);
  border-color: rgba(200, 161, 87, 0.4);
}

body.dark .fusion-stat {
  background: rgba(30, 32, 48, 0.78);
  border-color: var(--fusion-line);
}

body.dark .post-list-thumb,
body.dark .post-list-thumb:hover {
  background: var(--fusion-paper);
  border-color: var(--fusion-line);
  box-shadow: var(--fusion-shadow-soft);
}

body.dark .post-date,
body.dark .post-meta {
  color: var(--fusion-subtle) !important;
  background: transparent;
  border: 0;
}

body.dark .site-footer {
  background: transparent !important;
  border-color: var(--fusion-line);
  box-shadow: none;
}

@media (max-width: 860px) {
  body.admin-bar .site-header {
    top: 46px;
  }

  .site-header {
    height: 58px;
    padding: 0 12px;
    background: rgba(245, 246, 251, 0.9);
    border-bottom-color: rgba(21, 23, 39, 0.07);
  }

  .site-branding {
    height: 58px;
  }

  .site-branding a,
  .site-title-logo,
  .site-branding img {
    height: auto;
  }

  .mo-nav-button,
  .mo-toc-button {
    min-width: 44px;
    min-height: 44px;
    justify-content: center;
    padding: 0;
    border-radius: 12px;
  }

  .mobile-nav,
  .mo_toc_panel {
    inset: 58px 0 auto;
  }

  .home .site-content {
    box-sizing: border-box;
    padding: 90px 18px 0;
  }

  .fusion-hero {
    box-sizing: border-box;
    grid-template-columns: 1fr;
    width: 100%;
    min-height: 0;
    gap: 48px;
    padding: 42px;
    border-radius: 28px;
  }

  .fusion-hero__visual {
    grid-template-columns: minmax(0, 1fr) minmax(150px, 0.8fr);
    min-width: 0;
    align-items: center;
    gap: 18px;
  }

  .fusion-stat-list {
    grid-template-columns: 1fr;
    margin: 0;
  }

  .home #primary {
    padding-top: 72px;
  }

  .home .post-list-thumb {
    grid-template-columns: minmax(220px, 0.78fr) minmax(0, 1.22fr);
    height: 310px;
    min-height: 310px;
  }

  .home .post-date {
    margin: 26px 120px 0 26px;
  }

  .home .post-meta {
    margin: 26px 26px 0 0;
  }

  .home .post-title {
    margin: 22px 26px 0;
  }

  .home .post-excerpt {
    margin: 18px 26px 26px;
  }
}

@media (max-width: 620px) {
  html {
    scroll-padding-top: 72px;
  }

  .fusion-hero {
    padding: 34px 22px;
  }

  .home .fusion-hero h1 {
    font-size: clamp(44px, 15vw, 62px);
    font-weight: 780 !important;
  }

  .fusion-hero__lead {
    margin-top: 22px;
    font-size: 16px;
    line-height: 1.75;
  }

  .fusion-hero__actions {
    margin-top: 28px;
  }

  .fusion-button {
    box-sizing: border-box;
    width: 100%;
  }

  .fusion-hero__visual {
    grid-template-columns: 1fr;
    width: calc(100vw - 80px);
    max-width: 100%;
    min-width: 0;
    margin-inline: auto;
  }

  .fusion-brand-shell {
    width: 100%;
    max-width: 100%;
    padding: 24px 18px;
  }

  .fusion-brand-shell img {
    max-width: 100%;
  }

  .fusion-stat-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .home h2.main-title,
  .home h1.main-title {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .home .post-list-thumb {
    display: grid !important;
    grid-template-columns: 1fr;
    grid-template-rows: 220px auto auto auto;
    height: auto;
    min-height: 0;
    border-radius: 22px;
  }

  .home .post-thumb,
  .home .post-thumb:hover {
    grid-column: 1;
    grid-row: 1;
  }

  .home .post-date {
    grid-column: 1;
    grid-row: 2;
    margin: 24px 130px 0 24px;
  }

  .home .post-meta {
    grid-column: 1;
    grid-row: 2;
    margin: 24px 24px 0 0;
  }

  .home .post-title {
    grid-column: 1;
    grid-row: 3;
    margin: 22px 24px 0;
  }

  .home .post-list-thumb .post-title h3,
  .home .post-list-thumb .post-title h3:hover {
    font-size: 25px;
  }

  .home .post-excerpt {
    grid-column: 1;
    grid-row: 4;
    margin: 16px 24px 26px;
  }

  .site-footer,
  .site-footer.show {
    width: calc(100% - 36px);
    margin-top: 64px;
  }

  .footer-content {
    justify-content: center;
    text-align: center;
  }
}

@media (max-width: 782px) {
  body.admin-bar .site-header {
    top: 46px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
