/* ============================================================
   LI HE PING · resume — DeepSeek Harness inspired design system
   Tokens mirror deepseek.com/harness: brand #4d6bfe, dark #0f0f0f,
   paper #f9f8f8, DM Sans + Montserrat + Fragment Mono + Noto Sans SC
   ============================================================ */

:root {
  --bg: #f8f7f5;
  --bg-soft: #f2f1ef;
  --surface: #ffffff;
  --ink: #202124;
  --ink-2: rgba(32, 33, 36, .74);
  --ink-3: rgba(32, 33, 36, .56);
  --ink-4: rgba(32, 33, 36, .38);
  --line: rgba(32, 33, 36, .12);
  --line-strong: rgba(32, 33, 36, .22);

  --brand: #4d6bfe;
  --brand-deep: #3a5bd9;
  --brand-soft: rgba(77, 107, 254, .09);
  --brand-line: rgba(77, 107, 254, .3);
  --violet: #7c5cff;
  --green: #1fbe7d;

  --dark: #0b0d12;
  --dark-2: #12151d;
  --dark-3: rgba(255, 255, 255, .06);
  --dark-line: rgba(255, 255, 255, .13);
  --white: #fff;

  --radius-xl: 26px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 9px;
  --radius-pill: 999px;

  --shadow-card: 0 1px 2px rgba(0, 0, 0, .03), 0 10px 26px rgba(16, 24, 40, .06);
  --shadow-pop: 0 2px 6px rgba(0, 0, 0, .05), 0 18px 44px rgba(16, 24, 40, .12);

  --font-ui: "DM Sans", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-disp: "Montserrat", "Noto Sans SC", "PingFang SC", system-ui, sans-serif;
  --font-mono: "Fragment Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Noto Sans SC", monospace;

  --container: 1140px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 15.5px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p { margin-top: 0; }
ul { margin: 0; padding: 0; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: rgba(77, 107, 254, .18); }
section[id] { scroll-margin-top: 84px; }

.container { width: min(var(--container), 100% - 48px); margin-inline: auto; }

/* reveal on scroll ------------------------------------------------ */
/* content stays visible without JS; hidden + animated only once harness.js adds .js */
html.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s ease, transform .8s cubic-bezier(.2, .7, .2, 1); }
html.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.js .reveal, html.js .reveal.in { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* header ----------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(248, 247, 245, .78);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, box-shadow .3s ease;
}
.site-header.is-stuck { border-bottom-color: var(--line); box-shadow: 0 6px 24px rgba(16, 24, 40, .05); }
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 68px;
}
.brand { display: inline-flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(140deg, #5a7bff, #4d6bfe 45%, #7c5cff);
  box-shadow: 0 6px 16px rgba(77, 107, 254, .35), inset 0 1px 0 rgba(255, 255, 255, .35);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .02em;
  color: #fff;
}
.brand-text { display: flex; flex-direction: column; gap: 1px; line-height: 1.25; min-width: 0; }
.brand-text b { font-family: var(--font-mono); font-size: 12px; font-weight: 400; letter-spacing: .09em; white-space: nowrap; }
.brand-text span { font-family: var(--font-mono); font-size: 8.5px; letter-spacing: .14em; color: var(--ink-3); white-space: nowrap; }
.site-nav { display: flex; align-items: center; gap: 6px; }
.site-nav a {
  position: relative;
  padding: 7px 12px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
  transition: color .2s ease, background .2s ease;
}
.site-nav a:hover { color: var(--ink); background: rgba(32, 33, 36, .05); }
.header-right { display: flex; align-items: center; gap: 14px; }
.language-toggle { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; height: 34px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-pill); font-size: 12px; white-space: nowrap; color: var(--ink-3); }
.language-toggle:hover { background: var(--surface); border-color: var(--brand); }
.language-toggle:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
html[lang="zh-CN"] .language-toggle [lang="zh-CN"], html[lang="en"] .language-toggle [lang="en"] { color: var(--brand); font-weight: 700; }
html[lang="en"] .hero h1 { font-size: clamp(38px, 5.8vw, 66px); line-height: 1.12; }
html[lang="en"] .metric b em { font-size: 14px; }

