/* ══════════════════════════════════════════════════════════
   Chinese Wisdom — Shared Stylesheet for Author & Book Pages
   ══════════════════════════════════════════════════════════ */

/* ── CSS VARIABLES ── */
:root {
  --ink:        #2a2318;
  --parchment:  #ede8de;
  --mist:       #d8cfc0;
  --stone:      #8a7d6b;
  --warm-gray:  #b5a99a;
  --rust:       #8b4a3a;
  --gold:       #c9a84c;
  --gold-light: #e2c47a;
  --nav-bg:     #3d3228;
  --nav-border: #5c4e3d;
  --deep-mist:  #9e9588;
  --card-bg:    #f5efe3;
  --dark-card:  #2e2419;
  --hero-dark:  #1e1812;
}

/* ── RESET ── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'IM Fell English', Georgia, serif;
  background-color: var(--parchment);
  color: var(--ink);
  overflow-x: hidden;
  line-height: 1.7;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
ul { list-style: none; }

/* ── NAV ── */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
  background-color: var(--nav-bg);
  border-bottom: 2px solid var(--nav-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2.5rem;
  height: 64px;
  box-shadow: 0 2px 24px rgba(0,0,0,0.45);
}

.nav-logo {
  font-family: 'Cinzel', serif;
  font-size: 1.2rem;
  color: var(--gold);
  letter-spacing: 0.1em;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  transition: color 0.3s;
}

.nav-logo:hover { color: var(--gold-light); }

.nav-logo .hanzi {
  font-family: 'Noto Serif SC', serif;
  font-size: 1.5rem;
  color: var(--mist);
  opacity: 0.85;
}

nav ul {
  display: flex;
  gap: 1.8rem;
  align-items: center;
}

nav ul li a {
  font-family: 'Cinzel', serif;
  font-size: 0.75rem;
  letter-spacing: 0.13em;
  color: var(--warm-gray);
  text-decoration: none;
  text-transform: uppercase;
  transition: color 0.3s;
}

nav ul li a:hover { color: var(--gold); }

.nav-cta {
  background: var(--rust) !important;
  color: var(--parchment) !important;
  padding: 0.4rem 1rem !important;
  border-radius: 2px;
}

.nav-cta:hover {
  background: #a35840 !important;
  color: #fff !important;
}

/* hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--warm-gray);
  display: block;
  transition: 0.3s;
}

/* ── FOOTER ── */
footer {
  background: var(--nav-bg);
  color: var(--warm-gray);
  padding: 3.5rem 2rem;
  text-align: center;
}

.footer-inner {
  max-width: 960px;
  margin: 0 auto;
}

.footer-hanzi {
  font-family: 'Noto Serif SC', serif;
  font-size: 1.8rem;
  color: var(--gold);
  opacity: 0.28;
  letter-spacing: 0.6em;
  display: block;
  margin-bottom: 1.5rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.footer-links a {
  font-family: 'Cinzel', serif;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  color: var(--warm-gray);
  text-decoration: none;
  text-transform: uppercase;
  transition: color 0.3s;
}

.footer-links a:hover { color: var(--gold); }

.footer-copy {
  font-size: 0.78rem;
  opacity: 0.38;
  letter-spacing: 0.05em;
}

/* ── SECTION / PAGE LAYOUT UTILITIES ── */
.page-body {
  padding-top: 64px; /* offset for fixed nav */
}

section {
  padding: 5rem 2rem;
}

.section-inner {
  max-width: 960px;
  margin: 0 auto;
}

.section-label {
  font-family: 'Cinzel', serif;
  font-size: 0.68rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--rust);
  margin-bottom: 0.5rem;
  display: block;
}

.section-title {
  font-family: 'Cinzel', serif;
  font-size: clamp(1.4rem, 3vw, 2.1rem);
  color: var(--ink);
  margin-bottom: 1.5rem;
  letter-spacing: 0.04em;
  line-height: 1.3;
}

.section-body {
  font-size: 1.05rem;
  line-height: 1.92;
  color: #4a3f33;
  max-width: 720px;
}

.section-body + .section-body,
.bio-para + .bio-para {
  margin-top: 1.4rem;
}

/* alt section backgrounds */
.section-alt   { background: #f0e9da; }
.section-dark  { background: var(--ink); }
.section-parch { background: var(--parchment); }

.section-dark .section-label { color: var(--gold); }
.section-dark .section-title { color: var(--mist); }
.section-dark .section-body  { color: var(--warm-gray); }

/* ── PAGE HERO ── */
.page-hero {
  position: relative;
  min-height: 420px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--hero-dark);
}

.page-hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    #1e1812 0%,
    #2e2419 40%,
    #3d3228 70%,
    #1e1812 100%
  );
  z-index: 0;
}

/* optional texture overlay */
.page-hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 20% 50%, rgba(201,168,76,0.06) 0%, transparent 70%);
}

.page-hero-hanzi {
  position: absolute;
  right: 4rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: 'Noto Serif SC', serif;
  font-size: clamp(8rem, 18vw, 18rem);
  color: var(--gold);
  opacity: 0.05;
  line-height: 1;
  z-index: 1;
  pointer-events: none;
  user-select: none;
}

