/* =========================================
   女邻居2 — Nature Distilled · Inter
   主色 #5cc6b0 辅 #d4c4a8 底 #172623
   ========================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ---- 变量 ---- */
:root {
  --mint:    #5cc6b0;
  --sand:    #d4c4a8;
  --forest:  #172623;
  --forest2: #1f3430;
  --forest3: #243d38;
  --leaf:    #3a9e8a;
  --bark:    #a08c6e;
  --cream:   #f5efe4;
  --text:    #e8dfd0;
  --text-dim:#9db0ab;
  --glass-bg:rgba(23,38,35,0.72);
  --glass-bd:rgba(92,198,176,0.18);
  --radius:  0px;
  --nav-w:   220px;
  --trans:   0.25s ease-out;
  --font:    'Inter', system-ui, -apple-system, sans-serif;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 17px; scroll-behavior: smooth; }
body {
  background: var(--forest);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--mint); text-decoration: none; transition: color var(--trans); }
a:hover { color: var(--sand); }

/* ---- Layout Shell ---- */
.layout-home body,
body.layout-home,
body.layout-topic,
body.layout-article,
body.layout-about,
body.layout-privacy {
  display: flex;
}

body {
  display: flex;
  flex-direction: row;
}

/* ---- Sidenav ---- */
.sidenav {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--nav-w);
  height: 100vh;
  background: var(--forest2);
  border-right: 1px solid var(--glass-bd);
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--forest3) transparent;
}

.sidenav__top {
  padding: 1.5rem 1.2rem 1rem;
  border-bottom: 1px solid var(--glass-bd);
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.brand-icon {
  width: 40px;
  height: 40px;
  object-fit: cover;
}

.brand-icon-text {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--mint);
  color: var(--forest);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

.sidenav__slogan {
  font-size: 0.68rem;
  color: var(--text-dim);
  letter-spacing: 0.08em;
  line-height: 1.4;
  text-transform: none;
}

.sidenav__nav {
  display: flex;
  flex-direction: column;
  padding: 1rem 0;
  flex: 1;
}

.nav-link {
  display: block;
  padding: 0.72rem 1.2rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-dim);
  letter-spacing: 0.02em;
  border-left: 3px solid transparent;
  transition: background var(--trans), color var(--trans), border-color var(--trans);
  min-height: 44px;
  line-height: 1.4;
}

.nav-link:hover {
  background: var(--forest3);
  color: var(--sand);
  border-left-color: var(--sand);
}

.nav-link--active {
  background: rgba(92,198,176,0.1);
  color: var(--mint);
  border-left-color: var(--mint);
}

/* ---- Page Wrap ---- */
.page-wrap {
  margin-left: var(--nav-w);
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ---- Hero (Home) ---- */
.hero--home {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--forest3);
}

.hero__media {
  position: absolute;
  inset: 0;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}

.hero--home::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(23,38,35,0.85) 0%, rgba(23,38,35,0.45) 60%, rgba(23,38,35,0.2) 100%);
  z-index: 1;
}

/* grain texture overlay */
.hero--home::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  opacity: 0.18;
  z-index: 2;
  pointer-events: none;
}

.hero__body {
  position: relative;
  z-index: 3;
  padding: 3rem 3rem 0;
  max-width: 700px;
}

.hero__title {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--cream);
  line-height: 1.2;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

.hero__lead {
  font-size: 1rem;
  color: var(--sand);
  max-width: 520px;
  line-height: 1.7;
}

.hero__cut {
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 60px;
  background: var(--forest);
  clip-path: polygon(0 100%, 100% 0, 100% 100%);
  z-index: 4;
}

/* ---- Topic Banner ---- */
.topic-banner {
  position: relative;
  padding: 3rem 3rem 4rem;
  background: linear-gradient(160deg, var(--forest2) 0%, var(--forest3) 100%);
  border-bottom: 1px solid var(--glass-bd);
  overflow: hidden;
}

.topic-banner::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(92,198,176,0.12) 0%, transparent 70%);
  pointer-events: none;
}

.topic-banner__title {
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  font-weight: 700;
  color: var(--cream);
  margin: 0.5rem 0 0.6rem;
  letter-spacing: -0.02em;
}

