@import url("https://fonts.googleapis.com/css2?family=Instrument+Sans:wght@400;450;500;600;650;700;750&display=swap");

:root {
  /* UNIVERSAL FONT */
  --font-main: "Instrument Sans", sans-serif;
  --page-max: 1440px;
  --page-pad: clamp(40px, 5vw, 72px);
  --font-size-title: clamp(4rem, 5.8vw, 7rem);
  --font-size-intro: clamp(1.15rem, 1.05vw + 0.7rem, 1.65rem);
  --font-size-section: clamp(1.1rem, 0.8vw + 0.8rem, 1.6rem);
  --font-size-small: clamp(0.9rem, 0.3vw + 0.8rem, 1.2rem);
  --font-size-small2: clamp(0.88rem, 0.3vw + 0.8rem, 1.38rem);
  --font-size-contact: var(--font-size-small);
  --stage-max-height: 900px;
  --ui-radius: 18px;

  /* PAGE WIDTHS */
  --page-content-width: 900px;
  --home-content-width: var(--page-max);

  /* HOME LAYOUT CONTROLS */
  --home-page-padding-top: calc(var(--page-pad) + 20px);
  --home-page-padding-bottom: var(--page-pad);
  --home-stage-height: min(var(--stage-max-height),
      calc(100svh - var(--home-page-padding-top) - var(--home-page-padding-bottom)));
  --home-intro-max-width: 820px;
  /* Positions are relative to the 1440px home box (.composition). */
  --home-nav-top: 0%;
  --home-nav-right: 2%;
  --home-identity-left: 3%;
  --home-identity-top: 8%;
  --home-intro-left: 3.3%;
  --home-intro-top: 50%;
  --home-social-gap: 16px;
  --home-social-offset-x: 0.35em;
  --content-header-gap: 60px;

  /* HOME TYPE CONTROLS */
  --home-title-size: var(--font-size-title);
  --home-intro-size: var(--font-size-intro);
  --home-contact-size: var(--font-size-contact);
  --home-nav-size: var(--font-size-section);
  --publication-figure-offset-x: -3%;

  /* COLOR CONTROLS */

  --page-background: #F6F5F2;
  --simulation-main: #36393f;
  --simulation-dust: #838c94;
  --simulation-jet: #525761;
  --simulation-jet-spine: #3e4452;
  --simulation-core: #3e4248;
  --simulation-core-hot: #3d4148;

  --text-primary: #1B1A1A;
  --text-secondary: #676B73;

  --text-link: #486f9e;
  --text-link-hover: #214c7f;

  --text-accent-secondary: #cb5a7c;
  --text-accent-secondary-hover: #9f3558;

  /* DESIGN PAGE CARD CONTROLS */
  --card-surface: #fcfcfc;
  --card-border: oklch(0.9 0.005 60);
  --card-border-hover: oklch(0.85 0.005 60);
  --card-shadow-rest: 0 1px 2px oklch(0.3 0.02 60 / 0.04);
  --card-shadow-featured: 0 20px 40px -18px oklch(0.3 0.02 60 / 0.22);
  --card-shadow-thumb: 0 16px 32px -16px oklch(0.3 0.02 60 / 0.22);
  --card-ease: cubic-bezier(0.2, 0.8, 0.2, 1);


  /* STAR POSITION: percentages within the home stage. */
  --star-x: 65;
  --star-y: 55;
  --star-scale: 2.8;

  --transition-fast: 0.2s ease;


  /* MEMBER LOGO CONTROLS */
  --logo-humboldt-width: 100%;
  --logo-humboldt-height: 150px;
  --logo-crc-width: 85%;
  --logo-crc-height: 150px;
  --logo-crc-offset-y: -5px;
  --logo-excellence-width: 100%;
  --logo-excellence-height: 150px;
  --logo-npact-width: 75%;
  --logo-npact-height: 150px;
  --logo-npact-offset-y: -7px;
  --cv-heading-rule-gap: 18px;
  --cv-heading-rule-thickness: 2.5px;
  --career-width: calc(100% - 36px);

}

* {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
  overflow-y: scroll;
  scrollbar-gutter: stable;
}

html,
body {
  margin: 0;
  min-width: 320px;
  min-height: 100%;
  font-family: var(--font-main);
  background: var(--page-background);
}

.site-copyright {
  position: fixed;
  left: 50%;
  bottom: 10px;
  z-index: 20;
  transform: translateX(-50%);
  color: color-mix(in srgb, var(--text-primary) 30%, transparent);
  font-size: calc(var(--font-size-small) * 0.62);
  line-height: 1;
  white-space: nowrap;
  pointer-events: none;
}

.landing {
  width: 100%;
  height: 100svh;
  position: relative;
  overflow: hidden;
  padding: var(--home-page-padding-top) var(--page-pad) var(--home-page-padding-bottom);
  background: var(--page-background);
}

#ns-background {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
}

.composition {
  position: relative;
  z-index: 1;
  width: min(var(--home-content-width), 100%);
  height: var(--home-stage-height);
  margin: 0 auto;
}

