/* ===========================================================
   Tina 的小小世界 — 样式表
   想换配色？改下面 :root 里的几个变量就够了。
   =========================================================== */

:root {
  --cream: #fff8f0;
  --paper: #fffdfa;
  --ink: #3a3330;
  --ink-soft: #6f6360;
  --ink-faint: #a2968f;
  --coral: #f97b62;
  --coral-deep: #e0604a;
  --peach: #ffd3b6;
  --mint: #a8e6cf;
  --sky: #bee7f5;
  --lemon: #ffe9a8;
  --lav: #e0d4f7;
  --line: #f0e4da;
  --shadow-sm: 0 2px 6px rgba(140, 105, 85, .06);
  --shadow-md: 0 10px 30px -12px rgba(140, 105, 85, .22);
  --shadow-lg: 0 30px 60px -30px rgba(140, 105, 85, .35);
  --radius: 22px;
  --wrap: 1080px;
  --ease: cubic-bezier(.2, .8, .25, 1);
  --font-body: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", system-ui, sans-serif;
  --font-display: "Yuanti SC", "YouYuan", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

a { color: inherit; }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .86em;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: .12em .45em;
  color: var(--coral-deep);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 12px 20px;
  border-radius: 0 0 12px 0;
  z-index: 999;
}
.skip-link:focus { left: 0; }

:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------------- 顶部导航 ---------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 248, 240, .82);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid rgba(240, 228, 218, .8);
}

.topbar-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 14px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: .02em;
  text-decoration: none;
  white-space: nowrap;
}

.brand-dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: linear-gradient(140deg, var(--coral), var(--lemon));
  box-shadow: 0 0 0 4px rgba(249, 123, 98, .14);
  flex: none;
}

.nav { display: flex; gap: 4px; flex-wrap: wrap; }

.nav a {
  text-decoration: none;
  font-size: 14.5px;
  color: var(--ink-soft);
  padding: 7px 13px;
  border-radius: 999px;
  transition: background .25s var(--ease), color .25s var(--ease);
}
.nav a:hover { background: rgba(249, 123, 98, .1); color: var(--coral-deep); }
.nav a.is-active { color: var(--coral-deep); background: rgba(249, 123, 98, .12); font-weight: 600; }

/* ---------------- 首页 ---------------- */
.hero {
  position: relative;
  padding: 76px 26px 90px;
  overflow: hidden;
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: var(--wrap);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 54px;
  align-items: center;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: .45;
  pointer-events: none;
}
.blob-a { width: 470px; height: 470px; background: var(--peach); top: -170px; right: -90px; }
.blob-b { width: 380px; height: 380px; background: var(--mint); bottom: -190px; left: -120px; opacity: .42; }
.blob-c { width: 300px; height: 300px; background: var(--lav); top: 40%; right: 34%; opacity: .3; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 20px;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: .06em;
  color: var(--coral-deep);
  background: rgba(255, 253, 250, .85);
  border: 1px solid rgba(249, 123, 98, .22);
  padding: 6px 15px;
  border-radius: 999px;
}

.ping {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 0 0 rgba(249, 123, 98, .6);
  animation: ping 2.4s infinite;
}
@keyframes ping {
  0% { box-shadow: 0 0 0 0 rgba(249, 123, 98, .55); }
  70% { box-shadow: 0 0 0 9px rgba(249, 123, 98, 0); }
  100% { box-shadow: 0 0 0 0 rgba(249, 123, 98, 0); }
}

h1 {
  font-family: var(--font-display);
  font-size: clamp(38px, 5.6vw, 62px);
  line-height: 1.22;
  letter-spacing: -.01em;
  margin: 0 0 22px;
  font-weight: 800;
}

.name {
  position: relative;
  display: inline-block;
  color: var(--coral-deep);
  padding: 0 .1em;
}
.name::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: .04em;
  height: .3em;
  background: var(--lemon);
  border-radius: 999px;
  z-index: -1;
  transform: rotate(-1deg);
}

.wave {
  display: inline-block;
  font-size: .8em;
  transform-origin: 70% 80%;
  animation: wave 2.8s ease-in-out infinite;
}
@keyframes wave {
  0%, 60%, 100% { transform: rotate(0); }
  70% { transform: rotate(16deg); }
  80% { transform: rotate(-8deg); }
  90% { transform: rotate(12deg); }
}

