:root {
  --ink: #1e2726;
  --muted: #697270;
  --paper: #fffdf9;
  --wash: #f1eee7;
  --line: #dcd9d2;
  --accent: #f36f45;
  --accent-dark: #ca4e2a;
  --sage: #345653;
  --shadow: 0 30px 90px rgba(31, 42, 40, 0.16);
  --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: #ebe8e1;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  padding: 44px 24px;
}

a { color: inherit; }
button { font: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 20px; top: -60px; padding: 10px 16px; background: var(--ink); color: white; z-index: 20; transition: top .2s; }
.skip-link:focus { top: 20px; }

.page-shell { width: min(1120px, 100%); margin: 0 auto; background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.site-nav { min-height: 78px; display: flex; align-items: center; justify-content: space-between; padding: 0 64px; border-bottom: 1px solid var(--line); }
.brand { color: var(--ink); font-size: 22px; font-weight: 800; letter-spacing: -.06em; text-decoration: none; }
.brand span { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 34px; }
.nav-links a { color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .1em; text-decoration: none; text-transform: uppercase; transition: color .2s; }
.nav-links a:hover, .nav-links a:focus-visible { color: var(--accent); }
.nav-toggle { display: none; border: 0; background: none; padding: 10px; }
.nav-toggle > span:not(.sr-only) { display: block; width: 23px; height: 2px; margin: 5px 0; background: var(--ink); }

.hero { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 88px; align-items: center; padding: 82px 78px 88px; }
.eyebrow, .pub-meta, .talk-year { margin: 0 0 18px; color: var(--accent-dark); font-size: 10px; font-weight: 800; letter-spacing: .19em; }
.hero h1 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(44px, 6vw, 72px); font-weight: 500; letter-spacing: -.055em; line-height: .98; }
.hero h1 span { display: block; margin-top: 15px; color: var(--sage); font-family: "Songti SC", SimSun, serif; font-size: .48em; letter-spacing: .06em; }
.role { margin: 24px 0 12px; color: var(--ink); font-size: 15px; font-weight: 700; }
.hero-intro { max-width: 620px; margin: 0; color: var(--muted); font-family: Georgia, "Times New Roman", serif; font-size: 15px; line-height: 1.65; }
.hero-intro p { margin: 0 0 11px; }
.hero-intro p:last-child { margin-bottom: 0; }
.hero-intro a { color: var(--accent-dark); font-weight: 600; text-decoration: none; }
.hero-intro a:hover { text-decoration: underline; }
.social-links { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; margin-top: 30px; }
.social-links a { display: inline-flex; gap: 5px; align-items: center; color: var(--accent-dark); font-size: 12px; font-weight: 700; text-decoration: none; }
.social-links a:hover { text-decoration: underline; }
.social-links > span { color: #c7c3bb; }
.social-links svg { width: 13px; height: 13px; fill: currentColor; }

.portrait-wrap { justify-self: end; width: 100%; }
.portrait-frame { padding: 9px; background: white; border: 1px solid #dfd9cf; border-radius: 3px; box-shadow: 18px 22px 0 #e6e1d7; transform: rotate(1.7deg); transition: transform .35s ease, box-shadow .35s ease; }
.portrait-frame:hover { transform: rotate(0deg) translateY(-5px); box-shadow: 14px 28px 0 #e6e1d7; }
.portrait { display: block; width: 100%; aspect-ratio: 440 / 520; object-fit: cover; object-position: center; background: #ddd; }

.section { display: grid; grid-template-columns: 176px minmax(0, 1fr); gap: 42px; padding: 82px 78px; border-top: 1px solid var(--line); scroll-margin-top: 20px; }
.section:nth-of-type(even) { background: #fcfaf6; }
.section-label { padding-top: 7px; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.section-label span { display: inline-grid; width: 28px; height: 28px; place-items: center; margin-right: 8px; border: 1px solid #cfd2cd; border-radius: 50%; color: var(--accent-dark); font-size: 9px; }
.section-content { min-width: 0; }

.section-heading-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 34px; }
.section-heading-row h2, .split-lists h2 { margin: 0 0 5px; font-family: Georgia, "Times New Roman", serif; font-size: 30px; font-weight: 500; letter-spacing: -.03em; }
.section-heading-row p { margin: 0; color: var(--muted); font-size: 13px; }
.section-heading-row .pub-interaction-note { margin-top: 7px; color: #989d9a; font-size: 10px; letter-spacing: .02em; }
.filter-controls { display: flex; gap: 5px; flex: 0 0 auto; padding: 4px; border: 1px solid var(--line); border-radius: 99px; background: white; }
.filter-btn { padding: 7px 13px; border: 0; border-radius: 99px; background: transparent; color: var(--muted); cursor: pointer; font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; transition: background .2s, color .2s; }
.filter-btn.active { background: var(--ink); color: white; }

.publication-list { display: grid; gap: 2px; }
.publication { display: grid; grid-template-columns: 216px minmax(0, 1fr); gap: 28px; padding: 26px 0; border-top: 1px solid var(--line); transition: opacity .25s ease, transform .25s ease; }
.publication:last-child { border-bottom: 1px solid var(--line); }
.publication[hidden] { display: none; }
.publication.entering { opacity: 0; transform: translateY(8px); }
.pub-visual { position: relative; display: block; width: 100%; aspect-ratio: 8 / 5; padding: 0; overflow: hidden; border: 0; border-radius: 5px; background: #d9d7d1; box-shadow: inset 0 0 0 1px rgba(30,39,38,.08); cursor: pointer; isolation: isolate; }
.pub-visual::after { content: ""; position: absolute; inset: 0; z-index: 3; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(255,255,255,.22); pointer-events: none; }
.pub-image { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; transition: opacity .4s ease, transform .55s cubic-bezier(.2,.75,.2,1); }
.pub-input { z-index: 0; }
.pub-result { z-index: 1; opacity: 0; transform: scale(1.025); }
.pub-visual:hover .pub-result,
.pub-visual:focus-visible .pub-result,
.pub-visual.is-result .pub-result { opacity: 1; transform: scale(1); }
.pub-visual:hover .pub-input,
.pub-visual:focus-visible .pub-input,
.pub-visual.is-result .pub-input { opacity: 0; transform: scale(1.015); }
.pub-visual:focus-visible { outline: 3px solid rgba(243,111,69,.55); outline-offset: 3px; }
.pub-visual-contain .pub-image { object-fit: cover; }
.pub-visual-tailsteer { background: #ededed; }
.pub-visual-tailsteer .pub-input { object-fit: contain; object-position: center; }
.tailsteer-comparison { position: absolute; inset: 0; z-index: 1; display: grid; grid-template-columns: 1fr 1fr; opacity: 0; transform: scale(1.01); transition: opacity .12s ease, transform .25s ease; }
.pub-visual-tailsteer:hover .tailsteer-comparison,
.pub-visual-tailsteer:focus-visible .tailsteer-comparison,
.pub-visual-tailsteer.is-result .tailsteer-comparison { opacity: 1; transform: scale(1); }
.tailsteer-panel { position: relative; display: grid; min-width: 0; overflow: hidden; place-items: center; background: #ededed; }
.tailsteer-panel + .tailsteer-panel { border-left: 1px solid rgba(30,39,38,.2); }
.tailsteer-frame { display: block; width: 100%; height: 100%; object-fit: contain; object-position: center; }
.tailsteer-model-label { position: absolute; top: 6px; left: 6px; padding: 3px 5px; border-radius: 2px; background: rgba(37,43,42,.72); color: white; font-size: 6px; font-weight: 800; letter-spacing: .09em; line-height: 1; text-transform: uppercase; backdrop-filter: blur(4px); }
.tailsteer-model-label-result { background: rgba(193,77,41,.82); }
.tailsteer-stage { min-width: 47px; }
.tailsteer-stage > b { font: inherit; }
.pub-visual-anystitch { background: #06090a; }
.pub-visual-anystitch .pub-input { transform: scale(1.005); }
.pub-visual-anystitch:hover .pub-input,
.pub-visual-anystitch:focus-visible .pub-input,
.pub-visual-anystitch.is-result .pub-input { transform: scale(1.015); }
.pub-visual-anystitch .pub-result { transform: scale(1.02); }
.pub-visual-anystitch:hover .pub-result,
.pub-visual-anystitch:focus-visible .pub-result,
.pub-visual-anystitch.is-result .pub-result { transform: scale(1); }
.anystitch-input-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 2px; padding: 2px; overflow: hidden; background: #e9e5dd; }
.anystitch-input-grid > span { min-width: 0; min-height: 0; overflow: hidden; background: #d8d3ca; }
.anystitch-input-grid > span:nth-child(-n + 3) { grid-row: 1; grid-column: span 2; }
.anystitch-input-grid > span:nth-child(4) { grid-row: 2; grid-column: 1 / span 3; }
.anystitch-input-grid > span:nth-child(5) { grid-row: 2; grid-column: 4 / span 3; }
.anystitch-input-grid img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.anystitch-input-grid::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 0 1px rgba(255,255,255,.28), inset 0 -24px 28px rgba(14,22,21,.08); }
.anystitch-panorama { overflow: hidden; background: #06090a; }
.anystitch-panorama::after { content: ""; position: absolute; inset: 0; z-index: 2; background: linear-gradient(90deg, rgba(6,9,10,.12), transparent 12%, transparent 88%, rgba(6,9,10,.12)); pointer-events: none; }
.anystitch-panorama img { position: absolute; top: -6%; left: 0; z-index: 1; display: block; width: 100%; height: 112%; object-fit: cover; object-position: left center; }
.pub-visual-anystitch:hover .anystitch-panorama img,
.pub-visual-anystitch:focus-visible .anystitch-panorama img,
.pub-visual-anystitch.is-result .anystitch-panorama img { animation: anystitch-panorama-scan 5.8s cubic-bezier(.25,.1,.25,1) forwards; }
@keyframes anystitch-panorama-scan {
  from { object-position: left center; }
  to { object-position: right center; }
}
.pub-visual-diagram { background: #fbfaf7; }
.pub-visual-diagram .pub-image { object-fit: cover; }
.pub-state { position: absolute; left: 9px; bottom: 8px; z-index: 4; padding: 4px 7px; border-radius: 2px; background: rgba(20,27,26,.78); color: white; font-size: 8px; font-weight: 800; letter-spacing: .12em; line-height: 1; text-transform: uppercase; backdrop-filter: blur(5px); transition: opacity .3s ease, transform .3s ease; }
.pub-state-result { opacity: 0; transform: translateY(4px); }
.pub-visual:hover .pub-state-input,
.pub-visual:focus-visible .pub-state-input,
.pub-visual.is-result .pub-state-input { opacity: 0; transform: translateY(4px); }
.pub-visual:hover .pub-state-result,
.pub-visual:focus-visible .pub-state-result,
.pub-visual.is-result .pub-state-result { opacity: 1; transform: translateY(0); }
.pub-meta { margin: 1px 0 7px; }
.pub-meta span { color: #aab0ad; margin-right: 8px; }
.pub-details h3 { max-width: 560px; margin: 0 0 8px; font-family: Georgia, "Times New Roman", serif; font-size: 20px; font-weight: 600; letter-spacing: -.02em; line-height: 1.3; }
.authors, .pub-abstract { margin: 0 0 7px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.authors strong { color: var(--ink); }
.pub-abstract { max-width: 580px; color: #7c8381; }
.pub-links { display: flex; gap: 18px; margin-top: 10px; }
.pub-links a { color: var(--accent-dark); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-decoration: none; text-transform: uppercase; }
.pub-links a::after { content: " ↗"; }
.pub-links a:hover { text-decoration: underline; }
.pub-links > span { color: #989d9a; font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.publication-note { margin: 16px 0 0; color: #999b97; font-size: 10px; }.publication-note span { color: var(--accent); }

.education-timeline { display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px; }
.education-item { min-height: 205px; padding: 23px; border: 1px solid var(--line); border-radius: 6px; background: white; transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease; }
.education-item:hover { transform: translateY(-3px); border-color: #e2a48e; box-shadow: 0 12px 30px rgba(31, 42, 40, .07); }
.education-date { margin: 0 0 31px; color: var(--accent-dark); font-size: 9px; font-weight: 800; letter-spacing: .1em; }
.education-item .degree { margin: 0 0 6px; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.education-item h3 { margin: 0 0 9px; font-family: Georgia, "Times New Roman", serif; font-size: 19px; line-height: 1.25; }
.education-item div > p:last-child { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.education-item a { color: var(--accent-dark); font-weight: 600; text-decoration: none; }
.education-item a:hover { text-decoration: underline; }

.experience-list { border-top: 1px solid var(--line); }
.experience-item { display: grid; grid-template-columns: 145px 1fr; gap: 25px; padding: 25px 0; border-bottom: 1px solid var(--line); }
.experience-item .experience-date { margin: 4px 0 0; color: var(--accent-dark); font-size: 9px; font-weight: 800; letter-spacing: .1em; }
.experience-role { margin: 0 0 4px; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.experience-item h3 { margin: 0 0 7px; font-family: Georgia, "Times New Roman", serif; font-size: 21px; font-weight: 600; letter-spacing: -.02em; }
.experience-item div > p:last-child { max-width: 620px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.65; }

.section-heading-row.compact { margin-bottom: 28px; }
.talk-grid { display: grid; grid-template-columns: 1.4fr .7fr; gap: 14px; }
.talk-card { min-height: 230px; padding: 27px; border: 1px solid var(--line); border-radius: 6px; background: white; }
.talk-card h3 { margin: 0 0 9px; font-family: Georgia, "Times New Roman", serif; font-size: 21px; line-height: 1.35; }
.talk-card p:not(.talk-year) { margin: 0 0 18px; color: var(--muted); font-size: 12px; }
.talk-card a { color: var(--accent-dark); font-size: 11px; font-weight: 800; text-decoration: none; text-transform: uppercase; letter-spacing: .06em; }
.featured-talk { display: grid; grid-template-columns: 43% 1fr; gap: 25px; align-items: center; }
.talk-graphic { position: relative; display: grid; min-height: 175px; place-items: center; overflow: hidden; background: var(--sage); }
.talk-graphic span { position: absolute; width: 160px; height: 160px; border: 35px solid var(--accent); border-radius: 50%; left: -42px; top: -34px; }
.talk-graphic::after { content: ""; position: absolute; width: 110px; height: 110px; right: -30px; bottom: -30px; background: #e9b955; transform: rotate(34deg); }
.talk-graphic i { display: grid; width: 45px; height: 45px; place-items: center; border-radius: 50%; background: white; color: var(--accent); font-size: 12px; font-style: normal; z-index: 2; box-shadow: 0 5px 20px rgba(0,0,0,.25); }
.small-talk { display: flex; flex-direction: column; justify-content: flex-end; background: #f4eee7; }

.split-lists { display: grid; grid-template-columns: 1fr 1fr; gap: 52px; }
.split-lists h2 { padding-bottom: 15px; border-bottom: 1px solid var(--line); font-size: 24px; }
.split-lists ul { padding: 0; margin: 0; list-style: none; }
.split-lists li { display: grid; grid-template-columns: 45px 1fr; gap: 12px; padding: 14px 0; border-bottom: 1px solid #ebe8e2; color: var(--muted); font-size: 12px; }
.split-lists li span { color: var(--accent-dark); font-size: 10px; font-weight: 800; }

footer { display: flex; justify-content: space-between; align-items: center; gap: 30px; padding: 28px 78px; background: var(--ink); color: white; }
footer p { margin: 0 0 7px; color: #aeb8b6; font-size: 12px; }
footer a { color: #f58a68; font-size: 12px; font-weight: 700; text-decoration: none; }
.footer-meta { text-align: right; }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }

@media (max-width: 900px) {
  body { padding: 20px; }
  .site-nav { padding: 0 38px; }
  .hero { grid-template-columns: 1fr 250px; gap: 48px; padding: 65px 45px 72px; }
  .section { grid-template-columns: 140px minmax(0, 1fr); gap: 25px; padding: 66px 45px; }
  .publication { grid-template-columns: 180px 1fr; gap: 22px; }
  .talk-grid { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  body { padding: 0; background: var(--paper); }
  .page-shell { border-radius: 0; box-shadow: none; }
  .site-nav { position: relative; min-height: 68px; padding: 0 24px; }
  .nav-toggle { display: block; cursor: pointer; }
  .nav-links { position: absolute; z-index: 5; top: 68px; left: 0; right: 0; display: none; align-items: flex-start; flex-direction: column; gap: 0; padding: 10px 24px 20px; border-bottom: 1px solid var(--line); background: var(--paper); box-shadow: 0 14px 25px rgba(0,0,0,.08); }
  .nav-links.open { display: flex; }
  .nav-links a { width: 100%; padding: 12px 0; }
  .hero { grid-template-columns: 1fr; gap: 49px; padding: 54px 26px 64px; }
  .hero h1 { font-size: 48px; }
  .portrait-wrap { width: min(270px, 85%); justify-self: center; }
  .section { grid-template-columns: 1fr; gap: 26px; padding: 58px 26px; }
  .section-label { padding: 0; }
  .section-heading-row { align-items: flex-start; flex-direction: column; }
  .education-timeline { grid-template-columns: 1fr; }
  .education-item { min-height: 0; }
  .education-date { margin-bottom: 20px; }
  .publication { grid-template-columns: 1fr; gap: 17px; padding: 24px 0 29px; }
  .talk-grid, .split-lists { grid-template-columns: 1fr; }
  .experience-item { grid-template-columns: 1fr; gap: 9px; }
  .featured-talk { grid-template-columns: 1fr; }
  .talk-graphic { min-height: 190px; }
  .split-lists { gap: 38px; }
  footer { align-items: flex-start; flex-direction: column; padding: 28px 26px; }
  .footer-meta { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
  .anystitch-panorama img { animation: none !important; object-position: center; }
}
