@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;500;600&family=Cormorant+Garamond:ital,wght@0,300;0,500;0,700;1,300;1,500&family=Crimson+Pro:ital,wght@0,300;0,400;0,600;1,300;1,400&display=swap');

/* ===== 基础重置 ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 110px;
  font-size: 17px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Crimson Pro', 'Cormorant Garamond', 'Georgia', serif;
  background-color: #f5f5f5;
  color: #1f1f1f;
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

/* ===== CSS 变量 ===== */
:root {
  --white: #ffffff;
  --surface: #f5f5f5;
  --ink: #1f1f1f;
  --ink-60: rgba(31,31,31,0.6);
  --ink-12: rgba(31,31,31,0.12);
  --ink-06: rgba(31,31,31,0.06);
  --radius-card: 16px;
  --radius-pill: 999px;
  --shadow-card: 0 4px 18px rgba(31,31,31,0.07), 0 1px 4px rgba(31,31,31,0.04);
  --shadow-hover: 0 8px 32px rgba(31,31,31,0.13), 0 2px 8px rgba(31,31,31,0.07);
  --header-h: 64px;
  --sticky-h: 44px;
  --transition: 0.28s cubic-bezier(0.4,0,0.2,1);
  --font-display: 'Cormorant Garamond', 'Cinzel', Georgia, serif;
  --font-body: 'Crimson Pro', 'Cormorant Garamond', Georgia, serif;
}

/* ===== 页头 ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--ink-12);
  height: var(--header-h);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo-anchor {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.site-logo-mark {
  height: 36px;
  width: auto;
}

.site-logo-text {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink);
}

/* 导航结构约束：header > nav > p > a */
.main-nav {
  display: flex;
  align-items: center;
}

.main-nav p {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.nav-pill {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 14px;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 400;
  color: var(--ink);
  background: transparent;
  border: 1px solid transparent;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
  white-space: nowrap;
  min-height: 40px;
}

.nav-pill:hover,
.nav-pill:focus-visible {
  background: var(--ink);
  color: var(--white);
  border-color: var(--ink);
  outline: none;
}

/* ===== 粘性锚点条 ===== */
.sticky-nav {
  position: sticky;
  top: var(--header-h);
  z-index: 90;
  background: rgba(245,245,245,0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--ink-12);
  height: var(--sticky-h);
  overflow-x: auto;
  scrollbar-width: none;
}

.sticky-nav::-webkit-scrollbar {
  display: none;
}

.sticky-nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 4px;
}

.sticky-link {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 12px;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: var(--ink-60);
  white-space: nowrap;
  transition: background var(--transition), color var(--transition);
  min-height: 40px;
}

.sticky-link:hover,
.sticky-link:focus-visible {
  background: var(--ink-06);
  color: var(--ink);
  outline: none;
}

/* ===== 主体布局 ===== */
.site-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px 60px;
}

/* main > div > section 三层直接嵌套 */
.home-article {
  display: grid;
  grid-template-columns: 220px 1fr;
  grid-template-rows: auto auto 1fr;
  gap: 24px;
  align-items: start;
}

/* ===== Hero ===== */
.hero-section {
  grid-column: 1 / -1;
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 60px 32px;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
  max-width: 640px;
}

.hero-icon {
  opacity: 0.85;
  flex-shrink: 0;
}

.hero-h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: var(--ink);
}

.hero-desc {
  font-family: var(--font-body);
  font-size: 1.15rem;
  color: var(--ink-60);
  line-height: 1.7;
  max-width: 480px;
}

/* ===== 侧边栏 aside（左侧） ===== */
.page-aside {
  grid-column: 1 / 2;
  grid-row: 2 / 4;
  position: sticky;
  top: calc(var(--header-h) + var(--sticky-h) + 16px);
  align-self: start;
}

.aside-inner {
  background: var(--white);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 20px;
}

.aside-title {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-60);
  margin-bottom: 10px;
}

.aside-inner hr {
  border: none;
  border-top: 1px solid var(--ink-12);
  margin-bottom: 14px;
}

