/* One stylesheet for the academic site. Light, one column. The only motion is
   one small canvas strip per page: Home's accent chosen by ?v=N on index.html,
   and one fixed accent each on Research, CV and Industry (.anim-page). */

:root {
  --text: #1a1a1a;
  --muted: #5f6368;
  --rule: #e3e3e3;
  --link: #00356b;
  --link-hover: #286dc0;
  --bg: #ffffff;
  --col: 680px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 18px;
  line-height: 1.6;
}

a { color: var(--link); text-decoration: none; }
a:hover, a:focus-visible { color: var(--link-hover); text-decoration: underline; }

.wrap { max-width: var(--col); margin: 0 auto; padding: 0 20px; }

/* Header and menu */

.site-header { border-bottom: 1px solid var(--rule); }
.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 24px;
  padding-top: 18px;
  padding-bottom: 14px;
}
.site-name { font-weight: 600; color: var(--text); }
.site-name:hover { color: var(--text); text-decoration: none; }
.site-menu { display: flex; gap: 20px; }
.site-menu a { color: var(--muted); }
.site-menu a[aria-current="page"] { color: var(--text); font-weight: 600; }

/* Identity block */

.intro {
  display: flex;
  gap: 32px;
  align-items: center;
  margin: 48px 0 32px;
}
.photo {
  flex: 0 0 200px;
  width: 200px;
  height: 200px;
  border-radius: 10px;
  object-fit: cover;
}
.photo--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: #f3f4f6;
  border: 1px dashed #b8bcc2;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
  padding: 16px;
}
.intro h1 {
  margin: 0 0 4px;
  font-size: 32px;
  font-weight: 600;
  line-height: 1.2;
}
.intro .role { margin: 0 0 12px; color: var(--muted); line-height: 1.45; }
.links { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 4px 18px; }

/* Sections */

h2 {
  margin: 44px 0 12px;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.3;
}
h3 {
  margin: 24px 0 8px;
  font-size: 16px;
  font-weight: 600;
  color: var(--muted);
}
p { margin: 0 0 16px; }

ul.plain { margin: 0; padding-left: 20px; }
ul.plain li { margin-bottom: 4px; }

/* News */

