/* =================================================================
 *  InkStone_Scholar — Chinese Ink Wash Scholarly Theme
 *  CSS prefix: is-
 *  Palette: Rice paper (#faf6f0) → Ink black (#2c2416) → Seal red (#8b4513)
 * ================================================================= */
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@300;400;500;600;700;900&display=swap');

:root {
  --is-paper: #faf6f0; --is-aged: #f0ead8; --is-surface: #fdfaf5;
  --is-border: #d4c8b0; --is-border2: #e0d8c8;
  --is-ink: #2c2416; --is-ink2: #3d3320; --is-muted: #8c7b6a;
  --is-red: #8b2500; --is-red2: #a0522d; --is-jade: #4a6741;
  --is-font: 'Noto Serif SC', 'STSong', 'SimSun', 'Songti SC', serif;
  --is-font-sans: 'Noto Serif SC', system-ui, sans-serif;
  --is-radius: 4px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--is-font); background: var(--is-paper); color: var(--is-ink); line-height: 1.9; font-size: 16px; -webkit-font-smoothing: antialiased; background-image: radial-gradient(ellipse at 50% 0%, rgba(139,37,0,.02) 0%, transparent 60%); }

a { color: var(--is-red); text-decoration: none; transition: .2s; }
a:hover { color: var(--is-red2); text-decoration: underline; text-underline-offset: 3px; }
img { max-width: 100%; height: auto; }
h1,h2,h3,h4,h5,h6 { color: var(--is-ink); font-weight: 700; line-height: 1.4; }
blockquote { margin: 20px 0; padding: 16px 24px; border-left: 4px solid var(--is-red); background: rgba(139,37,0,.04); font-style: italic; color: var(--is-muted); }
code { font-family: 'Courier New', monospace; background: rgba(0,0,0,.04); padding: 2px 6px; font-size: .9em; }
pre { background: var(--is-aged); padding: 16px; border: 1px solid var(--is-border); overflow-x: auto; font-size: 14px; }

/* =================================================================
 *  LAYOUT
 * ================================================================= */
.is-wrap { width: min(100% - 48px, 1080px); margin: 0 auto; }
.is-main { min-height: 70vh; padding-top: 20px; padding-bottom: 40px; }

/* =================================================================
 *  HEADER — Brush scroll
 * ================================================================= */
.is-header { border-bottom: 2px solid var(--is-ink); background: var(--is-paper); position: sticky; top: 0; z-index: 100; }
.is-header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 60px; gap: 16px; }
.is-brand { display: flex; align-items: center; gap: 10px; }
.is-brand-icon { font-size: 26px; }
.is-brand-name { font-size: 22px; font-weight: 900; color: var(--is-ink); letter-spacing: .04em; }
.is-brand-name::after { content: ''; display: inline-block; width: 8px; height: 8px; background: var(--is-red); margin-left: 6px; }
.is-header-actions { display: flex; align-items: center; gap: 8px; }
.is-header-search { display: grid; grid-template-columns: 120px auto; }
.is-header-search input { height: 36px; border-radius: 0; border: 1px solid var(--is-border); border-right: none; background: var(--is-surface); padding: 0 12px; color: var(--is-ink); font-size: 14px; font-family: var(--is-font); outline: none; }
.is-header-search input:focus { border-color: var(--is-ink); }
.is-header-search button { height: 36px; border: 1px solid var(--is-border); border-radius: 0; background: var(--is-ink); color: var(--is-paper); padding: 0 14px; cursor: pointer; font-size: 14px; font-family: var(--is-font); transition: .2s; }
.is-header-search button:hover { background: var(--is-red); }
.is-menu-toggle { display: none; width: 36px; height: 36px; border: 1px solid var(--is-border); background: var(--is-paper); color: var(--is-ink); font-size: 18px; cursor: pointer; align-items: center; justify-content: center; }
.is-nav { display: flex; gap: 0; padding: 4px 0 10px; }
.is-nav a { display: inline-flex; align-items: center; padding: 8px 20px; color: var(--is-muted); font-size: 15px; font-weight: 500; border-bottom: 2px solid transparent; transition: .2s; }
.is-nav a:hover { color: var(--is-ink); border-bottom-color: var(--is-border); text-decoration: none; }
.is-nav a.active { color: var(--is-ink); border-bottom-color: var(--is-ink); font-weight: 700; }

/* =================================================================
 *  HERO — Ink scroll large
 * ================================================================= */