.aside-nav-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.aside-nav-list li {
  display: block;
}

.aside-link {
  display: block;
  padding: 7px 10px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: var(--ink);
  transition: background var(--transition), color var(--transition);
  line-height: 1.4;
}

.aside-link:hover,
.aside-link:focus-visible {
  background: var(--ink-06);
  outline: none;
}

/* ===== 内容区 bento ===== */
.content-section {
  grid-column: 2 / 3;
  grid-row: 2 / 4;
}

/* ===== Bento Grid 内容样式 ===== */
.bento-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* 正文 section 的通用卡片化 */
.bento-wrapper > section,
.content-section > section {
  background: var(--white);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 36px 40px;
  margin-bottom: 20px;
  transition: box-shadow var(--transition), transform var(--transition);
}

.bento-wrapper > section:hover,
.content-section > section:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px) scale(1.002);
}

/* section 内的网格 bento */
.bento-wrapper > section:nth-child(odd) {
  background: var(--white);
}

.bento-wrapper > section:nth-child(even) {
  background: var(--surface);
}

/* h2 装饰 */
.bento-wrapper h2,
.content-section h2 {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ink);
  margin-bottom: 10px;
  line-height: 1.25;
}

/* h2 后紧跟 hr（结构约束）*/
.bento-wrapper h2 + hr,
.content-section h2 + hr {
  border: none;
  border-top: 2px solid var(--ink-12);
  margin-bottom: 20px;
}

.bento-wrapper h3,
.content-section h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  margin-top: 24px;
  margin-bottom: 8px;
  color: var(--ink);
}

.bento-wrapper h3 + hr,
.content-section h3 + hr {
  border: none;
  border-top: 1px solid var(--ink-12);
  margin-bottom: 16px;
}

.bento-wrapper p,
.content-section p {
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--ink);
  margin-bottom: 14px;
}

.bento-wrapper ul,
.content-section ul,
.bento-wrapper ol,
.content-section ol {
  padding-left: 1.4em;
  margin-bottom: 14px;
}

.bento-wrapper li,
.content-section li {
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.75;
  margin-bottom: 6px;
  list-style: disc;
}

.bento-wrapper ol li {
  list-style: decimal;
}

.bento-wrapper a,
.content-section a {
  color: var(--ink);
  border-bottom: 1px solid var(--ink-12);
  transition: border-color var(--transition), opacity var(--transition);
}

.bento-wrapper a:hover,
.content-section a:hover {
  border-color: var(--ink);
  opacity: 0.75;
}

.bento-wrapper strong,
.content-section strong {
  font-weight: 600;
}

.bento-wrapper blockquote,
.content-section blockquote {
  border-left: 3px solid var(--ink-12);
  padding-left: 18px;
  margin: 18px 0;
  color: var(--ink-60);
  font-style: italic;
  font-family: var(--font-display);
  font-size: 1.1rem;
}

/* ===== 页脚结构 ===== */
.site-footer {
  background: var(--ink);
  color: var(--white);
  padding: 0 24px;
}

.footer-top {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding: 64px 0 48px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}

.footer-brand-word {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--white);
  line-height: 1.1;
  margin-bottom: 16px;
}

.footer-brand-desc {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: rgba(255,255,255,0.55);
  line-height: 1.7;
}

.footer-col-label {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  margin-bottom: 16px;
}

.footer-nav-col ul,
.footer-info-col ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-nav-col li a,
.footer-info-col li a {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: rgba(255,255,255,0.7);
  transition: color var(--transition);
  display: inline-block;
  min-height: 40px;
  line-height: 40px;
}

.footer-nav-col li a:hover,
.footer-info-col li a:hover {
  color: var(--white);
}

.footer-info-col p {
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: rgba(255,255,255,0.55);
  line-height: 1.7;
}

.footer-contact-col address {
  font-style: normal;
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: rgba(255,255,255,0.65);
  line-height: 1.9;
}

