:root {
  --paper: #fcfcf9;
  --paper-deep: #f0f1eb;
  --surface: #f6f7f2;
  --ink: #252c28;
  --ink-soft: #555e58;
  --muted: #70786f;
  --line: #e2e5dd;
  --accent: #376451;
  --accent-dark: #284a3c;
  --accent-pale: #edf2eb;
  --white: #ffffff;
  --header-background: rgba(252, 252, 249, 0.95);
  --serif: Georgia, "Times New Roman", serif;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --page: 1000px;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --paper: #151a17;
  --paper-deep: #1a211d;
  --surface: #1d2521;
  --ink: #edf1ed;
  --ink-soft: #bec8c0;
  --muted: #8e9a92;
  --line: #303b35;
  --accent: #628f78;
  --accent-dark: #9bc8b1;
  --accent-pale: #202e27;
  --header-background: rgba(21, 26, 23, 0.94);
  color-scheme: dark;
}

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

html {
  min-height: 100%;
  background: var(--paper);
  scroll-behavior: smooth;
}

body {
  display: flex;
  min-height: 100vh;
  min-height: 100svh;
  flex-direction: column;
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: color 180ms ease, background-color 180ms ease;
}

main {
  flex: 1 0 auto;
}

img {
  display: block;
  max-width: 100%;
}

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

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

::selection {
  color: var(--white);
  background: var(--accent);
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.7rem 1rem;
  color: var(--white);
  background: var(--ink);
  transform: translateY(-160%);
}

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

.page-shell,
.nav-shell {
  width: min(calc(100% - 3rem), var(--page));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  border-bottom: 1px solid var(--line);
  background: var(--header-background);
  backdrop-filter: blur(16px);
  transition: background-color 180ms ease, border-color 180ms ease;
}

.nav-shell {
  display: flex;
  min-height: 84px;
  align-items: stretch;
  justify-content: space-between;
  gap: 2rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  text-decoration: none;
  white-space: nowrap;
}

.wordmark-mark {
  display: grid;
  width: 2.25rem;
  height: 2.25rem;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--accent);
  background: transparent;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
}

.site-nav {
  display: flex;
  align-items: stretch;
  overflow-x: auto;
  scrollbar-width: none;
}

.theme-toggle {
  position: relative;
  display: grid;
  width: 2.25rem;
  height: 2.25rem;
  flex: 0 0 auto;
  align-self: center;
  margin-left: 0.65rem;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink-soft);
  background: var(--surface);
  cursor: pointer;
  font: inherit;
  transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
  transform: rotate(8deg);
}

.theme-toggle-icon {
  position: absolute;
  font-size: 1rem;
  line-height: 1;
  transition: opacity 160ms ease, transform 180ms ease;
}

.theme-toggle-sun {
  opacity: 0;
  transform: rotate(-45deg) scale(0.7);
}

:root[data-theme="dark"] .theme-toggle-moon {
  opacity: 0;
  transform: rotate(45deg) scale(0.7);
}

:root[data-theme="dark"] .theme-toggle-sun {
  opacity: 1;
  transform: rotate(0) scale(1);
}

.site-nav::-webkit-scrollbar {
  display: none;
}

.nav-link {
  position: relative;
  display: grid;
  min-width: max-content;
  padding: 0 1.15rem;
  place-items: center;
  color: var(--ink-soft);
  font-size: 0.86rem;
  font-weight: 500;
  letter-spacing: 0;
  text-decoration: none;
}

.nav-link::after {
  position: absolute;
  right: 1.15rem;
  bottom: -1px;
  left: 1.15rem;
  height: 2px;
  background: var(--accent);
  content: "";
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}

.nav-link:hover,
.nav-link:focus-visible,
.nav-link.active {
  color: var(--ink);
}

.nav-link:hover::after,
.nav-link:focus-visible::after,
.nav-link.active::after {
  transform: scaleX(1);
}

.home-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: clamp(3rem, 6vw, 5.5rem);
  padding-block: clamp(3rem, 6vw, 5rem) 4rem;
}

.profile-rail {
  align-self: start;
}

.portrait-frame {
  position: relative;
  width: 168px;
  max-width: 100%;
  aspect-ratio: 1 / 1;
  margin-inline: auto;
  margin-bottom: 1.5rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--accent-pale);
}

.portrait-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: auto;
}

.profile-heading {
  padding-bottom: 1.4rem;
  border-bottom: 1px solid var(--line);
}

