/* ============================================================
   Sakurumii 个人站 · 共享主题样式
   粉色樱花系 · 响应式 · 自定义光标
   ============================================================ */

:root {
  --bg: #fff6f1;
  --bg-soft: #fdece6;
  --surface: #ffffff;
  --ink: #40283a;
  --ink-2: #6e4f63;
  --ink-3: #a1869a;
  --sakura: #f48fb1;
  --sakura-deep: #e8608f;
  --sakura-soft: #fbd9e6;
  --plum: #5a3549;
  --line: #f3d9e2;
  --shadow: 0 12px 34px rgba(232, 96, 143, 0.12);
  --shadow-sm: 0 6px 18px rgba(232, 96, 143, 0.10);
  --radius: 20px;
  --radius-sm: 12px;
  --maxw: 1080px;
  --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  --font-display: "ZCOOL KuaiLe", "Noto Sans SC", "PingFang SC", sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.75;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---------- 自定义光标 ---------- */
.cursor-dot,
.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  border-radius: 50%;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.cursor-dot {
  width: 8px;
  height: 8px;
  background: var(--sakura-deep);
  box-shadow: 0 0 10px rgba(232, 96, 143, 0.85);
}
.cursor-ring {
  width: 34px;
  height: 34px;
  border: 1.5px solid rgba(232, 96, 143, 0.55);
  transition: transform 0.18s ease, width 0.18s ease, height 0.18s ease, border-color 0.18s ease, opacity 0.25s ease;
}
body.cursor-on .cursor-dot,
body.cursor-on .cursor-ring { opacity: 1; }
body.cursor-hot .cursor-ring {
  width: 52px;
  height: 52px;
  border-color: rgba(232, 96, 143, 0.9);
  background: rgba(251, 217, 230, 0.25);
}
@media (hover: none), (prefers-reduced-motion: reduce) {
  .cursor-dot, .cursor-ring { display: none !important; }
}

/* ---------- 布局 ---------- */
.container {
  width: min(92%, var(--maxw));
  margin-inline: auto;
}

/* ---------- 顶部导航 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 246, 241, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 66px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--plum);
  text-decoration: none;
  letter-spacing: 0.02em;
}
.brand svg { width: 26px; height: 26px; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
}
.nav-links a {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--ink-2);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s ease, background 0.2s ease;
}
.nav-links a:hover { color: var(--sakura-deep); background: var(--sakura-soft); }
.nav-links a.active { color: var(--sakura-deep); background: var(--sakura-soft); }
.nav-links .nav-cta {
  background: var(--sakura-deep);
  color: #fff;
  margin-left: 8px;
  padding: 8px 18px;
}
.nav-links .nav-cta:hover { background: #d4527f; color: #fff; }
.nav-toggle {
  display: none;
  background: none;
  border: 1.5px solid var(--sakura);
  border-radius: 10px;
  padding: 9px 10px;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--sakura-deep);
}
.nav-toggle svg { display: block; width: 22px; height: 22px; }

/* ---------- 首页 Hero ---------- */
.hero {
  position: relative;
  padding: 64px 0 72px;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(560px 300px at 82% 12%, rgba(244, 143, 177, 0.20), transparent 65%),
    radial-gradient(480px 300px at 12% 85%, rgba(251, 217, 230, 0.55), transparent 60%);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 48px;
  align-items: center;
}
.hero-copy h1 {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 6vw, 4.2rem);
  line-height: 1.15;
  color: var(--plum);
  letter-spacing: 0.03em;
  margin-bottom: 14px;
}
.hero-copy h1 .hl {
  display: inline-block;
  position: relative;
  color: var(--sakura-deep);
}
.hero-copy h1 .hl svg {
  position: absolute;
  left: -6%;
  bottom: -10%;
  width: 112%;
  height: 14px;
  color: var(--sakura);
}
.hero-tagline {
  font-size: 1.12rem;
  color: var(--ink-2);
  max-width: 30em;
  margin-bottom: 26px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 0.98rem;
  font-weight: 500;
  text-decoration: none;
  border: 1.5px solid transparent;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--sakura-deep); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { transform: translateY(-2px); background: #d4527f; }
.btn-ghost { color: var(--plum); border-color: var(--sakura); background: rgba(255,255,255,0.6); }
.btn-ghost:hover { transform: translateY(-2px); background: #fff; }

.hero-portrait {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}
.portrait-wrap {
  position: relative;
  width: min(320px, 78vw);
}
.portrait-wrap::before {
  content: "";
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  border: 2px dashed var(--sakura);
  opacity: 0.8;
  animation: spin 26s linear infinite;
}
.portrait-wrap img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 50%;
  border: 6px solid #fff;
  box-shadow: var(--shadow);
}
.portrait-badge {
  position: absolute;
  bottom: 4%;
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border: 1.5px solid var(--sakura);
  color: var(--sakura-deep);
  font-size: 0.85rem;
  padding: 6px 16px;
  border-radius: 999px;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 花瓣 ---------- */
.petal {
  position: absolute;
  pointer-events: none;
  opacity: 0.75;
  animation: petal-fall linear infinite;
  z-index: 0;
}
@keyframes petal-fall {
  0%   { transform: translateY(-6vh) translateX(0) rotate(0deg); }
  100% { transform: translateY(104vh) translateX(6vw) rotate(300deg); }
}

/* ---------- 区块通用 ---------- */
.section { padding: 64px 0; }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.section-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--plum);
  display: flex;
  align-items: center;
  gap: 12px;
}
.section-title svg { width: 26px; height: 26px; color: var(--sakura-deep); }
.section-link {
  color: var(--sakura-deep);
  text-decoration: none;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 2px;
}
.section-link svg { width: 16px; height: 16px; }
.section-link:hover { text-decoration: underline; }