.news { margin: 0; padding: 0; list-style: none; }
.news li { display: flex; gap: 16px; margin-bottom: 8px; }
.news time { flex: 0 0 82px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* Publications */

.pubs { margin: 0; padding: 0; list-style: none; }
.pubs li { margin-bottom: 18px; line-height: 1.5; }
.pub-title { display: block; font-weight: 600; }
.pub-authors, .pub-venue { display: block; }
.pub-venue { color: var(--muted); }
.pub-venue em { font-style: italic; }
.pub-links a + a::before { content: "·"; color: var(--muted); padding: 0 6px; }

/* Footer */

.site-footer {
  margin-top: 56px;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 15px;
}
.site-footer .wrap { padding-top: 16px; padding-bottom: 32px; }

/* Home animation accents (index.html?v=N). Space is reserved in CSS before any
   script runs, so nothing shifts when an animation starts. */

.anim-strip { display: none; }
.anim-v1 .anim-strip, .anim-v2 .anim-strip, .anim-v3 .anim-strip {
  display: block;
  position: relative;
  height: 76px;
  margin: 28px 0 0;
}
.anim-v1 .intro, .anim-v2 .intro, .anim-v3 .intro { margin-top: 24px; }
.anim-strip canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

.anim-v4 main h2 { position: relative; padding-right: 80px; }
.h-icon {
  position: absolute; right: 0; top: 50%;
  width: 64px; height: 24px; margin-top: -12px;
  fill: none; stroke: var(--link); stroke-width: 1.2;
  stroke-linecap: round; stroke-linejoin: round;
}
.h-icon .rung { stroke: #9aa0a6; stroke-width: 1; }
.h-icon path { transition: stroke-dashoffset 1.6s cubic-bezier(.4, 0, .2, 1); }
.h-rule {
  position: absolute; right: 78px; top: 50%; height: 1px;
  background: var(--rule);
  transform: scaleX(0); transform-origin: left;
  transition: transform .9s ease;
}
.h-drawn .h-rule { transform: scaleX(1); }
.h-still .h-rule, .h-still path { transition: none; }

.anim-pick {
  position: fixed; right: 12px; bottom: 12px; z-index: 10;
  display: flex; flex-wrap: wrap; gap: 2px 10px; max-width: calc(100% - 24px);
  padding: 6px 10px; border: 1px solid var(--rule); border-radius: 6px;
  background: #fff; font-size: 13px;
}
.anim-pick a { color: var(--muted); }
.anim-pick a[aria-current] { color: var(--link); font-weight: 600; }

/* Inner pages (Research, CV, Industry) */

.page-head { margin: 24px 0 8px; }
.page-head h1 { margin: 0 0 8px; font-size: 32px; font-weight: 600; line-height: 1.2; }
.lede { color: var(--muted); }
.anim-page .anim-strip { display: block; position: relative; height: 76px; margin: 28px 0 0; }

/* Strips between sections, further down a page (Home shows its one when animations are on). */
.anim-mid-on .anim-strip.anim-mid { display: block; position: relative; height: 76px; }
.anim-page .anim-strip.anim-mid, .anim-mid-on .anim-strip.anim-mid { margin: 40px 0 -8px; }

.project { margin: 0 0 36px; }
.project h3 { margin: 28px 0 2px; font-size: 20px; color: var(--text); line-height: 1.35; }
.project h4 { margin: 24px 0 8px; font-size: 18px; font-weight: 600; color: var(--text); line-height: 1.35; }
.project h4 + .meta { margin-top: -6px; }
.meta { margin: 0 0 12px; color: var(--muted); font-size: 16px; }
.cite { color: var(--muted); font-size: 16px; line-height: 1.5; margin-bottom: 4px; }
.cite em { font-style: italic; }
.more { margin: 0; font-size: 16px; }
.more a + a::before { content: "·"; color: var(--muted); padding: 0 6px; }
.project ul { margin: 0 0 16px; padding-left: 20px; }
.project ul li { margin-bottom: 4px; }
blockquote { margin: 0 0 16px; padding-left: 16px; border-left: 2px solid var(--rule); color: var(--muted); }

figure { margin: 12px 0 18px; }
figure img { display: block; width: 100%; height: auto; border-radius: 6px; border: 1px solid var(--rule); background: #fff; }
figcaption { margin-top: 6px; font-size: 15px; line-height: 1.45; color: var(--muted); }
.fig-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 12px 0 18px; }
.fig-pair figure { margin: 0; }
.fig-pair img { aspect-ratio: 4 / 3; object-fit: cover; }
.fig-pair.tall img { aspect-ratio: 3 / 4; }
.side { display: grid; grid-template-columns: 200px 1fr; gap: 24px; align-items: start; }
.side figure { margin: 4px 0 0; }

/* CV lists: a date column and an entry */
.cv { margin: 0 0 8px; padding: 0; list-style: none; }
.cv > li { display: flex; gap: 16px; margin-bottom: 14px; line-height: 1.5; }
.cv time { flex: 0 0 132px; color: var(--muted); font-variant-numeric: tabular-nums; }
.cv .what { flex: 1; min-width: 0; }
.cv .what span { display: block; color: var(--muted); font-size: 16px; }
.cv ul { margin: 4px 0 0; padding-left: 18px; font-size: 16px; }
.cv ul li { margin-bottom: 2px; }

/* Phone */

@media (max-width: 600px) {
  body { font-size: 17px; }
  .wrap { padding: 0 16px; }
  .intro { flex-direction: column; align-items: flex-start; gap: 20px; margin-top: 32px; }
  .photo { flex-basis: auto; width: 160px; height: 160px; }
  .intro h1 { font-size: 28px; }
  .news li { flex-direction: column; gap: 0; margin-bottom: 12px; }
  .news time { flex-basis: auto; font-size: 15px; }
  .anim-v1 .anim-strip, .anim-v2 .anim-strip, .anim-v3 .anim-strip { height: 64px; margin-top: 20px; }
  .anim-v1 .intro, .anim-v2 .intro, .anim-v3 .intro { margin-top: 20px; }
  .anim-page .anim-strip { height: 64px; margin-top: 20px; }
  .anim-page .anim-strip.anim-mid, .anim-mid-on .anim-strip.anim-mid { height: 64px; margin: 32px 0 -8px; }
  .page-head h1 { font-size: 28px; }
  .project h3 { font-size: 19px; }
  .side { grid-template-columns: 1fr; gap: 8px; }
  .side figure { max-width: 240px; }
  .cv > li { flex-direction: column; gap: 0; }
  .cv time { flex-basis: auto; font-size: 15px; }
}
