/* ============================================================
   乐多的小站 —— 样式
   设计约束：
   1. 不加载任何 Web 字体（中文字体动辄数 MB，3Mbps 带宽下不可接受），
      全部走系统字体栈，中文优先苹方/思源黑、宋体做标题。
   2. 资源路径全部相对，便于在子路径下预览、换到根路径也不改代码。
   ============================================================ */

:root {
  --bg: #faf9f6;
  --elev: #ffffff;
  --ink: #1c1c19;
  --ink-2: #5b5b54;
  --ink-3: #93938a;
  --line: #e7e4dd;
  --line-2: #f0eee8;
  --accent: #3d6b5f;
  --accent-2: #c96f4a;
  --accent-soft: #edf2f0;

  /* 装饰图形的底纸色：SVG 本身透明，由容器决定底色，
     这样明暗两种模式下都不会出现突兀的亮块 */
  --art-bg: #efece4;
  --art-filter: none;

  --maxw: 1060px;
  --radius: 16px;

  --font-sans: -apple-system, BlinkMacSystemFont, "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  --font-serif: "Songti SC", "Source Han Serif SC", "Noto Serif SC", Georgia,
    "Times New Roman", "SimSun", serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131412;
    --elev: #1a1b18;
    --ink: #eceae4;
    --ink-2: #a5a49b;
    --ink-3: #74746c;
    --line: #2b2c28;
    --line-2: #22231f;
    --accent: #7fb3a4;
    --accent-2: #e0916c;
    --accent-soft: #1e2523;

    /* 暗色下换深色底纸，并把图形整体提亮，否则青绿/陶土色会糊在背景里 */
    --art-bg: #262521;
    --art-filter: brightness(1.42) saturate(1.06);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

img,
svg {
  display: block;
  max-width: 100%;
}

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

/* ---------- 顶部 ---------- */

header.site {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: saturate(150%) blur(12px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--line-2);
}

header.site .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.brand .mark {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: linear-gradient(140deg, var(--accent), var(--accent-2));
}

nav.top {
  display: flex;
  gap: 26px;
  font-size: 14.5px;
  color: var(--ink-2);
}

nav.top a {
  padding: 4px 0;
  border-bottom: 1.5px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease;
}

nav.top a:hover {
  color: var(--ink);
}

nav.top a.active {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

/* ---------- 主体 ---------- */

main {
  padding: 0 0 96px;
}

.hero {
  padding: 88px 0 72px;
}

.hero .eyebrow {
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 22px;
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(34px, 6vw, 58px);
  line-height: 1.22;
  letter-spacing: -0.01em;
  font-weight: 600;
  margin: 0 0 22px;
  max-width: 19em;
  text-wrap: balance;
}

.hero h1 em {
  font-style: normal;
  color: var(--accent);
}

.hero p.lede {
  font-size: 17px;
  color: var(--ink-2);
  max-width: 34em;
  margin: 0;
}

.hero .scroll-hint {
  margin-top: 44px;
  font-size: 13.5px;
  color: var(--ink-3);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* 首页装饰带 */
.band {
  height: 118px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  margin-bottom: 76px;
  background: var(--art-bg);
}

.band img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: var(--art-filter);
}

section {
  margin-bottom: 86px;
}

.sec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 30px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.sec-head h2 {
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 600;
  margin: 0;
  letter-spacing: 0.01em;
}

.sec-head a {
  font-size: 14px;
  color: var(--ink-3);
  transition: color 0.18s ease;
}

.sec-head a:hover {
  color: var(--accent);
}

/* ---------- 作品卡 ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

.card {
  background: var(--elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.22s ease, box-shadow 0.22s ease,
    border-color 0.22s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 34px -18px rgba(0, 0, 0, 0.28);
  border-color: var(--line);
}

.card .thumb {
  aspect-ratio: 4 / 3;
  background: var(--art-bg);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: var(--art-filter);
}

.card .body {
  padding: 18px 20px 20px;
}

.card h3 {
  font-size: 16.5px;
  font-weight: 600;
  margin: 0 0 6px;
  letter-spacing: 0.005em;
}

.card .meta {
  font-size: 12.5px;
  color: var(--ink-3);
  margin: 0 0 10px;
  letter-spacing: 0.02em;
}

.card p {
  font-size: 14px;
  color: var(--ink-2);
  margin: 0;
  line-height: 1.7;
}

/* ---------- 笔记列表 ---------- */

.notes {
  list-style: none;
  margin: 0;
  padding: 0;
}

.notes li {
  border-bottom: 1px solid var(--line-2);
}

.notes li:first-child {
  border-top: 1px solid var(--line-2);
}

.notes a {
  display: flex;
  align-items: baseline;
  gap: 22px;
  padding: 18px 4px;
  transition: background 0.16s ease, padding-left 0.16s ease;
}

.notes a:hover {
  background: var(--accent-soft);
  padding-left: 12px;
}

.notes .date {
  font-size: 13px;
  color: var(--ink-3);
  flex: 0 0 92px;
  font-variant-numeric: tabular-nums;
}

.notes .t {
  font-size: 15.5px;
}

.notes .kind {
  margin-left: auto;
  font-size: 12.5px;
  color: var(--ink-3);
}

/* ---------- 关于 ---------- */

.about {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 54px;
  align-items: start;
}

.about p {
  color: var(--ink-2);
  margin: 0 0 16px;
}

.facts {
  border-left: 2px solid var(--line);
  padding-left: 20px;
}

.facts dl {
  margin: 0;
}

.facts dt {
  font-size: 12.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-top: 18px;
}

.facts dt:first-child {
  margin-top: 0;
}

.facts dd {
  margin: 5px 0 0;
  font-size: 14.5px;
}

/* ---------- 页脚 ---------- */

footer.site {
  border-top: 1px solid var(--line);
  padding: 34px 0 46px;
  font-size: 13px;
  color: var(--ink-3);
}

footer.site .wrap {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

/* ---------- 子页标题 ---------- */

.page-head {
  padding: 76px 0 44px;
}

.page-head h1 {
  font-family: var(--font-serif);
  font-size: clamp(28px, 4.4vw, 40px);
  font-weight: 600;
  margin: 0 0 12px;
  letter-spacing: -0.005em;
}

.page-head p {
  color: var(--ink-2);
  margin: 0;
  max-width: 36em;
}

/* ---------- 笔记条目 ---------- */

.post {
  padding: 30px 0 34px;
  border-bottom: 1px solid var(--line-2);
  max-width: 42em;
}

.post:first-child {
  padding-top: 4px;
}

.post-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
}

.post-head .date {
  font-size: 13px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

.post-head .kind {
  font-size: 12px;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 2px 10px;
  border-radius: 999px;
  letter-spacing: 0.02em;
}

.post h2 {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 12px;
  letter-spacing: 0.005em;
}

.post p {
  margin: 0;
  color: var(--ink-2);
  font-size: 15.5px;
  line-height: 1.85;
}

/* ---------- 入场动效 ---------- */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  html {
    scroll-behavior: auto;
  }
}

/* ---------- 响应式 ---------- */

@media (max-width: 900px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .about {
    grid-template-columns: 1fr;
    gap: 34px;
  }
}

@media (max-width: 620px) {
  .wrap {
    padding: 0 20px;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .hero {
    padding: 56px 0 48px;
  }
  nav.top {
    gap: 18px;
    font-size: 14px;
  }
  .notes a {
    gap: 14px;
    flex-wrap: wrap;
  }
  .notes .kind {
    display: none;
  }
  .band {
    height: 84px;
  }
}
