:root {
  /* KODAK TRI-X 400-inspired monochrome palette. */
  --page: #eeeeeb;
  --surface: #fafaf8;
  --surface-muted: #deded9;
  --ink: #1b1b19;
  --muted: #60605c;
  --line: #c5c5bf;
  --accent: #1b1b19;
  --inverse-muted: #cecec8;
  --inverse-line: #40403c;
  --header-height: 4.5rem;
  --radius: 0.85rem;
  font-family: "Source Sans 3", ui-sans-serif, system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 1.5rem);
}

body {
  min-width: 20rem;
  margin: 0;
  color: var(--ink);
  background: var(--page);
}

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

a {
  color: inherit;
  text-underline-offset: 0.18em;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

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

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-height);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--page) 92%, transparent);
  backdrop-filter: blur(14px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100% - 3rem, 75rem);
  height: 100%;
  margin-inline: auto;
}

.site-name {
  font-family: "Newsreader", Georgia, "Times New Roman", serif;
  font-size: 1rem;
  font-optical-sizing: auto;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
}

nav {
  display: flex;
  align-items: stretch;
  align-self: stretch;
  gap: 1.75rem;
}

nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: color 180ms ease;
}

nav a::after {
  position: absolute;
  right: 0;
  bottom: 0.6rem;
  left: 0;
  height: 1px;
  background: currentColor;
  content: "";
  transform: scaleX(0);
  transition: transform 200ms ease;
}

nav a:hover,
nav a:focus-visible {
  color: var(--ink);
}

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

.scroll-progress {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  will-change: transform;
}