/* buttons & chips --------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: 42px;
  padding: 0 20px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-size: 14.5px;
  font-weight: 600;
  white-space: nowrap;
  transition: transform .18s ease, box-shadow .25s ease, background .2s ease, border-color .2s ease, color .2s ease;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn svg, .btn .arr { font-size: 13px; line-height: 1; }
.btn-dark { background: #141519; color: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2), 0 8px 20px rgba(20, 21, 25, .18); }
.btn-dark:hover { background: #000; transform: translateY(-1px); box-shadow: 0 14px 28px rgba(20, 21, 25, .26); }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--ink); background: var(--surface); transform: translateY(-1px); box-shadow: 0 10px 22px rgba(16, 24, 40, .08); }
.btn-white { background: #fff; color: #0c0e13; box-shadow: 0 2px 4px rgba(0,0,0,.2), 0 12px 30px rgba(77, 107, 254, .22); }
.btn-white:hover { background: #eef1ff; transform: translateY(-1px); box-shadow: 0 16px 34px rgba(77, 107, 254, .3); }
.btn-glass { background: rgba(255, 255, 255, .08); color: #fff; border-color: rgba(255, 255, 255, .22); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.btn-glass:hover { background: rgba(255, 255, 255, .15); border-color: rgba(255, 255, 255, .38); transform: translateY(-1px); }
.btn-sm { height: 34px; padding: 0 15px; font-size: 13.5px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 28px;
  padding: 0 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .06em;
  color: var(--ink-2);
  white-space: nowrap;
}
.chip .dot, .dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex: 0 0 auto;
}
.dot-green { background: #1fbe7d; box-shadow: 0 0 0 4px rgba(31, 190, 125, .14); animation: pulse 2.4s ease infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 4px rgba(31, 190, 125, .14); } 50% { box-shadow: 0 0 0 7px rgba(31, 190, 125, .07); } }
.chip-tag { background: transparent; border-color: var(--line); color: var(--ink-3); letter-spacing: .04em; height: 26px; }
.chip-tag:hover { color: var(--brand-deep); border-color: var(--brand-line); }
.kicker, .mono { font-family: var(--font-mono); letter-spacing: .1em; }

/* ================= HERO (dark canvas) ================== */
.hero {
  position: relative;
  color: #fff;
  overflow: hidden;
  background:
    radial-gradient(1100px 620px at 84% -12%, rgba(77, 107, 254, .5), transparent 62%),
    radial-gradient(760px 560px at -8% 30%, rgba(124, 92, 255, .24), transparent 60%),
    radial-gradient(560px 420px at 55% 118%, rgba(77, 107, 254, .22), transparent 65%),
    linear-gradient(180deg, #0d1017 0%, #0a0c11 100%);
}
.hero::before { /* dot matrix, fading down */
  content: "";
  position: absolute;
  inset: 0;
  opacity: .55;
  pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, .16) 1px, transparent 1.4px);
  background-size: 26px 26px;
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,.9), transparent 82%);
  mask-image: linear-gradient(180deg, rgba(0,0,0,.9), transparent 82%);
}
.hero-orbs { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.hero-orbs i {
  position: absolute;
  display: block;
  border-radius: 50%;
  filter: blur(70px);
  opacity: .5;
  animation: drift 16s ease-in-out infinite alternate;
}
.hero-orbs i:nth-child(1) { width: 380px; height: 380px; left: 56%; top: -160px; background: radial-gradient(circle, rgba(110, 138, 255, .8), transparent 66%); }
.hero-orbs i:nth-child(2) { width: 300px; height: 300px; left: -90px; top: 26%; background: radial-gradient(circle, rgba(124, 92, 255, .55), transparent 66%); animation-delay: -6s; }
.hero-orbs i:nth-child(3) { width: 240px; height: 240px; right: 2%; bottom: -70px; background: radial-gradient(circle, rgba(77, 107, 254, .5), transparent 66%); animation-delay: -11s; }
@keyframes drift { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(-36px, 28px, 0) scale(1.08); } }

