/* Interpolate the shared palette without interrupting artwork animations. */
@property --frame { syntax: "<color>"; inherits: true; initial-value: #000; }
@property --paper { syntax: "<color>"; inherits: true; initial-value: #f5f2ea; }
@property --ink { syntax: "<color>"; inherits: true; initial-value: #1d1c19; }
@property --muted { syntax: "<color>"; inherits: true; initial-value: #676258; }
@property --rule { syntax: "<color>"; inherits: true; initial-value: rgba(29, 28, 25, .34); }
@property --accent { syntax: "<color>"; inherits: true; initial-value: #9d382c; }
@property --blue { syntax: "<color>"; inherits: true; initial-value: #34506f; }
@property --yellow { syntax: "<color>"; inherits: true; initial-value: #e8d68e; }

:root {
  color-scheme: light;
  --sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --pad: clamp(1.2rem, 3.2vw, 3.8rem);
  --frame: #000;
  --paper: #f5f2ea;
  --ink: #1d1c19;
  --muted: #676258;
  --rule: rgba(29, 28, 25, 0.34);
  --accent: #9d382c;
  --blue: #34506f;
  --yellow: #e8d68e;
  --max: 1200px;
}

@media (prefers-reduced-motion: no-preference) {
  :root.theme-ready {
    transition:
      --frame 210ms cubic-bezier(.4, 0, .2, 1),
      --paper 210ms cubic-bezier(.4, 0, .2, 1),
      --ink 210ms cubic-bezier(.4, 0, .2, 1),
      --muted 210ms cubic-bezier(.4, 0, .2, 1),
      --rule 210ms cubic-bezier(.4, 0, .2, 1),
      --accent 210ms cubic-bezier(.4, 0, .2, 1),
      --blue 210ms cubic-bezier(.4, 0, .2, 1),
      --yellow 210ms cubic-bezier(.4, 0, .2, 1);
  }

  .theme-ready .painting-card > a {
    transition: background-color 210ms cubic-bezier(.4, 0, .2, 1);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-size: 17px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.45;
  text-rendering: optimizeLegibility;
}

::selection {
  color: var(--paper);
  background: var(--blue);
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--accent);
}

a:focus-visible,
.theme-toggle:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

img {
  max-width: 100%;
}

h1,
h2,
h3,
p,
figure {
  margin-top: 0;
}

.skip-link {
  position: fixed;
  z-index: 120;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.55rem 0.7rem;
  color: var(--paper);
  background: var(--ink);
  transform: translateY(-180%);
}

.skip-link:focus {
  transform: translateY(0);
}

footer {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.065em;
  text-transform: uppercase;
}

.painting-card > a {
  display: grid;
  place-items: center;
  overflow: hidden;
}

.work-caption {
  display: grid;
  align-items: start;
  margin: 0;
  border-top: 1px solid var(--ink);
}

.gallery {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(4rem, 8vw, 8rem) var(--pad);
  border-bottom: 1px solid var(--ink);
}

.about {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(4rem, 8vw, 8rem) var(--pad);
}

.gallery-grid {
  display: grid;
}

.gallery-card {
  min-width: 0;
  margin: 0;
}

.painting-card,
.paper-card {
  display: grid;
}

.painting-card img {
  display: block;
  width: 100%;
  height: 100%;
  transition: transform 500ms cubic-bezier(0.2, 0.75, 0.2, 1), filter 180ms ease;
}

.painting-card picture {
  display: block;
  width: 100%;
  height: 100%;
}

.painting-card:hover img {
  filter: saturate(1.04);
  transform: scale(1.012);
}

/* Treat the research compositions as artwork with their own palette. */
.paper-visual {
  color-scheme: light;
  --paper: #f5f2ea;
  --ink: #1d1c19;
  --rule: rgba(29, 28, 25, 0.34);
  --accent: #9d382c;
  --blue: #34506f;
  color: var(--ink);
  position: relative;
  overflow: hidden;
  font-family: var(--mono);
  font-size: 0.7rem;
  line-height: 1.35;
}

.paper-visual small {
  font-size: 0.64rem;
  line-height: 1.35;
}

.paper-caption {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  border-top: 1px solid var(--ink);
}

.paper-caption .paper-meta {
  color: var(--accent);
  font-family: var(--mono);
}

.paper-caption h3 {
  grid-column: 1 / -1;
}

.paper-authors {
  grid-column: 1 / -1;
  color: var(--muted);
}

.paper-award {
  display: inline-block;
  color: var(--ink);
  background: var(--yellow);
}

.paper-caption > a {
  grid-column: 2;
  grid-row: 1;
  align-self: start;
  justify-self: end;
  margin: 0;
  width: max-content;
  font-family: var(--mono);
}

.paper-actions {
  align-self: start;
  font-family: var(--mono);
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.vis-agent {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  padding: 1px;
  background: var(--ink);
}

.agent-mode {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 0.7rem;
  padding: 1.2rem 0.7rem;
  text-align: center;
}

.agent-mode i {
  position: absolute;
  top: 18%;
  left: 50%;
  width: 4.5rem;
  height: 4.5rem;
  border: 1px solid var(--paper);
  border-radius: 50%;
  transform: translateX(-50%);
}

.agent-mode.preferred i::after,
.agent-mode.gain i::after {
  content: "";
  position: absolute;
  border-radius: 50%;
}

.agent-mode.preferred i::after {
  inset: 0.65rem;
}

.agent-mode.gain i::after {
  inset: 0.15rem;
}

.agent-mode span {
  text-transform: uppercase;
}

.agent-mode small {
  min-height: 2em;
  font-size: 0.62rem;
}

.agent-note {
  position: absolute;
  z-index: 2;
  top: 0.8rem;
  left: 50%;
  padding: 0.35rem 0.5rem;
  color: var(--ink);
  background: var(--paper);
  transform: translateX(-50%);
  white-space: nowrap;
  text-transform: uppercase;
}

.vis-deliberate {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-content: end;
  gap: 1rem;
  color: var(--paper);
}

.deployment-stat {
  position: relative;
  z-index: 2;
  padding-top: 0.8rem;
  border-top: 1px solid var(--paper);
}

.deployment-stat b,
.deployment-stat span {
  display: block;
}

.deployment-stat b {
  font-family: var(--sans);
  line-height: 0.9;
  letter-spacing: -0.07em;
}

.deployment-stat span {
  margin-top: 0.35rem;
  text-transform: uppercase;
}

.node-field {
  position: absolute;
  inset: 1.8rem 1.8rem 38%;
}

.node-field::before {
  content: "";
  position: absolute;
  inset: 20% 8%;
  border: 1px solid rgba(242,239,231,0.35);
  transform: rotate(8deg);
}

.node-field::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(242,239,231,0.35);
  inset: 6% 26%;
  transform: rotate(-21deg);
}

.node-field i {
  position: absolute;
  width: 1.2rem;
  height: 1.2rem;
  border: 1px solid var(--paper);
  border-radius: 50%;
  background: var(--accent);
}

.node-field i:nth-child(1) {
  left: 4%;
  top: 12%;
}

.node-field i:nth-child(2) {
  left: 24%;
  top: 38%;
  background: var(--yellow);
}

.node-field i:nth-child(3) {
  left: 46%;
  top: 8%;
}

.node-field i:nth-child(4) {
  left: 69%;
  top: 42%;
  background: var(--yellow);
}

.node-field i:nth-child(5) {
  right: 4%;
  top: 16%;
}

.node-field i:nth-child(6) {
  left: 9%;
  bottom: 2%;
  background: var(--paper);
}

.node-field i:nth-child(7) {
  left: 40%;
  bottom: 10%;
  background: var(--paper);
}

.node-field i:nth-child(8) {
  right: 26%;
  bottom: 2%;
}

.node-field i:nth-child(9) {
  right: 3%;
  bottom: 18%;
  background: var(--paper);
}

.vis-collaboration {
  display: grid;
  grid-template-columns: minmax(8rem, 0.42fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 6rem);
  align-items: stretch;
  color: var(--ink);
}

.collab-count {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid var(--ink);
  padding-right: clamp(1.5rem, 3vw, 3rem);
  text-transform: uppercase;
}

.collab-count b {
  font-family: var(--sans);
  font-weight: 400;
  color: rgba(29, 28, 25, 0.68);
  line-height: 0.75;
  letter-spacing: -0.045em;
}

.collab-count > span {
  font-size: .75rem;
}

.collab-modes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 2.5vw, 2.5rem);
}

.collab-modes > div {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2rem;
  text-transform: uppercase;
}

.collab-modes > div > span {
  font-size: .8rem;
}

.collab-modes i {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1;
  border: 1px solid var(--ink);
  /* Fractional spread keeps the intermediate weight on low-density screens. */
  box-shadow: 0 0 0 .5px var(--ink);
}

.take-glyph {
  overflow: hidden;
}

.take-glyph::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--blue);
  transform-origin: bottom;
}

.leave-glyph::after {
  content: "";
  position: absolute;
  top: 50%;
  left: -8%;
  width: 116%;
  height: 1.5px;
  background: var(--ink);
  transform: rotate(-45deg);
}

.collab-modes .fix-glyph {
  border: 0;
  box-shadow: none;
}

.fix-glyph::before,
.fix-glyph::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  box-sizing: border-box;
  border: 1px solid var(--ink);
  box-shadow: 0 0 0 .5px var(--ink);
}

.fix-glyph::before {
  left: 0;
  border-right: 0;
  background: var(--accent);
}

.fix-glyph::after {
  right: 0;
}

.other-papers {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(4rem, 7vw, 7rem) var(--pad);
  border-bottom: 1px solid var(--ink);
}

.papers-head {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
}

.papers-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
}

.papers-head > a {
  padding-bottom: 0.25rem;
}

.publication-list {
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--ink);
  list-style: none;
}