.is-hero { margin-bottom: 32px; border: 1px solid var(--is-border); background: var(--is-surface); position: relative; }
.is-hero-track { display: flex; transition: transform .5s ease; }
.is-hero-slide { min-width: 100%; flex-shrink: 0; display: flex; }
.is-hero-card { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
.is-hero-img { aspect-ratio: 4/3; overflow: hidden; background: var(--is-aged); }
.is-hero-img img { width: 100%; height: 100%; object-fit: cover; }
.is-hero-text { padding: 40px; display: flex; flex-direction: column; justify-content: center; }
.is-hero-seal { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border: 2px solid var(--is-red); color: var(--is-red); font-size: 12px; font-weight: 900; margin-bottom: 12px; }
.is-hero-text h1 { font-size: 30px; font-weight: 900; margin: 0 0 8px; line-height: 1.3; }
.is-hero-text h1 a { color: var(--is-ink); }
.is-hero-text h1 a:hover { color: var(--is-red); text-decoration: none; }
.is-hero-text p { color: var(--is-muted); font-size: 15px; margin: 0 0 16px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.is-hero-actions { display: flex; align-items: center; gap: 16px; }
.is-hero-label { font-size: 13px; color: var(--is-muted); }
.is-hero-prev,.is-hero-next { position: absolute; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border: 1px solid var(--is-border); background: var(--is-paper); color: var(--is-ink); font-size: 16px; cursor: pointer; z-index: 5; display: flex; align-items: center; justify-content: center; transition: .2s; opacity: 0; }
.is-hero:hover .is-hero-prev,.is-hero:hover .is-hero-next { opacity: 1; }
.is-hero-prev:hover,.is-hero-next:hover { background: var(--is-ink); color: var(--is-paper); border-color: var(--is-ink); }
.is-hero-prev { left: 12px; } .is-hero-next { right: 12px; }
.is-hero-dots { position: absolute; bottom: 16px; right: 16px; display: flex; gap: 6px; z-index: 5; }
.is-hero-dots span { width: 8px; height: 8px; border: 1px solid var(--is-border); background: var(--is-paper); cursor: pointer; transition: .2s; }
.is-hero-dots span.active,.is-hero-dots span:hover { background: var(--is-ink); border-color: var(--is-ink); }

/* =================================================================
 *  BUTTONS & BADGES
 * ================================================================= */
.is-btn { display: inline-flex; align-items: center; gap: 4px; padding: 8px 20px; border: 1px solid var(--is-border); font-family: var(--is-font); font-size: 14px; color: var(--is-muted); background: var(--is-paper); cursor: pointer; transition: .2s; }
.is-btn:hover { border-color: var(--is-ink); color: var(--is-ink); text-decoration: none; }
.is-btn-ink { background: var(--is-ink); color: var(--is-paper); border-color: var(--is-ink); }
.is-btn-ink:hover { background: var(--is-red); border-color: var(--is-red); color: var(--is-paper); }
.is-seal { display: inline-flex; align-items: center; justify-content: center; padding: 2px 8px; border: 1px solid var(--is-red); color: var(--is-red); font-size: 11px; font-weight: 700; }

/* =================================================================
 *  SECTION HEAD
 * ================================================================= */
.is-section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--is-border); }
.is-section-head h2 { font-size: 22px; margin: 0; font-weight: 900; }
.is-section-head h2::before { content: ''; display: inline-block; width: 4px; height: 18px; background: var(--is-ink); margin-right: 10px; vertical-align: middle; margin-top: -2px; }

/* =================================================================
 *  CARD GRID
 * ================================================================= */
