/* Warm editorial layer for the FixIt theme. */
:root {
  --blog-bg: #f7f4ee;
  --blog-surface: rgba(255, 255, 255, .78);
  --blog-text: #20231f;
  --blog-muted: #6e746b;
  --blog-line: rgba(32, 35, 31, .12);
  --blog-accent: #d45b32;
  --blog-accent-soft: #f3d9cc;
  --blog-shadow: 0 18px 45px rgba(46, 40, 31, .09);
  --blog-radius: 1.25rem;
}

[data-scheme='dark'], [data-theme='dark'] {
  --blog-bg: #121512;
  --blog-surface: rgba(29, 34, 29, .8);
  --blog-text: #eff1e9;
  --blog-muted: #aeb5aa;
  --blog-line: rgba(239, 241, 233, .13);
  --blog-accent: #ff9368;
  --blog-accent-soft: rgba(212, 91, 50, .18);
  --blog-shadow: 0 20px 48px rgba(0, 0, 0, .28);
}

html { scroll-behavior: smooth; }
body {
  color: var(--blog-text);
  font-family: "LXGW WenKai", "Noto Serif SC", "Songti SC", Georgia, serif;
  font-size: 17px;
  line-height: 1.78;
  background: radial-gradient(circle at 12% 0%, var(--blog-accent-soft), transparent 27rem), var(--blog-bg);
}
body::selection { background: var(--blog-accent); color: #fff; }

#header-desktop, #header-mobile {
  background: color-mix(in srgb, var(--blog-bg) 82%, transparent);
  border-bottom: 1px solid var(--blog-line);
  backdrop-filter: blur(18px);
}
#header-desktop .header-title, #header-mobile .header-title { font-family: "LXGW WenKai", "Noto Serif SC", serif; letter-spacing: .04em; }
#header-desktop .menu-item a, #header-mobile .menu-item a { border-radius: 999px; transition: color .22s ease, background-color .22s ease, transform .22s ease; }
#header-desktop .menu-item a:hover, #header-mobile .menu-item a:hover { background: var(--blog-accent-soft); color: var(--blog-accent); transform: translateY(-1px); }

.home.posts, .page.archive, .page.single { max-width: 52rem; }
.home .home-profile {
  position: relative;
  overflow: hidden;
  margin: 2rem 0 2.6rem;
  padding: 3.3rem 1.5rem 2.6rem;
  text-align: center;
  border: 1px solid var(--blog-line);
  border-radius: calc(var(--blog-radius) + .5rem);
  background: linear-gradient(135deg, var(--blog-surface), color-mix(in srgb, var(--blog-surface) 55%, var(--blog-accent-soft)));
  box-shadow: var(--blog-shadow);
}
.home .home-profile::before {
  content: "TECH · NOTES · IDEAS";
  position: absolute;
  top: 1rem;
  left: 50%;
  color: var(--blog-accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .69rem;
  font-weight: 700;
  letter-spacing: .22em;
  transform: translateX(-50%);
  white-space: nowrap;
}
.home .home-profile .home-avatar { padding: 0; }
.home .home-profile .home-avatar img {
  width: 7.3rem;
  height: 7.3rem;
  object-fit: cover;
  border: 5px solid var(--blog-surface);
  box-shadow: 0 12px 26px rgba(0, 0, 0, .16);
  transition: transform .32s ease, box-shadow .32s ease;
}
.home .home-profile .home-avatar img:hover { transform: translateY(-.45rem) rotate(-3deg); box-shadow: 0 18px 32px rgba(0, 0, 0, .2); }
.home .home-profile .home-title { margin-top: .8rem; font-size: clamp(1.75rem, 4vw, 2.65rem); letter-spacing: .08em; }
.home .home-profile .home-subtitle { color: var(--blog-muted); font-size: 1.06rem; }
.home .home-profile .links { padding-top: .85rem; }
.home .home-profile .links a { color: var(--blog-muted); transition: color .2s ease, transform .2s ease; }
.home .home-profile .links a:hover { color: var(--blog-accent); transform: translateY(-2px); }

.home.posts .summary {
  display: grid;
  grid-template-columns: minmax(11rem, 15rem) 1fr;
  column-gap: 1.35rem;
  align-items: center;
  margin: 1rem 0;
  padding: 1rem;
  border: 1px solid var(--blog-line);
  border-radius: var(--blog-radius);
  background: var(--blog-surface);
  box-shadow: 0 4px 18px rgba(46, 40, 31, .035);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.home.posts .summary:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--blog-accent) 45%, var(--blog-line)); box-shadow: var(--blog-shadow); }