.profile-name {
  margin-bottom: 0.25rem;
  font-size: 1.12rem;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.profile-role {
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: 0.84rem;
}

.profile-details {
  margin-bottom: 1.25rem;
}

.profile-details > div {
  display: grid;
  align-content: start;
  grid-template-columns: 1fr;
  gap: 0.55rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--line);
}

.profile-details dt {
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.profile-details dd {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.84rem;
  line-height: 1.55;
}

.profile-details ul {
  margin: 0;
  padding-left: 1rem;
}

.profile-details li + li {
  margin-top: 0.35rem;
}

.profile-details li::marker {
  color: var(--accent);
  font-size: 0.7em;
}

.profile-links {
  display: grid;
  gap: 0.1rem;
}

.profile-links a {
  display: grid;
  grid-template-columns: 1.9rem 1fr auto;
  align-items: center;
  gap: 0.7rem;
  padding: 0.45rem 0;
  color: var(--ink-soft);
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: none;
}

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

.profile-link-mark {
  display: grid;
  width: 1.8rem;
  height: 1.8rem;
  place-items: center;
  border-radius: 5px;
  background: var(--surface);
  font-family: var(--serif);
  font-size: 0.78rem;
}

.profile-link-mark-in {
  font-family: var(--sans);
  font-size: 0.64rem;
  font-weight: 800;
}

.profile-link-mark-cv {
  font-family: var(--sans);
  font-size: 0.57rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

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

.hero {
  max-width: 640px;
  padding-top: 0.35rem;
}

.eyebrow,
.section-kicker {
  color: var(--accent-dark);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 1.35rem;
}

.eyebrow span {
  width: 1.6rem;
  height: 2px;
  background: var(--accent);
}

.hero h1,
.page-intro h1,
.not-found h1 {
  margin-bottom: 1.4rem;
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1.04;
}

.hero h1 {
  margin-bottom: 2rem;
  font-size: clamp(2.2rem, 3.2vw, 2.8rem);
}

.page-intro h1,
.not-found h1 {
  max-width: 16ch;
  font-size: clamp(2.2rem, 3.5vw, 3rem);
}

.hero-copy {
  margin-bottom: 1.25rem;
  color: var(--ink-soft);
  font-size: 1.0625rem;
  line-height: 1.85;
  hyphens: auto;
  text-align: justify;
}

.hero-actions {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.72rem 1.2rem;
  border: 1px solid transparent;
  border-radius: 5px;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0;
  text-decoration: none;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  color: var(--white);
  background: var(--accent);
}

.button-primary:hover {
  background: var(--accent-dark);
}

.button-secondary {
  border-color: var(--line);
  color: var(--ink);
  background: transparent;
}

.button-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-pale);
}

.button-light {
  color: var(--ink);
  background: var(--white);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2rem;
}

.section-kicker {
  margin-bottom: 0.25rem;
}

.section-heading h2,
.notes-empty h2 {
  margin-bottom: 0;
  font-family: var(--serif);
  font-size: clamp(1.65rem, 3vw, 2.25rem);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.section-index {
  color: var(--muted);
  font-family: var(--serif);
  font-size: 0.8rem;
}

.recent-section {
  padding-bottom: 2rem;
}

.home-publications {
  max-width: 640px;
  margin-top: clamp(3rem, 6vw, 4.5rem);
  padding-top: clamp(2rem, 4vw, 3rem);
  border-top: 1px solid var(--line);
}

.text-link {
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 750;
  text-decoration: none;
}

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

.publication-preview-list {
  border-top: 1px solid var(--ink);
}

.publication-preview {
  display: grid;
  grid-template-columns: 4rem minmax(0, 1fr) 2rem;
  gap: 1.2rem;
  padding: 1.6rem 0;
  border-bottom: 1px solid var(--line);
}

.publication-year {
  padding-top: 0.2rem;
  color: var(--accent);
  font-family: var(--serif);
  font-size: 0.92rem;
}

.publication-type {
  margin-bottom: 0.3rem;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.publication-preview h3 {
  max-width: 800px;
  margin-bottom: 0.5rem;
  font-family: var(--serif);
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  line-height: 1.35;
}

.publication-preview h3 a {
  text-decoration: none;
}

.publication-preview h3 a:hover {
  color: var(--accent);
}

.publication-preview p:last-child {
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: 0.82rem;
}

.publication-arrow {
  align-self: center;
  color: var(--muted);
  font-size: 1.1rem;
  text-decoration: none;
}

.publication-arrow:hover {
  color: var(--accent);
}

.inner-page {
  padding-block: clamp(3rem, 6vw, 5rem) 4rem;
}

.page-intro {
  margin-bottom: clamp(3rem, 6vw, 4rem);
}

.page-intro h1 {
  max-width: 15ch;
}

.page-intro > p:last-child,
.publications-intro > div > p:last-child {
  max-width: 680px;
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: clamp(1.05rem, 1.7vw, 1.25rem);
  line-height: 1.75;
}

.publication-record,
.upcoming-topics {
  margin-bottom: clamp(3rem, 6vw, 5rem);
}

.publications-intro {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 3rem;
}

.publications-intro h1 {
  margin-bottom: 1.4rem;
}

.scholar-button {
  flex: 0 0 auto;
  margin-bottom: 0.45rem;
}

.record-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 2rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid var(--line);
}

.record-heading h2 {
  margin-bottom: 0;
  font-family: var(--serif);
  font-size: clamp(1.65rem, 3vw, 2.25rem);
  font-weight: 500;
  letter-spacing: -0.04em;
}

.record-heading p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.75rem;
}

