/* ═══════════════════════════════════════
   yangxuan.ai — V6 Theme CSS
   ═══════════════════════════════════════ */

/* --- Variables --- */
:root {
  --bg: #FAF8F4;
  --card: #FFFFFF;
  --text: #2C2A26;
  --soft: #6D6960;
  --muted: #B5AFA5;
  --accent: #C45D3E;
  --accent-soft: #F3E8E2;
  --border: #ECEAE4;
  --border-l: #F3F1EC;
  --warm: #F5F2EB;
  --tag-invest: #C45D3E;
  --tag-invest-bg: #F3E8E2;
  --tag-ai: #3D7AB5;
  --tag-ai-bg: #E8F0F8;
  --tag-essay: #8B7355;
  --tag-essay-bg: #F0EBE3;
  --font-serif: 'Noto Serif SC', Georgia, serif;
  --font-sans: 'Noto Sans SC', -apple-system, sans-serif;
  --font-display: 'Outfit', sans-serif;
  --font-body: 'Crimson Pro', Georgia, serif;
  --font-mono: 'DM Mono', monospace;
  --max-w: 860px;
}

@import url('https://fonts.googleapis.com/css2?family=Crimson+Pro:ital,wght@0,300;0,400;0,600;1,300;1,400&family=Outfit:wght@300;400;500;600;700&family=Noto+Sans+SC:wght@300;400;500;600;700&family=Noto+Serif+SC:wght@400;500;600;700&family=DM+Mono:wght@300;400&display=swap');

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }
strong { color: var(--text); font-weight: 600; }

.wrap { max-width: var(--max-w); margin: 0 auto; padding: 0 28px; }
@media (max-width: 700px) { .wrap { padding: 0 16px; } }

/* --- Nav --- */
.nav {
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
  background: rgba(250,248,244,0.96);
  backdrop-filter: blur(10px);
}
.nav-inner {
  max-width: var(--max-w); margin: 0 auto;
  padding: 0 28px; height: 56px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-brand { display: flex; align-items: center; gap: 9px; text-decoration: none; }
.nav-logo {
  width: 28px; height: 28px; border-radius: 6px;
  background: linear-gradient(135deg, #2C2A26, #5A5549);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-serif); font-size: 14px; color: var(--bg); font-weight: 700;
}
.nav-name { font-family: var(--font-display); font-size: 14px; font-weight: 600; color: var(--text); letter-spacing: 0.8px; }
.nav-links { display: flex; gap: 4px; align-items: center; }
.nav-link {
  font-family: var(--font-sans); font-size: 13px; font-weight: 500;
  padding: 6px 11px; border-radius: 6px;
  color: var(--muted); text-decoration: none; transition: all 0.15s;
}
.nav-link:hover { color: var(--soft); background: var(--warm); text-decoration: none; }
.nav-link.active { color: var(--text); background: var(--warm); }
.nav-lang {
  margin-left: 10px; font-family: var(--font-display); font-size: 11px; font-weight: 600;
  padding: 4px 8px; border-radius: 5px; border: 1px solid var(--border);
  color: var(--soft); background: var(--card); text-decoration: none;
}
@media (max-width: 700px) {
  .nav-inner { padding: 0 14px; }
  .nav-name { display: none; }
  .nav-link { font-size: 12px; padding: 5px 7px; }
  .nav-lang { margin-left: 4px; }
}

/* --- Hero --- */
.hero { padding: 52px 0 40px; }
.hero-top { display: flex; align-items: center; gap: 18px; margin-bottom: 22px; }
.hero-photo {
  width: 68px; height: 68px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--border);
}
.hero h1 { font-family: var(--font-serif); font-size: 30px; font-weight: 700; line-height: 1.2; }
.hero-loc { font-family: var(--font-display); font-size: 12px; color: var(--muted); margin-top: 3px; }
.hero-bio { font-size: 15px; color: var(--soft); line-height: 2; max-width: 660px; }
.hero-bio p { margin-bottom: 10px; }
@media (max-width: 700px) {
  .hero { padding: 36px 0 32px; }
  .hero-photo { width: 56px; height: 56px; }
  .hero h1 { font-size: 26px; }
  .hero-bio { font-size: 14px; }
}

/* --- Cards Grid (identity) --- */
.cards-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 8px; margin-top: 22px;
}
.card-mini {
  padding: 12px 14px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--card);
}
.card-mini-icon { font-size: 15px; margin-bottom: 3px; }
.card-mini h4 { font-size: 12px; font-weight: 600; margin: 0; }
.card-mini p { font-size: 11px; color: var(--muted); margin: 0; }
@media (max-width: 700px) { .cards-grid { grid-template-columns: 1fr 1fr; } }

