/* ============================================
   安晓尘的数字空间 — 手绘风 + 暖色调
   配色：暖米白 #FAF7F2 / 鼠尾草绿 #7A9E7E / 橙黄 #E6A23C
   ============================================ */

:root {
  --bg: #FAF7F2;
  --bg-warm: #F5EDE3;
  --bg-card: #FFFDF9;
  --sage: #7A9E7E;
  --sage-light: #A8C4A9;
  --sage-pale: rgba(122, 158, 126, 0.1);
  --orange: #E6A23C;
  --orange-pale: rgba(230, 162, 60, 0.1);
  --text: #3A3A3A;
  --text-light: #8A8A8A;
  --text-heading: #2A2A2A;
  --border: #E8DFD5;
  --shadow-soft: 0 2px 12px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.06);
  --radius: 12px;
  --radius-lg: 20px;
  --font-serif: 'Noto Serif SC', 'Songti SC', serif;
  --font-sans: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { font-family: var(--font-sans); color: var(--text); background: var(--bg); line-height: 1.75; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }
.container { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* === 全站漂浮地图背景 === */
.map-bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: 0.04; }
.map-bg-svg { width: 100%; height: 100%; }

/* === 导航 === */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; background: rgba(250,247,242,0.92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 2px solid var(--border); transition: all 0.3s var(--ease); }
.nav.scrolled { box-shadow: var(--shadow-soft); }
.nav-inner { max-width: 1080px; margin: 0 auto; padding: 0 24px; height: 64px; display: flex; align-items: center; justify-content: space-between; }
.nav-logo { font-family: var(--font-serif); font-weight: 600; font-size: 1.05rem; color: var(--text-heading); display: flex; align-items: center; gap: 6px; }
.logo-icon { font-size: 1.2rem; }
.nav-links { display: flex; gap: 28px; }
.nav-links a { font-size: 0.9rem; color: var(--text-light); transition: color 0.2s; position: relative; padding: 4px 0; }
.nav-links a:hover { color: var(--sage); }
.nav-links a::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 2px; background: var(--sage); border-radius: 1px; transform: scaleX(0); transition: transform 0.25s var(--ease); transform-origin: center; }
.nav-links a:hover::after { transform: scaleX(1); }
.nav-hamburger { display: none; flex-direction: column; gap: 5px; padding: 6px; }
.nav-hamburger span { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: all 0.3s; }

/* === Hero === */
.hero { min-height: 92vh; display: flex; align-items: center; padding: 90px 24px 50px; position: relative; z-index: 1; background: radial-gradient(ellipse at 20% 50%, rgba(122,158,126,0.05) 0%, transparent 60%), radial-gradient(ellipse at 80% 30%, rgba(230,162,60,0.04) 0%, transparent 60%), var(--bg); }
.hero-inner { max-width: 1080px; margin: 0 auto; display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 36px; align-items: center; width: 100%; padding: 0 24px; }

.hero-text { position: relative; z-index: 2; }

.hero-greeting { font-size: 1.1rem; color: var(--text-light); margin-bottom: 16px; animation: fadeUp 0.7s var(--ease) both; letter-spacing: 0.05em; }

