@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 {
  --mint: #b4fde1;
  --sky: #add8e6;
  --ink: #172620;
  --ink-90: rgba(23,38,32,0.9);
  --ink-60: rgba(23,38,32,0.6);
  --ink-20: rgba(23,38,32,0.2);
  --mint-deep: #7ef5c2;
  --sky-deep: #7bbfd8;
  --white: #ffffff;
  --surface: #1e3028;
  --surface-2: #243b2e;
  --card-bg: #1a2d24;
  --radius-sm: 12px;
  --radius: 18px;
  --radius-lg: 24px;
  --border: 3px solid rgba(180,253,225,0.3);
  --shadow-out: 4px 4px 12px rgba(0,0,0,0.45), 1px 1px 3px rgba(0,0,0,0.3);
  --shadow-in: inset -2px -2px 8px rgba(180,253,225,0.08), inset 2px 2px 6px rgba(0,0,0,0.3);
  --shadow-card: 5px 5px 16px rgba(0,0,0,0.5), inset -1px -1px 6px rgba(180,253,225,0.06);
  --transition: 200ms cubic-bezier(0.34,1.56,0.64,1);
  --font: 'Roboto', system-ui, -apple-system, sans-serif;
}

/* ===== 重置 ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  background: var(--ink);
  color: var(--white);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--mint); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--sky); }
ul { list-style: none; }

/* ===== 通用 Clay 卡片 ===== */
.clay-card {
  background: var(--card-bg);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  transition: transform var(--transition), box-shadow var(--transition);
}
.clay-card:hover {
  transform: translateY(-3px) scale(1.01);
  box-shadow: 7px 7px 20px rgba(0,0,0,0.6), inset -1px -1px 8px rgba(180,253,225,0.1);
}

/* ===== 按钮 ===== */
.btn-clay {
  display: inline-block;
  padding: 10px 22px;
  background: linear-gradient(135deg, var(--mint) 0%, var(--sky) 100%);
  color: var(--ink);
  font-weight: 700;
  font-size: 15px;
  border-radius: var(--radius-sm);
  border: 3px solid rgba(255,255,255,0.4);
  box-shadow: var(--shadow-out), var(--shadow-in);
  transition: transform var(--transition), box-shadow var(--transition);
  cursor: pointer;
  min-height: 44px;
  line-height: 1.3;
}
.btn-clay:hover {
  transform: translateY(-2px) scale(1.03);
  color: var(--ink);
  box-shadow: 6px 6px 16px rgba(0,0,0,0.5), inset -2px -2px 8px rgba(255,255,255,0.2);
}
.btn-clay:active {
  transform: translateY(1px) scale(0.98);
  box-shadow: 2px 2px 6px rgba(0,0,0,0.4), inset 2px 2px 6px rgba(0,0,0,0.2);
}
.btn-sm {
  padding: 7px 16px;
  font-size: 13px;
  min-height: 36px;
}
.btn-hero {
  font-size: 17px;
  padding: 14px 32px;
  min-height: 50px;
}
.btn-nav-cta {
  padding: 8px 18px;
  font-size: 14px;
  min-height: 40px;
}

/* ===== 导航 ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(23,38,32,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 2px solid rgba(180,253,225,0.15);
  box-shadow: 0 2px 12px rgba(0,0,0,0.4);
}
.main-nav {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}
.main-nav > p.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  padding: 10px 0;
  min-height: 60px;
}
.main-nav > p.nav-links > a {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: rgba(255,255,255,0.85);
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  transition: background var(--transition), color var(--transition);
}
.main-nav > p.nav-links > a:hover,
.main-nav > p.nav-links > a[aria-current="page"] {
  background: rgba(180,253,225,0.12);
  color: var(--mint);
}
.nav-brand-icon {
  margin-right: 8px;
  padding: 6px !important;
  flex-shrink: 0;
}
.logo-text-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--mint), var(--sky));
  color: var(--ink);
  font-weight: 700;
  font-size: 16px;
  border-radius: var(--radius-sm);
  border: 3px solid rgba(255,255,255,0.3);
  box-shadow: var(--shadow-out);
}
.logo-mark { border-radius: var(--radius-sm); }
.main-nav > p.nav-links > .btn-clay {
  margin-left: auto;
}

/* ===== 锚点条 ===== */
.anchor-bar {
  position: sticky;
  top: 60px;
  z-index: 90;
  background: rgba(26,45,36,0.97);
  border-bottom: 2px solid rgba(173,216,230,0.2);
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.anchor-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.anchor-inner::-webkit-scrollbar { display: none; }
.anchor-link {
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,0.7);
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  transition: color var(--transition), border-color var(--transition);
}
.anchor-link:hover,
.anchor-link.active {
  color: var(--mint);
  border-bottom-color: var(--mint);
}