.lede {
  margin: 0 0 26px;
  font-size: 18px;
  color: var(--ink-soft);
  max-width: 33em;
}

.chips { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 30px; }

.chip {
  font-size: 14px;
  padding: 6px 15px;
  border-radius: 999px;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  color: var(--ink-soft);
}
.chip:nth-child(1) { background: #fff3ee; border-color: #ffd9cd; }
.chip:nth-child(2) { background: #eefaf4; border-color: #c9eddc; }
.chip:nth-child(3) { background: #fffaea; border-color: #ffeec2; }
.chip:nth-child(4) { background: #f3f0fe; border-color: #e2d9fa; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 13px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-size: 15.5px;
  font-weight: 600;
  text-decoration: none;
  border: 1.5px solid transparent;
  transition: transform .22s var(--ease), box-shadow .22s var(--ease), background .22s var(--ease);
  cursor: pointer;
}
.btn-primary {
  background: var(--coral);
  color: #fff;
  box-shadow: 0 12px 24px -12px rgba(249, 123, 98, .85);
}
.btn-primary:hover { background: var(--coral-deep); transform: translateY(-2px); box-shadow: 0 18px 30px -14px rgba(249, 123, 98, .9); }
.btn-ghost {
  background: rgba(255, 253, 250, .7);
  border-color: var(--line);
  color: var(--ink);
}
.btn-ghost:hover { background: #fff; border-color: #e5d3c6; transform: translateY(-2px); }
.btn-lg { padding: 16px 32px; font-size: 16.5px; white-space: nowrap; }

/* 照片框 */
.hero-art { position: relative; display: flex; justify-content: center; }

.photo-frame {
  position: relative;
  width: min(340px, 82vw);
  aspect-ratio: 4 / 5;
  background: #fff;
  padding: 14px 14px 54px;
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  transform: rotate(2.5deg);
  transition: transform .5s var(--ease);
}
.photo-frame:hover { transform: rotate(0deg) translateY(-6px); }

.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 3px;
  position: relative;
  z-index: 2;
}
.photo-frame img.img-missing { display: none; }

.photo-fallback {
  position: absolute;
  inset: 14px 14px 54px;
  border-radius: 3px;
  background:
    radial-gradient(circle at 30% 20%, #ffe9d6, transparent 60%),
    radial-gradient(circle at 75% 80%, #e3f6ec, transparent 55%),
    #fff6ee;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  padding: 16px;
}
.fallback-face { font-size: 56px; line-height: 1; }
.fallback-hint { font-size: 12.5px; color: var(--ink-faint); line-height: 1.6; }

.tape {
  position: absolute;
  width: 88px;
  height: 26px;
  background: rgba(255, 233, 168, .78);
  border-left: 1px dashed rgba(255, 255, 255, .7);
  border-right: 1px dashed rgba(255, 255, 255, .7);
  top: -12px;
  z-index: 3;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
}
.tape-a { left: 6%; transform: rotate(-9deg); }
.tape-b { right: 4%; transform: rotate(7deg); background: rgba(190, 231, 245, .8); }

.sticker {
  position: absolute;
  font-size: 30px;
  z-index: 3;
  filter: drop-shadow(0 4px 8px rgba(140, 105, 85, .18));
  animation: float 5.5s ease-in-out infinite;
}
.sticker-a { left: -6%; top: 16%; }
.sticker-b { right: -4%; top: 46%; animation-delay: -1.8s; }
.sticker-c { left: 8%; bottom: 2%; animation-delay: -3.2s; font-size: 26px; }
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50% { transform: translateY(-11px) rotate(6deg); }
}

.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 190px;
  background: linear-gradient(to bottom, rgba(255, 248, 240, 0), var(--cream) 85%);
  pointer-events: none;
  z-index: 1;
}

.scroll-hint {
  position: relative;
  z-index: 2;
  max-width: var(--wrap);
  margin: 54px auto 0;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  letter-spacing: .14em;
  color: var(--ink-faint);
}
.scroll-hint .arrow { animation: bob 2.2s ease-in-out infinite; }
@keyframes bob {
  0%, 100% { transform: translateY(0); opacity: .55; }
  50% { transform: translateY(5px); opacity: 1; }
}

/* ---------------- 通用区块 ---------------- */
.section { padding: 96px 26px; position: relative; }
.section-tint { background: linear-gradient(180deg, rgba(255, 253, 250, .55), rgba(255, 255, 255, .35)); }
.section-tint::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--paper);
  opacity: .5;
  z-index: -1;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.wrap { max-width: var(--wrap); margin: 0 auto; position: relative; }

.kicker {
  margin: 0 0 12px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--coral);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.6vw, 40px);
  line-height: 1.3;
  letter-spacing: -.005em;
  margin: 0 0 14px;
  font-weight: 800;
}