.topic-banner__lead {
  color: var(--sand);
  font-size: 0.95rem;
  max-width: 600px;
}

.topic-banner__cut {
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 40px;
  background: var(--forest);
  clip-path: polygon(0 0, 100% 100%, 0 100%);
}

/* ---- Inner Banner (About/Privacy) ---- */
.inner-banner {
  padding: 2.5rem 3rem 3rem;
  background: var(--forest2);
  border-bottom: 1px solid var(--glass-bd);
}

.inner-banner__title {
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  font-weight: 700;
  color: var(--cream);
  margin: 0.4rem 0 0;
}

/* ---- Breadcrumb ---- */
.breadcrumb {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-bottom: 0.6rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.2rem;
}

.breadcrumb a { color: var(--text-dim); }
.breadcrumb a:hover { color: var(--mint); }
.breadcrumb span[aria-hidden] { margin: 0 0.15rem; }

/* ---- Content Main ---- */
.content-main {
  flex: 1;
  padding: 2.5rem 3rem;
  max-width: 1100px;
  width: 100%;
}

.content-main--flat {
  max-width: 820px;
}

.content-main--article {
  max-width: 860px;
}

/* ---- Prose Block ---- */
.prose-block {
  margin-bottom: 3rem;
}

.prose-inner {
  background: var(--glass-bg);
  border: 1px solid var(--glass-bd);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 2rem 2.4rem;
}

.prose-block--wide .prose-inner {
  max-width: 100%;
}

.prose-body {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text);
}

.prose-body h2 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--cream);
  margin: 2rem 0 0.75rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--glass-bd);
}

.prose-body h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--sand);
  margin: 1.5rem 0 0.5rem;
}

.prose-body p { margin-bottom: 1rem; }
.prose-body ul, .prose-body ol { padding-left: 1.4em; margin-bottom: 1rem; }
.prose-body li { margin-bottom: 0.35rem; }
.prose-body table { width: 100%; border-collapse: collapse; margin-bottom: 1rem; font-size: 0.9rem; }
.prose-body th { background: var(--forest3); color: var(--mint); padding: 0.6rem 0.8rem; text-align: left; border: 1px solid var(--glass-bd); }
.prose-body td { padding: 0.55rem 0.8rem; border: 1px solid var(--glass-bd); }
.prose-body tr:nth-child(even) td { background: rgba(255,255,255,0.03); }
.prose-body a { color: var(--mint); text-decoration: underline; text-decoration-color: rgba(92,198,176,0.3); }
.prose-body a:hover { color: var(--sand); }
.prose-body strong { color: var(--cream); font-weight: 600; }
.prose-body code { background: var(--forest3); padding: 0.15em 0.4em; font-size: 0.88em; border-radius: 2px; }

/* ---- Section Headings ---- */
.content-main h2 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--cream);
  margin: 0 0 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.eyebrow {
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--mint);
  letter-spacing: 0.12em;
  text-transform: none;
  display: block;
}

/* ---- Topic Cards (Home) ---- */
.topics-section { margin-bottom: 3rem; }
.recent-section { margin-bottom: 3rem; }

.topic-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1px;
  background: var(--glass-bd);
  border: 1px solid var(--glass-bd);
}

.topic-list__item { background: var(--forest); }

.topic-card {
  background: var(--glass-bg);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 1.4rem;
  height: 100%;
  transition: background var(--trans);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.topic-card:hover { background: rgba(31,52,48,0.9); }

.topic-card__media {
  overflow: hidden;
  margin-bottom: 0.4rem;
}

.topic-card__img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  transition: transform 0.4s ease-out;
}

.topic-card:hover .topic-card__img { transform: scale(1.04); }

.topic-card__title {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--cream);
}

.topic-card__title a { color: inherit; }
.topic-card__title a:hover { color: var(--mint); }

.topic-card__desc {
  font-size: 0.82rem;
  color: var(--text-dim);
  line-height: 1.5;
}

/* ---- Recent Cards ---- */
.rec-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1px;
  background: var(--glass-bd);
  border: 1px solid var(--glass-bd);
}

.rec-list__item { background: var(--forest); }

.rec-card {
  background: var(--glass-bg);
  padding: 1.2rem 1.4rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  transition: background var(--trans);
}

.rec-card:hover { background: rgba(31,52,48,0.9); }