/* --- Section --- */
.section { padding: 28px 0; border-top: 1px solid var(--border); }
.section-eyebrow {
  font-family: var(--font-display); font-size: 11px; font-weight: 600;
  letter-spacing: 2.5px; text-transform: uppercase; color: var(--muted); margin-bottom: 4px;
}
.section-title { font-family: var(--font-serif); font-size: 20px; font-weight: 600; margin-bottom: 4px; }
.section-desc { font-size: 13px; color: var(--muted); margin-bottom: 16px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
.section-head .view-all {
  font-family: var(--font-display); font-size: 12px; color: var(--accent); font-weight: 500;
}

/* --- Featured --- */
.featured-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.featured-card {
  padding: 18px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--card);
}
.featured-card .eyebrow {
  font-family: var(--font-display); font-size: 10px; font-weight: 500;
  letter-spacing: 2px; text-transform: uppercase; color: var(--accent); margin-bottom: 6px;
}
.featured-card h3 {
  font-family: var(--font-serif); font-size: 15px; font-weight: 600;
  line-height: 1.5; margin-bottom: 6px;
}
.featured-card p { font-size: 12px; color: var(--soft); line-height: 1.6; }
@media (max-width: 700px) { .featured-grid { grid-template-columns: 1fr; } }

/* --- Article List --- */
.post-item {
  padding: 14px 0; border-bottom: 1px solid var(--border-l);
  display: block; color: var(--text); text-decoration: none;
}
.post-item:hover { text-decoration: none; }
.post-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.post-date { font-family: var(--font-mono); font-size: 11px; color: var(--muted); }
.post-tag {
  font-size: 10px; padding: 2px 7px; border-radius: 3px; font-weight: 500;
}
.tag-invest, .tag-投资 { background: var(--tag-invest-bg); color: var(--tag-invest); }
.tag-ai, .tag-AI { background: var(--tag-ai-bg); color: var(--tag-ai); }
.tag-essay, .tag-随笔 { background: var(--tag-essay-bg); color: var(--tag-essay); }
.post-title {
  font-family: var(--font-serif); font-size: 15px; font-weight: 600;
  line-height: 1.5; margin-bottom: 2px;
}
.post-en { font-family: var(--font-body); font-size: 13px; font-style: italic; color: var(--muted); }
.post-summary { font-size: 12px; color: var(--soft); line-height: 1.5; margin-top: 3px; }

/* --- Article Card (Writing page) --- */
.post-card {
  display: block; text-decoration: none; color: var(--text);
  padding: 18px 20px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--card);
  margin-bottom: 8px; transition: border-color 0.15s;
}
.post-card:hover { border-color: var(--muted); text-decoration: none; }