.section-sub {
  margin: 0 0 40px;
  color: var(--ink-soft);
  font-size: 16.5px;
  max-width: 36em;
}

/* 滚入动画 */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.reveal.is-in { opacity: 1; transform: none; }

/* ---------------- 关于我 ---------------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.25fr .95fr;
  gap: 52px;
  margin-top: 34px;
  align-items: start;
}

.about-copy p { margin: 0 0 20px; color: var(--ink-soft); }
.about-copy p:first-child { color: var(--ink); font-size: 18.5px; }

.facts {
  margin: 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 26px;
  box-shadow: var(--shadow-md);
}
.fact { padding: 16px 0; border-bottom: 1px dashed var(--line); }
.fact:last-child { border-bottom: 0; }
.fact dt {
  font-size: 12.5px;
  letter-spacing: .08em;
  color: var(--ink-faint);
  margin-bottom: 3px;
}
.fact dd { margin: 0; font-size: 16.5px; font-weight: 600; }

/* ---------------- 爱好卡片 ---------------- */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px 28px;
  box-shadow: var(--shadow-sm);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: #ecd9cb;
}

.card-icon {
  width: 54px;
  height: 54px;
  border-radius: 17px;
  background: var(--c, #ffe9d6);
  display: grid;
  place-items: center;
  font-size: 26px;
  margin-bottom: 18px;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .04);
}

.card h3 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 19.5px;
  font-weight: 700;
}
.card p { margin: 0; font-size: 15px; color: var(--ink-soft); line-height: 1.8; }

/* ---------------- 作品画廊 ---------------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.tile {
  position: relative;
  margin: 0;
  aspect-ratio: 4 / 3;
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(150deg, var(--tint1, #ffe9d6), var(--tint2, #fff6ee));
  border: 1px solid rgba(0, 0, 0, .045);
  cursor: zoom-in;
  display: grid;
  place-items: center;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.tile:hover { transform: translateY(-4px) scale(1.012); box-shadow: var(--shadow-md); }
.tile:focus-visible { outline-offset: 4px; }

/* 统一格子尺寸后，跨行跨列的修饰类不再需要，保留以防旧 HTML */
.tile-tall, .tile-wide { grid-row: auto; grid-column: auto; }

.tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  transition: transform .6s var(--ease);
}
.tile:hover img { transform: scale(1.05); }

.tile-emoji {
  font-size: 46px;
  opacity: .9;
  filter: drop-shadow(0 6px 10px rgba(140, 105, 85, .16));
}

.tile figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 26px 16px 14px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
  background: linear-gradient(to top, rgba(255, 253, 250, .95), rgba(255, 253, 250, .72) 55%, transparent);
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.tile figcaption small { font-weight: 400; font-size: 12px; color: var(--ink-soft); }

.gallery-note {
  margin: 26px 0 0;
  font-size: 13.5px;
  color: var(--ink-faint);
  line-height: 2;
}

/* ---------------- 时间线 ---------------- */
.timeline {
  list-style: none;
  margin: 40px 0 0;
  padding: 0;
  position: relative;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 92px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(to bottom, var(--peach), var(--mint));
  border-radius: 2px;
}

.timeline li {
  position: relative;
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 34px;
  padding: 0 0 34px;
}
.timeline li:last-child { padding-bottom: 0; }

.tl-year {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 17px;
  color: var(--coral-deep);
  text-align: right;
  padding-top: 2px;
  letter-spacing: .02em;
}

