:root {
  --bg: #f5f7f1;
  --paper: #fffef8;
  --ink: #121510;
  --muted: #58615a;
  --soft: #e9eee6;
  --line: #d3dbd1;
  --accent: #1f5a43;
  --accent-soft: #e1ece5;
  --shadow: 0 26px 70px rgba(20, 28, 20, .10);
  --radius: 8px;
  font-family: "Aptos", "Segoe UI Variable", "Segoe UI", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(18, 21, 16, .035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(18, 21, 16, .03) 1px, transparent 1px),
    var(--bg);
  background-size: 48px 48px;
  line-height: 1.62;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 24px;
  align-items: center;
  width: min(1200px, calc(100% - 40px));
  margin: 0 auto;
  padding: 18px 0 14px;
  border-bottom: 1px solid rgba(18, 21, 16, .14);
  background: rgba(245, 247, 241, .88);
  backdrop-filter: blur(16px);
}
.brand { display: inline-flex; gap: 12px; align-items: baseline; font-weight: 850; letter-spacing: 0; }
.brand span { font-size: 20px; }
.brand small { color: var(--muted); font-size: 12px; }
.brand small, nav, .pill, .eyebrow, .tag-row, .action-row, .card-chips, .case-feature span, .contact-grid-site span, .reader-strip span, .toc, .reference-list, dt {
  font-family: "SF Mono", Consolas, "Liberation Mono", monospace;
}
nav { display: flex; gap: 18px; color: var(--muted); font-size: 12px; font-weight: 700; }
nav a:hover { color: var(--accent); }
.pill, .action-row a, .section-action a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 1px solid rgba(18, 21, 16, .26);
  border-radius: 999px;
  background: rgba(255, 254, 248, .72);
  padding: 9px 14px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.action-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.action-row a:first-child, .section-action a {
  border-color: var(--accent);
  background: var(--accent);
  color: #fffef8;
}
.pill:hover, .action-row a:hover, .section-action a:hover, .project-card:hover, .contact-grid-site a:hover {
  transform: translateY(-2px);
}
main { width: min(1200px, calc(100% - 40px)); margin: 0 auto; }
.home-hero {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(420px, .8fr);
  gap: clamp(34px, 6vw, 86px);
  align-items: center;
  min-height: calc(100dvh - 74px);
  padding: clamp(54px, 8vw, 96px) 0 52px;
}
.hero-copy { max-width: 760px; }
.eyebrow {
  margin: 0 0 16px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0;
}
h1, h2, h3, p { margin-top: 0; }
h1 {
  max-width: 820px;
  margin-bottom: 24px;
  font-size: clamp(42px, 5.4vw, 76px);
  font-weight: 780;
  line-height: 1.02;
  letter-spacing: 0;
}
.lead, .dek {
  max-width: 760px;
  color: #30372f;
  font-size: clamp(18px, 1.55vw, 23px);
  font-weight: 520;
  line-height: 1.66;
}
.hero-visual figure, .case-feature, .project-card, .contact-grid-site a, .table-wrap, .code-block, .appendix-section, figure {
  border-radius: var(--radius);
}
.hero-visual figure {
  overflow: hidden;
  margin: 0;
  border: 1px solid rgba(18, 21, 16, .20);
  background: var(--paper);
  box-shadow: var(--shadow);
}
.hero-visual img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: top left;
}
figcaption {
  padding: 13px 15px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 640;
  line-height: 1.5;
}
.reader-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-bottom: 34px;
  background: var(--line);
  border: 1px solid var(--line);
}
.reader-strip article {
  min-height: 154px;
  padding: 22px;
  background: rgba(255, 254, 248, .78);
}
.reader-strip span {
  display: block;
  margin-bottom: 24px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}
.reader-strip p { margin: 0; font-size: 18px; font-weight: 660; line-height: 1.5; }
.section {
  padding: clamp(64px, 9vw, 112px) 0;
  border-top: 1px solid rgba(18, 21, 16, .14);
}
.section-head {
  max-width: 840px;
  margin-bottom: 34px;
}
h2 {
  margin: 0;
  font-size: clamp(30px, 4.4vw, 58px);
  font-weight: 760;
  line-height: 1.04;
  letter-spacing: 0;
}
.case-feature {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, .85fr);
  overflow: hidden;
  border: 1px solid rgba(18, 21, 16, .22);
  background: var(--paper);
  box-shadow: var(--shadow);
}
.case-feature figure {
  margin: 0;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: #f7faf4;
}
.case-feature figure img {
  width: 100%;
  height: 100%;
  min-height: 380px;
  object-fit: cover;
  object-position: top left;
}
.case-feature > div { padding: clamp(26px, 4vw, 48px); }
.case-feature span {
  display: block;
  margin-bottom: 20px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}
