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

/* ── 设计令牌 ── */
:root {
  --c-green: #87ff71;
  --c-yellow: #ffce5c;
  --c-dark: #192617;
  --c-dark-2: #1f3020;
  --c-dark-3: #243824;
  --c-green-dim: rgba(135,255,113,0.15);
  --c-yellow-dim: rgba(255,206,92,0.15);
  --c-text: #e8f5e5;
  --c-text-muted: #a8c5a0;
  --radius-card: 28px;
  --radius-btn: 40px;
  --font-display: 'Great Vibes', 'Cormorant Infant', Georgia, serif;
  --font-body: 'Cormorant Infant', 'Noto Serif SC', Georgia, serif;
  --font-ui: system-ui, -apple-system, 'Segoe UI', sans-serif;
  --nav-h: 68px;
  --transition-fast: 180ms cubic-bezier(.4,0,.2,1);
  --transition-med: 320ms cubic-bezier(.4,0,.2,1);
}

/* ── Reset 基础 ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  font-size: 17px;
  line-height: 1.65;
  background: var(--c-dark);
  color: var(--c-text);
}
body {
  font-family: var(--font-body);
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--c-dark);
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--c-green); text-decoration: none; }
a:hover { text-decoration: underline; }
ul { list-style: none; }

/* ── scroll-margin for fixed header ── */
article[id] { scroll-margin-top: calc(var(--nav-h) + 16px); }

/* ── Memphis 背景几何装饰 ── */
.memphis-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.shape {
  position: absolute;
}
.shape--tri-1 {
  top: -40px; left: -40px;
  width: 220px; height: 220px;
  background: var(--c-yellow);
  clip-path: polygon(0 0, 100% 0, 0 100%);
  opacity: .18;
  transform: rotate(-8deg);
}
.shape--tri-2 {
  bottom: 10%; right: -60px;
  width: 280px; height: 280px;
  background: var(--c-green);
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
  opacity: .13;
  transform: rotate(12deg);
}
.shape--circle-1 {
  top: 30%; left: 5%;
  width: 120px; height: 120px;
  border-radius: 50%;
  border: 6px solid var(--c-yellow);
  opacity: .18;
}
.shape--squiggle {
  top: 55%; right: 8%;
  width: 90px; height: 90px;
  border: 5px dashed var(--c-green);
  border-radius: 50% 10% 50% 10%;
  opacity: .22;
  transform: rotate(30deg);
}
.shape--dot-grid {
  top: 18%; right: 15%;
  width: 160px; height: 160px;
  background-image: radial-gradient(var(--c-yellow) 1.5px, transparent 1.5px);
  background-size: 14px 14px;
  opacity: .25;
}
.shape--rect-1 {
  bottom: 20%; left: 12%;
  width: 60px; height: 120px;
  background: var(--c-green);
  opacity: .10;
  transform: rotate(18deg);
  border-radius: 4px;
}
.shape--rect-2 {
  top: 8%; right: 30%;
  width: 40px; height: 40px;
  background: var(--c-yellow);
  opacity: .20;
  transform: rotate(45deg);
}

/* ── Header ── */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(25,38,23,.92);
  backdrop-filter: blur(12px);
  border-bottom: 2px solid var(--c-green);
}
.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 20px;
}
.brand-link {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
}
.brand-logo {
  width: 40px; height: 40px;
  border-radius: 8px;
}
.brand-link--text {
  width: 40px; height: 40px;
  background: var(--c-green);
  border-radius: 10px;
  justify-content: center;
}
.brand-icon {
  font-size: 1.3rem;
  color: var(--c-dark);
  font-weight: 700;
}
.main-nav {
  flex: 1;
  overflow: hidden;
}
.nav-list {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 4px 0;
}
.nav-list::-webkit-scrollbar { display: none; }
.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 12px;
  border-radius: var(--radius-btn);
  font-family: var(--font-ui);
  font-size: .82rem;
  font-weight: 600;
  color: var(--c-text);
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: .03em;
  transition: background var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
  min-height: 40px;
}
.nav-link:hover {
  background: var(--c-green-dim);
  color: var(--c-green);
  transform: translateY(-1px);
  text-decoration: none;
}
.nav-link--0 { color: var(--c-green); }
.nav-link--1 { color: var(--c-yellow); }
.nav-link--2 { color: var(--c-green); }
.nav-link--3 { color: var(--c-yellow); }
.nav-link--4 { color: var(--c-green); }
.nav-link--5 { color: var(--c-yellow); }
.nav-link--6 { color: var(--c-green); }

