/* Henry & Daisy's Sweet Home — family blog */
:root {
  --ivory: #faf8f4;
  --paper: #f3efe7;
  --ink: #2c2a26;
  --ink-soft: #5c584f;
  --sage: #6d7f6f;
  --forest: #37493d;
  --gold: #a8875a;
  --gold-soft: #c9b18b;
  --serif: "Cormorant Garamond", "Noto Serif SC", "Georgia", serif;
  --sans: "Jost", "Helvetica Neue", Arial, sans-serif;
  --shadow: 0 18px 50px rgba(44, 42, 38, 0.14);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.75;
  letter-spacing: 0.01em;
}

img { display: border-box; max-width: 100%; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; line-height: 1.25; }
a { color: var(--forest); text-decoration: none; border-bottom: 1px solid var(--gold-soft); transition: color .2s, border-color .2s; }
a:hover { color: var(--gold); border-color: var(--gold); }
.wrap { width: min(1100px, 90vw); margin: 0 auto; }

.eyebrow {
  font-size: 0.72rem; font-weight: 400; letter-spacing: 0.35em;
  text-transform: uppercase; color: var(--gold); margin-bottom: 1rem;
}
.section { padding: 5rem 0; }
.section-title { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 0.6rem; }
.section-head { text-align: center; margin-bottom: 3rem; }
.section-head .rule { width: 64px; height: 1px; background: var(--gold-soft); margin: 1.4rem auto 0; position: relative; }
.section-head .rule::after {
  content: ""; position: absolute; left: 50%; top: -3px;
  width: 7px; height: 7px; background: var(--gold); transform: translateX(-50%) rotate(45deg);
}

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem clamp(1.2rem, 4vw, 3rem);
  background: rgba(250, 248, 244, 0.92);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 rgba(44,42,38,.08);
}
.nav .brand { font-family: var(--serif); font-size: 1.3rem; letter-spacing: .12em; border-bottom: none; color: var(--ink); }
.nav .brand em { color: var(--gold); font-style: normal; }
.nav ul { display: flex; gap: 1.8rem; list-style: none; align-items: center; }
.nav ul a { font-size: 0.78rem; letter-spacing: 0.2em; text-transform: uppercase; border-bottom: none; color: var(--ink-soft); }
.nav ul a:hover { color: var(--gold); }
.lang-toggle {
  background: none; border: 1px solid var(--ink-soft); border-radius: 999px;
  color: var(--ink-soft); font-family: var(--sans); font-size: .72rem;
  letter-spacing: .15em; padding: .3rem .9rem; cursor: pointer;
}
.lang-toggle:hover { color: var(--gold); border-color: var(--gold); }
.nav-burger { display: none; background: none; border: none; cursor: pointer; padding: .4rem; }
.nav-burger span { display: block; width: 24px; height: 2px; background: var(--ink); margin: 5px 0; transition: .3s; }

/* ---------- hero ---------- */
.blog-hero {
  position: relative; height: 62vh; min-height: 420px;
  display: grid; place-items: center; text-align: center; overflow: hidden; color: var(--ivory);
}
.hero-bg { position: absolute; inset: 0; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(30,28,24,.45) 0%, rgba(30,28,24,.25) 45%, rgba(30,28,24,.6) 100%);
}
.hero-inner { position: relative; z-index: 1; padding: 0 1.5rem; }
.hero-eyebrow { font-size: .75rem; letter-spacing: .5em; text-transform: uppercase; opacity: .9; margin-bottom: 1.4rem; }
.hero-inner h1 { font-size: clamp(2.2rem, 6vw, 4.2rem); font-weight: 500; letter-spacing: .03em; }
.hero-date { margin-top: 1.2rem; font-size: .95rem; letter-spacing: .35em; text-transform: uppercase; opacity: .95; }

/* ---------- post cards ---------- */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 2.2rem; }
.post-card {
  background: #fff; border-radius: 6px; overflow: hidden; box-shadow: var(--shadow);
  display: flex; flex-direction: column;
  opacity: 0; transform: translateY(20px); transition: opacity .6s, transform .6s;
}
.post-card.in, .post-card { opacity: 1; transform: none; }
.post-card-img { display: block; aspect-ratio: 16 / 9; overflow: hidden; border-bottom: none; }
.post-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.post-card:hover .post-card-img img { transform: scale(1.05); }
.post-card-body { padding: 1.6rem 1.7rem 1.8rem; display: flex; flex-direction: column; flex: 1; }
.post-card-body h3 { font-size: 1.45rem; margin: .3rem 0 .6rem; }
.post-card-body h3 a { border-bottom: none; color: var(--ink); }
.post-card-body h3 a:hover { color: var(--gold); }
.post-meta { font-size: .72rem; letter-spacing: .28em; text-transform: uppercase; color: var(--gold); }
.post-excerpt { color: var(--ink-soft); font-size: .94rem; flex: 1; }
.post-more { margin-top: 1rem; font-size: .78rem; letter-spacing: .22em; text-transform: uppercase; }

