:root {
  --ink: #14212f;
  --muted: #5e6e7d;
  --line: #d4dde4;
  --paper: #f4f7f8;
  --white: #ffffff;
  --navy: #0b3f75;
  --blue: #1976b9;
  --cyan: #63c5df;
  --signal: #e16b38;
  --shadow: 0 14px 35px rgba(17, 47, 75, .10);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif; font-size: 15px; line-height: 1.7; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }

.site-header { height: 68px; padding: 0 max(24px, calc((100vw - 1200px) / 2)); display: flex; align-items: center; justify-content: space-between; gap: 24px; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; backdrop-filter: blur(10px); }
.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 700; font-size: 14px; }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; color: white; background: var(--navy); border-left: 4px solid var(--cyan); font-family: "IBM Plex Mono", monospace; font-size: 12px; }
.site-nav { display: flex; gap: 28px; color: #4a5d6e; font-size: 14px; }
.site-nav a:hover { color: var(--blue); }
.nav-toggle { display: none; padding: 7px 10px; color: var(--navy); background: transparent; border: 1px solid var(--line); }

.hero { background: linear-gradient(112deg, #082e58 0%, #0b4b84 58%, #126a9f 100%); color: white; padding: 72px max(24px, calc((100vw - 1200px) / 2)) 0; overflow: hidden; }
.hero-grid { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 1fr 290px; gap: 64px; align-items: start; }
.eyebrow { margin: 0 0 8px; color: var(--blue); font-family: "IBM Plex Mono", monospace; font-size: 11px; font-weight: 500; letter-spacing: .08em; }
.hero .eyebrow { color: #9ddbf0; }
h1,h2,h3,p { margin-top: 0; }
h1 { margin-bottom: 0; font-family: "Barlow Condensed", "Noto Sans SC", sans-serif; font-size: 58px; line-height: 1.04; letter-spacing: 0; }
.role { margin: 9px 0 16px; color: #d9eff8; font-size: 18px; font-weight: 600; }
.intro { max-width: 665px; margin-bottom: 28px; color: #d5e4ed; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.button { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; padding: 8px 17px; border: 1px solid transparent; border-radius: 3px; font-size: 14px; font-weight: 600; cursor: pointer; transition: transform .18s ease, background .18s ease; }
.button:hover { transform: translateY(-2px); }
.button.primary { color: #082e58; background: var(--cyan); }
.button.secondary { color: white; background: transparent; border-color: rgba(255,255,255,.56); }
.identity-card { padding: 17px; background: rgba(5, 31, 58, .34); border: 1px solid rgba(180,222,237,.35); border-top: 4px solid var(--cyan); }
.identity-card img { width: 84px; height: 112px; margin: 0 0 16px; object-fit: cover; object-position: center; border: 3px solid rgba(255,255,255,.84); }
.identity-card > div { padding: 9px 0; border-top: 1px solid rgba(211,235,246,.22); }
.identity-card span { display: block; color: #a9cddd; font-size: 12px; }
.identity-card strong { display: block; font-size: 14px; }
.metrics { max-width: 1200px; margin: 55px auto 0; display: grid; grid-template-columns: repeat(4, 1fr); }
.metrics > div { min-height: 111px; padding: 19px 20px; border-top: 1px solid rgba(221,240,248,.35); border-left: 1px solid rgba(221,240,248,.25); }
.metrics > div:last-child { border-right: 1px solid rgba(221,240,248,.25); }
.metrics dt { color: #a7cddd; font-size: 12px; }
.metrics dd { margin: 3px 0 0; font-family: "Barlow Condensed", sans-serif; font-size: 33px; font-weight: 700; line-height: 1; }
.metrics small { display: block; color: #d1e5ef; font-size: 12px; }

.section, .contact-section { max-width: 1200px; margin: 0 auto; padding: 75px 0; }
.section-heading { max-width: 750px; margin-bottom: 30px; }
.section-heading h2, .contact-section h2 { margin: 0 0 9px; color: #152e43; font-family: "Barlow Condensed", "Noto Sans SC", sans-serif; font-size: 34px; line-height: 1.15; }
.section-heading > p:last-child { margin: 0; color: var(--muted); }
.engineering-focus { border-bottom: 1px solid var(--line); }
.workflow { margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); list-style: none; border: 1px solid var(--line); background: var(--white); }
.workflow li { min-height: 190px; padding: 21px; border-right: 1px solid var(--line); }
.workflow li:last-child { border-right: 0; }
.workflow b, .process-grid > article > b { display: block; margin-bottom: 25px; color: var(--blue); font-family: "IBM Plex Mono", monospace; font-size: 13px; }
.workflow h3, .process-grid h3 { margin-bottom: 8px; font-size: 16px; }
.workflow p, .process-grid p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.65; }

.works-section { padding-bottom: 18px; }
.work-layout { display: grid; grid-template-columns: 1.28fr .72fr; gap: 20px; }
.featured-work { min-height: 494px; position: relative; overflow: hidden; background: #172c3e; }
.featured-work > img { width: 100%; height: 100%; object-fit: cover; opacity: .9; }
.work-overlay { width: 100%; padding: 25px; position: absolute; bottom: 0; color: white; background: linear-gradient(transparent, rgba(7,25,43,.94) 50%); }
.work-overlay span { color: #a7deeb; font-size: 12px; }
.work-overlay h3 { max-width: 600px; margin: 7px 0; font-size: 23px; line-height: 1.32; }
.work-overlay p { max-width: 600px; margin: 0; color: #d5e6ee; font-size: 13px; }
.work-list { display: grid; gap: 12px; }
.work-card { padding: 18px 19px; background: var(--white); border-left: 4px solid var(--blue); box-shadow: 0 2px 0 rgba(17,47,75,.03); }
.work-card > span { color: var(--signal); font-family: "IBM Plex Mono", monospace; font-size: 12px; font-weight: 500; }
.work-card h3 { margin: 3px 0 6px; font-size: 17px; }
.work-card p { min-height: 46px; margin: 0 0 7px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.detail-trigger { padding: 0; color: var(--blue); background: transparent; border: 0; border-bottom: 1px solid currentColor; cursor: pointer; font-size: 13px; }

.core-project { padding-top: 58px; }
.core-project-summary { display: grid; grid-template-columns: 42% 1fr; background: var(--white); border-top: 4px solid var(--navy); box-shadow: var(--shadow); }
.core-project-summary img { width: 100%; height: 330px; object-fit: cover; }
.core-project-summary > div { padding: 31px 34px; }
.result-label { margin-bottom: 7px; color: var(--blue); font-family: "IBM Plex Mono", monospace; font-size: 12px; }
.result-pair { display: inline-flex; flex-direction: column; margin: 0 34px 16px 0; }
.result-pair strong { color: var(--navy); font-family: "Barlow Condensed", "Noto Sans SC", sans-serif; font-size: 30px; line-height: 1; }
.result-pair span { margin-top: 4px; color: var(--muted); font-size: 12px; }
.core-project-summary > div > p:last-child { margin: 4px 0 0; color: #445563; }
details { background: var(--white); border: 1px solid var(--line); }
summary { padding: 18px 20px; display: flex; align-items: center; justify-content: space-between; gap: 20px; list-style: none; cursor: pointer; }
summary::-webkit-details-marker { display: none; }
summary span { display: grid; gap: 2px; }
summary b { font-size: 16px; }
summary small { color: var(--muted); font-size: 12px; }
summary i { min-width: 42px; color: var(--blue); font-size: 12px; font-style: normal; text-align: right; }
details[open] > summary { border-bottom: 1px solid var(--line); }
details[open] > summary i { font-size: 0; }
details[open] > summary i::after { content: "收起"; font-size: 12px; }
.project-process { margin-top: 20px; }
.process-grid { display: grid; grid-template-columns: repeat(5, 1fr); }
.process-grid > article { min-height: 193px; padding: 20px; border-right: 1px solid var(--line); }
.process-grid > article:last-child { border-right: 0; }
.process-grid > article > b { margin-bottom: 18px; }

.viewer-section { padding-top: 56px; }
.viewer-shell { min-height: 390px; overflow: hidden; background: #0c2235; border: 1px solid #1c3b53; }
.viewer-poster { min-height: 390px; display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; color: white; }
.viewer-poster img { width: 100%; height: 390px; object-fit: cover; opacity: .64; }
.viewer-poster > div { padding: 35px; }
.viewer-poster h3 { margin-bottom: 8px; font-size: 24px; }
.viewer-poster p { color: #bed2df; }
.viewer-shell iframe { display: block; width: 100%; min-height: 520px; border: 0; background: white; }
.viewer-fallback { display: block; padding: 11px 17px; color: #c8eaf3; border-top: 1px solid rgba(150,210,232,.28); font-size: 13px; }

.experience-section { padding-bottom: 56px; }
.detail-stack { display: grid; gap: 13px; }
.detail-content { padding: 4px 20px 18px; }
.detail-content p { margin: 10px 0; color: #41525f; }
.detail-content strong { color: var(--navy); }
.skills-section { padding-top: 57px; }
.skill-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.skill-grid article { padding: 21px; background: #e7f1f5; border-top: 3px solid var(--cyan); }
.skill-grid article:nth-child(2) { background: #ebf0f5; border-color: var(--blue); }
.skill-grid article:nth-child(3) { background: #eef4f4; border-color: #4b9a91; }
.skill-grid h3 { margin-bottom: 8px; color: var(--navy); font-size: 16px; }
.skill-grid p { margin: 0; color: #42596a; font-size: 13px; line-height: 1.7; }

.contact-section { padding-top: 68px; padding-bottom: 78px; display: grid; grid-template-columns: .75fr 1.25fr; gap: 50px; }
.contact-section > div > p:last-child { color: var(--muted); }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.contact-grid > * { min-height: 93px; padding: 16px; display: flex; flex-direction: column; justify-content: center; background: var(--white); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.contact-grid a:hover, .wechat-trigger:hover { background: #eff8fb; }
.contact-grid span { color: var(--muted); font-size: 12px; }
.contact-grid strong { color: var(--navy); font-size: 15px; overflow-wrap: anywhere; }
.wechat-trigger { color: inherit; text-align: left; border-top: 0; border-left: 0; cursor: pointer; }
.wechat-card { grid-column: 2; padding: 15px; display: flex; align-items: center; gap: 15px; background: #e7f6f1; border: 1px solid #a8d6c8; }
.wechat-card[hidden] { display: none; }
.wechat-card img { width: 104px; height: 104px; object-fit: contain; background: white; }
.wechat-card p { margin: 0; color: #315c51; font-size: 13px; line-height: 1.65; }
footer { padding: 24px max(24px, calc((100vw - 1200px) / 2)); display: flex; justify-content: space-between; gap: 15px; color: #b5d3e0; background: #082d51; font-size: 12px; }

@media (max-width: 1248px) { .section, .contact-section { margin-right: 24px; margin-left: 24px; } }
@media (max-width: 780px) {
  body { font-size: 14px; }
  .site-header { height: 59px; padding: 0 16px; }
  .site-nav { width: 100%; padding: 11px 16px; display: none; position: absolute; top: 59px; left: 0; flex-direction: column; gap: 12px; background: white; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
  .site-nav.open { display: flex; }
  .nav-toggle { display: inline-block; }
  .hero { padding: 45px 18px 0; }
  .hero-grid { grid-template-columns: 1fr; gap: 28px; }
  h1 { font-size: 46px; }
  .identity-card { display: grid; grid-template-columns: 84px 1fr; column-gap: 15px; }
  .identity-card img { grid-row: span 3; margin: 0; }
  .identity-card > div { padding: 5px 0; }
  .metrics { margin-top: 36px; grid-template-columns: 1fr 1fr; }
  .metrics > div:nth-child(3) { border-left: 0; }
  .metrics > div:nth-child(2) { border-right: 1px solid rgba(221,240,248,.25); }
  .metrics > div:last-child { border-right: 1px solid rgba(221,240,248,.25); }
  .section, .contact-section { margin: 0 18px; padding: 48px 0; }
  .section-heading h2, .contact-section h2 { font-size: 29px; }
  .workflow, .process-grid, .skill-grid { grid-template-columns: 1fr; }
  .workflow li, .process-grid > article { min-height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .workflow li:last-child, .process-grid > article:last-child { border-bottom: 0; }
  .workflow b { margin-bottom: 12px; }
  .work-layout, .core-project-summary, .viewer-poster, .contact-section { grid-template-columns: 1fr; }
  .featured-work { min-height: 400px; }
  .core-project-summary img { height: 230px; }
  .core-project-summary > div { padding: 24px 20px; }
  .viewer-shell, .viewer-poster, .viewer-poster img { min-height: 315px; height: auto; }
  .viewer-poster img { height: 222px; }
  .viewer-poster > div { padding: 25px 20px; }
  .viewer-shell iframe { min-height: 420px; }
  .contact-section { gap: 20px; }
  .contact-grid { grid-template-columns: 1fr; }
  .wechat-card { grid-column: auto; }
  footer { padding: 20px 18px; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; } }