.case-feature h3 {
  margin: 0 0 16px;
  max-width: 560px;
  color: var(--ink);
  font-size: clamp(30px, 4vw, 54px);
  line-height: 1.03;
  font-weight: 780;
}
.case-feature p { color: var(--muted); font-size: 17px; line-height: 1.72; }
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-flow: dense;
  gap: 18px;
}
.project-card {
  display: flex;
  min-height: 420px;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(18, 21, 16, .18);
  background: rgba(255, 254, 248, .86);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.project-card:hover {
  border-color: rgba(31, 90, 67, .42);
  box-shadow: 0 24px 54px rgba(20, 28, 20, .09);
}
.project-card.flagship { grid-column: span 2; }
.project-card .card-media {
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: var(--soft);
}
.project-card .card-media img {
  width: 100%;
  aspect-ratio: 16 / 8.2;
  object-fit: cover;
  object-position: top left;
  filter: saturate(.92) contrast(.98);
}
.project-card > span, .project-card > h3, .project-card > p, .project-card > .card-chips, .project-card > .tag-row {
  margin-left: 22px;
  margin-right: 22px;
}
.project-card > span {
  margin-top: 20px;
  color: var(--accent);
  font-family: "SF Mono", Consolas, monospace;
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}
.project-card h3 {
  margin-top: 18px;
  margin-bottom: 12px;
  color: var(--ink);
  font-size: clamp(21px, 2vw, 28px);
  line-height: 1.13;
  font-weight: 780;
}
.project-card p { color: var(--muted); font-size: 15px; line-height: 1.6; }
.project-card .proof-line {
  margin-top: 2px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: #304038;
  font-size: 13px;
  font-weight: 680;
}
.card-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 4px; margin-bottom: 16px; }
.card-chips b {
  border: 1px solid rgba(31, 90, 67, .20);
  border-radius: 999px;
  background: var(--accent-soft);
  padding: 5px 8px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 760;
}
.tag-row { display: flex; flex-wrap: wrap; gap: 7px; margin-top: auto; padding-bottom: 20px; }
.tag-row b {
  border: 1px solid rgba(18, 21, 16, .12);
  border-radius: 999px;
  background: rgba(18, 21, 16, .035);
  padding: 5px 8px;
  color: #485149;
  font-size: 11px;
  font-weight: 700;
}
.section-action { margin-top: 24px; }
.media-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
figure {
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(18, 21, 16, .18);
  background: var(--paper);
}
figure img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top left;
  border-bottom: 1px solid var(--line);
}
.contact-grid-site {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.contact-grid-site a {
  border: 1px solid rgba(18, 21, 16, .18);
  background: rgba(255, 254, 248, .86);
  padding: 24px;
  transition: transform .18s ease, box-shadow .18s ease;
}
.contact-grid-site span {
  display: block;
  margin-bottom: 18px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}
.contact-grid-site p { margin: 0; color: var(--ink); font-size: 18px; font-weight: 680; line-height: 1.45; }
.paper {
  max-width: 1040px;
  margin: 0 auto;
  padding: 54px 0 112px;
}
.paper-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 34px;
  align-items: center;
  padding-bottom: 38px;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(18, 21, 16, .16);
}
.paper-hero.single { display: block; }
.paper .paper-hero h1 {
  max-width: 930px;
  font-size: clamp(34px, 4.3vw, 58px);
  line-height: 1.06;
}
.paper .paper-hero .title-en { margin-top: -8px; color: var(--accent); font-size: clamp(20px, 2vw, 30px); line-height: 1.18; }
.paper .dek { font-size: clamp(16px, 1.25vw, 20px); line-height: 1.72; }
.dek-en, .english-dek { color: var(--accent); font-size: clamp(15px, 1.2vw, 18px); }
.paper-figure img { aspect-ratio: 16 / 11; object-fit: cover; object-position: top left; }
.caption-en { display: block; margin-top: 6px; color: var(--accent); font-size: 13px; }
.case-brief {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 22px 0 28px;
  background: var(--line);
  border: 1px solid var(--line);
}
.case-brief article { background: rgba(255, 254, 248, .86); padding: 18px; }
.case-brief span {
  display: block;
  margin-bottom: 10px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}