/* ---------- post page ---------- */
.page-hero { padding: 9.5rem 0 2.5rem; text-align: center; }
.page-hero h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
.post { width: min(760px, 92vw); margin: 0 auto; padding: 8.5rem 0 4rem; }
.post-header { text-align: center; margin-bottom: 2.5rem; }
.post-header h1 { font-size: clamp(2rem, 5vw, 3rem); margin-top: .5rem; }
.post-cover { width: 100%; max-height: 460px; object-fit: cover; border-radius: 6px; box-shadow: var(--shadow); margin-bottom: 2.5rem; }
.post-content { font-size: 1.06rem; }
.post-content p { margin-bottom: 1.4rem; }
.post-content h2 { font-size: 1.7rem; margin: 2.4rem 0 1rem; color: var(--forest); }
.post-content h3 { font-size: 1.35rem; margin: 2rem 0 .8rem; color: var(--forest); }
.post-content img { border-radius: 4px; margin: 1.6rem auto; box-shadow: var(--shadow); }
.post-content blockquote {
  border-left: 2px solid var(--gold-soft); padding: .4rem 0 .4rem 1.4rem;
  margin: 1.6rem 0; font-family: var(--serif); font-size: 1.25rem; font-style: italic; color: var(--forest);
}
.post-content ul, .post-content ol { margin: 0 0 1.4rem 1.6rem; }
.post-content code { background: var(--paper); padding: .15em .45em; border-radius: 3px; font-size: .9em; }
.post-content pre { background: #2c2a26; color: var(--ivory); padding: 1.2rem 1.4rem; border-radius: 6px; overflow-x: auto; margin-bottom: 1.4rem; }
.post-content pre code { background: none; padding: 0; }
.post-tags { margin-top: 2.5rem; }
.post-tags span {
  display: inline-block; border: 1px solid var(--gold-soft); border-radius: 999px;
  padding: .2rem .9rem; margin: 0 .4rem .4rem 0;
  font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-soft);
}
.post-nav {
  display: flex; justify-content: space-between; gap: 1rem;
  margin-top: 3rem; padding-top: 2rem; border-top: 1px solid rgba(168,135,90,.25);
}
.post-nav a { max-width: 46%; font-family: var(--serif); font-size: 1.1rem; }
.post-nav-next { text-align: right; margin-left: auto; }

/* ---------- archive ---------- */
.archive { max-width: 640px; margin: 0 auto; }
.archive-year { font-size: 2rem; color: var(--forest); margin: 2.5rem 0 1rem; }
.archive-list { list-style: none; }
.archive-list li { padding: .55rem 0; border-bottom: 1px solid rgba(168,135,90,.18); display: flex; gap: 1.4rem; align-items: baseline; }
.archive-list a { border-bottom: none; font-family: var(--serif); font-size: 1.15rem; }
.archive-date { color: var(--gold); font-size: .78rem; letter-spacing: .15em; text-transform: uppercase; min-width: 4.5rem; }

/* ---------- footer ---------- */
.site-footer { background: var(--forest); color: rgba(250,248,244,.85); text-align: center; padding: 4rem 1.5rem 2.6rem; }
.site-footer .mono { font-family: var(--serif); font-size: 2.4rem; letter-spacing: .1em; color: var(--ivory); margin-bottom: .7rem; }
.site-footer .mono em { color: var(--gold-soft); font-style: normal; }
.site-footer p { font-size: .8rem; letter-spacing: .2em; text-transform: uppercase; opacity: .75; }
.site-footer .foot-nav { margin: 1.5rem 0; display: flex; gap: 1.6rem; justify-content: center; flex-wrap: wrap; }
.site-footer .foot-nav a { color: rgba(250,248,244,.7); border-bottom: none; font-size: .76rem; letter-spacing: .22em; text-transform: uppercase; }
.site-footer .foot-nav a:hover { color: var(--gold-soft); }

/* ---------- home chapters ---------- */
.chapter-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1.4rem; }
.chapter-card {
  position: relative; border-radius: 6px; overflow: hidden; aspect-ratio: 4 / 5;
  border-bottom: none; box-shadow: var(--shadow);
}
.chapter-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.chapter-card::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(30,28,24,0) 30%, rgba(30,28,24,.78) 100%);
}
.chapter-card:hover img { transform: scale(1.06); }
.chapter-body { position: absolute; inset: auto 0 0 0; z-index: 1; padding: 1.3rem 1.2rem 1.2rem; }
.chapter-body h3 { color: var(--ivory); font-size: 1.5rem; margin-bottom: .2rem; }
.chapter-body p { color: rgba(250,248,244,.85); font-size: .8rem; line-height: 1.5; margin: 0; }

.section.tinted { background: var(--paper); }