/* ---------- 关于 ---------- */
.about-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.about-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 22px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.about-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.about-card .card-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--sakura-soft);
  color: var(--sakura-deep);
  display: grid;
  place-items: center;
  margin-bottom: 14px;
}
.about-card .card-icon svg { width: 22px; height: 22px; }
.about-card h3 { font-size: 1.06rem; color: var(--plum); margin-bottom: 6px; }
.about-card p { font-size: 0.93rem; color: var(--ink-2); }

.about-note {
  margin-top: 22px;
  background: var(--sakura-soft);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  font-size: 0.95rem;
  color: var(--plum);
  display: flex;
  align-items: center;
  gap: 10px;
}
.about-note svg { width: 20px; height: 20px; flex: none; color: var(--sakura-deep); }

/* ---------- 文章卡片 ---------- */
.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.post-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.post-card-cover {
  height: 130px;
  background: linear-gradient(135deg, var(--sakura-soft), #ffe9f1 55%, var(--bg-soft));
  display: grid;
  place-items: center;
}
.post-card-cover svg { width: 44px; height: 44px; color: var(--sakura-deep); opacity: 0.9; }
.post-card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.post-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  color: var(--ink-3);
}
.post-card-meta .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--sakura); }
.post-card-body h3 { font-size: 1.05rem; line-height: 1.5; color: var(--plum); }
.post-card-body p { font-size: 0.9rem; color: var(--ink-2); flex: 1; }
.post-card-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  display: inline-block;
  font-size: 0.8rem;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--sakura-deep);
  border: 1px solid var(--line);
}
.tag-pink { background: var(--sakura-soft); }

/* ---------- 页脚 ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 34px 0;
  margin-top: 40px;
  background: var(--bg-soft);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}
.footer-brand { font-family: var(--font-display); color: var(--plum); font-size: 1.1rem; }
.footer-meta { color: var(--ink-3); font-size: 0.85rem; text-align: right; }
.footer-meta .cf-logo { display: inline-flex; align-items: center; gap: 8px; }
.footer-meta .cf-logo img { height: 20px; width: auto; }
.footer-heart { color: var(--sakura-deep); display: inline-flex; vertical-align: middle; }
.footer-heart svg { width: 15px; height: 15px; }

/* ---------- 博客列表页 ---------- */
.blog-hero {
  position: relative;
  padding: 56px 0 40px;
  overflow: hidden;
}
.blog-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(420px 220px at 88% 20%, rgba(244, 143, 177, 0.18), transparent 65%);
  pointer-events: none;
}
.blog-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 4.5vw, 3.1rem);
  color: var(--plum);
  line-height: 1.25;
}
.blog-hero p { color: var(--ink-2); margin-top: 10px; max-width: 42em; }

