/* Generated from _designs/lite/rounds/r1.css ... r15.css (each round's changes on top of the last). */
@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono&family=IBM+Plex+Sans:wght@400;500&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@700&display=swap&text=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%20-");
/* ===== Round 1: layout =====
   Spacing on an 8px scale. The left column and the content start on the same top line (56px).
   Every work is "picture left, text right" (the research page of draft C), picture and text 1 : 1,
   text column held to about 60 characters. System fonts and plain colours for now. */

:root {
  color-scheme: light dark;
  --bg: #ffffff; --text: #5c6875; --strong: #252a31; --muted: #667180; --line: #e7eaee; --accent: #0b57d0; --tile: #f3f5f7;
  --side: 272px; --top: 56px; --gap: 56px;
  --sans: system-ui, -apple-system, "Segoe UI", "Hiragino Sans", "Noto Sans JP", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #15181c; --text: #a9b3be; --strong: #eef1f4; --muted: #8a949f; --line: #262b31; --accent: #7fb0ff; --tile: #1d2126; }
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--sans); -webkit-text-size-adjust: 100%; }
a { color: var(--strong); text-decoration: none; }
a:hover { color: var(--accent); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
.lead a, .desc a, .bio a, .rows a { color: var(--accent); }
img, video { display: block; max-width: 100%; height: auto; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; background: var(--bg); padding: 8px 12px; z-index: 10; }

/* ---------- left column ---------- */
.side { position: fixed; inset: 0 auto 0 0; width: var(--side); padding: var(--top) 32px 32px 40px; display: flex; flex-direction: column; overflow-y: auto; }
.photo { display: none; }
.name { font-size: 24px; line-height: 1.2; font-weight: 600; color: var(--strong); letter-spacing: -.01em; }
.tag { margin: 8px 0 16px; font-size: 15px; line-height: 1.5; }
.util { margin: 0 0 32px; font-size: 14px; line-height: 1.9; }
.util a { color: var(--accent); margin-right: 14px; white-space: nowrap; }
.util .mail { display: block; overflow-wrap: anywhere; }
.menu, .sub { list-style: none; margin: 0; padding: 0; }
.menu a { display: block; padding: 4px 0; font-size: 16px; }
.menu a[aria-current="page"] { color: var(--accent); font-weight: 600; }
.sub { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 14px; }
.sub a { display: block; padding: 3px 0; color: var(--text); }
.sub .k { display: block; font-size: 12px; color: var(--muted); margin: 12px 0 2px; }
.sub .k:first-child { margin-top: 0; }

/* ---------- content ---------- */
main { margin-left: var(--side); padding: var(--top) 48px 80px 16px; max-width: calc(var(--side) + 1000px); }
h1.page { font-size: 24px; line-height: 1.2; font-weight: 600; color: var(--strong); margin: 0 0 8px; }
.lead { margin: 0 0 40px; max-width: 62ch; }
.empty { color: var(--muted); font-style: italic; }
h2.sec { font-size: 14px; font-weight: 600; color: var(--strong); margin: 64px 0 24px; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
h2.sec a { font-weight: 400; color: var(--accent); }
.me { color: var(--strong); font-weight: 600; }

/* picture left, text right */
.item { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; margin-bottom: var(--gap); align-items: start; }
.item.big { grid-template-columns: minmax(0, 1.618fr) minmax(0, 1fr); }
.th { display: block; }
.th img, .th video, .wall img, .wall video { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--tile); }
.item h3 { margin: 0 0 8px; font-size: 18px; line-height: 1.4; font-weight: 500; color: var(--strong); }
.item .m { font-size: 14px; margin: 0; }
.item .desc { font-size: 15px; margin: 12px 0 0; max-width: 60ch; }
.l { font-size: 14px; margin: 12px 0 0; display: flex; flex-wrap: wrap; gap: 4px 16px; }
.l a { color: var(--accent); }

/* A: wall */
.wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 32px 16px; }
.wall a { display: block; }
.wall .cap { display: block; font-size: 15px; line-height: 1.4; margin-top: 10px; color: var(--strong); }
.wall .cap small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }

/* B: index */
.list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.list li { display: grid; grid-template-columns: 48px 144px minmax(0, 1fr); gap: 24px; padding: 20px 0; border-bottom: 1px solid var(--line); align-items: start; }
.list .y { font-size: 14px; color: var(--muted); }
.list .t { color: var(--strong); font-size: 16px; line-height: 1.4; font-weight: 500; }
.list .m { font-size: 14px; margin: 4px 0 0; }

/* about */
.bio { display: flex; gap: 24px; align-items: flex-start; max-width: 760px; margin-top: 24px; }
.bio img { width: 120px; height: 120px; object-fit: cover; flex: none; }
.bio p { margin: 0 0 12px; max-width: 62ch; }
.rows { max-width: 800px; }
.rows h2 { font-size: 14px; font-weight: 600; color: var(--strong); margin: 48px 0 12px; }
.rows p { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 16px; margin: 0 0 8px; font-size: 15px; }
.rows .d { color: var(--muted); }

.pagefoot { margin-top: 96px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 20px; }
.pagefoot a { color: var(--text); padding: 6px 0; }

/* ---------- phones ---------- */
/* tablets: a narrower left column */
@media (max-width: 1000px) { :root { --side: 224px; } .side { padding-left: 28px; padding-right: 20px; } main { padding-right: 28px; } .item { gap: 24px; } }

