/*
 * miniCG Mimo-inspired Typecho Theme
 */
:root {
  --bg: #f8f5f2;
  --bg-soft: #fbf8f5;
  --text: #080706;
  --muted: #7d7771;
  --faint: #d9d3cd;
  --line: #2a2825;
  --line-soft: rgba(8, 7, 6, .16);
  --accent: #160905;
  --max: 1120px;
  --article: 820px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  letter-spacing: 0;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
a:hover { color: #8c2d12; }
img { max-width: 100%; height: auto; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 0 32px;
  background: rgba(248, 245, 242, .92);
  border-bottom: 1px solid var(--line-soft);
  backdrop-filter: blur(18px);
}
.brand { display: inline-flex; flex-direction: column; justify-content: center; min-width: 150px; }
.brand-main { font-weight: 900; font-size: 24px; line-height: 1; letter-spacing: 0; }
.brand-sub { margin-top: 6px; color: var(--muted); font-family: Georgia, "Times New Roman", serif; font-size: 10px; font-style: italic; line-height: 1; text-transform: uppercase; }
.site-nav { display: flex; align-items: center; gap: 28px; font-weight: 700; font-size: 14px; white-space: nowrap; }
.site-nav a { position: relative; padding: 21px 0; }
.site-nav a.active::after,
.site-nav a:hover::after { content: ""; position: absolute; left: 0; right: 0; bottom: 16px; height: 2px; background: currentColor; }

.site-main { min-height: calc(100vh - 62px); }
.hero-section {
  position: relative;
  min-height: 590px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.hero-pattern {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: repeat(10, 1fr);
  opacity: .055;
  color: #000;
  font-size: clamp(58px, 9vw, 132px);
  font-weight: 900;
  line-height: 1;
  user-select: none;
  white-space: nowrap;
  transform: translateX(-2vw);
}
.hero-pattern span { display: block; letter-spacing: .19em; }
.hero-inner { position: relative; z-index: 1; max-width: var(--max); width: 100%; padding: 84px 32px 96px; text-align: center; }
.hero-inner h1 { margin: 0; font-size: clamp(54px, 10vw, 118px); line-height: .98; font-weight: 950; letter-spacing: 0; }
.hero-inner p { margin: 28px auto 0; max-width: 620px; color: var(--muted); font-family: Georgia, "Times New Roman", serif; font-size: clamp(17px, 2vw, 23px); font-style: italic; line-height: 1.45; }

.archive-hero { max-width: var(--max); margin: 0 auto; padding: 108px 32px 76px; border-bottom: 1px solid var(--line); }
.archive-hero .eyebrow { margin: 0 0 14px; color: var(--muted); font-size: 13px; font-weight: 800; text-transform: uppercase; }
.archive-hero h1 { margin: 0; font-size: clamp(42px, 7vw, 88px); line-height: 1.05; font-weight: 950; }

.blog-section { max-width: var(--max); margin: 0 auto; padding: 84px 0 112px; }
.section-title-row { padding: 0 32px 72px; }
.section-title-row h2 { margin: 0; font-size: clamp(52px, 8vw, 86px); line-height: 1; font-weight: 950; }
.post-list { border-top: 1px solid var(--line); }
.post-row { margin: 0; border-bottom: 1px solid var(--line); }
.post-row-link { display: grid; grid-template-columns: 118px 1fr 118px; min-height: 148px; align-items: center; color: var(--text); }
.post-number { display: flex; align-items: center; justify-content: center; align-self: stretch; border-right: 1px solid var(--line); color: #aaa39d; font-size: 24px; font-weight: 500; font-variant-numeric: tabular-nums; }
.post-summary { display: flex; flex-direction: column; justify-content: center; gap: 8px; padding: 30px 48px; }
.post-title { display: block; font-family: Georgia, "Times New Roman", "Songti SC", serif; font-size: clamp(25px, 3vw, 34px); line-height: 1.25; font-weight: 700; }
.post-excerpt { display: block; max-width: 720px; color: var(--muted); font-size: 15px; line-height: 1.7; }
.post-excerpt p { margin: 0; }
.post-meta { color: #9b938c; font-size: 13px; font-weight: 650; }
.post-arrow { display: flex; align-items: center; justify-content: center; align-self: stretch; border-left: 1px solid var(--line); font-size: 34px; transition: transform .2s ease; }
.post-row-link:hover .post-arrow { transform: translateX(8px); }
.post-row-link:hover { background: rgba(255, 255, 255, .38); color: var(--text); }
.empty-state { padding: 64px 32px; border-bottom: 1px solid var(--line); }
.pagination-wrap { padding: 32px; }
.page-navigator { display: flex; gap: 10px; padding: 0; margin: 0; list-style: none; }
.page-navigator a,
.page-navigator span { display: inline-flex; min-width: 42px; height: 42px; align-items: center; justify-content: center; border: 1px solid var(--line-soft); border-radius: 999px; padding: 0 15px; font-weight: 750; }
.page-navigator .current a,
.page-navigator a:hover { background: var(--text); color: var(--bg); }

.article-page { max-width: var(--article); margin: 0 auto; padding: 92px 32px 110px; }
.article-hero { text-align: center; padding: 26px 0 70px; }
.article-hero time { display: block; color: var(--muted); font-size: 14px; font-weight: 750; margin-bottom: 34px; }
.article-hero h1 { max-width: 980px; margin: 0 auto; font-size: clamp(36px, 6vw, 58px); line-height: 1.18; font-weight: 950; letter-spacing: 0; }
.article-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 30px; }
.article-actions a,
.article-actions span { display: inline-flex; align-items: center; min-height: 42px; padding: 0 22px; /*border: 1px solid var(--line-soft);*/ border-radius: 999px; background: rgba(255, 255, 255, .4); font-size: 14px; font-weight: 780; }
.article-actions a:first-child { background: var(--accent); color: var(--bg); border-color: var(--accent); }
.article-content { font-family: Georgia, "Times New Roman", "Songti SC", serif; font-size: 19px; line-height: 1.95; color: #181513; }
.article-content > *:first-child { margin-top: 0; }
.article-content p { margin: 0 0 1.3em; }
.article-content h2 { margin: 2.2em 0 .7em; font-family: inherit; font-size: clamp(28px, 4vw, 38px); line-height: 1.25; font-weight: 850; }
.article-content h3 { margin: 2em 0 .65em; font-size: 24px; line-height: 1.35; }
.article-content ul,
.article-content ol { padding-left: 1.3em; margin: 0 0 1.4em; }
.article-content blockquote { margin: 2em 0; padding: 2px 0 2px 28px; border-left: 3px solid var(--line); color: #4c4540; }
.article-content pre { overflow: auto; padding: 22px; border: 1px solid var(--line-soft); border-radius: 6px; background: #fffdfa; font-size: 14px; line-height: 1.65; }
.article-content code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em; }
.article-content img { display: block; margin: 42px auto; border-radius: 4px; }
.post-neighbor { display: grid; gap: 12px; margin: 58px 0 44px; padding-top: 28px; border-top: 1px solid var(--line-soft); color: var(--muted); font-weight: 700; }
.post-neighbor a { color: var(--text); }

#comments { margin-top: 52px; padding-top: 36px; border-top: 1px solid var(--line-soft); }
#comments h3 { margin: 0 0 20px; font-size: 24px; line-height: 1.3; }
.comment-list,
.comment-list ol { list-style: none; margin: 0; padding: 0; }
.comment-body { margin: 0 0 18px; padding: 22px; border: 1px solid var(--line-soft); background: rgba(255,255,255,.34); }
.comment-author { font-weight: 800; }
.comment-meta { color: var(--muted); font-size: 13px; }
.respond { margin-top: 34px; }
.respond input,
.respond textarea { width: 100%; border: 1px solid var(--line-soft); border-radius: 4px; background: #fffdfa; padding: 12px 14px; font: inherit; }
.respond textarea { min-height: 150px; }
.respond button,
.submit { border: 0; border-radius: 999px; background: var(--text); color: var(--bg); padding: 12px 24px; font-weight: 800; cursor: pointer; }

.site-footer { border-top: 1px solid var(--line); padding: 48px 32px 56px; text-align: center; color: var(--muted); }
.footer-mark { color: var(--text); font-size: 20px; font-weight: 900; margin-bottom: 12px; }
.footer-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 18px; font-size: 14px; }
.footer-meta a { text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 760px) {
  .site-header { min-height: auto; align-items: flex-start; padding: 18px 18px 12px; flex-direction: column; gap: 10px; }
  .brand-main { font-size: 22px; }
  .site-nav { width: 100%; gap: 18px; overflow-x: auto; padding-bottom: 2px; font-size: 13px; }
  .site-nav a { padding: 8px 0 10px; }
  .site-nav a.active::after,
  .site-nav a:hover::after { bottom: 4px; }
  .hero-section { min-height: 500px; }
  .hero-pattern { font-size: 58px; grid-template-rows: repeat(12, 1fr); }
  .hero-inner { padding: 78px 20px 88px; }
  .hero-inner h1 { font-size: clamp(46px, 17vw, 74px); }
  .blog-section { padding: 58px 0 84px; }
  .section-title-row { padding: 0 20px 42px; }
  .post-row-link { grid-template-columns: 64px 1fr 54px; min-height: 136px; }
  .post-number { font-size: 18px; }
  .post-summary { padding: 22px 18px; }
  .post-title { font-size: 22px; }
  .post-excerpt { display: none; }
  .post-meta { font-size: 12px; }
  .post-arrow { font-size: 25px; }
  .article-page { padding: 54px 20px 78px; }
  .article-hero { padding-bottom: 42px; }
  .article-hero h1 { font-size: clamp(31px, 10vw, 44px); }
  .article-content { font-size: 17px; line-height: 1.9; }
  .article-actions { align-items: center; }
}


/* v2 refinement after multi-post testing */
.site-header {
  min-height: 66px;
  padding-inline: clamp(22px, 3vw, 42px);
}
.brand-main { letter-spacing: -.02em; }
.site-nav { gap: clamp(18px, 3vw, 34px); }
.hero-section { min-height: clamp(560px, 74vh, 720px); }
.hero-inner { padding-top: clamp(92px, 13vh, 150px); padding-bottom: clamp(92px, 13vh, 150px); }
.hero-inner h1 {
  max-width: 1100px;
  margin-inline: auto;
  text-wrap: balance;
}
.hero-pattern {
  opacity: .052;
  transform: translateX(-4vw);
}
.blog-section { padding-top: clamp(70px, 9vw, 112px); }
.section-title-row { padding-bottom: clamp(52px, 7vw, 84px); }
.post-row-link {
  min-height: 164px;
  grid-template-columns: clamp(78px, 10vw, 118px) minmax(0, 1fr) clamp(72px, 10vw, 118px);
}
.post-summary { min-width: 0; }
.post-title {
  letter-spacing: -.01em;
  overflow-wrap: anywhere;
  text-wrap: balance;
}
.post-excerpt {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.post-meta { letter-spacing: .02em; }
.post-arrow {
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 500;
}
.post-row-link:focus-visible {
  outline: 3px solid rgba(140, 45, 18, .35);
  outline-offset: -3px;
}
.article-page { max-width: 880px; }
.article-hero { padding-top: clamp(42px, 7vw, 86px); }
.article-hero h1 { max-width: 980px; text-wrap: balance; }
.article-content {
  max-width: 760px;
  margin-inline: auto;
}
.article-content a {
  color: #8c2d12;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
.article-content hr {
  border: 0;
  border-top: 1px solid var(--line-soft);
  margin: 48px 0;
}
.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 32px 0;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 15px;
}
.article-content th,
.article-content td {
  border-bottom: 1px solid var(--line-soft);
  padding: 12px 10px;
  text-align: left;
}
.article-content th { font-weight: 850; }
.article-content pre {
  max-width: 100%;
  box-shadow: inset 0 0 0 1px rgba(8, 7, 6, .03);
}
.post-neighbor,
#comments { max-width: 760px; margin-left: auto; margin-right: auto; }
.comment-body {
  border-radius: 0;
  box-shadow: none;
}
.comment-body img.avatar { border-radius: 4px; }
.respond p { margin: 0 0 18px; }
.respond label { display: block; margin-bottom: 8px; color: var(--muted); font-size: 14px; font-weight: 750; }
.respond input:focus,
.respond textarea:focus {
  border-color: var(--line);
  outline: 3px solid rgba(140, 45, 18, .12);
}
@media (min-width: 761px) {
  .site-header { flex-direction: row; }
  .brand-sub { display: block; }
}
@media (max-width: 760px) {
  .hero-section { min-height: 500px; }
  .hero-inner h1 { max-width: 94vw; }
  .post-row-link { grid-template-columns: 58px minmax(0, 1fr) 54px; }
  .post-summary { gap: 7px; padding: 22px 16px; }
  .post-title { font-size: clamp(20px, 6vw, 25px); }
  .article-actions a,
  .article-actions span { min-height: 40px; padding-inline: 18px; }
  .comment-body { padding: 18px; }
}

/* v5 staggered hero inverse cursor */
.hero-section {
  isolation: isolate;
}
.hero-cursor {
  position: fixed;
  left: 0;
  top: 0;
  width: var(--hero-cursor-size, 236px);
  height: var(--hero-cursor-size, 236px);
  border-radius: 50%;
  background: #fff;
  mix-blend-mode: difference;
  pointer-events: none;
  z-index: 15;
  opacity: 0;
  transform: translate3d(-50%, -50%, 0) scale(.9);
  transition: opacity .16s ease, transform .16s ease;
  will-change: left, top, transform, opacity;
}
.hero-cursor.is-active {
  opacity: 1;
  transform: translate3d(-50%, -50%, 0) scale(1);
}
.hero-cursor--lead {
  z-index: 17;
}
.hero-cursor--trail-one {
  z-index: 16;
  opacity: 0;
}
.hero-cursor--trail-two {
  z-index: 15;
  opacity: 0;
}
.hero-cursor--trail-one.is-active {
  opacity: .68;
}
.hero-cursor--trail-two.is-active {
  opacity: .42;
}
.hero-section.hero-cursor-active {
  cursor: none;
}
@media (max-width: 760px), (pointer: coarse), (prefers-reduced-motion: reduce) {
  .hero-cursor { display: none; }
  .hero-section.hero-cursor-active { cursor: auto; }
}

/* v3 mobile title wrapping fix */
@media (max-width: 760px) {
  .hero-inner {
    width: 100%;
    padding-left: 20px;
    padding-right: 20px;
    text-align: center;
    overflow: hidden;
  }
  .hero-inner h1 {
    max-width: 100%;
    font-size: clamp(40px, 13vw, 54px);
    line-height: 1.05;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
  .hero-inner p {
    max-width: 100%;
    font-size: 16px;
  }
  .article-hero h1 {
    max-width: 100%;
    font-size: clamp(30px, 8.6vw, 38px);
    line-height: 1.22;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
  .article-page {
    width: 100%;
    overflow: hidden;
  }
  .article-content,
  .post-neighbor,
  #comments {
    max-width: 100%;
  }
  .article-content pre {
    white-space: pre;
    overflow-x: auto;
  }
}

.hero-section {
  isolation: isolate;
}
.hero-cursor {
  position: fixed;
  left: 0;
  top: 0;
  width: var(--hero-cursor-size, 236px);
  height: var(--hero-cursor-size, 236px);
  border-radius: 50%;
  background: #fff;
  mix-blend-mode: difference;
  pointer-events: none;
  z-index: 15;
  opacity: 0;
  transform: translate3d(-50%, -50%, 0) scale(.82);
  transition: opacity .18s ease, transform .18s ease;
  will-change: transform, opacity;
}
.hero-cursor.is-active {
  opacity: 1;
  transform: translate3d(-50%, -50%, 0) scale(1);
}
.hero-section.hero-cursor-active {
  cursor: none;
}
@media (max-width: 760px), (pointer: coarse), (prefers-reduced-motion: reduce) {
  .hero-cursor { display: none; }
  .hero-section.hero-cursor-active { cursor: auto; }
}


/* v4 pinned app showcase */
.app-showcase {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: var(--max);
  margin: clamp(-104px, -7.5vw, -58px) auto 0;
  border: 1px solid var(--text);
  background: color-mix(in srgb, var(--bg) 88%, white 12%);
}
.app-card {
  position: relative;
  min-height: clamp(214px, 19vw, 252px);
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 48px;
  align-items: stretch;
  color: var(--text);
  text-decoration: none;
  border-right: 1px solid var(--text);
  overflow: hidden;
  transition: color .28s ease, background-color .28s ease;
}
.app-card:last-child { border-right: 0; }
.app-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--text);
  transform: translateY(101%);
  transition: transform .34s cubic-bezier(.2, .8, .2, 1);
  z-index: 0;
}
.app-card > * { position: relative; z-index: 1; }
.app-card-index {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 31px;
  font-size: 14px;
  font-weight: 850;
  letter-spacing: 0;
}
.app-card-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 42px;
  padding: 29px clamp(22px, 3vw, 36px) 30px;
}
.app-card-body strong {
  display: block;
  max-width: 11.5em;
  font-size: clamp(24px, 2.25vw, 34px);
  line-height: 1.03;
  font-weight: 930;
  letter-spacing: 0;
  text-wrap: balance;
}
.app-card-body em {
  display: block;
  max-width: 24em;
  color: var(--muted);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(14px, 1.25vw, 17px);
  font-style: italic;
  line-height: 1.45;
  transition: color .28s ease, transform .28s ease;
}
.app-card-arrow {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 26px;
  font-size: 29px;
  line-height: 1;
  transition: transform .28s ease;
}
.app-card:hover,
.app-card:focus-visible {
  color: var(--bg);
  outline: 0;
}
.app-card:hover::before,
.app-card:focus-visible::before {
  transform: translateY(0);
}
.app-card:hover .app-card-body em,
.app-card:focus-visible .app-card-body em {
  color: color-mix(in srgb, var(--bg) 72%, transparent);
  transform: translateY(-3px);
}
.app-card:hover .app-card-arrow,
.app-card:focus-visible .app-card-arrow {
  transform: translate(5px, -5px);
}
.blog-section {
  padding-top: clamp(78px, 9vw, 120px);
}
@media (max-width: 900px) {
  .app-showcase {
    grid-template-columns: 1fr;
    margin: -56px 20px 0;
    border-left: 1px solid var(--text);
    border-right: 1px solid var(--text);
  }
  .app-card {
    min-height: 178px;
    border-right: 0;
    border-bottom: 1px solid var(--text);
    grid-template-columns: 52px minmax(0, 1fr) 48px;
  }
  .app-card:last-child { border-bottom: 0; }
  .app-card-body { gap: 24px; padding: 25px 22px 24px; }
  .app-card-body strong { max-width: 100%; font-size: clamp(24px, 7vw, 34px); }
  .blog-section { padding-top: 62px; }
}
@media (max-width: 520px) {
  .app-showcase { margin-left: 16px; margin-right: 16px; }
  .app-card { grid-template-columns: 44px minmax(0, 1fr) 42px; min-height: 190px; }
  .app-card-index { padding-top: 24px; font-size: 12px; }
  .app-card-body { gap: 18px; padding: 24px 18px; }
  .app-card-body em { font-size: 14px; }
  .app-card-arrow { padding-top: 21px; font-size: 24px; }
}


/* v5 blog list frame and invert hover */
.post-list {
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
}
.post-row-link {
  position: relative;
  overflow: hidden;
  transition: color .28s ease, background-color .28s ease;
}
.post-row-link::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--text);
  transform: translateY(101%);
  transition: transform .34s cubic-bezier(.2, .8, .2, 1);
  z-index: 0;
}
.post-row-link > * {
  position: relative;
  z-index: 1;
}
.post-row-link:hover,
.post-row-link:focus-visible {
  color: var(--bg);
  background: transparent;
}
.post-row-link:hover::before,
.post-row-link:focus-visible::before {
  transform: translateY(0);
}
.post-row-link:hover .post-number,
.post-row-link:focus-visible .post-number,
.post-row-link:hover .post-excerpt,
.post-row-link:focus-visible .post-excerpt,
.post-row-link:hover .post-meta,
.post-row-link:focus-visible .post-meta {
  color: color-mix(in srgb, var(--bg) 72%, transparent);
}
.post-row-link:hover .post-arrow,
.post-row-link:focus-visible .post-arrow {
  transform: translateX(8px);
}
@media (max-width: 760px) {
  .post-list {
    border-left: 0;
    border-right: 0;
  }
}