.rec-card__title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--cream);
  line-height: 1.35;
}

.rec-card__title a { color: inherit; }
.rec-card__title a:hover { color: var(--mint); }

.card-date {
  font-size: 0.72rem;
  color: var(--text-dim);
  letter-spacing: 0.04em;
}

.rec-card__desc {
  font-size: 0.82rem;
  color: var(--text-dim);
  line-height: 1.5;
}

/* ---- Child Cards (Topic) ---- */
.child-section { margin-bottom: 3rem; }

.child-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1px;
  background: var(--glass-bd);
  border: 1px solid var(--glass-bd);
}

.child-list--compact .child-list__item { background: var(--forest); }
.child-list__item { background: var(--forest); }

.child-card {
  background: var(--glass-bg);
  padding: 1.3rem 1.5rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  transition: background var(--trans);
}

.child-card--sm { padding: 0.9rem 1.2rem; }

.child-card:hover { background: rgba(31,52,48,0.88); }

.child-card__media {
  overflow: hidden;
  margin-bottom: 0.3rem;
}

.child-card__img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  transition: transform 0.4s ease-out;
}

.child-card:hover .child-card__img { transform: scale(1.03); }

.child-card__title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--cream);
  line-height: 1.35;
}

.child-card__title a { color: inherit; }
.child-card__title a:hover { color: var(--mint); }

.child-date {
  font-size: 0.72rem;
  color: var(--text-dim);
}

.child-card__desc {
  font-size: 0.82rem;
  color: var(--text-dim);
  line-height: 1.5;
}

/* ---- Article Layout ---- */
.article-block { width: 100%; }

.article-header {
  margin-bottom: 2rem;
}

.article-hero {
  margin: 1rem 0;
  overflow: hidden;
}

.article-hero-img {
  width: 100%;
  max-height: 380px;
  object-fit: cover;
  object-position: center 25%;
}

.article-title {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--cream);
  line-height: 1.25;
  margin: 0.6rem 0 0.5rem;
  letter-spacing: -0.02em;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 0.6rem;
}

.article-date {
  font-size: 0.78rem;
  color: var(--text-dim);
  letter-spacing: 0.04em;
}

.article-lead {
  font-size: 1rem;
  color: var(--sand);
  line-height: 1.65;
  max-width: 640px;
}

.article-body-wrap {
  background: var(--glass-bg);
  border: 1px solid var(--glass-bd);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 2rem 2.4rem;
  margin-bottom: 2rem;
}

.article-body {
  font-size: 1rem;
  line-height: 1.78;
  color: var(--text);
}

.article-body h2 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--cream);
  margin: 2rem 0 0.7rem;
  border-top: 1px solid var(--glass-bd);
  padding-top: 0.6rem;
}

.article-body h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--sand);
  margin: 1.4rem 0 0.5rem;
}

.article-body p { margin-bottom: 1rem; }
.article-body ul, .article-body ol { padding-left: 1.4em; margin-bottom: 1rem; }
.article-body li { margin-bottom: 0.3rem; }
.article-body table { width: 100%; border-collapse: collapse; margin-bottom: 1rem; font-size: 0.9rem; }
.article-body th { background: var(--forest3); color: var(--mint); padding: 0.6rem 0.8rem; text-align: left; border: 1px solid var(--glass-bd); }
.article-body td { padding: 0.5rem 0.8rem; border: 1px solid var(--glass-bd); }
.article-body tr:nth-child(even) td { background: rgba(255,255,255,0.03); }
.article-body a { color: var(--mint); text-decoration: underline; text-decoration-color: rgba(92,198,176,0.35); }
.article-body a:hover { color: var(--sand); }
.article-body strong { color: var(--cream); font-weight: 600; }
.article-body code { background: var(--forest3); padding: 0.15em 0.4em; font-size: 0.88em; }

/* ---- Related Aside ---- */
.related-aside { margin-bottom: 2.5rem; }

.related-aside h2 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--cream);
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.related-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1px;
  background: var(--glass-bd);
  border: 1px solid var(--glass-bd);
}

.related-list__item { background: var(--forest); }

.related-card {
  background: var(--glass-bg);
  padding: 1rem 1.2rem;
  height: 100%;
  transition: background var(--trans);
}

