/*
  生活碎片收集册 - 纯静态个人生活记录网站
  修改图片：替换 ./images/photoXX.jpg 即可
  修改文字：直接编辑 index.html 中的标题、卡片和图片说明
*/
:root {
  --bg: #fbf7ef;
  --paper: rgba(255, 252, 246, 0.82);
  --paper-solid: #fffaf1;
  --ink: #5b5148;
  --muted: #9b8f83;
  --sage: #dfe9d8;
  --sage-deep: #8fa27f;
  --apricot: #f0d7bd;
  --cream: #fff6e8;
  --rose: #ead5cf;
  --shadow: 0 18px 45px rgba(117, 95, 72, 0.13);
  --soft-shadow: 0 10px 24px rgba(115, 95, 75, 0.12);
  --radius-lg: 34px;
  --radius-md: 24px;
  --radius-sm: 16px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Noto Serif SC", "Songti SC", "Microsoft YaHei UI", "Microsoft YaHei", serif;
  background:
    radial-gradient(circle at 10% 8%, rgba(240, 215, 189, 0.58), transparent 30%),
    radial-gradient(circle at 88% 12%, rgba(223, 233, 216, 0.8), transparent 28%),
    linear-gradient(180deg, #fbf7ef 0%, #f9f4ea 45%, #f6f0e5 100%);
  min-height: 100vh;
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  width: 36vw;
  height: 36vw;
  border-radius: 999px;
  z-index: -1;
  filter: blur(8px);
  opacity: 0.55;
}

body::before {
  left: -16vw;
  top: 28vh;
  background: rgba(234, 213, 207, 0.6);
}

body::after {
  right: -20vw;
  bottom: 0;
  background: rgba(223, 233, 216, 0.75);
}

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

.page-fade {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: var(--bg);
  z-index: 999;
  animation: pageFade 0.9s ease forwards;
}

@keyframes pageFade {
  from { opacity: 1; }
  to { opacity: 0; visibility: hidden; }
}

.site-header {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
  padding: 72px 0 38px;
  text-align: center;
}

.avatar-ring {
  width: 92px;
  height: 92px;
  margin: 0 auto 20px;
  padding: 6px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fff7ed, #dfe9d8, #f0d7bd);
  box-shadow: var(--soft-shadow);
}

.avatar-ring img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.86);
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--sage-deep);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.78rem;
  font-family: "Georgia", "Times New Roman", serif;
}

h1, h2, h3, p {
  margin-top: 0;
}

.site-header h1 {
  margin-bottom: 12px;
  font-size: clamp(2.35rem, 5vw, 5rem);
  line-height: 1.05;
  font-weight: 400;
  letter-spacing: 0.08em;
}

.subtitle {
  margin: 0 auto;
  color: var(--muted);
  font-size: clamp(1rem, 1.6vw, 1.22rem);
  letter-spacing: 0.12em;
}

.hero {
  position: relative;
  width: min(1120px, calc(100% - 36px));
  min-height: clamp(420px, 68vh, 660px);
  margin: 20px auto 52px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  isolation: isolate;
}

.hero img {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(68, 57, 48, 0.46), rgba(68, 57, 48, 0.14) 46%, rgba(255, 246, 232, 0.08)),
    linear-gradient(0deg, rgba(60, 49, 42, 0.26), transparent 55%);
  z-index: 1;
}

.hero-text {
  position: absolute;
  left: clamp(28px, 6vw, 72px);
  bottom: clamp(30px, 7vw, 70px);
  z-index: 2;
  width: min(520px, calc(100% - 56px));
  color: #fffaf1;
  text-shadow: 0 4px 22px rgba(52, 42, 35, 0.35);
}

.hero-text span {
  display: inline-block;
  margin-bottom: 12px;
  padding: 8px 13px;
  border-radius: 999px;
  background: rgba(255, 250, 241, 0.22);
  backdrop-filter: blur(10px);
  font-family: Georgia, serif;
  letter-spacing: 0.08em;
  font-size: 0.83rem;
}

.hero-text h2 {
  margin-bottom: 12px;
  font-size: clamp(2rem, 4.8vw, 4.6rem);
  line-height: 1.08;
  font-weight: 400;
}

.hero-text p {
  margin-bottom: 0;
  font-size: clamp(1rem, 1.7vw, 1.2rem);
  line-height: 1.9;
}

.intro,
.section-head,
.diary-grid,
.site-footer {
  width: min(1120px, calc(100% - 36px));
  margin-left: auto;
  margin-right: auto;
}

.intro {
  margin-bottom: 60px;
}

.intro-card {
  position: relative;
  padding: clamp(26px, 4vw, 42px);
  border: 1px solid rgba(143, 162, 127, 0.18);
  border-radius: var(--radius-lg);
  background: rgba(255, 250, 241, 0.66);
  backdrop-filter: blur(16px);
  box-shadow: 0 12px 30px rgba(117, 95, 72, 0.08);
}

.intro-card p {
  margin: 0;
  font-size: clamp(1.05rem, 1.6vw, 1.28rem);
  line-height: 2.1;
  letter-spacing: 0.05em;
}

