/* ============================================================
   ruonan.live — 个人成长志
   设计理念：温暖纸张质感 · 墨色文字 · 陶土色点缀
   让记录本身成为一件美好的事
   ============================================================ */

:root {
  --bg: #faf6f0;
  --bg-alt: #f2ebdf;
  --bg-card: #fffdf9;
  --ink: #2d2a26;
  --ink-soft: #6f6659;
  --ink-faint: #a39888;
  --accent: #b5653f;        /* 陶土橙 */
  --accent-deep: #8f4a2b;
  --sage: #7a8b6f;          /* 鼠尾草绿 */
  --line: #e7ddcc;
  --line-soft: #f0e8da;
  --shadow-sm: 0 1px 3px rgba(60, 45, 30, .06), 0 1px 2px rgba(60, 45, 30, .04);
  --shadow-md: 0 4px 16px rgba(60, 45, 30, .08), 0 2px 6px rgba(60, 45, 30, .05);
  --shadow-lg: 0 12px 40px rgba(60, 45, 30, .12);
  --serif: "Noto Serif SC", "Songti SC", "STSong", "SimSun", Georgia, serif;
  --sans: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --radius: 14px;
  --maxw: 1080px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

::selection { background: rgba(181, 101, 63, .2); }

a { color: var(--accent-deep); text-decoration: none; transition: color .25s; }
a:hover { color: var(--accent); }

img { max-width: 100%; display: block; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ============ 顶部导航 ============ */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(250, 246, 240, .86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-soft);
  transition: box-shadow .3s;
}
.site-nav.scrolled { box-shadow: var(--shadow-sm); }
.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: .5px;
  color: var(--ink);
}
.brand span { color: var(--accent); }
.nav-links { display: flex; gap: 6px; align-items: center; }
.nav-links a {
  color: var(--ink-soft);
  font-size: 14.5px;
  padding: 8px 14px;
  border-radius: 999px;
  transition: all .25s;
}
.nav-links a:hover { color: var(--accent); background: rgba(181, 101, 63, .08); }
.nav-links a.active { color: var(--accent-deep); background: rgba(181, 101, 63, .1); font-weight: 600; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 22px; height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: all .3s;
}

/* ============ Hero ============ */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 120px 0 80px;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 75% 20%, rgba(181, 101, 63, .08), transparent 60%),
    radial-gradient(ellipse 50% 40% at 15% 80%, rgba(122, 139, 111, .1), transparent 60%);
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; max-width: 780px; }
.hero .kicker {
  font-size: 14px;
  letter-spacing: 3px;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.hero .kicker::before {
  content: "";
  width: 32px; height: 1px;
  background: var(--accent);
  display: inline-block;
}
.hero h1 {
  font-family: var(--serif);
  font-size: clamp(40px, 7vw, 68px);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 2px;
  margin-bottom: 24px;
}
.hero h1 .mark {
  position: relative;
  color: var(--accent);
}
.hero .sub {
  font-size: clamp(16px, 2.4vw, 19px);
  color: var(--ink-soft);
  max-width: 620px;
  margin-bottom: 40px;
}
.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 30px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all .3s;
}
.btn-primary { background: var(--accent); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--accent-deep); color: #fff; transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

.hero-scroll {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--ink-faint);
  font-size: 12px;
  letter-spacing: 2px;
}
.hero-scroll .dot {
  width: 1px; height: 34px;
  background: linear-gradient(to bottom, var(--ink-faint), transparent);
  animation: drip 2s ease-in-out infinite;
}
@keyframes drip {
  0% { transform: scaleY(0); transform-origin: top; opacity: 0; }
  40% { transform: scaleY(1); transform-origin: top; opacity: 1; }
  60% { transform: scaleY(1); transform-origin: bottom; opacity: 1; }
  100% { transform: scaleY(0); transform-origin: bottom; opacity: 0; }
}

/* ============ 通用区块 ============ */
.section { padding: 96px 0; position: relative; }
.section-alt { background: var(--bg-alt); }
.section-head { margin-bottom: 56px; max-width: 640px; }
.section-head .tag {
  display: inline-block;
  font-size: 13px;
  letter-spacing: 2px;
  color: var(--accent);
  background: rgba(181, 101, 63, .09);
  padding: 5px 16px;
  border-radius: 999px;
  margin-bottom: 16px;
  font-weight: 600;
}
.section-head h2 {
  font-family: var(--serif);
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 12px;
}
.section-head p { color: var(--ink-soft); font-size: 15.5px; }