@keyframes hero-enter {
  from {
    opacity: 0;
    transform: translateY(0.75rem);
  }

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

@keyframes portrait-enter {
  from {
    opacity: 0;
    transform: translateY(0.5rem) scale(0.985);
  }

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

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(19rem, 0.7fr);
  gap: clamp(1.75rem, 4vw, 3.5rem);
  margin-block: clamp(1.5rem, 3vw, 3rem);
  padding: clamp(1.25rem, 3vw, 2.5rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.hero-copy {
  align-self: center;
}

.hero-copy > * {
  animation: hero-enter 720ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.hero-copy > :nth-child(1) {
  animation-delay: 80ms;
}

.hero-copy > :nth-child(2) {
  animation-delay: 140ms;
}

.hero-copy > :nth-child(3) {
  animation-delay: 200ms;
}

.hero-copy > :nth-child(4) {
  animation-delay: 260ms;
}

.hero-copy > :nth-child(5) {
  animation-delay: 320ms;
}

.hero-copy > :nth-child(6) {
  animation-delay: 380ms;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 0.85rem;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 1.75rem;
  height: 1px;
  background: currentColor;
  content: "";
}

h1,
h2,
h3,
p {
  text-wrap: pretty;
}

h1,
h2,
h3 {
  margin-top: 0;
  font-family: "Newsreader", Georgia, "Times New Roman", serif;
  font-optical-sizing: auto;
  font-weight: 600;
  letter-spacing: -0.035em;
}

h1 {
  max-width: 12ch;
  margin-bottom: 1.1rem;
  font-size: clamp(3.3rem, 7vw, 6.4rem);
  line-height: 0.94;
}

h2 {
  max-width: 18ch;
  margin-bottom: 0;
  font-size: clamp(2.15rem, 4.2vw, 4rem);
  line-height: 1;
}

h3 {
  margin-bottom: 0.45rem;
  font-size: 1.25rem;
  line-height: 1.15;
}

.topic-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1.1rem;
  padding: 0;
  list-style: none;
}

.topic-list li {
  padding: 0.45rem 0.7rem;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
}

.hero-detail {
  max-width: 44rem;
  color: var(--muted);
  font-size: clamp(1rem, 1.45vw, 1.15rem);
  line-height: 1.6;
}

.hero-actions,
.social-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.hero-actions {
  margin-top: 1.25rem;
}

.button {
  display: inline-flex;
  min-height: 2.8rem;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 700;
  text-decoration: none;
  transition: color 180ms ease, background 180ms ease, transform 180ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
}

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

.social-links {
  gap: 0.6rem;
  margin-top: 1rem;
}

.social-links a {
  display: inline-grid;
  width: 2.75rem;
  height: 2.75rem;
  place-items: center;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 50%;
  text-decoration: none;
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease,
    transform 180ms ease;
}

.social-links svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.social-links a:last-child svg {
  fill: currentColor;
  stroke: none;
}

.social-links a:hover,
.social-links a:focus-visible {
  color: var(--surface);
  background: var(--ink);
  border-color: var(--ink);
  transform: translateY(-2px);
}

.hero-portrait {
  align-self: center;
  margin: 0;
  overflow: hidden;
  background: var(--surface-muted);
  border-radius: calc(var(--radius) * 0.75);
  animation: portrait-enter 900ms 140ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.hero-portrait img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 36%;
  transition: transform 700ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.hero:hover .hero-portrait img {
  transform: scale(1.015);
}

.section {
  padding-block: clamp(3.5rem, 6vw, 5rem);
}

.publications-section {
  border-top: 1px solid var(--line);
}

.publications-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.75rem, 3vw, 2.5rem);
}

.publications-heading {
  align-self: start;
}

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

.publication-item {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.6rem;
  padding-block: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--line);
  transition: border-color 280ms ease;
}

.publication-year {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.publication-item article {
  min-width: 0;
  transition: transform 360ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

@media (hover: hover) and (pointer: fine) {
  .publication-item:hover {
    border-color: var(--muted);
  }

  .publication-item:hover article {
    transform: translateX(0.25rem);
  }
}

.publication-item h3 {
  max-width: none;
  margin-bottom: 0.6rem;
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  line-height: 1.18;
}

.publication-item h3 a {
  text-decoration-color: transparent;
  transition: text-decoration-color 180ms ease;
}

.publication-item h3 span {
  display: inline-block;
  font-size: 0.72em;
  transition: transform 180ms ease;
}

.publication-item h3 a:hover,
.publication-item h3 a:focus-visible {
  text-decoration-color: currentColor;
}

.publication-item h3 a:hover span,
.publication-item h3 a:focus-visible span {
  transform: translate(0.12em, -0.12em);
}

.publication-authors,
.publication-venue {
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.35vw, 1.08rem);
  line-height: 1.5;
}

.publication-authors strong {
  color: var(--ink);
}

.publication-venue {
  max-width: 42rem;
  margin-top: 0.25rem;
}

.contact-section {
  color: var(--surface);
  background: var(--ink);
}

.contact-section .eyebrow,
.contact-links a {
  color: var(--inverse-muted);
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(16rem, 0.6fr);
  gap: 2rem;
  align-items: end;
}

.contact-links {
  display: grid;
  gap: 0.75rem;
  justify-items: start;
}

.site-footer {
  color: var(--inverse-muted);
  background: var(--ink);
  border-top: 1px solid var(--inverse-line);
}

.contact-section :focus-visible,
.site-footer :focus-visible {
  outline-color: var(--surface);
}

.site-footer .page-shell {
  display: flex;
  justify-content: space-between;
  padding-block: 1.1rem;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: inherit;
}

.reveal {
  opacity: 0;
  transform: translateY(1rem);
  transition: opacity 760ms ease, transform 820ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.error-page {
  display: grid;
  align-content: center;
  width: min(100% - 3rem, 52rem);
  min-height: 100svh;
  margin-inline: auto;
}

.error-page h1 {
  max-width: 9ch;
}

.error-page > p:not(.eyebrow) {
  max-width: 38rem;
  margin-block: 2rem;
  color: var(--muted);
  font-size: 1.15rem;
  line-height: 1.6;
}

.error-page .button {
  justify-self: start;
}

@media (max-width: 48rem) {
  :root {
    --header-height: 4rem;
  }

  .page-shell,
  .header-inner {
    width: min(100% - 2rem, 75rem);
  }

  nav {
    gap: 1rem;
  }

  nav a {
    font-size: 0.82rem;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 1rem;
  }

  .hero-portrait {
    grid-row: 1;
  }

  .hero-portrait img {
    aspect-ratio: 4 / 4.8;
  }

  .hero-copy {
    grid-row: 2;
    padding: 0.25rem 0.25rem 0.5rem;
  }

  h1 {
    font-size: clamp(3.25rem, 17vw, 5rem);
  }

  .contact-layout {
    grid-template-columns: 1fr;
  }

  .publications-layout {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .publication-item {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .publication-year {
    margin-top: 0;
  }
}

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

  *,
  *::before,
  *::after {
    animation-delay: 0s !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