.publication-item {
  display: grid;
  gap: 0.8rem clamp(1rem, 2vw, 2rem);
  align-items: baseline;
  border-bottom: 1px solid var(--rule);
}

.publication-item > time {
  color: var(--accent);
}

.publication-main {
  display: contents;
}

.publication-main h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
}

.publication-main > p {
  margin: 0;
  color: var(--muted);
}

.author-self {
  color: var(--ink);
  font-weight: 700;
}

.publication-venue {
  margin: 0;
  text-align: right;
}

.about {
  display: block;
}

@media (max-width: 720px) {
  :root {
    --pad: 1rem;
  }

  .vis-collaboration {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .collab-count {
    flex-direction: row;
    align-items: end;
    border-right: 0;
    border-bottom: 1px solid var(--ink);
    padding: 0 0 1rem;
  }

  .papers-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .publication-item {
    gap: 0.8rem 1rem;
  }

  .publication-main,
  .publication-venue {
    grid-column: 2;
  }

  .publication-main {
    display: block;
  }

  .publication-main > p {
    margin-top: 0.55rem;
  }

  .publication-venue {
    padding-top: 0;
    text-align: left;
  }

}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .painting-card img {
    transition: none;
  }
}

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max);
  min-height: 5.2rem;
  margin: 0 auto;
  padding: 0 var(--pad);
  border-top: 3px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.masthead h1 {
  max-width: none;
  margin: 0;
  font-family: var(--sans);
  font-size: clamp(1.85rem, 2.9vw, 2.5rem);
  font-weight: 750;
  line-height: 0.92;
  letter-spacing: -0.055em;
  text-transform: uppercase;
  white-space: nowrap;
}