.hero-inner { position: relative; z-index: 2; padding: 118px 0 60px; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, .94fr);
  gap: 64px;
  align-items: center;
}
.hero-topline { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 26px; }
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .22em;
  color: rgba(255, 255, 255, .66);
  text-transform: uppercase;
}
.hero-eyebrow b { color: #fff; font-weight: 400; }
.hero h1 {
  margin: 0 0 28px;
  font-family: var(--font-disp);
  font-weight: 800;
  font-size: clamp(46px, 7.4vw, 104px);
  line-height: 1.08;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.hero h1 .grad {
  background: linear-gradient(94deg, #f4f6ff 0%, #b9c6ff 38%, #6f8bff 78%, #a18fff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-copy p { margin: 0 0 14px; color: rgba(255, 255, 255, .66); font-size: 16.5px; line-height: 1.85; max-width: 600px; }
.hero-copy p strong { color: rgba(255, 255, 255, .95); font-weight: 600; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 30px; }
.hero-note { margin-top: 18px; font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; color: rgba(255, 255, 255, .42); }
.hero-note a { color: rgba(255, 255, 255, .7); border-bottom: 1px dashed rgba(255,255,255,.3); transition: color .2s; }
.hero-note a:hover { color: #fff; }

/* terminal profile card ------------------------------------------- */
.terminal {
  position: relative;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255, 255, 255, .14);
  background: linear-gradient(180deg, rgba(255, 255, 255, .075), rgba(255, 255, 255, .03));
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  box-shadow: 0 30px 70px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .12);
  overflow: hidden;
  transform: translateZ(0);
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 46px;
  padding: 0 18px;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
  background: rgba(0, 0, 0, .22);
}
.terminal-bar i { width: 11px; height: 11px; border-radius: 50%; }
.terminal-bar i:nth-child(1) { background: #ff5f57; }
.terminal-bar i:nth-child(2) { background: #febc2e; }
.terminal-bar i:nth-child(3) { background: #28c840; }
.terminal-bar span {
  margin-left: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: rgba(255, 255, 255, .55);
  letter-spacing: .05em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.terminal-body { padding: 20px 22px 22px; font-family: var(--font-mono); font-size: 12.5px; line-height: 1.9; }
.t-line { display: flex; gap: 12px; }
.t-line + .t-line { margin-top: 15px; }
.t-prompt { flex: 0 0 auto; color: #7f8bff; }
.t-cmd { color: #e8ecf7; white-space: nowrap; }
.t-out { display: block; margin-top: 3px; padding: 7px 11px; border-radius: 10px; background: rgba(0, 0, 0, .25); color: rgba(255, 255, 255, .82); white-space: nowrap; overflow-x: auto; }
.t-out b { color: #fff; font-weight: 500; }
.t-out .accent { color: #8d9cff; }
.t-out a { color: #6ee7b7; }
.t-out a:hover { text-decoration: underline; }
.terminal-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  border-top: 1px dashed rgba(255, 255, 255, .16);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .1em;
  color: rgba(255, 255, 255, .5);
}
.terminal-status .ok { display: inline-flex; align-items: center; gap: 8px; color: #6ee7b7; }
.terminal-float {
  position: absolute;
  top: -16px;
  right: -14px;
  width: 92px;
  height: 92px;
  border-radius: 24px;
  background: linear-gradient(140deg, #4d6bfe, #7c5cff);
  box-shadow: 0 18px 40px rgba(77, 107, 254, .45);
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .14em;
  color: rgba(255, 255, 255, .95);
  transform: rotate(6deg);
}
@media (prefers-reduced-motion: no-preference) {
  .terminal-float { animation: floaty 7s ease-in-out infinite; }
  @keyframes floaty { 0%, 100% { transform: rotate(6deg) translateY(0); } 50% { transform: rotate(6deg) translateY(-9px); } }
}

/* hero metrics band ------------------------------------------------ */
.metrics-band { position: relative; z-index: 3; border-top: 1px solid rgba(255, 255, 255, .1); margin-top: 76px; }
.metrics-band .container { width: 100%; display: grid; grid-template-columns: repeat(4, 1fr); }
.metric { padding: 24px 26px 6px; border-left: 1px solid rgba(255, 255, 255, .1); }
.metric:first-child { border-left: 0; padding-left: 0; }
.metric b {
  display: block;
  font-family: var(--font-disp);
  font-weight: 700;
  font-size: clamp(24px, 2.6vw, 34px);
  letter-spacing: -.01em;
  color: #fff;
  white-space: nowrap;
}
.metric b em { font-style: normal; color: #8f9eff; font-size: .58em; font-weight: 600; margin-left: 2px; }
.metric span { display: block; margin-top: 3px; font-size: 12.5px; color: rgba(255, 255, 255, .5); }

/* numbered sections -------------------------------------------------- */
.sec { padding: 108px 0 8px; }
.sec-head { display: grid; grid-template-columns: 1fr auto; gap: 30px; align-items: end; margin-bottom: 54px; }
.sec-index {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .22em;
  color: var(--brand-deep);
}
.sec-index::before { content: ""; width: 26px; height: 1px; background: var(--brand); opacity: .5; }
.sec-title {
  margin: 0;
  font-family: var(--font-disp);
  font-weight: 800;
  font-size: clamp(32px, 4.6vw, 54px);
  line-height: 1.16;
  letter-spacing: -.01em;
}
.sec-en {
  align-self: end;
  max-width: 260px;
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.9;
  letter-spacing: .14em;
  color: var(--ink-4);
  text-align: right;
  text-transform: uppercase;
}
.sec-lead { max-width: 700px; margin: -30px 0 0; color: var(--ink-3); font-size: 15.5px; }

/* about ------------------------------------------------------------ */
.about-statement {
  font-family: var(--font-disp);
  font-weight: 700;
  font-size: clamp(25px, 3.4vw, 40px);
  line-height: 1.5;
  letter-spacing: .005em;
  color: var(--ink);
  margin: 0 0 20px;
  max-width: 980px;
}
.about-statement em { font-style: normal; color: var(--brand-deep); }
.about-sub { max-width: 640px; color: var(--ink-3); margin: 0 0 58px; }

.skill-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.skill-card {
  position: relative;
  display: block;
  padding: 30px 30px 28px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  background: var(--surface);
  overflow: hidden;
  transition: transform .25s ease, box-shadow .3s ease, border-color .25s ease;
}
.skill-card::before { /* hover wash */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(140deg, rgba(77, 107, 254, .06), transparent 55%);
  opacity: 0;
  transition: opacity .3s ease;
  pointer-events: none;
}
.skill-card:hover { transform: translateY(-4px); border-color: var(--brand-line); box-shadow: var(--shadow-pop); }
.skill-card:hover::before { opacity: 1; }
.skill-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; position: relative; }
.skill-no { font-family: var(--font-mono); font-size: 11px; letter-spacing: .16em; color: var(--brand-deep); }
.skill-en { font-family: var(--font-mono); font-size: 8.5px; letter-spacing: .2em; color: var(--ink-4); text-transform: uppercase; }
.skill-card h3 { position: relative; margin: 0 0 8px; font-size: 21px; font-weight: 700; }
.skill-card p { position: relative; margin: 0; color: var(--ink-3); font-size: 14px; line-height: 1.75; }
.skill-card p i { font-style: normal; font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-2); }

/* method (traceable) ------------------------------------------------ */
.method-intro { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: start; margin-bottom: 60px; }
.method-copy .about-statement { margin-bottom: 16px; }
.method-copy > p { color: var(--ink-3); }
.method-steps { display: flex; flex-direction: column; }
.method-step {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 20px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}
.method-step:last-child { border-bottom: 1px solid var(--line); }
.method-step .n {
  font-family: var(--font-mono);
  font-size: 12px;
  padding-top: 5px;
  color: var(--brand-deep);
}
.method-step h3 { margin: 0 0 6px; font-size: 19px; font-weight: 700; }
.method-step h3 small { display: block; margin-top: 2px; font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .18em; color: var(--ink-4); font-weight: 400; text-transform: uppercase; }
.method-step p { margin: 0; color: var(--ink-3); font-size: 14px; line-height: 1.8; }
.method-figs { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.fig-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .25s ease, box-shadow .3s ease, border-color .25s ease;
}
a.fig-card:hover { transform: translateY(-4px); border-color: var(--brand-line); box-shadow: var(--shadow-pop); }
.fig-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 14px;
  height: 38px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-soft);
}
.fig-bar i { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-4); }
.fig-bar i:first-child { background: rgba(255, 95, 87, .7); }
.fig-bar i:nth-child(2) { background: rgba(254, 188, 46, .8); }
.fig-bar i:nth-child(3) { background: rgba(40, 200, 64, .75); }
.fig-bar span { margin-left: 8px; font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .12em; color: var(--ink-4); text-transform: uppercase; }
.fig-frame { position: relative; padding: 4px 4px 0; flex: 1; display: flex; align-items: stretch; }
.fig-frame img { width: 100%; height: 100%; max-height: 320px; object-fit: contain; }
.fig-cap { padding: 12px 16px 16px; border-top: 1px solid var(--line); }
.fig-cap b { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 2px; }
.fig-cap span { font-size: 12.5px; color: var(--ink-3); }

/* projects ---------------------------------------------------------- */
.project-card {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
  overflow: hidden;
  cursor: pointer;
  transition: transform .25s ease, box-shadow .35s ease, border-color .25s ease;
}
.project-card + .project-card { margin-top: 22px; }
.project-card:hover { transform: translateY(-4px); border-color: var(--brand-line); box-shadow: var(--shadow-pop); }
.pc-main { min-width: 0; padding: 34px 38px 30px; display: flex; flex-direction: column; }
.pc-index { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.pc-index .num { font-family: var(--font-mono); font-size: 11px; letter-spacing: .18em; color: var(--brand-deep); }
.pc-index .rule { flex: 1; height: 1px; background: var(--line); }
.pc-code { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .16em; color: var(--ink-4); }
.pc-title { margin: 0 0 6px; font-family: var(--font-disp); font-weight: 800; font-size: clamp(24px, 3vw, 34px); letter-spacing: -.01em; }
.pc-zh { margin: 0 0 14px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.pc-lead { margin: 0 0 20px; color: var(--ink-3); font-size: 14px; line-height: 1.85; }
.pc-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.pc-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 18px; border-top: 1px solid var(--line); }
.pc-stats { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.pc-stats span { font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); white-space: nowrap; }
.pc-stats span b { color: var(--ink); font-weight: 500; }
.pc-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.pc-go {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--brand-deep);
  white-space: nowrap;
}
.pc-go .arr { font-size: 15px; transition: transform .25s ease; }
.project-card:hover .pc-go .arr { transform: translate(3px, -2px); }
.pc-figure { position: relative; background: #fff; border-left: 1px solid var(--line); min-height: 260px; overflow: hidden; }
.pc-figure img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: center; padding: 16px; background: #fff; transition: transform .6s cubic-bezier(.2,.6,.2,1); }
.project-card:hover .pc-figure img { transform: scale(1.035); }
.pc-figure .fig-tag {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 27px;
  padding: 0 11px;
  border-radius: var(--radius-pill);
  background: rgba(15, 16, 20, .72);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: rgba(255, 255, 255, .85);
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: .12em;
}

/* experience ---------------------------------------------------------- */
.timeline { display: flex; flex-direction: column; }
.timeline-row {
  display: grid;
  grid-template-columns: 218px minmax(0, 1fr);
  gap: 42px;
  padding: 30px 0;
  border-top: 1px solid var(--line);
}
.timeline-row:last-of-type { border-bottom: 1px solid var(--line); }
.tl-date { display: flex; flex-direction: column; gap: 9px; }
.tl-date time {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .08em;
  color: var(--brand-deep);
}
.tl-date time::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); opacity: .75; flex: 0 0 auto; }
.tl-date .where { font-family: var(--font-mono); font-size: 9px; letter-spacing: .16em; color: var(--ink-4); text-transform: uppercase; }
.tl-body h3 { margin: 0 0 4px; font-size: 20px; font-weight: 700; }
.tl-body h3 small { display: inline-block; margin-left: 8px; color: var(--brand-deep); font-size: 13px; font-weight: 600; }
.tl-body > p { margin: 0 0 12px; color: var(--ink-2); font-size: 14.5px; }
.tl-body ul { list-style: none; }
.tl-body li {
  position: relative;
  padding: 5px 0 5px 18px;
  color: var(--ink-3);
  font-size: 14px;
  line-height: 1.8;
}
.tl-body li::before { content: ""; position: absolute; left: 0; top: 13px; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); opacity: .4; }
.certs { margin-top: 34px; }
.certs-label { font-family: var(--font-mono); font-size: 10px; letter-spacing: .2em; color: var(--ink-4); text-transform: uppercase; margin-bottom: 14px; }
.cert-list { display: flex; flex-wrap: wrap; gap: 9px; }
.cert-list .chip-tag { height: 30px; padding: 0 14px; font-size: 12px; letter-spacing: .02em; color: var(--ink-2); font-family: var(--font-ui); }

/* contact / join ------------------------------------------------------ */
.contact {
  margin-top: 130px;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}
.contact-inner {
  position: relative;
  z-index: 2;
  color: #fff;
  padding: 96px 0 40px;
  background:
    radial-gradient(900px 460px at 88% -10%, rgba(77, 107, 254, .5), transparent 60%),
    radial-gradient(560px 380px at -4% 100%, rgba(124, 92, 255, .28), transparent 60%),
    linear-gradient(180deg, #0d1017, #0a0c11);
}
.contact-inner::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, .12) 1px, transparent 1.4px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(ellipse at 70% 20%, #000, transparent 70%);
  mask-image: radial-gradient(ellipse at 70% 20%, #000, transparent 70%);
  pointer-events: none;
}
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 70px; align-items: end; }
.contact-index { display: inline-flex; align-items: center; gap: 12px; margin-bottom: 20px; font-family: var(--font-mono); font-size: 11px; letter-spacing: .22em; color: #8f9eff; }
.contact-index::before { content: ""; width: 26px; height: 1px; background: #8f9eff; opacity: .6; }
.contact h2 { margin: 0 0 18px; font-family: var(--font-disp); font-weight: 800; font-size: clamp(34px, 5vw, 60px); line-height: 1.18; letter-spacing: -.01em; text-wrap: balance; }
.contact h2 .grad { background: linear-gradient(94deg, #fff, #a9baff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.contact p { max-width: 560px; margin: 0 0 34px; color: rgba(255, 255, 255, .62); font-size: 16px; line-height: 1.9; }
.contact-links { display: flex; flex-direction: column; gap: 14px; }
.contact-link {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 22px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(255, 255, 255, .05);
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
}
.contact-link:hover { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .32); transform: translateX(4px); }
.contact-link .k { font-family: var(--font-mono); font-size: 10px; letter-spacing: .18em; color: #8f9eff; width: 86px; flex: 0 0 auto; text-transform: uppercase; }
.contact-link b { font-family: var(--font-mono); font-size: 15px; font-weight: 400; letter-spacing: .04em; color: #fff; }
.contact-link small { margin-left: auto; color: rgba(255,255,255,.4); font-size: 12px; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }

.site-footer {
  background: #07080c;
  color: rgba(255, 255, 255, .45);
}
.site-footer .container { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; padding: 26px 0 30px; }
.site-footer small { font-family: var(--font-mono); font-size: 10px; letter-spacing: .1em; }
.site-footer nav { display: flex; gap: 18px; }
.site-footer nav a { font-size: 13px; color: rgba(255, 255, 255, .55); transition: color .2s; }
.site-footer nav a:hover { color: #fff; }

/* ============================================================
   CASE / PROJECT DETAIL PAGE
   ============================================================ */
.case-hero {
  position: relative;
  color: #fff;
  overflow: hidden;
  background:
    radial-gradient(1000px 560px at 88% -16%, rgba(77, 107, 254, .44), transparent 62%),
    radial-gradient(620px 440px at -6% 42%, rgba(124, 92, 255, .2), transparent 60%),
    linear-gradient(180deg, #0d1017 0%, #0b0d13 100%);
}
.case-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, .13) 1px, transparent 1.4px);
  background-size: 26px 26px;
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,.85), transparent 80%);
  mask-image: linear-gradient(180deg, rgba(0,0,0,.85), transparent 80%);
  pointer-events: none;
}
.case-hero-inner { position: relative; z-index: 2; padding: 92px 0 54px; }
.case-crumb { display: inline-flex; align-items: center; gap: 12px; font-family: var(--font-mono); font-size: 11px; letter-spacing: .18em; color: rgba(255, 255, 255, .6); margin-bottom: 26px; }
.case-crumb a { color: rgba(255, 255, 255, .85); transition: color .2s; }
.case-crumb a:hover { color: #fff; }
.case-crumb i { font-style: normal; opacity: .5; }
.case-hero h1 { margin: 0 0 12px; font-family: var(--font-disp); font-weight: 800; font-size: clamp(38px, 5.6vw, 72px); line-height: 1.12; letter-spacing: -.015em; }
.case-hero h1 span { display: block; margin-top: 10px; font-family: var(--font-mono); font-size: clamp(11px, 1.3vw, 13px); letter-spacing: .16em; color: #8f9eff; font-weight: 400; }
.case-intro { max-width: 720px; margin: 0 0 40px; color: rgba(255, 255, 255, .68); font-size: 16.5px; line-height: 1.9; }
.case-meta { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.case-meta div {
  padding: 16px 18px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, .13);
  background: rgba(255, 255, 255, .05);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  min-width: 0;
}
.case-meta span { display: block; margin-bottom: 6px; font-family: var(--font-mono); font-size: 8.5px; letter-spacing: .2em; color: rgba(255, 255, 255, .45); text-transform: uppercase; }
.case-meta b { display: block; font-size: 14.5px; font-weight: 600; color: #fff; line-height: 1.5; overflow-wrap: break-word; }

.case-body { padding-top: 96px; }
.case-sec + .case-sec { margin-top: 96px; }
.case-sec-head { margin-bottom: 40px; }
.case-sec-head .sec-index { margin-bottom: 14px; }
.case-sec-head h2 { margin: 0; font-family: var(--font-disp); font-weight: 800; font-size: clamp(26px, 3.4vw, 40px); letter-spacing: -.01em; }
.case-sec-head p { margin: 10px 0 0; color: var(--ink-3); font-size: 14.5px; }
.case-sec-head p code { font-family: var(--font-mono); font-size: 12px; background: var(--bg-soft); padding: 1px 6px; border-radius: 6px; }

/* resume summary cards */
.resume-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.resume-card {
  padding: 26px 26px 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--surface);
  transition: transform .25s ease, box-shadow .3s ease, border-color .25s ease;
}
.resume-card:hover { transform: translateY(-4px); border-color: var(--brand-line); box-shadow: var(--shadow-pop); }
.resume-card .k { display: block; margin-bottom: 12px; font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .18em; color: var(--brand-deep); text-transform: uppercase; }
.resume-card p { margin: 0; color: var(--ink-2); font-size: 14px; line-height: 1.85; }

/* doc rows */
.doc-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 34px;
  padding: 30px 0;
  border-top: 1px solid var(--line);
}
.doc-row:last-child { border-bottom: 1px solid var(--line); }
.doc-no { display: flex; flex-direction: column; gap: 6px; }
.doc-no .idx { font-family: var(--font-mono); font-size: 13px; color: var(--brand-deep); letter-spacing: .1em; }
.doc-no .lab { font-family: var(--font-mono); font-size: 8.5px; letter-spacing: .2em; color: var(--ink-4); text-transform: uppercase; }
.doc-body h3 { margin: 0 0 10px; font-size: 19px; font-weight: 700; }
.doc-body p { margin: 0; color: var(--ink-3); font-size: 14.5px; line-height: 1.95; }
.doc-body code {
  font-family: var(--font-mono);
  font-size: .86em;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1px 6px;
  color: var(--brand-deep);
}
.doc-body a { color: var(--brand-deep); font-weight: 500; }
.doc-body a:hover { text-decoration: underline; }

/* gallery */
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.gallery figure {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
  cursor: zoom-in;
  transition: transform .25s ease, box-shadow .3s ease, border-color .25s ease;
}
.gallery figure:hover { transform: translateY(-3px); border-color: var(--brand-line); box-shadow: var(--shadow-pop); }
.gallery .fig-frame { display: block; padding: 0; background: #fff; }
.gallery .fig-frame img { width: 100%; height: auto; max-height: none; object-fit: contain; }
.gallery img { width: 100%; height: auto; background: #fff; }
.gallery figcaption { display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-top: 1px solid var(--line); background: var(--surface); }
.gallery figcaption b { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .1em; color: var(--ink-4); font-weight: 400; white-space: nowrap; }
.gallery figcaption span { font-size: 12.5px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* case footer */
.case-nav {
  margin-top: 110px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.case-nav .container { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; padding: 30px 0; }
.case-nav a { font-weight: 600; color: var(--ink); }
.case-nav a:hover { color: var(--brand-deep); }
.case-nav small { font-family: var(--font-mono); font-size: 10px; letter-spacing: .1em; color: var(--ink-4); }

/* lightbox ------------------------------------------------------------- */
body.lightbox-open { overflow: hidden; }
.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  border: 0;
  padding: 44px;
  color: #fff;
  background: rgba(8, 9, 13, .88);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  overflow: hidden;
}
.image-lightbox[open] { display: flex; }
.image-lightbox::backdrop { background: transparent; }
.lightbox-stage {
  position: relative;
  width: min(1180px, 100%);
  max-height: 84vh;
  overflow: auto;
  cursor: zoom-in;
}
.lightbox-stage img { max-width: none; margin-inline: auto; object-fit: contain; border-radius: 10px; background: #fff; box-shadow: 0 30px 90px rgba(0, 0, 0, .6); }
.lightbox-caption { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); color: rgba(255,255,255,.6); font-size: 13px; white-space: nowrap; max-width: 90%; overflow: hidden; text-overflow: ellipsis; }
.lightbox-close, .lightbox-zoom-in, .lightbox-zoom-out, .lightbox-zoom-reset {
  position: absolute;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, .1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .18);
  transition: background .2s ease;
}
.lightbox-close:hover, .lightbox-zoom-in:hover, .lightbox-zoom-out:hover, .lightbox-zoom-reset:hover { background: rgba(255, 255, 255, .22); }
.lightbox-close { top: 22px; right: 22px; font-size: 19px; }
.lightbox-zoom-in { top: 22px; right: 74px; font-size: 17px; }
.lightbox-zoom-out { top: 22px; right: 126px; font-size: 19px; }
.lightbox-zoom-reset { top: 22px; right: 170px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0; }

/* ================= RESPONSIVE ==================== */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 54px; }
  .hero-inner { padding-top: 84px; }
  .terminal { max-width: 560px; }
  .case-meta { grid-template-columns: repeat(2, 1fr); }
  .project-card { grid-template-columns: minmax(0, 1fr); }
  .pc-figure { border-left: 0; border-top: 1px solid var(--line); min-height: 220px; }
  .resume-cards { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; gap: 48px; }
  .contact-inner { padding-top: 78px; }
}
@media (max-width: 900px) {
  .sec-en { display: none; }
  .site-nav { display: none; }
}
@media (max-width: 860px) {
  .method-intro { grid-template-columns: 1fr; gap: 40px; }
  .method-figs { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .header-cta-text { display: none; }
  .metrics-band .container { grid-template-columns: repeat(2, 1fr); row-gap: 4px; }
  .metric { border-left: 0; padding: 18px 6px 4px; border-top: 1px solid rgba(255, 255, 255, .1); }
  .metric:nth-child(-n + 2) { border-top: 0; }
  .sec { padding-top: 74px; }
  .sec-head { grid-template-columns: 1fr; margin-bottom: 36px; }
  .sec-en { display: none; }
  .skill-grid { grid-template-columns: 1fr; }
  .pc-main { padding: 26px 22px 22px; }
  .pc-foot { flex-direction: column; align-items: flex-start; }
  .pc-stats span { white-space: normal; }
  html[lang="en"] .t-out { white-space: normal; overflow-wrap: anywhere; }
  .timeline-row { grid-template-columns: 1fr; gap: 12px; }
  .tl-date { flex-direction: row; align-items: center; justify-content: space-between; }
  .doc-row { grid-template-columns: 1fr; gap: 8px; }
  .doc-no { flex-direction: row; align-items: baseline; gap: 10px; }
  .contact { margin-top: 80px; }
  .contact-links .contact-link b { font-size: 13.5px; word-break: break-all; }
  .case-body { padding-top: 64px; }
  .case-sec + .case-sec { margin-top: 64px; }
  .case-hero-inner { padding-top: 60px; }
  .hero { text-align: left; }
  .image-lightbox { padding: 18px; }
  .lightbox-caption { display: none; }
}
@media (max-width: 600px) {
  .brand-text { display: none; }
  .header-right { gap: 8px; }
  .header-inner { gap: 10px; }
  .case-page .btn-sm { padding-inline: 10px; font-size: 12px; }
  .language-toggle { padding-inline: 10px; }
}
@media (max-width: 440px) {
  .case-page .header-right .btn-dark { display: none; }
  .metrics-band .container { grid-template-columns: 1fr 1fr; }
  .hero-actions .btn { width: 100%; }
  .case-meta { grid-template-columns: 1fr 1fr; }
  .gallery figcaption span { display: none; }
}
