@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,300;0,400;0,500;0,700;1,400&display=swap');

/* ==============================
   CSS 变量 & 重置
   ============================== */
:root {
  --c-white: #ffffff;
  --c-surface: #f5f5f5;
  --c-ink: #1f1f1f;
  --c-ink-60: rgba(31,31,31,0.6);
  --c-ink-15: rgba(31,31,31,0.15);
  --c-ink-08: rgba(31,31,31,0.08);
  --c-accent: #1f1f1f;
  --c-accent-lite: #444;

  --elev-1: 0 1px 3px rgba(0,0,0,0.10), 0 1px 2px rgba(0,0,0,0.06);
  --elev-2: 0 4px 12px rgba(0,0,0,0.10), 0 2px 6px rgba(0,0,0,0.06);
  --elev-3: 0 8px 24px rgba(0,0,0,0.12), 0 4px 8px rgba(0,0,0,0.08);
  --elev-4: 0 16px 48px rgba(0,0,0,0.16), 0 8px 16px rgba(0,0,0,0.10);

  --radius: 10px;
  --radius-sm: 6px;
  --header-h: 64px;
  --sticky-h: 44px;
  --font: 'Roboto', system-ui, -apple-system, sans-serif;
  --max-w: 1100px;
  --trans: 0.28s cubic-bezier(0.4,0,0.2,1);
}

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

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

body {
  font-family: var(--font);
  background: var(--c-surface);
  color: var(--c-ink);
  line-height: 1.65;
  overflow-x: hidden;
}

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

/* ==============================
   Elevation helpers
   ============================== */
.elev-1 { box-shadow: var(--elev-1); }
.elev-2 { box-shadow: var(--elev-2); }
.elev-3 { box-shadow: var(--elev-3); }
.elev-4 { box-shadow: var(--elev-4); }

/* ==============================
   Site wrapper
   ============================== */
.site-wrapper {
  display: grid;
  min-height: 100vh;
  position: relative;
}

/* ==============================
   Header
   ============================== */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: var(--c-white);
  border-bottom: 1px solid var(--c-ink-15);
  height: var(--header-h);
}

.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.01em;
}

.logo-img { width: 32px; height: 32px; border-radius: 50%; }

.brand-name {
  white-space: nowrap;
  font-size: 0.95rem;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  overflow: hidden;
}

.nav-link {
  padding: 8px 12px;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  transition: background var(--trans), color var(--trans);
  min-height: 40px;
  display: flex;
  align-items: center;
}
.nav-link:hover,
.nav-link.active {
  background: var(--c-ink-08);
}

.header-cta {
  flex-shrink: 0;
  font-size: 0.85rem;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--c-ink);
  transition: var(--trans);
}

.mobile-nav {
  display: none;
  flex-direction: column;
  background: var(--c-white);
  border-top: 1px solid var(--c-ink-15);
  padding: 12px 20px 16px;
  position: fixed;
  top: var(--header-h);
  left: 0; right: 0;
  z-index: 99;
  box-shadow: var(--elev-3);
}
.mobile-nav.open { display: flex; }

.mobile-nav-link {
  padding: 12px 0;
  font-size: 1rem;
  font-weight: 500;
  border-bottom: 1px solid var(--c-ink-08);
  min-height: 48px;
  display: flex;
  align-items: center;
}
.mobile-nav-link:last-child { border-bottom: none; }

/* ==============================
   Sticky bar
   ============================== */
.sticky-bar {
  position: sticky;
  top: var(--header-h);
  z-index: 90;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--c-ink-08);
  height: var(--sticky-h);
}

.sticky-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.sticky-inner::-webkit-scrollbar { display: none; }

.sticky-link {
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 500;
  white-space: nowrap;
  border-radius: 20px;
  border: 1px solid var(--c-ink-15);
  transition: background var(--trans), color var(--trans), border-color var(--trans);
  min-height: 32px;
  display: flex;
  align-items: center;
}
.sticky-link:hover,
.sticky-link.active {
  background: var(--c-ink);
  color: var(--c-white);
  border-color: var(--c-ink);
}

/* ==============================
   CTA Button
   ============================== */
.cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  transition: box-shadow var(--trans), transform var(--trans), background var(--trans);
  min-height: 44px;
  cursor: pointer;
  white-space: nowrap;
}

.cta-primary {
  background: var(--c-ink);
  color: var(--c-white);
}
.cta-primary:hover {
  box-shadow: var(--elev-3);
  transform: translateY(-1px);
}

