:root {
  --ink: #111814;
  --paper: #f4f3ee;
  --white: #fffefa;
  --line: #ccd1ca;
  --muted: #657069;
  --green: #59e69a;
  --coral: #b63d2d;
  --max: 1120px;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  line-height: 1.75;
}
a {
  color: inherit;
}
img {
  display: block;
  max-width: 100%;
}
.wrap {
  width: min(var(--max), calc(100% - 48px));
  margin: auto;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  color: #fff;
  background: rgba(17, 24, 20, 0.94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid #354139;
}
.topbar .wrap {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}
.back,
.github {
  text-decoration: none;
  font-size: 12px;
  font-weight: 800;
}
.back {
  color: var(--green);
}
.github {
  color: #cad3cd;
}
.github:hover {
  color: #fff;
}
.project-hero {
  position: relative;
  overflow: hidden;
  min-height: 640px;
  display: flex;
  align-items: flex-end;
  color: white;
  background: var(--ink);
}
.project-hero:after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      90deg,
      rgba(17, 24, 20, 0.98) 0%,
      rgba(17, 24, 20, 0.9) 44%,
      rgba(17, 24, 20, 0.22) 100%
    ),
    linear-gradient(0deg, #111814 0%, transparent 48%);
}
.project-hero-media {
  position: absolute;
  inset: 0 0 0 39%;
  width: 61%;
  height: 100%;
  object-fit: cover;
  opacity: 0.76;
}
.project-hero-content {
  position: relative;
  z-index: 2;
  padding: 110px 0 84px;
}
.project-no {
  color: var(--green);
  font:
    800 11px Consolas,
    monospace;
}
.project-hero h1 {
  max-width: 850px;
  margin: 24px 0 12px;
  font-family: Georgia, "Microsoft YaHei", serif;
  font-size: 62px;
  line-height: 1.03;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}
.project-hero h2 {
  max-width: 700px;
  margin: 0 0 24px;
  font-family: "STZhongsong", "SimSun", serif;
  font-size: 28px;
  line-height: 1.45;
}
.project-hero p {
  max-width: 670px;
  margin: 0;
  color: #b7c1ba;
  font-size: 15px;
}
.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
}
.hero-tags span {
  padding: 7px 10px;
  border: 1px solid #4b5b51;
  color: #cad4cd;
  font:
    700 10px Consolas,
    "Microsoft YaHei",
    sans-serif;
}
.facts {
  background: #0a0f0c;
  color: white;
}
.facts .wrap {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.facts div {
  min-height: 108px;
  padding: 25px 22px;
  border-right: 1px solid #303a34;
}
.facts div:last-child {
  border-right: 0;
}
.facts strong {
  display: block;
  margin-bottom: 5px;
  color: var(--green);
  font:
    800 18px Consolas,
    "Microsoft YaHei",
    sans-serif;
}
.facts span {
  color: #8f9c94;
  font-size: 11px;
}
.section {
  padding: 96px 0;
}
.section.light {
  background: var(--white);
}
.section.tinted {
  background: #e7ebe5;
}
.tinted .label,
.tinted .problem-list p,
.tinted .contribution-list p {
  color: #4e5952;
}
.section.dark {
  color: white;
  background: var(--ink);
}
.section-grid {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 48px;
}
.label {
  color: var(--muted);
  font:
    800 11px Consolas,
    "Microsoft YaHei",
    sans-serif;
}
.dark .label {
  color: #829087;
}
.dark .label b {
  color: var(--green);
}
.label b {
  color: var(--coral);
  margin-right: 9px;
}
.content h2 {
  max-width: 850px;
  margin: 0 0 28px;
  font-family: "STZhongsong", "SimSun", serif;
  font-size: 42px;
  line-height: 1.28;
}
.content > p {
  max-width: 790px;
  color: var(--muted);
  font-size: 15px;
}
.dark .content > p {
  color: #aeb9b2;
}
.problem-list,
.contribution-list {
  margin-top: 44px;
  border-top: 1px solid var(--line);
}
.problem-list article,
.contribution-list article {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 22px;
  padding: 27px 0;
  border-bottom: 1px solid var(--line);
}
.problem-list span,
.contribution-list span {
  color: var(--coral);
  font:
    800 12px Consolas,
    monospace;
}
.problem-list h3,
.contribution-list h3 {
  margin: 0 0 7px;
  font-size: 18px;
}
.problem-list p,
.contribution-list p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.architecture {
  margin: 45px 0 0;
  overflow: hidden;
  border: 1px solid var(--line);
  background: white;
}
.architecture img {
  width: 100%;
  max-height: 660px;
  object-fit: contain;
}
.architecture figcaption {
  padding: 14px 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}
.flow {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  margin-top: 44px;
  border: 1px solid #455249;
}
.flow div {
  min-height: 145px;
  padding: 22px 18px;
  border-right: 1px solid #455249;
}
.flow div:last-child {
  border-right: 0;
}
.flow span {
  color: var(--green);
  font:
    800 11px Consolas,
    monospace;
}
.flow h3 {
  margin: 15px 0 6px;
  font-size: 15px;
}
.flow p {
  margin: 0;
  color: #99a69e;
  font-size: 11px;
}
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 44px;
}
.split article {
  padding: 30px;
  border: 1px solid var(--line);
  background: var(--white);
}
.split h3 {
  margin: 0 0 12px;
  font-size: 19px;
}
.split p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.status-note {
  margin-top: 44px;
  padding: 25px 28px;
  border-left: 4px solid var(--coral);
  background: #fff7f3;
}
.status-note strong {
  display: block;
  margin-bottom: 8px;
}
.status-note p {
  margin: 0;
  color: #675c56;
  font-size: 13px;
}
.project-footer {
  color: white;
  background: #0a0f0c;
}
.project-footer .wrap {
  min-height: 170px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}
