:root {
  --bg: #f3eee6;
  --ink: #1c1916;
  --muted: #5f584f;
  --line: #d8d0c4;
  --accent: #8d3a2e;
  --nav-h: 4.25rem;
  --serif: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", "SimSun", serif;
  --sans: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { max-width: 100%; }

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--ink);
  color: var(--bg);
  padding: 0.4rem 0.8rem;
  z-index: 20;
}
.skip:focus { top: 0.6rem; }

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 10;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 7vw;
  background: transparent;
  transition: background 0.35s var(--ease), border-color 0.35s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(243, 238, 230, 0.92);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}
.nav-logo {
  font-family: var(--serif);
  font-size: 1.15rem;
  letter-spacing: 0.08em;
  text-decoration: none;
}
.nav-links {
  display: flex;
  gap: 1.75rem;
}
.nav-links a {
  font-size: 0.92rem;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.06em;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] { color: var(--ink); }
.nav-toggle {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 1.25rem;
  height: 1px;
  margin: 5px auto;
  background: var(--ink);
  transition: transform 0.3s var(--ease), opacity 0.3s;
}

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: calc(var(--nav-h) + 2rem) 7vw 7vh;
  overflow: hidden;
}
.hero-mark {
  position: absolute;
  right: -0.12em;
  top: 8vh;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(16rem, 42vw, 34rem);
  line-height: 0.8;
  color: #cfc4b4;
  pointer-events: none;
  user-select: none;
  animation: rise 1.1s var(--ease) both;
}
.hero-copy { position: relative; max-width: 36rem; }
.hero-copy > * { animation: rise 0.9s var(--ease) both; }
.eyebrow {
  margin: 0 0 1.25rem;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  color: var(--accent);
  animation-delay: 0.05s;
}
.hero h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(4.2rem, 10vw, 7.6rem);
  line-height: 0.92;
  letter-spacing: 0.04em;
  animation-delay: 0.14s;
}
.lede {
  margin: 1.5rem 0 0;
  max-width: 26rem;
  color: var(--muted);
  font-size: 1.12rem;
  animation-delay: 0.26s;
}
.hero-foot {
  position: relative;
  margin: 12vh 0 0;
  font-size: 0.84rem;
  letter-spacing: 0.12em;
  color: var(--muted);
  animation: rise 0.9s 0.38s var(--ease) both;
}

.notes {
  padding: 0 7vw 6rem;
}
.section-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.5rem;
}
.section-label h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.12em;
}
.section-label p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}
.entries { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.entries a {
  display: grid;
  grid-template-columns: 6.5rem 1fr auto;
  gap: 1.5rem;
  align-items: center;
  padding: 1.7rem 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}
.entries time {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.entries strong {
  display: block;
  font-family: var(--serif);
  font-size: clamp(1.45rem, 2.4vw, 2rem);
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 1.3;
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-size: 0 1px;
  background-position: 0 100%;
  transition: background-size 0.4s var(--ease);
}
.entries a:hover strong { background-size: 100% 1px; }
.entries em {
  display: block;
  margin-top: 0.35rem;
  font-style: normal;
  color: var(--muted);
  font-size: 0.95rem;
}
.entries .go {
  color: var(--accent);
  letter-spacing: 0.08em;
  font-size: 0.85rem;
}

.page,
.article {
  padding: calc(var(--nav-h) + 4.5rem) 7vw 5rem;
  max-width: 46rem;
}
.back {
  margin: 0 0 2rem;
}
.back a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
}
.back a:hover { color: var(--accent); }
.page h1,
.article h1 {
  margin: 0.4rem 0 1.5rem;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: 1.2;
  letter-spacing: 0.04em;
}
.article time,
.page .updated {
  color: var(--muted);
  font-size: 0.88rem;
  letter-spacing: 0.06em;
}
.prose p { margin: 0 0 1.15rem; }
.prose h2 {
  margin: 2.2rem 0 0.7rem;
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 600;
}
.prose a { color: var(--accent); }
.mail {
  font-family: var(--serif);
  font-size: 1.35rem;
  color: var(--accent);
  text-underline-offset: 0.2em;
}

.footer {
  padding: 2rem 7vw 2.5rem;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 1.5rem 2rem;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.86rem;
}
.footer p { margin: 0; max-width: 36rem; }
.footer nav { display: flex; gap: 1.25rem; }
.footer a { color: var(--muted); }
.footer a:hover { color: var(--accent); }

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav-toggle.is-open span:nth-child(1) { transform: translateY(6px) rotate(40deg); }
  .nav-toggle.is-open span:nth-child(2) { opacity: 0; }
  .nav-toggle.is-open span:nth-child(3) { transform: translateY(-6px) rotate(-40deg); }
  .nav-links {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 7vw 1rem;
    background: rgba(243, 238, 230, 0.98);
    border-bottom: 1px solid var(--line);
  }
  .nav-links.is-open { display: flex; }
  .nav-links a { padding: 0.85rem 0; border-bottom: 1px solid var(--line); }
  .hero-mark { font-size: 14rem; top: 18vh; opacity: 0.85; }
  .hero h1 { font-size: 3.6rem; }
  .entries a { grid-template-columns: 1fr auto; }
  .entries time { grid-column: 1 / -1; }
  .page, .article { padding-top: calc(var(--nav-h) + 2.5rem); }
}

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