/* Editorial layer: shared typography, calm surfaces and readable project evidence. */
@font-face {
  font-family: "Portfolio Sans";
  src: url("/assets/fonts/portfolio-sans.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}
:root {
  --bg: #f7f9fa;
  --ink: #192d38;
  --muted: #566875;
  --accent: #007f91;
  --soft: #eaf4f5;
  --line: #dfe6e9;
  --radius: 12px;
  --width: 1120px;
  --font-text: "Portfolio Sans", "Noto Sans SC", "Microsoft YaHei", "PingFang SC", sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Portfolio Sans", "Noto Sans SC", monospace;
  font-family: var(--font-text);
  font-synthesis: none;
  font-size: 16px;
}
body { line-height: 1.85; overflow-wrap: break-word; }
h1, h2, h3 { letter-spacing: 0; font-weight: 700; text-wrap: pretty; }
h2 { font-size: 32px; line-height: 1.45; }
h3 { line-height: 1.55; }
.small, small { font-size: 13px; }
.eyebrow { font-size: 11px; font-weight: 600; letter-spacing: .1em; line-height: 1.7; }
.index-number { color: var(--muted); font: 11px/1.7 var(--font-mono); letter-spacing: .08em; margin-bottom: 12px; }
.site-header { height: 76px; background: #ffffffed; }
.header-inner { gap: 26px; }
.brand { font-size: 15px; font-weight: 600; }
.brand-mark { border-radius: 8px; }
.brand-en { font-size: 13px; font-weight: 400; }
.nav { font-size: 14px; gap: 27px; }
.nav a[aria-current] { color: var(--accent); }
.header-cv { font-size: 13px; padding: 8px 14px; background: white; }
.btn { font-size: 14px; font-weight: 500; border-radius: 7px; padding: 10px 18px; }
.btn:hover { transform: none; background: var(--soft); }
.btn.primary:hover { background: #006c7d; }
.text-link { font-size: 14px; font-weight: 500; }
.buttons { gap: 12px 18px; margin-top: 24px; }

/* The introduction puts the person, research interests and work in that order. */
.hero { background: white; padding: 68px 0 36px; border-bottom: 1px solid var(--line); }
.hero-grid { grid-template-columns: 1.08fr 1fr; gap: 60px; }
.hero h1 { font-size: 54px; line-height: 1.2; margin: 14px 0 23px; }
.name-en { display: block; font-size: 24px; font-weight: 500; letter-spacing: -.025em; margin-top: 12px; }
.name-en span { color: var(--muted); font-weight: 400; }
.identity { font-size: 18px; font-weight: 500; margin-bottom: 19px; }
.hero-copy { max-width: 520px; font-size: 15px; line-height: 1.95; margin-bottom: 18px; }
.hero-project-note { font-size: 13px; line-height: 1.85; color: var(--muted); margin: 0 0 16px; }
.hero-project-note a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.availability { font-size: 13px; color: var(--muted); margin-bottom: 0; }
.hero-art { transform: none; padding: 0; border: 1px solid var(--line); border-radius: 10px; box-shadow: none; overflow: hidden; }
.hero-art img { width: 100%; height: auto; aspect-ratio: 16/10; border-radius: 0; object-fit: cover; }
.hero-art .art-caption { padding: 17px 20px; }
.art-caption strong { font-size: 19px; font-weight: 600; }
.art-caption div > span { display: block; font-size: 12px; margin-top: 3px; }
.art-caption .art-arrow { font-size: 24px; color: var(--accent); }
.hero-art:hover { border-color: var(--accent); }
.intro-strip { margin-top: 46px; padding-top: 24px; gap: 32px; }
.intro-strip strong { font-size: 14px; font-weight: 500; margin-bottom: 4px; }
.intro-strip span { font-size: 12px; }
.section { padding: 68px 0; }
.section.white { border-color: var(--line); }
.section-head { margin-bottom: 30px; }
.section-head h2 { margin-bottom: 9px; }
.section-head p { font-size: 15px; }

/* Cards are reserved for navigable projects, methods and videos. */
.project-grid { gap: 30px; }
.project-card { display: flex; flex-direction: column; box-shadow: none; }
.project-card-playable { grid-column: 1 / -1; display: grid; grid-template-columns: 1.1fr 1fr; }
.project-card-playable .project-image { display: flex; align-items: center; background: #090e1c; }
.project-card-playable .project-image img { width: 100%; height: auto; object-fit: contain; }
@media(max-width:720px) { .project-card-playable { display: flex; grid-template-columns: 1fr; } }
.project-card:hover { transform: none; border-color: #aac8cf; box-shadow: 0 5px 22px #142b3708; }
.project-image img { height: auto; aspect-ratio: 16/9; }
.project-card:hover .project-image img { transform: none; }
.research-image { background: #eef2f4; }
.research-image img { object-fit: contain; }
.project-body { display: flex; flex-direction: column; flex: 1; padding: 25px 27px 22px; }
.project-body .eyebrow { font-size: 10px; color: var(--accent); margin-bottom: 8px; }
.project-body h3 { font-size: 25px; margin: 0 0 7px; }
.project-meta { font-size: 12px; line-height: 1.8; margin-bottom: 16px; }
.project-body p:not(.eyebrow) { font-size: 15px; line-height: 1.85; color: #425967; }
.tags { gap: 7px; margin-top: 2px; margin-bottom: 20px; }
.tag { font-size: 11px; border-radius: 4px; padding: 3px 9px; color: #386370; background: #eff5f6; }
.project-bottom { margin-top: auto; align-items: start; gap: 13px; padding-top: 16px; }
.project-status { font-size: 12px; line-height: 1.8; color: #465f6d; max-width: 73%; }
.project-bottom .text-link { font-size: 12px; white-space: nowrap; margin-top: 1px; }
.skills-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; }
.skill-card { min-height: 0; padding: 27px 29px 24px; border-radius: 10px; }
.skill-card .skill-no { font: 11px/1.7 var(--font-text); letter-spacing: .04em; margin-bottom: 15px; }
.skill-card h3 { font-size: 20px; font-weight: 600; letter-spacing: 0; margin-bottom: 11px; }
.skill-card p { font-size: 15px; line-height: 1.85; margin-bottom: 20px; }
.skill-card .text-link { font-size: 13px; }
.game-teaser { gap: 65px; }
.game-teaser h2 { margin-bottom: 15px; }
.game-teaser .lead { font-size: 16px; margin-bottom: 24px; }
.highlights-link { display: inline-block; margin: 12px 0 12px 19px; font-size: 13px; }
.atlas-preview { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.atlas-preview img { width: 100%; height: auto; aspect-ratio: 2.05; object-fit: cover; border-radius: 5px; background: #182a35; }
.contact { padding: 45px 0; background: #edf3f4; color: var(--ink); border-top: 1px solid var(--line); }
.contact .eyebrow { color: var(--accent); font-size: 10px; margin-bottom: 12px; }
.contact h2 { font-size: 23px; font-weight: 600; margin-bottom: 9px; }
.contact p { color: var(--muted); font-size: 13px; }
.email-link { color: var(--accent); border-color: #94b9c1; font-size: 19px; white-space: nowrap; }
.site-footer { background: white; color: var(--muted); font-size: 12px; padding: 25px 0; }
.footer-links { flex-wrap: wrap; gap: 8px 22px; }

/* Long-form pages: wider figures and a shorter, larger body-text measure. */
.page-intro { background: white; border-bottom: 1px solid var(--line); padding: 38px 0 36px; }
.crumb { font-size: 12px; margin-bottom: 29px; }
.page-intro h1 { font-size: clamp(32px,3.7vw,49px); line-height: 1.35; margin: 13px 0 16px; }
.page-intro .lead { font-size: 17px; line-height: 1.9; max-width: 750px; }
.detail-hero { grid-template-columns: 1fr 1.03fr; gap: 48px; }
.detail-cover { border-radius: 9px; }
.detail-cover img { aspect-ratio: 16/10; }
.facts { gap: 30px; padding: 23px 0 0; margin-top: 32px; border-bottom: 0; }
.facts span { font-size: 12px; margin-bottom: 6px; }
.facts strong { display: block; font-size: 14px; line-height: 1.85; font-weight: 500; }
.article-layout { grid-template-columns: 176px minmax(0,1fr); gap: 56px; padding: 47px 0 48px; }
.article { min-width: 0; }
.toc { top: 98px; padding: 10px 0 0; gap: 2px; }
.toc a { font-size: 13px; line-height: 1.75; border-left-color: transparent; padding: 8px 0 8px 15px; }
.toc a:hover, .toc a[aria-current] { border-color: var(--accent); color: var(--accent); }
.toc a[aria-current] { font-weight: 500; background: linear-gradient(90deg,#eaf4f5,transparent); }
.article section { margin-bottom: 54px; padding-bottom: 32px; border-bottom: 1px solid var(--line); }
.article section:last-child { border: 0; margin-bottom: 0; }
.article h2 { font-size: 27px; line-height: 1.5; margin-bottom: 21px; }
.article h3 { font-size: 19px; margin: 26px 0 13px; font-weight: 600; }
.article p, .article li { font-size: 16px; line-height: 1.95; color: #3f5461; }
.article section > p, .article section > ul { max-width: 43em; }
.article section > p { margin-bottom: 17px; }
.article .case-intro { font-size: 17px; line-height: 1.95; max-width: 42em; }
.article li { margin-bottom: 7px; }
.article a.text-link { font-size: 14px; }
.article .notice { font-size: 13px; }
.article .diagram-note, .article .caption-note, .article .editor-note { font-size: 13px; color: var(--muted); line-height: 1.8; }
.article figure > figcaption, .evidence figcaption, .case-images figcaption { font-size: 13px; line-height: 1.8; }
.gallery, .case-images { gap: 12px; margin: 26px 0; }
.gallery button, .case-images img { border-radius: 6px; }
.gallery button span { font: 11px var(--font-mono); }
.media-player { border-radius: 8px; margin: 28px 0; }
.media-caption { font-size: 13px; padding: 13px 16px; }
.media-caption .text-link { font-size: 12px; white-space: nowrap; }
.callout, .source-quote, .design-thesis { border-radius: 0; border-left: 2px solid var(--accent); background: #edf5f6; padding: 21px 24px; font-size: 15px; }
.article .source-quote p { font-size: 16px; line-height: 1.95; color: #345564; }
.source-quote cite { font-size: 12px; }
.compare, .steps, .insight-grid { gap: 27px; margin: 27px 0; }
.compare > div, .step, .insight { background: transparent; border: 0; border-top: 2px solid #bad3d8; border-radius: 0; padding: 20px 0 0; }
.compare h3, .article .insight h3 { font-size: 18px; margin: 10px 0 13px; }
.compare p, .step p, .article .insight p { font-size: 15px; line-height: 1.9; }
.compare small, .insight > span, .step b { font: 12px/1.7 var(--font-text); color: var(--accent); letter-spacing: .02em; }
.step strong { font-size: 16px; font-weight: 600; margin-bottom: 11px; }
.step b { margin-bottom: 11px; }
.insight > span { font-weight: 500; }
.design-figure { margin: 30px 0; border: 0; border-radius: 0; padding: 0; background: transparent; }
.article .design-figure > figcaption { font-size: 16px; font-weight: 600; margin-bottom: 19px; color: var(--ink); }
.article ol.design-flow { gap: 23px 28px; }
.article ol.design-flow.flow-count-3 { grid-template-columns: repeat(3,minmax(0,1fr)); }
.article .design-flow li { border: 0; border-top: 1px solid var(--line); border-radius: 0; background: transparent; padding: 16px 0 0; }
.diagram-number { font: 12px/1.5 var(--font-mono); margin-bottom: 9px; }
.design-flow strong { font-size: 16px; font-weight: 600; }
.design-flow p { font-size: 15px; margin-top: 8px; }
.evidence-chain { margin-top: 25px; gap: 0; }
.evidence-chain > div { border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 23px 0; }
.evidence-chain span { font-size: 12px; margin-bottom: 9px; }
.evidence-chain strong { font-size: 18px; font-weight: 600; }
.evidence-chain p { font-size: 15px; margin: 10px 0 0; max-width: 43em; }
.table-scroll { border-radius: 6px; margin: 24px 0; }
.data-table { font-size: 14px; line-height: 1.85; }
.data-table th, .data-table td { padding: 13px 16px; }
.data-table th { color: #385461; background: #edf3f4; font-weight: 500; }
.data-table caption { font-size: 15px; font-weight: 600; padding: 12px 16px; }
.route-map text { font-family: var(--font-text); }
.strategy-comparison { gap: 28px; }
.strategy-options { margin-top: 12px; }
.strategy-options span { font-size: 14px; border-radius: 5px; }
.strategy-comparison p { font-size: 14px; }
.strategy-example { grid-template-columns: .86fr 1fr; gap: 32px; margin-top: 35px; }
.strategy-example h3 { font-size: 19px; margin-top: 0; }
.strategy-example p, .strategy-example li { font-size: 15px; }
.paper-figure img { border-radius: 6px; }
.paper-figure figcaption { padding-top: 10px; color: var(--muted); }
.article .workflow { gap: 14px; }
.workflow li { padding: 16px 12px; border: 0; border-left: 2px solid #aacbd2; border-radius: 0; background: #eef4f5; }
.workflow li > span { font: 12px/1.7 var(--font-text); }
.workflow strong { font-size: 15px; font-weight: 600; }
.workflow small { font-size: 12px; line-height: 1.8; }
.evidence-zoom { border-radius: 7px; }
.evidence-zoom > span { font-size: 12px; }
.evidence-pair, .lab-photos { gap: 21px; }
.document-layers { border-radius: 6px; }
.document-layers > div { padding: 19px 21px; }
.document-layers b { font-size: 14px; font-weight: 600; }
.document-layers span { font-size: 15px; line-height: 1.85; }
.reading { border-radius: 6px; }
.reading summary { font-size: 16px; font-weight: 500; padding: 20px 23px; }
.reading summary small { font-size: 13px; }
.article .reading-body .source-quote p { font-size: 15px; }
.effort-note { border: 0; border-top: 1px solid var(--line); border-radius: 0; background: transparent; padding: 20px 0; }
.effort-note > strong { font-size: 13px; }
.article .effort-note p { font-size: 15px; }
.study-comparisons { gap: 25px; }
.study-comparisons > div { padding: 20px 0 0; border: 0; border-top: 2px solid #bad3d8; background: transparent; border-radius: 0; }
.study-pair b { font-size: 14px; font-weight: 500; padding: 15px 7px; }
.study-pair small { font-size: 12px; }
.article .study-comparisons p { font-size: 15px; }
.actor { font-size: 13px; }

/* Game records retain their existing filtering, search and video links. */
.game-page { padding-top: 30px; }
.game-controls { border-radius: 8px; padding: 20px; }
.input-group label { font-size: 13px; }
.game-meta { font-size: 13px; }
.cover-grid { gap: 10px; }
.cover-tile { border-radius: 6px; }
.cover-tile span { font-size: 12px; padding: 23px 10px 9px; }
.video-grid { gap: 24px; }
.video-card { border-radius: 9px; }
.video-card:hover { transform: none; }
.video-card-body { padding: 22px; }
.video-card .video-kind { font-size: 12px; }
.video-card h3 { font-size: 17px; line-height: 1.75; margin: 0 0 12px; }
.video-card .video-description { font-size: 14px; line-height: 1.85; }
.video-card .text-link { font-size: 13px; }
.dialog-body { font-size: 15px; }
.dialog-body .btn { margin: 6px 0; }
.about-grid { grid-template-columns: 1.12fr 1fr; }

@media (max-width: 1000px) {
  .header-inner { gap: 16px; }
  .brand-en { display: none; }
  .nav { gap: 19px; font-size: 13px; }
  .hero-grid { gap: 32px; }
  .hero h1 { font-size: 46px; }
  .identity { font-size: 16px; }
  .hero-copy { font-size: 15px; }
  .hero-art img { aspect-ratio: 4/3; }
  .article-layout { grid-template-columns: 150px minmax(0,1fr); gap: 32px; }
  .article h2 { font-size: 25px; }
  .detail-hero { gap: 28px; }
  .study-comparisons { grid-template-columns: 1fr; }
  .contact-grid { align-items: start; }
  .contact h2 { font-size: 21px; }
  .email-link { font-size: 16px; }
}
@media (max-width: 720px) {
  .wrap { width: calc(100% - 40px); }
  .site-header { height: 66px; }
  .header-inner { gap: 12px; }
  .brand { font-size: 14px; }
  .header-cv { font-size: 12px; padding: 7px 10px; }
  .menu-toggle { font-size: 12px; padding: 7px 10px; }
  .nav { top: 65px; background: white; font-size: 14px; }
  .hero { padding: 39px 0 28px; }
  .hero-grid { grid-template-columns: minmax(0,1fr); gap: 32px; }
  .hero h1 { font-size: 43px; max-width: none; margin: 13px 0 20px; }
  .name-en { font-size: 23px; margin-top: 10px; }
  .hero .eyebrow { font-size: 10px; }
  .identity { font-size: 16px; margin-bottom: 17px; }
  .hero-copy { font-size: 15px; }
  .hero-art img { aspect-ratio: 16/10; }
  .hero-art .art-caption { padding: 14px 17px; }
  .intro-strip { margin-top: 28px; gap: 17px; grid-template-columns: 1fr; padding-top: 21px; }
  .intro-strip > div { display: grid; grid-template-columns: 77px 1fr; align-items: baseline; gap: 12px; }
  .intro-strip strong { font-size: 13px; margin-bottom: 0; }
  .intro-strip span { font-size: 12px; }
  .section { padding: 43px 0; }
  h2 { font-size: 28px; }
  .section-head { margin-bottom: 25px; gap: 9px; }
  .section-head p { font-size: 14px; }
  .project-grid { gap: 23px; }
  .project-body { padding: 22px; }
  .project-body h3 { font-size: 23px; }
  .project-body p:not(.eyebrow) { font-size: 15px; }
  .project-bottom { gap: 12px; }
  .project-status { font-size: 11px; max-width: 73%; }
  .skills-grid { grid-template-columns: 1fr; gap: 16px; }
  .skill-card { padding: 24px; min-height: 0; }
  .skill-card h3 { font-size: 19px; }
  .skill-card .skill-no { margin-bottom: 13px; }
  .skill-card p { font-size: 15px; margin-bottom: 16px; }
  .game-teaser { gap: 29px; }
  .game-teaser .lead { font-size: 15px; }
  .contact { padding: 34px 0; }
  .contact-grid { gap: 22px; }
  .contact h2 { font-size: 20px; }
  .email-link { font-size: 17px; }
  .site-footer { padding: 23px 0; font-size: 11px; }
  .footer-links { gap: 8px 19px; }
  .page-intro { padding: 28px 0; }
  .crumb { margin-bottom: 25px; font-size: 11px; }
  .page-intro h1 { font-size: 33px; }
  .page-intro .lead { font-size: 16px; }
  .detail-hero { grid-template-columns: 1fr; gap: 27px; }
  .facts { margin-top: 27px; padding-top: 20px; gap: 14px; }
  .facts > div { display: grid; grid-template-columns: 65px 1fr; gap: 18px; }
  .facts span { font-size: 11px; }
  .facts strong { font-size: 13px; }
  .article-layout { grid-template-columns: minmax(0,1fr); gap: 25px; padding: 25px 0 32px; }
  .toc { display: flex; flex-direction: row; gap: 7px 12px; padding: 0 0 19px; border-bottom: 1px solid var(--line); }
  .toc a { font-size: 12px; padding: 3px 0 3px 9px; }
  .article section { margin-bottom: 34px; padding-bottom: 23px; }
  .article h2 { font-size: 23px; margin-bottom: 18px; }
  .article h3 { font-size: 18px; }
  .article p, .article li { font-size: 15px; line-height: 1.95; }
  .article .case-intro { font-size: 16px; }
  .compare, .steps, .insight-grid { gap: 21px; }
  .compare > div, .step, .insight { padding-top: 16px; }
  .article .design-flow { gap: 20px; }
  .article ol.design-flow.flow-count-3 { grid-template-columns: 1fr; }
  .article .source-quote p { font-size: 15px; }
  .article .diagram-note, .article .caption-note { font-size: 12px; }
  .strategy-example, .strategy-comparison { grid-template-columns: 1fr; gap: 25px; }
  .strategy-example p, .strategy-example li { font-size: 15px; }
  .evidence-chain > div { padding: 19px 0; }
  .evidence-chain strong { font-size: 17px; }
  .data-table { font-size: 13px; }
  .data-table td, .data-table th { font-size: 13px; padding: 11px 12px; }
  .data-table caption { font-size: 14px; padding: 11px 12px; }
  .document-layers span { font-size: 14px; }
  .reading summary { font-size: 15px; padding: 18px; }
  .reading summary small { font-size: 12px; }
  .source-quote, .callout { padding: 19px 20px; }
  .media-caption { font-size: 12px; }
  .game-page { padding-top: 24px; }
  .game-controls { padding: 16px; }
  .input-group label { font-size: 12px; }
  .game-meta { font-size: 12px; }
  .cover-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  .cover-tile span { font-size: 11px; }
  .video-card-body { padding: 20px; }
  .video-card h3 { font-size: 16px; }
  .about-grid { grid-template-columns: 1fr; }
  .btn { font-size: 13px; padding: 10px 14px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
