:root {
  --ink: #111814;
  --ink-soft: #202b25;
  --paper: #f4f3ee;
  --white: #fffefa;
  --line: #cfd3cb;
  --muted: #667069;
  --green: #59e69a;
  --green-deep: #245f4d;
  --coral: #b63d2d;
  --red: #b92820;
  --blue: #345f78;
  --amber: #d5a13a;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: "Microsoft YaHei UI", "Microsoft YaHei", sans-serif; line-height: 1.7; }
body.menu-open { overflow: hidden; }
a { color: inherit; }
img { display: block; max-width: 100%; }
button, a { -webkit-tap-highlight-color: transparent; }
.wrap { width: min(var(--max), calc(100% - 48px)); margin: 0 auto; }
.skip-link { position: fixed; left: 16px; top: -60px; z-index: 200; background: var(--green); color: var(--ink); padding: 10px 14px; }
.skip-link:focus { top: 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.site-header { position: fixed; inset: 0 0 auto; z-index: 100; color: white; border-bottom: 1px solid rgba(255,255,255,.17); background: rgba(17,24,20,.84); backdrop-filter: blur(14px); }
.nav { height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 800; text-decoration: none; font-size: 16px; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--green); color: var(--green); font: 800 12px Consolas, monospace; }
.nav-links { display: flex; align-items: center; gap: 30px; margin-left: auto; }
.nav-links a, .nav-github { color: #ccd5cf; text-decoration: none; font-size: 13px; }
.nav-links a:hover, .nav-github:hover { color: var(--green); }
.nav-github { padding-left: 22px; border-left: 1px solid rgba(255,255,255,.18); }
.menu-button, .mobile-nav { display: none; }

.hero { position: relative; min-height: 860px; display: flex; flex-direction: column; justify-content: center; overflow: hidden; background: #111814; color: white; }
.hero:after { content: ""; position: absolute; inset: auto 0 0; height: 20%; background-image: linear-gradient(rgba(89,230,154,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(89,230,154,.07) 1px, transparent 1px); background-size: 46px 46px; mask-image: linear-gradient(transparent, #000); }
.hero-media { position: absolute; inset: 0 0 0 46%; overflow: hidden; opacity: .76; }
.hero-shot { position: absolute; object-fit: cover; border: 1px solid rgba(255,255,255,.2); box-shadow: 0 30px 90px rgba(0,0,0,.5); }
.hero-shot-main { width: 1120px; height: 560px; left: 3%; top: 19%; object-position: left top; transform: rotate(-2deg); }
.hero-shot-side { width: 540px; height: 304px; right: -7%; bottom: 5%; object-fit: cover; transform: rotate(4deg); }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(90deg, #111814 0%, #111814 39%, rgba(17,24,20,.94) 52%, rgba(17,24,20,.28) 78%, rgba(17,24,20,.45) 100%), linear-gradient(0deg, #111814 0%, transparent 34%); }
.hero-content { position: relative; z-index: 2; padding-top: 74px; }
.eyebrow { margin: 0 0 22px; color: var(--green); font: 800 12px Consolas, monospace; }
.hero h1 { margin: 0; font-family: "STZhongsong", "SimSun", serif; font-size: 82px; line-height: 1; font-weight: 900; letter-spacing: 0; }
.hero-title { margin: 18px 0 22px; font-size: 22px; font-weight: 700; }
.hero-intro { max-width: 660px; margin: 0; color: #c9d2cc; font-size: 17px; line-height: 1.9; }
.hero-actions, .contact-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 31px; }
.button { min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 14px; padding: 11px 18px; border: 1px solid currentColor; text-decoration: none; font-size: 14px; font-weight: 800; transition: transform .2s ease, background .2s ease, color .2s ease; }
.button:hover { transform: translateY(-2px); }
.button-primary { border-color: var(--green); background: var(--green); color: var(--ink); }
.button-quiet { color: white; border-color: rgba(255,255,255,.42); }
.button-quiet:hover { border-color: white; }
.hero-facts { position: absolute; z-index: 3; bottom: 0; left: 50%; transform: translateX(-50%); display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid rgba(255,255,255,.22); }
.hero-facts div { min-height: 112px; padding: 23px 24px; border-right: 1px solid rgba(255,255,255,.17); display: flex; flex-direction: column; justify-content: center; }
.hero-facts div:last-child { border-right: 0; }
.hero-facts strong { font: 800 25px Consolas, monospace; color: var(--green); }
.hero-facts span { color: #aeb9b2; font-size: 12px; }

.section { padding: 112px 0; }
.section-label { align-self: start; display: flex; align-items: center; gap: 10px; color: var(--muted); font: 800 12px Consolas, "Microsoft YaHei", sans-serif; }
.section-label span { color: var(--coral); }
.about { background: var(--white); }
.about-grid { display: grid; grid-template-columns: 170px 1.15fr .85fr; gap: 50px; align-items: start; }
.about h2, .section-heading h2, .capability-content h2, .contact h2 { margin: 0; font-family: "STZhongsong", "SimSun", serif; font-size: 46px; line-height: 1.25; letter-spacing: 0; }
.about-copy { color: #4f5a53; font-size: 15px; }
.about-copy p { margin: 0 0 18px; }
.principles { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 82px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.principles article { min-height: 220px; padding: 30px 34px 34px 0; border-right: 1px solid var(--line); }
.principles article + article { padding-left: 34px; }
.principles article:last-child { border-right: 0; }
.principles span { font: 800 11px Consolas, monospace; color: var(--coral); }
.principles h3 { margin: 28px 0 10px; font-size: 19px; }
.principles p { margin: 0; color: var(--muted); font-size: 13px; }

.projects { background: #e9ece6; }
.projects .section-label { color: #535d56; }
.projects .section-heading p { color: #535d56; }
.section-heading { display: grid; grid-template-columns: 170px 1fr; gap: 50px; align-items: start; margin-bottom: 54px; }
.section-heading > div:last-child { max-width: 760px; }
.section-heading p { max-width: 660px; margin: 18px 0 0; color: var(--muted); font-size: 14px; }
.project-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.project-card { display: grid; grid-template-rows: auto 1fr; overflow: hidden; border: 1px solid #c7ccc4; border-radius: 6px; background: var(--white); }
.project-card-wide { grid-column: 1 / -1; grid-template-columns: 1.15fr .85fr; grid-template-rows: none; min-height: 510px; }
.project-visual { position: relative; display: block; min-height: 302px; overflow: hidden; background: var(--ink); }
.project-visual img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.project-visual:hover img { transform: scale(1.02); }
.ops-visual { min-height: 510px; background: #171d19; }
.ops-visual img { object-position: 46% center; }
.visual-tag { position: absolute; left: 18px; bottom: 18px; padding: 7px 10px; background: var(--green); color: var(--ink); font: 800 10px Consolas, monospace; }
.aaw-visual { background: #fff; }
.aaw-visual img { object-fit: cover; object-position: center; }
.sec-visual { background: #f9fbfa; }
.sec-visual img { object-fit: contain; padding: 24px; }
.project-copy { display: flex; flex-direction: column; padding: 30px; }
.project-card-wide .project-copy { justify-content: center; padding: 54px; }
.project-meta { display: flex; justify-content: space-between; color: var(--muted); font: 800 10px Consolas, "Microsoft YaHei", sans-serif; }
.project-meta span:first-child { color: var(--coral); }
.project-copy h3 { margin: 22px 0 8px; font-family: Georgia, "Microsoft YaHei", serif; font-size: 29px; line-height: 1.2; letter-spacing: 0; }
.project-position { margin: 0 0 16px; color: var(--ink); font-size: 15px; font-weight: 800; }
.project-copy > p:not(.project-position) { margin: 0; color: var(--muted); font-size: 13px; }
.project-links { display: flex; gap: 22px; margin-top: auto; padding-top: 28px; }
.project-links a { font-size: 12px; font-weight: 800; text-decoration: none; border-bottom: 1px solid var(--ink); }
.project-links a:hover { color: var(--green-deep); border-color: var(--green-deep); }
.dev-visual { background: #17211b; padding: 26px; }
.workbench-preview { height: 100%; min-height: 250px; display: grid; grid-template-columns: 108px 1fr; overflow: hidden; border: 1px solid #3d4b42; color: #e9f1ec; background: #101713; box-shadow: 14px 14px 0 var(--amber); }
.wb-side { display: flex; flex-direction: column; gap: 8px; padding: 18px 10px; border-right: 1px solid #36433b; color: #89958d; font-size: 10px; }
.wb-side b { color: var(--green); font: 800 9px Consolas, monospace; margin-bottom: 17px; }
.wb-side span { padding: 8px; }
.wb-side .active { background: #26372d; color: white; }
.wb-main { padding: 29px 26px; }
.wb-main small { display: block; color: #7f8e85; font-size: 10px; }
.wb-main strong { display: block; margin-top: 11px; font-size: 16px; }
.wb-flow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin: 28px 0; }
.wb-flow i { padding: 9px 4px; border: 1px solid #405047; color: #95a29a; text-align: center; font: normal 9px "Microsoft YaHei", sans-serif; }
.wb-flow .running { border-color: var(--green); color: var(--green); }
.wb-lines { display: grid; gap: 9px; }
.wb-lines span { height: 7px; background: #2c3831; }
.wb-lines span:nth-child(2) { width: 78%; }.wb-lines span:nth-child(3) { width: 57%; }

.experience { background: var(--white); }
.timeline { border-top: 1px solid var(--line); }
.timeline-row { display: grid; grid-template-columns: 170px 1fr; gap: 50px; padding: 40px 0; border-bottom: 1px solid var(--line); }
.timeline-row time { color: var(--coral); font: 800 12px/1.6 Consolas, monospace; }
.timeline-kicker { margin: 0 0 7px; color: var(--muted); font-size: 12px; }
.timeline-row h3 { margin: 0 0 13px; font-size: 20px; }
.timeline-row div > p:last-child { max-width: 820px; margin: 0; color: var(--muted); font-size: 14px; }

.capabilities { background: #d9dfd8; }
.capabilities .section-label { color: #4e5952; }
.capabilities .section-label span { color: #993426; }
.capability-grid { display: grid; grid-template-columns: 170px 1fr; gap: 50px; }
.capability-list { display: grid; grid-template-columns: 1fr 1fr; margin-top: 52px; border-top: 1px solid #afb8ae; }
.capability-list div { padding: 30px 34px 30px 0; border-bottom: 1px solid #afb8ae; }
.capability-list div:nth-child(odd) { border-right: 1px solid #afb8ae; }
.capability-list div:nth-child(even) { padding-left: 34px; }
.capability-list h3 { margin: 0 0 12px; font-size: 17px; }
.capability-list p { margin: 0; color: #536058; font-size: 13px; }

.contact { background: var(--ink); color: white; }
.contact-inner { max-width: var(--max); }
.contact h2 { max-width: 900px; font-size: 54px; }
.contact-inner > p:not(.eyebrow) { max-width: 670px; color: #aeb9b2; }
.footer { background: #0b100d; color: #7f8c84; font-size: 11px; }
.footer .wrap { min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 22px; }
.footer a { color: #b9c5bd; text-decoration: none; }

.reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .project-visual img, .button { transition: none; } }

@media (max-width: 980px) {
  .hero { min-height: 800px; }
  .hero h1 { font-size: 66px; }
  .hero-media { inset-left: 34%; opacity: .52; }
  .hero-shade { background: linear-gradient(90deg, #111814 0%, rgba(17,24,20,.98) 48%, rgba(17,24,20,.52) 100%), linear-gradient(0deg, #111814 0%, transparent 42%); }
  .about-grid { grid-template-columns: 130px 1fr; }
  .about-copy { grid-column: 2; }
  .section-heading, .capability-grid, .timeline-row { grid-template-columns: 130px 1fr; gap: 34px; }
  .project-card-wide { grid-template-columns: 1fr; }
  .ops-visual { min-height: 420px; }
  .project-card-wide .project-copy { padding: 36px; }
}

@media (max-width: 720px) {
  .wrap { width: min(100% - 30px, var(--max)); }
  .nav { height: 64px; }
  .nav-links, .nav-github { display: none; }
  .menu-button { width: 40px; height: 40px; display: grid; place-content: center; gap: 6px; border: 0; color: white; background: transparent; }
  .menu-button span { display: block; width: 22px; height: 1px; background: currentColor; transition: transform .2s ease; }
  .menu-button[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
  .menu-button[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }
  .mobile-nav { position: fixed; inset: 64px 0 auto; display: none; flex-direction: column; padding: 22px 15px 28px; background: #111814; border-bottom: 1px solid #39463f; }
  .mobile-nav.open { display: flex; }
  .mobile-nav a { padding: 14px 4px; color: white; text-decoration: none; border-bottom: 1px solid #2a352f; }
  .hero { min-height: 830px; justify-content: flex-start; padding-top: 156px; }
  .hero-media { inset: auto -45% 80px 3%; height: 380px; opacity: .4; }
  .hero-shot-main { width: 760px; height: 360px; left: 0; top: 18px; }
  .hero-shot-side { display: none; }
  .hero-shade { background: linear-gradient(180deg, #111814 0%, #111814 45%, rgba(17,24,20,.58) 73%, #111814 100%); }
  .hero-content { padding-top: 0; }
  .hero h1 { font-size: 50px; }
  .hero-title { font-size: 18px; }
  .hero-intro { font-size: 14px; line-height: 1.8; }
  .hero-facts { grid-template-columns: 1fr 1fr; }
  .hero-facts div { min-height: 76px; padding: 12px 14px; }
  .hero-facts div:nth-child(2) { border-right: 0; }
  .hero-facts div:nth-child(-n+2) { border-bottom: 1px solid rgba(255,255,255,.17); }
  .hero-facts strong { font-size: 18px; }
  .hero-facts span { font-size: 10px; }
  .section { padding: 76px 0; }
  .about-grid, .section-heading, .capability-grid, .timeline-row { grid-template-columns: 1fr; gap: 24px; }
  .about-copy { grid-column: auto; }
  .about h2, .section-heading h2, .capability-content h2 { font-size: 34px; }
  .principles, .project-grid, .capability-list { grid-template-columns: 1fr; }
  .principles { margin-top: 48px; }
  .principles article, .principles article + article { min-height: 0; padding: 25px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .principles article:last-child { border-bottom: 0; }
  .principles h3 { margin-top: 13px; }
  .project-card-wide { grid-column: auto; min-height: 0; }
  .project-card-wide { grid-template-rows: 260px auto; }
  .project-visual, .ops-visual { min-height: 260px; height: 260px; }
  .ops-visual img { object-position: 46% center; }
  .project-copy, .project-card-wide .project-copy { padding: 25px; }
  .project-copy h3 { font-size: 24px; overflow-wrap: anywhere; }
  .project-links { flex-direction: column; align-items: flex-start; gap: 12px; }
  .workbench-preview { grid-template-columns: 77px 1fr; min-height: 210px; }
  .wb-flow { grid-template-columns: 1fr 1fr; }
  .timeline-row time br { display: none; }
  .capability-list div, .capability-list div:nth-child(even) { padding: 25px 0; border-right: 0; }
  .contact h2 { font-size: 38px; }
  .contact-actions .button { width: 100%; }
  .footer .wrap { flex-direction: column; align-items: flex-start; justify-content: center; padding: 20px 0; }
}