/* ===== main + aside 布局 ===== */
main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px 60px;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 32px;
  align-items: start;
}

/* ===== aside ===== */
.site-aside {
  position: sticky;
  top: 120px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.aside-block {
  padding: 20px;
}
.aside-block h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--mint);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid rgba(180,253,225,0.2);
}
.aside-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.aside-link {
  display: block;
  padding: 8px 12px;
  font-size: 14px;
  color: rgba(255,255,255,0.75);
  border-radius: var(--radius-sm);
  transition: background var(--transition), color var(--transition);
  min-height: 36px;
  line-height: 1.4;
}
.aside-link:hover,
.aside-link.active {
  background: rgba(180,253,225,0.1);
  color: var(--mint);
}
.tags-cloud-sm {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ===== Hero（首页） ===== */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  margin-bottom: 60px;
}
.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(180,253,225,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(180,253,225,0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  z-index: 0;
  pointer-events: none;
}
.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  width: 100%;
  padding: 80px 0;
}
.hero-text {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: flex-start;
  justify-content: center;
}
.hero-h1 {
  font-size: clamp(32px, 5vw, 58px);
  font-weight: 700;
  line-height: 1.2;
  background: linear-gradient(135deg, var(--mint) 0%, var(--sky) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-desc {
  font-size: 18px;
  color: rgba(255,255,255,0.75);
  max-width: 480px;
}
.hero-media {
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-img {
  border-radius: var(--radius-lg);
  border: var(--border);
  box-shadow: var(--shadow-card);
  width: 100%;
  max-height: 500px;
  object-fit: cover;
}
.hero-placeholder {
  width: 100%;
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface-2) 100%);
  border-radius: var(--radius-lg);
  border: var(--border);
  box-shadow: var(--shadow-card);
}

/* ===== 面包屑 ===== */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--sky); }
.breadcrumb a:hover { color: var(--mint); }
.breadcrumb span[aria-hidden] { color: rgba(255,255,255,0.3); }

/* ===== 标题区块 ===== */
h1, h2, h3, h4 {
  line-height: 1.3;
  color: var(--white);
}
h2 {
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 700;
  margin-bottom: 8px;
}
h2 + p.subtitle {
  color: rgba(255,255,255,0.6);
  font-size: 15px;
  margin-bottom: 28px;
}
p.subtitle {
  color: rgba(255,255,255,0.65);
  font-size: 15px;
  line-height: 1.6;
}

/* ===== section 间距 ===== */
article > section {
  margin-bottom: 56px;
}

/* ===== 分类卡片网格 ===== */
.cats-grid,
.entries-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}
.cat-entries-grid {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

/* ===== 内容卡片 ===== */
.cat-card,
.entry-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.cat-card-img,
.entry-card-img {
  aspect-ratio: 16/9;
  overflow: hidden;
  border-radius: var(--radius) var(--radius) 0 0;
}
.cat-card-img img,
.entry-card-img img,
.entry-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 300ms ease;
}
.cat-card:hover .cat-card-img img,
.entry-card:hover .entry-card-img img {
  transform: scale(1.05);
}
.cat-card-body,
.entry-card-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.cat-card-body h3,
.entry-card-body h3 {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
}
.cat-card-body h3 a,
.entry-card-body h3 a {
  color: var(--white);
  transition: color var(--transition);
}
.cat-card-body h3 a:hover,
.entry-card-body h3 a:hover {
  color: var(--mint);
}
.entry-date {
  font-size: 12px;
  color: rgba(180,253,225,0.6);
  font-weight: 500;
}
.entry-card-body .btn-clay {
  margin-top: auto;
  align-self: flex-start;
}