/* footer address + ul 约束 */
.footer-contact-col ul {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-contact-col ul li a {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: rgba(255,255,255,0.6);
  display: inline-block;
  min-height: 40px;
  line-height: 40px;
  transition: color var(--transition);
}

.footer-contact-col ul li a:hover {
  color: var(--white);
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-copyright ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.footer-copyright ul li a {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: rgba(255,255,255,0.45);
  padding: 6px 10px;
  border-radius: var(--radius-pill);
  transition: background var(--transition), color var(--transition);
  min-height: 40px;
  display: inline-flex;
  align-items: center;
}

.footer-copyright ul li a:hover {
  background: rgba(255,255,255,0.1);
  color: var(--white);
}

.footer-copy-text {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: rgba(255,255,255,0.35);
}

/* ===== Scroll Reveal 动效 ===== */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.55s cubic-bezier(0.4,0,0.2,1), transform 0.55s cubic-bezier(0.4,0,0.2,1);
  }

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

  .reveal-stagger > * {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.45s cubic-bezier(0.4,0,0.2,1), transform 0.45s cubic-bezier(0.4,0,0.2,1);
  }

  .reveal-stagger.is-visible > *:nth-child(1) { transition-delay: 0.05s; opacity:1; transform:none; }
  .reveal-stagger.is-visible > *:nth-child(2) { transition-delay: 0.12s; opacity:1; transform:none; }
  .reveal-stagger.is-visible > *:nth-child(3) { transition-delay: 0.19s; opacity:1; transform:none; }
  .reveal-stagger.is-visible > *:nth-child(4) { transition-delay: 0.26s; opacity:1; transform:none; }
  .reveal-stagger.is-visible > *:nth-child(5) { transition-delay: 0.33s; opacity:1; transform:none; }
  .reveal-stagger.is-visible > *:nth-child(6) { transition-delay: 0.40s; opacity:1; transform:none; }
  .reveal-stagger.is-visible > *:nth-child(7) { transition-delay: 0.47s; opacity:1; transform:none; }
}

/* ===== 响应式 ===== */
@media (max-width: 900px) {
  .home-article {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .hero-section {
    grid-column: 1;
    min-height: 55vh;
  }

  .page-aside {
    grid-column: 1;
    grid-row: auto;
    position: static;
  }

  .aside-inner {
    padding: 16px;
  }

  .aside-nav-list {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
  }

  .aside-link {
    padding: 6px 12px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--ink-12);
    font-size: 0.85rem;
  }

  .content-section {
    grid-column: 1;
    grid-row: auto;
  }

  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

  .footer-brand-col {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  :root {
    --header-h: 56px;
    --sticky-h: 40px;
  }

  html {
    scroll-padding-top: 96px;
  }

  .header-inner {
    padding: 0 16px;
  }

  .main-nav p {
    gap: 4px;
  }

  .nav-pill {
    font-size: 0.8rem;
    padding: 0 10px;
    height: 32px;
    min-height: 40px;
  }

  .sticky-nav-inner {
    padding: 0 16px;
  }

  .site-main {
    padding: 20px 16px 40px;
  }

  .hero-section {
    min-height: 80vw;
    padding: 40px 20px;
  }

  .hero-h1 {
    font-size: 1.7rem;
  }

  .bento-wrapper > section,
  .content-section > section {
    padding: 24px 20px;
    border-radius: 12px;
  }

  .footer-top {
    grid-template-columns: 1fr;
    padding: 40px 0 32px;
    gap: 28px;
  }

  .footer-brand-col {
    grid-column: 1;
  }

  .footer-brand-word {
    font-size: 2.2rem;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .site-footer {
    padding: 0 16px;
  }
}

@media (max-width: 375px) {
  .nav-pill {
    font-size: 0.75rem;
    padding: 0 8px;
  }

  .hero-h1 {
    font-size: 1.45rem;
  }
}

/* ===== 辅助样式 ===== */
:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection {
  background: var(--ink);
  color: var(--white);
}

hr {
  border: none;
  border-top: 1px solid var(--ink-12);
}

time {
  font-size: 0.88rem;
  color: var(--ink-60);
  font-family: var(--font-body);
}

/* ===== 图片容忍空串 ===== */
img[src=""] {
  display: none;
}