.site-header {
  display: block;
}

.home-header {
  position: absolute;
  top: var(--home-nav-top);
  right: var(--home-nav-right);
  width: max-content;
  justify-content: flex-end;
  padding-bottom: 0;
}

.identity {
  position: absolute;
  left: var(--home-identity-left);
  top: var(--home-identity-top);
  width: max-content;
  max-width: 100%;
}

.identity h1,
.surname-line {
  margin: 0;
  color: var(--text-primary);
  font-size: var(--home-title-size);
  line-height: 0.82;
  letter-spacing: 0;
  font-weight: 500;
  white-space: nowrap;
}

.identity h1 span {
  display: block;
}

.surname-block {
  display: inline-block;
  width: max-content;
  max-width: 100%;
}

.contact-stack {
  margin-top: var(--home-social-gap);
  transform: translateX(var(--home-social-offset-x));
  display: block;
  font-size: var(--home-contact-size);
  white-space: nowrap;
}

.contact-separator {
  color: var(--text-secondary);
  font-size: 1em;
  line-height: 1;
}

.email-link,
.social-link {
  color: var(--text-secondary);
  font-size: var(--font-size-small2);
  font-weight: 50;
}

.email-link,
.social-link {
  text-decoration: none;
  transition: color var(--transition-fast);
}

.email-link:hover,
.social-link:hover {
  color: var(--text-primary);
}

.social-link {
  display: inline-block;
  position: relative;
}

.social-icon {
  width: 0.92em;
  height: 0.92em;
  vertical-align: -0.12em;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.social-link::after {
  content: "instagram";
  position: absolute;
  top: calc(100% + 5px);
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-secondary);
  font-size: var(--font-size-small);
  white-space: nowrap;
  opacity: 0;
  transition: opacity var(--transition-fast);
  pointer-events: none;
}

.social-link:hover::after {
  opacity: 1;
}

.intro {
  position: absolute;
  left: var(--home-intro-left);
  top: var(--home-intro-top);
  width: min(100%, var(--home-intro-max-width));
}

.intro p {
  margin: 0;
  color: var(--text-primary);
  font-size: var(--home-intro-size);
  line-height: 1.55;
  font-weight: 450;
  text-wrap: auto;
}

.intro-line {
  display: block;
  white-space: nowrap;
}

.intro-line+.intro-line {
  margin-top: 1px;
}

.intro a {
  color: var(--text-link);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.intro a:hover {
  color: var(--text-link-hover);
}

.intro .accent-secondary {
  color: var(--text-accent-secondary);
}

.intro .accent-secondary:hover {
  color: var(--text-accent-secondary-hover);
}

.copy-btn {
  background: none;
  border: none;
  cursor: pointer;
  position: relative;
  display: inline-block;
  vertical-align: -0.12em;
  width: 1.18em;
  height: 1.18em;
  padding: 0.12em;
  color: var(--text-secondary);
  font-size: var(--home-contact-size);
  transition: color var(--transition-fast);
}

.copy-icon {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.copy-btn:hover {
  color: var(--text-primary);
}

.copy-btn::after {
  content: "Copy";
  position: absolute;
  top: calc(100% + 5px);
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-primary);
  font-size: var(--font-size-small);
  white-space: nowrap;
  opacity: 0;
  transition: opacity var(--transition-fast);
  pointer-events: none;
}

.copy-btn:hover::after {
  opacity: 1;
}

.copy-btn.copied::after {
  content: "Copied";
  opacity: 1;
}

/* CV */
.cv-page .copy-btn::after {
  font-size: calc(var(--font-size-small) * 0.75);
}

.cv-page {
  min-height: 100vh;
  padding: var(--page-pad);
  color: var(--text-primary);
  background: var(--page-background);
}

.cv-sheet {
  width: min(var(--page-content-width), 100%);
  margin: 0 auto;
  container-type: inline-size;
  --cv-academic-gap: 46px;
  --cv-academic-gap-mobile: 0px;
}

.photography-page {
  height: 100vh;
  padding: 0;
  color: var(--text-primary);
  background: var(--page-background);
  overflow: hidden;
}

.photography-sheet {
  position: relative;
  width: 100%;
  height: 100%;
  margin: 0 auto;
}

.photography-sheet .cv-header {
  position: absolute;
  z-index: 4;
  top: var(--page-pad);
  left: 50%;
  width: min(var(--page-content-width), calc(100% - var(--page-pad) * 2));
  transform: translateX(-50%);
  margin: 0;
}

.photography-canvas {
  position: relative;
  width: 100vw;
  height: 100vh;
  min-height: 0;
  margin-top: 0;
  overflow: hidden;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.photography-canvas.is-dragging {
  cursor: grabbing;
}

.photography-world {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1px;
  height: 1px;
  transform-origin: 0 0;
  will-change: transform;
}

.photography-world-copy {
  position: absolute;
  left: var(--copy-x);
  top: var(--copy-y);
  width: 1px;
  height: 1px;
}

.photo-tile {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 500px;
  height: 360px;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
}

.photo-placeholder {
  width: 100%;
  height: 100%;
  background:
    linear-gradient(135deg,
      color-mix(in srgb, var(--text-primary) 10%, transparent),
      color-mix(in srgb, var(--text-link) 12%, transparent)),
    var(--page-background);
}

.photo-tile img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  box-shadow: 0 12px 34px color-mix(in srgb, var(--text-primary) 8%, transparent);
  cursor: pointer;
  /* Hidden until its bytes arrive, then faded in by the .is-loaded class so
     photos resolve out of the page background instead of popping in. */
  opacity: 0;
  transition: filter 0.15s ease, opacity var(--photo-fade-duration, 0.2s) ease-out;
  -webkit-user-drag: none;
  user-select: none;
}

.photo-tile img.is-loaded {
  opacity: 1;
}

.photo-tile img:hover {
  filter: brightness(0.88);
}

.photo-lightbox {
  position: fixed;
  z-index: 20;
  inset: 0;
  display: grid;
  place-items: center;
  padding: var(--page-pad);
  background: color-mix(in srgb, var(--page-background) 86%, transparent);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast);
}