.tl-dot {
  position: absolute;
  left: 86px;
  top: 12px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--coral);
  box-shadow: 0 0 0 4px var(--cream);
  z-index: 2;
}
.section-tint .tl-dot { box-shadow: 0 0 0 4px #fffdfa; }

.tl-body h3 {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-size: 18.5px;
  font-weight: 700;
}
.tl-body p { margin: 0; color: var(--ink-soft); font-size: 15.5px; }

/* ---------------- 愿望清单 ---------------- */
.wishes { list-style: none; margin: 36px 0 0; padding: 0; display: grid; gap: 22px; }

.wish {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px 24px 20px;
  box-shadow: var(--shadow-sm);
}
.wish-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 11px;
}
.wish-name { font-weight: 600; font-size: 16.5px; }
.wish-num { font-size: 13.5px; color: var(--ink-faint); font-variant-numeric: tabular-nums; white-space: nowrap; }

.bar {
  height: 10px;
  border-radius: 999px;
  background: #f6ebe2;
  overflow: hidden;
}
.bar-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--coral), #ffb27a);
  transition: width 1.3s var(--ease);
}
.is-in .bar-fill { width: var(--pct, 0%); }

/* ---------------- 打招呼 ---------------- */
.hello-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}
.hello-wrap .section-sub { margin-bottom: 0; }

/* ---------------- 页脚 ---------------- */
.footer {
  padding: 44px 26px 54px;
  border-top: 1px solid var(--line);
  background: var(--cream);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15.5px;
}
.footer-note { margin: 0; font-size: 13px; color: var(--ink-faint); }

/* ---------------- 放大查看 ---------------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 26px;
  background: rgba(58, 51, 48, .62);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: fade .28s var(--ease);
}
.lightbox[hidden] { display: none; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.lightbox-panel {
  position: relative;
  width: min(760px, 100%);
  max-height: 86vh;
  background: var(--paper);
  border-radius: 20px;
  padding: 18px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: pop .32s var(--ease);
}
@keyframes pop {
  from { opacity: 0; transform: scale(.94) translateY(10px); }
  to { opacity: 1; transform: none; }
}

.lightbox-stage {
  border-radius: 12px;
  overflow: hidden;
  display: grid;
  place-items: center;
  min-height: 240px;
  max-height: 64vh;
  background: linear-gradient(150deg, #ffe9d6, #fff6ee);
}
.lightbox-stage img {
  width: 100%;
  height: auto;
  max-height: 64vh;
  object-fit: contain;
}
.lightbox-stage .tile-emoji { font-size: 96px; padding: 40px; }
.lightbox-cap { margin: 0; font-size: 14px; color: var(--ink-soft); text-align: center; }

.lightbox-close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 0;
  background: var(--ink);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  display: grid;
  place-items: center;
}
.lightbox-close:hover { background: var(--coral-deep); }

/* ---------------- 响应式 ---------------- */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 48px; }
  .hero-art { order: -1; }
  .photo-frame { width: min(260px, 70vw); }
  .sticker-a { left: -2%; }
  .sticker-b { right: 0; }
  .about-grid { grid-template-columns: 1fr; gap: 32px; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: repeat(2, 1fr); gap: 14px; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .topbar-inner { padding: 11px 18px; }
  .nav {
    gap: 0;
    overflow-x: auto;
    scrollbar-width: none;
    max-width: 100%;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { padding: 6px 10px; font-size: 13.5px; }
  .brand span:last-child { display: none; }
  .hero { padding: 46px 18px 62px; }
  .section { padding: 66px 18px; }
  .scroll-hint { margin-top: 40px; }
  .cards { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr 1fr; gap: 12px; }
  .tile-emoji { font-size: 34px; }
  .tile figcaption { padding: 18px 11px 10px; font-size: 13px; }
  .tile figcaption small { font-size: 11px; }
  .timeline::before { left: 62px; }
  .timeline li { grid-template-columns: 62px 1fr; gap: 26px; }
  .tl-dot { left: 56px; }
  .tl-year { font-size: 15px; }
  .hello-wrap { gap: 24px; }
  .btn-lg { width: 100%; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 8px; }
}

@media print {
  .topbar, .scroll-hint, .lightbox, .hero-art .sticker, .tape { display: none !important; }
  body { background: #fff; }
  .section { padding: 24px 0; }
}