/* --- Filters --- */
.filters { display: flex; gap: 5px; margin-bottom: 20px; padding-bottom: 12px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.filter-btn {
  padding: 5px 14px; border-radius: 18px; cursor: pointer;
  border: 1px solid var(--border); background: var(--card);
  font-family: var(--font-sans); font-size: 12px; font-weight: 500; color: var(--soft);
}
.filter-btn.active { background: var(--text); color: var(--bg); border-color: var(--text); }

/* --- Article Single --- */
.article { padding: 44px 0 56px; max-width: 660px; }
.article-back {
  font-family: var(--font-display); font-size: 12px; color: var(--accent);
  font-weight: 500; display: inline-block; margin-bottom: 20px;
}
.article h1 {
  font-family: var(--font-serif); font-size: 26px; font-weight: 700;
  line-height: 1.4; margin-bottom: 6px;
}
.article-subtitle {
  font-family: var(--font-body); font-size: 15px; font-style: italic;
  color: var(--muted); margin-bottom: 28px;
}
.article-content { font-size: 15px; color: var(--soft); line-height: 2.2; }
.article-content p { margin-bottom: 16px; }
.article-content h2 {
  font-family: var(--font-serif); font-size: 20px; font-weight: 600;
  color: var(--text); margin: 32px 0 12px;
}
.article-content h3 {
  font-family: var(--font-serif); font-size: 17px; font-weight: 600;
  color: var(--text); margin: 24px 0 8px;
}
.article-content blockquote {
  padding: 16px 20px; background: var(--warm); border-radius: 8px;
  border-left: 3px solid var(--accent); font-size: 14px; line-height: 1.8;
  margin: 20px 0; color: var(--text);
}
.article-content code {
  font-family: var(--font-mono); font-size: 13px;
  background: var(--warm); padding: 2px 6px; border-radius: 4px;
}
.article-content pre {
  background: #2C2A26; color: #E8E8E0; padding: 20px; border-radius: 10px;
  overflow-x: auto; margin: 16px 0; font-size: 13px; line-height: 1.6;
}
.article-content pre code { background: none; padding: 0; color: inherit; }
.article-content img { border-radius: 8px; margin: 16px 0; }
.article-content ul, .article-content ol { padding-left: 24px; margin-bottom: 16px; }
.article-content li { margin-bottom: 4px; }
.article-author {
  margin-top: 36px; padding: 20px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--warm);
  display: flex; gap: 14px; align-items: center;
}
.article-author img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.article-author-name { font-size: 14px; font-weight: 600; }
.article-author-desc { font-size: 12px; color: var(--muted); }
@media (max-width: 700px) {
  .article h1 { font-size: 22px; }
  .article-content { font-size: 14px; }
}

/* --- Now --- */
.now-box {
  background: var(--warm); border-radius: 10px;
  padding: 18px 22px; border: 1px solid var(--border);
}
.now-title {
  font-size: 13px; font-weight: 600; margin-bottom: 8px;
  display: flex; align-items: center; gap: 6px;
}
.now-dot { width: 6px; height: 6px; border-radius: 50%; background: #6DBE6D; display: inline-block; }
.now-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.now-item {
  font-size: 12px; color: var(--soft);
  padding: 7px 10px; background: rgba(255,255,255,0.6); border-radius: 6px; line-height: 1.5;
}
@media (max-width: 700px) { .now-grid { grid-template-columns: 1fr; } }

/* --- Subscribe --- */
.subscribe {
  padding: 24px 28px; border-radius: 10px;
  background: var(--card); border: 1px solid var(--border); text-align: center;
  margin: 28px 0;
}
.subscribe h3 { font-family: var(--font-serif); font-size: 15px; font-weight: 600; margin-bottom: 3px; }
.subscribe p { font-family: var(--font-body); font-size: 13px; font-style: italic; color: var(--muted); margin-bottom: 12px; }
.subscribe-form { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.subscribe-input {
  padding: 9px 14px; border-radius: 7px; border: 1px solid var(--border);
  background: var(--bg); font-family: var(--font-mono); font-size: 12px;
  color: var(--text); width: 220px; outline: none;
}
.subscribe-btn {
  padding: 9px 20px; border-radius: 7px; border: none;
  background: var(--text); color: var(--bg);
  font-family: var(--font-display); font-size: 12px; font-weight: 600; cursor: pointer;
}
@media (max-width: 700px) {
  .subscribe-input, .subscribe-btn { width: 100%; }
}

/* --- Books --- */
.book-card {
  padding: 24px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--card);
  margin-bottom: 10px; display: flex; gap: 20px;
}
.book-cover {
  width: 68px; height: 94px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  box-shadow: 3px 5px 20px rgba(0,0,0,0.06);
  color: #fff; font-family: var(--font-serif); font-size: 11px;
  font-weight: 700; text-align: center; padding: 6px; line-height: 1.3;
}
.book-card h3 { font-family: var(--font-serif); font-size: 16px; font-weight: 600; }
.book-status {
  font-size: 10px; padding: 1px 7px; border-radius: 3px; font-weight: 500;
  display: inline-block; margin-left: 8px;
}
.book-en { font-family: var(--font-body); font-size: 13px; font-style: italic; color: var(--muted); }
.book-pub { font-size: 11px; color: var(--muted); }
.book-desc { font-size: 13px; color: var(--soft); line-height: 1.7; margin-top: 4px; }
@media (max-width: 700px) {
  .book-card { gap: 14px; }
  .book-cover { width: 52px; height: 70px; }
}

/* --- Links --- */
.links-group { margin-bottom: 24px; }
.links-group h3 {
  font-size: 13px; font-weight: 600; margin-bottom: 10px;
  padding-bottom: 8px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 8px;
}
.links-group h3::before {
  content: ''; width: 3px; height: 13px; border-radius: 2px; background: var(--accent);
}
.links-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.link-card {
  display: block; padding: 12px 16px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--card); text-decoration: none;
}
.link-card:hover { text-decoration: none; border-color: var(--muted); }
.link-card h4 { font-size: 13px; font-weight: 600; color: var(--text); }
.link-card p { font-size: 12px; color: var(--muted); margin: 0; }
@media (max-width: 700px) { .links-grid { grid-template-columns: 1fr; } }