.full-publication {
  display: grid;
  grid-template-columns: 3.5rem minmax(200px, 260px) minmax(0, 1fr);
  align-items: start;
  gap: 2rem;
  padding: clamp(2rem, 5vw, 3.5rem) 0;
  border-bottom: 1px solid var(--line);
}

.full-publication-year {
  color: var(--accent);
  font-family: var(--serif);
  font-size: 1.4rem;
}

.publication-figure {
  display: grid;
  min-height: 190px;
  margin: 0;
  padding: 0.8rem;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
}

.publication-figure img {
  width: 100%;
  max-height: 220px;
  object-fit: contain;
}

.publication-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1rem;
  margin-bottom: 0.65rem;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.full-publication-content h3 {
  max-width: 34ch;
  margin-bottom: 0.8rem;
  font-family: var(--serif);
  font-size: clamp(1.3rem, 2.3vw, 1.6rem);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.2;
}

.full-publication-content h3 a {
  text-decoration: none;
}

.full-publication-content h3 a:hover {
  color: var(--accent);
}

.authors {
  margin-bottom: 0.9rem;
  color: var(--ink-soft);
  font-size: 0.88rem;
}

.authors strong {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 0.2em;
}

.publication-summary {
  max-width: 720px;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.publication-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
}

.publication-actions a {
  color: var(--accent-dark);
  font-size: 0.76rem;
  font-weight: 750;
  text-decoration: none;
}

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

.notes-intro {
  max-width: 820px;
}

.notes-empty {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 6rem);
  margin-bottom: clamp(3rem, 6vw, 5rem);
  padding: clamp(2rem, 6vw, 4rem);
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.notes-empty h2 {
  margin-bottom: 1rem;
}

.notes-empty > div:last-child > p:last-child {
  max-width: 630px;
  margin-bottom: 0;
  color: var(--ink-soft);
}

.notes-orbit {
  position: relative;
  width: 210px;
  height: 210px;
  border: 1px solid var(--ink);
  border-radius: 50%;
}

.notes-orbit::before,
.notes-orbit::after {
  position: absolute;
  border: 1px solid var(--line);
  border-radius: 50%;
  content: "";
}

.notes-orbit::before {
  inset: 2rem;
}

.notes-orbit::after {
  inset: 4rem;
  border-color: var(--accent);
}

.notes-orbit span {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  transform: translate(-50%, -50%);
  box-shadow: 0 -73px 0 0 var(--ink), 55px 31px 0 -2px var(--accent);
}

.topic-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--ink);
}

.topic-list article {
  padding: 1.6rem 1.5rem 1rem;
  border-right: 1px solid var(--line);
}

.topic-list article:first-child {
  padding-left: 0;
}

.topic-list article:last-child {
  padding-right: 0;
  border-right: 0;
}

.topic-list span {
  display: block;
  margin-bottom: 3rem;
  color: var(--accent);
  font-family: var(--serif);
  font-size: 0.8rem;
}

.topic-list h3 {
  margin-bottom: 0.6rem;
  font-family: var(--serif);
  font-size: 1.3rem;
}

.topic-list p {
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: 0.88rem;
}

.not-found {
  min-height: calc(100vh - 76px);
  padding-block: clamp(5rem, 12vw, 10rem);
}

.not-found h1 {
  max-width: 11ch;
}

