/* Shenzhan Liao — author site */

:root {
  --ink: #1d2230;
  --ink-soft: #4a5163;
  --muted: #7a8193;
  --paper: #ffffff;
  --mist: #f7f9fb;
  --line: #e3e7ee;
  --red: #a8322b;
  --red-dark: #8a2721;
  --night: #1b2233;

  --serif: "Source Serif 4", "Noto Serif SC", Georgia, "Songti SC", serif;
  --sans: "Inter", "Noto Sans SC", -apple-system, "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  --cjk-serif: "Noto Serif SC", "Songti SC", "STSong", serif;

  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

html[lang="zh-Hans"] body {
  font-family: var(--cjk-serif);
  font-size: 17px;
  line-height: 1.95;
  letter-spacing: 0.02em;
}
/* English text on Chinese pages: the CJK font draws ’ “ ” as full-width glyphs */
:where(html[lang="zh-Hans"] [lang="en"]) { font-family: var(--serif); letter-spacing: normal; }

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

a { color: var(--red); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--red-dark); }

h1, h2, h3 { font-weight: 500; line-height: 1.2; margin: 0 0 0.6em; letter-spacing: -0.01em; }
html[lang="zh-Hans"] h1, html[lang="zh-Hans"] h2, html[lang="zh-Hans"] h3 { letter-spacing: 0.04em; line-height: 1.4; }
p { margin: 0 0 1.1em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 720px; }

.eyebrow {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--red);
  margin: 0 0 1em;
}
html[lang="zh-Hans"] .eyebrow { letter-spacing: 0.2em; font-size: 13px; }
.eyebrow-author { color: var(--muted); }
.eyebrow-title { font-style: italic; color: var(--red); }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: var(--paper); padding: 8px 12px; z-index: 10; }

/* ---------- Header ---------- */

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 32px;
  flex-wrap: wrap;
  padding-top: 18px;
  padding-bottom: 18px;
}
.brand {
  color: var(--ink);
  text-decoration: none;
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 21px;
  line-height: 1.2;
}
.brand span { font-family: var(--cjk-serif); color: var(--muted); font-size: 17px; }
.brand:hover { color: var(--ink); }

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px 24px;
  flex-wrap: wrap;
  font-family: var(--sans);
  font-size: 14px;
}
.site-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  padding: 4px 0;
  border-bottom: 1px solid transparent;
}
.site-nav a:hover { color: var(--ink); }
.site-nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--red); }
.site-nav .lang {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 12px;
  color: var(--ink);
}
.site-nav .lang:hover { border-color: var(--ink-soft); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  padding: 12px 22px;
  border-radius: 2px;
  background: var(--red);
  color: #fff;
  border: 1px solid var(--red);
  transition: background 0.15s ease;
}
.btn:hover { background: var(--red-dark); border-color: var(--red-dark); color: #fff; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--ink-soft); }
.btn.ghost:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* ---------- Sections ---------- */

.section { padding: clamp(56px, 9vw, 104px) 0; }
.section + .section { border-top: 1px solid var(--line); }
.section.mist { background: var(--mist); border-top: 0; }
.section.mist + .section { border-top: 0; }

.lead { font-size: 1.2em; color: var(--ink-soft); }

/* ---------- Home hero ---------- */

.hero .wrap {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}
.hero h1 {
  font-size: clamp(42px, 6.4vw, 76px);
  margin-bottom: 0.25em;
}
.hero .cjk-name {
  font-family: var(--cjk-serif);
  font-size: clamp(22px, 2.6vw, 30px);
  color: var(--muted);
  letter-spacing: 0.2em;
  margin: 0 0 1.2em;
}
.hero .roles {
  font-family: var(--sans);
  font-size: 14px;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  margin-bottom: 1.6em;
}
html[lang="zh-Hans"] .hero h1 { letter-spacing: 0.12em; }
html[lang="zh-Hans"] .hero .cjk-name,
html[lang="zh-Hans"] .brand span { font-family: var(--serif); letter-spacing: 0.02em; }
.hero-portrait { position: relative; }
.hero-portrait img { width: 100%; aspect-ratio: 9 / 10; object-fit: cover; }
.hero-portrait::after {
  content: "";
  position: absolute;
  inset: 18px -18px -18px 18px;
  border: 1px solid var(--red);
  z-index: -1;
}
.hero-portrait { isolation: isolate; }

/* ---------- Book feature ---------- */

.book-feature {
  display: grid;
  grid-template-columns: minmax(220px, 340px) 1fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}
.book-feature > a { text-decoration: none; display: block; }
.book-feature h2 { font-size: clamp(30px, 4vw, 44px); }
.title-cjk { font-family: var(--cjk-serif); letter-spacing: 0.06em; }
.subtitle { color: var(--ink-soft); font-size: 1.05em; margin-top: -0.3em; }

.cover-img { width: 100%; box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 18px 40px -12px rgba(27,34,51,.45); }

/* ---------- Home quote ---------- */

#home-quote { background: #f7f9fb; }
.quote {
  margin: 0 auto;
  max-width: 860px;
  text-align: center;
}
.quote p {
  font-size: clamp(24px, 3.2vw, 36px);
  line-height: 1.45;
  margin: 0 0 0.8em;
}
html[lang="zh-Hans"] .quote p { line-height: 1.7; }
.quote-long p { font-size: clamp(20px, 2.4vw, 28px); }
.quote p::before { content: "“"; color: var(--red); }
.quote p::after { content: "”"; color: var(--red); }
.quote cite {
  font-family: var(--sans);
  font-style: normal;
  font-size: 14px;
  letter-spacing: 0.08em;
  color: var(--muted);
}

/* ---------- Photo band ---------- */

.band {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}
.band h2 { font-size: clamp(28px, 3.4vw, 38px); }

figure { margin: 0; }
figcaption {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--muted);
  margin-top: 10px;
  line-height: 1.5;
}

