/* redforest.org.cn — 极简画廊 */

:root {
  --paper: #faf9f6;
  --ink: #1a1a18;
  --muted: #8a877f;
  --faint: #efede4;
  --hairline: #e3e0d6;
  --red: #b3271e;
  --serif: Georgia, "Times New Roman", "Songti SC", "STSong", "SimSun", "Noto Serif SC", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

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

html { font-size: 16px; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* 宣纸纹理 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1000;
  pointer-events: none;
  opacity: 0.033;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='260' height='260'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

::selection { background: var(--red); color: var(--paper); }

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

a:focus-visible {
  outline: 1.5px solid var(--red);
  outline-offset: 4px;
}

/* ————— 顶栏 ————— */

.site-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 1.6rem clamp(1.25rem, 5vw, 4rem);
  border-bottom: 1px solid var(--hairline);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  color: var(--muted);
}

.site-head .wordmark { color: var(--ink); font-weight: 600; }

/* ————— 主体 ————— */

main {
  flex: 1;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 5vw, 4rem);
}

/* ————— 展厅入口 ————— */

.hero {
  position: relative;
  min-height: 64vh;
  display: flex;
  align-items: center;
  padding: clamp(3rem, 8vh, 5rem) 0;
}

#forest {
  position: absolute;
  right: 0;
  bottom: 0;
  width: min(44%, 540px);
  height: 100%;
  pointer-events: none;
  /* 边缘渐隐:枝条淡出而非被画布裁断 */
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 12%, #000 88%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, #000 12%, #000 88%, transparent 100%);
}

.hero__text {
  position: relative;
  z-index: 1;
}

/* 文字纸色光晕,避免枝干干扰阅读 */
.hero h1,
.hero .latin,
.hero .motto {
  text-shadow: 0 0 12px var(--paper), 0 0 4px var(--paper);
}

.hero h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(3.2rem, 10vw, 7rem);
  letter-spacing: 0.04em;
  line-height: 1.1;
}

/* 朱色下划线签名 */
.hero h1::first-letter {
  color: var(--red);
}

@media (max-width: 640px) {
  #forest { width: 88%; opacity: 0.55; }
}

.hero .latin {
  margin-top: 1.2rem;
  font-size: 0.78rem;
  letter-spacing: 0.55em;
  color: var(--muted);
}

.hero .motto {
  margin-top: 2.2rem;
  font-family: var(--serif);
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--ink);
}

.hero .motto::before {
  content: "";
  display: inline-block;
  width: 2.4rem;
  height: 1px;
  background: var(--red);
  vertical-align: middle;
  margin-right: 0.9rem;
}

/* ————— 展区目录 ————— */

.catalog { padding-bottom: clamp(4rem, 10vh, 7rem); }

.catalog > p {
  font-size: 0.72rem;
  letter-spacing: 0.3em;
  color: var(--muted);
  margin-bottom: 1.4rem;
}

.catalog > p::before {
  content: "";
  display: inline-block;
  width: 1.4rem;
  height: 1px;
  background: var(--red);
  vertical-align: middle;
  margin-right: 0.7rem;
  transform: translateY(-1px);
}

.exhibit { list-style: none; border-top: 1px solid var(--hairline); }

.exhibit li { border-bottom: 1px solid var(--hairline); }

.exhibit a {
  display: grid;
  grid-template-columns: 3.2rem 1fr auto 1.6rem;
  align-items: baseline;
  gap: 1rem;
  padding: 1.5rem 0.2rem;
  transition: padding 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.exhibit a:hover { padding-left: 1rem; }

.exhibit .no {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.85rem;
  color: var(--muted);
}

.exhibit .name {
  font-family: var(--serif);
  font-size: clamp(1.25rem, 3vw, 1.7rem);
  letter-spacing: 0.03em;
}

.exhibit .name small {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  color: var(--muted);
  margin-left: 0.9rem;
}

.exhibit .note {
  font-size: 0.82rem;
  color: var(--muted);
  text-align: right;
}

.exhibit .dot {
  justify-self: end;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 0;
  border: 1px solid var(--hairline);
  transition: background 0.3s, border-color 0.3s, transform 0.3s;
}

.exhibit a:hover .dot {
  background: var(--red);
  border-color: var(--red);
  transform: scale(1.15);
}

/* ————— 页脚 ————— */

.site-foot {
  border-top: 1px solid var(--hairline);
  padding: 1.6rem clamp(1.25rem, 5vw, 4rem);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--muted);
}

/* ————— 简历页 ————— */

.bio { padding: clamp(4rem, 12vh, 7rem) 0; max-width: 46rem; }

.bio h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.4rem, 7vw, 4.2rem);
  letter-spacing: 0.04em;
}

.bio .latin {
  margin-top: 1rem;
  font-size: 0.75rem;
  letter-spacing: 0.5em;
  color: var(--muted);
}

.bio section { margin-top: 3rem; }

.bio h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.05rem;
  letter-spacing: 0.2em;
  color: var(--muted);
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--hairline);
  margin-bottom: 1.2rem;
}

.bio p { font-size: 0.95rem; }

.bio .pending {
  font-family: var(--serif);
  font-size: 1.1rem;
  color: var(--ink);
}

.bio a.inline { border-bottom: 1px solid var(--red); transition: color 0.25s; }
.bio a.inline:hover { color: var(--red); }

.back {
  display: inline-block;
  margin-top: 4rem;
  font-size: 0.78rem;
  letter-spacing: 0.25em;
  color: var(--muted);
  transition: color 0.25s;
}

.back:hover { color: var(--red); }

/* ————— 动效 ————— */

.rise { opacity: 1; transform: none; }

html.js .rise { opacity: 0; transform: translateY(14px); }

html.js .rise.is-in {
  opacity: 1;
  transform: none;
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1), transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-reduced-motion: reduce) {
  html.js .rise { opacity: 1; transform: none; }
  .exhibit a, .exhibit .dot { transition: none; }
}

/* ————— 窄屏 ————— */

@media (max-width: 640px) {
  .exhibit a { grid-template-columns: 2.4rem 1fr 1.2rem; }
  .exhibit .note { display: none; }
  .site-head { letter-spacing: 0.1em; }
}