@media (max-width: 560px) {
  .side { display: contents; }
  .name { margin: 24px 16px 0; font-size: 22px; }
  .tag { margin: 4px 16px 8px; font-size: 14px; }
  .util { margin: 0 16px 8px; }
  .mainnav { position: sticky; top: 0; z-index: 5; background: var(--bg); border-bottom: 1px solid var(--line); }
  .menu { display: flex; flex-wrap: wrap; gap: 0 20px; padding: 0 16px; }
  .menu a { padding: 10px 0; min-height: 44px; }
  .sub { display: none; }
  main { margin: 0; padding: 24px 16px 64px; }
  .item, .item.big { grid-template-columns: 1fr; gap: 12px; margin-bottom: 40px; }
  .list li { grid-template-columns: 104px minmax(0, 1fr); gap: 14px; }
  .list .y { display: none; }
  .rows p { grid-template-columns: 1fr; gap: 0; margin-bottom: 12px; }
  .bio { flex-direction: column; }
}

/* ===== Round 2: type =====
   IBM Plex Sans (the live site's face) for everything, IBM Plex Mono only for years and dates.
   Two weights (400, 500) plus Mono 400, latin only, font-display: swap — about 60 KB in all.
   Five sizes on a 1.2 scale: 13 / 14 / 16 / 19 / 23. Titles 500, never bold-bold.
   Japanese falls back to the system face (Hiragino / Noto Sans JP). */


:root {
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Hiragino Sans", "Noto Sans JP", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
}

body { font: 16px/1.65 var(--sans); font-feature-settings: "kern"; }

.name { font-size: 23px; font-weight: 500; letter-spacing: -.005em; }
.tag { font-size: 14px; line-height: 1.55; }
.util { font-size: 14px; }
.menu a { font-size: 16px; }
.menu a[aria-current="page"] { font-weight: 500; }
.sub { font-size: 14px; }
.sub .k { font: 12px/1.4 var(--mono); }

h1.page { font-size: 23px; font-weight: 500; letter-spacing: -.005em; }
h2.sec, .rows h2 { font-size: 14px; font-weight: 500; }

.item h3 { font-size: 19px; line-height: 1.35; font-weight: 500; letter-spacing: -.005em; text-wrap: balance; }
.item .m, .list .m { font-size: 14px; line-height: 1.55; }
.item .desc { font-size: 16px; }
.me { font-weight: 500; }

.list .y, .rows .d, .timeline .d { font: 13px/1.6 var(--mono); }
.list .t { font-size: 16px; font-weight: 500; }
.wall .cap { font-size: 15px; font-weight: 500; }
.wall .cap small { font: 12px/1.5 var(--mono); }

.pagefoot { font-size: 13px; }

/* ===== Round 3: colour =====
   The live site's sky blue comes back as the one accent. Pure #41acef is too light for text on white
   (2.5:1), so links use a deeper step of the same blue (#1677b8, 4.8:1) and the bright blue is kept for
   marks that are not text (current-page bar, focus ring). Ink is a warm-neutral grey, not slate.
   Dark mode is the live site's night: #0e1117 with its cyan. */

:root {
  --bg: #ffffff;
  --text: #4a5159;     /* 8.0:1 */
  --strong: #1d2125;
  --muted: #6a7179;    /* 4.9:1 */
  --line: #ebedf0;
  --accent: #1677b8;   /* links, 4.8:1 */
  --accent-mark: #41acef;
  --tile: #f2f6f9;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0e1117; --text: #b9c1cb; --strong: #eef1f5; --muted: #8f99a6; --line: #212a36; --accent: #45c8e8; --accent-mark: #45c8e8; --tile: #151c25; }
}

a:focus-visible, button:focus-visible { outline-color: var(--accent-mark); }

/* current page: a short bar of the bright blue beside the menu item instead of only colour */
.menu a[aria-current="page"] { color: var(--strong); box-shadow: inset 2px 0 0 var(--accent-mark); padding-left: 10px; margin-left: -12px; }

.util a, h2.sec a, .l a, .lead a, .desc a, .bio a, .rows a { color: var(--accent); }
a:hover { color: var(--accent); }
.item h3 a:hover, .list .t:hover, .wall a:hover .cap { color: var(--accent); }

@media (max-width: 560px) {
  .menu a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--accent-mark); padding-left: 0; margin-left: 0; }
}

/* ===== Round 4: what the live site did well =====
   Photo above the name, venue badges, the career timeline with dots, research videos that play
   while on screen (poster first, video only when scrolled to), and the light/dark switch.
   Everything is quieter than on the live site: the badge is tinted, not filled; the photo is small. */