.is-card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 32px; }
.is-card { border: 1px solid var(--is-border); background: var(--is-surface); transition: .2s; }
.is-card:hover { border-color: var(--is-ink); }
.is-card-thumb { display: block; aspect-ratio: 4/3; overflow: hidden; background: var(--is-aged); }
.is-card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.is-card:hover .is-card-thumb img { transform: scale(1.02); }
.is-card-body { padding: 16px 20px 20px; }
.is-card-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.is-card h3 { font-size: 18px; margin: 0 0 6px; line-height: 1.4; font-weight: 700; }
.is-card h3 a { color: var(--is-ink); }
.is-card h3 a:hover { color: var(--is-red); text-decoration: none; }
.is-card p { color: var(--is-muted); font-size: 14px; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* =================================================================
 *  STREAM
 * ================================================================= */
.is-stream { display: grid; gap: 16px; margin-bottom: 32px; }
.is-stream-item { display: grid; grid-template-columns: 200px minmax(0,1fr); gap: 20px; padding: 16px; border: 1px solid var(--is-border); background: var(--is-surface); transition: .2s; }
.is-stream-item:hover { border-color: var(--is-ink); }
.is-stream-thumb { display: block; overflow: hidden; background: var(--is-aged); aspect-ratio: 4/3; }
.is-stream-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.is-stream-item:hover .is-stream-thumb img { transform: scale(1.02); }
.is-stream-body { display: flex; flex-direction: column; justify-content: center; }
.is-stream-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.is-stream-body h4 { font-size: 18px; margin: 0 0 6px; font-weight: 700; line-height: 1.4; }
.is-stream-body h4 a { color: var(--is-ink); }
.is-stream-body h4 a:hover { color: var(--is-red); text-decoration: none; }
.is-stream-excerpt { color: var(--is-muted); font-size: 14px; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.is-stream-meta { font-size: 13px; color: var(--is-muted); }

/* =================================================================
 *  TWO-COLUMN + SIDEBAR
 * ================================================================= */
.is-content-grid { display: grid; grid-template-columns: minmax(0,1fr) 280px; gap: 24px; }
.is-sidebar { display: grid; gap: 16px; align-content: start; }
.is-side-panel { padding: 20px; border: 1px solid var(--is-border); background: var(--is-surface); }
.is-side-title { font-size: 16px; font-weight: 900; color: var(--is-ink); margin: 0 0 12px; padding-bottom: 8px; border-bottom: 2px solid var(--is-ink); }
.is-side-list { list-style: none; padding: 0; margin: 0; }
.is-side-list li { padding: 8px 0; border-bottom: 1px dotted var(--is-border2); font-size: 14px; }
.is-side-list li:last-child { border-bottom: none; }
.is-side-list a { color: var(--is-ink2); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.is-side-list a:hover { color: var(--is-red); text-decoration: none; }
.is-tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.is-tag-cloud a { display: inline-flex; align-items: center; gap: 3px; padding: 4px 12px; border: 1px solid var(--is-border); font-size: 13px; color: var(--is-muted); transition: .2s; }
.is-tag-cloud a:hover { border-color: var(--is-ink); color: var(--is-ink); text-decoration: none; }

/* =================================================================
 *  LIST & BREADCRUMB
 * ================================================================= */
.is-breadcrumb { margin-bottom: 16px; font-size: 13px; color: var(--is-muted); }
.is-breadcrumb a { color: var(--is-muted); }
.is-breadcrumb a:hover { color: var(--is-ink); }
.is-list-head { padding: 28px 32px; border: 1px solid var(--is-border); background: var(--is-surface); margin-bottom: 20px; }
.is-list-head h1 { font-size: 30px; font-weight: 900; margin: 0 0 6px; }
.is-list-head p { color: var(--is-muted); font-size: 15px; margin: 0; }
.is-list-count { font-size: 13px; color: var(--is-jade); margin-top: 8px; }

/* =================================================================
 *  PAGINATION
 * ================================================================= */
.is-pagination,.pagination { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; }
.pagination a,.pagination span { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; height: 32px; padding: 0 10px; border: 1px solid var(--is-border); font-size: 13px; color: var(--is-muted); background: var(--is-paper); transition: .2s; }
.pagination a:hover { border-color: var(--is-ink); color: var(--is-ink); text-decoration: none; }
.pagination .current,.pagination .active { background: var(--is-ink); color: var(--is-paper); border-color: var(--is-ink); font-weight: 700; }

/* =================================================================
 *  ARTICLE DETAIL
 * ================================================================= */
.is-detail { padding: 36px; border: 1px solid var(--is-border); background: var(--is-surface); margin-bottom: 24px; }
.is-detail-header h1 { font-size: 34px; line-height: 1.35; font-weight: 900; margin: 10px 0; }
.is-detail-meta { font-size: 13px; color: var(--is-muted); margin-bottom: 20px; display: flex; flex-wrap: wrap; gap: 16px; }
.is-detail-cover { margin-bottom: 20px; overflow: hidden; border: 1px solid var(--is-border); aspect-ratio: 16/8; }
.is-detail-cover img { width: 100%; height: 100%; object-fit: cover; }
.is-detail-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0; }
.is-detail-tags a { padding: 4px 12px; border: 1px solid var(--is-border); font-size: 13px; color: var(--is-muted); }
.is-detail-tags a:hover { border-color: var(--is-ink); color: var(--is-ink); text-decoration: none; }
.is-article-content { color: var(--is-ink); font-size: 17px; line-height: 2; }
.is-article-content p { margin: 1em 0; text-indent: 2em; }
.is-article-content p:first-child { text-indent: 0; }
.is-article-content h1,.is-article-content h2,.is-article-content h3,.is-article-content h4 { margin: 1.6em 0 .7em; font-weight: 900; text-indent: 0; }
.is-article-content h1 { font-size: 26px; } .is-article-content h2 { font-size: 22px; }
.is-article-content h3 { font-size: 18px; }
.is-article-content img { border: 1px solid var(--is-border); margin: 16px 0; }
.is-article-content a { color: var(--is-red); border-bottom: 1px solid var(--is-red); }
.is-article-content a:hover { border-bottom-style: double; }

/* =================================================================
 *  SO / SEARCH / TAG / DIY
 * ================================================================= */
.is-so-wrap { width: min(100% - 48px, 640px); margin: 0 auto; padding: 80px 0; text-align: center; }
.is-so-title { font-size: 32px; font-weight: 900; color: var(--is-ink); margin: 0 0 8px; }
.is-so-subtitle { color: var(--is-muted); font-size: 15px; margin-bottom: 28px; }
.is-so-form { display: flex; max-width: 480px; margin: 0 auto; }
.is-so-form input { flex: 1; height: 46px; border: 1px solid var(--is-border); border-right: none; background: var(--is-surface); padding: 0 16px; color: var(--is-ink); font-size: 15px; font-family: var(--is-font); outline: none; }
.is-so-form button { height: 46px; padding: 0 24px; border: 1px solid var(--is-ink); background: var(--is-ink); color: var(--is-paper); font-size: 15px; font-family: var(--is-font); cursor: pointer; }
.is-so-form button:hover { background: var(--is-red); border-color: var(--is-red); }
.is-so-hot { margin-top: 32px; }
.is-so-hot h3 { font-size: 14px; color: var(--is-muted); margin-bottom: 10px; }
.is-search-panel { padding: 24px 32px; border: 1px solid var(--is-border); background: var(--is-surface); margin-bottom: 16px; }
.is-search-panel h1 { margin: 0; font-size: 24px; font-weight: 900; }
.is-search-panel p { font-size: 13px; color: var(--is-muted); margin: 4px 0 0; }
.is-search-item { padding: 16px 0; border-bottom: 1px dotted var(--is-border2); }
.is-search-item:last-child { border-bottom: none; }
.is-search-item h3 { font-size: 18px; margin: 0 0 6px; }
.is-search-item h3 a { color: var(--is-ink); }
.is-search-item h3 a:hover { color: var(--is-red); text-decoration: none; }
.is-search-item p { font-size: 14px; color: var(--is-muted); }
.is-diy-panel { padding: 32px; border: 1px solid var(--is-border); background: var(--is-surface); }
.is-tag-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.is-tag-card { padding: 24px; border: 1px solid var(--is-border); background: var(--is-surface); text-align: center; transition: .2s; }
.is-tag-card:hover { border-color: var(--is-ink); text-decoration: none; }
.is-tag-card h3 { font-size: 18px; margin: 0 0 4px; font-weight: 700; color: var(--is-ink); }
.is-tag-card p { font-size: 13px; color: var(--is-muted); margin: 0; }
.is-empty { text-align: center; padding: 80px 20px; }
.is-empty h1 { font-size: 28px; margin-bottom: 10px; }

/* =================================================================
 *  FOOTER
 * ================================================================= */
.is-footer { margin-top: 40px; border-top: 2px solid var(--is-ink); padding: 24px 0; background: var(--is-aged); }
.is-footer-inner { display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: var(--is-muted); }
.is-footer-links { display: flex; gap: 20px; }
.is-footer-links a { color: var(--is-muted); }
.is-footer-links a:hover { color: var(--is-ink); }

/* =================================================================
 *  RESPONSIVE
 * ================================================================= */
@media (max-width: 1100px) {
  .is-hero-card { grid-template-columns: 1fr; }
  .is-hero-text { padding: 24px; }
  .is-card-grid { grid-template-columns: repeat(2, 1fr); }
  .is-tag-grid { grid-template-columns: repeat(3, 1fr); }
  .is-content-grid { grid-template-columns: 1fr; }
}
@media (max-width: 991px) { .is-menu-toggle { display: inline-flex; } .is-nav { display: none; } .is-nav.open { display: flex; flex-direction: column; } }
@media (max-width: 768px) {
  .is-wrap { width: min(100% - 20px, 1080px); }
  .is-hero-text h1 { font-size: 22px; }
  .is-card-grid { grid-template-columns: 1fr; }
  .is-tag-grid { grid-template-columns: repeat(2, 1fr); }
  .is-stream-item { grid-template-columns: 1fr; }
  .is-stream-thumb { aspect-ratio: 16/9; }
  .is-footer-inner { flex-direction: column; gap: 8px; text-align: center; }
  .is-list-head,.is-detail,.is-search-panel,.is-diy-panel { padding: 20px; }
  .is-detail-header h1 { font-size: 24px; }
  .is-article-content { font-size: 15px; }
  .is-article-content p { text-indent: 1.5em; }
}
