/* Hallmark · shape: Index-First · genre: editorial · theme: Editorial (deal 3/3) · redesign: full · copy: verbatim
 * hero: Settled · nav: edge-aligned · footer: letter close · imagery: portrait and research figures · signature: a serif nameplate and an abstract network behind the research section
 * axes: light/serif/chromatic-blue · posture: restrained · draw: 432653 · v2.0.0 */
/* Hallmark · pre-emit critique: P4 H4 E4 S4 R5 V4 · weakest: H, gave paper titles and authors separate lines. */
/* Hallmark · waive 44c · the first working paper appears below the portrait · research is a primary destination for academic visitors. */
/* Hallmark · waive 77 · Contact ends with one row of email and profile links · the contact section groups email, Github and LinkedIn links in a compact directory. */
/* Hallmark · waive 59 · ink rules separate the paper list, teaching and CV · compact gaps keep these related academic sections within reach. */
:root {
  color-scheme: light;
  --paper: #fafafb;
  --paper-deep: #eceff4;
  --ink: #1d2c42;
  --body: #364253;
  --muted: #566477;
  --rule: #cdd4dd;
  --accent: #315994;
  --accent-deep: #1b3e73;
  --photo-mat: #fcfcfd;
  --reading: "Noto Sans", system-ui, sans-serif;
  --title: "Newsreader", Georgia, serif;
  --network-ink: #314d7b;
  --network-far: #6b86a7;
  --network-pulse: #245fcb;
  --gutter: clamp(1.15rem, 5vw, 4rem);
  --page-width: 72rem;
  --column-gap: clamp(2rem, 5vw, 5rem);
}