.not-found > p:nth-of-type(2) {
  margin-bottom: 2rem;
  color: var(--ink-soft);
  font-size: 1.1rem;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

/* Markdown notes share the site's typography with a wider reading column. */
.note-page {
  max-width: 880px;
}

.note-intro {
  padding-bottom: 2rem;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--line);
}

.note-intro h1 {
  max-width: none;
  overflow-wrap: anywhere;
}

.note-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.note-draft {
  padding: 0.12rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 0.68rem;
}

.note-body {
  color: var(--ink-soft);
  font-size: 1.0625rem;
  line-height: 1.85;
  overflow-wrap: anywhere;
}

.note-body > * {
  min-width: 0;
}

.note-body h2,
.note-body h3,
.note-body h4,
.note-list-item h2 {
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.025em;
}

.note-body h2 {
  margin-top: 2.5rem;
  font-size: 1.9rem;
}

.note-body h3 {
  margin-top: 2rem;
  font-size: 1.45rem;
}

.note-body h4 {
  font-size: 1.2rem;
}

.note-body img {
  max-height: 720px;
  height: auto;
  margin: 2rem auto;
  border-radius: 6px;
  object-fit: contain;
}

.note-body pre,
.note-table {
  max-width: 100%;
  overflow-x: auto;
}

.note-body pre {
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  font-size: 0.85rem;
  line-height: 1.65;
}

.note-body code {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.88em;
}

.note-body :not(pre) > code {
  padding: 0.12rem 0.3rem;
  border-radius: 3px;
  background: var(--surface);
}

.note-body blockquote {
  margin-inline: 0;
  padding-left: 1.5rem;
  border-left: 2px solid var(--accent);
}

.mermaid-figure {
  margin: 2.25rem 0;
}

.note-body pre.mermaid {
  display: grid;
  min-height: 9rem;
  padding: clamp(1rem, 3vw, 2rem);
  place-items: center;
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink);
  font-size: 0.85rem;
  line-height: 1.55;
  white-space: pre-wrap;
}

.note-body pre.mermaid svg {
  width: auto;
  max-width: 100%;
  height: auto;
}

.note-body pre.mermaid-error {
  place-items: start;
  border-color: var(--accent);
}