.photo-lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

.photo-lightbox img {
  display: block;
  max-width: min(100%, 1600px);
  max-height: calc(100vh - var(--page-pad) * 2);
  width: auto;
  height: auto;
  box-shadow: 0 20px 70px color-mix(in srgb, var(--text-primary) 22%, transparent);
}

.photo-lightbox-close {
  position: fixed;
  top: var(--page-pad);
  right: var(--page-pad);
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text-primary);
  font: inherit;
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
}

/* Design */
.design-page {
  min-height: 100vh;
  padding: var(--page-pad) var(--page-pad) 96px;
  color: var(--text-primary);
  background: var(--page-background);
}

.design-sheet {
  width: min(var(--page-content-width), 100%);
  margin: 0 auto;
}

.design-hero {
  margin-top: var(--content-header-gap);
}

.design-copy {
  width: 100%;
  color: var(--text-primary);
}

.design-copy p {
  margin: 0 0 20px;
  color: var(--text-primary);
  font-size: var(--font-size-small);
  line-height: 1.5;
  font-weight: 450;
}

.design-projects {
  margin-top: 54px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 28px;
  row-gap: 28px;
}

.design-project-entry {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto 1fr;
  padding: 0;
  border: 1px solid var(--card-border);
  border-radius: 18px;
  background: var(--card-surface);
  color: inherit;
  text-decoration: none;
  overflow: hidden;
  box-shadow: var(--card-shadow-rest);
  transition: transform 0.22s var(--card-ease), box-shadow 0.22s ease, border-color 0.22s ease;
}

.design-project-entry:hover,
.design-project-entry:focus-visible {
  transform: translateY(-4px);
  border-color: var(--card-border-hover);
  box-shadow: var(--card-shadow-featured);
}

.design-project-copy {
  grid-column: 1;
  grid-row: 2;
  align-self: center;
  padding: 26px 28px 30px;
  text-align: left;
}

.design-project-copy h3 {
  margin: 0 0 8px;
  color: var(--text-primary);
  font-size: var(--font-size-section);
  line-height: 1.2;
  font-weight: 600;
}

.design-project-copy p {
  margin: 0;
  color: var(--text-secondary);
  font-size: var(--font-size-small);
  line-height: 1.55;
}

.design-project-figure {
  position: relative;
  grid-column: 1;
  grid-row: 1;
  height: 260px;
  min-height: 0;
  margin: 0;
  border-bottom: 1px solid var(--card-border);
  border-radius: 0;
  overflow: hidden;
  background: #ffffff;
}

.design-project-figure-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #ffffff;
  scale: var(--figure-scale, 100%);
  translate: var(--figure-offset-x, 0) 0;
}

.design-project-detail {
  margin-top: var(--content-header-gap);
}

.design-project-detail h1 {
  margin: 0 0 24px;
  color: var(--text-accent-secondary);
  font-size: var(--font-size-section);
  line-height: 1;
  font-weight: 650;
}

.plot-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 36px;
}

.plot-grid-item {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  padding: 18px;
  color: inherit;
  text-decoration: none;
  background: var(--card-surface);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--card-shadow-rest);
  transition: transform 0.2s var(--card-ease), box-shadow 0.2s ease, border-color 0.2s ease;
}

.plot-grid-item:hover,
.plot-grid-item:focus-visible {
  transform: translateY(-3px);
  border-color: var(--card-border-hover);
  box-shadow: var(--card-shadow-thumb);
}

.plot-grid-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: transparent;
  scale: var(--plot-scale, 100%);
  translate: var(--plot-offset-x, 0) var(--plot-offset-y, 0);
}

