/* ============ 变量与基础（暖纸底 + 咖啡单主色） ============ */
:root {
  --bg: #f6f2ea;
  --bg-2: #ece5da;
  --surface: #ffffff;
  --surface-2: #ffffff;
  --text: #2a2523;
  --text-dim: #7c7168;
  --border: #e6ded2;

  /* 拿铁咖啡 */
  --accent: #8f6f55;
  --accent-dark: #755a44;
  --accent-soft: #f1e9e0;
  --thumb-1: #bda48d;
  --thumb-2: #a89e92;
  --thumb-3: #b5a89a;
  --thumb-4: #c6b49a;
  --wing: #d8bfa9;

  --radius: 14px;
  --radius-lg: 18px;
  --shadow: 0 6px 20px rgba(74, 60, 48, 0.07);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

/* ============ 背景装饰 ============ */
.bg-decor {
  position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
}
.blob {
  position: absolute; border-radius: 50%; filter: blur(120px); opacity: 0.5;
}
.blob-1 { width: 520px; height: 520px; background: #ece5da; top: -140px; left: -120px; }
.blob-2 { width: 480px; height: 480px; background: #f0e3db; top: 45%; right: -160px; }
.blob-3 { width: 420px; height: 420px; background: #ece5da; bottom: -140px; left: 35%; }

/* ============ 导航 ============ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background 0.3s, backdrop-filter 0.3s;
}
.nav.scrolled {
  background: rgba(246, 242, 234, 0.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1200px; margin: 0 auto; padding: 18px 28px;
  display: flex; align-items: center; justify-content: space-between;
}
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 22px; }
.logo-icon { flex-shrink: 0; }
.logo-hex { fill: var(--accent); transition: fill 0.25s; }
.logo-text { letter-spacing: -0.5px; }
.logo-accent { color: var(--accent); }
.nav-links { display: flex; gap: 32px; list-style: none; }
.nav-links a {
  color: var(--text-dim); font-weight: 500; font-size: 15px;
  transition: color 0.2s; position: relative;
}
.nav-links a:hover { color: var(--text); }
.nav-links a::after {
  content: ''; position: absolute; bottom: -6px; left: 0; right: 0; height: 2px;
  background: var(--accent); transform: scaleX(0); transition: transform 0.25s;
  border-radius: 2px;
}
.nav-links a:hover::after { transform: scaleX(1); }
.nav-toggle { display: none; flex-direction: column; gap: 5px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: 0.3s; }

/* ============ 通用 Section ============ */
.section {
  max-width: 1200px; margin: 0 auto; padding: 120px 28px;
}
.section-tag {
  display: inline-block; padding: 6px 16px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border);
  font-size: 13px; font-weight: 600; color: var(--text-dim);
  margin-bottom: 18px;
}
.section-tag.light { background: var(--surface); color: var(--text-dim); border-color: var(--border); }
.section-title {
  font-size: clamp(32px, 5vw, 52px); font-weight: 800; line-height: 1.15;
  letter-spacing: -1px; margin-bottom: 48px;
}
.section-title.light { color: var(--text); }

.gradient-text { color: var(--accent); }

/* ============ Hero ============ */
.hero {
  min-height: 100vh; max-width: 1200px; margin: 0 auto;
  padding: 140px 28px 80px; display: grid;
  grid-template-columns: 1.1fr 0.9fr; gap: 60px; align-items: center;
}
.hero-tag {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border);
  font-size: 13px; font-weight: 500; color: var(--text-dim); margin-bottom: 28px;
}
.pulse-dot {
  width: 7px; height: 7px; border-radius: 50%; background: #5d7c62;
}
.hero-title { font-size: clamp(40px, 7vw, 72px); font-weight: 900; line-height: 1.08; letter-spacing: -2px; }
.hero-title .line { display: block; }
.hero-sub { font-size: 18px; color: var(--text-dim); margin: 28px 0 36px; max-width: 520px; }
.hero-sub strong { color: var(--text); }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 56px; }
.hero-stats { display: flex; gap: 40px; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; }
.stat b { font-size: 36px; font-weight: 800; color: var(--accent); }
.stat span { font-size: 13px; color: var(--text-dim); }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 26px; border-radius: 8px; font-weight: 600; font-size: 15px;
  transition: background 0.2s, border-color 0.2s; white-space: nowrap;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-ghost { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-block { width: 100%; justify-content: center; }

/* Hero 视觉 */
.hero-visual { position: relative; display: flex; justify-content: center; align-items: center; }
.hex-stage { position: relative; width: 380px; height: 380px; max-width: 100%; }
.hex-ring {
  position: absolute; inset: 0; border-radius: 50%;
  border: 1px dashed var(--border);
  animation: spin 40s linear infinite;
}
.hex-ring-2 { inset: 40px; border-style: solid; border-color: #e8e0d4; animation-duration: 30s; animation-direction: reverse; }
.hex-ring-3 { inset: 80px; border-style: dotted; border-color: #e8e0d4; animation-duration: 24s; }
@keyframes spin { to { transform: rotate(360deg); } }
.owl-mascot {
  position: absolute; inset: 84px; width: calc(100% - 168px); height: calc(100% - 168px);
  filter: drop-shadow(0 10px 20px rgba(74,60,48,0.14));
}
.owl-mascot .owl-body {
  fill: var(--accent);
  stroke: var(--accent-dark);
  stroke-width: 3;
  stroke-linejoin: round;
}
.owl-mascot .wing { stroke: var(--wing); }
.owl-mascot .eye-white { fill: #fff; }
.owl-mascot .eye-pupil { fill: #2a2523; }
.owl-mascot .eye-shine { fill: #fff; }
.owl-mascot .beak { fill: #3a2c24; }

/* ============ About ============ */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.about-text p { font-size: 17px; color: var(--text-dim); margin-bottom: 20px; }
.tags { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.tags span {
  padding: 8px 16px; border-radius: 999px; font-size: 13px; font-weight: 500;
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  transition: 0.2s;
}
.tags span:hover { border-color: var(--accent); color: var(--accent); }
.about-cards { display: flex; flex-direction: column; gap: 16px; }
.accent-card {
  padding: 24px; border-radius: var(--radius); background: var(--surface);
  border: 1px solid var(--border); transition: border-color 0.2s;
}
.accent-card:hover { border-color: var(--accent); }
.accent-card.alt { border-left: 3px solid var(--accent); }
.accent-num { font-size: 13px; font-weight: 700; color: var(--accent); margin-bottom: 6px; letter-spacing: 1px; }
.accent-title { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.accent-card p { font-size: 14px; color: var(--text-dim); }

/* ============ Works ============ */
.works-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.work-card {
  border-radius: var(--radius-lg); overflow: hidden;
  background: var(--surface); border: 1px solid var(--border);
  transition: transform 0.3s, box-shadow 0.3s;
}
.work-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.work-thumb {
  position: relative; height: 220px; overflow: hidden;
  display: flex; align-items: flex-end; padding: 16px;
}
.hex-pattern {
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='52' viewBox='0 0 60 52'%3E%3Cpolygon points='30,2 56,17 56,35 30,50 4,35 4,17' fill='none' stroke='%23ffffff' stroke-opacity='0.16' stroke-width='1'/%3E%3C/svg%3E");
  background-size: 60px 52px;
}
.work-thumb-1 { background: var(--thumb-1); }
.work-thumb-2 { background: var(--thumb-2); }
.work-thumb-3 { background: var(--thumb-3); }
.work-thumb-4 { background: var(--thumb-4); }
.work-cat {
  position: relative; padding: 5px 12px; border-radius: 4px;
  background: rgba(42,37,35,0.5);
  font-size: 12px; font-weight: 600; color: #fff; letter-spacing: 0.3px;
}
.work-body { padding: 22px 24px; }
.work-body h3 { font-size: 19px; font-weight: 700; margin-bottom: 8px; }
.work-body p { font-size: 14px; color: var(--text-dim); }

/* ============ Skills ============ */
.skills-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px 48px; }
.skill-item { display: flex; flex-direction: column; gap: 10px; }
.skill-head { display: flex; justify-content: space-between; font-weight: 600; font-size: 15px; }
.skill-head span:last-child { color: var(--text-dim); font-variant-numeric: tabular-nums; }
.skill-bar { height: 6px; border-radius: 3px; background: var(--bg-2); overflow: hidden; }
.skill-fill {
  height: 100%; width: 0; border-radius: 3px;
  background: var(--accent);
  transition: width 1.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.skill-fill.in-view { width: var(--w); }

/* ============ Contact ============ */
.contact-card {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
  border-radius: var(--radius-lg); overflow: hidden;
  background: var(--surface); border: 1px solid var(--border);
}
.contact-left { padding: 48px; }
.contact-desc { color: var(--text-dim); font-size: 16px; margin-bottom: 32px; }
.contact-channels { display: flex; flex-direction: column; gap: 12px; }
.channel {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-radius: 8px;
  background: var(--surface); border: 1px solid var(--border);
  font-weight: 500; transition: border-color 0.2s, color 0.2s;
}
.channel:hover { border-color: var(--accent); color: var(--accent); }
.contact-form { padding: 48px; background: var(--bg-2); border-left: 1px solid var(--border); display: flex; flex-direction: column; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 13px; font-weight: 600; color: var(--text-dim); }
.field input, .field textarea {
  padding: 12px 14px; border-radius: 8px;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text); font-size: 15px; font-family: inherit;
  transition: border-color 0.2s; resize: vertical;
}
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--accent);
}

/* ============ Footer ============ */
.footer { padding: 40px 28px; border-top: 1px solid var(--border); margin-top: 40px; }
.footer-inner { max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.footer-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.footer-copy { font-size: 13px; color: var(--text-dim); }

/* ============ 滚动动画 ============ */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.7s, transform 0.7s; }
.reveal.in-view { opacity: 1; transform: none; }

/* ============ 响应式 ============ */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; text-align: center; padding-top: 120px; }
  .hero-sub { margin-left: auto; margin-right: auto; }
  .hero-actions, .hero-stats { justify-content: center; }
  .hero-visual { order: -1; }
  .hex-stage { width: 280px; height: 280px; }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .works-grid, .skills-grid { grid-template-columns: 1fr; }
  .contact-card { grid-template-columns: 1fr; }
  .contact-form { border-left: none; border-top: 1px solid var(--border); }
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
}
@media (max-width: 600px) {
  .section { padding: 80px 20px; }
  .nav-inner { padding: 14px 20px; }
  .hero { padding: 110px 20px 60px; }
  .contact-left, .contact-form { padding: 32px 24px; }
  .hero-stats { gap: 24px; }
  .stat b { font-size: 28px; }
}