.hero-title { font-family: var(--font-serif); font-size: clamp(2.2rem, 5vw, 3.5rem); font-weight: 700; color: var(--text-heading); letter-spacing: 0.04em; margin-bottom: 20px; line-height: 1.3; animation: fadeUp 0.7s var(--ease) 0.1s both; position: relative; }
.hero-title::after { content: ''; position: absolute; bottom: -6px; left: 0; width: 70%; height: 3px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 4'%3E%3Cpath d='M0,3 Q50,0 100,3 Q150,1 200,3' stroke='%237A9E7E' fill='none' stroke-width='2'/%3E%3C/svg%3E") repeat-x; background-size: 200px 4px; opacity: 0.6; }

.hero-desc { font-size: 0.98rem; color: var(--text-light); margin-bottom: 32px; line-height: 2; animation: fadeUp 0.7s var(--ease) 0.2s both; }

.hero-buttons { display: flex; flex-wrap: wrap; gap: 10px; animation: fadeUp 0.7s var(--ease) 0.3s both; }

/* 今日路标 */
.road-sign { margin-top: 32px; padding: 14px 18px; background: var(--bg-card); border: 1.5px solid var(--border); border-radius: var(--radius); display: flex; align-items: center; gap: 12px; animation: fadeUp 0.7s var(--ease) 0.5s both; max-width: 420px; }
.road-sign-icon { font-size: 1.3rem; flex-shrink: 0; }
.road-sign-text { font-size: 0.85rem; color: var(--sage); line-height: 1.65; }

/* === 按钮 === */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 12px 28px; border-radius: 10px; font-size: 0.92rem; font-weight: 500; transition: all 0.3s var(--ease); border: 2px solid transparent; }
.btn-primary { background: var(--sage); color: white; border-color: var(--sage); box-shadow: 3px 3px 0 rgba(122,158,126,0.25); }
.btn-primary:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 rgba(122,158,126,0.3); }
.btn-secondary { background: var(--bg-card); color: var(--text-heading); border-color: var(--border); }
.btn-secondary:hover { border-color: var(--sage-light); transform: translate(-1px, -1px); box-shadow: 3px 3px 0 rgba(122,158,126,0.1); }

/* === 右侧地图 === */
.hero-map { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; animation: fadeUp 0.9s var(--ease) 0.3s both; }
.hero-map-svg { width: 100%; max-width: 360px; height: auto; filter: drop-shadow(3px 3px 8px rgba(0,0,0,0.06)); }
.map-border { stroke-linecap: round; stroke-linejoin: round; }
.map-region { cursor: pointer; transition: all 0.3s; }
.map-region:hover { filter: brightness(1.05) drop-shadow(0 0 8px rgba(122,158,126,0.3)); }
.map-region-label { font-family: var(--font-serif); font-size: 12px; fill: var(--text-light); text-anchor: middle; pointer-events: none; }
.map-path { opacity: 0.4; }
.map-hint { font-size: 0.78rem; color: var(--text-light); margin-top: 12px; text-align: center; font-style: italic; }

/* === 通用 Section === */
.section { padding: 96px 0; position: relative; z-index: 1; }
.section-header { text-align: center; margin-bottom: 56px; }
.section-label { display: inline-block; font-size: 0.78rem; color: var(--sage); letter-spacing: 0.15em; margin-bottom: 10px; font-family: var(--font-serif); }
.section-title { font-family: var(--font-serif); font-size: clamp(1.5rem, 3.5vw, 2rem); font-weight: 600; color: var(--text-heading); margin-bottom: 10px; }
.section-subtitle { font-size: 0.88rem; color: var(--orange); font-style: italic; margin-top: 4px; }

/* === 地图全景 === */
.site-map { background: var(--bg-warm); }
.map-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.map-card { display: flex; flex-direction: column; align-items: center; padding: 28px 16px; border-radius: var(--radius); text-align: center; transition: all 0.3s var(--ease); border: 2px solid var(--border); background: var(--bg-card); text-decoration: none; }
.map-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.map-card-green { border-color: rgba(122,158,126,0.3); }
.map-card-green:hover { border-color: var(--sage); }
.map-card-warm { border-color: rgba(230,162,60,0.3); }
.map-card-warm:hover { border-color: var(--orange); }
.map-card-sage { border-color: rgba(122,158,126,0.3); }
.map-card-sage:hover { border-color: var(--sage-light); }
.map-card-icon { font-size: 2rem; margin-bottom: 12px; }
.map-card h3 { font-family: var(--font-serif); font-size: 1rem; color: var(--text-heading); margin-bottom: 6px; }
.map-card p { font-size: 0.82rem; color: var(--text-light); }