.page-hero-content {
  position: relative;
  z-index: 2;
  padding: 3rem 2.5rem 4rem;
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
  animation: fadeUp 1s ease both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-breadcrumb {
  font-family: 'Cinzel', serif;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.65;
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hero-breadcrumb a {
  color: var(--gold);
  text-decoration: none;
  opacity: 0.65;
  transition: opacity 0.3s;
}

.hero-breadcrumb a:hover { opacity: 1; }

.hero-breadcrumb .sep { opacity: 0.4; }

.page-hero-label {
  font-family: 'Cinzel', serif;
  font-size: 0.68rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.7;
  margin-bottom: 0.6rem;
  display: block;
}

.page-hero-name {
  font-family: 'Cinzel', serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  color: var(--mist);
  letter-spacing: 0.06em;
  line-height: 1.15;
  margin-bottom: 0.5rem;
}

.page-hero-chinese {
  font-family: 'Noto Serif SC', serif;
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  color: var(--gold);
  letter-spacing: 0.15em;
  margin-bottom: 0.8rem;
  display: block;
}

.page-hero-meta {
  font-family: 'Cinzel', serif;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  color: var(--warm-gray);
  margin-bottom: 1.2rem;
  opacity: 0.8;
}

.page-hero-tagline {
  font-size: 1.05rem;
  color: var(--mist);
  font-style: italic;
  max-width: 620px;
  line-height: 1.75;
  opacity: 0.85;
  border-left: 3px solid var(--gold);
  padding-left: 1.2rem;
  margin-top: 1rem;
}

/* ── CARD GRID (works / themes) ── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.6rem;
  margin-top: 2.5rem;
}

.work-card {
  background: rgba(255,255,255,0.55);
  border: 1px solid var(--mist);
  border-top: 3px solid var(--gold);
  padding: 1.8rem 1.6rem;
  text-decoration: none;
  color: var(--ink);
  display: block;
  transition: transform 0.3s, box-shadow 0.3s, border-top-color 0.3s;
}

.work-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 14px 35px rgba(42,35,24,0.12);
  border-top-color: var(--rust);
}

.work-card-title {
  font-family: 'Cinzel', serif;
  font-size: 1rem;
  color: var(--ink);
  letter-spacing: 0.04em;
  margin-bottom: 0.25rem;
  line-height: 1.3;
}

.work-card-chinese {
  font-family: 'Noto Serif SC', serif;
  font-size: 0.9rem;
  color: var(--gold);
  letter-spacing: 0.1em;
  margin-bottom: 0.7rem;
  display: block;
}

.work-card-year {
  font-family: 'Cinzel', serif;
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  color: var(--stone);
  text-transform: uppercase;
  margin-bottom: 0.8rem;
  display: block;
}

.work-card-desc {
  font-size: 0.88rem;
  color: var(--stone);
  line-height: 1.7;
}

.work-card-arrow {
  display: inline-block;
  margin-top: 1rem;
  font-family: 'Cinzel', serif;
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  color: var(--gold);
  text-transform: uppercase;
}

/* theme cards (for book pages) */
.theme-card {
  background: rgba(255,255,255,0.55);
  border: 1px solid var(--mist);
  border-left: 4px solid var(--gold);
  padding: 1.8rem 1.6rem;
  transition: transform 0.3s, box-shadow 0.3s;
}

.theme-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(42,35,24,0.1);
}

.theme-icon {
  font-family: 'Noto Serif SC', serif;
  font-size: 1.8rem;
  color: var(--gold);
  margin-bottom: 0.7rem;
  display: block;
  opacity: 0.75;
}

.theme-title {
  font-family: 'Cinzel', serif;
  font-size: 0.92rem;
  color: var(--ink);
  letter-spacing: 0.06em;
  margin-bottom: 0.6rem;
}

.theme-title .theme-chinese {
  font-family: 'Noto Serif SC', serif;
  color: var(--stone);
  font-size: 0.82rem;
}

.theme-desc {
  font-size: 0.9rem;
  color: var(--stone);
  line-height: 1.72;
}

/* ── QUOTE DISPLAY ── */
.quotes-section { background: var(--ink); }
.quotes-section .section-label { color: var(--gold); }
.quotes-section .section-title { color: var(--mist); }

.passage-block {
  border-left: 4px solid var(--gold);
  background: rgba(255,255,255,0.03);
  padding: 2rem 2.2rem;
  margin-bottom: 2rem;
  transition: background 0.3s;
}

.passage-block:hover {
  background: rgba(255,255,255,0.06);
}

.passage-block:last-child {
  margin-bottom: 0;
}

.passage-hanzi {
  font-family: 'Noto Serif SC', serif;
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--gold);
  letter-spacing: 0.12em;
  line-height: 1.8;
  display: block;
  margin-bottom: 0.9rem;
}

.passage-english {
  font-style: italic;
  font-size: 1.05rem;
  color: var(--mist);
  line-height: 1.85;
  margin-bottom: 0.8rem;
  display: block;
}