.plot-lightbox {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: oklch(0.2 0.01 60 / 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

.plot-lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

.plot-lightbox figure {
  margin: 0;
  display: grid;
  justify-items: center;
  gap: 18px;
}

.plot-lightbox.is-open figure {
  animation: plot-rise 0.2s var(--card-ease);
}

@keyframes plot-rise {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.plot-lightbox img {
  display: block;
  max-width: min(94vw, 1500px);
  max-height: calc(100vh - 112px);
  width: auto;
  height: auto;
  padding: 24px;
  background: var(--card-surface);
  border-radius: 14px;
  box-shadow: 0 30px 60px -20px rgb(0 0 0 / 0.5);
  cursor: pointer;
}

.plot-lightbox figcaption {
  max-width: min(100%, 900px);
  color: color-mix(in srgb, white 90%, var(--text-secondary));
  font-size: var(--font-size-small);
  line-height: 1.45;
  text-align: center;
}

.plot-lightbox figcaption .research-citation {
  color: color-mix(in srgb, white 45%, var(--text-link));
}

.plot-lightbox figcaption .research-citation:hover,
.plot-lightbox figcaption .research-citation:focus-visible {
  color: #ffffff;
}

.plot-lightbox-close {
  position: fixed;
  top: 28px;
  right: 32px;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #ffffff;
  font: inherit;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.plot-lightbox-close:hover,
.plot-lightbox-close:focus-visible {
  background: rgb(255 255 255 / 0.12);
}

.plot-lightbox-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgb(255 255 255 / 0.08);
  color: #ffffff;
  font: inherit;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.plot-lightbox-nav:hover,
.plot-lightbox-nav:focus-visible {
  background: rgb(255 255 255 / 0.18);
}

.plot-lightbox-prev {
  left: 28px;
}

.plot-lightbox-next {
  right: 28px;
}

.cv-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 40px;
  padding-bottom: 20px;
}

.cv-home {
  color: var(--text-primary);
  font-size: var(--home-nav-size);
  font-weight: 650;
  text-decoration: none;
}

.cv-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 16px 34px;
}

.cv-nav a {
  color: var(--text-secondary);
  font-size: var(--home-nav-size);
  font-weight: 500;
  text-decoration: none;
}

.cv-nav a:hover,
.cv-nav .active {
  color: var(--text-link);
}

.cv-nav a.accent-secondary:hover,
.cv-nav a.accent-secondary:focus-visible,
.cv-nav a.accent-secondary.active {
  color: var(--text-accent-secondary);
}

.cv-detail-section h2::after {
  content: "";
  width: 100%;
  height: 9px;
  background:
    radial-gradient(circle at calc(100% - 4.5px) 50%, var(--text-link) 0 4.5px, transparent 4.5px),
    linear-gradient(var(--text-link), var(--text-link)) 0 50% / calc(100% - 9px) var(--cv-heading-rule-thickness) no-repeat;
}

.cv-timeline {
  --timeline-x: 18px;
  position: relative;
  width: var(--career-width);
  margin: 0 auto -20px;
  padding-bottom: 20px;
}

.cv-timeline::before {
  content: "";
  position: absolute;
  top: 12px;
  bottom: 0;
  left: var(--timeline-x);
  width: 1px;
  background: color-mix(in srgb, var(--text-link) 45%, transparent);
}

.timeline-entry {
  position: relative;
  display: grid;
  grid-template-columns: 54px 1fr;
  padding: 0 0 28px;
}

.timeline-entry:last-child {
  padding-bottom: 0;
}

.timeline-entry:last-child::after {
  content: "";
  position: absolute;
  z-index: 2;
  top: 12px;
  bottom: -20px;
  left: calc(var(--timeline-x) - 1px);
  width: 3px;
  background: var(--page-background);
}

.timeline-node {
  position: relative;
  z-index: 3;
  width: 11px;
  height: 11px;
  margin-top: 7px;
  margin-left: calc(var(--timeline-x) - 5px);
  border: 2px solid var(--text-link);
  border-radius: 50%;
  background: var(--page-background);
  box-shadow: 0 0 0 6px var(--page-background);
}

.timeline-content {
  min-width: 0;
}

.timeline-heading {
  position: relative;
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr) max-content;
  column-gap: 6px;
  align-items: start;
}

.timeline-heading:has(.timeline-meta)::before {
  content: "";
  grid-column: 2;
  grid-row: 1;
  align-self: center;
  border-bottom: 2px dotted color-mix(in srgb, var(--text-secondary) 70%, transparent);
}

.timeline-heading> :first-child {
  display: contents;
}

.timeline-heading> :first-child h3 {
  grid-column: 1;
  grid-row: 1;
}

.timeline-heading> :first-child .timeline-role {
  grid-column: 1 / 3;
  grid-row: 2;
}

.timeline-heading>.timeline-meta {
  display: contents;
}

.timeline-heading>.timeline-meta time {
  grid-column: 3;
  grid-row: 1;
}

.timeline-heading>.timeline-meta span {
  position: absolute;
  top: 1.5em;
  right: 0;
}

.timeline-heading h3,
.timeline-heading time,
.timeline-content p {
  margin: 0;
}

.timeline-heading h3 {
  color: var(--text-primary);
  font-size: var(--font-size-small);
  line-height: 1.35;
  font-weight: 650;
}

.timeline-heading time {
  color: var(--text-primary);
  font-size: var(--font-size-small);
  line-height: 1.35;
  white-space: nowrap;
}

.timeline-meta {
  text-align: right;
}

.timeline-meta span {
  color: var(--text-primary);
  font-size: var(--font-size-small);
  white-space: nowrap;
}

.timeline-content p {
  margin-top: 4px;
  color: var(--text-secondary);
  font-size: var(--font-size-small);
  line-height: 1.5;
}

.timeline-content .timeline-role {
  color: var(--text-primary);
}

.timeline-content .timeline-role {
  margin-top: 2px;
  font-style: normal;
}

.timeline-role a {
  color: var(--text-primary);
  text-decoration: none;
}

.timeline-role a:hover {
  color: var(--text-link);
}

.cv-detail-section {
  margin-top: 46px;
}

.academic-section {
  margin-top: var(--cv-academic-gap);
}

.academic-section h2 {
  position: relative;
  z-index: 3;
}

/* Photo-header geometry is in unitless design pixels, multiplied by
   --cv-scale. The scale equals exactly 1px when the sheet is at full 900px
   width, and shrinks proportionally below that, so the whole composition
   zooms instead of breaking apart. */
.cv-photo-header {
  --cv-scale: calc(100cqw / 900);
  position: relative;
  z-index: 2;
  height: calc(90 * var(--cv-scale));
  margin-top: calc(70 * var(--cv-scale));
}

.cv-photo-rule {
  position: absolute;
  top: calc(45 * var(--cv-scale));
  height: 9px;
  z-index: 6;
}

.cv-photo-rule--left {
  left: 8%;
  width: calc(500 * var(--cv-scale));
  background:
    radial-gradient(circle at 4.5px 50%, var(--text-link) 0 4.5px, transparent 4.5px),
    radial-gradient(circle at calc(100% - 4.5px) 50%, var(--text-link) 0 4.5px, transparent 4.5px),
    linear-gradient(var(--text-link), var(--text-link)) 9px 50% / calc(100% - 18px) 2.5px no-repeat;
}

/* The photo group is anchored by its BOTTOM to the academic-career heading
   line: block bottom + academic gap + half the h2 line-height is exactly the
   line's center, so the photo rides the line at every viewport width. */
.cv-photo-group {
  display: block;
  position: absolute;
  left: calc(570 * var(--cv-scale));
  bottom: calc(-1 * var(--cv-academic-gap) - 0.5 * var(--font-size-section));
  z-index: 5;
}

.cv-header-photo {
  display: block;
  position: relative;
}

.cv-header-photo img {
  display: block;
  width: calc(240 * var(--cv-scale));
  height: auto;
  aspect-ratio: 799 / 785;
}

.cv-header-circle {
  display: block;
  position: absolute;
  opacity: 85%;
}

.cv-header-circle--1 {
  left: calc(63 * var(--cv-scale));
  top: calc(103 * var(--cv-scale));
}

.cv-header-circle--2 {
  left: calc(175 * var(--cv-scale));
  top: calc(192 * var(--cv-scale));
}

.cv-header-circle img {
  display: block;
  width: calc(55 * var(--cv-scale));
  height: auto;
}

.cv-header-circle--1 img {
  aspect-ratio: 572 / 600;
}

.cv-header-circle--2 img {
  aspect-ratio: 600 / 474;
}

.cv-photo-title {
  position: absolute;
  left: calc(8% + 500 * var(--cv-scale) / 2);
  top: calc(15 * var(--cv-scale));
  transform: translateX(-50%);
  margin: 0;
  color: var(--text-link);
  font-size: var(--font-size-section);
  line-height: 1;
  font-weight: 650;
  white-space: nowrap;
}

.cv-photo-email-row {
  position: absolute;
  left: calc(8% + 500 * var(--cv-scale) / 2);
  top: calc(55 * var(--cv-scale));
  transform: translateX(calc(-50% + 2px));
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.cv-photo-email {
  color: var(--text-secondary);
  font-size: var(--font-size-small);
  font-weight: 400;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.cv-photo-email:hover {
  color: var(--text-primary);
}

.cv-detail-section h2 {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: var(--cv-heading-rule-gap);
  margin: 0 0 22px;
  color: var(--text-link);
  font-size: var(--font-size-section);
  line-height: 1;
  font-weight: 650;
}

.cv-detail-list {
  margin: 0;
  padding: 0 0 0 54px;
  list-style: none;
}

.cv-detail-list li {
  position: relative;
  margin: 7px 0;
  color: var(--text-secondary);
  font-size: var(--font-size-small);
  line-height: 1.5;
}

.cv-detail-list li::before {
  content: "";
  position: absolute;
  top: 0.58em;
  left: -24px;
  width: 6px;
  height: 6px;
  border: 1.5px solid var(--text-link);
  border-radius: 50%;
}

.cv-detail-list strong {
  color: var(--text-primary);
  font-weight: 650;
}

.reviewer-section .cv-detail-list li {
  color: var(--text-primary);
}

.reviewer-section .cv-detail-list {
  display: grid;
  grid-template-rows: repeat(3, auto);
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  column-gap: 48px;
}

.member-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.member-logo {
  height: 118px;
  padding: 14px;
  background: #ffffff;
  border-radius: var(--ui-radius);
  display: grid;
  place-items: center;
  overflow: hidden;
  text-decoration: none;
  transition: border-color 160ms ease, transform 160ms ease;
}

.member-logo:hover,
.member-logo:focus-visible {
  transform: translateY(-1px);
}

.member-logo img {
  display: block;
  width: auto;
  height: auto;
  object-fit: contain;
}

.logo-humboldt {
  max-width: var(--logo-humboldt-width);
  max-height: var(--logo-humboldt-height);
}

.logo-crc {
  max-width: var(--logo-crc-width);
  max-height: var(--logo-crc-height);
  transform: translateY(var(--logo-crc-offset-y));
}

.logo-excellence {
  max-width: var(--logo-excellence-width);
  max-height: var(--logo-excellence-height);
}

.logo-npact {
  max-width: var(--logo-npact-width);
  max-height: var(--logo-npact-height);
  transform: translateY(var(--logo-npact-offset-y));
}

/* Publications */
.publications-page {
  min-height: 100vh;
  padding: var(--page-pad) var(--page-pad) 96px;
  color: var(--text-primary);
  background: var(--page-background);
}

.publications-shell {
  width: min(var(--page-content-width), 100%);
  margin: 0 auto;
}

.publications-heading {
  margin: var(--content-header-gap) 0 24px;
}

.publications-heading h1 {
  margin: 0;
}

.publications-heading h1 {
  color: var(--text-link);
  font-size: var(--font-size-section);
  line-height: 1;
  font-weight: 650;
}

.research-intro {
  width: 100%;
  margin-bottom: 54px;
}

.research-intro p {
  margin: 0;
  color: var(--text-primary);
  font-size: var(--font-size-small);
  line-height: 1.55;
}

.research-citation {
  color: var(--text-link);
  text-decoration: none;
  font-weight: 450;
}

.research-citation:hover,
.research-citation:focus-visible {
  color: var(--text-link-hover);
}

.research-section-heading {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  margin-bottom: 22px;
}

.research-section-heading::after {
  content: "";
  grid-column: 2;
  grid-row: 1;
  height: 1px;
  background: color-mix(in srgb, var(--text-link) 55%, transparent);
}

.research-section-heading h2,
.research-section-heading p {
  margin: 0;
}

.research-section-heading h2 {
  grid-column: 1;
  color: var(--text-link);
  font-size: var(--font-size-section);
  line-height: 1;
  font-weight: 650;
}

.research-section-heading p {
  grid-column: 3;
  color: var(--text-secondary);
  font-size: var(--font-size-small);
}

.publication-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 42px;
}

.publication-entry {
  --publication-radius: var(--ui-radius);
  scroll-margin-top: 24px;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto minmax(190px, 1fr) auto;
  align-content: start;
  gap: 0;
  margin-bottom: 42px;
  padding: 20px;
  border: 1.5px solid color-mix(in srgb, var(--text-primary) 52%, transparent);
  border-radius: var(--publication-radius);
  box-shadow: var(--card-shadow-rest);
  transition: transform 0.22s var(--card-ease), box-shadow 0.22s ease;
}

.publication-entry:hover,
.publication-entry:focus-within {
  transform: translateY(-4px);
  box-shadow: var(--card-shadow-featured);
}

.publication-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 28px;
}

.paper-figure-link {
  display: block;
  align-self: end;
  margin: 0 -20px -20px;
  color: inherit;
  text-decoration: none;
}

.paper-figure {
  position: relative;
  min-height: 0;
  aspect-ratio: 16 / 8.5;
  margin: 0;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--text-primary) 28%, transparent);
  border-width: 1px 0 0;
  border-radius: 0 0 var(--publication-radius) var(--publication-radius);
  background: #ffffff;
}