.mermaid-source {
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.mermaid-source summary {
  width: fit-content;
  cursor: pointer;
}

.mermaid-source summary:hover {
  color: var(--accent-dark);
}

.mermaid-source pre {
  margin-top: 0.75rem;
}

.note-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.note-body th,
.note-body td {
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.note-list {
  max-width: 880px;
}

.note-list-item {
  padding-block: 2rem;
  border-top: 1px solid var(--line);
}

.note-list-item h2 {
  margin-bottom: 0.65rem;
  font-size: 1.75rem;
}

.note-list-item h2 a {
  text-decoration: none;
}

.note-list-item h2 a:hover {
  color: var(--accent);
}

.note-list-item > p:not(.note-meta),
.note-empty-message {
  color: var(--ink-soft);
}

/* Mathematical notation and the reading-width typesetting preview. */
.katex {
  font-size: 1.08em;
}

.note-body .katex,
.math-preview .katex {
  color: var(--ink);
  font-size: 1.14em;
}

.katex-display {
  max-width: 100%;
  margin: 1.5rem 0;
  padding: 0.75rem 0.25rem;
  overflow-x: auto;
  overflow-y: hidden;
}

.math-preview {
  max-width: 720px;
}

.math-preview .page-intro h1 {
  max-width: none;
}

.math-back {
  display: inline-block;
  margin-bottom: 2.5rem;
  color: var(--muted);
  font-weight: 500;
}

.math-example {
  min-width: 0;
  padding-block: 2.25rem;
  border-top: 1px solid var(--line);
}

.math-example h2 {
  margin-bottom: 1rem;
  font-family: var(--serif);
  font-size: clamp(1.4rem, 3vw, 1.8rem);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.25;
}

.math-example > p:not(.section-kicker) {
  color: var(--ink-soft);
  line-height: 1.85;
}

.math-example-equation,
.note-body .math.block {
  min-width: 0;
  margin-block: 1.5rem;
  padding-inline: clamp(0.5rem, 2vw, 1.5rem);
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.note-body .math.block.math-unframed {
  border: 0;
  border-radius: 0;
  background: transparent;
}

.math-source {
  margin-top: 1.5rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.math-source summary {
  width: fit-content;
  cursor: pointer;
}

.math-source summary:hover {
  color: var(--accent);
}

.math-source pre {
  padding: 1rem;
  overflow-x: auto;
  border-radius: 6px;
  color: var(--ink-soft);
  background: var(--surface);
  line-height: 1.7;
  tab-size: 2;
}

.math-source code {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

@media (max-width: 900px) {
  .page-shell,
  .nav-shell {
    width: min(calc(100% - 2rem), var(--page));
  }

  .home-layout {
    grid-template-columns: 195px minmax(0, 1fr);
    gap: 2.5rem;
  }

  .profile-details > div {
    grid-template-columns: 1fr;
    gap: 0.55rem;
  }

  .topic-list {
    grid-template-columns: 1fr;
  }

  .topic-list article,
  .topic-list article:first-child,
  .topic-list article:last-child {
    min-height: auto;
    padding: 1.5rem 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .topic-list span {
    margin-bottom: 1rem;
  }

  .notes-empty {
    grid-template-columns: 180px minmax(0, 1fr);
  }

  .notes-orbit {
    width: 160px;
    height: 160px;
  }

  .full-publication {
    grid-template-columns: 3.5rem minmax(180px, 220px) minmax(0, 1fr);
    gap: 1.5rem;
  }
}

@media (max-width: 700px) {
  .site-header {
    position: static;
  }

  .nav-shell {
    display: block;
  }

  .wordmark {
    min-height: 64px;
  }

  .site-nav {
    width: calc(100% + 2rem);
    margin-left: -1rem;
    border-top: 1px solid var(--line);
  }

  .nav-link {
    min-height: 52px;
    padding: 0 1rem;
  }

  .nav-link:first-child {
    margin-left: 0.2rem;
  }

  .nav-link::after {
    right: 1rem;
    left: 1rem;
  }

  .home-layout {
    grid-template-columns: 1fr;
    gap: 4rem;
    padding-top: 2.5rem;
  }

  .profile-rail {
    display: grid;
    grid-template-columns: 125px minmax(0, 1fr);
    gap: 1rem 1.4rem;
  }

  .portrait-frame {
    grid-row: 1;
    margin-bottom: 0;
  }

  .profile-heading {
    align-self: center;
    padding-bottom: 0;
    border-bottom: 0;
  }

  .profile-details,
  .profile-links {
    grid-column: 1 / -1;
  }

  .profile-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }

  .profile-details > div {
    padding: 0.9rem 0;
    border-bottom: 0;
  }

  .profile-links {
    grid-template-columns: repeat(2, 1fr);
  }

  .page-intro h1,
  .not-found h1 {
    font-size: clamp(2.35rem, 11vw, 3.5rem);
  }

  .hero h1 {
    font-size: clamp(2.15rem, 9vw, 2.8rem);
  }

  .publications-intro,
  .notes-empty {
    grid-template-columns: 1fr;
  }

  .publications-intro {
    display: grid;
    align-items: start;
  }

  .scholar-button {
    justify-self: start;
  }

  .notes-orbit {
    margin-inline: auto;
  }

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

  .publication-figure,
  .full-publication-content {
    grid-column: 2;
  }
}

@media (max-width: 500px) {
  .page-shell,
  .nav-shell {
    width: min(calc(100% - 2.5rem), var(--page));
  }

  .profile-rail {
    grid-template-columns: 105px minmax(0, 1fr);
  }

  .profile-details {
    grid-template-columns: 1fr 1fr;
  }

  .profile-details dd {
    font-size: 0.8rem;
  }

  .profile-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 1rem;
  }

  .profile-links a {
    grid-template-columns: 1.5rem 1fr;
    gap: 0.45rem;
    font-size: 0.75rem;
  }

  .profile-links a > span:last-child {
    display: none;
  }

  .profile-link-mark {
    width: 1.5rem;
    height: 1.5rem;
  }

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

  .publication-arrow {
    display: none;
  }

  .section-heading,
  .record-heading {
    align-items: start;
  }

  .record-heading {
    display: grid;
    gap: 0.4rem;
  }

  .full-publication {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }

  .publication-figure,
  .full-publication-content {
    grid-column: 1;
  }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  :root,
  :root[data-theme="dark"] {
    --paper: #ffffff;
    --surface: #ffffff;
    --ink: #252c28;
    --ink-soft: #555e58;
    --muted: #70786f;
    --line: #d9ddd5;
    --accent: #376451;
    --accent-dark: #284a3c;
    color-scheme: light;
  }

  .site-header,
  .hero-actions,
  .profile-links {
    display: none;
  }

  body {
    background: #fff;
  }

  .home-layout {
    grid-template-columns: 180px 1fr;
    padding: 0;
  }
}
