/* 科奉工作室 — public site */
:root {
  --bg: #f7f3ec;
  --bg-soft: #efe9df;
  --card: #fffdf9;
  --ink: #1f1b16;
  --ink-2: #4a433a;
  --muted: #8a8174;
  --line: #e2d9cb;
  --accent: #b8332a;
  --accent-ink: #fff6ec;
  --accent-soft: #f5e0da;
  --shadow: 0 1px 2px rgba(60, 40, 20, .04), 0 8px 24px rgba(60, 40, 20, .06);
  --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", "Cascadia Code", Consolas, Menlo, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #15130f; --bg-soft: #1d1a15; --card: #1f1c17; --ink: #efe8dc; --ink-2: #cfc6b8;
    --muted: #8f8676; --line: #34302a; --accent: #e0574b; --accent-ink: #1a0f0c; --accent-soft: #3a1f1b;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #15130f; --bg-soft: #1d1a15; --card: #1f1c17; --ink: #efe8dc; --ink-2: #cfc6b8;
  --muted: #8f8676; --line: #34302a; --accent: #e0574b; --accent-ink: #1a0f0c; --accent-soft: #3a1f1b;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.75 var(--sans); min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
img { max-width: 100%; height: auto; }
h1, h2, h3 { font-family: var(--serif); line-height: 1.35; letter-spacing: .01em; }
.muted { color: var(--muted); }
.center { text-align: center; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: 760px; margin: 0 auto; padding: 0 24px; }
.section { padding: 56px 24px 72px; }
.wrap.section, .wrap-narrow.section { padding-left: 24px; padding-right: 24px; }

/* seal mark */
.seal {
  display: inline-grid; place-items: center; width: 40px; height: 40px; flex: none;
  background: var(--accent); color: var(--accent-ink); border-radius: 6px;
  font: 700 13px/1.05 var(--serif); letter-spacing: .1em; writing-mode: vertical-rl;
  box-shadow: inset 0 0 0 2px var(--accent), inset 0 0 0 3.5px var(--accent-ink);
}
.seal-sm { width: 26px; height: 26px; font-size: 9px; border-radius: 4px; vertical-align: middle; margin-right: 8px;
  box-shadow: inset 0 0 0 1.5px var(--accent), inset 0 0 0 2.5px var(--accent-ink); }

/* header */
.site-header { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand:hover { color: inherit; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font: 700 18px/1.2 var(--serif); letter-spacing: .08em; }
.brand-text small { font-size: 10px; letter-spacing: .3em; color: var(--muted); }
.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a { padding: 6px 14px; border-radius: 999px; color: var(--ink-2); font-size: 15px; }
.site-nav a:hover { color: var(--ink); background: var(--bg-soft); }
.site-nav a.active { color: var(--accent); }
.theme-toggle { margin-left: 6px; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%;
  border: 1px solid var(--line); background: transparent; color: var(--ink-2); cursor: pointer; }
.theme-toggle:hover { color: var(--accent); border-color: var(--accent); }
.nav-toggle { display: none; width: 40px; height: 40px; border: 0; background: transparent; cursor: pointer; padding: 10px; }
.nav-toggle span { display: block; height: 2px; background: var(--ink); margin: 6px 0; transition: .2s; }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 10px 22px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink); font: 500 15px/1.4 var(--sans);
  cursor: pointer; transition: .15s; }
.btn:hover { border-color: var(--ink); color: var(--ink); }
.btn-primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn-primary:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* hero */
.hero { border-bottom: 1px solid var(--line);
  background: radial-gradient(1200px 400px at 85% -10%, var(--accent-soft), transparent 60%); }