.paper-figure-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #ffffff;
  filter: grayscale(1);
  scale: var(--figure-scale, 100%);
  translate: var(--figure-offset-x, var(--publication-figure-offset-x)) 0;
  transition: filter 180ms ease;
}

.publication-entry:hover .paper-figure-image,
.publication-entry:focus-within .paper-figure-image {
  filter: grayscale(0);
}

.paper-figure.has-image::before,
.paper-figure.has-image::after {
  display: none;
}

.paper-figure::before,
.paper-figure::after {
  content: "";
  position: absolute;
  background: #d4d6dc;
}

.paper-figure::before {
  top: 16%;
  bottom: 25%;
  left: 17%;
  width: 1px;
}

.paper-figure::after {
  right: 12%;
  bottom: 25%;
  left: 17%;
  height: 1px;
}

.paper-figure figcaption {
  position: absolute;
  right: 12px;
  bottom: 9px;
  color: #686b74;
  font-size: 0.72rem;
}

.figure-axis {
  position: absolute;
  top: 22%;
  right: 14%;
  bottom: 29%;
  left: 21%;
  border-left: 1px solid #aeb2bd;
  border-bottom: 1px solid #aeb2bd;
}

.figure-mark {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--text-link);
}

.mark-a {
  top: 62%;
  left: 34%;
}