.cta-secondary {
  background: var(--c-white);
  color: var(--c-ink);
  border: 2px solid var(--c-ink);
}
.cta-secondary:hover {
  background: var(--c-ink);
  color: var(--c-white);
  box-shadow: var(--elev-2);
}

/* ==============================
   Main layout offset
   ============================== */
main {
  padding-top: calc(var(--header-h) + var(--sticky-h));
  min-height: 60vh;
}

.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
}

/* ==============================
   Hero – Home
   ============================== */
.hero-section {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--c-white);
}

.hero-article {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 60px 0 80px;
  text-align: center;
}

.hero-bg-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) translateZ(-10px);
  font-size: clamp(120px, 25vw, 240px);
  font-weight: 700;
  color: var(--c-ink-08);
  letter-spacing: -0.05em;
  pointer-events: none;
  user-select: none;
  line-height: 1;
  z-index: 0;
}

.hero-icon-wrap {
  margin: 0 auto 24px;
  width: 56px;
}

.hero-h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}

.hero-lead {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--c-ink-60);
  max-width: 560px;
  margin: 0 auto 32px;
  line-height: 1.65;
  position: relative;
  z-index: 1;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

/* ==============================
   Page Hero (category/tag/etc.)
   ============================== */
.page-hero {
  position: relative;
  background: var(--c-white);
  overflow: hidden;
  padding: 48px 0 56px;
}

.page-hero-article {
  position: relative;
  z-index: 2;
}

.page-hero-bg-text {
  position: absolute;
  right: -20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: clamp(80px, 18vw, 180px);
  font-weight: 700;
  color: var(--c-ink-08);
  letter-spacing: -0.05em;
  pointer-events: none;
  user-select: none;
  line-height: 1;
  z-index: 0;
}

.page-hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 12px 0 10px;
  line-height: 1.2;
}

/* ==============================
   About / Privacy Hero
   ============================== */
.about-hero-section,
.privacy-hero-section {
  position: relative;
  background: var(--c-white);
  overflow: hidden;
  padding: 48px 0 56px;
}

.about-hero-article,
.privacy-hero-article {
  position: relative;
  z-index: 2;
}

.about-hero-bg-text {
  position: absolute;
  right: -10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: clamp(80px, 18vw, 180px);
  font-weight: 700;
  color: var(--c-ink-08);
  pointer-events: none;
  user-select: none;
  line-height: 1;
  z-index: 0;
}

.about-hero-section h1,
.privacy-hero-section h1 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  margin: 12px 0 10px;
  letter-spacing: -0.03em;
}

.about-date {
  margin-top: 12px;
  font-size: 0.85rem;
  color: var(--c-ink-60);
}

/* ==============================
   Entry hero
   ============================== */
.entry-hero-section {
  padding: 40px 0 48px;
  background: var(--c-white);
}

.entry-hero-article h1 {
  font-size: clamp(1.5rem, 3.5vw, 2.5rem);
  font-weight: 700;
  margin: 16px 0 12px;
  letter-spacing: -0.02em;
}

.entry-hero-img-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  max-height: 480px;
  margin-bottom: 24px;
  position: relative;
  z-index: 2;
  transition: box-shadow var(--trans), transform var(--trans);
}
.entry-hero-img-wrap:hover {
  transform: translateY(-2px);
  box-shadow: var(--elev-4);
}

.entry-hero-img {
  width: 100%;
  object-fit: cover;
  max-height: 480px;
}

.entry-meta {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--c-ink-60);
}

.entry-cat-link {
  padding: 4px 10px;
  background: var(--c-ink-08);
  border-radius: 20px;
  font-weight: 500;
  font-size: 0.8rem;
}

/* ==============================
   Breadcrumb
   ============================== */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--c-ink-60);
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.breadcrumb a:hover { color: var(--c-ink); }

/* ==============================
   Subtitle (h2 + p.subtitle contract)
   ============================== */
.subtitle {
  font-size: 1rem;
  color: var(--c-ink-60);
  line-height: 1.6;
  margin-top: 6px;
  margin-bottom: 28px;
}

/* ==============================
   Sections spacing
   ============================== */
.feat-section,
.content-section,
.recent-section,
.child-section,
.tag-section,
.about-cta-section,
.related-section {
  padding: 48px 0;
}