.project-footer h2 {
  margin: 0 0 7px;
  font-family: "STZhongsong", "SimSun", serif;
  font-size: 30px;
}
.project-footer p {
  margin: 0;
  color: #91a097;
  font-size: 12px;
}
.footer-links {
  display: flex;
  gap: 10px;
}
.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 10px 15px;
  border: 1px solid #536159;
  text-decoration: none;
  font-size: 12px;
  font-weight: 800;
}
.button.primary {
  color: var(--ink);
  border-color: var(--green);
  background: var(--green);
}
.dev-hero-art {
  position: absolute;
  inset: 15% -8% 8% 47%;
  padding: 28px;
  opacity: 0.84;
  transform: rotate(-2deg);
}
.dev-window {
  height: 100%;
  display: grid;
  grid-template-columns: 150px 1fr;
  border: 1px solid #54625a;
  background: #0c120e;
  box-shadow: 24px 24px 0 #d09b34;
}
.dev-side {
  padding: 24px 16px;
  border-right: 1px solid #354139;
  color: #839088;
  font-size: 11px;
}
.dev-side b {
  display: block;
  margin-bottom: 25px;
  color: var(--green);
  font:
    800 12px Consolas,
    monospace;
}
.dev-side span {
  display: block;
  padding: 10px;
}
.dev-side .active {
  color: white;
  background: #26372d;
}
.dev-main {
  padding: 36px;
  color: white;
}
.dev-main small {
  color: #7f8d84;
}
.dev-main h3 {
  margin: 10px 0 30px;
  font-size: 22px;
}
.dev-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.dev-steps span {
  padding: 12px 7px;
  border: 1px solid #405047;
  color: #8d9b92;
  font-size: 10px;
  text-align: center;
}
.dev-steps .active {
  border-color: var(--green);
  color: var(--green);
}
.code-lines {
  display: grid;
  gap: 11px;
  margin-top: 36px;
}
.code-lines i {
  height: 8px;
  background: #2b3730;
}
.code-lines i:nth-child(2) {
  width: 80%;
}
.code-lines i:nth-child(3) {
  width: 62%;
}
.code-lines i:nth-child(4) {
  width: 72%;
}
@media (max-width: 760px) {
  .wrap {
    width: min(100% - 30px, var(--max));
  }
  .topbar .wrap {
    height: 60px;
  }
  .project-hero {
    min-height: 650px;
    align-items: flex-start;
  }
  .project-hero-content {
    padding: 105px 0 60px;
  }
  .project-hero h1 {
    font-size: 40px;
  }
  .project-hero h2 {
    font-size: 22px;
  }
  .project-hero-media {
    inset: 42% -30% 0 16%;
    width: 115%;
    height: 58%;
    opacity: 0.34;
  }
  .project-hero:after {
    background: linear-gradient(
      180deg,
      #111814 0%,
      #111814 43%,
      rgba(17, 24, 20, 0.5) 76%,
      #111814 100%
    );
  }
  .facts .wrap {
    grid-template-columns: 1fr 1fr;
  }
  .facts div {
    min-height: 85px;
    padding: 17px 13px;
  }
  .facts div:nth-child(2) {
    border-right: 0;
  }
  .facts div:nth-child(-n + 2) {
    border-bottom: 1px solid #303a34;
  }
  .section {
    padding: 70px 0;
  }
  .section-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .content h2 {
    font-size: 32px;
  }
  .flow {
    grid-template-columns: 1fr;
  }
  .flow div {
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid #455249;
  }
  .flow div:last-child {
    border-bottom: 0;
  }
  .split {
    grid-template-columns: 1fr;
  }
  .problem-list article,
  .contribution-list article {
    grid-template-columns: 38px 1fr;
  }
  .project-footer .wrap {
    padding: 40px 0;
    flex-direction: column;
    align-items: flex-start;
  }
  .footer-links {
    flex-direction: column;
    width: 100%;
  }
  .footer-links .button {
    width: 100%;
  }
  .dev-hero-art {
    inset: 45% -55% 5% 8%;
    opacity: 0.42;
  }
  .dev-window {
    grid-template-columns: 80px 1fr;
  }
  .dev-side {
    padding: 15px 7px;
  }
  .dev-main {
    padding: 22px 16px;
  }
  .dev-steps {
    grid-template-columns: 1fr 1fr;
  }
}

