/* Palette: saturated ultramarine and sky blues + hot pink, rose and blush as the complementary colours,
     used in solid colour blocks */
  :root {
    --bg: #f6f7ff; --surface: #ffffff; --text: #0a0f40; --muted: #555b8a; --line: #dfe2f7;
    --blue-900: #0a0f40; --blue-700: #1f35ff; --blue-500: #4d64ff; --blue-300: #6fb6ff; --blue-100: #e6e9ff;
    --comp: #ff2e93; --comp-soft: #ffd3ea; --comp-light: #ff9fd0;
    --primary: var(--blue-700); --soft: var(--blue-100);
    --ph-bg: #fff4c4; --ph-line: #e3b733; --ph-fg: #2a2200;
    --maxw: 1160px; --on-primary: #ffffff;
    /* colour blocks keep the same saturated colours in both themes */
    --block-blue: #1f35ff; --block-pink: #ff2e93; --block-blush: #ffd3ea; --block-ice: #e6e9ff; --block-ink: #0a0f40;
  }
  * { box-sizing: border-box; }
  body { margin: 0; background: var(--bg); color: var(--text); overflow-x: hidden;
    font: 17px/1.6 var(--font-body); }
  /* Typeface: DM Sans for headings, text and labels */
  body { --font-body: "DM Sans", "Helvetica Neue", Arial, sans-serif; --font-head: var(--font-body); --font-label: var(--font-body);
         --head-weight: 700; --head-track: -.035em; }
  :is(.eyebrow, .sec-label, .sheet h4, .card .meta, .pub .type, .ptabs button, .tag-pill, .sheet-head small, .news-item .meta) { font-family: var(--font-label); }
  h1, h2, h3, .brand b, .year { font-family: var(--font-head); font-weight: var(--head-weight); letter-spacing: var(--head-track); }
  a { color: inherit; }
  .wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

  /* header */
  header.site { border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 20; }
  header.site .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; position: relative; }
  .brand { display: flex; align-items: center; gap: 14px; text-decoration: none; }
  /* knit-chart logo: every pixel is a stitch; colours follow the theme */
  .tmr-chart { display: block; height: 30px; width: auto; flex: none; }
  .tmr-chart .px-on { fill: var(--primary); }
  .tmr-chart .px-off { fill: var(--soft); }
  .tmr-chart .px-acc { fill: var(--comp); }
  
  .brand b { display: block; font-size: 17px; letter-spacing: -.01em; line-height: 1.15; }
  .brand small { display: block; font-size: 12px; color: var(--muted); }
  nav.main { display: flex; gap: 2px; flex-wrap: wrap; }
  nav.main a { text-decoration: none; font-size: 15px; padding: 6px 12px; border-radius: 999px; color: var(--muted); }
  nav.main a:hover { color: var(--text); }
  nav.main a.on { color: var(--primary); background: var(--soft); font-weight: 600; }
  
  @media (max-width: 900px) {
    
    nav.main { display: none; position: absolute; top: 72px; left: 0; right: 0; background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px 20px 16px; flex-direction: column; }
    nav.main.open { display: flex; }
  }

  /* pages */
  h1 { font-size: clamp(2.4rem, 6vw, 4.6rem); line-height: 1.02; margin: 0 0 16px; }
  h2 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); margin: 96px 0 24px; }
  h3 { font-size: 1.1rem; margin: 0 0 6px; }
  .lede { font-size: clamp(1.15rem, 1.6vw, 1.35rem); line-height: 1.5; color: var(--muted); max-width: 40em; }
  /* page header: big title on the left, intro text on the right */
  .page-head { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 16px 56px; align-items: end; margin-bottom: 8px; }
  .page-head h1 { grid-column: 1; margin: 0; }
  .page-head .lede { grid-column: 2; margin: 0 0 .4em; }
  @media (max-width: 760px) { .page-head { grid-template-columns: 1fr; } .page-head h1, .page-head .lede { grid-column: 1; } }

  .eyebrow { font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--comp); font-weight: 700; margin-bottom: 10px; }
  .sec-label { font-size: 13px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 700; margin: 0 0 14px; }

  /* full-bleed colour blocks */
  .band { background: var(--band-bg); color: var(--band-fg); box-shadow: 0 0 0 100vmax var(--band-bg); clip-path: inset(0 -100vmax); }
  .band-blue  { --band-bg: var(--block-blue);  --band-fg: #fff; }
  .band-pink  { --band-bg: var(--block-pink);  --band-fg: #fff; }
  .band-blush { --band-bg: var(--block-blush); --band-fg: var(--text); }
  .band-ice   { --band-bg: var(--block-ice);   --band-fg: var(--text); }
  .band-blue .lede, .band-pink .lede { color: rgba(255,255,255,.88); }
  .band-blue .eyebrow { color: #ff9fd0; }
  .band-pink .eyebrow { color: #0a0f40; }
  .band-blush .eyebrow, .band-ice .eyebrow { color: var(--block-blue); }

  .band-blush .theme { border-top-color: var(--block-blue); }
  .band-blush .theme:nth-child(even) { border-top-color: var(--block-pink); }
  .band-blush .theme p { color: var(--text); opacity: .8; }
  .page-head.band { padding: 64px 0 76px; margin-bottom: 0; }
  #research .page-head { --band-bg: var(--block-blue); --band-fg: #fff; }
  #projects .page-head { --band-bg: var(--block-pink); --band-fg: #fff; }
  #publications .page-head { --band-bg: var(--block-ice); --band-fg: var(--text); }
  #people .page-head { --band-bg: var(--block-blush); --band-fg: var(--text); }
  #teaching .page-head { --band-bg: var(--block-blue); --band-fg: #fff; }
  #join .page-head { --band-bg: var(--block-pink); --band-fg: #fff; }
  #news .page-head { --band-bg: var(--block-blush); --band-fg: var(--text); }
  #research .page-head .lede, #projects .page-head .lede, #teaching .page-head .lede, #join .page-head .lede { color: rgba(255,255,255,.88); }
  #research .page-head .eyebrow, #teaching .page-head .eyebrow { color: #ff9fd0; }
  #projects .page-head .eyebrow, #join .page-head .eyebrow { color: #0a0f40; }
  #publications .page-head .eyebrow, #people .page-head .eyebrow, #news .page-head .eyebrow { color: var(--block-blue); }

  /* the footer's own dissolve is not needed when the divider does it */
  body { position: relative; min-height: 100vh; }

  body .page-head.band { padding-bottom: 56px; }
  /* cards */
  .grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
  .card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; text-decoration: none; transition: border-color .15s, transform .15s; }
  a.card:hover { border-color: var(--blue-500); transform: translateY(-2px); }
  .card .body { padding: 16px 18px 18px; }
  .card p { margin: 0; color: var(--muted); font-size: 15px; }
  .card .meta { font-size: 13px; color: var(--muted); font-weight: 600; margin-bottom: 4px; }
  .card .more { margin-top: 10px; font-size: 14px; color: var(--primary); font-weight: 600; }
  .img { aspect-ratio: 16/10; display: block; width: 100%; }

  .row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
  .theme { border-top: 3px solid var(--blue-500); padding-top: 14px; }
  .theme:nth-child(even) { border-top-color: var(--comp); }
  
  .list { border-top: 1px solid var(--line); }
  .list > div { display: grid; grid-template-columns: 170px 1fr; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
  @media (max-width: 600px) { .list > div { grid-template-columns: 1fr; gap: 4px; } }
  .list .k { color: var(--muted); font-size: 14px; }

  .tile-img { position: relative; overflow: hidden; }
  .tile-img svg { display: block; width: 100%; height: auto; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
  .tile-img svg.alt { position: absolute; inset: 0; height: 100%; opacity: 0; transition: opacity .35s ease, transform .6s cubic-bezier(.2,.7,.2,1); }
  a.card:hover .tile-img svg { transform: scale(1.04); }
  a.card:hover .tile-img svg.alt { opacity: 1; }
  @media (prefers-reduced-motion: reduce) { .tile-img svg, .tile-img svg.alt { transition: none; } a.card:hover .tile-img svg { transform: none; } }
  .tag-pill { position: absolute; top: 12px; left: 12px; z-index: 1; font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; padding: 4px 11px; border-radius: 999px; line-height: 1.5; }
  .tag-pill.inline { position: static; display: inline-block; vertical-align: middle; margin-left: 8px; }
  .tag-pill.sheet-tag { position: static; display: block; width: fit-content; margin-top: 6px; font-size: 9.5px; padding: 2px 8px; letter-spacing: .08em; }
  .t-installation { background: var(--comp); color: #fff; }
  .t-shell { background: #fff; color: #1f35ff; }
  .t-bridge { background: #6fb6ff; color: #0a0f40; }
  .t-software { background: #0a0f40; color: #fff; }
  /* Research line: solid blue with a three-pixel mark, like the theme codes */
  .t-research-line { background: #1f35ff; color: #fff; }
  .t-research-line::before { content: ''; display: inline-block; width: 11px; height: 3px; margin: 0 5px 1px 0; vertical-align: middle;
    background: linear-gradient(90deg, #fff 0 3px, transparent 3px 4px, #6fb6ff 4px 7px, transparent 7px 8px, #ff9fd0 8px 11px); }
  .t-research { background: rgba(255,255,255,.88); color: #4a5275; }
  .filters { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
  /* projects grid: three per row, image-led tiles with compact text */
  :is(#project-grid, #course-grid) { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
  @media (max-width: 960px) { :is(#project-grid, #course-grid) { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
  @media (max-width: 560px) { :is(#project-grid, #course-grid) { grid-template-columns: 1fr; } }
  :is(#project-grid, #course-grid) .card .body { padding: 12px 16px 14px; }
  :is(#project-grid, #course-grid) .card .meta { font-size: 12px; margin-bottom: 4px; display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; }
  /* type tag at the bottom of the text */
  :is(#project-grid, #course-grid) .card .card-foot { margin-top: 10px; }
  .tag-pill.card-tag { position: static; display: inline-block; font-size: 9.5px; padding: 2px 8px; letter-spacing: .08em; }
  .tag-pill.card-tag.t-shell { box-shadow: inset 0 0 0 1px #1f35ff; }
  .tag-pill.card-tag.t-course { background: var(--block-blue); color: #fff; }
  .tag-pill.card-tag.t-research { background: var(--soft); color: var(--primary); }
  :is(#project-grid, #course-grid) .card h3 { font-size: 1.05rem; margin-bottom: 4px; }
  :is(#project-grid, #course-grid) .card p { font-size: 13.5px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  /* research themes with graphics */
  .themes { display: grid; gap: 36px; margin-top: 40px; }

  /* people: clean, line-free */
  .people-sec { margin-top: 56px; }
  .people-sec h2 { font-size: 1.25rem; margin: 0 0 18px; }
  .people-grid { display: grid; gap: 28px 22px; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
  .person { text-decoration: none; display: block; }
  .person svg { display: block; width: 100%; aspect-ratio: 1/1; border-radius: 10px; transition: transform .15s; }
  .person:hover svg { transform: translateY(-2px); }
  .person b { display: block; font-size: 16px; }
  /* white panels so names and roles stay readable over the pixel background */
  .people-grid .person { display: flex; flex-direction: column; }
  .people-grid .person .pinfo { flex: 1; }
  .pinfo { display: block; background: var(--surface); border: 1px solid var(--line); border-top: 0; padding: 10px 12px 12px; }
  
  #people .alum { background: var(--surface); border: 1px solid var(--line); padding: 8px 12px 8px 8px; }
  .person small { display: block; color: var(--muted); font-size: 14px; }

  .pthumb { position: relative; display: block; overflow: hidden; }
  .pthumb svg.alt { position: absolute; inset: 0; height: 100%; opacity: 0; transition: opacity .35s ease; }
  .person:hover .pthumb svg.alt { opacity: 1; }
  @media (prefers-reduced-motion: reduce) { .pthumb svg.alt { transition: none; } }

  .alumni { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px 24px; }
  .alum { display: flex; gap: 12px; align-items: center; text-decoration: none; }
  .alum svg { flex: none; width: 44px; height: 44px; border-radius: 50%; }
  .alum b { display: block; font-size: 15px; }
  .alum small { display: block; font-size: 13px; color: var(--muted); line-height: 1.35; }
  .alum:hover b { color: var(--primary); }

  /* person post */
  .profile { display: grid; grid-template-columns: 260px 1fr; gap: 40px; align-items: start; }
  @media (max-width: 760px) { .profile { grid-template-columns: 1fr; gap: 20px; } }
  .profile svg { width: 100%; aspect-ratio: 1/1; border-radius: 12px; display: block; }
  .profile .links { font-size: 15px; color: var(--muted); }

  /* single (project / course) */
  .single-hero { width: 100%; height: clamp(260px, 45vh, 460px); display: block; }
  .hgal-wrap { position: relative; background: var(--blue-900); }
  .hgal { display: flex; gap: 6px; overflow-x: auto; scroll-snap-type: x mandatory; height: clamp(280px, 58vh, 560px); scrollbar-width: thin; }
  .hgal > div { flex: none; height: 100%; scroll-snap-align: start; }
  .hgal svg { width: 100%; height: 100%; display: block; }
  .hgal-bar { position: absolute; right: 16px; bottom: 16px; display: flex; gap: 8px; align-items: center; }
  .hgal-bar span { color: #fff; font-size: 13px; background: rgba(10,15,64,.55); padding: 4px 10px; border-radius: 999px; }
  .hgal-bar button { width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255,255,255,.5); background: rgba(10,15,64,.45); color: #fff; font-size: 18px; cursor: pointer; }
  .single-cols { display: grid; grid-template-columns: 1fr 300px; gap: 48px; margin-top: 36px; }
  @media (max-width: 860px) { .single-cols { grid-template-columns: 1fr; gap: 24px; } }
  .side { display: grid; gap: 18px; align-self: start; }
  .facts { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; font-size: 15px; margin: 0; }
  .facts dt { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; margin-top: 12px; }
  .facts dt:first-child { margin-top: 0; }
  .facts dd { margin: 2px 0 0; }

  /* fact sheet sidebar (projects + people) */
  .sheet { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; font-size: 14px; align-self: start; position: sticky; top: 92px; }
  @media (max-width: 860px) { .sheet { position: static; } }
  .sheet-head { background: var(--block-blue); color: #fff; padding: 14px 18px; }
  .sheet-head small { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: #ff9fd0; font-weight: 700; }
  .sheet-head b { font-size: 16px; }
  .sheet-sec { padding: 14px 18px; border-top: 1px solid var(--line); }
  .sheet-head + .sheet-sec { border-top: 0; }
  .sheet h4 { display: flex; justify-content: space-between; align-items: center; margin: 0 0 10px; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
  .sheet h4 .n { background: var(--soft); color: var(--primary); border-radius: 999px; padding: 1px 8px; font-size: 11px; letter-spacing: 0; }
  .kv { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 7px 12px; margin: 0; } /* minmax: a long word cannot widen the column past the sheet */
  .kv dt { color: var(--muted); }
  .kv dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; } /* long codes such as grant call IDs break instead of running out of the sheet */
  .s-item { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; text-decoration: none; }
  .s-item + .s-item { border-top: 1px dashed var(--line); }
  .s-item .thumb { flex: none; width: 46px; height: 46px; border-radius: 6px; display: block; }
  .s-item .av { flex: none; width: 32px; height: 32px; border-radius: 50%; display: block; }
  .s-item b { display: block; font-size: 13.5px; line-height: 1.3; font-weight: 600; }
  a.s-item:hover b { color: var(--primary); }
  .s-item small { display: block; font-size: 12.5px; color: var(--muted); line-height: 1.35; margin-top: 2px; }
  .s-item .tag { flex: none; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); width: 62px; padding-top: 2px; }

  #news-home { grid-template-columns: repeat(4, 1fr); gap: 18px; }
  @media (max-width: 1000px) { #news-home { grid-template-columns: repeat(2, 1fr); } }
  @media (max-width: 560px) { #news-home { grid-template-columns: 1fr; } }
  /* compact text under the home news images: date, 2-line title, 2-line summary */
  #news-home .card .body { padding: 10px 14px 12px; }
  #news-home .card .meta { font-size: 11.5px; margin-bottom: 2px; }
  #news-home .card h3 { font-size: .98rem; line-height: 1.3; margin-bottom: 4px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  #news-home .card p { font-size: 13px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  /* news archive */
  .news-list { display: grid; gap: 0; margin-top: 32px; border-top: 1px solid var(--line); }
  .news-item { display: grid; grid-template-columns: 200px 1fr; gap: 24px; padding: 22px 0; border-bottom: 1px solid var(--line); text-decoration: none; align-items: center; }
  @media (max-width: 600px) { .news-item { grid-template-columns: 1fr; gap: 10px; } }
  .news-item svg { width: 100%; aspect-ratio: 16/10; border-radius: 8px; display: block; }
  .news-item .meta { font-size: 13px; color: var(--muted); font-weight: 600; }
  .news-item h3 { margin: 2px 0 6px; }
  .news-item p { margin: 0; color: var(--muted); font-size: 15px; }
  .gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 24px; }
  .gallery svg { width: 100%; aspect-ratio: 4/3; border-radius: 8px; display: block; }
  .back { display: inline-block; font-size: 14px; color: var(--primary); text-decoration: none; margin-bottom: 18px; font-weight: 600; }
  .media { display: grid; gap: 0; margin-top: 8px; }
  .media a { display: grid; grid-template-columns: 90px 1fr auto; gap: 14px; align-items: baseline; padding: 12px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
  .media a:first-child { border-top: 1px solid var(--line); }
  .media .mt { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--comp); }
  
  /* Publications / Credits tabs on project pages */
  .ptabs { display: flex; gap: 28px; margin-top: 48px; border-bottom: 1px solid var(--line); }
  .ptabs button { position: relative; font: inherit; font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
    background: none; border: 0; padding: 10px 0 12px; color: var(--muted); cursor: pointer; display: flex; align-items: center; gap: 8px; }
  .ptabs button .n { background: var(--soft); color: var(--primary); font-size: 11px; letter-spacing: 0; padding: 1px 7px; }
  .ptabs button[aria-selected="true"] { color: var(--text); }
  .ptabs button[aria-selected="true"]::after { content: ''; position: absolute; left: 0; bottom: -1px; width: 17px; height: 4px;
    background: linear-gradient(90deg, var(--block-blue) 0 5px, transparent 5px 6px, var(--block-pink) 6px 11px, transparent 11px 12px, #6fb6ff 12px 17px); }
  .ptabs button:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
  .ptab-panel { padding-top: 6px; }
  /* compact publication list on project pages */
  .proj-pubs .pub { grid-template-columns: 1fr; gap: 0; padding: 11px 0; }
  .proj-pubs .pub .type { display: none; }
  .proj-pubs .pub .t { font-size: 14.5px; line-height: 1.4; }
  .proj-pubs .pub .a, .proj-pubs .pub .v { font-size: 13px; line-height: 1.45; }
  .proj-pubs .pub .links { font-size: 12px; }
  .credits { padding-top: 18px; }
  .credits dl { display: grid; grid-template-columns: 200px 1fr; gap: 8px 24px; font-size: 15px; margin: 0; }
  @media (max-width: 600px) { .credits dl { grid-template-columns: 1fr; gap: 0; } .credits dd { margin-bottom: 10px; } }
  .credits dt { color: var(--muted); }
  .credits dd { margin: 0; }

  /* publications */
  .pub-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 28px 0 8px; }
  .chip { font: inherit; font-size: 14px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; }
  .chip.on { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
  .pub-search { font: inherit; font-size: 14px; padding: 7px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--text); min-width: 220px; flex: 1; max-width: 340px; margin-left: auto; }
  .year { font-size: 1.3rem; margin: 36px 0 4px; color: var(--primary); }
  .pub { padding: 14px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 140px 1fr; gap: 16px; }
  @media (max-width: 600px) { .pub { grid-template-columns: 1fr; gap: 4px; } }
  .pub .type { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--comp); padding-top: 3px; }
  .pub .t { font-weight: 600; }
  .pub .a { color: var(--muted); font-size: 15px; }
  .pub .a b { color: var(--text); }
  .pub .v { font-size: 15px; font-style: italic; }
  .pub .links { font-size: 13px; margin-top: 4px; }

  /* footer with contact info */
  footer { display: flow-root; padding: 0 0 40px; font-size: 15px; color: rgba(255,255,255,.82); background: var(--block-blue); }
  .fgrid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; }
  @media (max-width: 860px) { .fgrid { grid-template-columns: 1fr 1fr; } }
  @media (max-width: 520px) { .fgrid { grid-template-columns: 1fr; } }
  footer h4 { margin: 0 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .1em; color: #fff; }
  footer p { margin: 0; line-height: 1.6; }
  footer a { color: #ff9fd0; text-decoration: none; }
  /* visible keyboard focus everywhere */
  :focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
  .band :focus-visible, footer :focus-visible { outline-color: #fff; }
  /* comfortable tap targets on touch screens */
  @media (max-width: 760px) {
    .chip, .back, .ptabs button { min-height: 44px; }
    .chip, .back { display: inline-flex; align-items: center; }
    footer p a { display: inline-block; padding: 10px 0; }
    nav.main a { padding: 12px 12px; }
  }
  /* compact fact strip under project titles, phones only (the full fact sheet sits further down there) */
  .fact-strip { display: none; }
  @media (max-width: 860px) {
    .fact-strip { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: -4px 0 18px; font-size: 13.5px; color: var(--muted); }
    .fact-strip b { color: var(--text); font-weight: 600; }
  }
  footer .tmr-chart .px-on { fill: #fff; } footer .tmr-chart .px-off { fill: rgba(255,255,255,.16); } footer .tmr-chart .px-acc { fill: #ff2e93; }
  .fbottom { margin-top: 36px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.22); font-size: 13px; display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }

  /* ---------- pixel accents (from the knit-chart logo) ---------- */
  /* the pixel scatter for the corner of cards, portraits and the fact sheet (and its hover animation below) */
  :root { --scatter-small: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%22132%22%20height%3D%2260%22%3E%3Crect%20x%3D%2242%22%20y%3D%220%22%20width%3D%225%22%20height%3D%225%22/%3E%3Crect%20x%3D%2254%22%20y%3D%220%22%20width%3D%225%22%20height%3D%225%22/%3E%3Crect%20x%3D%2260%22%20y%3D%220%22%20width%3D%225%22%20height%3D%225%22/%3E%3Crect%20x%3D%2266%22%20y%3D%220%22%20width%3D%225%22%20height%3D%225%22/%3E%3Crect%20x%3D%2272%22%20y%3D%220%22%20width%3D%225%22%20height%3D%225%22/%3E%3Crect%20x%3D%2278%22%20y%3D%220%22%20width%3D%225%22%20height%3D%225%22/%3E%3Crect%20x%3D%2284%22%20y%3D%220%22%20width%3D%225%22%20height%3D%225%22/%3E%3Crect%20x%3D%2290%22%20y%3D%220%22%20width%3D%225%22%20height%3D%225%22/%3E%3Crect%20x%3D%2296%22%20y%3D%220%22%20width%3D%225%22%20height%3D%225%22/%3E%3Crect%20x%3D%22102%22%20y%3D%220%22%20width%3D%225%22%20height%3D%225%22/%3E%3Crect%20x%3D%22108%22%20y%3D%220%22%20width%3D%225%22%20height%3D%225%22/%3E%3Crect%20x%3D%22114%22%20y%3D%220%22%20width%3D%225%22%20height%3D%225%22/%3E%3Crect%20x%3D%22120%22%20y%3D%220%22%20width%3D%225%22%20height%3D%225%22/%3E%3Crect%20x%3D%22126%22%20y%3D%220%22%20width%3D%225%22%20height%3D%225%22/%3E%3Crect%20x%3D%2272%22%20y%3D%226%22%20width%3D%225%22%20height%3D%225%22/%3E%3Crect%20x%3D%2296%22%20y%3D%226%22%20width%3D%225%22%20height%3D%225%22/%3E%3Crect%20x%3D%22102%22%20y%3D%226%22%20width%3D%225%22%20height%3D%225%22/%3E%3Crect%20x%3D%22108%22%20y%3D%226%22%20width%3D%225%22%20height%3D%225%22/%3E%3Crect%20x%3D%22114%22%20y%3D%226%22%20width%3D%225%22%20height%3D%225%22/%3E%3Crect%20x%3D%22120%22%20y%3D%226%22%20width%3D%225%22%20height%3D%225%22/%3E%3Crect%20x%3D%22126%22%20y%3D%226%22%20width%3D%225%22%20height%3D%225%22/%3E%3Crect%20x%3D%2260%22%20y%3D%2212%22%20width%3D%225%22%20height%3D%225%22/%3E%3Crect%20x%3D%2272%22%20y%3D%2212%22%20width%3D%225%22%20height%3D%225%22/%3E%3Crect%20x%3D%2284%22%20y%3D%2212%22%20width%3D%225%22%20height%3D%225%22/%3E%3Crect%20x%3D%2290%22%20y%3D%2212%22%20width%3D%225%22%20height%3D%225%22/%3E%3Crect%20x%3D%2296%22%20y%3D%2212%22%20width%3D%225%22%20height%3D%225%22/%3E%3Crect%20x%3D%22102%22%20y%3D%2212%22%20width%3D%225%22%20height%3D%225%22/%3E%3Crect%20x%3D%22114%22%20y%3D%2212%22%20width%3D%225%22%20height%3D%225%22/%3E%3Crect%20x%3D%22120%22%20y%3D%2212%22%20width%3D%225%22%20height%3D%225%22/%3E%3Crect%20x%3D%22126%22%20y%3D%2212%22%20width%3D%225%22%20height%3D%225%22/%3E%3Crect%20x%3D%2230%22%20y%3D%2218%22%20width%3D%225%22%20height%3D%225%22/%3E%3Crect%20x%3D%2248%22%20y%3D%2218%22%20width%3D%225%22%20height%3D%225%22/%3E%3Crect%20x%3D%2266%22%20y%3D%2218%22%20width%3D%225%22%20height%3D%225%22/%3E%3Crect%20x%3D%2272%22%20y%3D%2218%22%20width%3D%225%22%20height%3D%225%22/%3E%3Crect%20x%3D%2278%22%20y%3D%2218%22%20width%3D%225%22%20height%3D%225%22/%3E%3Crect%20x%3D%2290%22%20y%3D%2218%22%20width%3D%225%22%20height%3D%225%22/%3E%3Crect%20x%3D%22114%22%20y%3D%2218%22%20width%3D%225%22%20height%3D%225%22/%3E%3Crect%20x%3D%22120%22%20y%3D%2218%22%20width%3D%225%22%20height%3D%225%22/%3E%3Crect%20x%3D%22126%22%20y%3D%2218%22%20width%3D%225%22%20height%3D%225%22/%3E%3Crect%20x%3D%2260%22%20y%3D%2224%22%20width%3D%225%22%20height%3D%225%22/%3E%3Crect%20x%3D%2278%22%20y%3D%2224%22%20width%3D%225%22%20height%3D%225%22/%3E%3Crect%20x%3D%2284%22%20y%3D%2224%22%20width%3D%225%22%20height%3D%225%22/%3E%3Crect%20x%3D%22102%22%20y%3D%2224%22%20width%3D%225%22%20height%3D%225%22/%3E%3Crect%20x%3D%22108%22%20y%3D%2224%22%20width%3D%225%22%20height%3D%225%22/%3E%3Crect%20x%3D%22114%22%20y%3D%2224%22%20width%3D%225%22%20height%3D%225%22/%3E%3Crect%20x%3D%22120%22%20y%3D%2224%22%20width%3D%225%22%20height%3D%225%22/%3E%3Crect%20x%3D%2248%22%20y%3D%2230%22%20width%3D%225%22%20height%3D%225%22/%3E%3Crect%20x%3D%2260%22%20y%3D%2230%22%20width%3D%225%22%20height%3D%225%22/%3E%3Crect%20x%3D%2290%22%20y%3D%2230%22%20width%3D%225%22%20height%3D%225%22/%3E%3Crect%20x%3D%22102%22%20y%3D%2230%22%20width%3D%225%22%20height%3D%225%22/%3E%3Crect%20x%3D%22108%22%20y%3D%2230%22%20width%3D%225%22%20height%3D%225%22/%3E%3Crect%20x%3D%22114%22%20y%3D%2230%22%20width%3D%225%22%20height%3D%225%22/%3E%3Crect%20x%3D%22120%22%20y%3D%2230%22%20width%3D%225%22%20height%3D%225%22/%3E%3Crect%20x%3D%2230%22%20y%3D%2236%22%20width%3D%225%22%20height%3D%225%22/%3E%3Crect%20x%3D%2296%22%20y%3D%2236%22%20width%3D%225%22%20height%3D%225%22/%3E%3Crect%20x%3D%22120%22%20y%3D%2236%22%20width%3D%225%22%20height%3D%225%22/%3E%3Crect%20x%3D%2272%22%20y%3D%2242%22%20width%3D%225%22%20height%3D%225%22/%3E%3Crect%20x%3D%2296%22%20y%3D%2242%22%20width%3D%225%22%20height%3D%225%22/%3E%3Crect%20x%3D%22114%22%20y%3D%2242%22%20width%3D%225%22%20height%3D%225%22/%3E%3Crect%20x%3D%22120%22%20y%3D%2242%22%20width%3D%225%22%20height%3D%225%22/%3E%3Crect%20x%3D%2242%22%20y%3D%2248%22%20width%3D%225%22%20height%3D%225%22/%3E%3Crect%20x%3D%2284%22%20y%3D%2248%22%20width%3D%225%22%20height%3D%225%22/%3E%3Crect%20x%3D%2290%22%20y%3D%2248%22%20width%3D%225%22%20height%3D%225%22/%3E%3Crect%20x%3D%2296%22%20y%3D%2248%22%20width%3D%225%22%20height%3D%225%22/%3E%3Crect%20x%3D%22102%22%20y%3D%2248%22%20width%3D%225%22%20height%3D%225%22/%3E%3Crect%20x%3D%22120%22%20y%3D%2248%22%20width%3D%225%22%20height%3D%225%22/%3E%3Crect%20x%3D%22108%22%20y%3D%2254%22%20width%3D%225%22%20height%3D%225%22/%3E%3Crect%20x%3D%22114%22%20y%3D%2254%22%20width%3D%225%22%20height%3D%225%22/%3E%3Crect%20x%3D%22126%22%20y%3D%2254%22%20width%3D%225%22%20height%3D%225%22/%3E%3C/svg%3E"); }
  :root { --px-a: var(--block-blue); --px-b: var(--block-pink); --px-c: #6fb6ff; --px-end: var(--block-pink); }
  .band-blue, #research .page-head, #teaching .page-head { --px-a: #fff; --px-b: #ff9fd0; --px-c: #6fb6ff; --px-end: #ff9fd0; }
  #projects .page-head, #join .page-head, .band-pink { --px-a: #fff; --px-b: var(--block-blue); --px-c: #0a0f40; --px-end: var(--block-blue); }
  ::selection { background: var(--block-pink); color: #fff; }

  /* three-pixel marker before every small label */
  .eyebrow::before, .sec-label::before { content: ''; display: inline-block; width: 17px; height: 5px; margin: 0 9px 2px 0; vertical-align: middle; background: linear-gradient(90deg, var(--px-a) 0 5px, transparent 5px 6px, var(--px-b) 6px 11px, transparent 11px 12px, var(--px-c) 12px 17px); }

  /* the logo's "loose end": one pixel after big headlines */
  .tmr-single .wp-block-post-title::after, .profile h1::after,
  .page-head h1::after, .lv-hero h1::after, .e404 h1::after, .mesh-dot-probe { content: ''; display: inline-block; width: .17em; height: .17em; margin-left: .07em; background: var(--px-end); vertical-align: baseline; }
  /* on the knitted mesh the pixel is drawn by mesh.js as one of its stitches; the ::after keeps its room */
  html.has-mesh .dot-on-mesh::after { visibility: hidden; }
  .dot-probing::after { display: none !important; }

  .page-head.band { position: relative; }
  .page-head.band > * { position: relative; z-index: 1; }

  /* active menu item: a pixel underline instead of a pill */
  nav.main a { position: relative; }
  nav.main a.on { background: none; }
  nav.main a.on::after { content: ''; position: absolute; left: 50%; bottom: -1px; width: 17px; height: 4px; transform: translateX(-50%);
    background: linear-gradient(90deg, var(--block-blue) 0 5px, transparent 5px 6px, var(--block-pink) 6px 11px, transparent 11px 12px, #6fb6ff 12px 17px); }
  @media (max-width: 900px) { nav.main a.on::after { left: 12px; transform: none; } }

  /* cards: a pixel strip knits itself along the bottom on hover */
  .card { position: relative; }
  .card::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: repeating-linear-gradient(90deg, var(--block-blue) 0 5px, transparent 5px 6px, var(--block-blue) 6px 11px, transparent 11px 12px, var(--block-pink) 12px 17px, transparent 17px 18px, #6fb6ff 18px 23px, transparent 23px 24px, var(--block-blue) 24px 29px, transparent 29px 30px, #ff9fd0 30px 35px, transparent 35px 36px);
    transform: scaleX(0); transform-origin: left; transition: transform .45s steps(12, end); }
  a.card:hover::after { transform: scaleX(1); }
  @media (prefers-reduced-motion: reduce) { .card::after { transition: none; } }

  /* fact sheet section labels and publication types get a pixel */
  .sheet h4 { padding-left: 12px; background: linear-gradient(var(--block-pink), var(--block-pink)) 0 50% / 5px 5px no-repeat; }
  /* text colours are dark enough for small labels (≥ 4.5:1 on the page); the three pixels make each type's code */
  :root { --ty-journal: #1f35ff; --ty-conference: #d1146f; --ty-book: #0a0f40; --ty-preprint: #1a6fc2; --ty-thesis: #8a1aa8; }
  .ty-journal    { --ty: var(--ty-journal);    --ty2: #1f35ff; --ty3: #6fb6ff; }
  .ty-conference { --ty: var(--ty-conference); --ty2: #ff2e93; --ty3: #ff9fd0; }
  .ty-book       { --ty: var(--ty-book);       --ty2: #1f35ff; --ty3: #ff2e93; }
  .ty-preprint   { --ty: var(--ty-preprint);   --ty2: #6fb6ff; --ty3: #c9e4ff; }
  .ty-thesis     { --ty: var(--ty-thesis);     --ty2: #ff2e93; --ty3: #1f35ff; }
  .pub .type[class*="ty-"], .s-item .tag[class*="ty-"] { color: var(--ty); }
  .pub .type { white-space: nowrap; }
  .pub .type::before, .s-item .tag[class*="ty-"]::before { content: ''; display: inline-block; width: 17px; height: 5px; margin-right: 8px; vertical-align: 1px;
    background: linear-gradient(90deg, var(--ty, var(--muted)) 0 5px, transparent 5px 6px, var(--ty2, var(--muted)) 6px 11px, transparent 11px 12px, var(--ty3, var(--muted)) 12px 17px); }
  .s-item .tag[class*="ty-"]::before { display: block; margin: 0 0 4px; }

  /* the blue footer dissolves upward into the page */
  footer { position: relative; }

  /* cards and photos: a pink scatter settles on the image corner on hover */
  .card::before, .person::before { content: ''; position: absolute; right: 0; top: 0; width: 132px; height: 60px; z-index: 2; pointer-events: none;
    background: var(--block-pink); opacity: 0; transition: opacity .3s steps(4, end);
    -webkit-mask: var(--scatter-small) no-repeat right top; mask: var(--scatter-small) no-repeat right top; }
  .person { position: relative; }
  a.card:hover::before, .person:hover::before { opacity: 1; }
  .person::before { background: var(--block-blue); }
  /* portrait on the PI card and person pages: a permanent scatter corner */
  .profile { position: relative; }

  .profile::after { content: ''; position: absolute; left: 0; top: 0; width: 132px; height: 60px; transform: scaleX(-1); pointer-events: none; z-index: 2;
    background: var(--block-blue); -webkit-mask: var(--scatter-small) no-repeat right top; mask: var(--scatter-small) no-repeat right top; }

  /* fact-sheet header and call-outs */
  .sheet-head { position: relative; overflow: hidden; }
  .sheet-head::after { content: ''; position: absolute; right: 0; top: 0; width: 132px; height: 60px; pointer-events: none;
    background: #ff9fd0; -webkit-mask: var(--scatter-small) no-repeat right top; mask: var(--scatter-small) no-repeat right top; }
  .sheet-head > * { position: relative; z-index: 1; }

  /* Corners option: everything square to match the pixel grid (posts, images, panels, avatars,
     buttons, filter chips, menu items, tags and gallery controls) */
  body :is(.card, .tile-img, .facts, .sheet, .person svg, .profile svg, .alum svg, .s-item .thumb, .s-item .av, .news-item svg, .gallery svg, .pub-search, .chip, nav.main a, .tag-pill, .sheet h4 .n, .hgal-bar span, .hgal-bar button) { border-radius: 0; }
  @media (prefers-reduced-motion: reduce) { .hgal { scroll-behavior: auto; } }

/* no automatic gaps between header, page and footer, or around colour blocks and seams */
.wp-site-blocks > * + * { margin-block-start: 0; }
:is(.page-head, .hgal-wrap, .single-hero) { margin-block-start: 0 !important; margin-block-end: 0; }
.tmr-main > .wrap > :first-child, .tmr-main.wrap > :first-child { margin-block-start: 0; }
.tmr-single { padding-top: 32px; padding-bottom: 80px; }
.tmr-main { padding-bottom: 80px; }
.tmr-home { padding-bottom: 0; }
.tmr-home > .wrap { padding-bottom: 80px; }
.tmr-narrow { max-width: 820px; }

/* header: logo left, menu right (core Navigation block) */
header.site { position: sticky; top: 0; z-index: 20; background: var(--bg); border-bottom: 1px solid var(--line); }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; }
header.site .wp-block-navigation { font-size: 15px; gap: 2px; }
header.site .wp-block-navigation-item__content { padding: 6px 12px !important; color: var(--muted); position: relative; }
header.site .wp-block-navigation-item__content:hover { color: var(--text); }
header.site .current-menu-item > .wp-block-navigation-item__content,
header.site .wp-block-navigation-item__content[aria-current="page"] { color: var(--primary); font-weight: 600; }
header.site .current-menu-item > .wp-block-navigation-item__content::after,
header.site .wp-block-navigation-item__content[aria-current="page"]::after {
  content: ''; position: absolute; left: 50%; bottom: -1px; width: 17px; height: 4px; transform: translateX(-50%);
  background: linear-gradient(90deg, var(--block-blue) 0 5px, transparent 5px 6px, var(--block-pink) 6px 11px, transparent 11px 12px, #6fb6ff 12px 17px); }
header.site .wp-block-navigation__responsive-container-open { border: 1px solid var(--line); padding: 8px; min-width: 44px; min-height: 44px; }
.brand { color: var(--text); }

/* buttons: core Button block uses the prototype's two styles */
.wp-block-button .wp-block-button__link { border-radius: 0; }
.is-style-outline .wp-block-button__link { background: transparent; color: var(--text); border: 1px solid var(--line); }
.band-blue .is-style-outline .wp-block-button__link, .band-pink .is-style-outline .wp-block-button__link { color: #fff; border-color: rgba(255,255,255,.55); }
.band-blue .wp-block-button:not(.is-style-outline) .wp-block-button__link { background: #fff; color: var(--block-ink); }

/* home news heading row */
.news-head { margin: 40px 0 24px; align-items: baseline; }
.news-head h2 { margin: 0; }
.news-head p { margin: 0; font-weight: 600; font-size: 15px; }

/* footer */
footer.site-footer .fbottom { margin-top: 36px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.22); font-size: 13px; }
footer.site-footer h4 { font-family: var(--font-label, inherit); }
.sheet-links { margin: 10px 0 0; font-size: 14px; }

/* featured image heroes on course and news pages */
.single-hero img { width: 100%; height: 100%; object-fit: cover; }
.tmr-single .wp-block-post-title { margin: 0 0 16px; }

/* zero-specificity so the 1160px .wrap limit (prototype spacing) still applies */
:where(.wp-site-blocks, .wp-site-blocks > *, .tmr-main) { min-width: 0; }
.hgal-wrap { width: 100%; max-width: 100vw; overflow: hidden; }
.hgal { max-width: 100%; }

/* small screens: use WordPress's own menu button + overlay (the prototype's hide-the-menu rule does not apply here) */
@media (max-width: 900px) {
  header.site .wp-block-navigation.main { display: flex; position: static; flex-direction: row; padding: 0; border: 0; background: none; }
}
header.site .wp-block-navigation__responsive-container.is-menu-open { background: var(--bg); padding: 24px; }
header.site .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content { font-size: 1.4rem; padding: 10px 0 !important; color: var(--text); }
/* use the menu button below 900px (WordPress's default switch point is 600px, where the menu would already wrap) */
@media (max-width: 900px) {
  header.site .wp-block-navigation__responsive-container-open:not(.always-shown) { display: flex; }
  header.site .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) { display: none; }
}

/* Pixel accents take a colour that stands out on each title block:
   the title dot (--px-end) and the three-pixel label marker (--px-a/b/c). */
.tmr-head-blue  { --px-end: var(--block-pink); --px-a: #fff;               --px-b: var(--block-pink); --px-c: #6fb6ff; }
.tmr-head-pink  { --px-end: var(--block-blue); --px-a: #fff;               --px-b: var(--block-blue); --px-c: #0a0f40; }
.tmr-head-ice   { --px-end: var(--block-pink); --px-a: var(--block-blue);  --px-b: var(--block-pink); --px-c: #6fb6ff; }
.tmr-head-blush { --px-end: var(--block-blue); --px-a: var(--block-blue);  --px-b: var(--block-pink); --px-c: #6fb6ff; }

/* titles on the plain page background (single project, course, person, news pages) */
.tmr-single { --px-end: var(--block-pink); }

/* Publications section on person pages: same compact list as project pages */
.person-pubs { margin-top: 48px; padding-top: 18px; border-top: 1px solid var(--line); }
.person-pubs .sec-label .n { background: var(--soft); color: var(--primary); font-size: 11px; letter-spacing: 0; padding: 1px 7px; margin-left: 6px; }
.person-pubs .more-link { margin: 14px 0 0; font-weight: 600; font-size: 15px; }
.person-pubs .empty-note, .sheet-sec .empty-note { color: var(--muted); margin: 6px 0 0; }

/* Photo credit tags (Media Library "Photo credit" field): small, quiet, on the photo's corner. */
.hgal > div { position: relative; }
.photo-credit { position: absolute; left: 8px; bottom: 8px; z-index: 2; max-width: calc(100% - 16px);
  font-size: 11px; line-height: 1.4; letter-spacing: .01em; color: #fff; background: rgba(10,15,64,.62);
  padding: 2px 7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }

/* Content still to write: <span class="ph">…</span> in a post shows as a yellow note. Search the site for "ph" spans before launch. */
.ph { background: #fff4c4; outline: 1px dashed #e3b733; border-radius: 3px; padding: 0 3px; color: #2a2200; }

/* Filters (publications, projects) hide items with the hidden attribute; layout rules like .pub{display:grid} must not undo it. */
[hidden] { display: none !important; }

/* Publication links: DOI shown in full and clickable; long DOIs may wrap on phones. */
.pub .links a { color: var(--primary); text-underline-offset: 2px; overflow-wrap: anywhere; }
.pub .links a:hover { text-decoration-thickness: 2px; }

/* Footer: logo sits on the heading line, and all three column headings share one 24px line so the columns start level. */
.fgrid > *, .fgrid > * > :first-child { margin-block-start: 0; }
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-brand > * { margin: 0 !important; }
.footer-brand .brand { display: block; line-height: 0; }
.footer-brand .tmr-chart { height: 24px; width: auto; margin: 0; display: block; }
footer.site-footer .fgrid h4 { line-height: 24px; margin-bottom: 0; }

/* Small image gallery (bottom of course pages): square thumbnails, each opens the full photo. */
.mini-gal { margin: 56px 0 24px; padding-top: 28px; border-top: 1px solid var(--line); }
.mini-gal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.mini-gal-grid > * { margin: 0; }
.mini-gal figure a { position: relative; display: block; overflow: hidden; background: var(--surface); }
.mini-gal img { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; transition: transform .25s ease; }
.mini-gal a:hover img, .mini-gal a:focus-visible img { transform: scale(1.03); }
.mini-gal a:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.mini-gal .photo-credit { font-size: 10px; left: 6px; bottom: 6px; max-width: calc(100% - 12px); }
.mini-gal figcaption { font-size: 13px; color: var(--muted); margin-top: 6px; line-height: 1.4; }
.mini-gal-empty { margin: 48px 0 24px; padding: 14px 16px; font-size: 14px; color: var(--muted); border: 1px dashed var(--line); border-radius: 8px; }
@media (prefers-reduced-motion: reduce) { .mini-gal img { transition: none; } }
@media (max-width: 520px) { .mini-gal-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; } }

/* Hover swap for real photos too (the rules above only covered the drawn placeholders): the second image sits on top and fades in. */
.tile-img, .pthumb { position: relative; }
.tile-img .alt, .pthumb .alt { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .35s ease; }
a.card:hover .tile-img .alt, a.card:focus-visible .tile-img .alt, .person:hover .pthumb .alt, .person:focus-visible .pthumb .alt, .profile .pthumb:hover .alt { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .tile-img .alt, .pthumb .alt { transition: none; } }

/* Person pages: no scatter corner on the photo, a calmer name size. */
.profile::after { content: none; }
.profile h1 { font-size: clamp(1.9rem, 3.2vw, 2.6rem); line-height: 1.1; }
/* Sidebar (fact sheet) starts level with the text on its left: no WordPress block gap above it. */
.single-cols > * { margin-block-start: 0; }

/* People page, one-grid option: a small role label on each card instead of section headings. */
.people-single { margin-top: 40px; }
.pinfo .plabel { display: block; font-family: var(--font-label); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 4px; }
.pinfo .plabel::before { content: ''; display: inline-block; width: 5px; height: 5px; margin: 0 6px 1px 0; vertical-align: middle; background: var(--block-blue); }
.grp-principal-investigator .plabel::before { background: var(--block-pink); }
.grp-alumni .plabel::before, .grp-associated-researchers .plabel::before { background: var(--muted); }
@media (max-width: 520px) { .people-single { grid-template-columns: repeat(2, 1fr); gap: 16px 10px; } .people-single .pinfo { padding: 8px 9px 10px; } .people-single .pinfo small { font-size: 12px; } }
/* People: filters above the grid, then a smaller alumni list. */
.people-filters { margin-top: 36px; }
.people-filters + .people-single { margin-top: 24px; }
.chip .n { font-size: 12px; opacity: .7; margin-left: 2px; }
.people-alumni { margin-top: 64px; }
.people-alumni .alum { background: var(--surface); border: 1px solid var(--line); padding: 8px 12px 8px 8px; }
.alum img, .alum svg { flex: none; width: 44px; height: 44px; object-fit: cover; display: block; }

/* Alumni: current position line */
.now { color: var(--text); font-weight: 600; }
.pinfo small.now { display: block; margin-top: 3px; }

/* Several project types per project: pills sit side by side (tiles and fact sheet). */
.tag-pills { display: inline-flex; flex-wrap: wrap; gap: 4px; vertical-align: middle; }
.sheet-head .tag-pills { display: flex; margin-top: 6px; }
.tag-pills .tag-pill.sheet-tag { margin-top: 0; }
/* TMR contributors in the fact sheet: name only, vertically centred on the photo. */
.sheet .s-item > span > b:only-child { display: block; }
.sheet a.s-item { align-items: center; }

/* Course fact sheet: current TAs as plain name + term lines (no photos). */
.sheet .s-item.ta { padding-left: 0; }
.sheet .s-item.ta b { display: block; }

/* Master's theses: own tab on Publications, own colour code, optional small image on the right. */
:root { --ty-masters-thesis: #0f7a6b; }
.ty-masters-thesis { --ty: var(--ty-masters-thesis); --ty2: #6fb6ff; --ty3: #c9e4ff; }
.pub-tabs { margin-top: 28px; }
.pub-tabs .ptab-panel > .pub-tools:first-child, .pub-tabs .theses-note + .pub-tools { margin-top: 18px; }
.theses-note { color: var(--muted); font-size: 14px; margin: 18px 0 0; }
.pub.thesis .thesis-body { display: flex; gap: 18px; align-items: flex-start; justify-content: space-between; }
.pub.thesis .t a { color: inherit; text-decoration: none; }
.pub.thesis .t a:hover { color: var(--primary); text-decoration: underline; }
.pub.thesis .student { color: var(--text); font-weight: 600; }
.pub.thesis .v { font-style: normal; color: var(--muted); }
.pub.thesis .thesis-img { flex: none; width: 112px; height: 84px; object-fit: cover; display: block; }
@media (max-width: 600px) { .pub.thesis .thesis-img { width: 84px; height: 63px; } }
.person-theses, .proj-theses { margin-top: 28px; }
.pub-tabs .ptabs { margin-top: 0; }

/* Project page: the fact sheet hangs from the photo gallery like a tag (top edge flush with the gallery, soft shadow below). */
.tmr-hang .single-cols { margin-top: 0; }
.tmr-hang .single-main { padding-top: 13px; min-width: 0; } /* eyebrow lines up with the "Fact sheet" label in the tag */
.tmr-hang .single-main > :first-child { margin-top: 0; }
.tmr-hang .sheet { border-top: 0; box-shadow: 0 10px 24px -14px rgba(10,15,64,.35); top: 72px; }
@media (max-width: 860px) {
  .tmr-hang .sheet { border-top: 1px solid var(--line); box-shadow: none; }
}
.tmr-single.tmr-hang { padding-top: 0; }

/* Tile hover strip: knits in pixel by pixel (one 6 px stitch at a time) instead of stretching.
   --px-n counts revealed pixels; registered as an integer so it only takes whole steps. */
@property --px-n { syntax: '<integer>'; inherits: false; initial-value: 0; }
.card::after { transform: none; --px-n: 0; clip-path: inset(0 calc(100% - var(--px-n) * 6px) 0 0); transition: --px-n .5s linear; }
a.card:hover::after, a.card:focus-visible::after { transform: none; --px-n: 75; } /* 75 × 6 px covers the widest tile (≈ 450 px) */
@media (prefers-reduced-motion: reduce) { .card::after { transition: none; } }

/* Corner scatters grow pixel by pixel from the corner on hover (frames = growing subsets of --scatter-small, nearest pixels first). */
:root {
  --sc-1: url("data:image/svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20width=%22132%22%20height=%2260%22%3E%3Crect%20x=%22126%22%20y=%220%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22120%22%20y=%220%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22126%22%20y=%226%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22120%22%20y=%226%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22114%22%20y=%220%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22120%22%20y=%2212%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22126%22%20y=%2212%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22108%22%20y=%220%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22114%22%20y=%226%22%20width=%225%22%20height=%225%22/%3E%3C/svg%3E");
  --sc-2: url("data:image/svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20width=%22132%22%20height=%2260%22%3E%3Crect%20x=%22126%22%20y=%220%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22120%22%20y=%220%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22126%22%20y=%226%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22120%22%20y=%226%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22114%22%20y=%220%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22120%22%20y=%2212%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22126%22%20y=%2212%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22108%22%20y=%220%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22114%22%20y=%226%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22126%22%20y=%2218%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22120%22%20y=%2218%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22114%22%20y=%2212%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%2296%22%20y=%220%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22102%22%20y=%220%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22114%22%20y=%2224%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22114%22%20y=%2218%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22102%22%20y=%2212%22%20width=%225%22%20height=%225%22/%3E%3C/svg%3E");
  --sc-3: url("data:image/svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20width=%22132%22%20height=%2260%22%3E%3Crect%20x=%22126%22%20y=%220%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22120%22%20y=%220%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22126%22%20y=%226%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22120%22%20y=%226%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22114%22%20y=%220%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22120%22%20y=%2212%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22126%22%20y=%2212%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22108%22%20y=%220%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22114%22%20y=%226%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22126%22%20y=%2218%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22120%22%20y=%2218%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22114%22%20y=%2212%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%2296%22%20y=%220%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22102%22%20y=%220%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22114%22%20y=%2224%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22114%22%20y=%2218%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22102%22%20y=%2212%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22108%22%20y=%226%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22114%22%20y=%2230%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22120%22%20y=%2224%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%2296%22%20y=%2212%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%2296%22%20y=%226%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22102%22%20y=%226%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22120%22%20y=%2230%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%2290%22%20y=%2212%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%2284%22%20y=%220%22%20width=%225%22%20height=%225%22/%3E%3C/svg%3E");
  --sc-4: url("data:image/svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20width=%22132%22%20height=%2260%22%3E%3Crect%20x=%22126%22%20y=%220%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22120%22%20y=%220%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22126%22%20y=%226%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22120%22%20y=%226%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22114%22%20y=%220%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22120%22%20y=%2212%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22126%22%20y=%2212%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22108%22%20y=%220%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22114%22%20y=%226%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22126%22%20y=%2218%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22120%22%20y=%2218%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22114%22%20y=%2212%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%2296%22%20y=%220%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22102%22%20y=%220%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22114%22%20y=%2224%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22114%22%20y=%2218%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22102%22%20y=%2212%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22108%22%20y=%226%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22114%22%20y=%2230%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22120%22%20y=%2224%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%2296%22%20y=%2212%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%2296%22%20y=%226%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22102%22%20y=%226%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22120%22%20y=%2230%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%2290%22%20y=%2212%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%2284%22%20y=%220%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22108%22%20y=%2224%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%2290%22%20y=%2218%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22102%22%20y=%2230%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22120%22%20y=%2236%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%2290%22%20y=%220%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%2296%22%20y=%2236%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%2284%22%20y=%2212%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%2278%22%20y=%2218%22%20width=%225%22%20height=%225%22/%3E%3C/svg%3E");
  --sc-5: url("data:image/svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20width=%22132%22%20height=%2260%22%3E%3Crect%20x=%22126%22%20y=%220%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22120%22%20y=%220%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22126%22%20y=%226%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22120%22%20y=%226%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22114%22%20y=%220%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22120%22%20y=%2212%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22126%22%20y=%2212%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22108%22%20y=%220%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22114%22%20y=%226%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22126%22%20y=%2218%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22120%22%20y=%2218%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22114%22%20y=%2212%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%2296%22%20y=%220%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22102%22%20y=%220%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22114%22%20y=%2224%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22114%22%20y=%2218%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22102%22%20y=%2212%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22108%22%20y=%226%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22114%22%20y=%2230%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22120%22%20y=%2224%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%2296%22%20y=%2212%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%2296%22%20y=%226%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22102%22%20y=%226%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22120%22%20y=%2230%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%2290%22%20y=%2212%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%2284%22%20y=%220%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22108%22%20y=%2224%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%2290%22%20y=%2218%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22102%22%20y=%2230%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22120%22%20y=%2236%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%2290%22%20y=%220%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%2296%22%20y=%2236%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%2284%22%20y=%2212%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%2278%22%20y=%2218%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22102%22%20y=%2224%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22120%22%20y=%2242%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%2272%22%20y=%226%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%2284%22%20y=%2224%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%2272%22%20y=%2218%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%2278%22%20y=%220%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22108%22%20y=%2230%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%2266%22%20y=%220%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22120%22%20y=%2248%22%20width=%225%22%20height=%225%22/%3E%3C/svg%3E");
  --sc-6: url("data:image/svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20width=%22132%22%20height=%2260%22%3E%3Crect%20x=%22126%22%20y=%220%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22120%22%20y=%220%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22126%22%20y=%226%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22120%22%20y=%226%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22114%22%20y=%220%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22120%22%20y=%2212%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22126%22%20y=%2212%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22108%22%20y=%220%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22114%22%20y=%226%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22126%22%20y=%2218%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22120%22%20y=%2218%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22114%22%20y=%2212%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%2296%22%20y=%220%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22102%22%20y=%220%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22114%22%20y=%2224%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22114%22%20y=%2218%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22102%22%20y=%2212%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22108%22%20y=%226%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22114%22%20y=%2230%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22120%22%20y=%2224%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%2296%22%20y=%2212%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%2296%22%20y=%226%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22102%22%20y=%226%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22120%22%20y=%2230%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%2290%22%20y=%2212%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%2284%22%20y=%220%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22108%22%20y=%2224%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%2290%22%20y=%2218%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22102%22%20y=%2230%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22120%22%20y=%2236%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%2290%22%20y=%220%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%2296%22%20y=%2236%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%2284%22%20y=%2212%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%2278%22%20y=%2218%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22102%22%20y=%2224%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22120%22%20y=%2242%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%2272%22%20y=%226%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%2284%22%20y=%2224%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%2272%22%20y=%2218%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%2278%22%20y=%220%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22108%22%20y=%2230%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%2266%22%20y=%220%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22120%22%20y=%2248%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22114%22%20y=%2242%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%2260%22%20y=%2212%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22126%22%20y=%2254%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%2272%22%20y=%2242%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%2278%22%20y=%2224%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%2290%22%20y=%2230%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%2272%22%20y=%220%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22102%22%20y=%2248%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%2296%22%20y=%2242%22%20width=%225%22%20height=%225%22/%3E%3C/svg%3E");
  --sc-7: url("data:image/svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20width=%22132%22%20height=%2260%22%3E%3Crect%20x=%22126%22%20y=%220%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22120%22%20y=%220%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22126%22%20y=%226%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22120%22%20y=%226%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22114%22%20y=%220%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22120%22%20y=%2212%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22126%22%20y=%2212%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22108%22%20y=%220%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22114%22%20y=%226%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22126%22%20y=%2218%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22120%22%20y=%2218%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22114%22%20y=%2212%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%2296%22%20y=%220%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22102%22%20y=%220%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22114%22%20y=%2224%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22114%22%20y=%2218%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22102%22%20y=%2212%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22108%22%20y=%226%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22114%22%20y=%2230%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22120%22%20y=%2224%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%2296%22%20y=%2212%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%2296%22%20y=%226%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22102%22%20y=%226%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22120%22%20y=%2230%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%2290%22%20y=%2212%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%2284%22%20y=%220%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22108%22%20y=%2224%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%2290%22%20y=%2218%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22102%22%20y=%2230%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22120%22%20y=%2236%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%2290%22%20y=%220%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%2296%22%20y=%2236%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%2284%22%20y=%2212%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%2278%22%20y=%2218%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22102%22%20y=%2224%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22120%22%20y=%2242%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%2272%22%20y=%226%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%2284%22%20y=%2224%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%2272%22%20y=%2218%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%2278%22%20y=%220%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22108%22%20y=%2230%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%2266%22%20y=%220%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22120%22%20y=%2248%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22114%22%20y=%2242%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%2260%22%20y=%2212%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22126%22%20y=%2254%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%2272%22%20y=%2242%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%2278%22%20y=%2224%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%2290%22%20y=%2230%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%2272%22%20y=%220%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22102%22%20y=%2248%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%2296%22%20y=%2242%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%2284%22%20y=%2248%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%2254%22%20y=%220%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%2296%22%20y=%2248%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%2266%22%20y=%2218%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%2272%22%20y=%2212%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%2290%22%20y=%2248%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22108%22%20y=%2254%22%20width=%225%22%20height=%225%22/%3E%3Crect%20x=%22114%22%20y=%2254%22%20width=%225%22%20height=%225%22/%3E%3C/svg%3E");
}
@keyframes tmr-scatter-grow {
  0% { -webkit-mask-image: var(--sc-1); mask-image: var(--sc-1); }
  14% { -webkit-mask-image: var(--sc-2); mask-image: var(--sc-2); }
  29% { -webkit-mask-image: var(--sc-3); mask-image: var(--sc-3); }
  43% { -webkit-mask-image: var(--sc-4); mask-image: var(--sc-4); }
  57% { -webkit-mask-image: var(--sc-5); mask-image: var(--sc-5); }
  71% { -webkit-mask-image: var(--sc-6); mask-image: var(--sc-6); }
  86% { -webkit-mask-image: var(--sc-7); mask-image: var(--sc-7); }
  100% { -webkit-mask-image: var(--scatter-small); mask-image: var(--scatter-small); }
}
a.card:hover::before, a.card:focus-visible::before, .person:hover::before, .person:focus-visible::before {
  opacity: 1; transition: none; animation: tmr-scatter-grow .45s linear both; }
@media (prefers-reduced-motion: reduce) { a.card:hover::before, .person:hover::before { animation: none; } }

/* …and the Research page: a Theme row and a Type row of chips in the Publications style (white boxes, blue when chosen),
   each on one line behind a small label; a row that doesn't fit scrolls sideways with a fade on the right. */
.project-filters { margin-top: 8px; }
.project-filters .pf-row { display: flex; align-items: center; gap: 10px; }
.project-filters .pf-row + .pf-row { margin-top: 8px; }
.project-filters .f-label { flex: none; width: 44px; font-family: var(--font-label); font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.project-filters .filters { flex: 1 1 auto; min-width: 0; margin: 0; gap: 6px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.project-filters .filters::-webkit-scrollbar { display: none; }
.project-filters .filters.overflow { -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); mask-image: linear-gradient(90deg, #000 88%, transparent); }
.project-filters .chip { flex: none; white-space: nowrap; padding: 6px 8px; font-size: 13.5px; }
.project-filters .chip .n { font-family: var(--font-label); font-size: 10.5px; font-weight: 700; letter-spacing: .06em; opacity: 1; margin: 0 3px 0 0; color: var(--muted); }
.project-filters .chip.on .n { color: inherit; opacity: .75; }
.project-filters .pf-count { margin: 10px 0 0; font-size: 14px; color: var(--muted); }

/* Research themes: colour codes, five clearly different hues so even the tiny ring markers tell
   them apart (blue, pink, orange, cyan, green). --ty is a darker shade for text on white (AA),
   --ty2 the colour itself, --ty3 a light tint of it (the rest of the ring marker). */
.th-lightweight-flexible-systems        { --ty: #1f35ff; --ty2: #1f35ff; --ty3: #b3bcff; }
.th-tailored-material-behaviour         { --ty: #c4126a; --ty2: #ff2e93; --ty3: #ffc2de; }
.th-computational-fabrication-pipelines { --ty: #b04a00; --ty2: #ff6a00; --ty3: #ffd0aa; }
.th-reuse-circularity                   { --ty: #00718a; --ty2: #00b5d8; --ty3: #aee9f5; }
.th-smart-bio-based-systems             { --ty: #1b7a2e; --ty2: #2fb344; --ty3: #bdeac5; }

/* Research lines: marked by their "Research line" tag; on their page, a "Related projects" tab lists their projects. */
.line-projects { padding-top: 18px; }
.line-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px 14px; }
.mini-card { display: block; text-decoration: none; color: var(--text); }
.mini-card img { margin-bottom: 8px; transition: opacity .15s; }
.mini-card:hover img { opacity: .85; }
.mini-card .meta { display: block; font-size: 12px; color: var(--muted); line-height: 1.35; }
.mini-card b { display: block; font-size: 14px; line-height: 1.3; margin-top: 2px; }
.mini-card:hover b { color: var(--primary); }
@media (max-width: 600px) { .line-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Home hero: the headline runs across the full width (balanced over two lines); the intro and buttons sit below it,
   indented to line up with the headline's second word. */
@media (min-width: 821px) {

}

/* ===== Alignment system =====
   1. One inner axis for the whole site: where intro text starts under a big title. It sits under "materials" in the home
      headline (h1 size × 3.44), and every page header uses it too, so all pages share the same two left edges. */
:root { --axis: calc(clamp(2.4rem, 6vw, 4.6rem) * 3.44); }
@media (min-width: 761px) {
  .page-head { grid-template-columns: minmax(0, 1fr); align-items: start; row-gap: 22px; }
  .page-head h1 { grid-column: 1; text-wrap: balance; }
  .page-head .lede { grid-column: 1; margin: 0 0 .4em var(--axis); max-width: 38em; }
}
/* 2. Pixel markers of label headings start at the text edge, in line with the text below (Mariana, 2 Nov 2026; they used to
      hang into the margin on wide screens). */
@media (min-width: 1000px) {
  .sheet-head, .sheet-sec { padding-left: 28px; padding-right: 28px; }
}
/* 3. Line breaks: no single word left alone on a paragraph's last line; short headings and titles balanced over their lines. */
p, li, dd { text-wrap: pretty; }
h1, h2, h3, h4, .card h3, .mini-card b, .sel-tab .t, .sheet-head b { text-wrap: balance; }

/* Project pages: the fact sheet no longer hangs from the gallery or follows the scroll. It starts level with the project
   title (below the one-line label above it) and stays in place in the page. */
.tmr-hang .single-cols { margin-top: 0; }
.tmr-hang .single-main { padding-top: 0; }
.tmr-hang .sheet { position: static; top: auto; border-top: 1px solid var(--line); box-shadow: none; }
@media (min-width: 861px) { .tmr-hang .sheet { margin-top: 29px; } }

/* One space between whatever opens a page (project gallery, course/news image or the site header) and the first line of
   text (back link or project label), the same on every single page; smaller on phones. */
:root { --top-space: clamp(36px, 4.5vw, 60px); }
.tmr-single, .tmr-single.tmr-hang { padding-top: var(--top-space) !important; } /* !important: the person template sets its own padding inline */

/* "PhD thesis" keeps the colours of the former "Thesis" type. */
.ty-phd-thesis { --ty: var(--ty-thesis); --ty2: #ff2e93; --ty3: #1f35ff; }
/* Research and course cards: summaries at most three lines, tags along the bottom, so a row of cards lines up. */
:is(#project-grid, #course-grid) .card .body { display: flex; flex-direction: column; flex: 1 1 auto; }
:is(#project-grid, #course-grid) .card .body p { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
:is(#project-grid, #course-grid) .card .card-foot { margin-top: auto; padding-top: 10px; }
/* Grey text on the pink band a step darker, for comfortable reading. */
.band-blush { --muted: #40456f; }
.band-blush .theme p { opacity: 1; }

/* ---------- one knitted mesh behind the whole page (mesh.js) ----------
   A canvas behind everything, part of the page so it scrolls with the text. Once it runs (html.has-mesh) it paints the colour blocks
   and the footer itself, so their own backgrounds and the pixel seams step aside and the knit
   runs on from one section into the next. Without the script the page looks as before.
   Per-block mesh colours: weft (courses), warp (wales) and stitches. */
.knit-wrap { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
canvas.knit-mesh { position: absolute; left: 0; top: 0; width: 100%; display: block; }
html.has-mesh .band, html.has-mesh footer.site-footer { background: transparent; box-shadow: none; }

/* text on the mesh carries a soft halo of its block's colour (--halo, set by mesh.js), so the
   letters stay crisp while the knit runs right up to them; things with their own background
   (buttons, cards, panels) keep plain text */
html.has-mesh :is(.band, footer.site-footer) { text-shadow: 0 0 1px var(--halo), 0 0 2px var(--halo), 0 0 4px var(--halo), 0 0 7px var(--halo), 0 0 11px var(--halo), 0 0 16px var(--halo); }
html.has-mesh :is(.band, footer.site-footer) :is(.wp-block-button, .card, .lv-card, .lv-panel, .lv-ring, button, input, select) { text-shadow: none; }
.tmr-head-blue  { --net-weft: rgba(255,255,255,.28); --net-warp: rgba(255,46,147,.75); --net-dot: rgba(255,255,255,.36); }
.tmr-head-pink  { --net-weft: rgba(255,255,255,.38); --net-warp: rgba(31,53,255,.5);   --net-dot: rgba(255,255,255,.5);  }
.tmr-head-ice   { --net-weft: rgba(31,53,255,.2);    --net-warp: rgba(255,46,147,.5);  --net-dot: rgba(31,53,255,.32);  }
.tmr-head-blush { --net-weft: rgba(31,53,255,.18);   --net-warp: rgba(255,46,147,.55); --net-dot: rgba(31,53,255,.28);  }
.page-head.band + * { margin-top: var(--top-space) !important; }
/* the footer's mesh is quieter, behind several columns of small text */
footer.site-footer { --net-weft: rgba(255,255,255,.16); --net-warp: rgba(255,46,147,.42); --net-dot: rgba(255,255,255,.22); }
/* on the home page, when the news runs on in blue, the footer's knit matches the hero's, so the blue reads as one piece */
body:has(.lv-news-blue, .e404) footer.site-footer { --net-weft: rgba(255,255,255,.28); --net-warp: rgba(255,46,147,.75); --net-dot: rgba(255,255,255,.36); }

/* ---------- theme ring marker ----------
   One mark for a research theme everywhere (filters, fact sheets, cards, home page):
   a small ring, light in the theme's pale tone with an arc in its main colour, like the
   theme rings on the home page. */
.th-mark { display: inline-block; width: 13px; height: 13px; margin-right: 7px; vertical-align: -1px; border-radius: 50%; flex: none;
  background: conic-gradient(from -90deg, var(--ty2, var(--block-pink)) 0 38%, var(--ty3, #ffd3ea) 38% 100%);
  -webkit-mask: radial-gradient(circle, transparent 3.4px, #000 3.9px); mask: radial-gradient(circle, transparent 3.4px, #000 3.9px); }
.chip .th-mark { margin-right: 6px; }
.chip.on .th-mark { background: conic-gradient(from -90deg, #fff 0 38%, rgba(255,255,255,.45) 38% 100%); }
/* fact sheet: one theme per line, linking to Research filtered to it */
.th-link { display: flex; align-items: flex-start; color: inherit; text-decoration: none; line-height: 1.35; padding: 1px 0; }
.th-link + .th-link { margin-top: 4px; }
.th-link:hover { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
.th-link .th-mark { margin: 3px 8px 0 0; }
/* cards: the project's themes as a row of rings before its type */
.card-themes { display: inline-flex; gap: 4px; margin-right: 10px; vertical-align: middle; }
.card-themes .th-mark { width: 12px; height: 12px; margin: 0; }
.card-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 0; }

/* ---------- labels: one system (themes = coloured ring marker, types = one neutral outlined tag; only a
   research line keeps its colour, so it stands out from the projects) ---------- */
.tag-pill:is(.card-tag, .sheet-tag)[class*="t-"]:not(.t-research-line) { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1px rgba(10,15,64,.32); }
.sheet-head .tag-pill.sheet-tag[class*="t-"]:not(.t-research-line) { color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.6); }

/* ---------- legibility: small text a step larger, secondary text a step darker ---------- */
:root { --muted: #474d7c; }
.tag-pill:is(.card-tag, .sheet-tag) { font-size: 11px; padding: 2px 8px; }
.sheet-head small, .sheet h4 { font-size: 12px; }
:is(.sheet h4, .ptabs button, .person-pubs .sec-label) .n { font-size: 12px; }
.s-item .tag { font-size: 11px; }
.s-item small { font-size: 13px; }
:is(#project-grid, #course-grid) .card .meta { font-size: 13px; }
#news-home .card .meta { font-size: 12.5px; }
.project-filters .f-label { font-size: 12px; }
.project-filters .chip .n { font-size: 11.5px; }
.pinfo .plabel { font-size: 12px; }

.proj-pubs .pub :is(.a, .v) { font-size: 14px; }
.pub .links, .proj-pubs .pub .links { font-size: 14px; }
.mini-gal .photo-credit { font-size: 11px; }

/* a person without a photo: their knitted swatch with their initials */
.ph-person { position: relative; display: block; container-type: inline-size; line-height: 0; overflow: hidden; }
.ph-person svg { display: block; width: 100%; height: 100%; }
.ph-person b { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-head); font-weight: 700; font-size: 34cqi; letter-spacing: -.02em; line-height: 1; color: #fff; }
.ph-person.pale b { color: var(--text); }
.alum .ph-person { flex: none; width: 44px; height: 44px; }
.ph-person.av { width: 32px; height: 32px; border-radius: 50%; }
/* a news item without a photo: a text row, its date large where the image would be */
.news-date { font-family: var(--font-head); font-weight: 700; font-size: 30px; line-height: 1; letter-spacing: -.01em; color: var(--primary); }
.news-date b { display: block; margin-top: 4px; font-family: var(--font-label); font-size: 13px; letter-spacing: .08em; color: var(--muted); }
.news-item.no-img { align-items: start; }
@media (max-width: 600px) {
  .news-date { display: flex; gap: 6px; font-family: var(--font-label); font-size: 13px; letter-spacing: .04em; color: var(--muted); }
  .news-date b { margin: 0; font-size: inherit; letter-spacing: inherit; }
}

/* ---------- project tabs: selected media, one row each like a publication ---------- */
.media-row { display: grid; grid-template-columns: 110px 1fr; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.media-row .type { font-family: var(--font-label); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding-top: 3px; }
.media-row .t { display: block; font-weight: 600; font-size: 14.5px; line-height: 1.4; }
.media-row .t a { color: inherit; text-decoration-color: var(--line); text-underline-offset: 3px; }
.media-row .t a:hover { color: var(--primary); text-decoration-color: currentColor; }
.media-row .v { display: block; font-size: 14px; color: var(--muted); }
@media (max-width: 600px) { .media-row { grid-template-columns: 1fr; gap: 2px; } }

/* ---------- phones ---------- */
@media (max-width: 700px) {
  /* header: the logo with one short line beside it */
  header .brand b { display: none; }
  header .brand small { font-size: 12.5px; white-space: nowrap; }
  /* People filters: one row that scrolls sideways, like the Research filters */
  .people-filters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; gap: 6px;
    -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
  .people-filters::-webkit-scrollbar { display: none; }
  .people-filters .chip { flex: none; white-space: nowrap; }
}

/* the footer always sits at the bottom of the window, however short the page */
.wp-site-blocks { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.wp-site-blocks > main { flex: 1 0 auto; }
/* in a flex column a centred block (max-width + auto margins) would shrink to its content, which on a
   phone can be far wider than the screen: every child takes the full width, and its own max-width */
.wp-site-blocks > * { width: 100%; box-sizing: border-box; }
/* with the mesh, the fact sheet stays in place (it scrolls with the page) so the knit fitted round
   its outline stays on it */
html.has-mesh .sheet { position: static; }

/* a research line's tag in its research theme's colour (the darker shade, so white text stays readable) */
.tag-pill.t-research-line[class*="th-"] { background: var(--ty); color: #fff; }

/* page not found: one blue piece from the header to the bottom of the footer */
.e404 { margin: 0 !important; color: #fff; display: flex; align-items: center; padding: clamp(64px, 12vh, 140px) 0; }
.e404 > .wrap { width: 100%; }
.e404 h1 { color: #fff; margin: 0 0 16px; }
.e404 .lede { color: #fff; max-width: 34em; margin: 0 0 28px; }
.e404-back a { color: #fff; font-weight: 600; text-underline-offset: 4px; }
.e404-back a:hover { color: #ff9fd0; }

/* footer: the address and e-mail beside the community links */
footer.site-footer .fgrid { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 28px 48px; }
@media (max-width: 520px) { footer.site-footer .fgrid { grid-template-columns: 1fr; } }
footer.site-footer .fmail { margin: 12px 0 0; font-weight: 600; }
footer.site-footer .flinks { margin-top: 12px; }
footer.site-footer .flinks { margin: 0; }
footer.site-footer .fbottom { justify-content: flex-start; }

/* the footer's own breathing room above its content (the knit's straight edge is its top) */
footer.site-footer { padding-top: clamp(44px, 5vw, 64px); }

/* no elastic bounce past the top or end of the page: the knit sits fixed behind the page, so a
   bounce would slide the text away from it for a moment */
html, body { overscroll-behavior-y: none; }

/* the project tabs (Credits · Selected media · Publications) scroll sideways on a phone rather than overflow */
@media (max-width: 700px) {
  .ptabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .ptabs::-webkit-scrollbar { display: none; }
  .ptabs button { flex: none; white-space: nowrap; }
}

/* a section of a project's text with a small photo beside it (research lines such as KnitCrete) */
.sec-thumb-row { display: grid; grid-template-columns: 168px minmax(0, 1fr); gap: 20px; align-items: start; margin: 28px 0; }
.sec-thumb { margin: 4px 0 0; }
.sec-thumb > a, .sec-thumb > svg { display: block; aspect-ratio: 4 / 3; overflow: hidden; position: relative; }
.sec-thumb img, .sec-thumb svg { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s cubic-bezier(.2,.7,.2,1); }
.sec-thumb a:hover img { transform: scale(1.04); }
.sec-thumb figcaption .lbl { display: block; margin-top: 6px; font-family: var(--font-label); font-size: 12px; font-weight: 600; letter-spacing: .03em; color: var(--muted); }
.sec-thumb figcaption .lbl.go { color: var(--primary); }
.sec-body > h3 { margin: 0 0 8px; }
.entry-content .part-label { margin: 48px 0 0; }        /* a label over a group of sections (Reuse: Designing for reuse / from existing stock) */
.entry-content .part-label + .sec-thumb-row { margin-top: 16px; }
.sec-body > p:last-child { margin-bottom: 0; }
@media (max-width: 600px) {
  .sec-thumb-row { grid-template-columns: 1fr; gap: 10px; }
  .sec-thumb > a, .sec-thumb > svg { aspect-ratio: auto; height: 120px; }
}
@media (prefers-reduced-motion: reduce) { .sec-thumb img { transition: none; } }

/* Video in project galleries and section thumbnails: clips loop muted (pause button top right), films show a play button
   over their still and load the player on click; thumbnails carry a small play mark and play clips on hover. */
.hgal-vid video, .hgal-film iframe { width: 100%; height: 100%; object-fit: cover; display: block; border: 0; }
.vid-btn { position: absolute; top: 8px; right: 8px; z-index: 2; width: 36px; height: 36px; padding: 0; cursor: pointer;
  border: 1px solid rgba(255,255,255,.6); background: rgba(10,15,64,.55); display: grid; place-items: center; }
.vid-btn::before { content: ""; border-style: solid; border-width: 7px 0 7px 12px; border-color: transparent transparent transparent #fff; margin-left: 3px; }
.vid-btn[aria-pressed="true"]::before { width: 10px; height: 14px; border: 0; margin: 0; border-left: 3px solid #fff; border-right: 3px solid #fff; }
.film-play { position: absolute; inset: 0; margin: auto; z-index: 2; width: 76px; height: 76px; padding: 0; cursor: pointer;
  border: 1px solid rgba(255,255,255,.75); background: rgba(10,15,64,.6); display: grid; place-items: center; transition: background .2s; }
.film-play::before { content: ""; border-style: solid; border-width: 14px 0 14px 24px; border-color: transparent transparent transparent #fff; margin-left: 6px; }
.film-play:hover, .film-play:focus-visible { background: var(--primary); }
/* a film its owner won't let other sites embed opens on Vimeo/YouTube in a new tab */
.film-out { position: absolute; left: 50%; top: calc(50% + 50px); transform: translateX(-50%); z-index: 2; pointer-events: none;
  padding: 3px 8px; background: rgba(10,15,64,.6); color: #fff; font-size: 13px; white-space: nowrap; }
.sec-thumb video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .3s; }
.sec-thumb a.playing video { opacity: 1; }
.play-mark { position: absolute; top: 6px; left: 6px; z-index: 2; width: 24px; height: 24px; background: rgba(10,15,64,.6); display: grid; place-items: center; }
.play-mark::before { content: ""; border-style: solid; border-width: 5px 0 5px 8px; border-color: transparent transparent transparent #fff; margin-left: 2px; }
.sec-thumb a.playing .play-mark { opacity: 0; }

/* Credits: each team or organisation on its own line. */
.credits .cr-line { display: block; }
.credits .cr-line + .cr-line { margin-top: 4px; }
.credits .cr-head { margin: 0 0 12px; }
.credits .cr-short { font-size: 15px; margin: 0 0 32px; }

/* Fact sheet: each research line chip names the theme it leads, with that theme's ring. */
.s-item .line-theme { display: flex; align-items: center; margin-top: 2px; font-size: 12.5px; font-weight: 500; color: var(--muted); }
.s-item .line-theme .th-mark { width: 11px; height: 11px; margin-right: 6px; }
/* research line fact sheet: the theme it leads, under its tag in the blue head */
.sheet-head .sheet-theme { display: flex; align-items: center; width: fit-content; margin-top: 8px; font-size: 12.5px; font-weight: 500; color: #fff; text-decoration: none; }
.sheet-head .sheet-theme:hover { text-decoration: underline; text-underline-offset: 3px; }
.sheet-head .sheet-theme .th-mark { width: 12px; height: 12px; margin-right: 7px; }
/* research line fact sheet: one item per line */
.kv .kv-line { display: block; }
.kv .kv-line + .kv-line { margin-top: 6px; } /* more than the line gap, so a wrapped item reads as one */

/* Teaching: tabs "Current classes" / "Past classes and workshops". Past items are a light text list (no photos):
   year | title + where | one line on wide screens, stacked on phones. */
.teach-tabs { margin-top: 28px; }
.teach-tabs .ptabs { margin-top: 0; margin-bottom: 22px; }
.teach-tabs #past .theses-note { margin-bottom: 4px; }
.past-head { font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-family: var(--font-label); margin: 32px 0 6px; }
.past-list { border-top: 1px solid var(--line); }
.past-item { display: grid; grid-template-columns: 110px minmax(0, 1.1fr) minmax(0, 1fr); gap: 24px; align-items: baseline; padding: 13px 0; border-bottom: 1px solid var(--line); }
.past-year { font-size: 13px; color: var(--primary); font-weight: 600; }
.past-name b { display: block; font-weight: 600; line-height: 1.35; }
.past-name a { color: inherit; text-decoration: none; }
.past-name a:hover { color: var(--primary); text-decoration: underline; }
.past-name span { display: block; color: var(--muted); font-size: 14px; margin-top: 2px; }
.past-line { margin: 0; font-size: 14.5px; line-height: 1.45; }
@media (max-width: 700px) {
  .past-item { grid-template-columns: 1fr; gap: 3px; padding: 12px 0; }
  .past-line { margin-top: 4px; }
}
@media (max-width: 700px) { .teach-tabs .ptabs { gap: 22px; } .teach-tabs .ptabs .wide-only { display: none; } } /* "Past classes" fits beside "Current classes" at 375 px */

/* Links in running text (option C, 1 Nov): the words stay in the text colour, a blue underline marks the link; solid = within
   the site, dotted + ↗ = another site (class "ext", added by tmr.js, opens in a new tab). */
.entry-content :is(p, li) a { color: inherit; text-decoration: underline 2px var(--primary); text-underline-offset: 3px; }
.entry-content :is(p, li) a:hover, .entry-content :is(p, li) a:focus-visible { color: var(--primary); }
.entry-content :is(p, li) a.ext { text-decoration-style: dotted; }
.entry-content :is(p, li) a.ext::after { content: "\2197"; margin-left: 2px; color: var(--primary); font-size: .85em; text-decoration: none; display: inline-block; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Launch: hosts and their preinstalled plugins can load heading styles after this file (GoDaddy: 40px page titles, larger footer labels).
   The same base rules, slightly more specific, so plain heading rules from elsewhere cannot win. Anything with a class still overrides these. */
html body :is(h1, h2, h3, h4, h5, h6) { font-family: var(--wp--preset--font-family--dm-sans); font-weight: 700; letter-spacing: -0.035em; line-height: 1.1; }
html body h1 { font-size: clamp(2.4rem, 6vw, 4.6rem); line-height: 1.02; margin: 0 0 16px; }
html body h2 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); margin: 96px 0 24px; }
html body h3 { font-size: 1.1rem; margin: 0 0 6px; }
html body footer h4 { margin: 0 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .1em; color: #fff; }
