:root {
  --paper: #f5f4ef;
  --surface: #fffefa;
  --ink: #1d2420;
  --muted: #66706a;
  --line: #d9ddd4;
  --accent: #b54e32;
  --accent-dark: #8f3823;
  --max-width: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 5rem; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.75;
}

a { color: inherit; }

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  z-index: 10;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.5rem 0.75rem;
  color: var(--surface);
  background: var(--ink);
  transform: translateY(-200%);
}

.skip-link:focus { transform: translateY(0); }

.site-header,
.section,
.intro,
.site-footer {
  width: min(calc(100% - 3rem), var(--max-width));
  margin-inline: auto;
}

.site-header {
  min-height: 5.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.site-name {
  color: var(--ink);
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: 0;
  text-decoration: none;
}

nav { display: flex; gap: 1.5rem; }

nav a {
  color: var(--muted);
  font-size: 0.9rem;
  text-decoration: none;
  transition: color 180ms ease;
}

nav a:hover { color: var(--accent-dark); }

.intro {
  min-height: 35rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: 7rem 6rem;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 1rem;
  color: var(--accent-dark);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

h1, h2, h3, p { margin-top: 0; }

h1, h2, h3 {
  font-family: "Songti SC", "STSong", "SimSun", serif;
  font-weight: 700;
  letter-spacing: 0;
}

h1 {
  max-width: 12ch;
  margin-bottom: 1.5rem;
  font-size: clamp(3rem, 7vw, 5.75rem);
  line-height: 1.08;
}

.intro-copy {
  max-width: 35rem;
  margin-bottom: 2rem;
  color: var(--muted);
  font-size: 1.08rem;
}

.text-link {
  width: fit-content;
  color: var(--accent-dark);
  font-weight: 700;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.3em;
}

.section { padding-block: 6.5rem; }

.section-heading { margin-bottom: 2.75rem; }

h2 {
  margin-bottom: 0;
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.18;
}

.note-list { border-top: 1px solid var(--line); }

.note {
  display: grid;
  grid-template-columns: 12rem minmax(0, 1fr);
  column-gap: 2rem;
  padding: 2rem 0;
  border-bottom: 1px solid var(--line);
}

.note-meta { grid-row: span 2; color: var(--accent-dark); font-size: 0.85rem; }

.note h3, .project h3 {
  margin-bottom: 0.55rem;
  font-size: 1.5rem;
  line-height: 1.35;
}

.note p:not(.note-meta), .project p, .about-detail { color: var(--muted); }

.projects { background: var(--surface); }

.project-grid {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 1px;
  border: 1px solid var(--line);
  background: var(--line);
}

.project {
  min-height: 19rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 2.25rem;
  background: var(--surface);
}

.project-featured { background: #e7ede2; }

.project-kind, .project-status { font-size: 0.85rem; }
.project-kind { color: var(--accent-dark) !important; }
.project-status { margin: 0; }

.about {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 5rem;
  border-top: 1px solid var(--line);
}

.about-detail { max-width: 34rem; padding-top: 2.15rem; }
.about-detail a { color: var(--accent-dark); text-underline-offset: 0.2em; }

.site-footer {
  display: flex;
  justify-content: space-between;
  padding-block: 2rem 3rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
}

.site-footer p { margin: 0; }

@media (max-width: 700px) {
  .site-header, .section, .intro, .site-footer { width: min(calc(100% - 2rem), var(--max-width)); }
  .site-header { min-height: 4.5rem; }
  nav { gap: 1rem; }
  .intro { min-height: 31rem; padding-block: 5rem 4.5rem; }
  .section { padding-block: 4.5rem; }
  .note { display: block; padding: 1.5rem 0; }
  .note-meta { margin-bottom: 0.75rem; }
  .project-grid, .about { grid-template-columns: 1fr; }
  .about { gap: 0.5rem; }
  .about-detail { padding-top: 0; }
  .site-footer { display: block; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: 0.01ms !important; }
}