.home.posts .summary .featured-image-preview { grid-row: 1 / span 4; width: 100%; height: 100%; min-height: 9rem; margin: 0; padding: 0; border-radius: calc(var(--blog-radius) - .35rem); overflow: hidden; }
.home.posts .summary .featured-image-preview img { transition: transform .45s ease; }
.home.posts .summary:hover .featured-image-preview img { transform: scale(1.055); }
.home.posts .summary .single-title { margin: 0 0 .4rem; font-size: 1.26rem; line-height: 1.45; }
.home.posts .summary .single-title a, .archive-item-link { color: var(--blog-text); }
.home.posts .summary .single-title a:hover, .archive-item-link:hover { color: var(--blog-accent) !important; }
.home.posts .summary .post-meta, .home.posts .summary .content { color: var(--blog-muted); }
.home.posts .summary .content { margin-top: .4rem; font-size: .94rem; line-height: 1.65; }

.page.archive .header { margin: 2.5rem 0 1.4rem; padding-bottom: 1rem; border-bottom: 2px solid var(--blog-text); }
.page.archive .group-title { margin: 2rem 0 .75rem; color: var(--blog-accent); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .84rem; letter-spacing: .14em; }
.page.archive .archive-item { gap: .9rem; margin: .55rem 0; padding: .68rem; border: 1px solid transparent; border-radius: .9rem; transition: background-color .2s ease, border-color .2s ease, transform .2s ease; }
.page.archive .archive-item:hover { background: var(--blog-surface); border-color: var(--blog-line); transform: translateX(.25rem); }
.archive-item-cover { width: 104px; height: 62px; border-radius: .62rem; box-shadow: 0 4px 12px rgba(0, 0, 0, .1); }
.archive-item-cover-img { transition: transform .3s ease; }
.archive-item:hover .archive-item-cover-img { transform: scale(1.06); }
.archive-item-link { font-size: 1rem; font-weight: 600; }
.archive-item-date { color: var(--blog-muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .8rem; }

.page.single { margin-top: 2rem; padding: clamp(1.25rem, 4vw, 3rem); border: 1px solid var(--blog-line); border-radius: calc(var(--blog-radius) + .25rem); background: var(--blog-surface); box-shadow: var(--blog-shadow); }
.page.single .single-title { font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.25; letter-spacing: -.025em; }
.page.single .post-meta { margin: .9rem 0 1.6rem; color: var(--blog-muted); }
.page.single .featured-image { overflow: hidden; margin: 1.5rem 0 2rem; border-radius: 1rem; box-shadow: 0 14px 30px rgba(0, 0, 0, .14); }
.page.single .featured-image img { transition: transform .45s ease; }
.page.single .featured-image:hover img { transform: scale(1.018); }
.page.single .content { font-size: 1.07rem; }
.page.single .content h2 { margin-top: 2.5rem; padding-bottom: .45rem; border-bottom: 1px solid var(--blog-line); font-size: 1.65rem; }
.page.single .content h3 { margin-top: 2rem; color: var(--blog-accent); }
.page.single .content a { color: var(--blog-accent); text-decoration-thickness: 1px; text-underline-offset: .18em; }
.page.single .content blockquote { margin: 1.5rem 0; padding: .7rem 1rem; border-left: 3px solid var(--blog-accent); border-radius: 0 .7rem .7rem 0; background: var(--blog-accent-soft); color: var(--blog-text); }
.page.single .content code { border-radius: .35rem; }

@media (max-width: 680px) {
  body { font-size: 16px; }
  .home .home-profile { margin: 1rem 0 1.8rem; padding: 3rem 1rem 2rem; }
  .home.posts .summary { display: block; padding: .75rem; }
  .home.posts .summary .featured-image-preview { min-height: 10.5rem; margin-bottom: .85rem; }
  .page.single { margin-top: .8rem; padding: 1.15rem; border-radius: 0; border-inline: 0; }
  .archive-item-cover { width: 76px; height: 50px; }
  .archive-item-link { font-size: .91rem; }
}

/* Stack-specific composition */
.main-container { max-width: 1240px; }
.left-sidebar {
  padding: 2rem 1.35rem;
  background: color-mix(in srgb, var(--blog-surface) 72%, transparent);
  border-right: 1px solid var(--blog-line);
}
.site-avatar .site-logo { border: 4px solid var(--blog-surface); box-shadow: 0 12px 24px rgba(0,0,0,.15); transition: transform .3s ease; }
.site-avatar .site-logo:hover { transform: rotate(-4deg) scale(1.04); }
.site-name a { font-family: "LXGW WenKai", "Noto Serif SC", serif; letter-spacing: .04em; }
.site-description { color: var(--blog-muted); }
.main-container .main-full-width, .main-container main { min-width: 0; }
.article-list { gap: 1.2rem; }
.article-list > article, .article-list--compact > article {
  overflow: hidden;
  border: 1px solid var(--blog-line);
  border-radius: var(--blog-radius);
  background: var(--blog-surface);
  box-shadow: 0 4px 18px rgba(46, 40, 31, .035);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.article-list > article:hover, .article-list--compact > article:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--blog-accent) 45%, var(--blog-line)); box-shadow: var(--blog-shadow); }
