/* ============ 基础 ============ */
@font-face {
  font-family: 'Smiley Sans';
  src: url('../assets/fonts/SmileySans-Oblique.woff2') format('woff2');
  font-display: swap;
}

:root {
  --bg: #FAF6EF;        /* 暖米白 */
  --ink: #1E1A17;       /* 墨黑 */
  --red: #A61B2E;       /* 小丑红 */
  --khaki: #C9B48E;     /* 卡其（取自 IP 形象） */
  --font-display: 'Smiley Sans', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-body: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  /* 点状纸面纹理 */
  background-image: radial-gradient(circle, rgba(30,26,23,.07) 1.2px, transparent 1.2px);
  background-size: 26px 26px;
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.75;
}

h1, h2, h3, .display { font-family: var(--font-display); font-weight: normal; }

/* ============ 导航 ============ */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 10px 5vw;
  background: var(--bg);
  border-bottom: 2px solid var(--ink);
}
.nav-brand {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-display); font-size: 1.25rem; color: var(--ink); text-decoration: none;
}
.nav-brand img { border-radius: 6px; }
.nav-links { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a {
  color: var(--ink); text-decoration: none; white-space: nowrap;
  padding: 4px 12px; border-radius: 999px; font-size: .95rem;
}
.nav-links a:hover { background: var(--red); color: var(--bg); }

/* ============ Hero ============ */
.hero {
  display: grid; grid-template-columns: 7fr 5fr; align-items: center; gap: 4vw;
  padding: clamp(48px, 9vh, 120px) 5vw clamp(40px, 7vh, 96px); max-width: 1200px; margin: 0 auto;
}
.hero-hello { font-size: 1.1rem; margin: 0 0 -8px; color: var(--red); }
.hero h1 {
  font-size: clamp(4rem, 10vw, 7.5rem); line-height: 1.05; margin: 0;
  letter-spacing: .02em;
}
.hero-tagline { font-family: var(--font-display); font-size: clamp(1.4rem, 3vw, 2rem); margin: 12px 0 4px; }
.hero-tagline .x { color: var(--red); }
.hero-sub { max-width: 34em; opacity: .8; margin: 10px 0 28px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

.btn {
  display: inline-block; padding: 10px 26px; border-radius: 999px;
  font-family: var(--font-display); font-size: 1.15rem; text-decoration: none;
  border: 2.5px solid var(--ink);
  transition: transform .18s ease, box-shadow .18s ease;
}
.btn-primary { background: var(--red); color: var(--bg); transform: rotate(-1.5deg); box-shadow: 4px 4px 0 var(--ink); }
.btn-primary:hover { transform: rotate(-1.5deg) translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.btn-ghost { background: transparent; color: var(--ink); transform: rotate(.8deg); }
.btn-ghost:hover { background: var(--ink); color: var(--bg); }

.hero-figure { margin: 0; position: relative; justify-self: center; }
.hero-figure img {
  display: block; width: min(100%, 450px); height: auto;
  border: 3px solid var(--ink); border-radius: 46% 46% 24px 24px / 38% 38% 24px 24px; /* 拱形相框 */
  background: #fff;
}
.hero-doodle {
  position: absolute; top: -10px; left: -18px;
  font-family: var(--font-display); color: var(--red); font-size: 1.15rem;
  transform: rotate(-7deg);
  background: var(--bg); border: 2px solid var(--red); border-radius: 999px;
  padding: 2px 14px;
}

/* ============ 跑马灯色带 ============ */
.marquee { overflow: hidden; background: var(--red); border-block: 2px solid var(--ink); }
.marquee-track {
  display: inline-block; white-space: nowrap; padding: 8px 0;
  font-family: var(--font-display); font-size: 1.15rem; color: var(--bg);
  animation: marquee 22s linear infinite;
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* ============ 区块通用 ============ */
.section { max-width: 1200px; margin: 0 auto; padding: clamp(56px, 9vh, 120px) 5vw clamp(24px, 4vh, 56px); }
.section-band { max-width: none; background: rgba(201, 180, 142, .18); border-block: 2px dashed var(--khaki); }
.section-band > * { max-width: 1100px; margin-left: auto; margin-right: auto; }

.section-title {
  font-size: clamp(2.2rem, 5vw, 3.4rem); margin: 0 0 10px; line-height: 1.15;
}
.section-title .idx {
  font-style: normal; font-size: .45em; color: var(--red);
  vertical-align: .9em; margin-right: .5em; letter-spacing: .05em;
}
.section-desc { margin: 0 0 34px; opacity: .75; }

/* ============ 关于我 ============ */
.about-grid { display: grid; grid-template-columns: 5fr 6fr; gap: 5vw; align-items: start; }
.about-intro p:first-child { font-size: 1.15rem; }
.about-intro p { margin-top: 0; }

.tags-cloud { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.tags-cloud span {
  border: 2px solid var(--ink); border-radius: 999px; padding: 3px 14px;
  font-size: .88rem; background: #fff;
}
.tags-cloud span:nth-child(3n) { transform: rotate(1.5deg); background: rgba(166,27,46,.08); }
.tags-cloud span:nth-child(3n+1) { transform: rotate(-1deg); }

.timeline { list-style: none; margin: 0; padding: 0 0 0 26px; border-left: 2.5px solid var(--ink); }
.timeline li { position: relative; padding-bottom: 26px; }
.timeline li::before {
  content: ''; position: absolute; left: -34.5px; top: 8px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--red); border: 2.5px solid var(--ink);
}
.timeline b { display: block; font-family: var(--font-display); color: var(--red); font-size: 1.05rem; }
.timeline strong { display: block; font-size: 1.05rem; }
.timeline span { display: block; font-size: .92rem; opacity: .72; }

/* ============ 卡片网格 ============ */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 30px; }
.card {
  display: block; background: #fff; color: var(--ink); text-decoration: none;
  border: 2.5px solid var(--ink); border-radius: 16px; padding: 14px 14px 18px;
  box-shadow: 5px 5px 0 var(--ink);
  transition: transform .18s ease, box-shadow .18s ease;
}
.grid .card:nth-child(odd) { transform: rotate(-.7deg); }
.grid .card:nth-child(even) { transform: rotate(.7deg); }
.card:hover { transform: rotate(0) translate(-3px, -3px); box-shadow: 8px 8px 0 var(--red); }

.card img { width: 100%; height: auto; aspect-ratio: 2 / 1; object-fit: cover; border-radius: 8px; border: 1.5px solid var(--ink); }
.card h3 { font-size: 1.45rem; margin: 12px 0 4px; }
.card p { margin: 0; font-size: .92rem; opacity: .8; }
.card .tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.card .tags span {
  font-size: .78rem; padding: 1px 10px; border-radius: 999px;
  background: rgba(166,27,46,.09); color: var(--red);
}
.grid-skill .card img { aspect-ratio: 2 / 1; }

/* ============ AI 实践清单 ============ */
.practice-list { margin: 30px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.practice-list li {
  background: #fff; border: 2px dashed var(--ink); border-radius: 12px;
  padding: 10px 18px; font-size: .95rem;
}
.practice-list li::marker { content: ''; }
.practice-list b { color: var(--red); }

/* ============ 小红书 ============ */
.xhs-wrap { display: grid; grid-template-columns: 1fr auto; gap: 5vw; align-items: center; padding-block: 10px; }
.xhs-big { font-family: var(--font-display); font-size: clamp(1.5rem, 3vw, 2.1rem); margin: 0 0 10px; line-height: 1.4; }
.xhs-qr { margin: 0; text-align: center; }
.xhs-qr img {
  width: 180px; height: 180px; background: #fff;
  border: 2.5px solid var(--ink); border-radius: 14px; padding: 10px;
  box-shadow: 4px 4px 0 var(--ink); transform: rotate(2deg);
}
.xhs-qr figcaption { font-family: var(--font-display); margin-top: 10px; color: var(--red); transform: rotate(-2deg); }

/* ============ 联系 ============ */
.contact-row { display: flex; flex-wrap: wrap; gap: 18px; }
.contact-item {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 22px; border: 2.5px solid var(--ink); border-radius: 999px;
  background: #fff; color: var(--ink); text-decoration: none; font-size: 1rem;
  transition: transform .15s ease, background .15s ease, color .15s ease;
}
.contact-item:hover { background: var(--red); border-color: var(--red); color: #fff; transform: translateY(-3px) rotate(-1deg); }
.contact-item svg { flex: none; }

/* ============ 页脚 ============ */
.footer {
  margin-top: clamp(40px, 8vh, 96px); padding: 40px 5vw 46px; text-align: center;
  border-top: 2px solid var(--ink);
}
.footer-jester { border-radius: 14px; transform: rotate(-5deg); transition: transform .3s ease; }
.footer-jester:hover { transform: rotate(5deg) scale(1.06); }
.footer p { margin: 14px 0 0; font-size: .9rem; opacity: .65; }

/* ============ 动效 ============ */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease-out, transform .6s ease-out; }
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee-track { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .card, .contact-item, .footer-jester { transition: none; }
}

/* ============ 响应式 ============ */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding-top: 6vh; text-align: center; }
  .hero-figure { order: -1; }
  .hero-figure img { width: min(72vw, 340px); }
  .hero-actions { justify-content: center; }
  .hero-sub { margin-inline: auto; }
  .about-grid { grid-template-columns: 1fr; }
  .xhs-wrap { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .section { padding-top: 7vh; }
}