.hero-inner { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: center; padding-top: 88px; padding-bottom: 88px; }
.eyebrow { margin: 0 0 12px; font-size: 12px; letter-spacing: .4em; color: var(--accent); font-weight: 600; }
.hero h1 { font-size: clamp(40px, 6vw, 64px); margin: 0; letter-spacing: .12em; }
.hero-tagline { font: 400 22px/1.6 var(--serif); color: var(--ink-2); margin: 12px 0 20px; }
.hero-intro { color: var(--ink-2); max-width: 34em; margin: 0 0 32px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-mark { display: flex; flex-direction: column; align-items: center; gap: 32px; }
.big-seal { display: flex; align-items: center; justify-content: center; gap: .08em; width: 168px; height: 168px;
  background: var(--accent); color: var(--accent-ink); border-radius: 18px; transform: rotate(-4deg);
  box-shadow: inset 0 0 0 8px var(--accent), inset 0 0 0 11px var(--accent-ink), var(--shadow);
  font: 700 52px/1 var(--serif); padding: 18px; }
.big-seal.small { width: 96px; height: 96px; font-size: 28px; border-radius: 12px; margin: 0 auto 24px;
  box-shadow: inset 0 0 0 5px var(--accent), inset 0 0 0 7px var(--accent-ink); padding: 10px; }
.hero-stats { display: flex; gap: 32px; margin: 0; }
.hero-stats div { text-align: center; }
.hero-stats dt { font-size: 12px; color: var(--muted); letter-spacing: .2em; }
.hero-stats dd { margin: 0; font: 600 26px/1.3 var(--serif); }

/* sections */
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 28px; }
.section-head h2 { margin: 0; font-size: 26px; }
.more { color: var(--muted); font-size: 14px; }
.page-head { margin-bottom: 36px; }
.page-head h1 { font-size: 36px; margin: 0 0 6px; }
.page-head p { margin: 0; }
.empty { padding: 56px 24px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 14px; }
.empty a { color: var(--accent); margin-left: 6px; }

/* post cards */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; }
.post-list { display: grid; gap: 20px; }
.post-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
  display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s; }
.post-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.post-cover { display: block; aspect-ratio: 16/9; overflow: hidden; background: var(--bg-soft); }
.post-cover img { width: 100%; height: 100%; object-fit: cover; }
.post-card-body { padding: 22px 24px 24px; display: flex; flex-direction: column; flex: 1; }
.post-card h3 { margin: 6px 0 8px; font-size: 20px; }
.post-card p { margin: 0 0 14px; color: var(--ink-2); font-size: 15px; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-list .post-card.has-cover { flex-direction: row; }
.post-list .post-card.has-cover .post-cover { width: 280px; flex: none; aspect-ratio: auto; }
.post-meta { display: flex; flex-wrap: wrap; gap: 6px; color: var(--muted); font-size: 13px; }
.post-meta a { color: var(--accent); }
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { display: inline-block; padding: 2px 10px; font-size: 12px; border-radius: 999px;
  background: var(--bg-soft); color: var(--ink-2); border: 1px solid var(--line); }
.tag:hover { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 10px; }
.tag-lg { font-size: 15px; padding: 6px 16px; }
.tag-lg small { color: var(--muted); margin-left: 4px; }

/* search & pager */
.search { display: flex; margin-top: 20px; max-width: 420px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--card); overflow: hidden; }
.search:focus-within { border-color: var(--ink-2); }
.search input { flex: 1; border: 0; background: transparent; padding: 10px 18px; font: inherit; color: var(--ink); outline: none; min-width: 0; }
.search button { border: 0; background: transparent; padding: 0 16px; color: var(--muted); cursor: pointer; }
.pager { display: flex; justify-content: space-between; align-items: center; margin-top: 40px; }
.pager a { color: var(--accent); }