/* === 时间轴 === */
.timeline-section { background: var(--bg); }
.timeline { max-width: 640px; margin: 0 auto; position: relative; padding-left: 80px; }
.timeline::before { content: ''; position: absolute; left: 50px; top: 0; bottom: 0; width: 2px; background: var(--border); }
.timeline-item { position: relative; margin-bottom: 48px; }
.timeline-item:last-child { margin-bottom: 0; }
.timeline-year { position: absolute; left: -80px; top: 0; width: 60px; text-align: center; font-family: var(--font-serif); font-weight: 700; font-size: 1.1rem; color: var(--sage); }
.timeline-content { position: relative; padding: 24px 28px; background: var(--bg-card); border: 1.5px solid var(--border); border-radius: var(--radius); }
.timeline-dot { position: absolute; left: -41px; top: 28px; width: 12px; height: 12px; border-radius: 50%; background: var(--sage); border: 3px solid var(--bg); }
.timeline-events { list-style: none; }
.timeline-events li { font-size: 0.92rem; color: var(--text); line-height: 1.9; padding-left: 4px; }
.timeline-events li::before { content: '·'; color: var(--sage); font-weight: bold; margin-right: 8px; }
.timeline-ongoing { color: var(--sage); font-style: italic; }
.timeline-ongoing::before { content: ''; margin-right: 0; }

/* === 关于我卡片 === */
.about { background: var(--bg-warm); }
.about-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.about-card { background: var(--bg-card); border: 2px solid var(--border); border-radius: var(--radius); padding: 32px 24px; position: relative; transition: all 0.3s var(--ease); }
.about-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--sage-light); }
.card-icon { font-size: 2rem; margin-bottom: 16px; }
.about-card h3 { font-family: var(--font-serif); font-size: 1.1rem; color: var(--text-heading); margin-bottom: 10px; }
.about-card p { font-size: 0.9rem; color: var(--text-light); line-height: 1.85; }
.about-card::after { content: attr(data-hover); position: absolute; bottom: -28px; left: 50%; transform: translateX(-50%); font-size: 0.75rem; color: var(--orange); font-style: italic; white-space: nowrap; opacity: 0; transition: opacity 0.3s; pointer-events: none; }
.about-card:hover::after { opacity: 1; }

/* === 作品区 === */
.works { background: var(--bg); }
.work-group { margin-bottom: 48px; }
.group-title { font-family: var(--font-serif); font-size: 1.1rem; color: var(--text-heading); margin-bottom: 20px; padding-left: 14px; border-left: 3px solid var(--sage-light); }
.work-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.work-card { background: var(--bg-card); border: 2px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: all 0.3s var(--ease); }
.work-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--sage-light); }
.work-card-top { height: 140px; display: flex; align-items: center; justify-content: center; }
.work-card-icon { font-size: 2.5rem; opacity: 0.7; }
.work-card-body { padding: 20px; }
.work-tag { display: inline-block; font-size: 0.72rem; color: var(--sage); background: var(--sage-pale); padding: 3px 10px; border-radius: 6px; margin-bottom: 8px; }
.work-card-body h4 { font-family: var(--font-serif); font-size: 1.05rem; color: var(--text-heading); margin-bottom: 6px; }
.work-card-body p { font-size: 0.86rem; color: var(--text-light); line-height: 1.7; }

/* === 实验室 === */
.lab { background: var(--bg-warm); position: relative; overflow: hidden; }
.lab::before { content: ''; position: absolute; inset: 0; background-image: linear-gradient(rgba(122,158,126,0.04) 1px, transparent 1px), linear-gradient(90deg, rgba(122,158,126,0.04) 1px, transparent 1px); background-size: 50px 50px; pointer-events: none; }
.lab-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; position: relative; z-index: 1; }
.lab-card { background: var(--bg-card); border: 2px solid var(--border); border-radius: var(--radius); padding: 32px 24px; text-align: center; transition: all 0.3s var(--ease); position: relative; overflow: hidden; }
.lab-card::before { content: '⚡'; position: absolute; top: 10px; right: 14px; font-size: 0.85rem; opacity: 0.3; }
.lab-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--sage-light); }
.lab-icon { font-size: 2rem; margin-bottom: 14px; }
.lab-card h3 { font-family: var(--font-serif); font-size: 1.05rem; color: var(--text-heading); margin-bottom: 8px; }
.lab-card p { font-size: 0.88rem; color: var(--text-light); line-height: 1.75; }