/* Agent Workshop project reading mode */
:root { --ink:#202124; --paper:#f7f7f5; --white:#fff; --line:#d8d8d3; --muted:#6f7073; --green:#79df62; --coral:#ff7463; --yellow:#ffd75a; --blue:#55a8ff; --max:1120px; }
body { background:var(--paper); color:var(--ink); font-family:"DM Sans","Microsoft YaHei UI",sans-serif; }
body::before { content:""; position:fixed; inset:0; z-index:-1; pointer-events:none; opacity:.035; background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.topbar { color:var(--ink); border-color:rgba(32,33,36,.12); background:rgba(247,247,245,.88); }
.topbar .wrap { height:68px; }
.back { display:inline-flex; align-items:center; gap:9px; color:var(--ink); font:700 10px/9px "DM Sans",sans-serif; text-decoration:none; }
.brand-mark { display:grid; place-items:center; width:38px; height:38px; border:2px solid var(--ink); border-radius:8px; box-shadow:0 3px 0 var(--ink); font-size:11px; line-height:1; }
.project-nav { display:flex; align-items:center; gap:26px; }
.project-nav > a { color:#4e5053; text-decoration:none; font-size:12px; font-weight:700; }
.project-nav > a:hover { color:#000; }
.github { color:#4e5053; }

.project-hero { min-height:680px; align-items:center; overflow:hidden; color:var(--ink); background:#f7f7f5; }
.project-hero::after { display:none; }
.project-hero-content { padding:112px 0 72px; }
.project-hero-content::before { content:""; display:block; width:100px; height:100px; margin:0 0 18px -10px; background:url("../lab/assets/agent-object-sprite.png") no-repeat; background-size:200% 200%; filter:drop-shadow(0 13px 9px rgba(24,28,34,.24)); }
.project-aaw .project-hero-content::before { background-position:100% 0; }
.project-sec .project-hero-content::before { background-position:0 100%; }
.project-hero-media { inset:132px max(5vw,calc((100vw - var(--max))/2)) auto auto; width:min(520px,44vw); height:350px; padding:18px; border:4px solid var(--ink); border-radius:18px; background:#fff; box-shadow:12px 14px 0 rgba(32,33,36,.14),0 26px 35px rgba(32,33,36,.12); object-fit:contain; opacity:1; transform:rotate(3deg); }
.project-sec .project-hero-media { transform:rotate(-3deg); }
.project-hero-content::after { content:"DESIGN WITH EVIDENCE"; position:absolute; left:42%; top:142px; padding:8px 10px; border:2px solid var(--ink); border-radius:9px; background:var(--yellow); box-shadow:3px 4px 0 var(--ink); font-size:8px; font-weight:800; transform:rotate(-5deg); }
.project-sec .project-hero-content::after { content:"DATA FIRST"; background:#9ee879; }
.project-no { color:#5d6266; font-family:"DM Sans",sans-serif; }
.project-hero h1 { max-width:560px; margin:18px 0 12px; color:var(--ink); font-family:"Playfair Display","Microsoft YaHei",serif; font-size:58px; }
.project-hero h2 { max-width:560px; color:#2d3034; font-family:"Playfair Display","Songti SC",serif; font-size:27px; }
.project-hero p { max-width:570px; color:#626468; font-size:14px; }
.hero-tags span { border:2px solid var(--ink); border-radius:8px; background:#fff; color:var(--ink); box-shadow:2px 3px 0 rgba(32,33,36,.18); font-family:"DM Sans",sans-serif; }
.hero-tags span:nth-child(2n) { background:#eaf4ff; }.hero-tags span:nth-child(3n) { background:#eef9e8; }
.facts { border-block:1px solid var(--line); background:#fff; color:var(--ink); }
.facts div { border-color:var(--line); }
.facts strong { color:var(--ink); font-family:"DM Sans",sans-serif; }
.facts span { color:var(--muted); }
.section { padding:92px 0; }
.section.light { background:#fff; }.section.tinted { background:#eef2f6; }.section.dark { background:#23262a; }
.label { font-family:"DM Sans",sans-serif; }.label b { color:var(--coral); }
.content h2 { font-family:"Playfair Display","Songti SC",serif; font-size:40px; }
.problem-list article span,.contribution-list article span { display:grid; place-items:center; width:30px; height:30px; border:2px solid var(--ink); border-radius:7px; background:var(--yellow); box-shadow:2px 3px 0 var(--ink); color:var(--ink); font-family:"DM Sans",sans-serif; }
.architecture { padding:14px; border:3px solid var(--ink); border-radius:8px; box-shadow:9px 10px 0 rgba(32,33,36,.12); }
.architecture img { border-radius:5px; }.architecture figcaption { border:0; }
.flow { overflow:hidden; border:1px solid #535960; border-radius:8px; }
.flow span { color:#9ee879; }.flow div { border-color:#535960; }
.status-note,.split article { border-radius:8px; }
.project-footer { background:#181a1d; }
.project-footer h2 { font-family:"Playfair Display","Songti SC",serif; }
.project-footer .button { border-radius:8px; }.project-footer .button.primary { border:2px solid var(--ink); background:var(--yellow); color:var(--ink); box-shadow:3px 4px 0 #000; }

@media (max-width:900px) {
  .project-hero-media { width:45vw; opacity:.4; }
  .project-hero-content::after { display:none; }
}
@media (max-width:760px) {
  .project-nav > a:first-child { display:none; }
  .project-hero { min-height:860px; }
  .project-hero-content { padding:90px 0 390px; }
  .project-hero-content::before { width:82px; height:82px; }
  .project-hero h1 { font-size:40px; }
  .project-hero h2 { font-size:22px; }
  .project-hero-media { inset:auto 7vw 56px; width:86vw; height:300px; opacity:1; }
  .facts div:nth-child(-n + 2) { border-color:var(--line); }
  .content h2 { font-size:31px; }
}