.related-card:hover { background: rgba(31,52,48,0.88); }

.related-card__title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--cream);
  line-height: 1.35;
  margin-bottom: 0.3rem;
}

.related-card__title a { color: inherit; }
.related-card__title a:hover { color: var(--mint); }

.related-card__desc {
  font-size: 0.78rem;
  color: var(--text-dim);
  line-height: 1.45;
}

/* ---- About Nav Section ---- */
.about-nav-section { margin-bottom: 2.5rem; }

/* ---- Footer ---- */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--glass-bd);
  background: var(--forest2);
  padding: 2rem 3rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 2rem;
  max-width: 1000px;
}

.footer-col dt {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--mint);
  letter-spacing: 0.06em;
  margin-bottom: 0.6rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--glass-bd);
}

.footer-col dd {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 0.35rem;
  line-height: 1.4;
}

.footer-col dd a {
  color: var(--text-dim);
  transition: color var(--trans);
}

.footer-col dd a:hover { color: var(--mint); }

.footer-copy {
  margin-top: 0.8rem;
  font-size: 0.72rem;
  color: rgba(157,176,171,0.5);
}

/* ---- Stagger animation ---- */
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.topic-list__item,
.rec-list__item,
.child-list__item,
.related-list__item {
  animation: fadeSlideUp 0.4s ease-out both;
}

.topic-list__item:nth-child(1) { animation-delay: 0.05s; }
.topic-list__item:nth-child(2) { animation-delay: 0.1s; }
.topic-list__item:nth-child(3) { animation-delay: 0.15s; }
.topic-list__item:nth-child(4) { animation-delay: 0.2s; }
.topic-list__item:nth-child(5) { animation-delay: 0.25s; }
.topic-list__item:nth-child(6) { animation-delay: 0.3s; }

.child-list__item:nth-child(1) { animation-delay: 0.05s; }
.child-list__item:nth-child(2) { animation-delay: 0.1s; }
.child-list__item:nth-child(3) { animation-delay: 0.15s; }
.child-list__item:nth-child(4) { animation-delay: 0.2s; }

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

/* ---- Mobile nav toggle ---- */
.nav-toggle {
  display: none;
  position: fixed;
  top: 0.8rem;
  left: 0.8rem;
  z-index: 200;
  background: var(--forest2);
  border: 1px solid var(--glass-bd);
  color: var(--mint);
  width: 44px;
  height: 44px;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 1.2rem;
}

.nav-toggle__bar {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--mint);
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
  :root { --nav-w: 200px; }
  .content-main { padding: 2rem 2rem; }
  .hero__body { padding: 2rem 2rem 0; }
  .topic-banner { padding: 2rem 2rem 3rem; }
  .inner-banner { padding: 2rem 2rem 2.5rem; }
  .site-footer { padding: 1.5rem 2rem; }
  .footer-inner { grid-template-columns: 1.2fr 1fr; }
  .footer-inner dl:last-child { grid-column: 1 / -1; }
}

@media (max-width: 680px) {
  :root { --nav-w: 0px; }

  body { flex-direction: column; }

  .sidenav {
    position: fixed;
    top: 0;
    left: -240px;
    width: 240px;
    height: 100vh;
    transition: left 0.3s ease-out;
    z-index: 150;
  }

  .sidenav.is-open { left: 0; }

  .nav-toggle {
    display: flex;
  }

  .page-wrap {
    margin-left: 0;
    padding-top: 3.5rem;
  }

  .hero--home {
    min-height: 55vh;
  }

  .hero__body {
    padding: 1.5rem 1.2rem 0;
  }

  .hero__title { font-size: 1.6rem; }

  .topic-banner { padding: 1.5rem 1.2rem 2.5rem; }
  .topic-banner__title { font-size: 1.4rem; }

  .inner-banner { padding: 1.5rem 1.2rem 1.8rem; }

  .content-main { padding: 1.5rem 1.2rem; }

  .prose-inner,
  .article-body-wrap { padding: 1.3rem 1.2rem; }

  .topic-list,
  .rec-list,
  .child-list,
  .related-list {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }

  .site-footer { padding: 1.2rem 1.2rem; }
}

/* ---- Nav overlay for mobile ---- */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 140;
}

.nav-overlay.is-visible { display: block; }
