:root {
  color-scheme: light;
  --paper: #f7f2e8;
  --ink: #302d28;
  --muted-ink: #676253;
  --grass: #536a48;
  --grass-deep: #3e5334;
  --line: #d8d0bf;
  --selected-paper: #dde5d4;
  --serif: Georgia, "Times New Roman", "Songti SC", SimSun, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang TC", "Noto Sans", sans-serif;
}

* { box-sizing: border-box; }

html {
  scroll-padding-top: 24px;
  background: var(--paper);
  scrollbar-color: var(--grass) var(--paper);
}

body {
  margin: 0;
  min-width: 240px;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; text-decoration: none; }
p, h1, h2, ul { margin: 0; }

a:focus-visible,
.projects:focus-visible {
  outline: 3px solid var(--grass);
  outline-offset: 7px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 2;
  min-height: 56px;
  padding: 13px 20px;
  color: var(--paper);
  background: var(--grass-deep);
  border-radius: 4px;
  transform: translateY(-180%);
}

.skip-link:focus { transform: translateY(0); }

.page {
  width: min(1100px, calc(100% - 96px));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  min-height: 128px;
  border-bottom: 1px solid var(--line);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  font-family: var(--serif);
  font-size: 27px;
  line-height: 1;
  letter-spacing: -0.025em;
}

.brand-mark { width: 40px; height: 40px; color: var(--grass); }
.brand-mark path { stroke: currentColor; stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; }
.header-note { color: var(--muted-ink); }

.main-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 88px;
  align-items: start;
  padding-block: 86px 100px;
}

.intro { min-width: 0; }

h1 {
  max-width: 14ch;
  font-family: var(--serif);
  font-size: clamp(42px, 4.4vw, 60px);
  font-weight: 400;
  line-height: 1.11;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

h1 em { color: var(--grass); font-weight: inherit; }
.intro-copy { max-width: 31ch; margin-top: 26px; font-size: 20px; line-height: 1.65; }
.intro-note { margin-top: 18px; color: var(--muted-ink); }
.margin-mark { display: block; width: 86px; height: 36px; margin-top: 32px; color: var(--grass); }
.margin-mark path { stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }

.projects { min-width: 0; scroll-margin-top: 24px; }
.projects h2 { margin-bottom: 12px; font-size: 18px; font-weight: 500; line-height: 1.6; color: var(--muted-ink); }
.project-list { padding: 0; list-style: none; border-top: 1px solid var(--line); }
.project-list li { border-bottom: 1px solid var(--line); }

.project-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 123px;
  padding-block: 24px;
  overflow-wrap: anywhere;
}

.project-content { display: block; min-width: 0; }
.project-heading { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; }
.project-name { font-family: var(--serif); font-size: 31px; line-height: 1.25; letter-spacing: -0.02em; }
.chinese-name { font-family: "Songti SC", "STSong", SimSun, var(--serif); letter-spacing: 0.08em; }
.project-status { color: var(--grass); font-size: 18px; line-height: 1.5; }
.project-domain { display: block; margin-top: 6px; color: var(--muted-ink); font-size: 18px; line-height: 1.5; }
.project-action { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; color: var(--grass); }
.project-action svg { width: 22px; height: 22px; transition: transform 180ms cubic-bezier(0.16, 1, 0.3, 1); }
.project-action path { stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.project-link:hover .project-name,
.project-link:focus-visible .project-name { color: var(--grass-deep); }
.project-link:hover .project-action svg,
.project-link:focus-visible .project-action svg { transform: translate(2px, -2px); }

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px 32px;
  padding-block: 26px 40px;
  border-top: 1px solid var(--line);
  color: var(--muted-ink);
  font-size: 18px;
}

@media (max-width: 1000px) {
  .page { width: calc(100% - 64px); }
  .main-layout { gap: 48px; padding-block: 64px 76px; }
  .project-heading { display: block; }
  .project-status { display: block; margin-top: 6px; }
}

@media (max-width: 760px) {
  .page { width: calc(100% - 40px); }
  .site-header { min-height: 100px; gap: 16px; }
  .wordmark { font-size: 26px; gap: 9px; }
  .brand-mark { width: 34px; height: 34px; }
  .header-note { display: none; }
  .main-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; padding-block: 28px 56px; }
  h1 { max-width: 16ch; font-size: clamp(42px, 10.5vw, 56px); }
  .intro-copy { max-width: 32ch; margin-top: 22px; font-size: 18px; }
  .intro-note, .margin-mark { display: none; }
  .project-link { min-height: 120px; padding-block: 22px; gap: 16px; }
  .project-name { font-size: 29px; }
  .project-heading { display: block; }
  .project-status { display: block; margin-top: 6px; }
  .project-action { gap: 6px; }
  .project-action > span { display: none; }
  .site-footer { display: block; padding-block: 24px 34px; }
  .site-footer p + p { margin-top: 3px; }
}

@media (prefers-reduced-motion: reduce) {
  .project-action svg { transition: none; }
  .project-link:hover .project-action svg,
  .project-link:focus-visible .project-action svg { transform: none; }
}
