:root {
  color-scheme: light;
  --paper: #fff8f0;
  --ink: #5d4e37;
  --muted: #8b7a5c;
  --line: #ffe0cc;
  --accent: #ff9f43;
  --shadow-sm: 0 2px 6px #ff6f6b1a;
  --shadow-md: 0 4px 12px #ff6f6b26;
  --shadow-lg: 0 8px 20px #ff6f6b33;
  --bounce: cubic-bezier(.34, 1.56, .64, 1);
  --font: "Comic Neue", "Ma Shan Zheng", "KaiTi", "STKaiti", "Microsoft YaHei", cursive;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body { position: relative; margin: 0; background: linear-gradient(180deg, var(--paper), #f0f8ff 50%, #fff0e6) fixed; color: var(--ink); font-family: var(--font); font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(circle at 20% 80%, #ff6f6b14, transparent 50%), radial-gradient(circle at 80% 20%, #6bcb7714, transparent 50%), radial-gradient(circle at 40% 40%, #4d96ff0f, transparent 40%), radial-gradient(circle at 60% 60%, #ffd93d0f, transparent 40%); }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 3px solid #225dac; outline-offset: 4px; border-radius: 8px; }
h1, h2, h3, p { overflow-wrap: anywhere; }
.wrap { width: min(1140px, calc(100% - 64px)); margin-inline: auto; }
.skip-link { position: absolute; top: -80px; left: 20px; z-index: 5; padding: 10px 20px; background: var(--ink); color: #fff; }
.skip-link:focus { top: 10px; }

.site-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 22px 8px; }
.brand { display: flex; align-items: center; gap: 12px; font-size: 22px; font-weight: 700; line-height: 1.3; }
.brand small { display: block; margin-top: 2px; font-size: 14px; font-weight: 400; letter-spacing: 1px; color: var(--muted); }
.brand-logo { display: block; width: 56px; height: 56px; filter: drop-shadow(0 3px 0 #ffd4b8); transition: transform .25s var(--bounce); }
.brand:hover .brand-logo { transform: rotate(-6deg) scale(1.05); }
nav { display: flex; flex-wrap: wrap; gap: 10px; }
nav a { padding: 6px 16px; border: 2px solid var(--line); border-radius: 999px; background: #ffffffb3; font-size: 16px; font-weight: 700; box-shadow: var(--shadow-sm); transition: transform .25s var(--bounce), background .2s; }
nav a:hover { background: #fff0e6; transform: translateY(-2px); }

.hero { padding-top: 18px; }
.hero-title { text-align: center; margin-bottom: 22px; }
.hero-title h1 { margin: 0; font-size: clamp(32px, 5vw, 54px); font-weight: 700; line-height: 1.35; letter-spacing: .08em; word-break: keep-all; background: linear-gradient(90deg, #ff7a5c, #ff9f43 35%, #6cc4ff 70%, #b48cff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-title h1 span { color: initial; -webkit-text-fill-color: initial; }
.hero-title p { margin: 8px 0 0; color: var(--muted); font-size: 18px; word-break: keep-all; text-wrap: balance; }

.duo-stage { position: relative; height: 400px; border-radius: 32px; overflow: hidden; background: radial-gradient(circle at 50% 35%, #fff8f0, #ffe3d3 65%, #ffd2c2); box-shadow: var(--shadow-md); }
.duo-canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.duo-flat { display: grid; place-items: end center; height: 100%; padding-bottom: 48px; font-size: 96px; line-height: 1; transition: opacity .4s; }
.duo-stage.is-3d .duo-flat { opacity: 0; pointer-events: none; }
.duo-bubble { position: absolute; z-index: 1; max-width: 46%; padding: 10px 16px; border: 2px solid var(--line); background: #fff; box-shadow: var(--shadow-sm); color: inherit; font: inherit; font-size: 16px; line-height: 1.45; text-align: left; cursor: pointer; animation: bubble-float 3s ease-in-out infinite; }
.duo-bubble b { display: block; font-size: 13px; color: var(--muted); }
.duo-bubble.is-dad { top: 16px; left: 16px; border-radius: 20px 20px 20px 4px; }
.duo-bubble.is-nian { top: 96px; right: 16px; border-radius: 20px 20px 4px 20px; background: #fff7e6; animation-delay: 1.4s; }
@keyframes bubble-float { 50% { transform: translateY(-4px); } }

.section-title { margin: 44px 0 14px; font-size: 25px; font-weight: 700; line-height: 1.4; }
.section-row { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.more-link { font-weight: 700; color: #b8622a; white-space: nowrap; }
.more-link:hover { text-decoration: underline; text-underline-offset: 4px; }

.project-grid, .post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.collection-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; }
.project-card, .post-card, .collection-card { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto 1fr auto; column-gap: 14px; row-gap: 4px; padding: 18px 20px; border: 3px solid var(--card-border, #ffd4b8); border-radius: 24px; background: linear-gradient(135deg, #fff 55%, var(--card-tint, #fff0e6)); box-shadow: var(--shadow-sm); transition: transform .25s var(--bounce), box-shadow .2s; }
.project-card:hover, .post-card:hover, .collection-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.project-card > :not(.project-icon), .collection-card > :not(.project-icon) { grid-column: 2; }
.post-card > * { grid-column: 1 / -1; }
.project-icon { grid-row: 1 / span 4; font-size: 46px; line-height: 1; }
.card-kind, .collection-label, .post-card time { font-size: 13px; letter-spacing: 1px; color: var(--muted); }
.project-card h3, .post-card h3, .collection-card h3 { margin: 0; font-size: 21px; font-weight: 700; line-height: 1.4; }
.project-card p, .post-card p, .collection-card p { margin: 2px 0 6px; color: var(--muted); font-size: 15px; line-height: 1.6; }
.project-notice { display: block; width: fit-content; margin-top: 8px; padding: 2px 10px; border-radius: 999px; background: #fff0e6; color: #a64b18; font-size: 13px; }
.card-bottom { align-self: end; font-size: 14px; font-weight: 700; color: var(--card-accent, #d9792f); }
.tone-peach { --card-border: #ffd4b8; --card-tint: #fff0e6; --card-accent: #c8662c; }
.tone-sage { --card-border: #bce7c1; --card-tint: #edf9ee; --card-accent: #3f8a4b; }
.tone-lavender { --card-border: #dfccff; --card-tint: #f5efff; --card-accent: #7a52c7; }
.tone-butter { --card-border: #ffe797; --card-tint: #fff9df; --card-accent: #a07a12; }
.tone-blue { --card-border: #b8d7ff; --card-tint: #edf5ff; --card-accent: #3a6fc0; }
.tone-rose { --card-border: #ffc9dd; --card-tint: #fff0f6; --card-accent: #c0487a; }

.closing { padding-block: 48px 36px; text-align: center; }
.closing p { margin: 0; font-size: 22px; }
.site-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; border-top: 2px dashed var(--line); padding-block: 22px 30px; color: var(--muted); font-size: 14px; }
.site-footer p { margin: 0; }
.footer-brand { display: flex; align-items: center; gap: 8px; color: var(--ink); font-size: 17px; font-weight: 700; }
.footer-brand img { display: block; }
.footer-brand span { font-weight: 400; font-size: 14px; }
.site-footer a:hover { color: #a04825; }

@media (max-width: 900px) {
  .project-grid, .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .wrap { width: calc(100% - 28px); }
  .site-header { flex-direction: column; align-items: flex-start; gap: 14px; padding-top: 16px; }
  nav { gap: 8px; }
  nav a { padding: 4px 12px; font-size: 15px; }
  .hero { padding-top: 6px; }
  .hero-title p { font-size: 16px; }
  .duo-stage { height: 320px; border-radius: 24px; }
  .duo-bubble { max-width: 60%; padding: 8px 12px; font-size: 14px; }
  .duo-bubble.is-dad { top: 12px; left: 12px; }
  .duo-bubble.is-nian { top: 84px; right: 12px; max-width: 48%; }
  .section-title { margin-top: 34px; font-size: 22px; }
  .project-grid, .post-grid, .collection-grid { grid-template-columns: 1fr; gap: 12px; }
  .project-icon { font-size: 40px; }
  .closing p { font-size: 19px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  nav a:hover, .project-card:hover, .post-card:hover, .collection-card:hover { transform: none; }
}
