:root {
  --paper: #f4f0e8;
  --paper-deep: #ebe4d8;
  --ink: #1d241f;
  --muted: #4f5a51;
  --line: #d5cec1;
  --card: #fbf8f2;
  --sage: #245e46;
  --sage-soft: #dce9df;
  --rust: #8c3f2b;
  --sand: #eadbc4;
  --shadow: 0 24px 70px rgba(52, 45, 34, 0.08);
  --radius: 24px;
  --max-width: 1240px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:focus-visible {
  outline: 3px solid var(--rust);
  outline-offset: 4px;
  border-radius: 4px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--ink);
  color: #fff;
  transform: translateY(-150%);
}

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

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

.wordmark {
  font-weight: 750;
  letter-spacing: -0.03em;
  text-decoration: none;
}

nav {
  display: flex;
  align-items: center;
  gap: 28px;
  color: var(--muted);
  font-size: 0.88rem;
}

nav a {
  text-decoration: none;
}

nav a:hover {
  color: var(--ink);
}

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

.hero {
  min-height: 610px;
  padding: 110px 0 96px;
  display: grid;
  align-content: center;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--sage);
  font-size: 0.76rem;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 880px;
  margin-bottom: 22px;
  font-family: Georgia, "Noto Serif SC", "Songti SC", serif;
  font-size: clamp(4rem, 9vw, 8.4rem);
  font-weight: 500;
  letter-spacing: -0.065em;
  line-height: 0.88;
}

.hero-zh {
  margin: 0 0 34px;
  color: var(--rust);
  font-family: Georgia, "Noto Serif SC", "Songti SC", serif;
  font-size: clamp(1.35rem, 2.3vw, 2rem);
  letter-spacing: 0.03em;
}

.hero-copy {
  max-width: 620px;
  margin-bottom: 28px;
  font-size: 1.08rem;
}

.hero-copy span {
  color: var(--muted);
}

.text-link {
  width: fit-content;
  color: var(--sage);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}

.portfolio-section {
  padding: 112px 0 20px;
}

.section-heading {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  margin-bottom: 44px;
}

.section-number {
  margin: 4px 0 0;
  color: var(--rust);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

h2 {
  margin-bottom: 0;
  font-family: Georgia, "Noto Serif SC", "Songti SC", serif;
  font-size: clamp(2.1rem, 4vw, 4rem);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1.05;
}

h2 span {
  color: var(--muted);
  font-size: 0.55em;
  letter-spacing: 0.02em;
}

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

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.project-card {
  min-width: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 30px 80px rgba(52, 45, 34, 0.12);
}

.project-visual {
  margin: 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--paper-deep);
  border-bottom: 1px solid var(--line);
}

.project-visual img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.project-visual--sky img {
  object-position: 50% 18%;
}

.project-visual--avatar {
  aspect-ratio: 3 / 2;
  background: #17182c;
}

.project-body {
  height: 100%;
  padding: 28px;
  display: flex;
  flex-direction: column;
}

.project-card--lead .project-body {
  padding: 34px;
}

.project-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-meta span:first-child {
  color: var(--rust);
}

h3 {
  margin-bottom: 22px;
  font-family: Georgia, "Noto Serif SC", "Songti SC", serif;
  font-size: clamp(2rem, 3vw, 3.3rem);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1.02;
}

h3 span {
  color: var(--muted);
  font-size: 0.65em;
  letter-spacing: 0;
}

.product-grid h3 {
  font-size: clamp(1.8rem, 2.6vw, 2.6rem);
}

.copy-zh,
.copy-en {
  margin-bottom: 12px;
}

.copy-en {
  color: var(--muted);
}

.signal-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 28px;
  padding: 0;
  list-style: none;
}

.signal-list li {
  padding: 5px 10px;
  color: var(--sage);
  background: var(--sage-soft);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
}

.project-actions {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.project-actions a {
  color: var(--sage);
  font-size: 0.84rem;
  font-weight: 750;
  text-decoration: none;
}

.project-actions a:hover,
.text-link:hover {
  color: var(--rust);
}

.project-card--text {
  min-height: 590px;
  background: var(--sage-soft);
}

.project-card--text .project-body {
  padding-top: 38px;
}

.project-card--sand {
  background: var(--sand);
}

.project-card--tool {
  min-height: 490px;
  background: var(--ink);
  color: #f8f4ec;
  border-color: var(--ink);
}

.project-card--tool-alt {
  background: var(--sage);
  border-color: var(--sage);
}

.project-card--tool .project-meta,
.project-card--tool .copy-en {
  color: rgba(248, 244, 236, 0.8);
}

.project-card--tool .project-meta span:first-child {
  color: #f8d4c4;
}

.project-card--tool a:focus-visible {
  outline-color: #f8f4ec;
}

.project-card--tool .signal-list li {
  color: #f8f4ec;
  background: rgba(255, 255, 255, 0.12);
}

.project-card--tool .project-actions {
  border-color: rgba(255, 255, 255, 0.18);
}

.project-card--tool .project-actions a {
  color: #f8f4ec;
}

footer {
  margin-top: 112px;
  padding: 42px 0 64px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 36px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 0.84rem;
}

footer p {
  margin-bottom: 0;
}

@media (max-width: 960px) {
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-card--visual {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .project-card--visual .project-visual {
    height: 100%;
    aspect-ratio: auto;
    border-right: 1px solid var(--line);
    border-bottom: 0;
  }
}

@media (max-width: 720px) {
  .site-header,
  main,
  footer {
    width: min(calc(100% - 30px), var(--max-width));
  }

  .site-header {
    min-height: 72px;
  }

  nav {
    gap: 14px;
    font-size: 0.75rem;
  }

  nav a:first-child {
    display: none;
  }

  .hero {
    min-height: 540px;
    padding: 82px 0 70px;
  }

  h1 {
    font-size: clamp(3.4rem, 18vw, 5.2rem);
  }

  .portfolio-section {
    padding-top: 80px;
  }

  .section-heading {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 10px;
    margin-bottom: 30px;
  }

  .lead-grid,
  .product-grid,
  .tool-grid,
  .project-card--visual {
    grid-template-columns: 1fr;
  }

  .project-card--visual {
    display: flex;
  }

  .project-card--visual .project-visual {
    height: auto;
    aspect-ratio: 3 / 2;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .project-card--text,
  .project-card--tool {
    min-height: auto;
  }

  .project-body,
  .project-card--lead .project-body {
    padding: 24px;
  }

  footer {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

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

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