/* ============ 关于 ============ */
.about-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 48px;
  align-items: start;
}
.avatar-box {
  width: 240px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--bg-alt), var(--line));
  border: 3px solid #fff;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 64px;
  color: var(--accent);
  user-select: none;
}
.about-text h3 {
  font-family: var(--serif);
  font-size: 24px;
  margin-bottom: 16px;
}
.about-text p { color: var(--ink-soft); margin-bottom: 16px; font-size: 15.5px; }
.tags { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.tags span {
  font-size: 13px;
  padding: 6px 16px;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  color: var(--ink-soft);
}

/* ============ 成长时间轴 ============ */
.timeline { position: relative; padding-left: 32px; }
.timeline::before {
  content: "";
  position: absolute;
  left: 8px; top: 4px; bottom: 4px;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), var(--sage), transparent);
  border-radius: 2px;
}
.tl-item { position: relative; margin-bottom: 44px; }
.tl-item::before {
  content: "";
  position: absolute;
  left: -32px; top: 8px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--bg);
  border: 3px solid var(--accent);
  box-shadow: 0 0 0 4px rgba(181, 101, 63, .12);
}
.tl-date {
  font-size: 13px;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 1px;
  margin-bottom: 6px;
}
.tl-card {
  background: var(--bg-card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 24px 28px;
  box-shadow: var(--shadow-sm);
  transition: all .3s;
}
.tl-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.tl-card h4 { font-family: var(--serif); font-size: 18px; margin-bottom: 8px; }
.tl-card p { color: var(--ink-soft); font-size: 14.5px; }

/* ============ 卡片网格（生活/学习/感悟） ============ */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.card {
  background: var(--bg-card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: all .35s;
  position: relative;
  overflow: hidden;
}
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(181,101,63,.05), transparent 45%);
  opacity: 0;
  transition: opacity .35s;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); }
.card:hover::after { opacity: 1; }
.card .card-date { font-size: 12.5px; color: var(--ink-faint); letter-spacing: 1px; margin-bottom: 10px; display: block; }
.card .card-icon { font-size: 26px; margin-bottom: 12px; }
.card h4 { font-family: var(--serif); font-size: 17px; margin-bottom: 10px; position: relative; z-index: 1; }
.card p { color: var(--ink-soft); font-size: 14px; position: relative; z-index: 1; }
.card .card-more { margin-top: 14px; font-size: 13.5px; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; position: relative; z-index: 1; }
.card .card-more:hover { gap: 8px; }

/* 感悟 = 语录卡片 */
.quote-card {
  background: var(--bg-card);
  border: 1px solid var(--line-soft);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 30px 32px;
  box-shadow: var(--shadow-sm);
  transition: all .35s;
}
.quote-card:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); }
.quote-card p.quote {
  font-family: var(--serif);
  font-size: 16.5px;
  line-height: 2;
  margin-bottom: 14px;
}
.quote-card .quote-from {
  font-size: 13px;
  color: var(--ink-faint);
  display: flex;
  align-items: center;
  gap: 8px;
}
.quote-card .quote-from::before { content: ""; width: 16px; height: 1px; background: var(--line); }

/* ============ 事业 ============ */
.career-path { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.step {
  background: var(--bg-card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 26px;
  text-align: center;
  position: relative;
  box-shadow: var(--shadow-sm);
  transition: all .35s;
}
.step:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); }
.step .step-num {
  width: 40px; height: 40px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
}
.step h4 { font-family: var(--serif); font-size: 16.5px; margin-bottom: 8px; }
.step p { font-size: 13.5px; color: var(--ink-soft); }

/* ============ 页脚 ============ */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 60px 0 40px;
  text-align: center;
}
.site-footer .brand { font-size: 22px; }
.site-footer .foot-note { color: var(--ink-faint); font-size: 13.5px; margin-top: 10px; }
.site-footer .foot-links { margin-top: 18px; display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; }
.site-footer .foot-links a { color: var(--ink-soft); font-size: 14px; }
.site-footer .foot-links a:hover { color: var(--accent); }
.foot-motto {
  font-family: var(--serif);
  color: var(--ink-soft);
  font-size: 15px;
  margin-top: 22px;
  letter-spacing: 1px;
}

/* ============ 滚动显现动画 ============ */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ============ 响应式 ============ */
@media (max-width: 860px) {
  .nav-links {
    position: fixed;
    top: 64px; right: 0;
    flex-direction: column;
    align-items: flex-start;
    background: var(--bg-card);
    border-left: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
    padding: 20px 28px;
    gap: 4px;
    transform: translateX(110%);
    transition: transform .35s ease;
    border-radius: 0 0 0 var(--radius);
  }
  .nav-links.open { transform: translateX(0); }
  .nav-links a { font-size: 16px; padding: 10px 16px; }
  .nav-toggle { display: flex; }
  .hero { padding-top: 100px; }
  .about-grid { grid-template-columns: 1fr; gap: 32px; }
  .avatar-box { width: 160px; margin: 0 auto; font-size: 44px; }
  .section { padding: 72px 0; }
  .timeline { padding-left: 26px; }
  .tl-item::before { left: -26px; width: 14px; height: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { animation: none !important; }
}