/* === 创作日志 === */
.blog { background: var(--bg); }
.blog-list { display: flex; flex-direction: column; gap: 4px; }
.blog-item { padding: 24px 28px; border-radius: var(--radius); border: 1.5px solid transparent; transition: all 0.25s var(--ease); position: relative; }
.blog-item::before { content: ''; position: absolute; left: 10px; top: 24px; bottom: 24px; width: 2px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 2 20'%3E%3Cpath d='M1,0 Q0,5 1,10 Q2,15 1,20' stroke='%23E8DFD5' fill='none' stroke-width='1.5'/%3E%3C/svg%3E") repeat-y; background-size: 2px 20px; }
.blog-item:hover { background: var(--bg-card); border-color: var(--border); }
.blog-meta { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.blog-date { font-size: 0.8rem; color: var(--text-light); }
.blog-tag { font-size: 0.73rem; color: var(--sage); background: var(--sage-pale); padding: 2px 10px; border-radius: 6px; }
.blog-title { font-family: var(--font-serif); font-size: 1.1rem; color: var(--text-heading); margin-bottom: 6px; transition: color 0.2s; }
.blog-item:hover .blog-title { color: var(--sage); }
.blog-excerpt { font-size: 0.88rem; color: var(--text-light); line-height: 1.75; margin-bottom: 10px; }
.blog-readmore { font-size: 0.83rem; color: var(--sage); font-weight: 500; transition: all 0.2s; font-style: italic; }
.blog-readmore:hover { letter-spacing: 0.08em; }

/* === 白日梦岛 === */
.daydream { background: var(--bg-warm); }
.daydream-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.daydream-card { background: var(--bg-card); border: 2px solid var(--border); border-radius: var(--radius); padding: 32px 24px; transition: all 0.3s var(--ease); position: relative; }
.daydream-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--sage-light); }
.daydream-icon { font-size: 1.8rem; margin-bottom: 14px; display: block; }
.daydream-card h3 { font-family: var(--font-serif); font-size: 1.05rem; color: var(--text-heading); margin-bottom: 10px; }
.daydream-card p { font-size: 0.88rem; color: var(--text-light); line-height: 1.8; }

/* === 失败博物馆 === */
.failures { background: var(--bg); }
.failure-cards { max-width: 720px; margin: 0 auto; }
.failure-card { background: var(--bg-card); border: 2px solid var(--border); border-radius: var(--radius-lg); padding: 36px 32px; transition: all 0.3s var(--ease); }
.failure-card:hover { box-shadow: var(--shadow-md); border-color: rgba(230,162,60,0.4); }
.failure-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.failure-status { display: inline-block; font-size: 0.78rem; color: white; background: var(--orange); padding: 3px 12px; border-radius: 6px; }
.failure-date { font-size: 0.82rem; color: var(--text-light); }
.failure-card h3 { font-family: var(--font-serif); font-size: 1.3rem; color: var(--text-heading); margin-bottom: 20px; }
.failure-body { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.failure-section h4 { font-size: 0.82rem; color: var(--sage); letter-spacing: 0.08em; margin-bottom: 8px; font-weight: 500; }
.failure-section p { font-size: 0.88rem; color: var(--text-light); line-height: 1.75; }

/* === 给未来的自己 === */
.future-letter { background: var(--bg-warm); }
.letter-card { max-width: 640px; margin: 0 auto; background: var(--bg-card); border: 2px solid var(--border); border-radius: var(--radius-lg); padding: 40px 36px; position: relative; }
.letter-card::before { content: '✉️'; position: absolute; top: -18px; left: 36px; font-size: 1.6rem; }
.letter-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1.5px dashed var(--border); }
.letter-to { font-family: var(--font-serif); font-size: 1.1rem; color: var(--text-heading); font-weight: 600; }
.letter-from { font-size: 0.82rem; color: var(--text-light); font-style: italic; }
.letter-body p { font-size: 0.92rem; color: var(--text); line-height: 2; margin-bottom: 16px; }
.letter-sign { font-family: var(--font-serif); color: var(--sage); font-style: italic; margin-top: 24px; padding-top: 16px; border-top: 1px dashed var(--border); }

