/* ── AI赚钱博客 · 编辑杂志风 · 暖调浅色 ── */

/* === 字体 === */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;0,800;1,400&family=Source+Sans+3:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&display=swap');

/* === CSS 变量 · 暖调浅色 === */
:root {
  --bg-primary:     #faf8f4;    /* 暖白书页色 */
  --bg-secondary:   #f3efe8;    /* 米灰暖调 */
  --bg-card:        #fffdf9;    /* 卡片暖白 */
  --bg-accent:      #fdf3e4;    /* 暖杏底 */
  
  --text-primary:   #1c1814;    /* 深暖棕 */
  --text-secondary: #5c5348;    /* 中暖灰 */
  --text-muted:     #9a9083;    /* 浅暖灰 */
  
  --accent:         #c75b39;    /* 陶土红 */
  --accent-warm:    #e8873a;    /* 暖橙 */
  --accent-gold:    #d4a017;    /* 金赭 */
  --accent-green:   #5b8c5a;    /* 橄榄绿(少量使用) */
  --accent-light:   #fce9dd;    /* 暖陶浅色 */
  
  --border:         #e0d8cc;    /* 暖灰边框 */
  --border-light:   #ebe3d6;    
  
  --radius-sm:      4px;
  --radius-md:      8px;
  --radius-lg:      16px;
  
  --shadow-sm:      0 1px 3px rgba(28,24,20,0.06);
  --shadow-md:      0 4px 12px rgba(28,24,20,0.08);
  --shadow-lg:      0 8px 30px rgba(28,24,20,0.10);
  
  --font-display:   "Playfair Display", "Noto Serif SC", "SimSun", Georgia, serif;
  --font-body:      "Source Sans 3", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono:      "JetBrains Mono", "Cascadia Code", Consolas, monospace;
  
  --content-width:  720px;
  --wide-width:     960px;
  
  --ease-out-expo:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
}

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

html { font-size: 18px; scroll-behavior: smooth; }

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

/* === Typography === */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-primary);
}

h1 { font-size: 2.4rem; letter-spacing: -0.02em; }
h2 { font-size: 1.8rem; margin-top: 2.5rem; margin-bottom: 1rem; }
h3 { font-size: 1.35rem; margin-top: 1.8rem; margin-bottom: 0.75rem; color: var(--accent); }
h4 { font-size: 1.15rem; }

p { margin-bottom: 1.2rem; font-size: 1.05rem; }

a { 
  color: var(--accent); 
  text-decoration: none;
  border-bottom: 1.5px solid var(--accent-light);
  transition: border-color 0.2s var(--ease-out-quart), color 0.2s var(--ease-out-quart);
}

a:hover { 
  color: #a0482b; 
  border-bottom-color: var(--accent);
}

strong { font-weight: 600; color: var(--text-primary); }

blockquote {
  margin: 2rem 0;
  padding: 1.5rem 2rem;
  background: var(--bg-accent);
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--text-secondary);
}

blockquote p { margin-bottom: 0.5rem; }
blockquote p:last-child { margin-bottom: 0; }

hr {
  border: none;
  border-top: 1px solid var(--border-light);
  margin: 2.5rem 0;
  position: relative;
}

hr::after {
  content: '✦';
  position: absolute;
  left: 50%;
  top: -0.7rem;
  transform: translateX(-50%);
  background: var(--bg-primary);
  padding: 0 1rem;
  color: var(--accent-gold);
  font-size: 0.8rem;
}

code {
  background: #faf5ee;
  padding: 0.15em 0.45em;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.88em;
  color: var(--accent);
  border: 1px solid #f0e6d8;
}

pre {
  background: #2b2520;
  color: #e8dcc8;
  padding: 1.5rem;
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin: 1.5rem 0;
  font-size: 0.88rem;
  line-height: 1.6;
}

pre code {
  background: none;
  padding: 0;
  border: none;
  color: inherit;
  font-size: inherit;
}

/* === Lists === */
ul, ol { 
  margin: 1rem 0 1.5rem 1.5rem; 
  padding: 0;
}

li { margin-bottom: 0.5rem; line-height: 1.7; }

