:root {
  color-scheme: light;
  --paper: #fff;
  --ink: #0b1742;
  --muted: #52627a;
  --line: #d5dee8;
  --accent: #174d8d;
  --gutter: clamp(24px, 2.85vw, 58px);
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body { margin: 0; }
img { display: block; max-width: 100%; height: auto; }
figure, p, h1, h2, h3 { margin: 0; }
a { color: inherit; text-decoration: none; }
a, button { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button { font: inherit; color: inherit; }
button, summary { cursor: pointer; }
a:focus-visible, button:focus-visible, summary:focus-visible, video:focus-visible { outline: 3px solid var(--accent); outline-offset: 5px; }
::selection { background: #cceafb; color: var(--ink); }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: fixed; top: -90px; left: 16px; z-index: 10; padding: 14px 20px; background: var(--ink); color: #fff; }
.skip-link:focus { top: 12px; }
.site-header { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--line); }
.portfolio-header { padding-inline: var(--gutter); }
.brand { display: inline-flex; align-items: baseline; font-size: 34px; font-weight: 650; letter-spacing: -.065em; line-height: 1.2; padding-block: 12px; }
.brand-dot { color: #457ca9; }
.site-nav { display: flex; align-items: center; gap: 28px; font-size: 14px; font-weight: 600; }
.site-nav a { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; }
.site-nav a:hover { color: var(--accent); }
.home-link { border-left: 1px solid var(--ink); padding-left: 28px; }
.eyebrow { font-family: "Cascadia Code", Consolas, monospace; font-size: 11px; line-height: 1.7; letter-spacing: .13em; color: var(--muted); }
.text-link { display: inline-flex; align-items: center; justify-content: space-between; gap: 40px; min-height: 44px; padding: 7px 0; border-bottom: 1px solid currentColor; font-size: 16px; font-weight: 600; }
.text-link span { font-size: 24px; transition: transform .2s; }
.text-link:hover span { transform: translate(3px, -3px); }
.site-footer { display: flex; align-items: center; flex-wrap: wrap; gap: 20px; border-top: 1px solid var(--line); padding: 18px 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.site-footer > span:first-child { margin-right: auto; }
.site-footer a { display: inline-flex; align-items: center; min-height: 44px; }
.site-footer a:hover { color: var(--accent); }
.portfolio-footer { padding-inline: var(--gutter); }

/* One continuous canvas: the accordion has no coloured panel edges. */
.folds { background: linear-gradient(102deg, #fff 0%, #fff 36%, #fcfdff 46%, #f0f8ff 56%, #d9f0fe 65%, #bce5fb 74%, #d6eff6 81%, #f0f7df 88%, #fff7be 96%, #fff5b3 100%); }
.fold-panel { position: relative; padding: 26px var(--gutter) 40px; min-width: 0; scroll-margin-top: 0; }
.fold-heading { font-size: 18px; font-weight: 600; }
.fold-toggle { display: inline-flex; align-items: center; border: 0; border-radius: 0; padding: 8px 0; min-height: 44px; background: transparent; text-align: left; line-height: 1.4; }
.fold-number { font-variant-numeric: tabular-nums; }
.fold-slash { padding-inline: 5px; }
.fold-indicator { display: none; }
.fold-content { padding-top: 32px; }
.display-title { font-weight: 750; letter-spacing: -.055em; line-height: 1.22; }
.display-title > span { display: block; }
.project-title { font-size: clamp(54px, 6.6vw, 116px); }
.work-subtitle { margin-top: 22px; font-size: clamp(20px, 2vw, 32px); font-weight: 550; letter-spacing: -.025em; line-height: 1.5; }
.work-subtitle > span { padding-inline: 6px; }
.project-visual-grid { display: grid; grid-template-columns: minmax(0, 1fr) 110px; align-items: end; gap: clamp(24px, 3vw, 52px); margin-top: 26px; }
.project-preview { min-width: 0; width: 100%; max-width: 74svh; }
.project-image-link { display: block; background: #c4d5e3; }
.project-image-link img { width: 100%; }
.project-image-link:hover { outline: 1px solid var(--accent); outline-offset: 5px; }
.project-preview figcaption { display: flex; justify-content: space-between; gap: 10px; padding-top: 12px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.project-preview figcaption > span:last-child { font-family: Consolas, monospace; white-space: nowrap; }
.project-entry { display: inline-flex; flex-direction: column; align-items: flex-start; justify-content: flex-end; gap: 10px; padding: 12px 0 22px; font-weight: 600; font-size: 18px; white-space: nowrap; }
.entry-arrow { display: block; font-family: "Segoe UI", sans-serif; font-size: 100px; font-weight: 400; line-height: 1; transition: transform .3s; }
.project-entry:hover .entry-arrow { transform: translate(5px, -5px); }
.about-title, .contact-title { font-size: clamp(38px, 4.4vw, 76px); margin-top: 24px; }
.about-bottom, .contact-bottom { display: flex; flex-direction: column; align-items: flex-start; gap: 34px; margin-top: 60px; }
.about-copy { max-width: 610px; }
.about-copy p, .contact-intro { font-size: clamp(16px, 1.45vw, 21px); line-height: 1.9; }
.about-copy p + p { margin-top: 18px; color: #3d516e; font-size: 16px; }
.interest-list { display: flex; flex-wrap: wrap; gap: 12px 24px; list-style: none; margin: 26px 0 0; padding: 0; font-size: 12px; color: #3d516e; }
.interest-list li { border-bottom: 1px solid #94b3ca; padding-block: 8px; }
.contact-intro { margin-top: 28px; color: #3d516e; }
.contact-status { width: min(100%, 560px); margin: 0; }
.contact-status > div { display: flex; align-items: center; justify-content: space-between; gap: 20px; border-top: 1px solid #bac7bd; padding: 20px 0; }
.contact-status > div:last-child { border-bottom: 1px solid #bac7bd; }
.contact-status dt { font-weight: 600; }
.contact-status dd { display: flex; align-items: center; gap: 32px; margin: 0; color: #52605c; font-size: 14px; }
.is-enhanced.folds { display: grid; grid-template-columns: minmax(0, 4.25fr) minmax(0, 1fr) minmax(0, 1fr); transition: grid-template-columns .65s cubic-bezier(.22, .75, .25, 1); }
.is-enhanced.folds[data-active="about"] { grid-template-columns: minmax(0, 1fr) minmax(0, 4.25fr) minmax(0, 1fr); }
.is-enhanced.folds[data-active="contact"] { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 4.25fr); }
.is-enhanced .fold-panel { display: flex; flex-direction: column; min-height: max(640px, calc(100svh - 76px)); }
.is-enhanced .fold-content { flex: 1; display: flex; flex-direction: column; }
.is-enhanced .work-content { gap: 34px; }
.is-enhanced .project-visual-grid { margin-top: auto; }
.is-enhanced .about-bottom, .is-enhanced .contact-bottom { margin-top: auto; padding-top: 42px; }
.is-enhanced .is-active .fold-toggle { cursor: default; }
.is-enhanced .fold-panel:not(.is-active) .fold-toggle { position: absolute; inset: 0; width: 100%; padding: 34px var(--gutter) 38px; display: flex; flex-direction: column; align-items: flex-start; }
.is-enhanced .fold-panel:not(.is-active) .fold-toggle:focus-visible { outline-offset: -8px; }
.is-enhanced .fold-panel:not(.is-active) .fold-number { font-size: 22px; }
.is-enhanced .fold-panel:not(.is-active) .fold-slash { display: none; }
.is-enhanced .fold-panel:not(.is-active) .fold-label { margin-top: 40px; font-size: clamp(30px, 4.1vw, 68px); font-weight: 750; letter-spacing: -.055em; white-space: nowrap; }
.is-enhanced .fold-panel:not(.is-active) .fold-indicator { display: flex; flex-direction: column; align-items: flex-start; margin-top: auto; width: 100%; }
.fold-plus { font-family: "Segoe UI", sans-serif; font-weight: 300; font-size: 46px; line-height: 1; transition: transform .3s; }
.fold-toggle:hover .fold-plus { transform: rotate(90deg); }
.fold-hint { margin-top: 12px; font-size: 12px; font-weight: 500; letter-spacing: .08em; white-space: nowrap; }
.fold-pending { margin-top: 8px; font-size: 11px; font-weight: 400; color: #52605c; }

/* Project reading view shares the same ink, spacing and soft colour field. */
.case-page { background: linear-gradient(120deg, #fff 28%, #f3faff 65%, #fffcea 100%) no-repeat; background-size: 100% 680px; }
.page-shell { max-width: 1536px; margin: 0 auto; padding-inline: var(--gutter); }
.breadcrumb { padding-top: 20px; color: var(--muted); font-size: 13px; }
.breadcrumb a { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; }
.breadcrumb a:hover { color: var(--accent); }
.case-heading { padding: 36px 0 38px; }
.case-heading h1 { font-size: clamp(42px, 6.6vw, 96px); letter-spacing: -.06em; line-height: 1.2; margin-top: 18px; font-weight: 750; }
.case-subtitle { font-size: clamp(20px, 2.2vw, 30px); line-height: 1.6; margin-top: 18px; color: #3d516e; }
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 10px 20px; padding: 0; margin: 22px 0 0; }
.tags li { font-size: 12px; line-height: 1.6; padding: 7px 0; border-bottom: 1px solid #adc3d8; color: #3d516e; }
.case-cover { position: relative; max-width: 1120px; margin-inline: auto; background: #c4d5e3; }
.case-cover img { width: 100%; height: auto; }
.image-caption { position: absolute; bottom: 16px; left: 16px; max-width: calc(100% - 32px); color: #fff; background: #0b1742df; padding: 6px 10px; font-size: 11px; line-height: 1.5; }
.case-body { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 64px; padding: 64px 0 70px; }
.case-index { align-self: start; position: sticky; top: 32px; }
.case-index nav { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; font-size: 14px; }
.case-index a { display: inline-flex; align-items: center; min-height: 44px; }
.case-index a:hover { color: var(--accent); }
.case-article { max-width: 900px; min-width: 0; }
.case-article > section + section { border-top: 1px solid var(--line); padding-top: 44px; margin-top: 48px; }
.case-article h2 { font-size: clamp(25px, 2.4vw, 35px); line-height: 1.5; letter-spacing: -.035em; margin: 12px 0 18px; }
.case-article p:not(.eyebrow) { font-size: 16px; line-height: 1.95; color: #52627a; }
.case-article p + p { margin-top: 14px; }
.case-article p.case-lead { font-size: 21px; color: var(--ink); }
.project-facts { margin: 30px 0 0; }
.project-facts > div { display: grid; grid-template-columns: 100px 1fr; gap: 20px; border-top: 1px solid var(--line); padding: 16px 0; font-size: 14px; line-height: 1.7; }
.project-facts dt { color: var(--muted); }
.project-facts dd { margin: 0; }
.platforms-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-top: 28px; }
.platforms-grid article + article { border-left: 1px solid var(--line); padding-left: 32px; }
.platform-number { font-family: Consolas, monospace; color: var(--accent); font-size: 13px; }
.platforms-grid h3 { margin: 12px 0; font-size: 22px; font-weight: 600; }
.case-article .muted { font-size: 13px !important; }
.case-return { margin-top: 34px; }
.case-article .evidence-note { margin-top: 16px; padding-left: 15px; border-left: 2px solid #8dc9f4; font-size: 13px; color: var(--muted); }
.demo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-top: 28px; }
.demo-item video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: contain; background: #10182b; }
.demo-item figcaption { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-top: 12px; font-size: 12px; line-height: 1.8; }
.demo-item strong, .demo-item small { display: block; }
.demo-item strong { font-size: 14px; font-weight: 600; }
.demo-item small { color: var(--muted); margin-top: 4px; font-size: 11px; }
.demo-item figcaption a { display: inline-flex; align-items: center; min-height: 44px; white-space: nowrap; color: var(--accent); text-decoration: underline; text-underline-offset: 5px; }
.field-samples { margin-top: 32px; border-block: 1px solid var(--line); }
.field-samples summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 0; font-size: 15px; }
.field-samples summary::-webkit-details-marker { display: none; }
.field-samples summary small { color: var(--muted); font-size: 12px; margin-left: 15px; }
.field-samples summary > span:last-child { color: var(--accent); font-size: 22px; }
.field-samples[open] summary > span:last-child { transform: rotate(45deg); }
.sample-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; margin: 18px 0 24px; }
.sample-grid img { width: 100%; }
.sample-grid a { display: block; }
.sample-grid figcaption { color: var(--muted); font-size: 11px; margin-top: 8px; }
.hardware-photo { max-width: 620px; margin-top: 32px; }
.hardware-photo img { width: 100%; }
.hardware-photo figcaption { margin-top: 10px; color: var(--muted); font-size: 12px; line-height: 1.8; }
.subsection-title { font-size: 21px; margin: 32px 0 14px; }
.pipeline { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 0; margin: 24px 0 16px; border-block: 1px solid var(--line); }
.pipeline li { padding: 20px 12px; }
.pipeline li + li { border-left: 1px solid var(--line); }
.pipeline span, .pipeline strong, .pipeline small { display: block; }
.pipeline span { font-family: Consolas, monospace; color: var(--accent); font-size: 12px; }
.pipeline strong { font-size: 14px; font-weight: 600; margin: 10px 0 7px; }
.pipeline small { font-size: 11px; color: var(--muted); line-height: 1.7; }
@media (max-width: 1100px) and (min-width: 761px) {
  .is-enhanced .fold-panel:not(.is-active) .fold-toggle { padding-inline: 24px; }
  .project-visual-grid { grid-template-columns: minmax(0, 1fr) 86px; gap: 24px; }
  .project-entry { font-size: 15px; }
  .entry-arrow { font-size: 80px; }
  .case-body { grid-template-columns: 165px minmax(0, 1fr); gap: 35px; }
  .demo-grid { grid-template-columns: 1fr; }
}
@media (min-width: 761px) and (max-height: 800px) {
  .is-enhanced .fold-panel { padding-top: 20px; padding-bottom: 28px; }
  .fold-content { padding-top: 20px; }
  .project-title { font-size: clamp(50px, 6vw, 94px); }
  .work-subtitle { margin-top: 16px; font-size: 24px; }
  .is-enhanced .work-content { gap: 26px; }
  .project-preview { max-width: 63svh; }
}
@media (max-width: 760px) {
  :root { --gutter: 24px; }
  .site-header { min-height: 68px; gap: 16px; }
  .brand { font-size: 28px; }
  .site-nav { gap: 14px; font-size: 12px; }
  .home-link { padding-left: 14px; gap: 8px !important; }
  .folds { background: linear-gradient(160deg, #fff 0%, #fff 25%, #eff9ff 44%, #c7e9fc 67%, #e2f3ef 82%, #fff7be 100%); }
  .is-enhanced.folds { display: block; }
  .fold-panel, .is-enhanced .fold-panel { min-height: 0; padding: 16px var(--gutter) 30px; }
  .fold-heading { font-size: 15px; }
  .fold-content { padding-top: 18px; }
  .project-title { font-size: clamp(40px, 10.8vw, 78px); line-height: 1.25; letter-spacing: -.06em; }
  .work-subtitle { margin-top: 20px; font-size: clamp(18px, 4.7vw, 26px); }
  .is-enhanced .work-content { gap: 28px; }
  .project-visual-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .project-preview figcaption { font-size: 10px; padding-top: 10px; }
  .project-entry { flex-direction: row-reverse; align-items: center; justify-content: space-between; width: 100%; padding: 6px 0; font-size: 16px; }
  .entry-arrow { font-size: 48px; }
  .is-enhanced .fold-panel:not(.is-active) { min-height: 104px; padding: 0; }
  .is-enhanced .fold-panel:not(.is-active) .fold-toggle { flex-direction: row; align-items: center; gap: 20px; padding: 18px var(--gutter); }
  .is-enhanced .fold-panel:not(.is-active) .fold-number { font-size: 15px; }
  .is-enhanced .fold-panel:not(.is-active) .fold-label { margin-top: 0; font-size: 30px; }
  .is-enhanced .fold-panel:not(.is-active) .fold-indicator { flex-direction: row; align-items: center; justify-content: flex-end; gap: 14px; width: auto; margin: 0 0 0 auto; }
  .fold-plus { font-size: 32px; }
  .fold-hint { display: none; }
  .fold-pending { margin: 0; font-size: 11px; order: -1; }
  .about-title, .contact-title { font-size: clamp(28px, 7.2vw, 52px); letter-spacing: -.05em; margin-top: 20px; }
  .about-copy p, .contact-intro { font-size: 17px; }
  .about-copy p + p { font-size: 14px; }
  .is-enhanced .about-bottom, .is-enhanced .contact-bottom { padding-top: 34px; gap: 28px; }
  .contact-status > div { padding-block: 18px; font-size: 14px; }
  .contact-status dd { gap: 22px; font-size: 12px; }
  .site-footer { font-size: 11px; gap: 6px 18px; padding-block: 14px; }
  .portfolio-footer { padding-inline: var(--gutter); }
  .portfolio-footer > span:first-child { width: 100%; }
  .portfolio-footer a { margin-left: auto; }
  .case-page .nav-caption { display: none; }
  .case-page .home-link { border-left: 0; padding-left: 0; }
  .breadcrumb { padding-top: 12px; font-size: 12px; }
  .case-heading { padding-top: 22px; padding-bottom: 30px; }
  .case-heading h1 { font-size: clamp(38px, 10vw, 66px); }
  .case-subtitle { font-size: 22px; }
  .image-caption { bottom: 8px; left: 8px; max-width: calc(100% - 16px); font-size: 9px; padding: 4px 7px; }
  .case-body { grid-template-columns: 1fr; gap: 32px; padding-top: 28px; }
  .case-index { position: static; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
  .case-index nav { flex-direction: row; flex-wrap: wrap; gap: 0 20px; margin-top: 12px; font-size: 12px; }
  .case-article p.case-lead { font-size: 18px; }
  .project-facts > div { grid-template-columns: 78px 1fr; gap: 12px; font-size: 13px; }
  .platforms-grid { gap: 20px; }
  .platforms-grid article + article { padding-left: 20px; }
  .platforms-grid h3 { font-size: 19px; }
  .demo-grid { grid-template-columns: 1fr; gap: 30px; }
  .field-samples summary small { display: block; margin: 6px 0 0; }
  .sample-grid { grid-template-columns: 1fr; gap: 20px; }
  .pipeline { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pipeline li:nth-child(3) { border-left: 0; }
  .pipeline li:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 380px) {
  :root { --gutter: 20px; }
  .brand { font-size: 26px; }
  .site-nav { gap: 10px; font-size: 11px; }
  .home-link { padding-left: 10px; }
  .project-title { font-size: 40px; }
  .work-subtitle { font-size: 18px; }
  .about-title { font-size: 28px; }
  .platforms-grid { grid-template-columns: 1fr; gap: 22px; }
  .platforms-grid article + article { padding-left: 0; padding-top: 22px; border-left: 0; border-top: 1px solid var(--line); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
@media print {
  .site-nav, .breadcrumb, .case-index, .fold-indicator, .site-footer a { display: none !important; }
  .page-shell { padding: 0; }
  .folds, .case-page { background: #fff; }
  .is-enhanced.folds, .case-body { display: block; }
  .is-enhanced .fold-panel { min-height: 0; padding: 24px 0; }
  .is-enhanced .fold-content[hidden] { display: block !important; }
  .is-enhanced .fold-panel:not(.is-active) .fold-toggle { position: static; padding: 0; flex-direction: row; gap: 12px; }
  .is-enhanced .fold-panel:not(.is-active) .fold-label { margin: 0; font-size: 22px; }
  .display-title { font-size: 40px; }
  .project-preview, .demo-item, .hardware-photo { break-inside: avoid; }
}
