/* ============================================================
   周锦荣的小站 — 卡通简约风
   ============================================================ */

:root {
  color-scheme: light;
  --bg: #fff8ec;
  --paper: #ffffff;
  --ink: #2a2622;
  --muted: #7a6f63;
  --coral: #ff7a59;
  --coral-soft: #ffe3da;
  --mint: #a8e6cf;
  --mint-soft: #ddf7ec;
  --sky: #9bd7ff;
  --lilac: #cbb8ff;
  --lilac-soft: #eee8ff;
  --yellow: #ffd66b;
  --shadow: rgba(42, 38, 34, 0.14);
  --dot: rgba(42, 38, 34, 0.08);
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC",
    -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #17141f;
  --paper: #221e2e;
  --ink: #f6f1e7;
  --muted: #a79cb8;
  --coral: #ff8b6d;
  --coral-soft: #3a2622;
  --mint-soft: #1d332c;
  --lilac-soft: #2b2542;
  --shadow: rgba(0, 0, 0, 0.55);
  --dot: rgba(246, 241, 231, 0.07);
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  background-color: var(--bg);
  background-image: radial-gradient(var(--dot) 1.4px, transparent 1.4px);
  background-size: 22px 22px;
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.25s ease, color 0.25s ease;
}

a {
  color: inherit;
}

/* ---------- 背景装饰 ---------- */

.bg-decor {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.blob {
  position: absolute;
  border-radius: 42% 58% 55% 45% / 48% 44% 56% 52%;
  opacity: 0.55;
  animation: float 14s ease-in-out infinite;
}

.blob-coral {
  width: 220px;
  height: 220px;
  top: -70px;
  right: -50px;
  background: var(--coral-soft);
}

.blob-mint {
  width: 160px;
  height: 160px;
  bottom: 12%;
  left: -60px;
  background: var(--mint-soft);
  animation-delay: -5s;
}

.blob-sky {
  width: 110px;
  height: 110px;
  top: 46%;
  right: 6%;
  background: var(--lilac-soft);
  animation-delay: -9s;
}

.spark {
  position: absolute;
  font-size: 22px;
  color: var(--coral);
  opacity: 0.65;
}

.spark-1 {
  top: 18%;
  left: 8%;
}

.spark-2 {
  bottom: 18%;
  right: 12%;
  color: var(--lilac);
  font-size: 16px;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-14px) rotate(6deg);
  }
}

/* ---------- 顶栏 ---------- */

.site-head {
  max-width: 960px;
  margin: 0 auto;
  padding: 26px 24px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-decoration: none;
  border-bottom: 3px solid var(--coral);
  padding-bottom: 1px;
}

.logo span {
  color: var(--muted);
  font-weight: 600;
}

.head-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.badge {
  font-size: 12px;
  font-weight: 700;
  padding: 5px 12px;
  border: 1.5px dashed var(--muted);
  border-radius: 999px;
  color: var(--muted);
}

.theme-toggle {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  font-size: 17px;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 2px 2px 0 var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.theme-toggle:hover {
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 var(--shadow);
}

.theme-toggle:active {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 var(--shadow);
}

/* ---------- Hero ---------- */

main {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
}

.hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 36px;
  padding: 58px 0 44px;
}

.hero-copy {
  min-width: 0;
}

.hero-doodle {
  position: relative;
  flex: 0 0 auto;
  padding: 0 6px 14px 0;
}

.note {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px 15px;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 22px 22px 22px 6px;
  box-shadow: 5px 5px 0 var(--shadow);
  transform: rotate(-3.5deg);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
  color: var(--muted);
}

.note-emoji {
  font-size: 22px;
}

.doodle-star {
  position: absolute;
  top: -18px;
  right: -8px;
  font-size: 22px;
  color: var(--coral);
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--coral);
}

.hero h1 {
  margin: 0;
  font-size: clamp(40px, 7.5vw, 72px);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.mark {
  position: relative;
  z-index: 0;
  white-space: nowrap;
}

.mark::before {
  content: "";
  position: absolute;
  left: -4px;
  right: -4px;
  bottom: 6%;
  height: 34%;
  background: var(--yellow);
  transform: rotate(-1.6deg);
  border-radius: 6px;
  z-index: -1;
}

.lede {
  margin: 18px 0 0;
  font-size: clamp(16px, 2.2vw, 19px);
  color: var(--muted);
  max-width: 30em;
}

/* ---------- 项目卡片 ---------- */

.projects {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px;
  padding-bottom: 24px;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 26px 24px 24px;
  background: var(--paper);
  border: 2.5px solid var(--ink);
  border-radius: 28px;
  box-shadow: 7px 7px 0 var(--shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.card-live:hover {
  transform: translate(-3px, -3px);
  box-shadow: 11px 11px 0 var(--shadow);
}

.card-soon {
  border-style: dashed;
  border-color: var(--muted);
  box-shadow: none;
  opacity: 0.82;
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  font-size: 28px;
  border: 2px solid var(--ink);
  border-radius: 18px;
  background: var(--coral-soft);
}

.icon-lilac {
  background: var(--lilac-soft);
}

.pill {
  font-size: 12px;
  font-weight: 800;
  padding: 4px 11px;
  border-radius: 999px;
  border: 1.5px solid var(--ink);
  background: var(--mint);
  color: #1d3b31;
}

.pill-soon {
  background: var(--yellow);
  color: #4a3a00;
}

.card h2 {
  margin: 4px 0 0;
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.02em;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.card h2 .en {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.desc {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 2px 0 8px;
  padding: 0;
  list-style: none;
}

.tags li {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  padding: 3px 10px;
  border: 1.5px dashed var(--muted);
  border-radius: 999px;
}

.go {
  margin-top: auto;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: var(--ink);
  color: var(--bg);
  border: 2px solid var(--ink);
  border-radius: 999px;
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 3px 3px 0 var(--coral);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.go:hover {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 var(--coral);
}

.go:active {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 var(--coral);
}

.go-disabled {
  background: transparent;
  color: var(--muted);
  border-style: dashed;
  border-color: var(--muted);
  box-shadow: none;
  cursor: default;
}

/* ---------- 页脚 ---------- */

.site-foot {
  max-width: 960px;
  margin: 0 auto;
  padding: 30px 24px 40px;
  color: var(--muted);
  font-size: 12.5px;
  text-align: center;
}

.site-foot p {
  margin: 0;
}

.site-foot a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.site-foot a:hover {
  color: var(--coral);
  border-bottom-color: var(--coral);
}

.dot {
  margin: 0 6px;
  opacity: 0.6;
}

/* ---------- 响应式 ---------- */

@media (max-width: 860px) {
  .hero-doodle {
    display: none;
  }
}

@media (max-width: 720px) {
  .site-head {
    padding: 20px 18px 6px;
  }

  main {
    padding: 0 18px;
  }

  .hero {
    padding: 42px 0 34px;
  }

  .projects {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .card {
    padding: 22px 20px;
    border-radius: 24px;
  }

  .badge {
    display: none;
  }

  .blob-sky {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