li::marker { color: var(--accent); }

/* === Tables === */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.95rem;
  box-shadow: var(--shadow-sm);
}

th {
  background: var(--accent);
  color: white;
  padding: 0.85rem 1rem;
  text-align: left;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
}

td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-light);
  background: var(--bg-card);
}

tr:last-child td { border-bottom: none; }
tr:nth-child(even) td { background: #fdfaf5; }

/* === Images === */
img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

/* === Layout === */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* === Site Header === */
.site-header {
  background: linear-gradient(175deg, #faf6ef 0%, #efe2d4 100%);
  border-bottom: 1px solid var(--border);
  padding: 4rem 2rem 3rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.site-header::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: 
    radial-gradient(circle at 20% 80%, rgba(199,91,57,0.06) 0%, transparent 50%),
    radial-gradient(circle at 80% 30%, rgba(212,160,23,0.06) 0%, transparent 50%);
  pointer-events: none;
}

.site-header h1 {
  font-family: var(--font-display);
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  position: relative;
  z-index: 1;
}

.site-header p {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--text-secondary);
  font-style: italic;
  max-width: 560px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* === Site Nav === */
.site-nav {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 0.6rem 1rem;
  text-align: center;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(8px);
}

.site-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  border-bottom: none;
  margin: 0 1.2rem;
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.3rem 0;
  transition: color 0.2s var(--ease-out-quart);
  position: relative;
}

.site-nav a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0; right: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform 0.2s var(--ease-out-quart);
}

.site-nav a:hover { color: var(--accent); }
.site-nav a:hover::after { transform: scaleX(1); }

/* === Container === */
.container {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 3rem 1.5rem;
  flex: 1;
}

.container-wide {
  max-width: var(--wide-width);
  margin: 0 auto;
  padding: 3rem 1.5rem;
  flex: 1;
}

/* === Home: Hero Area === */
.home-hero {
  text-align: center;
  padding: 3rem 0 2rem;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 2rem;
}

.home-hero h2 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.home-hero p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto;
}

/* === Post Card (Home) === */
.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 2rem 2.2rem;
  margin-bottom: 1.2rem;
  transition: box-shadow 0.25s var(--ease-out-quart), transform 0.25s var(--ease-out-quart);
  position: relative;
}

.post-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--accent);
  border-radius: var(--radius-md) 0 0 var(--radius-md);
  transform: scaleY(0.6);
  transition: transform 0.25s var(--ease-out-quart);
}

.post-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.post-card:hover::before {
  transform: scaleY(0.9);
}

.post-card h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin: 0 0 0.5rem 0;
  color: var(--text-primary);
}

.post-card h2 a {
  color: inherit;
  border-bottom: none;
}

.post-card h2 a:hover { color: var(--accent); }

.post-card time {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-family: var(--font-mono);
  letter-spacing: 0.03em;
}

.post-card .read-more {
  display: inline-block;
  margin-top: 1rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--accent);
  border-bottom: none;
}

.post-card .read-more::after {
  content: ' →';
  transition: transform 0.2s var(--ease-out-quart);
}

.post-card:hover .read-more::after { transform: translateX(4px); }

/* === Article Content === */
article.post-content { position: relative; }

article.post-content .post-meta {
  font-family: var(--font-mono);
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 2rem;
  letter-spacing: 0.03em;
}

article.post-content h1 {
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 0.5rem;
}

article.post-content h2 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-top: 3rem;
  margin-bottom: 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--accent-light);
  color: var(--text-primary);
}

article.post-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: var(--accent);
}

article.post-content ul, 
article.post-content ol {
  margin: 1rem 0 1.5rem 1.5rem;
}

article.post-content li {
  margin-bottom: 0.5rem;
  line-height: 1.7;
}

article.post-content a {
  color: var(--accent);
  border-bottom: 1.5px solid var(--accent-light);
  text-decoration: none;
}

article.post-content a:hover {
  border-bottom-color: var(--accent);
}

/* === Author Box === */
.author-box {
  background: var(--bg-accent);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 2rem;
  margin-top: 3rem;
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.author-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-warm));
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  box-shadow: 0 4px 12px rgba(199,91,57,0.25);
}