.passage-commentary {
  font-size: 0.85rem;
  color: var(--warm-gray);
  line-height: 1.7;
  margin-top: 0.6rem;
  padding-top: 0.6rem;
  border-top: 1px solid rgba(255,255,255,0.07);
}

/* featured quotes (light background version) */
.featured-quotes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.6rem;
  margin-top: 2.5rem;
}

.featured-quote-card {
  background: rgba(255,255,255,0.5);
  border: 1px solid var(--mist);
  border-left: 4px solid var(--gold);
  padding: 2rem 1.8rem;
  transition: transform 0.3s, box-shadow 0.3s;
}

.featured-quote-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(42,35,24,0.1);
}

.featured-quote-card .fq-english {
  font-style: italic;
  font-size: 1rem;
  color: var(--ink);
  line-height: 1.82;
  margin-bottom: 1rem;
}

.featured-quote-card .fq-hanzi {
  font-family: 'Noto Serif SC', serif;
  font-size: 0.92rem;
  color: var(--gold);
  letter-spacing: 0.1em;
  line-height: 1.7;
  display: block;
}

/* ── BACK LINK ── */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Cinzel', serif;
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--stone);
  text-decoration: none;
  transition: color 0.3s;
  margin-bottom: 2rem;
}

.back-link:hover { color: var(--gold); }

.back-link .arrow { font-size: 0.9rem; }

/* ── CTA SECTION ── */
.cta-section {
  background: var(--nav-bg);
  padding: 5rem 2rem;
  text-align: center;
}

.cta-inner {
  max-width: 680px;
  margin: 0 auto;
}

.cta-hanzi {
  font-family: 'Noto Serif SC', serif;
  font-size: 3rem;
  color: var(--gold);
  opacity: 0.2;
  letter-spacing: 0.3em;
  display: block;
  margin-bottom: 1.2rem;
}

.cta-title {
  font-family: 'Cinzel', serif;
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  color: var(--mist);
  letter-spacing: 0.06em;
  margin-bottom: 1rem;
}

.cta-body {
  font-size: 1rem;
  color: var(--warm-gray);
  line-height: 1.8;
  margin-bottom: 2rem;
  font-style: italic;
}

.btn-gold {
  display: inline-block;
  background: var(--gold);
  color: var(--ink);
  padding: 0.9rem 2.4rem;
  font-family: 'Cinzel', serif;
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  text-decoration: none;
  text-transform: uppercase;
  transition: background 0.3s, color 0.3s;
  border: 1.5px solid var(--gold);
}

.btn-gold:hover {
  background: transparent;
  color: var(--gold);
}

.btn-outline {
  display: inline-block;
  background: transparent;
  color: var(--mist);
  padding: 0.9rem 2.4rem;
  font-family: 'Cinzel', serif;
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  text-decoration: none;
  text-transform: uppercase;
  border: 1.5px solid var(--mist);
  transition: all 0.3s;
  margin-left: 1rem;
}

.btn-outline:hover {
  background: var(--mist);
  color: var(--ink);
}

/* ── LEGACY / OVERVIEW SECTION ── */
.overview-section { background: var(--parchment); }
.legacy-section   { background: #f0e9da; }

.legacy-block {
  border-left: 4px solid var(--rust);
  padding: 1.5rem 1.8rem;
  background: rgba(139,74,58,0.06);
  margin-top: 2rem;
}

.legacy-block p {
  font-size: 1.05rem;
  line-height: 1.92;
  color: #4a3f33;
}

/* ── DIVIDER ── */
.ornament-divider {
  text-align: center;
  font-family: 'Noto Serif SC', serif;
  font-size: 1.2rem;
  color: var(--warm-gray);
  letter-spacing: 0.5em;
  opacity: 0.4;
  padding: 1rem 0;
}

/* ── SCROLL REVEAL ── */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.75s ease, transform 0.75s ease;
}

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

/* stagger delays */
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ── RESPONSIVE — MOBILE HAMBURGER AT 768px ── */
@media (max-width: 768px) {
  nav {
    padding: 0 1.5rem;
  }

  nav ul {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--nav-bg);
    padding: 1rem 1.5rem 1.5rem;
    gap: 0.8rem;
    border-bottom: 1px solid var(--nav-border);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
    z-index: 99;
  }

  nav ul.open {
    display: flex;
  }

  .nav-toggle {
    display: flex;
  }

  .page-hero {
    min-height: 360px;
  }

  .page-hero-hanzi {
    right: 1rem;
    font-size: clamp(6rem, 30vw, 10rem);
    opacity: 0.04;
  }

  .page-hero-content {
    padding: 2rem 1.5rem 3rem;
  }

  section {
    padding: 3.5rem 1.2rem;
  }

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

  .featured-quotes-grid {
    grid-template-columns: 1fr;
  }

  .btn-outline {
    margin-left: 0;
    margin-top: 0.8rem;
  }

  .cta-section {
    padding: 3.5rem 1.2rem;
  }
}

@media (max-width: 480px) {
  .page-hero-name {
    font-size: 1.8rem;
  }

  .page-hero-tagline {
    font-size: 0.95rem;
  }

  .passage-block {
    padding: 1.5rem 1.2rem;
  }
}