.article-list > article .article-header { padding: 1rem; }
.article-list > article .article-image { overflow: hidden; border-radius: calc(var(--blog-radius) - .35rem); }
.article-list > article .article-image img { transition: transform .45s ease; }
.article-list > article:hover .article-image img { transform: scale(1.045); }
.article-title a { color: var(--blog-text); }
.article-title a:hover { color: var(--blog-accent); }
.article-meta, .article-description { color: var(--blog-muted); }
.right-sidebar .widget { border: 1px solid var(--blog-line); border-radius: var(--blog-radius); background: var(--blog-surface); box-shadow: 0 4px 18px rgba(46,40,31,.035); }
.tagCloud-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .45rem .55rem;
  padding-top: .2rem;
}
.tagCloud-tags a {
  display: inline-block;
  padding: .2rem .55rem;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--blog-muted);
  font-size: .9rem;
  line-height: 1.35;
  transition: color .2s ease, background-color .2s ease, border-color .2s ease, transform .2s ease;
}
.tagCloud-tags a:nth-child(4n + 1) { font-size: 1.15rem; color: var(--blog-text); }
.tagCloud-tags a:nth-child(4n + 2) { font-size: 1rem; }
.tagCloud-tags a:nth-child(4n + 3) { font-size: .82rem; }
.tagCloud-tags a:hover {
  border-color: var(--blog-line);
  background: var(--blog-accent-soft);
  color: var(--blog-accent);
  transform: translateY(-1px);
}
.terms-header { margin-bottom: 1.5rem; }
.terms-header .section-title { color: var(--blog-text); }
.terms-description { color: var(--blog-muted); margin: -.6rem 0 0; }
.terms-cloud {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .7rem .65rem;
  padding: clamp(1rem, 3vw, 2rem);
  border: 1px solid var(--blog-line);
  border-radius: var(--blog-radius);
  background: var(--blog-surface);
  box-shadow: var(--blog-shadow);
}
.terms-cloud.is-scattered { display: block; position: relative; overflow: hidden; }
.terms-cloud.is-scattered .term-chip { position: absolute; white-space: nowrap; }
.terms-cloud.tagcloud { min-height: 30rem; display: block; position: relative; overflow: hidden; }
.terms-cloud .tagcloud--item { color: var(--blog-text); font-weight: 600; text-decoration: none; transition: color .2s ease; }
.terms-cloud .tagcloud--item:hover { color: var(--blog-accent); }
.tagCloud-3d .tagcloud-widget-canvas { min-height: 15rem; position: relative; overflow: hidden; }
.tagCloud-3d .tagcloud--item { color: var(--blog-text); text-decoration: none; font-weight: 600; transition: color .2s ease; }
.tagCloud-3d .tagcloud--item:hover { color: var(--blog-accent); }
.term-chip {
  display: inline-block;
  align-items: center;
  padding: .18rem .32rem;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--blog-muted);
  font-size: var(--term-size, .95rem);
  font-weight: 600;
  line-height: 1.3;
  transition: transform .2s ease, color .2s ease, background-color .2s ease, border-color .2s ease;
}
.term-chip:nth-child(3n + 1) { color: var(--blog-text); }
.term-chip:nth-child(3n + 2) { color: color-mix(in srgb, var(--blog-accent) 72%, var(--blog-text)); }
.term-chip:nth-child(5n + 3) { transform: rotate(-2deg); }
.term-chip:nth-child(7n + 4) { transform: rotate(1.5deg); }
.term-chip small { color: inherit; font-size: .58em; opacity: .62; font-weight: 500; }
.term-chip:hover { border-color: var(--blog-line); background: var(--blog-accent-soft); color: var(--blog-accent); transform: translateY(-2px); }
.main-article { border: 1px solid var(--blog-line); border-radius: calc(var(--blog-radius) + .25rem); background: var(--blog-surface); box-shadow: var(--blog-shadow); }
.main-article .article-header, .main-article .article-content, .main-article .article-footer { padding-inline: clamp(1rem, 4vw, 3rem); }
.main-article .article-image { overflow: hidden; border-radius: 1rem; }
.main-article .article-image img { transition: transform .45s ease; }
.main-article .article-image:hover img { transform: scale(1.018); }
.article-content { font-size: 1.15rem; line-height: 1.82; }
.article-content h2 { padding-bottom: .45rem; border-bottom: 1px solid var(--blog-line); }
.article-content blockquote { border-left-color: var(--blog-accent); background: var(--blog-accent-soft); border-radius: 0 .7rem .7rem 0; }
.footer-records { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: .2rem; color: var(--blog-muted); font-size: .82rem; }
.footer-records a { color: inherit; transition: color .2s ease; }
.footer-records a:hover { color: var(--blog-accent); }