.case-brief p { margin: 0; color: var(--ink); font-size: 15px; font-weight: 620; line-height: 1.55; }
.toc {
  position: sticky;
  top: 70px;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 0;
  margin-bottom: 22px;
  background: rgba(245, 247, 241, .92);
  border-bottom: 1px solid var(--line);
}
.toc a { border: 1px solid rgba(18, 21, 16, .12); border-radius: 999px; background: var(--paper); padding: 6px 9px; color: var(--muted); font-size: 11px; font-weight: 760; }
.figure-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; margin: 28px 0; }
.paper-section { max-width: 790px; padding: 30px 0; border-bottom: 1px solid var(--line); }
.paper-section:last-child { border-bottom: 0; }
.paper-section h2 { margin-bottom: 16px; color: var(--ink); font-size: clamp(24px, 2.5vw, 36px); line-height: 1.16; }
.paper-section p, .paper-section li { color: var(--muted); font-size: 16px; }
.paper-section p { margin-bottom: 15px; }
.table-wrap { overflow-x: auto; margin: 18px 0 22px; border: 1px solid var(--line); background: var(--paper); }
table { width: 100%; border-collapse: collapse; min-width: 620px; }
th, td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; font-size: 14px; line-height: 1.45; }
th { color: var(--accent); background: #edf3ef; font-family: "SF Mono", Consolas, monospace; font-size: 12px; text-transform: uppercase; }
tr:last-child td { border-bottom: 0; }
.code-block { overflow-x: auto; margin: 16px 0 20px; border: 1px solid var(--line); background: #18221d; padding: 14px; color: #edf6f1; font-size: 13px; line-height: 1.5; }
.code-block code { font-family: "SF Mono", Consolas, monospace; }
.appendix-section { max-width: 900px; margin-top: 18px; background: #edf3ef; border: 1px solid var(--line); padding: 22px; }
.appendix-section h2 { color: #3f5548; font-size: 22px; }
.appendix-section p { font-size: 14px; line-height: 1.6; }
.language-kicker {
  margin-bottom: 12px;
  color: var(--accent) !important;
  font-family: "SF Mono", Consolas, monospace;
  font-size: 12px !important;
  font-weight: 850;
  text-transform: uppercase;
}
.reference-list { display: grid; gap: 9px; padding-left: 22px; }
.reference-list li { font-size: 14px; word-break: break-word; }
.reports .paper-hero { margin-bottom: 36px; }
.report-group { padding: 42px 0 56px; border-top: 1px solid var(--line); }
.report-group-head { max-width: 760px; margin-bottom: 24px; }
.report-group-head h2 { margin: 0; font-size: clamp(25px, 3vw, 42px); line-height: 1.12; }
.reports .project-grid { margin-top: 22px; }
@media (max-width: 980px) {
  .site-header { grid-template-columns: 1fr auto; }
  nav { display: none; }
  .home-hero, .paper-hero, .case-feature { grid-template-columns: 1fr; gap: 30px; min-height: auto; }
  .project-grid, .media-grid, .figure-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .project-card.flagship { grid-column: span 1; }
  .case-brief, .reader-strip, .contact-grid-site { grid-template-columns: 1fr; }
  .case-feature figure { border-right: 0; border-bottom: 1px solid var(--line); }
  .case-feature figure img { min-height: 280px; }
}
@media (max-width: 640px) {
  main, .site-header { width: min(100% - 24px, 1200px); }
  .home-hero { padding-top: 34px; }
  .hero-visual img { aspect-ratio: 16 / 11; }
  h1 { font-size: 42px; }
  .lead, .dek { font-size: 17px; }
  .project-grid, .media-grid, .figure-grid, .contact-grid-site { grid-template-columns: 1fr; }
  .project-card { min-height: auto; }
  .project-card .card-media img { aspect-ratio: 16 / 9; }
  .paper { padding-top: 42px; }
  .paper-section p, .paper-section li { font-size: 16px; }
}