/* ===== 标签泡泡 ===== */
.tag-bubble {
  display: inline-block;
  padding: 7px 16px;
  background: rgba(173,216,230,0.12);
  border: 2px solid rgba(173,216,230,0.3);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  color: var(--sky);
  transition: transform var(--transition), background var(--transition), color var(--transition);
  min-height: 36px;
  line-height: 1.4;
}
.tag-bubble:hover,
.tag-bubble.active {
  background: rgba(180,253,225,0.15);
  border-color: var(--mint);
  color: var(--mint);
  transform: translateY(-2px);
}
.tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ===== 正文区 ===== */
.prose-wrap {
  background: var(--surface);
  border: var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-in);
  max-width: 780px;
}
.prose-wrap p { margin-bottom: 16px; color: rgba(255,255,255,0.85); }
.prose-wrap h2, .prose-wrap h3, .prose-wrap h4 { margin: 24px 0 12px; }
.prose-wrap ul, .prose-wrap ol { margin: 0 0 16px 20px; color: rgba(255,255,255,0.8); }
.prose-wrap li { margin-bottom: 6px; }
.prose-wrap a { color: var(--mint); text-decoration: underline; }
.prose-wrap a:hover { color: var(--sky); }
.prose-wrap img { border-radius: var(--radius-sm); margin: 16px 0; }
.prose-wrap blockquote {
  border-left: 4px solid var(--mint);
  padding: 12px 20px;
  margin: 20px 0;
  background: rgba(180,253,225,0.05);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  color: rgba(255,255,255,0.7);
}

/* ===== 首页各区 ===== */
.home-cats-section,
.home-recent-section,
.home-content-section,
.home-tags-section {
  padding-top: 20px;
}

/* ===== 栏目页 Hero ===== */
.cat-hero-section {
  padding: 48px 0 32px;
  border-bottom: 2px solid rgba(180,253,225,0.1);
  margin-bottom: 40px;
}
.cat-h1 {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  margin-bottom: 12px;
  background: linear-gradient(135deg, var(--mint) 0%, var(--sky) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.cat-desc { font-size: 16px; margin-top: 8px; }

/* ===== entry 页 ===== */
.entry-header-section {
  padding: 40px 0 24px;
  border-bottom: 2px solid rgba(180,253,225,0.1);
  margin-bottom: 40px;
}
.entry-hero-wrap {
  margin-bottom: 24px;
}
.entry-hero-img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: var(--radius);
  border: var(--border);
  box-shadow: var(--shadow-card);
}
.entry-h1 {
  font-size: clamp(24px, 3.5vw, 40px);
  font-weight: 700;
  margin-bottom: 12px;
}
.entry-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}
.entry-meta-time {
  font-size: 13px;
  color: rgba(180,253,225,0.6);
}
.entry-cat-link {
  font-size: 13px;
  font-weight: 600;
  padding: 4px 12px;
  background: rgba(180,253,225,0.1);
  border: 2px solid rgba(180,253,225,0.25);
  border-radius: 100px;
  color: var(--mint);
}
.entry-desc { margin-top: 8px; font-size: 16px; }

/* ===== 同类推荐网格 ===== */
.siblings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}
.sibling-card {
  padding: 16px 18px;
}
.sibling-card h4 { font-size: 15px; margin-bottom: 8px; }
.sibling-card h4 a { color: var(--white); }
.sibling-card h4 a:hover { color: var(--mint); }
.sibling-card p { font-size: 13px; color: rgba(255,255,255,0.6); }

/* ===== tag 页 ===== */
.tag-header-section {
  padding: 40px 0 24px;
  border-bottom: 2px solid rgba(173,216,230,0.12);
  margin-bottom: 40px;
}
.tag-badge {
  display: inline-block;
  padding: 6px 18px;
  background: linear-gradient(135deg, rgba(173,216,230,0.2), rgba(180,253,225,0.15));
  border: 2px solid rgba(173,216,230,0.4);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 700;
  color: var(--sky);
  margin-bottom: 16px;
  letter-spacing: 0.04em;
}
.tag-h1 {
  font-size: clamp(26px, 4vw, 42px);
  font-weight: 700;
  margin-bottom: 10px;
}
.tag-desc { font-size: 16px; }
.empty-tip {
  color: rgba(255,255,255,0.4);
  font-size: 15px;
  padding: 24px 0;
}