/* ---------- memory wall ---------- */
.memory-wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; margin: 2.5rem 0; }
.memory-wall figure {
  position: relative; margin: 0; border-radius: 4px; overflow: hidden;
  aspect-ratio: 4 / 3; box-shadow: var(--shadow);
}
.memory-wall img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.memory-wall figure:hover img { transform: scale(1.05); }
.memory-wall figcaption {
  position: absolute; inset: auto 0 0 0; padding: 1.6rem .9rem .7rem;
  color: var(--ivory); font-size: .74rem; letter-spacing: .2em; text-transform: uppercase;
  background: linear-gradient(transparent, rgba(30,28,24,.7));
}

/* ---------- projects ---------- */
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.8rem; margin: 2.5rem 0; }
.project-card {
  background: #fff; border-radius: 6px; padding: 1.8rem 1.9rem; box-shadow: var(--shadow);
  border-top: 2px solid var(--gold-soft);
}
.project-card h3 { font-size: 1.35rem; margin-bottom: .5rem; }
.project-card h3 a { border-bottom: none; color: var(--forest); }
.project-card h3 a:hover { color: var(--gold); }
.project-card p { color: var(--ink-soft); font-size: .93rem; margin: 0; }
.project-card p a { font-size: inherit; }

/* ---------- timeline (pages) ---------- */
.timeline { position: relative; max-width: 720px; margin: 2.5rem auto; }
.timeline::before {
  content: ""; position: absolute; left: 8px; top: 0; bottom: 0;
  width: 1px; background: linear-gradient(transparent, var(--gold-soft) 8%, var(--gold-soft) 92%, transparent);
}
.tl-item { position: relative; padding: 0 0 2.8rem 2.4rem; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: ""; position: absolute; left: 2px; top: 8px;
  width: 13px; height: 13px; background: var(--ivory);
  border: 2px solid var(--gold); transform: rotate(45deg);
}
.tl-item h3 { font-size: 1.45rem; color: var(--forest); margin-bottom: .4rem; }
.tl-when { font-size: .7rem; letter-spacing: .3em; text-transform: uppercase; color: var(--gold); margin-bottom: .4rem; }
.tl-item p { color: var(--ink-soft); font-size: .96rem; }

/* ---------- family ---------- */
.family-hero { text-align: center; margin: 2.5rem 0; }
.family-hero img {
  width: min(420px, 90%); margin: 0 auto 1rem; border-radius: 6px; box-shadow: var(--shadow);
}
.family-hero .caption { font-family: var(--serif); font-size: 1.3rem; color: var(--forest); }
.family-hero .caption em { color: var(--gold); font-style: normal; }

.page-sub { color: var(--ink-soft); margin-top: .8rem; font-size: 1.05rem; }

/* ---------- his & hers ---------- */
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: start; }
.duo-split { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: start; }
.split-head {
  text-align: center; font-family: var(--serif); font-size: 1.6rem; color: var(--forest);
  margin: 0 0 1.8rem; padding-bottom: .8rem; position: relative;
}
.split-head::after { content: ""; display: block; width: 48px; height: 1px; background: var(--gold-soft); margin: .8rem auto 0; }

.person-card {
  text-align: center; background: #fff; border-radius: 6px; padding: 2.8rem 2rem 2.4rem;
  box-shadow: var(--shadow); height: 100%;
  display: flex; flex-direction: column; align-items: center;
}
.person-mono {
  width: 110px; height: 110px; border-radius: 50%; margin-bottom: 1.4rem;
  background: var(--forest); color: var(--gold-soft);
  display: grid; place-items: center;
  font-family: var(--serif); font-size: 3rem; box-shadow: 0 0 0 1px var(--gold-soft), var(--shadow);
}
.person-card h3 { font-size: 1.7rem; }
.person-card .person-zh { color: var(--gold); font-size: .85rem; letter-spacing: .3em; margin: .2rem 0 1rem; }
.person-card p { color: var(--ink-soft); font-size: .95rem; flex: 1; }
.person-links { margin-top: 1.4rem; display: flex; gap: 1.4rem; font-size: .76rem; letter-spacing: .2em; text-transform: uppercase; }

.duo .timeline, .duo-split .timeline { margin: 0; }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .duo, .duo-split { grid-template-columns: 1fr; gap: 2rem; }
}

.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

@media (max-width: 860px) {
  .nav ul {
    position: fixed; inset: 0; background: rgba(250,248,244,.98);
    flex-direction: column; justify-content: center; gap: 2rem;
    transform: translateY(-100%); transition: transform .4s ease;
  }
  .nav.menu-open ul { transform: none; }
  .nav ul a { color: var(--ink); font-size: 1rem; }
  .nav-burger { display: block; z-index: 60; }
  .nav.menu-open .nav-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav.menu-open .nav-burger span:nth-child(2) { opacity: 0; }
  .nav.menu-open .nav-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .nav.menu-open .brand, .nav.menu-open .lang-toggle { z-index: 60; position: relative; }
  .post { padding-top: 7rem; }
  .section { padding: 3.5rem 0; }
}