@font-face {
  font-family: "Newsreader";
  src: url("assets/fonts/newsreader-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

@font-face {
  font-family: "Noto Sans";
  src: url("assets/fonts/noto-sans-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { scroll-padding-top: 5.5rem; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--body);
  font: 1.0625rem/1.56 var(--reading);
  -webkit-font-smoothing: antialiased;
}
p, h1, h2, h3, figure { margin: 0; }
img, picture { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: .21em; }
a:hover, summary:hover { color: var(--accent-deep); }
a:hover { text-decoration-thickness: 2px; }
a:active, summary:active { color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
::selection { background: var(--accent); color: var(--paper); }
h1, h2, h3 {
  color: var(--ink);
  font-family: var(--title);
  line-height: 1.12;
  min-width: 0;
  overflow-wrap: break-word;
  text-wrap: balance;
}
h1, h2, h3 { font-weight: 400; letter-spacing: -.022em; }
h1 { font-size: clamp(2.8rem, 4vw, 4rem); line-height: 1; }
h2 { font-size: clamp(2.4rem, 3.8vw, 3.55rem); }

.nav-inner, .hero-inner, .section-inner, .site-footer {
  max-width: var(--page-width);
  width: calc(100% - var(--gutter) * 2);
  margin-inline: auto;
}
.skip-link {
  position: absolute;
  z-index: 3;
  inset: .5rem auto auto .5rem;
  transform: translateY(-160%);
  background: var(--ink);
  color: var(--paper);
  padding: .6rem 1rem;
}
.skip-link:focus { transform: none; }
.site-nav { position: sticky; top: 0; z-index: 2; background: var(--paper); }
.nav-inner {
  min-height: 4.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--rule);
}
.brand, .nav-links a { display: inline-flex; align-items: center; min-height: 44px; }
.brand img { width: 3.25rem; }
.nav-links { display: flex; align-items: center; flex-wrap: wrap; gap: clamp(.9rem, 3vw, 2.6rem); }
.nav-links a { color: var(--ink); font: 500 .98rem/1 var(--reading); text-decoration: none; }
.nav-links a:hover { color: var(--accent); text-decoration: underline; }

.hero-inner, .section-inner {
  display: grid;
  grid-template-columns: minmax(0, .65fr) minmax(0, 1.35fr);
  column-gap: var(--column-gap);
}
.hero-inner {
  grid-template-columns: minmax(0, 2.4fr) minmax(0, 1fr);
  align-items: center;
  padding-block: clamp(2.75rem, 4.5vw, 4.5rem);
}
.portrait-wrap {
  grid-area: 1 / 2;
  justify-self: center;
  padding: .3rem;
  background: var(--photo-mat);
  border: 1px solid var(--rule);
  width: min(100%, 11rem);
}
.portrait { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: center 46%; }
.introduction { grid-area: 1 / 1; }
.role { max-width: 40ch; margin-top: 1rem; color: var(--ink); font-size: clamp(1.28rem, 1.75vw, 1.58rem); line-height: 1.32; }
.bio { margin-top: .9rem; max-width: 69ch; }
.hero-actions, .cv-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .55rem 1.35rem; }
.hero-actions { margin-top: 1.4rem; }
.hero-actions a, .cv-actions a, .text-link { display: inline-flex; align-items: center; min-height: 44px; font: 550 .94rem/1.3 var(--reading); }
.button { padding: .62rem 1.15rem; background: var(--accent); color: var(--paper); text-decoration: none; }
.button:hover, .button:active { color: var(--paper); background: var(--accent-deep); }

.section-inner { border-top: 2px solid var(--ink); padding-block: clamp(2.2rem, 4vw, 3.8rem); }
.section-note { max-width: 31ch; margin-top: .8rem; color: var(--muted); }
.section-label .text-link { margin-top: .65rem; }
#research { position: relative; isolation: isolate; }
#research .section-inner {
  position: relative;
  padding-top: 0;
  grid-template-areas: "heading heading" "figures papers";
  grid-template-rows: auto 1fr;
  row-gap: 1.65rem;
}
.research-heading {
  grid-area: heading;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.45rem;
  border-bottom: 1px solid var(--rule);
}
.research-intro .section-note { max-width: 52ch; }

/* The plane follows the viewport only while inside Research. Opening an
   abstract extends the backdrop without allocating a page-height canvas. */
.network-atlas {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: clip;
  pointer-events: none;
  opacity: .23;
}
.network-plane {
  position: sticky;
  top: 0;
  width: 100%;
  height: min(100vh, 100%);
  height: min(100svh, 100%);
}
.network-print, .network-canvas { width: 100%; height: 100%; display: block; }
.network-print { background: url("assets/network-print.webp") repeat-y center top / max(100%, 42rem) auto; }
.network-atlas [hidden], .network-tools[hidden] { display: none; }
.network-tools { display: flex; flex-shrink: 0; align-items: center; gap: .45rem; }
.network-tools button {
  border: 0;
  padding: .35rem;
  background: transparent;
  color: var(--muted);
  font: 400 .76rem/1.2 var(--reading);
  cursor: pointer;
  min-height: 32px;
}
.network-tools button:enabled:hover { color: var(--accent); }
.network-tools button:disabled { opacity: .55; cursor: default; }
.send-pulse:enabled:hover { text-decoration: underline; text-underline-offset: .2em; }
.motion-toggle { width: 32px; }
.motion-toggle svg { vertical-align: middle; }
.pause-mark { stroke: currentColor; stroke-width: 1.6; }
.play-mark { fill: currentColor; display: none; }
.motion-toggle.is-paused .pause-mark { display: none; }
.motion-toggle.is-paused .play-mark { display: inline; }
.publications { grid-area: papers; }
.figures { grid-area: figures; display: grid; align-content: start; gap: 1.55rem; max-width: 20.5rem; }
.figures a { display: block; border: 1px solid var(--rule); }
.figures a:hover { border-color: var(--accent); }
.figures img { width: 100%; }
figcaption { color: var(--muted); margin-top: .45rem; font: 500 .85rem/1.4 var(--reading); }

.group-title { font-size: clamp(1.45rem, 2vw, 1.85rem); letter-spacing: -.022em; margin: 2.1rem 0 .75rem; }
.group-title:first-child { margin-top: 0; }
.item-list { padding: 0; margin: 0; list-style: none; }
.paper { border-top: 1px solid var(--rule); }
.paper summary, li.paper { padding: .95rem 0; }
.paper-title, .course-title { font: 400 clamp(1.12rem, 1.55vw, 1.33rem)/1.33 var(--title); color: var(--ink); }
.paper-meta, .course-meta { display: block; margin-top: .32rem; font: 400 .93rem/1.5 var(--reading); color: var(--muted); }
.paper-meta a { display: inline-block; }
summary { cursor: pointer; }
.paper summary, .cv-preview summary { position: relative; list-style: none; padding-right: 2rem; }
summary::-webkit-details-marker { display: none; }
.paper summary::after, .cv-preview summary::after {
  content: "";
  position: absolute;
  right: .35rem;
  top: 1.4rem;
  width: .52rem;
  height: .52rem;
  border: solid var(--accent);
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}
details[open] > summary::after { transform: rotate(225deg); }
.paper summary:hover .paper-title { color: var(--accent); }
.abstract { max-width: 69ch; padding-bottom: 1.4rem; }
.teaching-top {
  display: flex;
  flex-wrap: wrap;
  gap: .9rem 3rem;
  padding-bottom: 1.25rem;
}
.info-label, .contact-block h3 { display: block; margin-bottom: .2rem; color: var(--muted); font: 500 .9rem/1.4 var(--reading); }
.course { border-top: 1px solid var(--rule); padding-block: 1rem; }
.cv-actions { margin-top: 1rem; }
.cv-block { margin-bottom: 1rem; }
.cv-preview { border-block: 1px solid var(--rule); }
.cv-preview summary { padding-block: .85rem; font: 550 1rem/1.5 var(--reading); color: var(--accent); }
.cv-preview p { margin: .8rem 0; }
.cv-viewer { width: 100%; height: min(70vh, 52rem); border: 1px solid var(--rule); background: var(--paper-deep); }
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(11rem, 100%), 1fr)); align-items: start; gap: 1rem; }
.contact-block a { overflow-wrap: anywhere; }
.site-footer {
  border-top: 1px solid var(--rule);
  padding-block: 1.25rem 2rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .3rem 1rem;
  font: 400 .87rem/1.5 var(--reading);
  color: var(--muted);
}

@media (max-width: 47rem) {
  .hero-inner {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    padding-block: 2rem;
  }
  .introduction { display: contents; }
  h1 { grid-area: 1 / 1; align-self: center; }
  .portrait-wrap { grid-area: 1 / 2; width: clamp(4.1rem, 15vw, 5.25rem); padding: .22rem; }
  .role, .bio, .hero-actions { grid-column: 1 / -1; margin: 0; }
  .section-inner { display: block; }
  .section-label, .research-heading { margin-bottom: 1.65rem; }
  .section-note { max-width: 48ch; }
  .research-heading { flex-wrap: wrap; gap: .35rem 1rem; }
  .network-atlas { opacity: .19; }
  .figures { max-width: none; margin-top: 1.8rem; grid-template-columns: repeat(auto-fit, minmax(min(12rem, 100%), 1fr)); }
  .group-title { margin-top: 1.65rem; }
}
@media (max-width: 24rem) {
  .nav-links { gap: .7rem; }
  .nav-links a { font-size: .88rem; }
  .brand img { width: 2.5rem; }
}