.header-cta { flex-shrink: 0; }
.btn-cta {
  display: inline-flex;
  align-items: center;
  padding: 10px 22px;
  border-radius: var(--radius-btn);
  background: var(--c-yellow);
  color: var(--c-dark);
  font-family: var(--font-ui);
  font-size: .88rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-decoration: none;
  min-height: 40px;
  transition: background var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}
.btn-cta:hover {
  background: var(--c-green);
  transform: translateY(-2px) rotate(-1deg);
  box-shadow: 0 6px 24px rgba(135,255,113,.35);
  text-decoration: none;
}

/* ── Main wrapper ── */
.site-main {
  position: relative;
  z-index: 1;
  padding-top: var(--nav-h);
}

/* ── Hero ── */
.hero-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 70vh;
  align-items: center;
  max-width: 1280px;
  margin: 0 auto;
  padding: 60px 32px 48px;
  gap: 48px;
}
.hero-figure {
  position: relative;
  border-radius: var(--radius-card);
  overflow: visible;
}
.hero-img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-card);
  object-fit: cover;
  aspect-ratio: 4/3;
  display: block;
}
.hero-placeholder {
  width: 100%;
  aspect-ratio: 4/3;
  border-radius: var(--radius-card);
  background: repeating-linear-gradient(
    45deg,
    var(--c-dark-2) 0px, var(--c-dark-2) 12px,
    var(--c-dark-3) 12px, var(--c-dark-3) 24px
  );
  border: 3px dashed var(--c-green);
}
.hero-deco {
  position: absolute;
  pointer-events: none;
}
.hero-deco--tri {
  bottom: -24px; left: -24px;
  width: 80px; height: 80px;
  background: var(--c-yellow);
  clip-path: polygon(0 100%, 100% 100%, 0 0);
  opacity: .75;
  transform: rotate(-5deg);
}
.hero-deco--circle {
  top: -18px; right: -18px;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--c-green);
  opacity: .55;
}
.hero-aside {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 20px;
}
.hero-h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.4rem);
  font-weight: 400;
  line-height: 1.2;
  color: var(--c-green);
  text-shadow: 2px 2px 0 rgba(0,0,0,.4);
}
.hero-desc {
  font-size: 1.05rem;
  color: var(--c-text-muted);
  max-width: 420px;
  line-height: 1.75;
}
.btn-primary {
  display: inline-flex;
  align-items: center;
  padding: 14px 36px;
  border-radius: var(--radius-btn);
  background: var(--c-green);
  color: var(--c-dark);
  font-family: var(--font-ui);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-decoration: none;
  min-height: 48px;
  transition: background var(--transition-fast), transform var(--transition-med), box-shadow var(--transition-med);
}
.btn-primary:hover {
  background: var(--c-yellow);
  transform: translateY(-3px) rotate(1deg);
  box-shadow: 0 8px 32px rgba(255,206,92,.4);
  text-decoration: none;
}

/* ── Content article (aside + figure) ── */
.content-section {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 40px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 32px 80px;
  align-items: start;
}
.content-aside {
  position: sticky;
  top: calc(var(--nav-h) + 24px);
  background: var(--c-dark-2);
  border-radius: var(--radius-card);
  padding: 28px 24px;
  border: 2px solid rgba(135,255,113,.2);
  overflow: hidden;
}
.aside-title {
  font-family: var(--font-ui);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--c-yellow);
  text-transform: uppercase;
  margin-bottom: 10px;
}
.content-aside hr,
.content-figure hr {
  border: none;
  border-top: 2px solid var(--c-green);
  margin: 12px 0 16px;
  opacity: .5;
}
.aside-nav-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.aside-link {
  display: block;
  padding: 8px 10px;
  border-radius: 10px;
  font-family: var(--font-ui);
  font-size: .82rem;
  color: var(--c-text-muted);
  transition: background var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
}
.aside-link:hover {
  background: var(--c-green-dim);
  color: var(--c-green);
  transform: translateX(4px);
  text-decoration: none;
}
.aside-deco {
  position: relative;
  margin-top: 20px;
  height: 60px;
  overflow: hidden;
}
.aside-shape {
  position: absolute;
}
.aside-shape--rect {
  bottom: -10px; left: -10px;
  width: 48px; height: 48px;
  background: var(--c-yellow);
  opacity: .25;
  transform: rotate(22deg);
  border-radius: 4px;
}
.aside-shape--circle {
  bottom: 0; right: 10px;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 3px solid var(--c-green);
  opacity: .3;
}

/* ── Content figure / body ── */
.content-figure {
  min-width: 0;
}
.content-body {
  background: var(--c-dark-2);
  border-radius: var(--radius-card);
  padding: 40px 48px;
  border: 1.5px solid rgba(135,255,113,.12);
}