.mark-b {
  top: 43%;
  left: 55%;
}

.mark-c {
  top: 27%;
  left: 75%;
}

.figure-band {
  position: absolute;
  left: 25%;
  height: 2px;
  transform-origin: left center;
}

.band-a {
  top: 58%;
  width: 58%;
  background: #252936;
  transform: rotate(-16deg);
}

.band-b {
  top: 50%;
  width: 52%;
  background: var(--text-link);
  transform: rotate(-8deg);
}

.figure-orbit {
  position: absolute;
  top: 31%;
  left: 37%;
  border: 1px solid #555d72;
  border-radius: 50%;
}

.orbit-a {
  width: 42%;
  height: 34%;
  transform: rotate(18deg);
}

.orbit-b {
  width: 31%;
  height: 42%;
  transform: rotate(-25deg);
}

.figure-core {
  position: absolute;
  top: 45%;
  left: 56%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--text-link);
}

.figure-column {
  position: absolute;
  bottom: 25%;
  width: 10%;
  background: #707789;
}

.column-a {
  left: 27%;
  height: 24%;
}

.column-b {
  left: 43%;
  height: 39%;
  background: var(--text-link);
}

.column-c {
  left: 59%;
  height: 54%;
}

.column-d {
  left: 75%;
  height: 31%;
  background: #9aa0ad;
}