.theme-toggle {
  --flame-near: 0;
  position: relative;
  display: inline-block;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  vertical-align: baseline;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.theme-toggle::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: max(100%, 44px);
  height: max(100%, 44px);
  transform: translate(-50%, -50%);
}

.theme-toggle:disabled {
  cursor: default;
}

.theme-toggle svg {
  position: absolute;
  bottom: calc(.85cap + .11em);
  left: calc(50% + .0275em);
  display: block;
  width: .48em;
  height: .40em;
  overflow: visible;
  transform: translateX(-50%);
}

.theme-stem {
  display: inline-block;
  transform: scaleY(.85);
  transform-origin: center .8em;
}

.theme-flame,
.theme-moon {
  transform-origin: 12px 17px;
  transition:
    opacity 240ms ease,
    transform 210ms cubic-bezier(.2, .65, .25, 1),
    filter 320ms ease;
}

.theme-flame {
  fill: #bd5138;
  opacity: 1;
  transform: translateY(0) scale(1);
  animation: flame-warmth 6.4s ease-in-out infinite;
}

.theme-moon {
  fill: #d9bb79;
  opacity: 0;
  transform: translateY(1px) scale(.94);
  animation: moon-warmth 4.8s ease-in-out infinite;
}

.theme-toggle[aria-pressed="true"] .theme-flame {
  opacity: 0;
  transform: translateY(.8px) scale(.9, .94);
}