.author-info h3 {
  margin: 0 0 0.3rem 0 !important;
  color: var(--text-primary) !important;
  font-size: 1.1rem !important;
  font-family: var(--font-display) !important;
}

.author-info p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
}

/* === CTA Box === */
.cta-box {
  background: linear-gradient(135deg, #fdf3e4 0%, #fae8d5 100%);
  border: 1px solid #e8cbb0;
  border-radius: var(--radius-lg);
  padding: 2.2rem 2.5rem;
  margin-top: 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-box::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(circle, rgba(199,91,57,0.06) 0%, transparent 60%);
  pointer-events: none;
}

.cta-box h3 {
  font-family: var(--font-display) !important;
  color: var(--text-primary) !important;
  font-size: 1.4rem !important;
  margin: 0 0 0.75rem 0 !important;
  position: relative;
}

.cta-box p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  position: relative;
  font-size: 1rem;
}

.cta-button {
  display: inline-block;
  background: var(--accent);
  color: white !important;
  padding: 0.8rem 2.2rem;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none !important;
  border-bottom: none !important;
  transition: background 0.2s var(--ease-out-quart), transform 0.2s var(--ease-out-quart), box-shadow 0.2s var(--ease-out-quart);
  box-shadow: 0 3px 12px rgba(199,91,57,0.3);
  position: relative;
}

.cta-button:hover {
  background: #b04d2e;
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(199,91,57,0.4);
}

/* === Highlight Box === */
.highlight-box {
  background: #fef9ee;
  border: 2px solid var(--accent-gold);
  border-radius: var(--radius-md);
  padding: 1.5rem 2rem;
  margin: 1.5rem 0;
}

.highlight-box p {
  margin-bottom: 0.5rem;
}

/* === Product CTA (article bottom) === */
.product-cta {
  background: linear-gradient(135deg, #fdf8f0 0%, #faf0e0 100%);
  border: 2px solid var(--accent);
  border-radius: var(--radius-lg);
  padding: 2rem 2.2rem;
  margin: 2.5rem 0;
  text-align: center;
}

.product-cta h3 {
  font-family: var(--font-display) !important;
  font-size: 1.3rem !important;
  margin: 0 0 0.6rem 0 !important;
  color: var(--text-primary) !important;
}

.product-cta p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 1.2rem;
}

.product-cta .cta-button {
  display: inline-block;
  background: var(--accent);
  color: white !important;
  padding: 0.7rem 2rem;
  border-radius: 50px;
  font-weight: 700;
  text-decoration: none !important;
  border-bottom: none !important;
  box-shadow: 0 3px 12px rgba(199,91,57,0.3);
  transition: all 0.2s var(--ease-out-quart);
}

.product-cta .cta-button:hover {
  background: #b04d2e;
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(199,91,57,0.4);
}

/* === Post Navigation (prev/next) === */
.post-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 3rem 0 1.5rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  gap: 1rem;
}

.post-nav a {
  font-family: var(--font-display);
  color: var(--text-secondary);
  border-bottom: none;
  font-size: 0.95rem;
  max-width: 45%;
  transition: color 0.2s var(--ease-out-quart);
}

.post-nav a:hover { color: var(--accent); }

.post-nav .prev::before { content: '← '; }
.post-nav .next::after { content: ' →'; }

.post-nav .nav-label {
  display: block;
  font-family: var(--font-body);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}

/* === Email Subscribe === */
.email-subscribe {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.2rem 2.5rem;
  margin: 2rem 0;
  text-align: center;
}

.email-subscribe h3 {
  font-family: var(--font-display) !important;
  font-size: 1.3rem !important;
  margin: 0 0 0.5rem 0 !important;
  color: var(--text-primary) !important;
}

.email-subscribe p {
  color: var(--text-secondary);
  margin-bottom: 1.2rem;
  font-size: 0.95rem;
}

.subscribe-form {
  display: flex;
  gap: 0.6rem;
  max-width: 440px;
  margin: 0 auto;
  flex-wrap: wrap;
  justify-content: center;
}