.publication-copy {
  align-self: center;
  padding: 18px 16px 20px;
}

.publication-number {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 10px;
  border: 1px solid var(--text-primary);
  border-radius: var(--publication-radius);
  color: var(--text-primary);
  font-size: var(--font-size-small);
  font-weight: 650;
  line-height: 1;
}

.publication-copy h2 {
  margin: 0;
  padding-right: 0;
  color: var(--text-primary);
  font-size: var(--font-size-section);
  line-height: 1.25;
  font-weight: 450;
}

.publication-authors {
  margin: 8px 0 0;
  font-size: var(--font-size-small);
  line-height: 1.5;
}

.publication-authors {
  color: var(--text-secondary);
}

.publication-tag {
  flex: 0 1 auto;
  padding: 5px 12px;
  border: 1px solid var(--text-accent-secondary);
  border-radius: var(--publication-radius);
  color: var(--text-accent-secondary);
  font-size: var(--font-size-small);
  line-height: 1;
  white-space: nowrap;
}

.publication-meta {
  display: grid;
  gap: 5px;
  margin: 10px 0 0;
  font-size: var(--font-size-small);
  line-height: 1.45;
}

.publication-meta a {
  color: var(--text-primary);
  text-decoration: none;
}

.publication-meta a:hover {
  color: var(--text-link);
}

.publication-journal {
  display: flex;
  flex-wrap: wrap;
  gap: 0 7px;
  color: var(--text-primary);
  font-weight: 300;
}

.publication-journal>a {
  color: var(--text-primary);
  font-weight: 300;
}

.publication-journal>a:hover {
  color: var(--text-link);
}

.publication-journal strong {
  font-weight: 600;
}