/* ---------- Page header ---------- */

.page-head { padding: clamp(48px, 8vw, 88px) 0 clamp(32px, 5vw, 56px); }
.page-head h1 { font-size: clamp(38px, 5.4vw, 60px); }

/* ---------- About ---------- */

.about-grid {
  display: grid;
  grid-template-columns: minmax(240px, 380px) 1fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: start;
}
.about-grid .portrait { position: sticky; top: 24px; }

.timeline { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.timeline li { position: relative; padding: 0 0 28px 28px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 0.62em;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--red);
}
.timeline .year {
  display: block;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--red);
}

/* ---------- Book page ---------- */

.book-head {
  display: grid;
  grid-template-columns: minmax(220px, 360px) 1fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}
.book-head h1 { font-family: var(--cjk-serif); font-size: clamp(40px, 5.6vw, 64px); letter-spacing: 0.08em; margin-bottom: 0.2em; }
.book-head .h1-sub { font-family: var(--cjk-serif); font-size: clamp(20px, 2.2vw, 26px); color: var(--ink-soft); letter-spacing: 0.06em; margin-bottom: 0.6em; }
.book-head .en-title { font-style: italic; color: var(--ink-soft); }

.status {
  display: inline-block;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-soft);
  background: var(--mist);
  border: 1px solid var(--line);
  padding: 4px 12px;
  border-radius: 999px;
  margin-top: 8px;
}

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); }

.toc { list-style: none; margin: 0; padding: 0; }
.toc li {
  display: grid;
  grid-template-columns: 5.5em 1fr;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.toc li:first-child { border-top: 1px solid var(--line); }
.toc .n { font-family: var(--sans); font-size: 13px; color: var(--muted); padding-top: 0.25em; }
.toc .zh { font-family: var(--cjk-serif); font-size: 1.05em; }
.toc .en { display: block; font-size: 0.88em; color: var(--muted); }

.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(20px, 3vw, 36px);
}
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

.details { width: 100%; border-collapse: collapse; font-size: 16px; }
.details th, .details td { text-align: left; vertical-align: top; padding: 12px 0; border-bottom: 1px solid var(--line); }
.details th {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--muted);
  width: 38%;
  padding-right: 16px;
}

/* ---------- Press ---------- */

.release { font-size: 17px; }
.release .dateline { font-family: var(--sans); font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.release h2 { font-size: clamp(26px, 3.2vw, 34px); }
.release h3 { font-size: 21px; margin-top: 2em; }
.release blockquote {
  margin: 1.6em 0;
  padding: 0 0 0 22px;
  border-left: 2px solid var(--red);
  font-size: 1.15em;
  color: var(--ink);
}

.press-aside {
  background: var(--mist);
  padding: 28px;
  font-size: 16px;
}
.press-aside h3 { font-size: 19px; }
.press-aside + .press-aside { margin-top: 20px; }
.press-layout { display: grid; grid-template-columns: 1fr 320px; gap: clamp(32px, 6vw, 72px); align-items: start; }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--night);
  color: #c9cfdb;
  font-family: var(--sans);
  font-size: 14px;
  padding: 48px 0;
}
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 40px; }
.site-footer a { color: #fff; }
.site-footer .f-name { font-family: var(--serif); font-size: 20px; color: #fff; margin-bottom: 4px; }
.site-footer p { margin: 0; }

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .hero .wrap,
  .book-feature,
  .band,
  .about-grid,
  .book-head,
  .two-col,
  .press-layout { grid-template-columns: 1fr; }

  .hero-portrait { max-width: 420px; margin-right: 18px; }
  .book-feature .cover-img, .book-head .cover-img { max-width: 280px; }
  .about-grid .portrait { position: static; max-width: 380px; }
  .band figure { order: -1; }
}

@media (max-width: 560px) {
  body { font-size: 17px; }
  .gallery { grid-template-columns: 1fr; }
  .site-header .wrap { padding-top: 14px; padding-bottom: 14px; }
  .site-nav { gap: 4px 18px; }
  .toc li { grid-template-columns: 1fr; gap: 2px; }
}