.subscribe-form input[type="email"] {
  flex: 1 1 240px;
  padding: 0.7rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: 50px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: var(--bg-primary);
  color: var(--text-primary);
  transition: border-color 0.2s var(--ease-out-quart);
}

.subscribe-form input[type="email"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(199,91,57,0.1);
}

.subscribe-form input[type="email"]::placeholder {
  color: var(--text-muted);
}

.subscribe-form button {
  flex-shrink: 0;
  padding: 0.7rem 1.8rem;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 50px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s var(--ease-out-quart);
  box-shadow: 0 3px 12px rgba(199,91,57,0.25);
}

.subscribe-form button:hover {
  background: #b04d2e;
  transform: translateY(-1px);
  box-shadow: 0 5px 18px rgba(199,91,57,0.35);
}

/* === Product Showcase (Home) === */
.product-showcase {
  margin: 3rem 0 2rem;
  padding: 2rem 0;
  border-top: 2px solid var(--accent-light);
}

.product-showcase h2 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  text-align: center;
  margin-bottom: 0.5rem;
}

.product-showcase .section-desc {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  font-size: 1rem;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.8rem;
  text-align: center;
  transition: box-shadow 0.25s var(--ease-out-quart), transform 0.25s var(--ease-out-quart);
}

.product-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.product-card .product-icon {
  font-size: 2.5rem;
  margin-bottom: 0.8rem;
}

.product-card h3 {
  font-family: var(--font-display) !important;
  font-size: 1.15rem !important;
  margin: 0 0 0.5rem 0 !important;
  color: var(--text-primary) !important;
}

.product-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.product-card .product-link {
  display: inline-block;
  background: var(--accent);
  color: white;
  padding: 0.5rem 1.6rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.88rem;
  text-decoration: none;
  border-bottom: none;
  transition: all 0.2s var(--ease-out-quart);
}

.product-card .product-link:hover {
  background: #b04d2e;
  color: white;
}

/* === About Page === */
.about-header {
  text-align: center;
  padding: 2rem 0;
}

.about-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-warm));
  margin: 0 auto 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  box-shadow: 0 6px 24px rgba(199,91,57,0.25);
}

.about-header h1 {
  margin-bottom: 0.5rem;
}

.about-header .tagline {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--text-secondary);
  font-size: 1.15rem;
}

.about-section {
  margin: 2.5rem 0;
}

.about-section h2 {
  font-size: 1.5rem;
  margin-top: 2rem;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.stat-card {
  background: var(--bg-accent);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  text-align: center;
}

.stat-card .stat-number {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
}

.stat-card .stat-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 0.3rem;
}

/* === Tool Card Grid === */
.tool-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.2rem;
  margin: 1.5rem 0;
}

.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.5rem 2rem;
  box-shadow: var(--shadow-sm);
}

.tool-card h3 {
  margin-top: 0 !important;
  color: var(--text-primary) !important;
}

/* === Footer === */
.site-footer {
  text-align: center;
  padding: 2.5rem 1.5rem;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 2rem;
}

.site-footer a {
  color: var(--accent);
  border-bottom: 1px dotted var(--accent-light);
}

.site-footer .footer-nav {
  margin-bottom: 1rem;
}

.site-footer .footer-nav a {
  margin: 0 0.8rem;
  font-size: 0.88rem;
}

/* === Responsive === */
@media (max-width: 768px) {
  html { font-size: 16px; }
  
  .site-header { padding: 3rem 1.5rem 2rem; }
  .site-header h1 { font-size: 2rem; }
  
  .container, .container-wide { padding: 2rem 1rem; }
  
  article.post-content h1 { font-size: 2rem; }
  article.post-content h2 { font-size: 1.35rem; }
  
  .post-card { padding: 1.5rem; }
  .post-card h2 { font-size: 1.25rem; }
  
  .author-box { flex-direction: column; align-items: center; text-align: center; }
  
  .product-grid { grid-template-columns: 1fr; }
  
  .post-nav { flex-direction: column; align-items: flex-start; }
  .post-nav a { max-width: 100%; }
  
  .subscribe-form { flex-direction: column; }
  .subscribe-form input[type="email"] { flex: none; }
}