/* === 联系我 === */
.contact { background: var(--bg); }
.contact-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; max-width: 520px; margin: 0 auto; }
.contact-card { text-align: center; background: var(--bg-card); border: 2px solid var(--border); border-radius: var(--radius); padding: 32px 20px; transition: all 0.3s var(--ease); }
.contact-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--sage-light); }
.contact-icon { font-size: 2rem; margin-bottom: 14px; }
.contact-card h3 { font-family: var(--font-serif); font-size: 1rem; color: var(--text-heading); margin-bottom: 8px; }
.contact-value { font-size: 0.95rem; color: var(--sage); font-weight: 500; margin-bottom: 6px; }
.contact-note { font-size: 0.8rem; color: var(--text-light); }

/* === Footer === */
.footer { background: var(--text-heading); color: rgba(255,255,255,0.65); padding: 48px 0 24px; position: relative; z-index: 1; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; margin-bottom: 32px; }
.footer-logo { font-family: var(--font-serif); font-size: 1.05rem; color: white; margin-bottom: 4px; }
.footer-tagline { font-family: var(--font-serif); font-size: 0.83rem; color: rgba(255,255,255,0.35); font-style: italic; }
.footer-links { display: flex; gap: 24px; }
.footer-links a { font-size: 0.85rem; color: rgba(255,255,255,0.5); transition: color 0.2s; }
.footer-links a:hover { color: white; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); padding-top: 20px; text-align: center; font-size: 0.8rem; color: rgba(255,255,255,0.3); }

/* === 滚动动画 === */
.fade-in { opacity: 0; transform: translateY(20px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.fade-in.visible { opacity: 1; transform: translateY(0); }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* === 响应式 === */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-map { order: -1; max-width: 320px; margin: 0 auto; }
  .hero-title::after { left: 50%; transform: translateX(-50%); width: 60%; }
  .hero-buttons { justify-content: center; }
  .road-sign { margin-left: auto; margin-right: auto; }
  .about-cards { grid-template-columns: 1fr; }
  .work-cards { grid-template-columns: 1fr; }
  .lab-cards { grid-template-columns: 1fr; }
  .map-grid { grid-template-columns: repeat(2, 1fr); }
  .daydream-cards { grid-template-columns: 1fr; }
  .failure-body { grid-template-columns: 1fr; gap: 16px; }
  .contact-cards { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; gap: 20px; text-align: center; }
  .timeline { padding-left: 60px; }
  .timeline-year { left: -60px; font-size: 0.95rem; }
}

@media (max-width: 600px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .nav-links.open { display: flex; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: rgba(250,247,242,0.98); backdrop-filter: blur(12px); padding: 16px 24px; gap: 14px; border-bottom: 2px solid var(--border); }
  .section { padding: 64px 0; }
  .hero { padding: 100px 16px 48px; min-height: auto; }
  .map-grid { grid-template-columns: 1fr 1fr; }
  .blog-item { padding: 18px 16px; }
  .blog-item::before { display: none; }
  .letter-card { padding: 28px 20px; }
  .failure-card { padding: 24px 20px; }
}