/* article */
.article { padding-top: 56px; padding-bottom: 72px; }
.article-head { margin-bottom: 32px; }
.article-head h1 { font-size: clamp(28px, 4.5vw, 40px); margin: 14px 0 12px; }
.article-cover { width: 100%; border-radius: 14px; margin-bottom: 32px; }
.prose { font-size: 17px; line-height: 1.9; color: var(--ink); overflow-wrap: break-word; }
.prose h2 { font-size: 26px; margin: 2em 0 .6em; padding-bottom: .3em; border-bottom: 1px solid var(--line); }
.prose h3 { font-size: 21px; margin: 1.6em 0 .5em; }
.prose p { margin: 0 0 1.2em; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose img { border-radius: 10px; display: block; margin: 1.5em auto; }
.prose blockquote { margin: 1.5em 0; padding: 4px 20px; border-left: 3px solid var(--accent); color: var(--ink-2); background: var(--bg-soft); border-radius: 0 8px 8px 0; }
.prose code { font-family: var(--mono); font-size: .88em; background: var(--bg-soft); padding: 2px 6px; border-radius: 4px; }
.prose pre { background: #1d1a15; color: #eae2d4; padding: 18px 20px; border-radius: 10px; overflow-x: auto; line-height: 1.6; }
.prose pre code { background: none; padding: 0; color: inherit; }
.prose table { border-collapse: collapse; width: 100%; margin: 1.5em 0; font-size: 15px; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--line); padding: 8px 12px; text-align: left; }
.prose th { background: var(--bg-soft); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.5em 0; }
.prose ul, .prose ol { padding-left: 1.5em; }
.article-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--line); }
.article-nav a { display: flex; flex-direction: column; padding: 14px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.article-nav a.right { text-align: right; grid-column: 2; }
.article-nav small { color: var(--muted); font-size: 12px; }

/* archive */
.archive-year h2 { font-size: 22px; color: var(--accent); margin: 32px 0 8px; }
.archive-year ul { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.archive-year li { display: flex; gap: 18px; padding: 10px 0 10px 20px; position: relative; }
.archive-year li::before { content: ""; position: absolute; left: -4px; top: 21px; width: 7px; height: 7px; border-radius: 50%; background: var(--line); }
.archive-year li:hover::before { background: var(--accent); }
.archive-year time { color: var(--muted); font-family: var(--mono); font-size: 14px; flex: none; padding-top: 2px; }

/* notices & forms */
.notice { padding: 12px 18px; border-radius: 10px; margin-bottom: 24px; background: var(--bg-soft); border: 1px solid var(--line); }
.notice-ok { background: #e6f2e6; border-color: #bfdcbf; color: #285c28; }
.notice-err { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
:root[data-theme="dark"] .notice-ok { background: #1b2b1b; border-color: #2d4a2d; color: #a6d6a6; }
.contact-form { display: grid; gap: 18px; }
.contact-form label { display: grid; gap: 6px; font-size: 14px; color: var(--ink-2); }
.contact-form input, .contact-form textarea { font: inherit; color: var(--ink); background: var(--card); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 14px; outline: none; width: 100%; }
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--ink-2); }
.contact-form .btn { justify-self: start; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.req { color: var(--accent); }
.hp { position: absolute; left: -9999px; }

/* footer */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0; font-size: 14px; color: var(--ink-2); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.footer-links { display: flex; gap: 20px; }

/* responsive */
@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; padding-top: 56px; padding-bottom: 56px; }
  .hero-mark { flex-direction: row; justify-content: space-between; }
  .big-seal { width: 112px; height: 112px; font-size: 34px; padding: 12px; }
  .post-list .post-card.has-cover { flex-direction: column; }
  .post-list .post-card.has-cover .post-cover { width: 100%; aspect-ratio: 16/9; }
}
@media (max-width: 680px) {
  .wrap, .wrap-narrow, .wrap.section, .wrap-narrow.section { padding-left: 16px; padding-right: 16px; }
  .nav-toggle { display: block; }
  .site-nav { position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch;
    background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px 16px 16px; display: none; }
  .nav-open .site-nav { display: flex; }
  .site-nav a { padding: 12px; border-radius: 8px; }
  .theme-toggle { align-self: flex-start; margin: 8px 0 0 12px; }
  .post-grid { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .hero-stats { gap: 20px; }
  .article-nav { grid-template-columns: 1fr; }
  .article-nav a.right { grid-column: 1; }
}