/* Keep pagination compact instead of stretching each page across the article. */
.pagination {
  width: fit-content;
  max-width: 100%;
  margin: 2rem auto 0;
  border: 1px solid var(--blog-line);
  border-radius: .85rem;
  background: var(--blog-surface);
}
.pagination .page-link {
  flex: 0 0 2.8rem;
  min-width: 2.8rem;
  height: 2.8rem;
  padding: 0;
}
.pagination .page-link:first-child,
.pagination .page-link:last-child { flex-basis: 2.8rem; }
@media (max-width: 680px) {
  .pagination { max-width: calc(100vw - 2rem); overflow-x: auto; }
  .pagination .page-link { flex-basis: 2.5rem; min-width: 2.5rem; height: 2.5rem; }
}


/* Keep article tags and utility controls quiet in dark mode. */
.article-tags a,
.article-category a {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: .35rem .75rem;
  border: 1px solid var(--blog-line);
  border-radius: 999px;
  background: var(--blog-accent-soft);
  color: var(--blog-text);
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.article-tags a:hover,
.article-category a:hover {
  border-color: var(--blog-accent);
  background: var(--blog-accent);
  color: #fff;
}
[data-scheme='dark'] .article-tags a,
[data-scheme='dark'] .article-category a {
  background: rgba(255, 147, 104, .14) !important;
  color: #f3d9cc !important;
  border-color: rgba(255, 147, 104, .28) !important;
}
[data-scheme='dark'] #dark-mode-toggle {
  color: #d6ddd2;
}
[data-scheme='dark'] #dark-mode-toggle:hover {
  color: #ffb08d;
}

@media (max-width: 1023px) {
  .left-sidebar { border-right: 0; border-bottom: 1px solid var(--blog-line); }
}