/* light / dark chosen by the switch wins over the system setting */
html[data-theme="light"] { color-scheme: light; --bg: #ffffff; --text: #4a5159; --strong: #1d2125; --muted: #6a7179; --line: #ebedf0; --accent: #1677b8; --accent-mark: #41acef; --tile: #f2f6f9; --badge-bg: #eaf5fd; --badge: #1677b8; }
html[data-theme="dark"] { color-scheme: dark; --bg: #0e1117; --text: #b9c1cb; --strong: #eef1f5; --muted: #8f99a6; --line: #212a36; --accent: #45c8e8; --accent-mark: #45c8e8; --tile: #151c25; --badge-bg: #14303b; --badge: #7fdcf2; }
:root { --badge-bg: #eaf5fd; --badge: #1677b8; }
@media (prefers-color-scheme: dark) { :root { --badge-bg: #14303b; --badge: #7fdcf2; } }

/* photo */
.photo { display: block; width: 112px; height: 112px; object-fit: cover; margin-bottom: 20px; border-radius: 2px; }

/* venue badge: the live site's pill, made quiet */
.badge { display: inline-block; font: 12px/1 var(--mono); color: var(--badge); background: var(--badge-bg); padding: 5px 7px 4px; border-radius: 3px; margin-bottom: 10px; }
.list .badge { margin-bottom: 6px; }

/* career timeline */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 20px 22px; display: grid; gap: 0; font-size: 15px; }
.timeline li::before { content: ""; position: absolute; left: 3px; top: 10px; bottom: -6px; width: 1px; background: var(--line); }
.timeline li::after { content: ""; position: absolute; left: 0; top: 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.timeline li:first-child::after { background: var(--accent-mark); }
.timeline li:last-child::before { display: none; }
.timeline b { color: var(--strong); font-weight: 500; }
.timeline .who a { color: var(--accent); }
.timeline .d { color: var(--muted); }

/* light / dark switch */
.theme { position: absolute; top: 20px; right: 24px; z-index: 6; font: 13px var(--sans); color: var(--muted); background: none; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; cursor: pointer; }
.theme:hover { color: var(--strong); border-color: var(--muted); }
.theme[hidden] { display: none; }

@media (max-width: 560px) {
  .photo { display: none; }
  .theme { top: 22px; right: 16px; }
}

/* ===== Round 5: finish =====
   Small preview videos (10 s, 640 px, about 0.2 MB each instead of up to 15 MB).
   Calmer rhythm: more air between works, a hairline between full papers and posters,
   the text of each work starts on the same line as the top of its picture,
   and soft hover feedback that is switched off for people who ask for less motion. */

:root { --gap: 64px; }

::selection { background: var(--badge-bg); color: var(--strong); }

h1.page { margin-bottom: 6px; }
.lead { color: var(--text); margin-bottom: 48px; }

/* the first line of text sits on the picture's top edge */
.item .tx { padding-top: 0; }
.item .badge { margin-top: 1px; }
.item h3 { margin-bottom: 10px; }
.item .l { margin-top: 14px; }

/* posters and demos: smaller, after a hairline */
h2.sec { padding-top: 32px; border-top: 1px solid var(--line); margin-top: 16px; }
.lead + h2.sec, main > h2.sec:first-child { border-top: 0; padding-top: 0; }
h2.sec + .item, h2.sec + .item ~ .item { --gap: 48px; }
h2.sec ~ .item { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); }
h2.sec ~ .item h3 { font-size: 17px; }
.d-a h2.sec ~ .item, .d-b h2.sec ~ .item, .d-c h2.sec ~ .item.big { grid-template-columns: minmax(0, 1.618fr) minmax(0, 1fr); }
h2.sec ~ .item.big h3 { font-size: 19px; }

/* pictures: a hairline frame so pale images (maps, white rooms) keep their edge */
.th img, .th video, .wall img, .wall video { outline: 1px solid var(--line); outline-offset: -1px; }

/* soft hover */
.th, .wall a { transition: opacity .2s ease; }
.th:hover, .wall a:hover { opacity: .88; }

/* side list of works: a little quieter, current colour on hover only */
.sub a { color: var(--muted); }
.sub a:hover { color: var(--accent); }

.pagefoot { margin-top: 120px; }

@media (prefers-reduced-motion: reduce) { .th, .wall a { transition: none; } }

@media (max-width: 560px) {
  :root { --gap: 44px; }
  h2.sec ~ .item, .d-a h2.sec ~ .item, .d-b h2.sec ~ .item { grid-template-columns: 1fr; }
  .theme { padding: 4px 10px; }
}

/* B: the badge already carries the year, so the year column goes */
.list li { grid-template-columns: 160px minmax(0, 1fr); }
.list .y { display: none; }
.list .t { display: block; margin-top: 2px; }
@media (max-width: 560px) { .list li { grid-template-columns: 104px minmax(0, 1fr); } }

/* phones: the light/dark switch sits beside the name, so the name and tagline keep clear of it */
@media (max-width: 560px) {
  .theme { top: 24px; }
  .name, .tag { margin-right: 84px; }
}

/* ===== Round 6: feedback =====
   CV, Google Scholar, LinkedIn and Email as icon + label, stacked like on the live site
   (the same Bootstrap icons, inlined as SVG so no icon font is loaded).
   No photo, no lead lines under the page titles, no list of works in the left column, no page footer. */

.util.icons { list-style: none; margin: 4px 0 36px; padding: 0; font-size: 15px; line-height: 1.5; }
.util.icons li { margin: 0; }
.util.icons a { display: inline-flex; align-items: center; gap: 10px; padding: 4px 0; margin: 0; color: var(--accent); }
.util.icons svg { flex: none; }
.util.icons a:hover span { text-decoration: underline; text-underline-offset: 3px; }

/* page titles now sit directly above the first work */
h1.page { margin-bottom: 32px; }

main { padding-bottom: 120px; }

@media (max-width: 560px) {
  /* phones: the four links in one row under the name */
  .util.icons { display: flex; flex-wrap: wrap; gap: 0 18px; margin: 4px 16px 6px; }
  .util.icons a { min-height: 40px; }
}

/* About: one line per job, using the width — period | place and role | people.
   The dots and line of the timeline stay; the columns match the rows below (Awards etc.). */
.rows { max-width: 960px; }
.timeline li { grid-template-columns: 150px minmax(0, 1fr) minmax(0, 1fr); column-gap: 16px; align-items: baseline; padding: 0 0 14px 22px; }
.timeline li::after { top: 9px; }
.timeline li::before { top: 12px; bottom: -2px; }
.timeline b { grid-column: 2; }
.timeline b + span { grid-column: 2; color: var(--text); font-size: 14px; }
.timeline .who { grid-column: 3; grid-row: 1; font-size: 14px; }
.timeline .d { grid-row: 1 / span 2; }
.rows p { grid-template-columns: 150px minmax(0, 2fr); padding-left: 22px; }

@media (max-width: 560px) {
  .timeline li { grid-template-columns: 1fr; padding-bottom: 18px; }
  .timeline b, .timeline b + span, .timeline .who { grid-column: 1; grid-row: auto; }
  .timeline .d { grid-row: auto; }
  .rows p { padding-left: 0; }
}

/* Face photo: the full width of the left column, so its edges line up with the name and links. */
.photo { width: 100%; max-width: 200px; height: auto; aspect-ratio: 1; margin-bottom: 24px; border-radius: 2px; }
@media (max-width: 1000px) { .photo { max-width: 176px; } }

/* ===== Round 7: feedback =====
   The links under the name are icons only, in one row (like the round icons on andrewmcpherson.org),
   each with a label for screen readers and a tooltip. CV moves into the menu as its own short page. */

.util.icons.only { display: flex; flex-wrap: wrap; gap: 4px; margin: 2px 0 32px -8px; }
.util.icons.only a { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: var(--muted); }
.util.icons.only a:hover { color: var(--accent); background: var(--tile); }
.util.icons.only svg { width: 18px; height: 18px; }

.cvtext { max-width: 60ch; font-size: 17px; line-height: 1.75; }
.cvtext p { margin: 0 0 18px; }
.cvtext em { color: var(--muted); font-size: 15px; }

@media (max-width: 560px) {
  .util.icons.only { margin: 0 16px 4px 8px; }
  .util.icons.only a { width: 44px; height: 44px; }
}
.cvtext a { color: var(--strong); font-weight: 500; text-decoration: none; border-bottom: 2px solid var(--accent-mark); }
.cvtext a:hover { color: var(--accent); }

/* ===== Round 8: feedback — research pictures too large =====
   Picture : text = 1 : 1.618 (the live site's card proportion). At 1280 px the picture is about 340 px wide,
   close to the height of title + authors + links, so each work reads as one balanced row.
   Posters and demos are a step smaller. The big items (film, the newest work on C's home) keep their size. */

.item { grid-template-columns: minmax(0, 1fr) minmax(0, 1.618fr); gap: 36px; --gap: 48px; align-items: center; }
.item .tx { align-self: center; }
h2.sec ~ .item:not(.big) { grid-template-columns: minmax(0, .75fr) minmax(0, 1.868fr); --gap: 36px; }
h2.sec ~ .item:not(.big) h3 { font-size: 16px; }
.item h3 { font-size: 18px; }

/* the list stays readable: titles are not balanced into narrow lines any more, the column is wide enough */
.item:not(.big) h3 { text-wrap: pretty; }

@media (max-width: 1000px) { .item { gap: 24px; } }
@media (max-width: 560px) {
  .item, h2.sec ~ .item:not(.big) { grid-template-columns: 1fr; gap: 12px; --gap: 40px; }
}

/* ===== Round 9: feedback — Bio instead of About, CV inside Bio, no Product or CV tabs ===== */
.bio p { max-width: 64ch; }
.cvline { color: var(--text); }
.cvline a { color: var(--strong); font-weight: 500; text-decoration: none; border-bottom: 2px solid var(--accent-mark); }
.cvline a:hover { color: var(--accent); }
.cvline em { color: var(--muted); font-size: 14px; }

/* ===== Round 10: beauty, by the evidence =====
   Classical aesthetics: low visual complexity, few sizes, few shared edges, generous space, one dominant element.
   - Three type sizes only: 13 (meta, badges, dates, links), 16 (body, titles), 20 (name, page title). Two weights.
   - The face is small (120 px): faces pull the eye away from the work.
   - Work pictures 192 x 108: about the height of their title + authors + links, so every row is the same height.
   - Spacing from one scale: 8 16 24 32 40 64. 64 between the left column and the content.
   - Three vertical edges on the page: left column (40), content (304), and the text beside the pictures. */

:root { --side: 272px; --gap: 40px; }

/* ---- type: three sizes ---- */
body { font-size: 16px; line-height: 1.6; }
.name, h1.page { font-size: 20px; line-height: 1.3; font-weight: 500; letter-spacing: 0; }
.tag, .menu a, .item h3, .item .desc, .list .t, .wall .cap, .bio p, .cvline, .rows p, .timeline li, .lead { font-size: 16px; }
.item .m, .list .m, .l, .badge, .wall .cap small, .rows .d, .timeline .d, .timeline .who, .timeline b + span,
.rows h2, h2.sec, .cvline em, .theme, .sub { font-size: 13px; }
.item h3, h2.sec ~ .item:not(.big) h3 { font-size: 16px; line-height: 1.45; font-weight: 500; }
.rows h2, h2.sec { font-weight: 500; letter-spacing: .02em; color: var(--muted); }
.badge { padding: 4px 6px 3px; margin-bottom: 8px; }

/* ---- left column: one edge at 40px, small face ---- */
.photo { width: 120px; max-width: 120px; height: 120px; margin-bottom: 24px; }
.name { margin: 0; }
.tag { margin: 8px 0 16px; color: var(--muted); line-height: 1.5; }
.util.icons.only { margin: 0 0 40px; gap: 16px; }
.util.icons.only a { width: auto; height: 32px; border-radius: 0; place-items: center start; }
.util.icons.only a:hover { background: none; }
.util.icons.only svg { width: 17px; height: 17px; }
.menu a { padding: 4px 0; }
.menu a[aria-current="page"] { margin-left: -12px; padding-left: 10px; }

/* ---- content: starts 64px after the left column, text held to a readable width ---- */
main { padding: var(--top) 64px 120px 32px; max-width: calc(var(--side) + 32px + 880px + 64px); }
h1.page { margin: 0 0 32px; }

/* ---- works: same picture size, same row height, same edges ---- */
.item, h2.sec ~ .item:not(.big) { grid-template-columns: 192px minmax(0, 1fr); gap: 24px; --gap: 40px; align-items: start; }
.item .tx { align-self: start; max-width: 600px; }
.item h3 { margin: 0 0 4px; }
.item .l { margin-top: 8px; }
.th img, .th video { aspect-ratio: 16 / 9; }

/* big items (film page, newest work on C's home): one size larger, still second to the list */
.item.big, .d-a h2.sec ~ .item, .d-b h2.sec ~ .item, .d-c h2.sec ~ .item.big { grid-template-columns: 384px minmax(0, 1fr); gap: 32px; }
.item.big .desc { margin-top: 8px; max-width: 60ch; }

h2.sec { margin: 56px 0 24px; padding-top: 0; border-top: 0; }

/* A and B use the same picture width */
.wall { grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 32px 24px; }
.list li { grid-template-columns: 192px minmax(0, 1fr); gap: 24px; padding: 24px 0; }

/* bio */
.bio p, .cvline { max-width: 62ch; }
.rows { max-width: 880px; }
.rows h2 { margin: 48px 0 16px; }

@media (max-width: 1000px) {
  :root { --side: 232px; }
  main { padding-left: 24px; padding-right: 32px; }
  .item.big { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .util.icons.only { margin: 0 16px 0; }
  .util.icons.only a { height: 44px; }
  main { padding: 24px 16px 64px; }
  .item, h2.sec ~ .item:not(.big) { grid-template-columns: 128px minmax(0, 1fr); gap: 16px; --gap: 32px; }
  .item.big, .d-a h2.sec ~ .item { grid-template-columns: 1fr; gap: 12px; }
  .list li { grid-template-columns: 128px minmax(0, 1fr); gap: 16px; }
}

/* ===== Round 11: after checking round 10 =====
   1. Balance: on wide screens the whole block (left column + content) sits in the middle,
      so the space left and right is equal instead of all of it piling up on the right.
   2. The light/dark switch joins the icon row as a sun/moon icon, on the column's left edge,
      instead of a button floating in the top-right corner that lines up with nothing. */

:root { --block: 1160px; --x: max(0px, calc((100vw - var(--block)) / 2)); }
.side { left: var(--x); }
main { margin-left: calc(var(--side) + var(--x)); }

.theme-icon { display: grid; place-items: center start; height: 32px; padding: 0; border: 0; background: none; color: var(--muted); cursor: pointer; }
.theme-icon:hover { color: var(--accent); }
.theme-icon[hidden] { display: none; }
.theme-icon svg { width: 17px; height: 17px; }
.theme-icon .to-light { display: none; }
.theme-icon[data-next="light"] .to-dark { display: none; }
.theme-icon[data-next="light"] .to-light { display: inline; }

@media (max-width: 560px) {
  .side { left: auto; }
  main { margin-left: 0; }
  .theme-icon { height: 44px; }
}

/* ===== Round 12: feedback — about 125% =====
   Every size from round 10 times 1.25, rounded to the 4 px grid:
   type 13/16/20 -> 16/20/25, face 120 -> 152, work pictures 192x108 -> 240x135,
   left column 200 -> 248 wide, gap to content 64 -> 80.
   The left-column menu now stays down to 560 px wide; only phones get the top menu row. */

:root { --side: 328px; --top: 64px; --block: 1440px; }

/* ---- type: 16 / 20 / 25 ---- */
body { font-size: 20px; line-height: 1.6; }
.name, h1.page { font-size: 25px; }
.tag, .menu a, .item h3, h2.sec ~ .item:not(.big) h3, .item .desc, .list .t, .wall .cap, .bio p, .cvline, .rows p, .timeline li, .lead { font-size: 20px; }
.item .m, .list .m, .l, .badge, .wall .cap small, .rows .d, .timeline .d, .timeline .who, .timeline b + span,
.rows h2, h2.sec, .cvline em, .sub { font-size: 16px; }
.badge { padding: 5px 7px 4px; margin-bottom: 10px; }

/* ---- left column: 248 px wide, starts at 40 px ---- */
.side { padding: var(--top) 40px 40px 40px; }
.photo { width: 152px; max-width: 152px; height: 152px; margin-bottom: 28px; }
.tag { margin: 10px 0 20px; }
.util.icons.only { gap: 20px; margin-bottom: 48px; }
.util.icons.only a, .theme-icon { height: 40px; }
.util.icons.only svg, .theme-icon svg { width: 21px; height: 21px; }
.menu a { padding: 5px 0; }

/* ---- content: 80 px after the column ---- */
main { padding: var(--top) 80px 140px 40px; max-width: calc(var(--side) + 40px + 1040px + 80px); }
h1.page { margin-bottom: 40px; }

/* ---- works: 240 x 135 pictures ---- */
.item, h2.sec ~ .item:not(.big) { grid-template-columns: 240px minmax(0, 1fr); gap: 32px; --gap: 48px; }
.item .tx { max-width: 720px; }
.item h3 { margin-bottom: 6px; }
.item .l { margin-top: 10px; gap: 4px 20px; }
.item.big, .d-a h2.sec ~ .item, .d-b h2.sec ~ .item, .d-c h2.sec ~ .item.big { grid-template-columns: 480px minmax(0, 1fr); gap: 40px; }
h2.sec { margin: 72px 0 32px; }
.wall { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 40px 32px; }
.list li { grid-template-columns: 240px minmax(0, 1fr); gap: 32px; padding: 32px 0; }

/* ---- bio ---- */
.rows { max-width: 1040px; }
.timeline li { grid-template-columns: 190px minmax(0, 1fr) minmax(0, 1fr); padding-left: 28px; padding-bottom: 18px; }
.timeline li::after { width: 8px; height: 8px; top: 11px; }
.timeline li::before { left: 4px; top: 14px; }
.rows p { grid-template-columns: 190px minmax(0, 2fr); padding-left: 28px; }
.rows h2 { margin: 56px 0 20px; }

/* ---- narrower screens: the left column stays, everything steps down ---- */
@media (max-width: 1200px) {
  :root { --side: 280px; }
  .side { padding-left: 32px; padding-right: 32px; }
  .photo { width: 128px; max-width: 128px; height: 128px; }
  main { padding-left: 32px; padding-right: 40px; }
  .item, h2.sec ~ .item:not(.big), .list li { grid-template-columns: 200px minmax(0, 1fr); gap: 24px; }
  .item.big, .d-a h2.sec ~ .item { grid-template-columns: 1fr; }
  .timeline li { grid-template-columns: 160px minmax(0, 1fr); }
  .timeline .who { grid-column: 2; grid-row: auto; }
  .rows p { grid-template-columns: 160px minmax(0, 1fr); }
}
@media (max-width: 860px) {
  :root { --side: 224px; }
  body { font-size: 18px; }
  .name, h1.page { font-size: 22px; }
  .tag, .menu a, .item h3, h2.sec ~ .item:not(.big) h3, .item .desc, .list .t, .bio p, .cvline, .rows p, .timeline li { font-size: 17px; }
  .side { padding-left: 24px; padding-right: 20px; }
  .photo { width: 104px; max-width: 104px; height: 104px; }
  main { padding-left: 24px; padding-right: 24px; }
  .item, h2.sec ~ .item:not(.big), .list li { grid-template-columns: 1fr; gap: 12px; }
  .item .th, .list .th { max-width: 320px; }
  .timeline li, .rows p { grid-template-columns: 1fr; }
  .timeline .who, .timeline b, .timeline b + span { grid-column: 1; }
  .timeline .d { grid-row: auto; }
}
@media (max-width: 560px) {
  body { font-size: 17px; }
  .name { font-size: 22px; }
  .item, h2.sec ~ .item:not(.big), .list li { grid-template-columns: 1fr; }
  .item .th, .list .th { max-width: none; }
  .rows p, .timeline li { padding-left: 0; }
  .timeline li { padding-left: 22px; }
}

/* Menu in capitals (feedback): RESEARCH / FILM / BIO. Capitals need a little air between letters. */
.menu a { text-transform: uppercase; letter-spacing: .08em; font-size: 16px; }
@media (max-width: 860px) { .menu a { font-size: 15px; } }

/* Light/dark switch back in the top-right corner (feedback), as a sun/moon icon in a round button
   like the live site; it stays there while scrolling. */
.util li:has(.theme-icon) { display: contents; }
.theme-icon { position: fixed; top: 20px; right: 24px; z-index: 6; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 50%; background: var(--bg); place-items: center; }
.theme-icon:hover { border-color: var(--muted); }
.theme-icon svg { width: 18px; height: 18px; }
@media (max-width: 560px) { .theme-icon { position: absolute; top: 18px; right: 16px; } }

/* Research pictures: pattern C, chosen (360 px, picture : text = 1 : 1.618). Smaller screens step down by the same ratio. */
.item, h2.sec ~ .item:not(.big) { grid-template-columns: 360px minmax(0, 1fr); gap: 40px; }
@media (max-width: 1200px) { .item, h2.sec ~ .item:not(.big) { grid-template-columns: 300px minmax(0, 1fr); gap: 32px; } }
@media (max-width: 860px) { .item, h2.sec ~ .item:not(.big) { grid-template-columns: 1fr; gap: 12px; } .item .th { max-width: 320px; } }
@media (max-width: 560px) { .item .th { max-width: none; } }

/* five icons must stay on one line in the narrower left columns */
.util.icons.only { flex-wrap: nowrap; }
@media (max-width: 1200px) { .util.icons.only { gap: 16px; } }
@media (max-width: 860px) { .util.icons.only { gap: 11px; } .util.icons.only svg { width: 19px; height: 19px; } }
@media (max-width: 560px) { .util.icons.only { gap: 18px; } }

/* ===== Round 13: feedback — 90 %, a larger name, a smaller tagline, equal margins =====
   Every size of round 12 times 0.9 (rounded): type 16/20/25 -> 14/18/22, face 152 -> 136,
   research pictures 360 -> 324, film 480 -> 432.
   The name is now the largest text (28 px); the tagline steps down to 13 px.
   One page margin M = 56 px on the top, the left of the left column and the right of the content,
   so the page sits in an even frame; on wide screens the whole block is centred. */

:root { --m: 56px; --top: 56px; --side: 312px; --block: 1420px; }

/* ---- type ---- */
body { font-size: 18px; }
h1.page { font-size: 22px; }
.name { font-size: 28px; line-height: 1.2; letter-spacing: -.005em; }
.tag { font-size: 13px; line-height: 1.5; margin: 6px 0 18px; }
.menu a { font-size: 14px; }
.item h3, h2.sec ~ .item:not(.big) h3, .item .desc, .list .t, .wall .cap, .bio p, .cvline, .rows p, .timeline li, .lead { font-size: 18px; }
.item .m, .list .m, .l, .badge, .wall .cap small, .rows .d, .timeline .d, .timeline .who, .timeline b + span,
.rows h2, h2.sec, .cvline em { font-size: 14px; }

/* ---- left column: margin M on its left, 224 px wide ---- */
.side { padding: var(--top) 32px 40px var(--m); }
.photo { width: 136px; max-width: 136px; height: 136px; margin-bottom: 24px; }
.util.icons.only { gap: 18px; margin-bottom: 44px; }
.util.icons.only a { height: 36px; }
.util.icons.only svg { width: 19px; height: 19px; }

/* ---- content: 72 px after the column, margin M on its right ---- */
main { padding: var(--top) var(--m) 128px 40px; max-width: calc(var(--side) + 40px + 960px + var(--m)); }
h1.page { margin-bottom: 36px; }
.item, h2.sec ~ .item:not(.big) { grid-template-columns: 324px minmax(0, 1fr); gap: 36px; --gap: 44px; }
.item .tx { max-width: 650px; }
.item.big, .d-a h2.sec ~ .item, .d-b h2.sec ~ .item, .d-c h2.sec ~ .item.big { grid-template-columns: 432px minmax(0, 1fr); gap: 36px; }
h2.sec { margin: 64px 0 28px; }
.list li { grid-template-columns: 216px minmax(0, 1fr); gap: 28px; padding: 28px 0; }
.wall { grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); gap: 36px 28px; }

/* ---- bio ---- */
.rows { max-width: 960px; }
.timeline li { grid-template-columns: 170px minmax(0, 1fr) minmax(0, 1fr); padding-left: 26px; }
.rows p { grid-template-columns: 170px minmax(0, 2fr); padding-left: 26px; }

/* light/dark switch: the same margin from the top and right edges as the page */
.theme-icon { top: calc(var(--top) - 8px); right: var(--m); width: 36px; height: 36px; }
.theme-icon svg { width: 16px; height: 16px; }

/* ---- narrower screens: the same margin shrinks with the screen ---- */
@media (max-width: 1200px) {
  :root { --m: 40px; --side: 264px; }
  .side { padding-left: var(--m); padding-right: 28px; }
  .photo { width: 116px; max-width: 116px; height: 116px; }
  .item, h2.sec ~ .item:not(.big) { grid-template-columns: 270px minmax(0, 1fr); gap: 28px; }
  .list li { grid-template-columns: 180px minmax(0, 1fr); }
  .timeline li { grid-template-columns: 150px minmax(0, 1fr); }
  .rows p { grid-template-columns: 150px minmax(0, 1fr); }
}
@media (max-width: 860px) {
  :root { --m: 28px; --side: 216px; }
  body { font-size: 16px; }
  .name { font-size: 24px; }
  .tag { font-size: 13px; }
  .item h3, h2.sec ~ .item:not(.big) h3, .item .desc, .list .t, .bio p, .cvline, .rows p, .timeline li { font-size: 16px; }
  .side { padding-left: var(--m); padding-right: 20px; }
  .photo { width: 96px; max-width: 96px; height: 96px; }
  main { padding-left: 24px; padding-right: var(--m); }
  .item, h2.sec ~ .item:not(.big), .list li { grid-template-columns: 1fr; gap: 12px; }
  .item .th { max-width: 300px; }
  .timeline li, .rows p { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  :root { --m: 16px; }
  .name { font-size: 24px; margin-right: 64px; }
  .tag { margin-right: 64px; }
  main { padding: 24px var(--m) 64px; }
  .item .th { max-width: none; }
  .theme-icon { top: 18px; right: var(--m); }
}

/* equal frame: the block is exactly --block wide, so left margin = right margin at every width */
:root { --block: 1440px; }
main { max-width: calc(var(--block) - var(--side)); }
.theme-icon { right: calc(var(--m) + var(--x)); }
@media (max-width: 560px) { .theme-icon { right: var(--m); } }
/* the top margin follows the side margin on narrower screens too */
@media (max-width: 1200px) { :root { --top: var(--m); } }
@media (max-width: 860px) { :root { --top: 32px; } }
@media (max-width: 560px) { :root { --top: 24px; } }
/* phones: the name keeps the same margin from the top as from the side */
@media (max-width: 560px) { .name { display: block; width: fit-content; margin: 24px 64px 0 16px; } .tag { margin: 4px 64px 8px 16px; } }

/* ===== Round 14: feedback — the live site's badge and cards come back =====
   Badge exactly as on keiichiihara.github.io: filled sky blue (#83c9f4) with white bold text in light,
   #18414d with light cyan (#7fdcf2) text in dark, 5 px corners, Noto Sans JP 700.
   Every work sits on the live site's card: 5 % of the link blue mixed into the background
   (#f6fbfe / dark #111c24) with a border of the same blue (#eaf6fd / dark #152933), 4 px corners.
   Sizes follow this design's 90 % scale. */

/* only the letters a badge can use, so the font is a few KB instead of the whole Japanese set */

:root { --card: #f6fbfe; --card-line: #eaf6fd; --badge-bg: #83c9f4; --badge: #ffffff; }
@media (prefers-color-scheme: dark) { :root { --card: #111c24; --card-line: #152933; --badge-bg: #18414d; --badge: #7fdcf2; } }
html[data-theme="light"] { --card: #f6fbfe; --card-line: #eaf6fd; --badge-bg: #83c9f4; --badge: #ffffff; }
html[data-theme="dark"] { --card: #111c24; --card-line: #152933; --badge-bg: #18414d; --badge: #7fdcf2; }

/* the badge */
.badge {
  font: 700 14px/1.4 "Noto Sans JP", "IBM Plex Sans", sans-serif;
  letter-spacing: .01em;
  color: var(--badge);
  background: var(--badge-bg);
  border-radius: 5px;
  padding: 4px 12px;
  margin-bottom: 12px;
}

/* the cards */
.item, h2.sec ~ .item:not(.big) {
  background: var(--card);
  border: 1px solid var(--card-line);
  border-radius: 4px;
  padding: 18px;
  align-items: center;
  --gap: 20px;
}
.item .tx { padding-right: 8px; }
.th img, .th video { outline: 0; border-radius: 2px; }
.list li { background: var(--card); border: 1px solid var(--card-line); border-radius: 4px; padding: 18px; margin-bottom: 20px; }
.list { border-top: 0; }

@media (max-width: 860px) { .item, h2.sec ~ .item:not(.big) { padding: 14px; } }
@media (max-width: 560px) { .item, h2.sec ~ .item:not(.big) { padding: 12px; --gap: 16px; } }

/* ===== Round 15: feedback — the live site's link buttons come back =====
   Same values as keiichiihara.github.io: outlined buttons with an icon, 1.5 px border, 5 px corners, bold label.
   Light: white with a #83c9f4 border and #41acef text, hover #d9f0ff. Dark: transparent, #263041 border, #45c8e8 text.
   Order as on the live site: Paper, Video, Project Page. */

:root { --button-bg: #ffffff; --button-line: #83c9f4; --button-text: #41acef; --button-hover-bg: #d9f0ff; --button-hover-text: #2f8fcc; }
@media (prefers-color-scheme: dark) { :root { --button-bg: transparent; --button-line: #263041; --button-text: #45c8e8; --button-hover-bg: #172e38; --button-hover-text: #45c8e8; } }
html[data-theme="light"] { --button-bg: #ffffff; --button-line: #83c9f4; --button-text: #41acef; --button-hover-bg: #d9f0ff; --button-hover-text: #2f8fcc; }
html[data-theme="dark"] { --button-bg: transparent; --button-line: #263041; --button-text: #45c8e8; --button-hover-bg: #172e38; --button-hover-text: #45c8e8; }

.l.buttons { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 0; }
.l.buttons .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  min-width: 72px; min-height: 30px; padding: 4px 11px;
  color: var(--button-text); background: var(--button-bg);
  border: 1.5px solid var(--button-line); border-radius: 5px;
  font: 600 13px/1 "IBM Plex Sans", sans-serif; text-decoration: none;
  transition: background .15s ease, color .15s ease;
}
.l.buttons .btn:hover { color: var(--button-hover-text); background: var(--button-hover-bg); text-decoration: none; }
.l.buttons .btn svg { flex: none; }

@media (max-width: 560px) { .l.buttons .btn { min-height: 36px; } }
@media (prefers-reduced-motion: reduce) { .l.buttons .btn { transition: none; } }

/* Page titles in capitals like the menu (feedback): RESEARCH / FILM / BIO. */
h1.page { text-transform: uppercase; letter-spacing: .08em; font-size: 20px; }
@media (max-width: 860px) { h1.page { font-size: 18px; } }

/* Left column at 110 % (feedback): photo, name, tagline, icons and menu times 1.1.
   The column grows from 224 to 248 px; the page margins (56 px) stay the same. */
:root { --side: 336px; }
.photo { width: 150px; max-width: 150px; height: 150px; margin-bottom: 26px; }
.name { font-size: 31px; }
.tag { font-size: 14px; margin: 7px 0 20px; }
.util.icons.only { gap: 20px; margin-bottom: 48px; }
.util.icons.only a { height: 40px; }
.util.icons.only svg { width: 21px; height: 21px; }
.menu a { font-size: 15px; padding: 6px 0; }
@media (max-width: 1200px) {
  :root { --side: 284px; }
  .photo { width: 128px; max-width: 128px; height: 128px; }
  .name { font-size: 28px; }
}
@media (max-width: 860px) {
  :root { --side: 236px; }
  .photo { width: 106px; max-width: 106px; height: 106px; }
  .name { font-size: 26px; }
  .tag { font-size: 14px; }
  .util.icons.only { gap: 13px; }
  .util.icons.only svg { width: 20px; height: 20px; }
}
@media (max-width: 560px) {
  .name { font-size: 26px; }
  .util.icons.only { gap: 20px; }
}
@media (max-width: 560px) { .tag { margin: 4px 64px 8px 16px; } }

/* Text block centred on the card's height, beside the picture (feedback). */
.item .tx { align-self: center; }
@media (max-width: 860px) { .item .tx { align-self: start; } }

/* Name and tagline at 90 % (feedback): 31 -> 28 px, 14 -> 12.6 px. */
.name { font-size: 28px; }
.tag { font-size: 12.6px; }
@media (max-width: 1200px) { .name { font-size: 25px; } }
@media (max-width: 860px) { .name { font-size: 23px; } .tag { font-size: 12.6px; } }
@media (max-width: 560px) { .name { font-size: 23px; } }

/* The name is plain text now (feedback), not a link. */
p.name { display: block; margin-top: 0; margin-bottom: 0; color: var(--strong); font-weight: 500; }
@media (max-width: 560px) { p.name { margin: 24px 64px 0 16px; } }

/* The left column fits its content (feedback: too much space between the menu and the content
   when the window gets narrower). Content width = the widest item (tagline ~180 px, photo 150 px),
   and the gap to the content is one fixed step, so the empty band no longer grows. */
:root { --side: calc(var(--m) + 190px); }
.side { padding-right: 0; }
main { padding-left: 64px; }
@media (max-width: 1200px) {
  :root { --side: calc(var(--m) + 180px); }
  main { padding-left: 48px; }
}
@media (max-width: 860px) {
  :root { --side: calc(var(--m) + 170px); }
  main { padding-left: 32px; }
}
@media (max-width: 560px) { main { padding-left: var(--m); } }

/* heading only for screen readers, so the outline goes h1 > h2 > h3 without changing the look */
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* icon links: at least 24 px wide to tap (WCAG 2.5.8) */
.util.icons.only a { min-width: 24px; justify-content: center; }