/* --- About --- */
.about { max-width: 660px; }
.about-bio { font-size: 15px; color: var(--soft); line-height: 2.2; }
.about-bio p { margin-bottom: 12px; }
.about-en {
  border-left: 2px solid var(--border); padding-left: 18px; margin-top: 16px;
  font-family: var(--font-body); font-style: italic; color: var(--muted);
  font-size: 14px; line-height: 1.8;
}
.principles {
  background: var(--card); border-radius: 10px;
  padding: 20px 24px; margin-top: 28px; border: 1px solid var(--border);
}
.principles .section-eyebrow { margin-bottom: 10px; }
.principle-item { display: flex; gap: 8px; margin-bottom: 6px; font-size: 13px; color: var(--soft); line-height: 1.7; }
.principle-dot { color: var(--accent); margin-top: 2px; }

/* --- Timeline --- */
.timeline { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--border); }
.timeline-item { display: flex; gap: 12px; margin-bottom: 14px; }
.timeline-year { font-family: var(--font-mono); font-size: 12px; color: var(--accent); min-width: 48px; }
.timeline-dot {
  width: 6px; height: 6px; border-radius: 50%;
  border: 2px solid var(--border); margin-top: 6px; flex-shrink: 0;
}
.timeline-text { font-size: 13px; color: var(--soft); line-height: 1.5; }

/* --- Footer --- */
.footer { border-top: 1px solid var(--border); background: var(--warm); margin-top: 20px; }
.footer-inner { max-width: var(--max-w); margin: 0 auto; padding: 28px; }
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 20px; }
.contact-card {
  display: flex; align-items: center; gap: 8px; text-decoration: none;
  padding: 9px 12px; border-radius: 7px;
  background: var(--card); border: 1px solid var(--border);
}
.contact-card:hover { text-decoration: none; border-color: var(--muted); }
.contact-icon {
  font-size: 14px; width: 24px; height: 24px; border-radius: 5px;
  background: var(--bg); display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.contact-platform { font-size: 10px; color: var(--muted); }
.contact-handle { font-family: var(--font-display); font-size: 12px; color: var(--text); font-weight: 500; }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 12px; border-top: 1px solid var(--border); flex-wrap: wrap; gap: 6px;
}
.footer-copy { font-family: var(--font-display); font-size: 11px; color: var(--muted); }
.footer-built { font-family: var(--font-body); font-size: 11px; font-style: italic; color: var(--muted); }
@media (max-width: 700px) {
  .footer-inner { padding: 24px 14px; }
  .contact-grid { grid-template-columns: 1fr 1fr; }
}
