/* Portfolio pages: home, skill tree, skill, and case pages. */
.pf-page {
  --pf-bg: #fbfbf8;
  --pf-panel: #ffffff;
  --pf-ink: #1d1d1f;
  --pf-muted: #6e6e73;
  --pf-line: #e3e3dd;
  --pf-dark: #0d1213;
  --pf-dark-panel: #161d1e;
  --pf-dark-ink: #f5f5f7;
  --pf-dark-muted: #9aa3a2;
  --pf-accent: var(--forest);
  --pf-header: 74px;
  --pf-sans: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", Inter, system-ui, sans-serif;
  --pf-mono: "SF Mono", "JetBrains Mono", Consolas, "Microsoft YaHei", monospace;
  --pf-glow: #5fe3cf;
  background: var(--pf-bg);
  color: var(--pf-ink);
  font: 17px/1.7 var(--pf-sans);
}
.pf-page h1, .pf-page h2, .pf-page h3 { font-family: var(--pf-sans); letter-spacing: -.02em; }
[data-branch="quantum"] { --pf-accent: #4c5fd5; }
[data-branch="software"] { --pf-accent: #0b8576; }
[data-branch="making"] { --pf-accent: #c26a1d; }
[data-branch="academics"] { --pf-accent: #c9503e; }
[data-branch="venture"] { --pf-accent: #0e5b52; }
[data-branch="media"] { --pf-accent: #8a4fb0; }
.pf-dark { --pf-accent: var(--pf-glow); }
.pf-dark [data-branch="quantum"], .pf-dark[data-branch="quantum"] { --pf-accent: #8e9dff; }
.pf-dark [data-branch="software"], .pf-dark[data-branch="software"] { --pf-accent: #4fd6c2; }
.pf-dark [data-branch="making"], .pf-dark[data-branch="making"] { --pf-accent: #f2a65a; }
.pf-dark [data-branch="academics"], .pf-dark[data-branch="academics"] { --pf-accent: #ff8a76; }
.pf-dark [data-branch="venture"], .pf-dark[data-branch="venture"] { --pf-accent: #6fd39b; }
.pf-dark [data-branch="media"], .pf-dark[data-branch="media"] { --pf-accent: #c79bff; }

/* Dark translucent header on the homepage, whose opening act is dark. */
.pf-home .site-header { border-bottom-color: rgba(255, 255, 255, .08); background: rgba(10, 14, 15, .94); backdrop-filter: saturate(160%) blur(18px); }
.pf-home .brand, .pf-home .site-nav a:hover { color: #f5f5f7; }
.pf-home .desktop-nav a { color: #a9b3b2; }
.pf-home .language-switch, .pf-home .search-submit { color: var(--pf-glow); }
.pf-home .desktop-language-switch, .pf-home .header-search { border-bottom-color: rgba(255, 255, 255, .16); }
.pf-home .header-search input { color: #f5f5f7; }
.pf-home .header-search input::placeholder { color: #7d8786; }
.pf-home .search-submit:hover { background: rgba(255, 255, 255, .08); }
.pf-home .mobile-menu summary { border-color: rgba(255, 255, 255, .2); color: #f5f5f7; }
.pf-home .mobile-menu[open] summary { border-color: var(--pf-glow); background: rgba(95, 227, 207, .12); }

.pf-shell { width: min(calc(100% - 48px), 1180px); margin: 0 auto; }
.pf-eyebrow { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; color: var(--pf-accent); font: 600 13px/1.4 var(--pf-mono); letter-spacing: .04em; }
.pf-eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; opacity: .7; }
.pf-dark { color: var(--pf-dark-ink); background-color: var(--pf-dark); background-image: linear-gradient(rgba(255, 255, 255, .028) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .028) 1px, transparent 1px); background-size: 56px 56px; }
.pf-dark h1, .pf-dark h2, .pf-dark h3 { color: var(--pf-dark-ink); }
.pf-text-link { display: inline-flex; gap: 6px; margin-top: 28px; color: var(--pf-accent); font-weight: 600; text-decoration: none; }
.pf-text-link:hover { color: var(--pf-accent); text-decoration: underline; }

.pf-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.pf-button { display: inline-flex; align-items: center; min-height: 46px; padding: 0 24px; border: 1px solid var(--pf-ink); border-radius: 999px; background: var(--pf-ink); color: #fff; font-weight: 600; text-decoration: none; transition: background .2s ease, color .2s ease; }
.pf-button:hover { background: #3a3a3c; color: #fff; }
.pf-button.ghost { background: transparent; color: var(--pf-ink); }
.pf-button.ghost:hover { background: var(--pf-ink); color: #fff; }
.pf-button.light { border-color: #fff; background: #fff; color: var(--pf-ink); }
.pf-button.light:hover { background: #d9d9de; }
.pf-button.ghost.light { background: transparent; color: #fff; }
.pf-button.ghost.light:hover { background: #fff; color: var(--pf-ink); }

/* Hero: name and research line over a live pulse → qubit illustration. */
.pf-hero { position: relative; min-height: calc(100svh - var(--pf-header)); display: flex; align-items: center; overflow: hidden; padding: 72px 0 120px; background: radial-gradient(ellipse at 72% 42%, #11292b 0%, var(--pf-dark) 58%); }
.pf-hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.pf-hero-copy { position: relative; z-index: 1; }
.pf-hero-copy > * { max-width: 620px; }
.pf-hero h1 { margin: 0; color: #fff; font-size: clamp(64px, 8.4vw, 124px); font-weight: 700; line-height: 1; }
.pf-hero h1 span { display: block; margin-top: 16px; color: #8d9796; font: 500 clamp(18px, 1.8vw, 24px)/1.2 var(--pf-mono); letter-spacing: .02em; }
.pf-tagline { margin: 34px 0 0; color: #f5f5f7; font-size: clamp(30px, 3.4vw, 46px); font-weight: 600; line-height: 1.2; letter-spacing: -.02em; }
.pf-intro { margin: 22px 0 0; color: #a3adac; font-size: 18px; }
.pf-hero-caption { position: absolute; right: 24px; bottom: 22px; z-index: 1; margin: 0; color: #6f7a79; font: 12px/1.4 var(--pf-mono); }
.pf-scroll-cue { position: absolute; bottom: 28px; left: 50%; z-index: 1; width: 26px; height: 42px; margin-left: -13px; border: 2px solid rgba(255, 255, 255, .28); border-radius: 14px; }
.pf-scroll-cue span { position: absolute; top: 8px; left: 50%; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--pf-glow); animation: pf-cue 1.8s ease-in-out infinite; }
@keyframes pf-cue { 0%, 100% { transform: translateY(0); opacity: 1; } 60% { transform: translateY(12px); opacity: 0; } }
.pf-rise { animation: pf-rise .9s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--d) * 120ms); }
.pf-hero-canvas { animation: pf-fade 1.6s ease .3s both; }
@keyframes pf-rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes pf-fade { from { opacity: 0; } to { opacity: 1; } }

/* Scene: the portrait develops under a scan line, then identity lines appear. */
.pf-identity-scene { padding: 120px 0; border-top: 1px solid rgba(255, 255, 255, .06); }
.pf-motion .pf-identity-scene { --pf-length: 260; padding: 0; }
.pf-identity-grid { display: grid; grid-template-columns: minmax(260px, 420px) minmax(0, 1fr); gap: clamp(40px, 7vw, 112px); align-items: center; }
.pf-identity-photo { margin: 0; }
.pf-identity-frame { position: relative; overflow: hidden; aspect-ratio: 5 / 6; border-radius: 24px; background: #0f1718; box-shadow: 0 0 0 1px rgba(95, 227, 207, .18), 0 40px 80px rgba(0, 0, 0, .45); }
.pf-identity-frame img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; }
.pf-scanline { display: none; }
.pf-motion .pf-identity-frame img { clip-path: inset(0 0 calc((1 - var(--scan, 0)) * 100%) 0); filter: saturate(calc(.2 + var(--scan, 0) * .8)) contrast(1.05); }
.pf-motion .pf-scanline { position: absolute; right: 0; left: 0; top: calc(var(--scan, 0) * 100%); display: block; height: 2px; background: var(--pf-glow); box-shadow: 0 0 18px 4px rgba(95, 227, 207, .55); opacity: calc((1 - var(--scan, 0)) * 12); }
.pf-motion .pf-identity-frame::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(95, 227, 207, .06) 0 1px, transparent 1px 4px); opacity: calc(1 - var(--scan, 0)); }
.pf-identity-copy h2 { margin: 0; font-size: clamp(44px, 5vw, 72px); font-weight: 700; }
.pf-identity-list { display: grid; gap: 0; margin: 36px 0 0; padding: 0; border-top: 1px solid rgba(255, 255, 255, .1); list-style: none; counter-reset: id; }
.pf-identity-list li { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 2px 0; padding: 18px 0; border-bottom: 1px solid rgba(255, 255, 255, .1); counter-increment: id; transition: opacity .5s ease, transform .5s ease; }
.pf-identity-list li::before { content: counter(id, decimal-leading-zero); grid-row: span 2; color: var(--pf-glow); font: 500 13px/1.9 var(--pf-mono); }
.pf-identity-list strong { color: #f5f5f7; font-size: clamp(19px, 1.7vw, 23px); font-weight: 600; }
.pf-identity-list span { color: var(--pf-dark-muted); font-size: 15px; }
.pf-motion .pf-identity-list li:not(.is-visible) { opacity: 0; transform: translateX(-16px); }

/* Shared chapter header. */
.pf-chapter-head { max-width: 820px; }
.pf-chapter-head h2 { margin: 0; font-size: clamp(40px, 5.6vw, 72px); font-weight: 700; line-height: 1.08; }
.pf-chapter-head > p:not(.pf-eyebrow) { margin: 24px 0 0; color: var(--pf-muted); font-size: 20px; }
.pf-dark .pf-chapter-head > p:not(.pf-eyebrow) { color: var(--pf-dark-muted); }

/* Static fallback first: scenes become pinned only when portfolio.js adds .pf-motion. */
.pf-sticky { position: relative; }
.pf-motion [data-scene] { height: calc(var(--pf-length, 300) * 1vh); }
.pf-motion [data-scene] .pf-sticky { position: sticky; top: var(--pf-header); height: calc(100vh - var(--pf-header)); overflow: hidden; display: flex; flex-direction: column; justify-content: center; }

/* Scene: the tree grows a branch per step. */
.pf-tree-scene { padding: 96px 0; border-top: 1px solid rgba(255, 255, 255, .06); }
.pf-motion .pf-tree-scene { --pf-length: 520; padding: 0; }
.pf-tree-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 48px; align-items: center; }
.pf-tree-steps { display: grid; gap: 56px; }
.pf-tree-step h2 { margin: 0; font-size: clamp(34px, 4vw, 54px); line-height: 1.12; }
.pf-tree-step > p:not(.pf-eyebrow) { margin: 18px 0 0; color: var(--pf-dark-muted); font-size: 19px; }
.pf-step-skills { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 0; padding: 0; list-style: none; }
.pf-step-skills li { padding: 5px 12px; border: 1px solid color-mix(in srgb, var(--pf-accent) 40%, transparent); border-radius: 999px; background: color-mix(in srgb, var(--pf-accent) 12%, transparent); color: var(--pf-accent); font-size: 14px; font-weight: 600; }
.pf-tree-step .pf-text-link { margin-top: 20px; }
.pf-motion .pf-tree-steps { position: relative; display: block; min-height: 420px; }
.pf-motion .pf-tree-step { position: absolute; inset: 0 0 auto; opacity: 0; transform: translateY(28px); pointer-events: none; transition: opacity .45s ease, transform .45s ease; }
.pf-motion .pf-tree-step.is-active { opacity: 1; transform: none; pointer-events: auto; }
.pf-motion .pf-tree-step.is-past { transform: translateY(-28px); }

.pf-tree { display: block; width: 100%; height: auto; max-height: calc(100vh - var(--pf-header) - 48px); overflow: visible; }
.pf-tree-trunk, .pf-tree-limb { fill: none; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: var(--draw, 0); }
.pf-tree-trunk { stroke: #e9eeee; stroke-width: 6; filter: drop-shadow(0 0 6px rgba(255, 255, 255, .25)); }
.pf-tree-limb { stroke: var(--pf-accent); stroke-width: 4; filter: drop-shadow(0 0 7px var(--pf-accent)); }
.pf-tree-twig { stroke: var(--pf-accent); stroke-width: 1.5; opacity: .45; }
.pf-tree-leaf { fill: var(--pf-dark); stroke: var(--pf-accent); stroke-width: 2; transition: fill .2s ease; }
.pf-tree-leaf:hover { fill: var(--pf-accent); }
.pf-tree-node { fill: var(--pf-accent); }
.pf-tree-root { fill: #e9eeee; }
.pf-tree-label { fill: #e9eeee; font: 600 18px var(--pf-sans); }
.pf-tree-node { filter: drop-shadow(0 0 8px var(--pf-accent)); }
/* The skill-tree page keeps the tree on a light background. */
.pf-tree-overview .pf-tree-trunk { stroke: var(--pf-ink); filter: none; }
.pf-tree-overview .pf-tree-root { fill: var(--pf-ink); }
.pf-tree-overview .pf-tree-label { fill: var(--pf-ink); }
.pf-tree-overview .pf-tree-leaf { fill: var(--pf-bg); }
.pf-tree-overview .pf-tree-limb, .pf-tree-overview .pf-tree-node { filter: none; }
.pf-tree a:hover .pf-tree-label { fill: var(--pf-accent); }
.pf-tree-branch { transition: opacity .4s ease; }
.pf-tree-twig, .pf-tree-leaf, .pf-tree-node, .pf-tree-label { transition: opacity .4s ease; opacity: var(--bloom, 1); }
.pf-tree-twig { opacity: calc(var(--bloom, 1) * .45); }
.pf-tree-stage.is-focused .pf-tree-branch:not(.is-active) { opacity: .28; }

/* Scene: the quantum control chain, one layer per step. */
.pf-quantum-scene { padding: 120px 0 96px; }
.pf-motion .pf-quantum-scene { --pf-length: 360; padding: 0 0 96px; }
.pf-quantum-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto 1fr; gap: 40px 64px; align-items: start; }
.pf-quantum-grid .pf-chapter-head { grid-column: 1 / -1; }
.pf-quantum-grid .pf-chapter-head h2 { font-size: clamp(36px, 4.4vw, 60px); }
.pf-layer-stack { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.pf-layer { position: relative; padding: 22px 24px 22px 28px; border-radius: 18px; background: var(--pf-dark-panel); transition: background .35s ease, opacity .35s ease; }
.pf-layer::before { content: ""; position: absolute; top: 22px; bottom: 22px; left: 0; width: 3px; border-radius: 2px; background: var(--pf-accent); transform: scaleY(0); transition: transform .35s ease; }
.pf-layer-tag { color: var(--pf-accent); font-size: 13px; font-weight: 600; filter: brightness(1.6); }
.pf-layer h3 { margin: 6px 0 0; font-size: 22px; }
.pf-layer h3 a { text-decoration: none; }
.pf-layer h3 a:hover { color: #fff; text-decoration: underline; }
.pf-layer p { margin: 8px 0 0; color: var(--pf-dark-muted); font-size: 16px; }
.pf-layer small { display: block; margin-top: 10px; color: #6f7a79; font-size: 13px; }
.pf-motion .pf-layer:not(.is-active) { opacity: .45; }
.pf-motion .pf-layer:not(.is-active) p, .pf-motion .pf-layer:not(.is-active) small { display: none; }
.pf-layer.is-active::before { transform: scaleY(1); }
.pf-layer-visuals { position: relative; display: grid; gap: 20px; }
.pf-layer-visual img { display: block; width: 100%; height: auto; border-radius: 18px; background: #fff; }
.pf-motion .pf-layer-visuals { min-height: 360px; }
.pf-motion .pf-layer-visual { position: absolute; inset: 0 0 auto; opacity: 0; transform: scale(.97); transition: opacity .5s ease, transform .5s ease; }
.pf-motion .pf-layer-visual.is-active { opacity: 1; transform: none; }
.pf-timing { padding: 32px 28px; border: 1px solid #263132; border-radius: 18px; background: var(--pf-dark-panel); }
.pf-timing-row { display: flex; gap: 10px; height: 34px; align-items: flex-end; margin-bottom: 10px; }
.pf-timing-row i { flex: 1; height: 100%; border-radius: 3px; background: var(--pf-accent); opacity: .18; animation: pf-tick 2.4s steps(1) infinite; animation-delay: calc((var(--t) + var(--row) * 3) * 200ms); }
@keyframes pf-tick { 0%, 30% { opacity: 1; filter: brightness(1.6); } 31%, 100% { opacity: .18; } }
.pf-timing p { margin: 16px 0 0; color: var(--pf-dark-muted); font-size: 15px; }
.pf-dark .pf-branch-skills { margin-top: 56px; }
.pf-motion .pf-dark .pf-branch-skills, .pf-motion .pf-gallery-scene > .pf-branch-skills { margin-top: 0; }
.pf-dark .pf-skill-chip { border-color: #263132; background: var(--pf-dark-panel); color: var(--pf-dark-ink); }
.pf-dark .pf-skill-chip small, .pf-dark .pf-level em { color: var(--pf-dark-muted); }

/* Scene: a horizontal gallery of things built by hand. */
.pf-gallery-scene { padding: 120px 0 96px; background: #f2f1ec; }
.pf-motion .pf-gallery-scene { padding: 0 0 96px; }
.pf-motion .pf-gallery-scene .pf-sticky { justify-content: center; gap: 40px; }
.pf-gallery-scene .pf-chapter-head h2 { font-size: clamp(36px, 4.4vw, 60px); }
.pf-gallery-viewport { margin-top: 48px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: max(24px, calc((100vw - 1180px) / 2)); padding-bottom: 12px; }
.pf-motion .pf-gallery-viewport { margin-top: 0; overflow: visible; }
.pf-gallery-track { display: flex; gap: 20px; width: max-content; padding: 0 max(24px, calc((100vw - 1180px) / 2)); transform: translate3d(var(--shift, 0px), 0, 0); will-change: transform; }
.pf-gallery-item { flex: 0 0 auto; width: min(420px, 78vw); color: var(--pf-ink); text-decoration: none; scroll-snap-align: start; }
.pf-gallery-visual { overflow: hidden; aspect-ratio: 4 / 3; border-radius: 22px; background: #e2e1db; }
.pf-gallery-visual img, .pf-gallery-visual video { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.pf-gallery-item:hover .pf-gallery-visual img, .pf-gallery-item:hover .pf-gallery-visual video { transform: scale(1.03); }
.pf-gallery-item p { display: grid; margin: 14px 4px 0; }
.pf-gallery-item span { color: var(--pf-muted); font: 12px var(--pf-mono); }
.pf-gallery-item strong { font-size: 19px; }
.pf-gallery-scene > .pf-branch-skills { margin-top: 56px; }

/* Ordinary branch chapters. */
.pf-branch { position: relative; padding: 120px 0; border-top: 1px solid var(--pf-line); background-image: radial-gradient(rgba(29, 29, 31, .07) 1px, transparent 1px); background-size: 22px 22px; }
.pf-branch > .pf-shell { position: relative; }
.pf-case-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 56px; }
.pf-case-grid.compact { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 0; }
.pf-case-card { display: flex; flex-direction: column; overflow: hidden; border-radius: 22px; background: var(--pf-panel); color: var(--pf-ink); text-decoration: none; box-shadow: 0 1px 2px rgba(0, 0, 0, .04); transition: transform .3s ease, box-shadow .3s ease; }
.pf-case-card:hover { color: var(--pf-ink); transform: translateY(-4px); box-shadow: 0 0 0 1px color-mix(in srgb, var(--pf-accent) 45%, transparent), 0 18px 40px color-mix(in srgb, var(--pf-accent) 14%, transparent); }
.pf-case-card.large { grid-row: span 2; }
.pf-case-visual { overflow: hidden; aspect-ratio: 16 / 10; background: #efeee9; }
.pf-case-card.large .pf-case-visual { aspect-ratio: 4 / 3; }
.pf-case-visual img, .pf-case-visual video { display: block; width: 100%; height: 100%; object-fit: cover; }
.pf-case-copy { display: flex; flex: 1; flex-direction: column; padding: 24px 26px 26px; }
.pf-case-card.no-visual .pf-case-copy { justify-content: flex-end; min-height: 220px; background: linear-gradient(160deg, color-mix(in srgb, var(--pf-accent) 9%, #fff), #fff 60%); }
.pf-case-period { margin: 0 0 6px; color: var(--pf-muted); font: 12px/1.5 var(--pf-mono); }
.pf-case-copy h3 { margin: 0; font-size: 22px; line-height: 1.3; }
.pf-case-card.large h3 { font-size: 28px; }
.pf-case-copy p:not(.pf-case-period) { margin: 10px 0 0; color: var(--pf-muted); font-size: 15px; }
.pf-case-more { margin-top: auto; padding-top: 16px; color: var(--pf-accent); font-size: 14px; font-weight: 600; }

.pf-branch-skills { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 40px; }
.pf-skill-chip { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 12px 18px; border: 1px solid var(--pf-line); border-radius: 16px; background: var(--pf-panel); color: var(--pf-ink); text-decoration: none; transition: border-color .2s ease; }
.pf-skill-chip:hover { border-color: var(--pf-accent); color: var(--pf-ink); }
.pf-skill-chip strong { font-size: 15px; }
.pf-skill-chip small { color: var(--pf-muted); font-size: 12px; }
.pf-branch-skills.wide .pf-skill-chip { min-width: 240px; }
.pf-level { display: inline-flex; align-items: center; gap: 3px; }
.pf-level i { width: 8px; height: 8px; border-radius: 50%; background: color-mix(in srgb, var(--pf-accent) 18%, transparent); }
.pf-level i.on { background: var(--pf-accent); }
.pf-level em { margin-left: 5px; color: var(--pf-muted); font-size: 12px; font-style: normal; }

.pf-numbers { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin: 56px 0 0; }
.pf-numbers div { padding: 28px; border-radius: 22px; background: var(--pf-panel); }
.pf-numbers dt { color: var(--pf-muted); font-size: 14px; }
.pf-numbers p { margin: 6px 0 0; color: var(--pf-muted); font-size: 14px; }
.pf-numbers dd { margin: 6px 0 0; color: var(--pf-accent); font-size: clamp(34px, 3.6vw, 48px); font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.1; letter-spacing: -.02em; }
.pf-numbers div { box-shadow: inset 0 0 0 1px var(--pf-line); }
.pf-top-honors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 20px; }
.pf-honor-feature { overflow: hidden; margin: 0; border-radius: 22px; background: var(--pf-panel); }
.pf-honor-feature img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: contain; background: #f2f1ec; }
.pf-honor-feature figcaption { padding: 24px 26px 28px; }
.pf-honor-feature span { color: var(--pf-accent); font-size: 13px; font-weight: 600; }
.pf-honor-feature strong { display: block; margin-top: 4px; font-size: 23px; line-height: 1.3; }
.pf-honor-feature p { margin: 10px 0 0; color: var(--pf-muted); font-size: 15px; }
.pf-honor-list { margin: 40px 0 0; padding: 0; border-top: 1px solid var(--pf-line); list-style: none; }
.pf-honor-list li { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto; gap: 4px 20px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--pf-line); }
.pf-honor-list.full li { grid-template-columns: 110px minmax(0, 1fr) auto 56px; }
.pf-honor-list time { color: var(--pf-muted); font: 13px var(--pf-mono); }
.pf-honor-list strong { font-size: 17px; font-weight: 600; }
.pf-honor-list span { color: var(--pf-muted); font-size: 13px; }
.pf-honor-thumb img { display: block; width: 56px; height: 42px; border-radius: 6px; object-fit: cover; }

/* Contact. */
.pf-contact { padding: 140px 0; text-align: center; }
.pf-contact h2 { margin: 0; font-size: clamp(48px, 7vw, 96px); font-weight: 700; }
.pf-contact .pf-eyebrow { color: var(--pf-dark-muted); }
.pf-email { display: inline-block; margin-top: 28px; color: var(--pf-dark-ink); font-size: clamp(20px, 2.6vw, 32px); font-weight: 500; text-decoration: none; border-bottom: 1px solid #4a5354; }
.pf-email:hover { color: #fff; border-bottom-color: #fff; }
.pf-contact .pf-actions { justify-content: center; }
.pf-message { max-width: 640px; margin: 56px auto 0; text-align: left; }
.pf-message summary { color: var(--pf-dark-muted); cursor: pointer; text-align: center; }
.pf-message .contact-form { margin-top: 24px; }
.pf-message .contact-form button { border-radius: 999px; }

/* Skill tree, skill, and case pages. */
.pf-page-head { padding: 88px 0 48px; }
.pf-page-head h1 { margin: 0; font-size: clamp(40px, 5.4vw, 72px); font-weight: 700; line-height: 1.1; }
.pf-lead { max-width: 760px; margin: 22px 0 0; color: var(--pf-muted); font-size: 21px; }
.pf-trail { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; color: var(--pf-muted); font-size: 14px; }
.pf-trail a { color: var(--pf-accent); text-decoration: none; }
.pf-tag-link { padding: 4px 12px; border-radius: 999px; background: color-mix(in srgb, var(--pf-accent) 10%, transparent); font-weight: 600; }
.pf-meta { display: flex; flex-wrap: wrap; gap: 16px 40px; margin: 32px 0 0; }
.pf-meta dt { color: var(--pf-muted); font-size: 13px; }
.pf-meta dd { margin: 4px 0 0; font-weight: 600; }
.pf-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 0; padding: 0; list-style: none; }
.pf-tags li { padding: 4px 12px; border: 1px solid var(--pf-line); border-radius: 999px; color: var(--pf-muted); font-size: 14px; }
.pf-section { padding: 48px 0 32px; }
.pf-section-head { margin-bottom: 24px; }
.pf-section-head h2 { margin: 0; font-size: 34px; }
.pf-section-head small { margin-left: 12px; color: var(--pf-muted); font-size: 18px; font-weight: 500; }

.pf-tree-overview { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: start; padding-bottom: 40px; }
.pf-tree-overview .pf-tree-stage { position: sticky; top: calc(var(--pf-header) + 24px); }
.pf-outline > section { padding: 26px 0; border-top: 1px solid var(--pf-line); }
.pf-outline h2 { margin: 0; font-size: 26px; }
.pf-outline h2 a { color: var(--pf-ink); text-decoration: none; }
.pf-outline h2 a:hover { color: var(--pf-accent); }
.pf-outline > section > p { margin: 8px 0 0; color: var(--pf-muted); font-size: 16px; }
.pf-outline ul { margin: 12px 0 0; padding: 0 0 0 18px; border-left: 2px solid color-mix(in srgb, var(--pf-accent) 25%, transparent); list-style: none; }
.pf-outline li { margin: 8px 0; }
.pf-outline li a { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; color: var(--pf-ink); text-decoration: none; }
.pf-outline li a:hover strong { color: var(--pf-accent); }
.pf-outline li strong { font-weight: 600; }
.pf-outline li small { min-width: 22px; padding: 0 7px; border-radius: 999px; background: #efeee9; color: var(--pf-muted); font-size: 12px; text-align: center; }
.pf-outline li ul { margin-top: 4px; }

.pf-case-hero { margin: 0 auto; }
.pf-case-hero img, .pf-case-hero video { display: block; width: 100%; max-height: 72vh; object-fit: contain; border-radius: 24px; background: #efeee9; }
.pf-case-hero figcaption, .pf-case-gallery figcaption { margin-top: 10px; color: var(--pf-muted); font-size: 14px; }
.pf-case-body { max-width: 780px; padding: 56px 0 24px; }
.pf-case-body section + section { margin-top: 44px; }
.pf-case-body h2 { margin: 0 0 12px; font-size: 26px; }
.pf-prose p, .pf-prose li { color: #3a3a3c; }
.pf-prose ol, .pf-prose ul, .pf-links { padding-left: 1.3em; }
.pf-prose li + li { margin-top: 8px; }
.pf-links a { color: var(--pf-accent); }
.pf-case-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; padding: 24px 0; }
.pf-case-gallery figure { margin: 0; }
.pf-case-gallery img, .pf-case-gallery video { display: block; width: 100%; border-radius: 18px; background: #efeee9; }

.pf-reveal { transition: opacity .7s ease, transform .7s ease; }
.pf-motion .pf-reveal:not(.is-visible) { opacity: 0; transform: translateY(24px); }

@media (max-width: 1000px) {
  .pf-tree-grid, .pf-quantum-grid, .pf-tree-overview { grid-template-columns: 1fr; }
  .pf-case-grid.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pf-tree-overview .pf-tree-stage { position: static; }
  .pf-tree-stage { order: -1; max-width: 560px; }
}

@media (max-width: 760px) {
  .pf-page { --pf-header: 66px; font-size: 16px; }
  .pf-shell { width: calc(100% - 32px); }
  .pf-hero { min-height: 0; padding: 380px 0 72px; align-items: flex-end; }
  .pf-hero-caption { right: 16px; left: 16px; bottom: 16px; text-align: left; }
  .pf-identity-grid { grid-template-columns: 1fr; gap: 32px; }
  .pf-identity-photo { max-width: 300px; }
  .pf-gallery-track { padding: 0 16px; }
  .pf-gallery-viewport { scroll-padding-inline: 16px; }
  .pf-scroll-cue { display: none; }
  .pf-intro { font-size: 17px; }
  .pf-chapter-head > p:not(.pf-eyebrow), .pf-lead { font-size: 17px; }
  .pf-branch, .pf-tree-scene, .pf-quantum-scene, .pf-gallery-scene, .pf-identity-scene { padding: 72px 0; }
  .pf-case-grid, .pf-case-grid.compact, .pf-top-honors, .pf-case-gallery { grid-template-columns: 1fr; }
  .pf-case-card.large { grid-row: auto; }
  .pf-honor-list li, .pf-honor-list.full li { grid-template-columns: 1fr; }
  .pf-honor-thumb { display: none; }
  .pf-contact { padding: 96px 0; }
  .pf-page-head { padding: 56px 0 32px; }
}

@media (prefers-reduced-motion: reduce) {
  .pf-rise, .pf-hero-canvas, .pf-scroll-cue span, .pf-timing-row i { animation: none; }
  .pf-reveal, .pf-tree-step, .pf-layer, .pf-layer-visual, .pf-case-card { transition: none; }
}