/* ===== about 页 ===== */
.about-header-section {
  padding: 48px 0 28px;
  border-bottom: 2px solid rgba(180,253,225,0.1);
  margin-bottom: 40px;
}
.about-h1 {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  margin-bottom: 12px;
}
.about-cat-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
}
.about-notice {
  padding: 24px;
  border-left: 4px solid var(--mint);
  border-radius: 0 var(--radius) var(--radius) 0;
  max-width: 680px;
}
.about-notice p {
  color: rgba(255,255,255,0.8);
  margin-bottom: 10px;
}
.about-notice p:last-child { margin-bottom: 0; }
.about-notice a { color: var(--mint); text-decoration: underline; }

/* ===== privacy 页 ===== */
.privacy-header-section {
  padding: 48px 0 28px;
  border-bottom: 2px solid rgba(180,253,225,0.1);
  margin-bottom: 40px;
}
.privacy-h1 {
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 700;
  margin-bottom: 12px;
}
.privacy-desc { font-size: 16px; }
.privacy-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 12px;
}

/* ===== 页脚 ===== */
.site-footer {
  background: var(--surface);
  border-top: 2px solid rgba(180,253,225,0.15);
  margin-top: 40px;
}
.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 20px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 20px;
  align-items: center;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.footer-brand-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--mint);
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
}
.footer-nav a {
  padding: 8px 12px;
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  border-radius: var(--radius-sm);
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  transition: color var(--transition), background var(--transition);
}
.footer-nav a:hover,
.footer-nav a[aria-current="page"] {
  color: var(--mint);
  background: rgba(180,253,225,0.08);
}
.footer-copy {
  font-size: 12px;
  color: rgba(255,255,255,0.35);
  white-space: nowrap;
}

/* ===== Reveal 动效 ===== */
.reveal-section,
.reveal-item {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 500ms ease, transform 500ms cubic-bezier(0.34,1.56,0.64,1);
}
.reveal-section.visible,
.reveal-item.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-item:nth-child(1) { transition-delay: 0ms; }
.reveal-item:nth-child(2) { transition-delay: 80ms; }
.reveal-item:nth-child(3) { transition-delay: 160ms; }
.reveal-item:nth-child(4) { transition-delay: 240ms; }
.reveal-item:nth-child(5) { transition-delay: 320ms; }
.reveal-item:nth-child(6) { transition-delay: 400ms; }

@media (prefers-reduced-motion: reduce) {
  .reveal-section,
  .reveal-item,
  .clay-card,
  .btn-clay,
  .tag-bubble,
  .aside-link,
  a {
    transition: none !important;
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
  main {
    grid-template-columns: 1fr 260px;
    gap: 24px;
  }
}

@media (max-width: 768px) {
  main {
    grid-template-columns: 1fr;
    padding: 0 16px 40px;
  }
  .site-aside {
    position: static;
  }
  .hero-inner {
    grid-template-columns: 1fr;
    padding: 48px 0 40px;
  }
  .hero-section {
    min-height: auto;
  }
  .hero-media {
    order: -1;
  }
  .hero-placeholder {
    aspect-ratio: 16/7;
  }
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 16px;
    text-align: center;
  }
  .footer-brand {
    justify-content: center;
  }
  .footer-copy {
    white-space: normal;
  }
  .main-nav > p.nav-links {
    gap: 2px;
  }
  .main-nav > p.nav-links > a {
    font-size: 13px;
    padding: 10px 10px;
  }
  .cats-grid,
  .entries-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
  }
  .prose-wrap {
    padding: 20px;
  }
  .hero-h1 {
    font-size: 28px;
  }
}

@media (max-width: 480px) {
  .main-nav > p.nav-links > a {
    font-size: 12px;
    padding: 10px 8px;
  }
  .cats-grid,
  .entries-grid {
    grid-template-columns: 1fr;
  }
  .siblings-grid {
    grid-template-columns: 1fr;
  }
  .anchor-inner {
    padding: 0 12px;
  }
  h2 { font-size: 20px; }
  .hero-h1 { font-size: 24px; }
  .cat-h1 { font-size: 24px; }
}