.feat-section h2,
.recent-section h2,
.child-section h2,
.tag-section h2,
.about-cta-section h2,
.related-section h2 {
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* ==============================
   Featured grid (home)
   ============================== */
.feat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

.feat-card {
  background: var(--c-white);
  border-radius: var(--radius);
  padding: 28px 22px 22px;
  position: relative;
  transition: box-shadow var(--trans), transform var(--trans);
  cursor: default;
}
.feat-card:hover {
  box-shadow: var(--elev-4);
  transform: translateY(-3px) translateZ(4px);
}

.card-num {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: var(--c-ink-15);
  line-height: 1;
  margin-bottom: 12px;
  letter-spacing: -0.04em;
}

.feat-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.feat-card h3 a { transition: color var(--trans); }
.feat-card h3 a:hover { color: var(--c-accent-lite); }

.feat-card p {
  font-size: 0.875rem;
  color: var(--c-ink-60);
  line-height: 1.55;
}

/* ==============================
   Entry grid
   ============================== */
.entry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}

.entry-card {
  background: var(--c-white);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  transition: box-shadow var(--trans), transform var(--trans);
  display: flex;
  flex-direction: column;
}
.entry-card:hover {
  box-shadow: var(--elev-4);
  transform: translateY(-4px);
}

.entry-thumb-wrap {
  overflow: hidden;
  aspect-ratio: 16/10;
  background: var(--c-surface);
}
.entry-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--trans);
}
.entry-card:hover .entry-thumb-wrap img {
  transform: scale(1.04);
}

.entry-thumb-placeholder {
  aspect-ratio: 16/10;
  background: linear-gradient(135deg, var(--c-surface) 60%, var(--c-ink-08));
}

.entry-card-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.entry-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--c-ink-60);
  text-transform: uppercase;
}

.entry-card-body time {
  font-size: 0.78rem;
  color: var(--c-ink-60);
}

.entry-card-body h3 {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.4;
}
.entry-card-body h3 a:hover { color: var(--c-accent-lite); }

.entry-card-body p {
  font-size: 0.85rem;
  color: var(--c-ink-60);
  line-height: 1.55;
}

/* ==============================
   Related grid (entry page)
   ============================== */
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

.related-card {
  background: var(--c-white);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow var(--trans), transform var(--trans);
}
.related-card:hover {
  box-shadow: var(--elev-3);
  transform: translateY(-2px);
}

.related-card h3 {
  font-size: 0.9rem;
  font-weight: 700;
  padding: 14px 14px 6px;
  line-height: 1.4;
}
.related-card h3 a:hover { color: var(--c-accent-lite); }

.related-card p {
  font-size: 0.82rem;
  color: var(--c-ink-60);
  padding: 0 14px 14px;
  line-height: 1.5;
}

/* ==============================
   Tag cloud
   ============================== */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-chip {
  padding: 8px 16px;
  background: var(--c-white);
  border: 1px solid var(--c-ink-15);
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  transition: background var(--trans), color var(--trans), border-color var(--trans), box-shadow var(--trans);
  min-height: 40px;
  display: inline-flex;
  align-items: center;
}
.tag-chip:hover {
  background: var(--c-ink);
  color: var(--c-white);
  border-color: var(--c-ink);
  box-shadow: var(--elev-2);
}

.tag-cloud--sm .tag-chip {
  padding: 5px 12px;
  font-size: 0.78rem;
  min-height: 32px;
}

/* ==============================
   Content body (section prose)
   ============================== */
.content-body {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--c-ink);
}

.content-body h2 { font-size: 1.4rem; font-weight: 700; margin: 2em 0 0.6em; letter-spacing: -0.02em; }
.content-body h3 { font-size: 1.15rem; font-weight: 600; margin: 1.6em 0 0.5em; }
.content-body p  { margin-bottom: 1em; }
.content-body a  { color: var(--c-ink); text-decoration: underline; text-underline-offset: 3px; }
.content-body a:hover { color: var(--c-accent-lite); }
.content-body ul, .content-body ol { padding-left: 1.4em; margin-bottom: 1em; }
.content-body li { margin-bottom: 0.4em; line-height: 1.65; }
.content-body strong { font-weight: 600; }
.content-body blockquote {
  border-left: 3px solid var(--c-ink);
  padding: 8px 20px;
  margin: 1.5em 0;
  color: var(--c-ink-60);
  font-style: italic;
}
.content-body table { border-collapse: collapse; width: 100%; margin-bottom: 1em; }
.content-body th, .content-body td { border: 1px solid var(--c-ink-15); padding: 8px 12px; text-align: left; }
.content-body th { background: var(--c-surface); font-weight: 600; }