.blog-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}
.blog-toolbar .count { font-size: 0.9rem; color: var(--ink-3); }
.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 8px 16px;
  min-width: 240px;
}
.search-box svg { width: 17px; height: 17px; color: var(--ink-3); flex: none; }
.search-box input {
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: var(--ink);
  width: 100%;
}
.tag-filter { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-filter button {
  border: 1.5px solid var(--line);
  background: #fff;
  color: var(--ink-2);
  font-family: var(--font-body);
  font-size: 0.82rem;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.18s ease;
}
.tag-filter button:hover { border-color: var(--sakura); color: var(--sakura-deep); }
.tag-filter button.on { background: var(--sakura-deep); border-color: var(--sakura-deep); color: #fff; }

.blog-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.blog-grid .post-card { flex-direction: row; align-items: stretch; }
.blog-grid .post-card-cover {
  width: 120px;
  height: auto;
  min-height: 100%;
  flex: none;
}
.blog-grid .post-card-body { padding: 16px 18px; }
.empty-tip {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--ink-3);
  padding: 48px 0;
  font-size: 0.95rem;
}
.empty-tip svg { width: 40px; height: 40px; margin: 0 auto 12px; display: block; color: var(--sakura); }

/* ---------- 文章详情页 ---------- */
.article-wrap { max-width: 760px; margin-inline: auto; }
.article-head { padding: 44px 0 30px; }
.article-head h1 {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  line-height: 1.35;
  color: var(--plum);
  margin: 14px 0 10px;
}
.article-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--ink-3);
  font-size: 0.88rem;
}
.article-meta .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--sakura); }
.article-cover {
  height: 220px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--sakura-soft), #ffe9f1 55%, var(--bg-soft));
  display: grid;
  place-items: center;
  margin-bottom: 30px;
  border: 1px solid var(--line);
}
.article-cover svg { width: 64px; height: 64px; color: var(--sakura-deep); opacity: 0.9; }
.article-body {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px 40px;
  box-shadow: var(--shadow-sm);
}
.article-body p { margin-bottom: 1.05em; color: var(--ink); }
.article-body h2 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--plum);
  margin: 1.5em 0 0.6em;
  padding-left: 12px;
  border-left: 4px solid var(--sakura);
  line-height: 1.4;
}
.article-body h3 { font-size: 1.08rem; color: var(--plum); margin: 1.3em 0 0.5em; }
.article-body ul, .article-body ol { margin: 0 0 1.05em 1.4em; }
.article-body li { margin-bottom: 0.35em; }
.article-body blockquote {
  margin: 1.2em 0;
  padding: 12px 18px;
  border-left: 4px solid var(--sakura);
  background: var(--bg-soft);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--ink-2);
}
.article-body code {
  font-family: "JetBrains Mono", Consolas, "Courier New", monospace;
  font-size: 0.88em;
  background: var(--bg-soft);
  color: var(--sakura-deep);
  padding: 2px 6px;
  border-radius: 6px;
}
.article-body pre {
  background: #3a2431;
  color: #ffd9e6;
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  overflow-x: auto;
  margin: 1.1em 0;
  font-size: 0.86rem;
  line-height: 1.6;
}
.article-body pre code { background: none; color: inherit; padding: 0; }
.article-body a { color: var(--sakura-deep); }
.article-body img { max-width: 100%; border-radius: var(--radius-sm); }
.article-nav {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 26px;
  flex-wrap: wrap;
}
.article-nav a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: #fff;
  color: var(--ink-2);
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.18s ease;
}
.article-nav a:hover { border-color: var(--sakura); color: var(--sakura-deep); }
.article-nav svg { width: 15px; height: 15px; }
.article-loading, .article-missing {
  text-align: center;
  padding: 80px 0;
  color: var(--ink-3);
}

/* ---------- 骨架 / 加载 ---------- */
.skeleton {
  border-radius: var(--radius);
  background: linear-gradient(90deg, var(--bg-soft) 25%, #fdf0f4 50%, var(--bg-soft) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border: 1px solid var(--line);
}
.skeleton-card { height: 190px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- 滚动显现 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.in { opacity: 1; transform: none; }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; text-align: center; }
  .hero-copy { order: 2; }
  .hero-portrait { order: 1; }
  .hero-actions { justify-content: center; }
  .hero-tagline { margin-inline: auto; }
  .about-grid { grid-template-columns: repeat(2, 1fr); }
  .post-grid { grid-template-columns: repeat(2, 1fr); }
  .blog-grid .post-card-cover { width: 96px; }
  .article-body { padding: 26px 22px; }
}

@media (max-width: 640px) {
  .nav-links {
    position: absolute;
    top: 66px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: rgba(255, 255, 255, 0.97);
    border-bottom: 1px solid var(--line);
    padding: 10px 6vw 16px;
    display: none;
    gap: 2px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 14px; border-radius: 12px; }
  .nav-links .nav-cta { margin-left: 0; }
  .nav-toggle { display: inline-flex; }
  .brand { padding: 6px 4px; }
  .search-box { min-width: 0; flex: 1; }
  .search-box input { font-size: 16px; }
  .tag-filter button { min-height: 44px; padding: 9px 16px; }
  .about-grid { grid-template-columns: 1fr; }
  .post-grid { grid-template-columns: 1fr; }
  .blog-grid { grid-template-columns: 1fr; }
  .blog-grid .post-card-cover { width: 84px; }
  .section { padding: 44px 0; }
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-meta { text-align: center; }
}

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