@media (max-width: 700px) {
  :root {
    --page-pad: clamp(16px, 5vw, 28px);
    --home-nav-size: clamp(0.72rem, 3.1vw, 1rem);
    --home-page-padding-top: clamp(18px, 5svh, 34px);
    --home-stage-height: calc(100svh - var(--home-page-padding-top) - var(--home-page-padding-bottom));
    --home-identity-top: 14%;
    --home-intro-top: 58%;
    --home-title-size: clamp(3.3rem, 14.5vw, 6.2rem);
    --home-intro-size: clamp(0.74rem, 2.9vw, 1.15rem);
    --home-contact-size: clamp(0.78rem, 2.8vw, 1rem);
    --mobile-simulation-snapshot: url("/mobile_bg.png");
  }

  .landing {
    height: 100svh;
    min-height: 100svh;
    overflow: hidden;
  }

  .landing::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background: var(--mobile-simulation-snapshot) center center / cover no-repeat;
  }

  #ns-background {
    display: none;
  }

  .composition {
    display: block;
    height: var(--home-stage-height);
    min-height: 0;
  }

  .home-header {
    position: absolute;
    top: var(--home-nav-top);
    left: 0;
    right: 0;
    width: 100%;
  }

  .identity {
    position: absolute;
    left: var(--home-identity-left);
    top: var(--home-identity-top);
    transform: none;
  }

  .contact-stack {
    display: block;
    white-space: nowrap;
  }

  .intro {
    position: absolute;
    left: var(--home-intro-left);
    top: var(--home-intro-top);
    transform: none;
    width: max-content;
    max-width: none;
    margin-top: 0;
  }

  .intro-line {
    white-space: nowrap;
  }

  .cv-header {
    display: flex;
    flex-wrap: nowrap;
    align-items: baseline;
    justify-content: space-between;
    gap: clamp(12px, 3vw, 20px);
  }

  .cv-home,
  .cv-nav a {
    white-space: nowrap;
  }

  .cv-nav {
    flex-wrap: nowrap;
    justify-content: flex-end;
    gap: clamp(9px, 2.6vw, 18px);
  }

  .home-header .cv-nav {
    width: 100%;
    justify-content: space-between;
    gap: 0;
  }

  .cv-timeline {
    width: 100%;
  }

  /* Dissolve the heading wrapper so name/role, description and time/place
     become siblings that can be reordered: meta goes after the description. */
  .timeline-content {
    display: flex;
    flex-direction: column;
  }

  .timeline-heading {
    display: contents;
  }

  .timeline-heading::before {
    display: none;
  }

  .timeline-heading> :first-child {
    display: block;
    order: 1;
  }

  .timeline-content>p {
    order: 2;
  }

  .timeline-heading>.timeline-meta {
    display: grid;
    order: 3;
  }

  .timeline-heading>.timeline-meta time,
  .timeline-heading>.timeline-meta span {
    position: static;
    grid-column: 1;
    grid-row: auto;
  }

  .reviewer-section .cv-detail-list {
    display: block;
  }

  .timeline-meta {
    justify-items: start;
    margin-top: 5px;
    text-align: left;
  }

  /* Mobile design pixels: --cv-scale equals exactly 1px when the sheet is
     351px wide (iPhone 390 viewport minus page padding), scaling
     proportionally on other phone widths. */
  .cv-photo-header {
    --cv-scale: calc(100cqw / 351);
    height: calc(70 * var(--cv-scale));
    display: block;
  }

  .cv-photo-title {
    left: 30%;
    top: calc(-40 * var(--cv-scale));
    transform: translateX(-50%);
    text-align: center;
  }

  .cv-photo-email-row {
    left: 30%;
    top: 0;
    transform: translateX(-50%);
    justify-content: center;
  }

  .cv-page .copy-btn {
    display: none;
  }

  .cv-photo-rule {
    top: calc(-15 * var(--cv-scale));
  }

  .cv-photo-rule--left {
    left: 0;
    width: 60%;
  }

  .academic-section {
    margin-top: var(--cv-academic-gap-mobile);
  }

  .cv-photo-group {
    left: 75%;
    bottom: calc(-1 * var(--cv-academic-gap-mobile) - 0.5 * var(--font-size-section) + 0.75px);
    transform: translateX(-50%);
  }

  .cv-header-photo img {
    width: calc(160 * var(--cv-scale));
  }

  .cv-header-circle--1 {
    left: calc(43 * var(--cv-scale));
    top: calc(69 * var(--cv-scale));
  }

  .cv-header-circle--2 {
    left: calc(120 * var(--cv-scale));
    top: calc(132 * var(--cv-scale));
  }

  .cv-header-circle img {
    width: calc(32 * var(--cv-scale));
  }

  .member-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .design-hero {
    min-height: 0;
  }

  .design-copy {
    width: 100%;
  }

  .design-projects {
    grid-template-columns: 1fr;
  }

  .plot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .plot-lightbox-nav {
    width: 40px;
    height: 40px;
    font-size: 17px;
  }

  .plot-lightbox-prev {
    left: 10px;
  }

  .plot-lightbox-next {
    right: 10px;
  }

  .plot-lightbox img {
    padding: 16px;
    max-width: calc(100vw - 2 * var(--page-pad));
  }

  .plot-lightbox-close {
    top: 14px;
    right: 14px;
  }

  .photo-tile {
    width: 320px;
    height: 230px;
  }

  .publications-heading,
  .research-section-heading,
  .design-project-entry,
  .publication-list,
  .publication-entry {
    grid-template-columns: 1fr;
  }

  .publication-list {
    justify-items: center;
  }

  .publication-entry {
    width: min(100%, 520px);
    justify-self: center;
    padding: 16px;
  }

  .paper-figure-link {
    margin: 0 -16px -16px;
  }

  .publication-copy {
    padding: 22px 10px 18px;
  }

  .publication-copy h2 {
    font-size: clamp(1.16rem, 4.9vw, 1.35rem);
    line-height: 1.22;
  }

  .publication-number,
  .publication-tag,
  .publication-authors,
  .publication-meta {
    font-size: clamp(0.86rem, 3.65vw, 1rem);
  }

  .publications-heading {
    align-items: start;
    gap: 12px;
  }

  .research-section-heading::after {
    display: none;
  }

  .research-section-heading h2,
  .research-section-heading p {
    grid-column: 1;
  }

  .paper-figure {
    min-height: 190px;
  }

  .design-project-figure {
    min-height: 0;
  }

  .publication-copy h2 {
    padding-right: 0;
  }
}

@media (max-width: 400px) {
  .publication-entry {
    transform: scale(0.94);
    transform-origin: top center;
    margin-bottom: 18px;
  }
}

@media print {
  :root {
    --page-background: #ffffff;
    --text-primary: #111111;
    --text-secondary: #444444;
    --text-link: #29448f;
  }

  .cv-page {
    padding: 0;
  }

  .cv-header {
    display: none;
  }

  .cv-sheet {
    width: 100%;
  }
}