/* ==============================
   Content with aside layout
   ============================== */
.content-with-aside {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 40px;
  align-items: start;
}

/* ==============================
   Global Aside
   ============================== */
.global-aside {
  background: var(--c-white);
  border-radius: var(--radius);
  position: sticky;
  top: calc(var(--header-h) + var(--sticky-h) + 20px);
  max-height: calc(100vh - var(--header-h) - var(--sticky-h) - 40px);
  overflow-y: auto;
}

/* On home/category pages the aside is outside content-with-aside */
.page-home .global-aside,
.page-category .global-aside,
.page-tag .global-aside {
  display: none;
}

.aside-inner {
  padding: 20px;
}

.aside-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--c-ink-60);
  text-transform: uppercase;
  margin-bottom: 10px;
}

.aside-links {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.aside-links li a {
  display: block;
  padding: 8px 10px;
  font-size: 0.875rem;
  border-radius: var(--radius-sm);
  transition: background var(--trans);
  min-height: 36px;
  display: flex;
  align-items: center;
}
.aside-links li a:hover { background: var(--c-surface); }

/* ==============================
   About CTA grid
   ============================== */
.about-cta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 8px;
}

.about-cta-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px;
  background: var(--c-white);
  border-radius: var(--radius);
  transition: box-shadow var(--trans), transform var(--trans);
  min-height: 80px;
}
.about-cta-card:hover {
  box-shadow: var(--elev-3);
  transform: translateY(-2px);
}
.about-cta-card strong {
  font-size: 0.95rem;
  font-weight: 700;
}
.about-cta-card span {
  font-size: 0.82rem;
  color: var(--c-ink-60);
  line-height: 1.5;
}

/* ==============================
   Footer
   ============================== */
.site-footer {
  margin-top: 80px;
  background: var(--c-ink);
  color: var(--c-white);
}

/* footer > div×n contract */
.footer-cta-section {
  padding: 56px 20px;
  text-align: center;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-cta-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-cta-text {
  font-size: 1.1rem;
  font-weight: 500;
  opacity: 0.9;
}

.footer-cta-section .cta-primary {
  background: var(--c-white);
  color: var(--c-ink);
  font-size: 1rem;
  padding: 12px 32px;
}
.footer-cta-section .cta-primary:hover {
  background: var(--c-surface);
  box-shadow: var(--elev-3);
  transform: translateY(-1px);
}

.footer-bottom-section {
  padding: 24px 20px;
}

.footer-bottom-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-copy {
  font-size: 0.82rem;
  opacity: 0.6;
}

/* footer > nav > dl > dt/dd > a contract */
.footer-dl {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.footer-dl-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  opacity: 0.5;
  text-transform: uppercase;
  margin-right: 4px;
}

.footer-dl dd a {
  font-size: 0.82rem;
  opacity: 0.7;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: opacity var(--trans), background var(--trans);
  min-height: 32px;
  display: inline-flex;
  align-items: center;
}
.footer-dl dd a:hover {
  opacity: 1;
  background: rgba(255,255,255,0.1);
}

/* ==============================
   Scroll reveal animation
   ============================== */
.reveal-block,
.reveal-card {
  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-block.visible,
.reveal-card.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal-block,
  .reveal-card {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ==============================
   Responsive
   ============================== */
@media (max-width: 900px) {
  .content-with-aside {
    grid-template-columns: 1fr;
  }
  .global-aside {
    position: static;
    max-height: none;
    order: -1;
  }
  .top-nav { display: none; }
  .header-cta { display: none; }
  .nav-toggle { display: flex; }
}

@media (max-width: 640px) {
  .feat-grid {
    grid-template-columns: 1fr 1fr;
  }
  .entry-grid {
    grid-template-columns: 1fr;
  }
  .related-grid {
    grid-template-columns: 1fr 1fr;
  }
  .hero-h1 { font-size: 1.75rem; }
  .hero-actions { flex-direction: column; align-items: center; }
  .footer-cta-inner { flex-direction: column; text-align: center; }
  .footer-bottom-inner { flex-direction: column; gap: 12px; }
  .footer-dl { justify-content: center; }
}

@media (max-width: 375px) {
  .wrap { padding: 0 14px; }
  .feat-grid { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }
  .brand-name { font-size: 0.85rem; }
  .header-inner { padding: 0 14px; }
}
