/* Chao的异想天开屋 — shared design system (lively paper lab) */
:root {
  --ink: #16120f;
  --ink-soft: #3a322a;
  --muted: #72665a;
  --cream: #f6efe6;
  --paper: #fffdf9;
  --sand: #ebe0d0;
  --line: rgba(58, 42, 28, 0.11);
  --line-strong: rgba(58, 42, 28, 0.18);
  --amber: #d4842a;
  --amber-deep: #a35d14;
  --amber-soft: #ffe8c7;
  --teal: #1f8a7a;
  --teal-deep: #15685c;
  --teal-soft: #d4f3ec;
  --rose: #c45d55;
  --rose-soft: #fde8e4;
  --violet: #6b4f9a;
  --violet-soft: #efe6fb;
  --sky: #3a7ca5;
  --sky-soft: #dff0fa;
  --shadow: 0 1px 2px rgba(40, 28, 16, 0.05), 0 14px 36px rgba(40, 28, 16, 0.10);
  --shadow-hover: 0 4px 10px rgba(40, 28, 16, 0.06), 0 24px 52px rgba(40, 28, 16, 0.14);
  --radius: 22px;
  --radius-sm: 14px;
  --radius-pill: 999px;
  --max: 1360px;
  --font: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei",
          system-ui, -apple-system, sans-serif;
  --site-nav-h: 54px;
  --bg-mesh:
    radial-gradient(1100px 640px at -5% -8%, rgba(212, 132, 42, 0.22), transparent 58%),
    radial-gradient(900px 560px at 105% 0%, rgba(31, 138, 122, 0.18), transparent 52%),
    radial-gradient(760px 520px at 78% 108%, rgba(107, 79, 154, 0.16), transparent 50%),
    radial-gradient(520px 380px at 42% 18%, rgba(58, 124, 165, 0.10), transparent 55%),
    linear-gradient(168deg, #fbf4ea 0%, #f3ebe1 38%, #ebe6f2 72%, #e7f2ef 100%);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body.site-body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg-mesh);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* ===== Shared top chrome ===== */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--site-nav-h);
  background: linear-gradient(180deg, rgba(255,253,249,0.94), rgba(255,250,243,0.86));
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgba(212, 132, 42, 0.08);
}

.site-nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  height: 100%;
  padding: 0 22px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 750;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.site-logo:hover { color: var(--amber-deep); }

.site-logo-mark {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--amber), var(--rose) 55%, var(--violet));
  box-shadow: 0 0 0 3px rgba(212, 132, 42, 0.22);
  flex-shrink: 0;
}

.site-sep {
  color: var(--muted);
  opacity: 0.55;
  font-weight: 400;
  user-select: none;
}

.site-section {
  color: var(--ink-soft);
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.site-nav-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.site-pill {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 650;
  color: var(--teal-deep);
  background: linear-gradient(135deg, rgba(212,243,236,0.9), rgba(223,240,250,0.75));
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 5px 12px;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.site-pill:hover {
  background: var(--teal-soft);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(31, 138, 122, 0.15);
}

.site-footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 28px 22px 40px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.04em;
}
.site-footer .sep { margin: 0 8px; opacity: 0.45; }

/* Shared paper card */
.paper-card {
  background: linear-gradient(160deg, rgba(255,253,249,0.96), rgba(255,248,238,0.92));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

@media (max-width: 720px) {
  .site-nav-inner { padding: 0 14px; gap: 6px; }
  .site-logo { font-size: 13px; letter-spacing: 0.02em; }
  .site-section { font-size: 12.5px; }
  .site-nav-actions .site-pill:nth-child(n+3) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ===== Imagery helpers ===== */
.site-hero-cover {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  margin-bottom: 22px;
  min-height: 160px;
  background: #2a221c center/cover no-repeat;
}
.site-hero-cover img {
  display: block;
  width: 100%;
  height: 180px;
  object-fit: cover;
}
.site-hero-cover .hero-veil {
  position: absolute; inset: 0;
  background: linear-gradient(120deg, rgba(22,18,15,.72), rgba(22,18,15,.28) 55%, rgba(31,138,122,.18));
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 22px 24px;
  color: #fff;
}
.site-hero-cover .hero-veil .kicker {
  font-size: 11.5px; font-weight: 700; letter-spacing: .1em; opacity: .88; margin-bottom: 6px;
}
.site-hero-cover .hero-veil h1 {
  margin: 0 0 6px; font-size: clamp(22px, 3.6vw, 30px); font-weight: 780; letter-spacing: .02em;
}
.site-hero-cover .hero-veil p {
  margin: 0; font-size: 13.5px; opacity: .9; max-width: 560px; line-height: 1.5;
}

.card-cover {
  position: relative; z-index: 1;
  margin: -24px -22px 16px; height: 128px; overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.card-cover img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .5s cubic-bezier(.2,.8,.2,1);
}
.card:hover .card-cover img { transform: scale(1.06); }
.card-cover::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(22,18,15,.18));
  pointer-events: none;
}

@media (max-width: 560px) {
  .site-hero-cover img { height: 140px; }
  .card-cover { height: 110px; margin: -20px -18px 14px; }
}
