﻿:root {
  --bg: #f4f1ea;
  --paper: #fffdf8;
  --ink: #15130f;
  --muted: #5f5a52;
  --soft: #9b9387;
  --line: #d8d1c4;
  --blue: #2348e0;
  --green: #1f7a54;
  --clay: #9a4f2f;
  --max: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background:
    linear-gradient(90deg, rgba(21,19,15,.035) 1px, transparent 1px) 0 0 / 80px 80px,
    var(--bg);
  color: var(--ink);
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { color: inherit; font: inherit; }

.nav {
  position: sticky;
  top: 0;
  z-index: 30;
  max-width: var(--max);
  height: 68px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(244,241,234,.9);
  backdrop-filter: blur(14px);
}
.brand { display: flex; align-items: baseline; gap: 12px; }
.brand span { font-size: 17px; font-weight: 800; }
.brand small, .section-kicker, .hero-label, .hero-title p, .work-feature span, .work-feature em, .work-list span, .work-list em, .layer-nav, .contact-panel small, .detail-grid span {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.brand small { color: var(--soft); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.nav-links { display: flex; align-items: center; gap: 8px; }
.nav-links a { padding: 8px 10px; color: var(--muted); font-size: 14px; }
.nav-links a:hover { color: var(--blue); }
.nav-cta { border: 1px solid var(--line); border-radius: 999px; background: var(--paper); }

.hero, .section {
  max-width: var(--max);
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}
.hero {
  min-height: calc(100vh - 68px);
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr) minmax(320px, 430px);
  grid-template-rows: 1fr auto;
  gap: 24px;
  align-items: end;
  padding-top: 64px;
  padding-bottom: 42px;
}
.hero-label {
  align-self: start;
  color: var(--soft);
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
}
.hero-title p, .section-kicker {
  margin: 0;
  color: var(--blue);
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.hero h1 {
  margin: 18px 0 0;
  font-size: clamp(86px, 13vw, 176px);
  line-height: .82;
  letter-spacing: 0;
}
.hero-card {
  border: 1px solid var(--ink);
  background: var(--paper);
  padding: 28px;
  box-shadow: 14px 14px 0 var(--ink);
}
.status {
  display: inline-flex;
  margin: 0 0 18px;
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
}
.hero-card h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.16;
}
.hero-card p:not(.status) {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.8;
}
.hero-actions, .pdf-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.btn {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  padding: 0 18px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}
.btn:hover { background: #f0ede4; }
.btn.primary { background: var(--ink); color: var(--bg); }
.btn.small { min-height: 36px; padding: 0 14px; font-size: 13px; }
.proof-strip {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255,253,248,.45);
}
.proof-strip div { padding: 20px 24px; border-left: 1px solid var(--line); }
.proof-strip div:first-child { border-left: 0; }
.proof-strip span { color: var(--blue); font-weight: 800; }
.proof-strip strong { display: block; margin-top: 8px; font-size: 16px; }
.proof-strip p { margin: 8px 0 0; color: var(--muted); line-height: 1.65; font-size: 14px; }

.section { padding-top: 82px; padding-bottom: 82px; border-top: 1px solid var(--line); }
.section-title-row, .fit-grid, .contact {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(320px, 1.05fr);
  gap: 28px;
  align-items: start;
}
.section-title-row h2, .fit-grid h2, .contact h2 {
  max-width: 760px;
  margin: 12px 0 0;
  font-size: clamp(28px, 4.1vw, 50px);
  line-height: 1.12;
  text-wrap: balance;
}
.section-title-row p, .contact-copy p {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.8;
}
.work-board {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(320px, .88fr);
  gap: 14px;
  margin-top: 34px;
}
.work-feature, .work-list button {
  text-align: left;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.work-feature:hover, .work-list button:hover { transform: translateY(-3px); border-color: var(--ink); }
.work-feature {
  min-height: 440px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--ink);
  border-radius: 8px;
  background: var(--ink);
  color: var(--bg);
  padding: 30px;
}
.work-feature span, .work-feature em { color: #8fa2ff; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; font-style: normal; }
.work-feature h3 { max-width: 720px; margin: auto 0 0; font-size: clamp(30px, 4.6vw, 54px); line-height: 1.12; text-wrap: balance; }
.work-feature p { max-width: 620px; margin: 18px 0 0; color: rgba(244,241,234,.72); font-size: 16px; line-height: 1.75; }
.work-feature em { margin-top: 24px; }
.work-list { display: grid; gap: 14px; }
.work-list button {
  min-height: 137px;
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 18px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  padding: 22px;
}
.work-list span { color: var(--blue); font-size: 13px; font-weight: 800; }
.work-list h3 { margin: 0; font-size: 22px; line-height: 1.25; text-wrap: balance; }
.work-list p { margin: 8px 0 0; color: var(--muted); line-height: 1.6; }
.work-list em { color: var(--soft); font-size: 12px; font-style: normal; text-transform: uppercase; }

.fit-items { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.fit-items article { min-height: 160px; background: var(--paper); padding: 22px; }
.fit-items span { color: var(--clay); font-weight: 800; }
.fit-items p { margin: 14px 0 0; color: var(--muted); line-height: 1.7; }

.contact-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.contact-panel a, .contact-panel button {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  padding: 18px;
  text-align: left;
  cursor: pointer;
}
.contact-panel small { color: var(--soft); letter-spacing: .08em; text-transform: uppercase; }
.contact-panel strong { word-break: break-all; }
.resume-card { grid-column: 1 / -1; }

.layer { position: fixed; inset: 0; z-index: 80; display: none; background: var(--bg); }
.layer.is-open { display: block; }
.layer-scroll { height: 100%; overflow: auto; }
.layer-nav {
  position: sticky;
  top: 0;
  z-index: 4;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(244,241,234,.92);
  padding: 0 max(24px, calc((100vw - 980px) / 2 + 24px));
  backdrop-filter: blur(14px);
  color: var(--soft);
  font-size: 12px;
}
.layer-nav button, .layer-nav a {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  padding: 8px 14px;
  cursor: pointer;
}
.layer-body { max-width: 980px; margin: 0 auto; padding: 52px 24px 92px; }
.detail-hero { border-bottom: 1px solid var(--line); padding-bottom: 34px; }
.detail h2 {
  max-width: 820px;
  margin: 16px 0 0;
  font-size: clamp(34px, 5vw, 60px);
  line-height: 1.14;
  font-weight: 840;
  text-wrap: balance;
}
.detail h2 span { display: block; }
.detail h2 .title-en { font-size: .92em; line-height: 1.02; }
.detail h2 .title-cn { line-height: 1.12; }
.detail h2 .title-sub { margin-top: 6px; line-height: 1.14; color: var(--ink); }
.detail-hero p:last-child { max-width: 760px; margin: 22px 0 0; color: var(--muted); font-size: 17px; line-height: 1.8; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin-top: 24px; background: var(--line); border: 1px solid var(--line); }
.detail-grid.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.detail-grid section { background: var(--paper); padding: 24px; }
.detail-grid span { display: block; color: var(--blue); font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.detail-grid p { margin: 14px 0 0; color: var(--muted); line-height: 1.75; }
.pdf-card {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  padding: 22px;
}
.pdf-card h3 { margin: 0; font-size: 19px; }
.pdf-card p { max-width: 680px; margin: 8px 0 0; color: var(--muted); line-height: 1.7; }
.pdf-slot { margin-top: 16px; }
.pdf-slot iframe { display: block; width: 100%; height: min(76vh, 820px); min-height: 520px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  z-index: 100;
  transform: translateX(-50%) translateY(10px);
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  padding: 10px 14px;
  opacity: 0;
  pointer-events: none;
  transition: .18s ease;
}
.toast.is-show { opacity: 1; transform: translateX(-50%); }

@media (max-width: 920px) {
  .hero { grid-template-columns: 1fr; grid-template-rows: auto; min-height: auto; padding-top: 52px; }
  .hero-label { writing-mode: initial; }
  .hero-card { box-shadow: 8px 8px 0 var(--ink); }
  .proof-strip, .section-title-row, .fit-grid, .contact, .work-board, .fit-items, .detail-grid, .detail-grid.compact { grid-template-columns: 1fr; }
  .proof-strip div { border-left: 0; border-top: 1px solid var(--line); }
  .proof-strip div:first-child { border-top: 0; }
  .work-feature { min-height: 360px; }
}

@media (max-width: 620px) {
  .nav { padding: 0 16px; }
  .brand small, .nav-links a:not(.nav-cta), .layer-nav span { display: none; }
  .hero, .section { padding-left: 16px; padding-right: 16px; }
  .hero-card { padding: 22px; }
  .work-list button { grid-template-columns: 36px 1fr; }
  .work-list em { grid-column: 2; }
  .contact-panel { grid-template-columns: 1fr; }
  .pdf-slot iframe { height: 70vh; min-height: 420px; }
}
.missing-pdf {
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: rgba(255,253,248,.7);
  color: var(--muted);
  padding: 18px;
  line-height: 1.7;
}
.preview-meta {
  margin-top: 10px;
  color: var(--soft);
  font-size: 13px;
  line-height: 1.6;
}

.preview-slot {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.preview-slot[hidden] {
  display: none;
}

.preview-collapse-row {
  position: sticky;
  bottom: 14px;
  display: flex;
  justify-content: center;
  padding: 8px 0 0;
}

.preview-collapse-row .btn {
  background: var(--ink);
  color: var(--bg);
  box-shadow: 0 8px 24px rgba(21, 19, 15, .16);
}

.preview-page {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.preview-page img {
  display: block;
  width: 100%;
  height: auto;
  background: #fff;
}

.preview-page figcaption {
  border-top: 1px solid var(--line);
  background: var(--paper);
  color: var(--soft);
  padding: 8px 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  text-align: right;
}

.preview-card.is-loaded .pdf-actions [data-load-preview] {
  background: var(--ink);
  color: var(--bg);
}

.preview-card.is-collapsed .pdf-actions [data-load-preview] {
  background: var(--paper);
  color: var(--ink);
}


