:root {
  --paper: #fff;
  --ink: #202422;
  --muted: #646b67;
  --line: #d9deda;
  --green: #215c48;
  --quiet: #f4f6f4;
  --sans: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font: 16px/1.75 var(--sans);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, p, figure, dl, dd { margin: 0; }
h1, h2, h3, h4 { font-weight: 600; text-wrap: balance; }
a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 2px solid var(--green); outline-offset: 6px; }
.wrap { width: min(1200px, calc(100% - 80px)); margin-inline: auto; }
.skip-link { position: fixed; left: 16px; top: -100px; z-index: 20; padding: 12px 20px; background: #fff; }
.skip-link:focus { top: 12px; }

/* Header and opening composition. */
.site-header { position: sticky; top: 0; z-index: 10; background: #fffffff5; border-bottom: 1px solid #edf0ed; }
.header-inner { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.wordmark { display: flex; align-items: baseline; gap: 18px; font-size: 17px; font-weight: 600; }
.wordmark span { color: var(--muted); font-size: 13px; font-weight: 400; }
.header-inner nav { display: flex; gap: 32px; font-size: 14px; }
.header-inner nav a { display: flex; align-items: center; min-height: 44px; }
.opening { min-height: calc(100svh - 77px); padding-top: 16px; display: flex; flex-direction: column; }
.hero-stack { flex: 1; width: 100%; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; padding: 28px 0 36px; }
.hero-meta { display: flex; align-items: center; gap: 14px; width: auto; margin-bottom: 28px; color: var(--muted); font-size: 13px; line-height: 1.4; }
.hero-meta span { display: flex; align-items: center; gap: 11px; }
.hero-meta span::before { content: ""; display: inline-block; width: 48px; height: 1px; background: var(--line); }
.hero-meta span::after { content: ""; display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: var(--green); }
.hero-meta i { display: none; }
.hero-meta time { font: 12px/1 ui-monospace, SFMono-Regular, Menlo, monospace; }
.hero-stack h1 { font-size: 136px; line-height: 1; letter-spacing: -.02em; }
.hero-stack .intro-statement { width: min(900px, 100%); max-width: none; margin-top: 38px; color: var(--ink); font-size: 38px; font-weight: 500; line-height: 1.45; }
.opening-capabilities { flex: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line); }
.opening-capabilities article { min-height: 164px; padding: 24px 28px 28px 0; border-right: 1px solid var(--line); }
.opening-capabilities article:nth-child(2), .opening-capabilities article:nth-child(3) { padding-left: 28px; }
.opening-capabilities article:last-child { padding-right: 0; border-right: 0; }
.opening-capabilities b { display: block; font-size: 28px; font-weight: 550; line-height: 1.25; letter-spacing: 0; }
.opening-capabilities p { max-width: 310px; margin-top: 12px; color: var(--muted); font-size: 13px; line-height: 1.7; }

/* Case studies. */
.project { padding: 88px 0 92px; border-top: 1px solid rgba(32, 36, 34, .12); }
.project-service { background: #eef4f0; }
.project-teaching { background: #f3f0e9; }
.project-jung { background: #eaf1ef; }
.project-identifier { display: flex; align-items: baseline; flex-wrap: wrap; gap: 18px; margin-bottom: 34px; }
.project-identifier .project-number { color: var(--ink); font: 500 21px/1.25 var(--sans); letter-spacing: 0; }
.project-identifier h3 { font-size: 21px; }
.project-category { margin-left: 0; padding-left: 18px; border-left: 1px solid #aab6af; color: var(--muted); font-size: 14px; line-height: 1.4; }
.project-heading { display: grid; grid-template-columns: minmax(0, 7fr) minmax(260px, 5fr); gap: 64px; align-items: end; margin-bottom: 18px; }
.project-heading h4 { max-width: 760px; font-size: clamp(34px, 4.25vw, 58px); line-height: 1.22; letter-spacing: -.045em; }
.project-heading-note { margin-bottom: 18px; }
.service-heading { display: block; }
.service-heading h4 { max-width: none; font-size: 52px; letter-spacing: 0; }
.header-note { max-width: 390px; padding-left: 20px; border-left: 1px solid var(--ink); color: var(--muted); font-size: 13px; line-height: 1.75; }
.header-note > span { display: block; color: var(--ink); font: 10px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .08em; }
.header-note b { display: block; margin: 10px 0; color: var(--ink); font-size: 19px; font-weight: 550; line-height: 1.4; }
.responsibility-lines { display: grid; gap: 8px; margin-top: 14px; }
.responsibility-lines p { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 10px; }
.teaching-heading { grid-template-columns: minmax(0, 1fr) 410px; gap: 48px; }
.teaching-heading .header-note { max-width: none; }
.visual-stage { position: relative; width: 100%; margin-top: 38px; overflow: visible; }
.visual-stage[data-state="loading"] { min-height: var(--visual-height); background: transparent; }
.visual-stage[data-state="error"]::after { content: "视觉素材暂时无法载入"; position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 13px; }
.visual-frame { display: block; width: 100%; height: var(--visual-height); border: 0; background: transparent; }
.capability-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; margin-top: 42px; padding: 24px 0 21px; border-top: 1px solid var(--ink); border-bottom: 1px solid rgba(32, 36, 34, .24); }
.capability-row > div { min-width: 0; padding-right: 18px; border-right: 1px solid rgba(32, 36, 34, .16); }
.capability-row > div:last-child { padding-right: 0; border-right: 0; }
.capability-row b { display: block; font-size: 14px; font-weight: 600; line-height: 1.45; }
.capability-row span { display: block; margin-top: 8px; color: var(--muted); font-size: 12px; line-height: 1.75; }
.project-link { display: flex; justify-content: flex-end; margin-top: 20px; }
.plain-link { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; font-size: 14px; font-weight: 500; text-decoration: underline; text-decoration-color: #9ca9a1; text-underline-offset: 5px; }
.interaction-strip { display: grid; grid-template-columns: 2.4fr repeat(3, 1fr); margin-top: 42px; border-top: 1px solid var(--ink); border-bottom: 1px solid rgba(32, 36, 34, .23); }
.interaction-strip > div { min-height: 116px; padding: 18px 24px; border-right: 1px solid rgba(32, 36, 34, .17); }
.interaction-strip > div:last-child { border-right: 0; }
.interaction-strip span { display: block; color: var(--muted); font: 10px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; }
.interaction-strip strong { display: block; margin-top: 10px; font-size: 17px; font-weight: 550; line-height: 1.35; }
.interaction-strip b { display: block; font-size: 14px; font-weight: 600; }
.interaction-strip p { margin-top: 9px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.jung-visual-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 28px; margin-top: 30px; color: var(--muted); }
.jung-visual-heading span { color: var(--ink); font: 10px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .08em; }

/* About and experience. */
.about { padding: 112px 0 120px; background: var(--quiet); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.about-lead { display: grid; grid-template-columns: 150px minmax(0, 1fr) 120px; column-gap: 24px; align-items: baseline; max-width: none; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.about-lead .eyebrow { grid-column: 1; margin: 0; font-size: 12px; letter-spacing: .12em; }
.eyebrow { display: block; margin-bottom: 16px; font-family: var(--sans); font-size: 13px; }
.about h2 { grid-column: 2; max-width: 860px; margin: 0; font-size: 50px; line-height: 1.14; letter-spacing: -.02em; }
.about-period { grid-column: 3; color: var(--muted); text-align: right; font: 12px/1 ui-monospace, SFMono-Regular, Menlo, monospace; }
.about-body { display: grid; grid-template-columns: 160px minmax(0, 860px); column-gap: 28px; padding-top: 68px; }
.about-quote, .about-copy { grid-column: 2; }
.about-quote { max-width: 860px; padding-left: 24px; border-left: 3px solid var(--line); font-size: 34px; line-height: 1.32; letter-spacing: -.015em; }
.about-copy { max-width: 820px; margin-top: 38px; color: var(--muted); font-size: 18px; line-height: 1.8; }
.about-portrait { grid-column: 1; grid-row: 1 / span 2; align-self: stretch; margin: 0; padding-right: 20px; }
.about-portrait-frame { display: block; width: 100%; overflow: hidden; background: #dce5e0; }
.about-portrait img { display: block; width: 100%; height: auto; }
.capability-grid { display: grid; grid-template-columns: 1fr; margin-top: 88px; border-top: 1px solid var(--ink); }
.capability-grid article { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 48px; align-items: start; min-height: 0; padding: 25px 0 28px; border-bottom: 1px solid var(--line); }
.capability-grid h3 { margin: 0; font-size: 24px; font-weight: 500; line-height: 1.3; }
.capability-grid p { max-width: 760px; margin: 0; font-size: 16px; line-height: 1.75; }
.experience-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: auto repeat(6, minmax(0, auto)); column-gap: 72px; row-gap: 0; margin-top: 92px; }
.experience-grid section { display: grid; grid-row: 1 / span 7; grid-template-rows: subgrid; row-gap: 0; padding-top: 24px; }
.experience-grid section > h3 { padding-bottom: 24px; border-bottom: 0; color: var(--muted); font: 12px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .16em; }
.experience-grid ol { display: contents; margin: 0; padding: 0; list-style: none; }
.experience-grid li { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 24px; min-height: 0; padding: 14px 0 15px; border-bottom: 1px solid var(--line); }
.experience-grid time { color: var(--muted); font: 12px/1.35 var(--sans); }
.experience-grid b { font-size: 18px; font-weight: 500; line-height: 1.25; }
.experience-grid p { max-width: none; margin-top: 6px; color: var(--muted); font-size: 13px; line-height: 1.42; letter-spacing: .01em; }

/* Closing recruitment contact. */
.closing { padding-top: 78px; }
.closing h2 { font-size: 44px; line-height: 1.5; }
.closing > p { margin-top: 22px; color: var(--muted); font-size: 16px; }
.footer-line { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 70px; padding: 22px 0 26px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.footer-actions { display: flex; align-items: center; justify-content: flex-end; gap: 24px; flex-wrap: wrap; }

@media (max-width: 900px) {
  .wrap { width: calc(100% - 48px); }
  .project-heading { grid-template-columns: 1fr; gap: 22px; }
  .header-note { max-width: 560px; }
  .capability-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 20px; }
  .capability-row > div:nth-child(2) { border-right: 0; }
  .capability-row > div:nth-child(n + 3) { padding-top: 20px; border-top: 1px solid rgba(32, 36, 34, .16); }
  .interaction-strip { grid-template-columns: 1fr 1fr; }
  .interaction-strip .interaction-lead { grid-column: 1 / -1; border-right: 0; border-bottom: 1px solid rgba(32, 36, 34, .17); }
  .hero-stack { padding: 28px 0 36px; }
  .hero-stack h1 { font-size: 128px; }
  .hero-stack .intro-statement { width: min(820px, 100%); margin-top: 34px; font-size: 34px; }
  .service-heading h4 { font-size: 42px; }
  .teaching-heading { grid-template-columns: 1fr; gap: 24px; }
  .about { padding: 78px 0 84px; }
  .about-lead { grid-template-columns: 120px minmax(0, 1fr) 90px; column-gap: 20px; }
  .about h2 { font-size: 42px; }
  .about-body { grid-template-columns: 150px minmax(0, 1fr); column-gap: 20px; padding-top: 56px; }
  .about-portrait { padding-right: 18px; }
  .about-portrait-frame { width: 100%; }
  .about-quote { font-size: 30px; }
  .about-copy { margin-top: 30px; }
  .capability-grid { margin-top: 58px; }
  .capability-grid article { grid-template-columns: 210px minmax(0, 1fr); gap: 30px; }
  .experience-grid { column-gap: 48px; margin-top: 82px; }
}

@media (min-width: 901px) {
  .service-heading h4 span { white-space: nowrap; }
}

@media (max-width: 640px) {
  .wrap { width: calc(100% - 32px); }
  .header-inner { gap: 16px; }
  .header-inner nav { gap: 14px; font-size: 12px; }
  .wordmark span { display: none; }
  .opening { min-height: calc(100svh - 77px); padding-top: 12px; }
  .hero-stack { padding: 28px 0 32px; }
  .hero-stack h1 { font-size: 72px; }
  .hero-stack .intro-statement { width: 100%; margin-top: 32px; font-size: 28px; line-height: 1.5; }
  .hero-meta { flex-wrap: wrap; gap: 10px; margin-bottom: 22px; font-size: 12px; }
  .hero-meta span::before { width: 30px; }
  .hero-meta time { font-size: 11px; }
  .opening-capabilities { grid-template-columns: 1fr; }
  .opening-capabilities article, .opening-capabilities article:nth-child(2), .opening-capabilities article:nth-child(3) { min-height: 0; padding: 18px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .opening-capabilities article:last-child { border-bottom: 0; }
  .opening-capabilities b { font-size: 22px; }
  .opening-capabilities p { margin-top: 4px; font-size: 12px; }
  .project { padding: 60px 0 68px; }
  .project-identifier { gap: 12px; }
  .project-identifier .project-number { font-size: 18px; }
  .project-category { padding-left: 12px; font-size: 12px; }
  .project-heading h4, .service-heading h4 { font-size: 34px; }
  .teaching-heading { grid-template-columns: 1fr; gap: 22px; }
  .visual-frame { height: var(--visual-height); }
  .capability-row { grid-template-columns: 1fr; gap: 0; }
  .capability-row > div, .capability-row > div:nth-child(2), .capability-row > div:nth-child(n + 3) { display: grid; grid-template-columns: 116px minmax(0, 1fr); gap: 12px; padding: 15px 0; border: 0; border-bottom: 1px solid rgba(32, 36, 34, .14); }
  .capability-row > div:last-child { border-bottom: 0; }
  .capability-row span { margin-top: 0; }
  .project-link { justify-content: flex-start; }
  .interaction-strip { grid-template-columns: 1fr; }
  .interaction-strip > div, .interaction-strip .interaction-lead { border-right: 0; border-bottom: 1px solid rgba(32, 36, 34, .17); }
  .interaction-strip > div:last-child { border-bottom: 0; }
  .jung-visual-heading { display: block; }
  .about { padding: 64px 0 68px; }
  .about-lead { display: block; }
  .about h2 { margin-top: 24px; font-size: 32px; line-height: 1.28; }
  .about-period { display: block; margin-top: 18px; text-align: left; }
  .about-body { display: block; padding-top: 42px; }
  .about-quote { padding-left: 16px; font-size: 25px; line-height: 1.45; }
  .about-copy { margin-top: 24px; font-size: 16px; line-height: 1.8; }
  .capability-grid { margin-top: 48px; }
  .capability-grid article { display: block; padding: 25px 0; }
  .capability-grid h3 { font-size: 25px; }
  .capability-grid p { margin-top: 13px; font-size: 15px; line-height: 1.8; }
  .experience-grid { grid-template-columns: 1fr; gap: 0; margin-top: 70px; }
  .experience-grid { grid-template-rows: none; }
  .experience-grid section { display: block; grid-row: auto; padding-top: 30px; }
  .experience-grid ol { display: block; }
  .experience-grid section > h3 { font-size: 12px; }
  .experience-grid li { grid-template-columns: 92px minmax(0, 1fr); gap: 15px; min-height: 0; padding: 17px 0 18px; }
  .experience-grid b { font-size: 16px; }
  .experience-grid p { font-size: 13px; line-height: 1.45; }
  .closing { padding-top: 60px; }
  .closing h2 { font-size: 34px; }
  .footer-line { display: block; margin-top: 46px; }
  .footer-actions { display: flex; justify-content: flex-start; gap: 12px 20px; margin-top: 14px; }
  .footer-line .plain-link { margin-top: 14px; }
}

/* Motion V3: the dark stage owns the page; the case board is its only foreground sheet. */
:root {
  --motion-stage: #10201f;
  --motion-stage-ink: #f4f3ed;
  --motion-stage-muted: #aabbb4;
  --motion-sheet: #f7f5ef;
  --motion-ink: #17211f;
  --motion-muted: #65716c;
  --motion-line: #d5d9d3;
}
html { scroll-padding-top: 76px; background: var(--motion-stage); }
body.motion-page { background: var(--motion-stage); color: var(--motion-ink); }
.site-header {
  position: fixed;
  z-index: 20;
  inset: 0 0 auto;
  background: rgba(16, 32, 31, .94);
  border-bottom-color: rgba(244, 243, 237, .16);
  backdrop-filter: blur(14px);
}
.wordmark { color: var(--motion-stage-ink); }
.wordmark span, .header-inner nav { color: var(--motion-stage-muted); }
.header-inner nav a:hover, .header-inner nav a:focus-visible { color: var(--motion-stage-ink); }
.page-stage { position: relative; background: transparent; }
.hero-case-story { position: relative; z-index: 1; background: transparent; }
.hero-stage {
  position: sticky;
  top: 0;
  z-index: 0;
  height: 100svh;
  min-height: 680px;
  background: var(--motion-stage);
  overflow: hidden;
}
.hero-stage > .opening {
  width: 100%;
  height: 100%;
  min-height: 100%;
  padding-top: 112px;
  padding-bottom: 80px;
  background: var(--motion-stage);
  color: var(--motion-stage-ink);
}
.hero-stage .hero-stack { width: min(1200px, calc(100% - 80px)); margin: 0 auto; padding-top: 56px; }
.hero-stage .hero-meta { color: var(--motion-stage-muted); }
.hero-stage .hero-meta span::before { background: rgba(244,243,237,.34); }
.hero-stage .hero-meta span::after { background: #d6ae58; }
.hero-stage h1 { color: var(--motion-stage-ink); font-size: clamp(96px, 11.2vw, 164px); line-height: .93; }
.hero-stage .intro-statement { width: min(1160px, 100%); max-width: none; margin-top: 42px; color: var(--motion-stage-ink); font-size: clamp(27px, 2.45vw, 35px); line-height: 1.2; }
.hero-stage .opening-capabilities { position: absolute; right: max(40px, calc((100% - 1200px) / 2)); bottom: 74px; left: max(40px, calc((100% - 1200px) / 2)); border-color: rgba(244,243,237,.42); }
.hero-stage .opening-capabilities article { border-color: rgba(244,243,237,.18); }
.hero-stage .opening-capabilities article { min-height: 132px; padding-top: 18px; padding-bottom: 18px; }
.hero-stage .opening-capabilities b { font-size: 24px; }
.hero-stage .opening-capabilities p { margin-top: 8px; line-height: 1.48; }
.hero-stage .opening-capabilities b { color: var(--motion-stage-ink); }
.hero-stage .opening-capabilities p { color: var(--motion-stage-muted); }

.case-board {
  position: relative;
  z-index: 2;
  margin-top: -14vh;
  overflow: clip;
  border-radius: 36px;
  background: var(--motion-sheet);
  box-shadow: 0 -34px 100px rgba(0,0,0,.24);
}
.case-board::before, .case-board::after { content: ""; position: absolute; right: 0; left: 0; height: 1px; background: rgba(23,33,31,.12); }
.case-board::before { top: 0; }
.case-board::after { bottom: 0; }
.case-board-inner { background: var(--motion-sheet); }
.case-board .works { background: var(--motion-sheet); }
.case-board .project { padding-top: 112px; padding-bottom: 116px; }
.case-board .project:first-child { border-top: 0; }
.case-board .visual-stage { position: relative; margin-top: 38px; overflow: visible; }
.case-board .visual-stage > * { width: 100%; }
.case-board .project-identifier,
.case-board .project-heading,
.case-board .visual-stage,
.case-board .capability-row,
.case-board .project-link {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .62s ease, transform .62s cubic-bezier(.2,.72,.24,1);
}
.case-board .project.is-visible .project-identifier,
.case-board .project.is-visible .project-heading,
.case-board .project.is-visible .visual-stage,
.case-board .project.is-visible .capability-row,
.case-board .project.is-visible .project-link { opacity: 1; transform: none; }
.case-board .project.is-visible .project-heading { transition-delay: 70ms; }
.case-board .project.is-visible .visual-stage { transition-delay: 130ms; }
.case-board .project.is-visible .capability-row { transition-delay: 210ms; }
.case-board .project.is-visible .project-link { transition-delay: 280ms; }
.case-board .capability-row > div { transition: border-color .18s ease, color .18s ease; }
.case-board .capability-row > div:hover { border-color: #4d9588; }
.case-board .project-teaching .capability-row > div:hover { border-color: #b9864b; }
.case-board .project-jung .capability-row > div:hover { border-color: #637d8a; }
.case-board .plain-link span { display: inline-block; transition: transform .18s ease; }
.case-board .plain-link:hover span, .case-board .plain-link:focus-visible span { transform: translateX(4px); }

/* Inline visual hosts have no document or scrollbar of their own. */
.case-board .visual-stage { min-height: 0; }
.case-board .visual-stage::after { content: none; }
.case-board .visual-stage [data-motion-ready] { display: block; }
.case-board .visual-wecom { padding: 0; }
.case-board .visual-teaching { padding: 0; }
.case-board .visual-jung { padding: 0; }

.stage-about {
  position: relative;
  z-index: 1;
  margin: 0;
  padding: 144px 0 158px;
  background: var(--motion-stage);
  border: 0;
  color: var(--motion-stage-ink);
}
.stage-about .about-lead { border-color: rgba(244,243,237,.22); }
.stage-about h2, .stage-about h3, .stage-about b { color: var(--motion-stage-ink); }
.stage-about .eyebrow, .stage-about .about-period, .stage-about p, .stage-about time { color: var(--motion-stage-muted); }
.stage-about .about-quote { border-color: rgba(244,243,237,.7); color: var(--motion-stage-ink); }
.stage-about .capability-grid, .stage-about .capability-grid article, .stage-about .experience-grid, .stage-about .experience-grid li { border-color: rgba(244,243,237,.22); }
.stage-about .experience-grid section > h3 { color: var(--motion-stage-muted); }
.stage-contact {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: none;
  min-height: 92svh;
  margin: 0;
  padding: 28vh 0 108px;
  background: var(--motion-stage);
  color: var(--motion-stage-ink);
}
.stage-contact > * { width: min(1200px, calc(100% - 80px)); margin-right: auto; margin-left: auto; }
.stage-contact .eyebrow, .stage-contact > p, .stage-contact .footer-line { color: var(--motion-stage-muted); }
.stage-contact h2 { max-width: 860px; color: var(--motion-stage-ink); font-size: clamp(50px, 7vw, 104px); line-height: 1.02; }
.stage-contact .footer-line { border-color: rgba(244,243,237,.24); }
.stage-contact .plain-link { color: var(--motion-stage-ink); }
.stage-contact .portfolio-bridge { --portfolio-line: rgba(244,243,237,.24); --portfolio-muted: var(--motion-stage-muted); --portfolio-panel: var(--motion-stage); --portfolio-panel-ink: var(--motion-stage-ink); color: var(--motion-stage-ink); }
.stage-contact h2, .stage-contact > p, .stage-contact .footer-line { opacity: 0; transform: translateY(24px); transition: opacity .68s ease, transform .68s cubic-bezier(.2,.72,.24,1); }
.stage-contact.is-visible h2, .stage-contact.is-visible > p, .stage-contact.is-visible .footer-line { opacity: 1; transform: none; }
.stage-contact.is-visible > p { transition-delay: 100ms; }
.stage-contact.is-visible .footer-line { transition-delay: 180ms; }

@media (max-width: 900px) {
  .hero-stage { min-height: 620px; }
  .hero-stage .hero-stack, .hero-stage .opening-capabilities, .stage-contact > * { width: calc(100% - 48px); }
  .hero-stage .opening-capabilities { right: 24px; left: 24px; }
  .case-board { margin-top: -10vh; border-radius: 28px; }
}
@media (max-width: 640px) {
  .hero-stage { min-height: 640px; height: 100svh; }
  .hero-stage > .opening { padding-top: 90px; }
  .hero-stage .hero-stack, .stage-contact > * { width: calc(100% - 32px); }
  .hero-stage .hero-stack { padding-top: 34px; }
  .hero-stage h1 { font-size: 72px; }
  .hero-stage .intro-statement { margin-top: 28px; font-size: 25px; line-height: 1.38; }
  .hero-stage .opening-capabilities { right: 16px; bottom: 14px; left: 16px; }
  .hero-stage .opening-capabilities article { min-height: 0; padding-top: 15px; padding-bottom: 15px; }
  .case-board { margin-top: -8vh; border-radius: 22px; }
  .case-board .project { padding-top: 72px; padding-bottom: 78px; }
  .stage-about { padding: 88px 0 100px; }
  .stage-contact { min-height: 84svh; padding-top: 20vh; padding-bottom: 70px; }
  .stage-contact h2 { font-size: 48px; }
  .about-portrait { grid-column: auto; grid-row: auto; margin: 34px 0 0 auto; padding: 20px 0 0; border-top: 1px solid rgba(244,243,237,.22); border-right: 0; border-left: 0; }
  .about-portrait-frame { width: 190px; margin-left: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .case-board .project-identifier, .case-board .project-heading, .case-board .visual-stage, .case-board .capability-row, .case-board .project-link,
  .stage-about .about-lead, .stage-about .about-body, .stage-about .capability-grid, .stage-about .experience-grid,
  .stage-contact h2, .stage-contact > p, .stage-contact .footer-line { opacity: 1; transform: none; transition: none; }
}

/* V5 parent-owned timeline: one page scroll, one viewport stage, one sheet. */
html { overflow-x: clip; background: var(--motion-stage); }
body.motion-page { min-width: 0; overflow-x: clip; }
body.motion-page::before { position: absolute; z-index: -1; }
.page-stage { position: relative; isolation: isolate; background: var(--motion-stage); }
.stage-track { position: relative; overflow: clip; background: var(--motion-stage); }
.stage-viewport {
  position: sticky;
  top: 0;
  z-index: 0;
  height: 100svh;
  min-height: 640px;
  overflow: hidden;
  isolation: isolate;
  background: var(--motion-stage);
}
.stage-backdrop { position: absolute; z-index: 0; inset: 0; background: var(--motion-stage); }
.stage-backdrop::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 76% 24%, rgba(78, 137, 119, .22), transparent 34%),
    linear-gradient(125deg, rgba(16, 32, 31, 0) 38%, rgba(7, 15, 15, .42));
  opacity: .9;
  transform: translate3d(var(--ambient-x, 0px), var(--ambient-y, 0px), 0);
  transition: transform .2s linear;
}
.hero-stage {
  position: absolute;
  inset: 0;
  z-index: 2;
  height: 100%;
  min-height: 0;
  background: transparent;
  transform: translate3d(0, var(--hero-retreat, 0px), 0) scale(var(--hero-scale, 1));
  opacity: var(--hero-opacity, 1);
  transform-origin: 50% 15%;
  will-change: transform, opacity;
  transition: opacity .3s ease;
}
.hero-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  background: var(--motion-stage);
  opacity: var(--hero-cover, 0);
  transition: opacity .2s linear;
}
.hero-stage > .opening { position: relative; z-index: 1; height: 100%; min-height: 0; }
.hero-stage .hero-stack { padding-top: 56px; }
.hero-stage .opening-capabilities { bottom: 24px; }
.stage-track > .case-board { position: relative; z-index: 4; }
.case-board {
  /* Keep the opening viewport clean; the sheet enters after the hero stage. */
  margin-top: 0;
  border-radius: 34px;
  background: var(--motion-sheet);
  box-shadow: 0 -30px 100px rgba(0, 0, 0, .28);
  transform: translate3d(0, var(--sheet-lift, 0px), 0);
  will-change: transform;
}
.case-board::before { border-radius: 34px; }
.case-board .project { position: relative; }
.case-board .project-identifier,
.case-board .project-heading,
.case-board .visual-stage,
.case-board .capability-row,
.case-board .project-link {
  will-change: opacity, transform;
}
.stage-contact {
  z-index: 5;
  margin-top: 0;
  background: var(--motion-stage);
  border-radius: 34px 34px 0 0;
  box-shadow: 0 -30px 100px rgba(0, 0, 0, .18);
  position: relative;
}
.stage-contact::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 1px;
  background: rgba(244, 243, 237, .22);
  opacity: var(--end-line, 0);
}
.stage-contact.is-visible { opacity: 1; }
.site-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 20;
  opacity: 0;
  transform: translateY(-100%);
  pointer-events: none;
  transition: opacity .32s ease, transform .32s cubic-bezier(.2, .72, .24, 1), background .32s ease, color .32s ease;
}
.site-header[data-nav-state="hero"],
.site-header[data-nav-state="sheet"],
.site-header[data-nav-state="stage"] { opacity: 1; transform: none; pointer-events: auto; }
.site-header[data-nav-state="hero"] { opacity: 0; transform: translateY(-100%); pointer-events: none; }
.site-header[data-nav-state="hero"],
.site-header[data-nav-state="stage"] { background: rgba(16, 32, 31, .92); border-bottom-color: rgba(244, 243, 237, .16); }
.site-header[data-nav-state="hero"] .wordmark,
.site-header[data-nav-state="stage"] .wordmark { color: var(--motion-stage-ink); }
.site-header[data-nav-state="hero"] .wordmark span,
.site-header[data-nav-state="stage"] .wordmark span,
.site-header[data-nav-state="hero"] nav,
.site-header[data-nav-state="stage"] nav { color: var(--motion-stage-muted); }
.site-header[data-nav-state="sheet"] { background: rgba(247, 245, 239, .94); border-bottom-color: rgba(23, 33, 31, .14); }
.site-header[data-nav-state="sheet"] .wordmark,
.site-header[data-nav-state="sheet"] nav { color: var(--motion-ink); }
.site-header[data-nav-state="sheet"] .wordmark span { color: var(--motion-muted); }
.site-header[data-nav-state="sheet"] nav a:hover,
.site-header[data-nav-state="sheet"] nav a:focus-visible { color: var(--motion-ink); }
.site-header[data-nav-state="hero"] #work,
.site-header[data-nav-state="stage"] #work { color: var(--motion-stage-ink); }

@media (max-width: 640px) {
  .stage-viewport { min-height: 620px; }
  .hero-stage .opening { padding-top: 86px; }
  .hero-stage .hero-stack { padding-top: 28px; }
  .hero-stage .opening-capabilities { bottom: 16px; }
  .case-board { margin-top: 0; border-radius: 24px; }
  .case-board::before { border-radius: 24px; }
  .stage-about, .stage-contact { border-radius: 24px 24px 0 0; }
  .stage-about { padding-top: 88px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-stage, .case-board, .stage-about { transform: none; }
  .hero-stage::after, .stage-about::before, .stage-about::after, .stage-contact::before { opacity: 0; }
  .stage-about .about-lead, .stage-about .about-body, .stage-about .capability-grid, .stage-about .experience-grid,
  .stage-contact h2, .stage-contact > p, .stage-contact .footer-line { opacity: 1; transform: none; transition: none; }
  .site-header { transition: none; }
}

/* V5 stage handoff: the tail stage is a real underlay, not a card that
   slides over the last case. The case sheet owns the foreground edge. */
.stage-about {
  position: relative;
  z-index: 1;
  margin-top: calc(-1 * var(--about-stage-height, 100svh));
  padding: 0 0 158px;
  overflow: visible;
  background: var(--motion-stage);
  border: 0;
  box-shadow: none;
  transform: none;
}
.about-stage-track {
  position: relative;
  /* Enter under the sheet, hold as a readable stage, then release. */
  height: calc(var(--about-stage-height, 100svh) * 2 + var(--about-hold, 96px));
  min-height: 0;
  margin: 0;
  background: transparent;
}
.about-stage-viewport {
  position: sticky;
  top: 0;
  z-index: 2;
  height: var(--about-stage-height, 100svh);
  min-height: 0;
  overflow: hidden;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  opacity: 1;
  transform: none;
  will-change: auto;
}
.about-stage-backdrop {
  display: none;
}
.about-stage-viewport::before {
  display: none;
}
.about-stage-viewport > .about-content {
  padding-top: clamp(168px, 24vh, 230px);
}
.stage-about .about-lead,
.stage-about .about-body {
  opacity: var(--end-lead-opacity, 0);
  transform: translate3d(0, var(--end-lead-y, 24px), 0);
  transition: none;
}
.stage-about .about-body {
  opacity: var(--end-body-opacity, 0);
  transform: translate3d(0, var(--end-body-y, 30px), 0);
}

/* The normal About flow must start after the sticky stage releases. It is
   deliberately not pulled upward or animated by the stage controller. */
.stage-about .about-flow {
  position: relative;
  z-index: 1;
  /* A small handoff overlap closes the stage without pulling rows under the
     opening copy. The old full-viewport offset caused the two layers to
     occupy the same reading area. */
  margin-top: calc(-1 * clamp(128px, 24vh, 200px));
  padding-top: 36px;
  background: transparent;
  opacity: 1;
  transform: none;
  will-change: auto;
}
.stage-about .about-flow .capability-grid { margin-top: 48px; }
.stage-about .about-flow .capability-grid,
.stage-about .about-flow .experience-grid {
  opacity: 1;
  transform: none;
}

@media (max-width: 640px) {
  .about-stage-viewport {
    height: var(--about-stage-height, 100svh);
    border-radius: 0;
  }
  .about-stage-viewport > .about-content { padding-top: 124px; }
  .stage-about .about-flow { padding-top: 36px; }
}

@media (prefers-reduced-motion: reduce) {
  .stage-about {
    margin-top: 0;
    padding-top: 0;
  }
  .about-stage-track {
    height: auto;
    min-height: 0;
  }
  .about-stage-viewport {
    position: relative;
    height: auto;
    min-height: 0;
    overflow: visible;
    border-radius: 0;
    opacity: 1;
    transform: none;
  }
  .stage-about .about-lead,
  .stage-about .about-body,
  .stage-about .about-flow {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .stage-about .about-flow { margin-top: 0; }
}