.flower {
  position: absolute;
  right: clamp(18px, 4vw, 38px);
  top: -16px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #a78f76;
  background: var(--sage);
  box-shadow: var(--soft-shadow);
}

.section-head {
  margin-bottom: 28px;
  text-align: center;
}

.section-head p {
  margin-bottom: 9px;
  color: var(--sage-deep);
  font-family: Georgia, serif;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.82rem;
}

.section-head h2 {
  margin-bottom: 0;
  font-weight: 400;
  font-size: clamp(1.55rem, 3vw, 2.55rem);
  letter-spacing: 0.08em;
}

.gallery {
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto 86px;
  columns: 4 230px;
  column-gap: 18px;
}

.photo-card {
  position: relative;
  display: inline-block;
  width: 100%;
  margin: 0 0 18px;
  padding: 10px 10px 42px;
  break-inside: avoid;
  border-radius: 24px;
  background: rgba(255, 250, 241, 0.9);
  box-shadow: var(--soft-shadow);
  overflow: hidden;
  cursor: pointer;
  transform: translateZ(0);
  transition: transform 0.36s ease, box-shadow 0.36s ease, background 0.36s ease;
}

.photo-card::before {
  content: "";
  position: absolute;
  inset: 10px;
  bottom: 42px;
  z-index: 1;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,250,241,0.12));
  pointer-events: none;
}

.photo-card img {
  width: 100%;
  border-radius: 18px;
  object-fit: cover;
  transition: transform 0.48s ease, filter 0.48s ease;
}

.photo-card figcaption {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 14px;
  color: #8d7d6d;
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.photo-card:hover {
  transform: translateY(-6px) rotate(-0.2deg);
  box-shadow: 0 22px 48px rgba(96, 76, 58, 0.18);
  background: #fffdf8;
}

.photo-card:hover img {
  transform: scale(1.035);
  filter: saturate(1.04) brightness(1.02);
}

.diary-title {
  margin-bottom: 28px;
}

.diary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 82px;
}

.diary-card {
  min-height: 260px;
  padding: 32px;
  border-radius: var(--radius-md);
  background:
    linear-gradient(145deg, rgba(255, 250, 241, 0.92), rgba(223, 233, 216, 0.5)),
    var(--paper-solid);
  border: 1px solid rgba(143, 162, 127, 0.16);
  box-shadow: var(--soft-shadow);
}

.diary-card:nth-child(2) {
  background: linear-gradient(145deg, rgba(255, 250, 241, 0.92), rgba(240, 215, 189, 0.52));
}

.diary-card:nth-child(3) {
  background: linear-gradient(145deg, rgba(255, 250, 241, 0.92), rgba(234, 213, 207, 0.45));
}

.diary-card time {
  display: inline-block;
  margin-bottom: 18px;
  color: var(--sage-deep);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
}

.diary-card h3 {
  margin-bottom: 16px;
  font-weight: 400;
  font-size: 1.45rem;
  letter-spacing: 0.06em;
}

.diary-card p {
  margin-bottom: 0;
  color: #72685f;
  line-height: 2;
  letter-spacing: 0.04em;
}

.site-footer {
  padding: 34px 0 58px;
  text-align: center;
  color: var(--muted);
  font-size: 0.92rem;
  letter-spacing: 0.05em;
}

.lightbox {
  position: fixed;
  inset: 0;
  display: grid;
  grid-template-rows: 1fr auto;
  place-items: center;
  padding: 72px 20px 36px;
  background: rgba(55, 47, 41, 0.78);
  backdrop-filter: blur(16px);
  opacity: 0;
  visibility: hidden;
  z-index: 1000;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}

.lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.lightbox img {
  max-width: min(94vw, 1180px);
  max-height: 78vh;
  border-radius: 26px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.32);
  object-fit: contain;
}

.lightbox p {
  margin: 18px 0 0;
  color: var(--cream);
  letter-spacing: 0.08em;
}

.lightbox-close {
  position: fixed;
  top: 22px;
  right: 24px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  color: var(--ink);
  background: rgba(255, 250, 241, 0.88);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--soft-shadow);
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 860px) {
  .site-header {
    padding-top: 52px;
  }

  .hero {
    min-height: 500px;
    border-radius: 28px;
  }

  .hero-text {
    left: 24px;
    bottom: 28px;
  }

  .diary-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .site-header,
  .hero,
  .intro,
  .section-head,
  .diary-grid,
  .site-footer {
    width: min(100% - 24px, 1120px);
  }

  .site-header h1 {
    letter-spacing: 0.04em;
  }

  .subtitle {
    letter-spacing: 0.06em;
  }

  .hero {
    min-height: 430px;
    margin-top: 8px;
  }

  .hero img {
    object-position: center;
  }

  .hero-text p {
    line-height: 1.75;
  }

  .gallery {
    width: min(100% - 18px, 1180px);
    columns: 1;
  }

  .photo-card {
    border-radius: 22px;
  }

  .diary-card {
    padding: 26px;
  }
}