.theme-toggle[aria-pressed="true"] .theme-moon {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.theme-toggle[aria-pressed="false"] .theme-flame,
.theme-toggle[aria-pressed="true"] .theme-moon {
  transition:
    opacity 480ms ease 90ms,
    transform 620ms cubic-bezier(.2, .65, .25, 1) 90ms,
    filter 320ms ease;
}

.theme-toggle:is(:hover, :focus-visible) {
  --flame-near: 1;
}

.theme-toggle:is(:hover, :focus-visible) .theme-moon {
  filter: brightness(1.3);
}

@keyframes flame-warmth {
  0%, 100% {
    fill: color-mix(in srgb, #bd5138, #292420 calc(var(--flame-near) * 100%));
  }
  23% {
    fill: color-mix(in srgb, #c25e3b, #6f4a38 calc(var(--flame-near) * 100%));
  }
  48% {
    fill: color-mix(in srgb, #cb7040, #332a24 calc(var(--flame-near) * 100%));
  }
  64% {
    fill: color-mix(in srgb, #c86a3e, #79513c calc(var(--flame-near) * 100%));
  }
  86% {
    fill: color-mix(in srgb, #bf5539, #3d3028 calc(var(--flame-near) * 100%));
  }
}

@keyframes moon-warmth {
  0%, 100% { fill: #d9bb79; }
  50% { fill: #e4cd94; }
}

@media (prefers-reduced-motion: reduce) {
  .theme-toggle[aria-pressed] .theme-flame,
  .theme-toggle[aria-pressed] .theme-moon {
    animation: none;
    transition: none;
  }

  .theme-toggle:is(:hover, :focus-visible) .theme-flame {
    fill: #49352b;
  }
}

.masthead-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-size: .72rem;
  letter-spacing: .025em;
}

.masthead-links a {
  color: var(--muted);
  transition: color 160ms ease;
}

.masthead-links a:hover,
.masthead-links a:focus-visible {
  color: var(--ink);
}

.masthead-links svg {
  display: none;
  width: 1.25rem;
  height: 1.25rem;
}

@media (max-width: 720px) {
  .masthead-links {
    gap: .25rem;
  }

  .masthead-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    text-decoration: none;
  }

  .masthead-link-label {
    display: none;
  }

  .masthead-links svg {
    display: block;
  }
}

@media (max-width: 600px) {
  .masthead {
    flex-wrap: wrap;
    gap: 0.9rem;
    padding-top: 1rem;
    padding-bottom: 1rem;
  }
}

.gallery {
  padding-top: clamp(1.75rem, 4vw, 3.5rem);
  padding-bottom: clamp(4rem, 8vw, 7rem);
  border-top: 0;
  background: transparent;
  scroll-margin-top: 0;
}

.gallery-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(2.6rem, 4.6vw, 4.45rem) clamp(1.5rem, 3vw, 2.75rem);
  align-items: start;
}

.gallery-card {
  grid-column: auto;
  min-height: 0;
  height: auto;
  border: 0;
  background: transparent;
}

.painting-card,
.paper-card,
.gif-card {
  grid-template-rows: auto auto;
  align-content: start;
}

.painting-card > a,
.gif-card > a,
.paper-visual {
  width: 100%;
  aspect-ratio: 1 / 1;
  min-height: 0;
  border: 1px solid var(--frame);
  background: #e5e0d6;
}

.painting-card img {
  object-fit: contain;
}

.work-caption {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.18rem 0.8rem;
  min-height: 0;
  padding: 0.78rem 0 0;
  border: 0;
  background: transparent;
  font-family: var(--sans);
  font-size: 0.76rem;
  line-height: 1.45;
}

.work-caption strong {
  grid-column: 1 / -1;
  grid-row: 2;
  font-family: var(--sans);
  font-size: clamp(1.32rem, 1.9vw, 1.7rem);
  font-weight: 650;
  line-height: 1.08;
  letter-spacing: -0.025em;
}

.work-meta {
  grid-column: 1;
  grid-row: 1;
  color: var(--accent);
  font-size: 0.68rem;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.work-link,
.work-links {
  grid-column: 2;
  grid-row: 1;
  align-self: start;
  justify-self: end;
  font-family: var(--sans);
  font-size: 0.68rem;
  letter-spacing: 0.035em;
  white-space: nowrap;
}

.work-links {
  display: flex;
  gap: 0.7rem;
}

.paper-visual {
  padding: clamp(1rem, 2.3vw, 1.7rem);
}

.paper-caption {
  gap: 0.18rem 0.8rem;
  min-height: 0;
  padding: 0.78rem 0 0;
  border: 0;
  background: transparent;
}

.paper-caption .paper-meta,
.paper-caption > a,
.paper-actions {
  font-size: 0.68rem;
  letter-spacing: 0.035em;
  text-transform: none;
}

.paper-caption h3 {
  max-width: 25ch;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.18rem, 1.7vw, 1.5rem);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.025em;
}

.paper-authors {
  margin: 0;
  font-family: var(--sans);
  font-size: 0.73rem;
  line-height: 1.5;
}

.paper-actions {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  gap: 0.65rem;
  margin: 0;
  white-space: nowrap;
}

.paper-award {
  margin-left: 0.25rem;
  padding: 0.08rem 0.25rem;
}

.author-self {
  padding: 0.03rem 0.18rem;
  background: color-mix(in srgb, var(--yellow) 72%, transparent);
}

.vis-agent {
  color: var(--ink);
}

.agent-mode {
  background: #d8ded7;
}

.agent-mode:nth-child(2) {
  background: #e3ded2;
}

.agent-mode:nth-child(3) {
  background: #d7c0b5;
}

.agent-mode i {
  border-color: var(--ink);
}

.agent-mode.preferred i::after,
.agent-mode.gain i::after {
  background: var(--accent);
}

.vis-deliberate {
  background: #293b50;
}

.deployment-stat b {
  font-size: clamp(2.2rem, 4.5vw, 3.7rem);
}

.vis-collaboration {
  background: #d9c3a6;
}

.collab-count b {
  font-size: clamp(2.5rem, 4.6vw, 3.5rem);
}

.other-papers {
  padding-top: clamp(3rem, 5vw, 4.5rem);
  padding-bottom: clamp(3rem, 5vw, 4.5rem);
  scroll-margin-top: 0;
}

.papers-head {
  align-items: baseline;
  margin-bottom: 1.4rem;
}

.papers-head h2 {
  font-size: clamp(1.35rem, 2vw, 1.7rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.papers-head > a,
.publication-item > time,
.publication-main > p,
.publication-venue {
  font-family: var(--sans);
  font-size: 0.75rem;
  letter-spacing: 0.02em;
}

.papers-head > a,
.publication-venue {
  text-transform: none;
}

.publication-item {
  grid-template-columns: 3.5rem minmax(16rem, 1.45fr) minmax(14rem, 1fr) 6.5rem;
  padding: 0.85rem 0;
}

.publication-venue {
  justify-self: end;
  white-space: nowrap;
}

.publication-main h3 {
  font-size: 1rem;
  line-height: 1.3;
}

.publication-main > p {
  line-height: 1.45;
}

.about {
  padding-top: clamp(3.5rem, 7vw, 6rem);
  padding-bottom: clamp(3.5rem, 7vw, 6rem);
  border-bottom: 0;
  scroll-margin-top: 0;
}

.about-copy {
  display: grid;
  grid-template-columns: minmax(13rem, 0.65fr) minmax(0, 1.35fr);
  gap: 0 clamp(3rem, 7vw, 7rem);
  max-width: none;
}

.about-portrait {
  grid-column: 1;
  grid-row: 1 / span 3;
  margin: 0 auto;
  width: min(100%, 13rem);
}

.portrait-toggle {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  perspective: 800px;
  transition: transform 350ms ease, filter 350ms ease;
  -webkit-tap-highlight-color: transparent;
}

.portrait-toggle:enabled {
  cursor: pointer;
}

.portrait-toggle:enabled:is(:hover, :focus-visible) {
  transform: rotate(-2deg) scale(1.025);
  filter: drop-shadow(0 5px 9px rgba(29, 28, 25, .12));
}

.portrait-toggle:enabled:active {
  transform: rotate(1deg) scale(.985);
}

.portrait-toggle:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 6px;
}

.portrait-flipper {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transform: rotateY(0deg);
  transition: transform 850ms cubic-bezier(.2, .65, .25, 1);
}

.portrait-toggle[aria-pressed="true"] .portrait-flipper {
  transform: rotateY(540deg);
}

.about-portrait img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 50%;
  object-fit: cover;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.portrait-back {
  transform: rotateY(180deg);
}

@media (prefers-reduced-motion: reduce) {
  .portrait-toggle,
  .portrait-flipper {
    transition: none;
  }

  .portrait-toggle:enabled:is(:hover, :focus-visible, :active) {
    transform: none;
  }
}

.about-copy p {
  grid-column: 2;
  max-width: 45rem;
  margin-bottom: 1rem;
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.55;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: baseline;
  justify-content: space-between;
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.1rem var(--pad) 2rem;
  border-top: 1px solid var(--ink);
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.025em;
}

.site-footer p {
  margin: 0;
}

.back-to-top {
  display: inline-block;
  margin: 0;
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.025em;
}

@media (max-width: 980px) {
  .publication-item {
    grid-template-columns: 3.5rem minmax(14rem, 1.35fr) minmax(12rem, 1fr) 5.5rem;
  }
}

@media (max-width: 720px) {
  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 2.6rem;
  }

  .gallery-card,
  .painting-card,
  .paper-card,
  .gif-card {
    grid-column: 1;
    grid-template-rows: auto auto;
  }

  .painting-card > a,
  .gif-card > a,
  .paper-visual {
    min-height: 0;
    aspect-ratio: 1 / 1;
  }

  .publication-item {
    grid-template-columns: 3.25rem minmax(0, 1fr);
  }

  .about-copy {
    display: block;
  }

  .about-portrait {
    width: min(42vw, 10rem);
    margin-bottom: 2rem;
  }

  .paper-actions {
    grid-column: 1 / -1;
    grid-row: auto;
    justify-self: start;
    flex-wrap: wrap;
    margin-top: 0.2rem;
    white-space: normal;
  }
}

.vis-agent .agent-mode > span {
  font-size: .8rem;
  letter-spacing: .025em;
}

.vis-agent .agent-mode > small {
  font-size: .7rem;
}

.vis-agent .agent-note {
  font-size: .75rem;
  letter-spacing: .025em;
}

.vis-agent .preferred i::after {
  animation: advisor-emphasis 10s ease-in-out infinite;
}

.vis-agent .gain i::after {
  animation: delegate-emphasis 10s ease-in-out infinite;
}

.vis-agent .preferred > small {
  animation: advisor-label 10s ease-in-out infinite;
}

.vis-agent .gain > small {
  animation: delegate-label 10s ease-in-out infinite;
}

.vis-agent .agent-mode i::after,
.vis-agent .agent-mode > small {
  animation-play-state: paused;
}

.vis-agent.in-view .agent-mode i::after,
.vis-agent.in-view .agent-mode > small,
.in-view .vis-agent .agent-mode i::after,
.in-view .vis-agent .agent-mode > small {
  animation-play-state: running;
}

.motion-paused .vis-agent .agent-mode i::after,
.motion-paused .vis-agent .agent-mode > small {
  animation-play-state: paused;
}

@keyframes advisor-emphasis {
  0%,35%,100% { opacity: 1; } 50%,85% { opacity: .04; }
}

@keyframes delegate-emphasis {
  0%,35%,100% { opacity: .04; } 50%,85% { opacity: 1; }
}

@keyframes advisor-label {
  0%,35%,100% { color: #1d1c19; opacity: 1; }
  50%,85% { color: #1d1c19; opacity: .18; }
}

@keyframes delegate-label {
  0%,35%,100% { color: #1d1c19; opacity: .18; }
  50%,85% { color: #1d1c19; opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .vis-agent .agent-mode i::after,
  .vis-agent .agent-mode > small {
    animation: none;
  }
}
