:root {
  color-scheme: light;
  --paper: #f4efe4;
  --paper-deep: #e9dfcf;
  --ink: #27251f;
  --muted: #756f63;
  --line: rgba(39, 37, 31, 0.18);
  --red: #963c31;
  --red-soft: #c66e5d;
  --green: #386657;
  --white: #fffdf8;
  --font-kaiti: STKaiti, "华文楷体", KaiTi, "楷体", serif;
  --shadow: 0 28px 70px rgba(75, 61, 40, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(rgba(92, 74, 47, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(92, 74, 47, 0.025) 1px, transparent 1px),
    var(--paper);
  background-size: 32px 32px;
  font-family: var(--font-kaiti);
  line-height: 1.7;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
}

.site-header {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 28px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: var(--white);
  background: var(--red);
  border-radius: 2px 10px 2px 10px;
  font-size: 19px;
  transform: rotate(-2deg);
  box-shadow: 0 8px 20px rgba(150, 60, 49, 0.2);
}

.header-note {
  color: var(--muted);
  font-size: 14px;
  letter-spacing: 0.12em;
}

main,
footer {
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
}

.hero {
  position: relative;
  padding: clamp(88px, 13vw, 168px) 0 clamp(88px, 11vw, 142px);
}

.hero::after {
  content: "莫";
  position: absolute;
  z-index: -1;
  top: 26px;
  right: 2vw;
  color: rgba(150, 60, 49, 0.055);
  font-size: clamp(190px, 28vw, 390px);
  font-weight: 700;
  line-height: 1;
}

.eyebrow,
.section-kicker,
.card-category {
  margin: 0;
  color: var(--red);
  font-family: ui-monospace, "Cascadia Mono", "Segoe UI Mono", monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.17em;
}

.hero h1 {
  max-width: 840px;
  margin: 22px 0 28px;
  font-size: clamp(48px, 7.5vw, 94px);
  font-weight: 700;
  letter-spacing: -0.055em;
  line-height: 1.12;
}

.hero-copy {
  max-width: 660px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(18px, 2vw, 23px);
  line-height: 1.8;
}

.hero-meta {
  margin-top: 54px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  color: var(--muted);
  font-size: 14px;
}

.hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(56, 102, 87, 0.12);
}

.collection {
  padding: 76px 0 112px;
  border-top: 1px solid var(--line);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 38px;
}

.section-heading h2,
.about h2 {
  margin: 10px 0 0;
  font-size: clamp(36px, 4.4vw, 60px);
  line-height: 1.2;
}

.section-heading > p {
  max-width: 260px;
  margin: 0 0 8px;
  color: var(--muted);
  text-align: right;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.project-card {
  min-height: 410px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.56);
  text-decoration: none;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.project-card.featured {
  grid-row: span 2;
  min-height: 840px;
  background:
    radial-gradient(circle at 80% 15%, rgba(198, 110, 93, 0.18), transparent 34%),
    var(--ink);
  color: var(--white);
}

.project-card:hover,
.project-card:focus-visible {
  transform: translateY(-5px);
  border-color: rgba(150, 60, 49, 0.55);
  background-color: var(--white);
  box-shadow: var(--shadow);
  outline: none;
}

.project-card.featured:hover,
.project-card.featured:focus-visible {
  background-color: var(--ink);
}

.card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-family: ui-monospace, "Cascadia Mono", "Segoe UI Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.1em;
}

.featured .card-topline,
.featured .card-category {
  color: rgba(255, 253, 248, 0.6);
}

.card-status::before {
  content: "";
  width: 6px;
  height: 6px;
  display: inline-block;
  margin-right: 7px;
  border-radius: 50%;
  background: currentColor;
}

.card-body {
  margin: auto 0;
}

.card-body h3 {
  max-width: 560px;
  margin: 12px 0 20px;
  font-size: clamp(34px, 4vw, 58px);
  line-height: 1.16;
}

.project-card:not(.featured) .card-body h3 {
  font-size: clamp(30px, 3vw, 43px);
}

.card-body > p:last-child {
  max-width: 590px;
  margin: 0;
  color: var(--muted);
  font-size: 17px;
}

.featured .card-body > p:last-child {
  color: rgba(255, 253, 248, 0.68);
}

.card-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 20px;
  border-top: 1px solid currentColor;
  color: var(--muted);
  font-family: ui-monospace, "Cascadia Mono", "Segoe UI Mono", monospace;
  font-size: 13px;
}

.featured .card-link {
  color: rgba(255, 253, 248, 0.6);
}

.card-link b {
  font-family: var(--font-kaiti);
  font-size: 24px;
  font-weight: 400;
  transition: transform 180ms ease;
}

.project-card:hover .card-link b,
.project-card:focus-visible .card-link b {
  transform: translate(3px, -3px);
}

.about {
  padding: 112px 0;
  border-top: 1px solid var(--line);
}

.about-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.7fr);
  gap: clamp(48px, 8vw, 120px);
  align-items: start;
}

.about h2 {
  max-width: 700px;
}

.about-copy {
  padding-top: 12px;
  color: var(--muted);
  font-size: 18px;
}

.about-copy p:first-child {
  margin-top: 0;
}

footer {
  padding: 30px 0 44px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.error-page {
  display: grid;
  place-items: center;
  padding: 24px;
}

.error-panel {
  width: min(760px, 100%);
  margin: 0;
  padding: 72px;
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.7);
  box-shadow: var(--shadow);
}

.error-panel h1 {
  margin: 18px 0;
  font-size: clamp(42px, 7vw, 72px);
  line-height: 1.2;
}

.error-panel > p:not(.eyebrow) {
  color: var(--muted);
  font-size: 18px;
}

.home-link {
  margin-top: 32px;
  display: inline-block;
  padding-bottom: 3px;
  border-bottom: 1px solid currentColor;
  color: var(--red);
  font-size: 17px;
  text-decoration: none;
}

@media (max-width: 780px) {
  .site-header,
  main,
  footer {
    width: min(100% - 32px, 1180px);
  }

  .header-note {
    display: none;
  }

  .hero {
    padding-top: 86px;
  }

  .hero h1 {
    letter-spacing: -0.035em;
  }

  .section-heading,
  footer {
    align-items: start;
    flex-direction: column;
  }

  .section-heading > p {
    text-align: left;
  }

  .project-grid,
  .about-grid {
    grid-template-columns: 1fr;
  }

  .project-card,
  .project-card.featured {
    grid-row: auto;
    min-height: 430px;
  }

  .about,
  .collection {
    padding-block: 78px;
  }

  .error-panel {
    padding: 40px 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