/* ── Prose styles for page.content ── */
.content-body h1,
.content-body h2,
.content-body h3,
.content-body h4 {
  font-family: var(--font-display);
  color: var(--c-green);
  margin-top: 2em;
  margin-bottom: .4em;
  line-height: 1.3;
}
.content-body h1 { font-size: 2rem; }
.content-body h2 { font-size: 1.65rem; }
.content-body h3 { font-size: 1.3rem; color: var(--c-yellow); }
.content-body h4 { font-size: 1.05rem; font-family: var(--font-ui); font-weight: 700; color: var(--c-text); }

.content-body hr {
  border: none;
  border-top: 2px dashed var(--c-green);
  margin: 24px 0;
  opacity: .4;
}
.content-body p {
  margin-bottom: 1.2em;
  color: var(--c-text);
  font-size: 1.02rem;
  line-height: 1.8;
}
.content-body ul,
.content-body ol {
  padding-left: 1.5em;
  margin-bottom: 1.2em;
}
.content-body li {
  margin-bottom: .5em;
  line-height: 1.7;
}
.content-body a {
  color: var(--c-yellow);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.content-body a:hover { color: var(--c-green); }
.content-body strong { color: var(--c-yellow); font-weight: 700; }
.content-body em { color: var(--c-green); font-style: italic; }
.content-body blockquote {
  border-left: 4px solid var(--c-yellow);
  padding: 12px 20px;
  margin: 1.5em 0;
  background: rgba(255,206,92,.07);
  border-radius: 0 12px 12px 0;
  font-style: italic;
  color: var(--c-text-muted);
}
.content-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
  font-size: .95rem;
}
.content-body th {
  background: var(--c-dark-3);
  color: var(--c-green);
  padding: 10px 14px;
  text-align: left;
  font-weight: 700;
}
.content-body td {
  padding: 9px 14px;
  border-bottom: 1px solid rgba(135,255,113,.12);
  color: var(--c-text);
}
.content-body tr:hover td { background: rgba(135,255,113,.05); }

/* ── Section headings inside page.content ── */
.content-body article {
  margin-bottom: 3em;
}

/* ── Footer ── */
.site-footer {
  position: relative;
  z-index: 1;
  background: var(--c-dark-2);
  border-top: 2px solid rgba(135,255,113,.2);
  padding: 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.footer-brand {
  font-family: var(--font-body);
  font-size: .95rem;
  color: var(--c-text-muted);
}
.footer-brand strong {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--c-green);
  font-weight: 400;
}
.footer-copy {
  font-family: var(--font-ui);
  font-size: .78rem;
  color: var(--c-text-muted);
  opacity: .7;
}

/* ── Stagger list animation ── */
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
.content-body article {
  animation: fadeSlideUp .5s ease both;
}
.content-body article:nth-child(1) { animation-delay: .05s; }
.content-body article:nth-child(2) { animation-delay: .12s; }
.content-body article:nth-child(3) { animation-delay: .19s; }
.content-body article:nth-child(4) { animation-delay: .26s; }
.content-body article:nth-child(5) { animation-delay: .33s; }
.content-body article:nth-child(6) { animation-delay: .40s; }
.content-body article:nth-child(7) { animation-delay: .47s; }

.nav-link, .aside-link, .btn-primary, .btn-cta {
  transition-property: background, color, transform, box-shadow;
}

/* ── prefers-reduced-motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-delay: .01ms !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ── 响应式 ── */
@media (max-width: 900px) {
  .hero-section {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 40px 20px 36px;
  }
  .hero-aside {
    text-align: center;
    align-items: center;
  }
  .hero-h1 { font-size: 2rem; }
  .content-section {
    grid-template-columns: 1fr;
    padding: 24px 20px 60px;
  }
  .content-aside {
    position: static;
  }
  .aside-nav-list {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
  }
  .aside-link {
    padding: 7px 12px;
    background: var(--c-dark-3);
    border-radius: 20px;
  }
  .content-body {
    padding: 28px 22px;
  }
}

@media (max-width: 600px) {
  :root { --nav-h: 60px; }
  .nav-list {
    gap: 2px;
  }
  .nav-link {
    padding: 8px 8px;
    font-size: .75rem;
    gap: 3px;
  }
  .btn-cta {
    padding: 9px 14px;
    font-size: .78rem;
  }
  .hero-section {
    padding: 28px 16px 28px;
  }
  .hero-h1 { font-size: 1.7rem; }
  .content-section { padding: 16px 16px 48px; }
  .content-body { padding: 20px 16px; }
  .site-footer {
    flex-direction: column;
    text-align: center;
    padding: 24px 16px;
  }
}

@media (max-width: 375px) {
  .hero-h1 { font-size: 1.45rem; }
  .nav-link { padding: 8px 6px; font-size: .7rem; }
  .content-body { padding: 16px 12px; }
}
