:root {
  --taupe: #c2b8b2;
  --taupe-lift: #d6cec9;
  --taupe-deep: #b3a8a1;
  --ink: #423629;
  --cerulean: #406e8e;
  --twilight: #0a014f;
  --moss: #4f7e25;
  --paper: #efeae6;
  --wash-cerulean: #9eb4c4;
  --wash-twilight: #a8a2bf;
  --bg: #e6e0db;
  --bg-elevated: #f3eee9;
  --bg-subtle: #d5cec8;
  --text: #423629;
  --text-muted: #5c4e42;
  --text-faint: #7a6c62;
  --accent: #406e8e;
  --accent-hover: #0a014f;
  --accent-soft: rgba(64, 110, 142, 0.12);
  --accent-muted: #406e8e;
  --border: #c9c0b8;
  --border-light: #d8d0ca;
  --shadow-sm: 0 1px 2px rgba(66, 54, 41, 0.08);
  --shadow-md: 0 10px 28px rgba(64, 110, 142, 0.12);
  --shadow-lg: 0 18px 42px rgba(64, 110, 142, 0.14);
  --radius-sm: 2px;
  --radius: 4px;
  --radius-lg: 6px;
  --max-width: 1040px;
  --header-height: 64px;
  --section-gap: 72px;
  --font-display: 'Source Serif 4', 'Iowan Old Style', Charter, Palatino, Georgia, serif;
  --font-body: 'Avenir Next', Avenir, ui-sans-serif, system-ui, sans-serif;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --transition: 180ms var(--ease-out);
}

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

html {
  scroll-behavior: smooth;
}

/* Hide placeholder HTML until published content arrives. */
html.js:not(.content-ready) .site-header,
html.js:not(.content-ready) main,
html.js:not(.content-ready) .site-footer {
  display: none;
}

.site-loader {
  display: none;
}

html.js:not(.content-ready) .site-loader {
  display: grid;
  place-items: center;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--bg);
}

.loader {
  width: 60px;
  aspect-ratio: 1;
  display: flex;
  color: var(--ink);
  border: 4px solid;
  box-sizing: border-box;
  border-radius: 50%;
  background:
    radial-gradient(circle 5px, currentColor 95%, #0000),
    linear-gradient(currentColor 50%, #0000 0) 50% / 4px 60% no-repeat;
  animation: l1 2s infinite linear;
}

.loader:before {
  content: "";
  flex: 1;
  background: linear-gradient(currentColor 50%, #0000 0) 50% / 4px 80% no-repeat;
  animation: inherit;
}

@keyframes l1 {
  100% { transform: rotate(1turn); }
}

html.js.content-ready .site-header,
html.js.content-ready main,
html.js.content-ready .site-footer {
  animation: content-fade-in 0.35s var(--ease-out);
}

@keyframes content-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.25s ease;
}

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

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

/* Icons */
.icon {
  width: 1em;
  height: 1em;
  stroke-width: 1.75;
  flex-shrink: 0;
}

.icon-sm {
  width: 16px;
  height: 16px;
}

.icon-md {
  width: 20px;
  height: 20px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgb(194 184 178 / 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
}

.site-header.is-scrolled {
  box-shadow: var(--shadow-sm);
}

.nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  gap: 24px;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 500;
  font-style: normal;
  color: var(--twilight);
  letter-spacing: -0.02em;
  white-space: nowrap;
  transition: color var(--transition);
}

.logo:hover {
  color: var(--cerulean);
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  color: var(--text);
  cursor: pointer;
  transition:
    background var(--transition),
    border-color var(--transition),
    color var(--transition),
    transform var(--transition);
}

.nav-toggle:hover {
  background: var(--bg-subtle);
  border-color: var(--text-faint);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-nav a {
  padding: 10px 16px;
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  border-radius: var(--radius-sm);
  transition:
    color var(--transition),
    background var(--transition),
    transform var(--transition);
}

.site-nav a:hover {
  color: var(--cerulean);
  background: var(--accent-soft);
}

.site-nav a.active {
  color: var(--twilight);
  background: var(--bg-elevated);
}

/* Main */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 56px 28px 120px;
}

section {
  margin-bottom: var(--section-gap);
}

section:last-child {
  margin-bottom: 0;
}

section h2,
.section-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
  font-style: normal;
  letter-spacing: -0.02em;
  margin: 0 0 28px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
  color: var(--twilight);
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 0.4s var(--ease-out),
    transform 0.4s var(--ease-out);
}

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

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 56px;
  align-items: start;
  margin-bottom: var(--section-gap);
  padding: 12px 0 56px;
  background: transparent;
  border-radius: 0;
  border: none;
  border-bottom: 1px solid var(--border-light);
}

.hero-image-wrap {
  position: relative;
}

.hero-image {
  width: 100%;
  height: auto;
  aspect-ratio: auto;
  object-fit: contain;
  object-position: center top;
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
}

.hero-image-placeholder {
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-lg);
  background: var(--bg-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-faint);
  font-size: 0.875rem;
}

.hero-eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 0 0 16px;
}

.hero-content h1 {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 4.5vw, 3.15rem);
  font-weight: 500;
  font-style: normal;
  letter-spacing: -0.03em;
  line-height: 1.12;
  margin: 0 0 12px;
}

.hero-accent-rule {
  width: 48px;
  height: 2px;
  background: var(--accent-muted);
  margin-bottom: 20px;
}

.hero-content .title {
  font-size: 1.0625rem;
  color: var(--text-muted);
  font-weight: 400;
  margin: 0 0 24px;
  letter-spacing: 0.01em;
}

.hero-content .intro {
  font-size: 1.0625rem;
  line-height: 1.82;
  color: var(--text);
  margin-bottom: 28px;
  max-width: 52ch;
}

.hero-contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 4px;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.hero-contact-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  transition: color var(--transition);
}

a.hero-contact-link:hover {
  color: var(--accent);
}

.hero-contact-sep {
  color: var(--border);
  user-select: none;
  padding: 0 4px;
}

.hero-enter {
  opacity: 0;
  transform: translateY(10px);
  animation: heroIn 0.45s var(--ease-out) forwards;
  animation-delay: var(--enter-delay, 0ms);
}

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

.contact-info {
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  padding: 28px 32px;
  border-radius: var(--radius-lg);
}

.contact-info p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text-muted);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 6px 0;
}

.contact-info p strong {
  color: var(--text);
  font-weight: 600;
}

.contact-info .icon {
  margin-top: 3px;
  color: var(--accent);
}

.contact-info a {
  color: var(--text);
  border-bottom: 1px solid var(--border);
  transition: border-color var(--transition), color var(--transition);
}

.contact-info a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* Page header */
.page-header {
  text-align: left;
  padding: 8px 0 40px;
  margin-bottom: 48px;
  border-bottom: 1px solid var(--border-light);
}

.page-header h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 500;
  font-style: normal;
  letter-spacing: -0.03em;
  margin: 0 0 12px;
  color: var(--text);
}

.page-header .subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 62ch;
  margin: 0;
  line-height: 1.7;
}

/* Cards */
.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  margin-bottom: 16px;
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border);
  transform: translateY(-2px);
}

.card h3 {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 500;
  margin: 0 0 8px;
}

.card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.card .meta {
  font-size: 0.875rem;
  color: var(--text-faint);
  margin-top: 8px;
}

/* Publications */
.publication-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.publication-list li {
  padding: 22px 0;
  border-bottom: 1px solid var(--border-light);
}

.publication-list li:last-child {
  border-bottom: none;
}

.publication-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.0625rem;
  color: var(--text);
  margin-bottom: 6px;
  line-height: 1.45;
}

.publication-authors {
  color: var(--text-muted);
  font-size: 0.9375rem;
  margin-bottom: 4px;
}

.publication-venue {
  font-style: italic;
  color: var(--text-faint);
  font-size: 0.875rem;
}

.publication-links {
  margin-top: 12px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.publication-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
}

.publication-links a:hover {
  gap: 10px;
}

/* Books */
.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 32px;
}

.book-card-wrapper {
  position: relative;
  z-index: 1;
}

.book-card-wrapper.book-popup-active {
  z-index: 100;
}

.book-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: visible;
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
}

.book-card:hover {
  border-color: var(--border);
}

.book-cover-wrap {
  position: relative;
  display: block;
  overflow: visible;
  cursor: pointer;
}

.book-cover-wrap .book-popup {
  display: none;
  position: absolute;
  top: 0;
  left: calc(100% + 20px);
  width: 300px;
  max-width: min(300px, 85vw);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-lg);
  pointer-events: none;
  z-index: 200;
}

.book-cover-wrap.is-hovered .book-popup,
.book-cover-wrap:hover .book-popup {
  display: block;
}

.book-cover-wrap .book-popup::before {
  content: '';
  position: absolute;
  top: 28px;
  right: 100%;
  border: 8px solid transparent;
  border-right-color: var(--bg-elevated);
}

.book-popup-title {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 500;
  margin: 0 0 10px;
  line-height: 1.4;
}

.book-popup-meta {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.book-popup-summary {
  font-size: 0.9375rem;
  line-height: 1.72;
  margin-bottom: 16px;
}

.book-popup-details {
  font-size: 0.875rem;
  line-height: 1.65;
  border-top: 1px solid var(--border-light);
  padding-top: 16px;
}

.book-popup-links {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
}

.book-cover {
  width: 100%;
  height: 300px;
  object-fit: contain;
  object-position: center;
  background: var(--bg-subtle);
  padding: 24px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  transition: transform var(--transition);
}

.book-card:hover .book-cover {
  transform: scale(1.02);
}

.book-cover-placeholder {
  width: 100%;
  height: 200px;
  background: var(--bg-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-faint);
  font-size: 0.875rem;
}

.book-info {
  padding: 24px 28px 28px;
}

.book-info h3 {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 500;
  margin: 0 0 8px;
  line-height: 1.4;
}

.book-info p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* Courses */
.course-list {
  display: grid;
  gap: 16px;
}

.course-item {
  background: var(--bg-elevated);
  padding: 24px 28px;
  border-radius: var(--radius-lg);
  border-left: 2px solid var(--accent);
}

.course-item h3 {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 500;
  margin: 0 0 4px;
}

.course-item .course-code {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.course-item p {
  margin: 8px 0 0;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.course-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 40px 44px;
  margin-bottom: 32px;
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
  position: relative;
}

.course-card::before {
  content: '';
  position: absolute;
  top: 32px;
  left: 0;
  width: 2px;
  height: calc(100% - 64px);
  background: var(--accent);
}

.course-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  border-color: var(--border);
}

.course-card .course-header {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 20px;
}

.course-card .course-code {
  background: var(--accent);
  color: var(--bg-elevated);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.course-card h3 {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 500;
  margin: 0;
  line-height: 1.35;
}

.course-card .course-level {
  display: inline-block;
  color: var(--text-faint);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-top: 6px;
}

.course-card .course-description {
  font-size: 1rem;
  line-height: 1.82;
  margin: 20px 0;
  max-width: 65ch;
}

.course-card .course-topics {
  margin-top: 28px;
  padding-top: 28px;
  border-top: 1px solid var(--border-light);
}

.course-card .course-topics h4 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-faint);
  margin: 0 0 16px;
  font-weight: 600;
}

.course-card .topics-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.course-card .topic-tag {
  background: var(--bg-subtle);
  color: var(--text);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 500;
  border: 1px solid transparent;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.course-card .topic-tag:hover {
  background: var(--accent);
  color: var(--bg-elevated);
}

.course-links {
  margin-top: 24px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.course-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--bg-subtle);
  color: var(--text);
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 0.875rem;
  transition: background var(--transition), color var(--transition);
}

.course-link:hover {
  background: var(--accent);
  color: var(--bg-elevated);
}

/* CV */
.cv-section {
  text-align: center;
  padding: 56px 48px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
}

.cv-section h2 {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 16px;
}

.cv-section p {
  color: var(--text-muted);
  margin-bottom: 28px;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--cerulean);
  color: #f4f1ee;
  font-weight: 500;
  font-size: 0.875rem;
  letter-spacing: 0;
  border-radius: var(--radius);
  border: 1px solid var(--cerulean);
  transition:
    background 180ms var(--ease-out),
    border-color 180ms var(--ease-out),
    color 180ms var(--ease-out),
    transform 180ms var(--ease-out),
    box-shadow 180ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .btn:hover {
    background: var(--twilight);
    border-color: var(--twilight);
    color: #f4f1ee;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgb(64 110 142 / 0.22);
  }
}

.btn:active {
  transform: scale(0.97);
}

.btn-outline {
  background: transparent;
  color: var(--cerulean);
  border-color: var(--cerulean);
}

@media (hover: hover) and (pointer: fine) {
  .btn-outline:hover {
    background: var(--cerulean);
    color: #f4f1ee;
  }
}

.btn-center {
  display: flex;
  justify-content: center;
  margin-top: 40px;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: gap var(--transition), color var(--transition);
}

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

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 48px 28px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
  background: #b8aea8;
}

.site-footer p {
  margin: 0 0 8px;
}

.site-footer a {
  color: var(--text-muted);
  transition: color var(--transition);
}

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

.site-footer .footer-credit {
  margin-top: 20px;
  font-size: 0.8125rem;
  color: var(--text-faint);
}

/* Gallery */
.image-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.image-gallery.small {
  grid-template-columns: repeat(3, 1fr);
}

.gallery-item {
  text-align: center;
}

.gallery-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}

.gallery-image:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-md);
}

.gallery-image-placeholder {
  width: 100%;
  height: 200px;
  background: var(--bg-subtle);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-faint);
  font-size: 0.875rem;
}

.gallery-caption {
  margin: 12px 0 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Research */
.research-intro {
  margin-bottom: var(--section-gap);
}

.research-summary {
  font-size: 1.0625rem;
  line-height: 1.85;
  margin-bottom: 36px;
  max-width: 65ch;
}

.research-areas {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.research-area {
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  padding: 32px 36px;
  border-radius: var(--radius-lg);
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
}

.research-area:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  border-color: var(--border);
}

.research-area h3 {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 500;
  margin: 0 0 10px;
}

.research-area p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.72;
}

.research-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 48px;
  align-items: start;
  margin-bottom: 40px;
}

.research-image-sidebar img,
.content-image {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

/* Slideshow */
.slideshow-outer {
  position: relative;
  padding: 0 52px;
}

.slideshow-container {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.slides-wrapper {
  display: flex;
  width: 100%;
  transition: transform 0.55s var(--ease-out);
}

.slide {
  flex: 0 0 100%;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px;
  align-items: start;
  padding: 8px 0;
  overflow: hidden;
}

.slide-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: var(--bg-elevated);
  color: var(--accent);
  border: 1px solid var(--border);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), border-color var(--transition), transform var(--transition), box-shadow var(--transition);
  z-index: 10;
  box-shadow: var(--shadow-sm);
}

.slide-nav:hover {
  background: var(--accent);
  color: var(--bg-elevated);
  border-color: var(--accent);
  transform: translateY(-50%) scale(1.05);
  box-shadow: var(--shadow-md);
}

.slide-nav.prev { left: 0; }
.slide-nav.next { right: 0; }

.slide-indicators {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 32px;
}

.slide-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}

.slide-indicator.active {
  background: var(--accent);
  transform: scale(1.25);
}

.featured-graph {
  background: var(--bg-elevated);
  border-radius: var(--radius-lg);
  padding: 28px;
  border: 1px solid var(--border-light);
  min-width: 0;
  overflow: hidden;
}

.featured-graph img {
  width: 100%;
  max-width: 100%;
  height: 320px;
  object-fit: contain;
  display: block;
  border-radius: var(--radius);
  background: var(--bg-subtle);
}

.featured-paper-content {
  min-width: 0;
  overflow: hidden;
}

.featured-graph-placeholder {
  width: 100%;
  height: 320px;
  background: var(--bg-subtle);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-faint);
  font-size: 0.875rem;
}

.featured-graph-caption {
  margin-top: 14px;
  font-size: 0.8125rem;
  color: var(--text-faint);
  text-align: center;
}

.featured-paper-content h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 500;
  margin: 0 0 12px;
  line-height: 1.45;
}

.featured-paper-meta {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.featured-paper-content p {
  font-size: 1rem;
  line-height: 1.82;
  margin-bottom: 16px;
}

/* Title banner */
.title-banner {
  background: transparent;
  color: var(--text);
  padding: 4px 0 4px 20px;
  border-radius: 0;
  border-left: 2px solid var(--text);
  margin-bottom: 32px;
}

.title-banner h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 500;
  font-style: normal;
  margin: 0 0 8px;
  border: none;
  padding: 0;
  color: inherit;
}

.title-banner p {
  margin: 0;
  opacity: 0.85;
  font-size: 0.9375rem;
}

/* Section divider */
.section-divider {
  display: flex;
  align-items: center;
  margin: 72px 0 56px;
  gap: 24px;
}

.section-divider::before,
.section-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-light);
}

.section-divider span {
  color: var(--text-faint);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

/* Philosophy */
.philosophy-section {
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  padding: 56px;
  border-radius: var(--radius-lg);
  margin: 56px 0;
}

.philosophy-section h2 {
  text-align: center;
  border: none;
  padding: 0;
  margin-bottom: 44px;
}

.philosophy-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px;
}

.philosophy-item {
  text-align: center;
  padding: 20px;
}

.philosophy-icon {
  width: 56px;
  height: 56px;
  background: var(--accent-soft);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  color: var(--accent);
}

.philosophy-item h3 {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 500;
  margin: 0 0 12px;
}

.philosophy-item p {
  color: var(--text-muted);
  font-size: 0.9375rem;
  margin: 0;
  line-height: 1.72;
}

/* Stats */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin: 56px 0;
}

.stat-item {
  text-align: center;
  padding: 36px 24px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  transition: box-shadow var(--transition), transform var(--transition);
}

.stat-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.stat-number {
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 500;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* Quote */
.quote-block {
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  padding: 48px 56px;
  border-radius: var(--radius-lg);
  margin: 56px 0;
  position: relative;
}

.quote-block::before {
  content: '"';
  position: absolute;
  top: 16px;
  left: 32px;
  font-family: var(--font-display);
  font-size: 5rem;
  color: var(--accent);
  opacity: 0.12;
  line-height: 1;
}

.quote-block blockquote {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-style: italic;
  line-height: 1.75;
  margin: 0 0 20px;
  padding-left: 16px;
}

.quote-block cite {
  font-size: 0.9375rem;
  color: var(--text-muted);
  font-style: normal;
  padding-left: 16px;
}

/* Press links */
.press-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.press-links-label {
  width: 100%;
  margin: 0 0 12px;
  font-size: 0.75rem;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
}

.press-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--text);
  transition: background var(--transition), color var(--transition), border-color var(--transition), gap var(--transition);
}

.press-link:hover {
  background: var(--accent);
  color: var(--bg-elevated);
  border-color: var(--accent);
  gap: 12px;
}

/* Image feature */
.image-feature {
  margin: 56px 0;
  text-align: center;
}

.image-feature img {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.image-feature figcaption {
  margin-top: 16px;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Personal page */
.photo-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 32px;
}

.photo-item {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  transition: transform var(--transition), box-shadow var(--transition);
}

.photo-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.photo-item img,
.photo-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out);
}

.photo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-faint);
  font-size: 0.875rem;
  text-align: center;
  padding: 20px;
  background: var(--bg-subtle);
}

.photo-item:hover img {
  transform: scale(1.04);
}

.photo-item .photo-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px;
  background: linear-gradient(transparent, rgba(26, 24, 22, 0.75));
  color: var(--bg-elevated);
  font-size: 0.875rem;
  opacity: 0;
  transition: opacity var(--transition);
}

.photo-item:hover .photo-caption {
  opacity: 1;
}

.personal-summary {
  max-width: 640px;
  margin: 0 auto 64px;
  text-align: center;
}

.personal-summary p {
  font-size: 1.0625rem;
  line-height: 1.85;
}

.gallery-section h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 500;
  font-style: italic;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.gallery-section h3::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-light);
}

/* CV layout */
.cv-layout {
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 48px;
  align-items: center;
  margin-bottom: 40px;
}

/* Utility spacing */
.mt-lg { margin-top: 40px; }
.mb-md { margin-bottom: 24px; }

/* Responsive */
@media (max-width: 900px) {
  .slide {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .research-layout,
  .cv-layout {
    grid-template-columns: 1fr;
  }

  .research-image-sidebar {
    order: -1;
    max-width: 320px;
    margin: 0 auto;
  }
}

@media (max-width: 768px) {
  :root {
    --section-gap: 64px;
    --header-height: 68px;
  }

  main {
    padding: 40px 20px 80px;
  }

  .nav-toggle {
    display: flex;
  }

  .site-nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 16px 20px 24px;
    background: rgb(214 206 201 / 0.97);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-light);
    transform: translateY(-110%);
    opacity: 0;
    visibility: hidden;
    transition: transform var(--transition), opacity var(--transition), visibility var(--transition);
  }

  .site-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .site-nav a {
    padding: 14px 16px;
    border-radius: var(--radius);
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
    padding: 32px 24px 48px;
  }

  .hero-image-wrap {
    max-width: 240px;
    margin: 0 auto;
  }

  .hero-content .intro {
    max-width: none;
    margin-left: auto;
    margin-right: auto;
  }

  .hero-accent-rule {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-contact {
    justify-content: center;
  }

  .book-grid {
    grid-template-columns: 1fr;
  }

  .book-cover-wrap .book-popup {
    width: calc(100vw - 48px);
    left: 50%;
    transform: translateX(-50%);
    top: calc(100% + 16px);
  }

  .book-cover-wrap .book-popup::before {
    top: -8px;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-bottom-color: var(--bg-elevated);
  }

  .research-areas {
    grid-template-columns: 1fr;
  }

  .image-gallery,
  .image-gallery.small {
    grid-template-columns: repeat(2, 1fr);
  }

  .philosophy-grid {
    grid-template-columns: 1fr;
  }

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

  .slideshow-outer {
    padding: 0 44px;
  }

  .course-card {
    padding: 28px 28px 28px 32px;
  }

  .course-card .course-header {
    flex-direction: column;
    gap: 12px;
  }

  .title-banner {
    padding: 28px 24px;
  }

  .photo-gallery {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .photo-item .photo-caption {
    opacity: 1;
    font-size: 0.8125rem;
    padding: 12px;
  }
}

@media (max-width: 480px) {
  .image-gallery,
  .image-gallery.small,
  .stats-row,
  .photo-gallery {
    grid-template-columns: 1fr;
  }

  .slideshow-outer {
    padding: 0;
  }

  .slide-nav {
    width: 36px;
    height: 36px;
  }

  .slide-nav.prev { left: -4px; }
  .slide-nav.next { right: -4px; }
}

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

  .reveal,
  .hero-enter,
  html.js.content-ready .site-header,
  html.js.content-ready main,
  html.js.content-ready .site-footer {
    opacity: 1;
    transform: none;
    animation: none;
    transition: none;
  }

  .loader,
  .loader:before {
    animation: none;
  }

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

.custom-section-body {
  display: grid;
  gap: var(--space-lg);
  align-items: start;
}

.custom-section-right {
  grid-template-columns: 1fr min(280px, 35%);
}

.custom-section-left {
  grid-template-columns: min(280px, 35%) 1fr;
}

.custom-section-image {
  width: 100%;
  border-radius: 8px;
  object-fit: cover;
}

/* ————————————————————————————————————————————
   The Quiet Journal: engraved paper on a taupe field.
   Twilight carries the display type and the colophon;
   cerulean is the engraver's ink — rules, eyebrows, links.
   ———————————————————————————————————————————— */

body {
  background:
    radial-gradient(900px 480px at 92% -80px, rgb(64 110 142 / 0.16), transparent 60%),
    linear-gradient(to bottom, #ece7e2 0, var(--bg) 420px);
}

/* Masthead */
.site-header {
  background: rgb(230 224 219 / 0.92);
  border-bottom: 2px solid var(--cerulean);
}

.logo {
  color: var(--twilight);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.logo:hover {
  color: var(--cerulean);
}

.site-nav a {
  position: relative;
  color: var(--text-muted);
  background: transparent;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: none;
}

.site-nav a::after {
  content: '';
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 6px;
  height: 2px;
  background: var(--cerulean);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 220ms var(--ease-out);
}

.site-nav a:hover {
  color: var(--twilight);
  background: transparent;
}

.site-nav a:hover::after {
  transform: scaleX(1);
}

.site-nav a.active {
  color: var(--twilight);
  background: transparent;
}

.site-nav a.active::after {
  transform: scaleX(1);
}

.nav-toggle {
  background: transparent;
  border-color: var(--border);
  color: var(--twilight);
}

/* Hero: the photograph at its true crop, no offset plate */
.hero {
  padding: 12px 0 56px;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
}

.hero-image-wrap {
  position: relative;
  padding: 0;
}

.hero-image {
  width: 100%;
  height: auto;
  aspect-ratio: auto;
  object-fit: contain;
  object-position: center top;
  padding: 0;
  background: transparent;
  border: 1px solid var(--border-light);
  border-radius: 2px;
  box-shadow: none;
}

.hero-image-wrap::after {
  display: none;
}

.hero-eyebrow {
  color: var(--cerulean);
  letter-spacing: 0.16em;
}

.hero-content h1 {
  font-size: clamp(2.4rem, 4.5vw, 3.4rem);
  font-weight: 600;
  color: var(--twilight);
  line-height: 1.08;
}

.hero-content .title {
  font-family: var(--font-body);
  font-style: normal;
  font-size: 1.05rem;
  color: var(--text-muted);
}

.hero-accent-rule {
  width: 56px;
  height: 2px;
  background: var(--cerulean);
}

.hero-contact-link:hover {
  color: var(--cerulean);
}

/* Page titling */
.page-header {
  border-bottom: none;
}

.page-header h1 {
  font-size: clamp(2.1rem, 4vw, 2.8rem);
  font-weight: 600;
  color: var(--twilight);
}

.page-header h1::after {
  content: '';
  display: block;
  width: 56px;
  height: 2px;
  margin-top: 14px;
  background: var(--cerulean);
}

.page-header .subtitle {
  font-family: var(--font-body);
  font-style: normal;
  font-size: 1.05rem;
}

section h2,
.section-title {
  font-size: 1.65rem;
  font-weight: 600;
  color: var(--twilight);
  padding-bottom: 14px;
  border-bottom: none;
}

main > [data-section-id] > h2::after,
.section-title::after {
  content: '';
  display: block;
  width: 56px;
  height: 2px;
  margin-top: 12px;
  background: var(--cerulean);
}

/* Sections sit directly on the field — no slabs */
main > [data-section-id] {
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
}

/* Cards read as paper laid on the desk */
.card,
.book-card,
.course-card,
.research-area,
.contact-info,
.course-item,
.featured-graph,
.cv-section,
.press-link {
  background: rgb(239 234 230 / 0.55);
  border: 1px solid var(--border);
  box-shadow: none;
}

.card,
.book-card,
.research-area,
.contact-info,
.course-item,
.featured-graph,
.cv-section,
.press-link {
  border-left: 3px solid var(--cerulean);
}

.card h3,
.book-info h3,
.book-popup-title,
.course-card h3,
.course-item h3,
.research-area h3,
.featured-paper-content h3,
.publication-title {
  color: var(--twilight);
  font-weight: 600;
}

.publication-title a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color var(--transition), border-color var(--transition);
}

.publication-title a:hover {
  color: var(--cerulean);
  border-bottom-color: var(--cerulean);
}

.book-cover,
.book-cover-placeholder {
  background: rgb(194 184 178 / 0.5);
}

.book-popup {
  background: var(--paper);
}

.course-item {
  border-left: 3px solid var(--cerulean);
}

.course-card::before {
  width: 3px;
  background: var(--cerulean);
}

.course-card .course-code {
  background: transparent;
  color: var(--cerulean);
  border: 1px solid var(--cerulean);
  padding: 7px 13px;
}

.course-card .topic-tag {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border);
}

.course-card .topic-tag:hover {
  background: var(--cerulean);
  border-color: var(--cerulean);
  color: var(--paper);
}

/* Rules, dividers, marginalia */
.section-divider::before,
.section-divider::after {
  height: 1px;
  background: var(--border);
}

.section-divider span {
  color: var(--cerulean);
  letter-spacing: 0.2em;
}

.title-banner {
  background: transparent;
  color: var(--text);
  padding: 4px 0 4px 24px;
  border: none;
  border-left: 3px solid var(--cerulean);
  border-radius: 0;
}

.title-banner h2 {
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--twilight);
  border: none;
}

/* Links: ink with a drawn underline */
.text-link,
.publication-links a,
.press-link {
  color: var(--cerulean);
}

.publication-links a {
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition), gap var(--transition);
}

.publication-links a:hover {
  border-bottom-color: var(--cerulean);
}

.press-link:hover {
  background: var(--cerulean);
  border-color: var(--cerulean);
  color: var(--paper);
}

.press-link:hover .icon {
  color: var(--paper);
}

/* Slideshow chrome */
.slide-nav {
  background: transparent;
  color: var(--cerulean);
  border-color: var(--cerulean);
  box-shadow: none;
}

.slide-indicator {
  background: var(--border);
}

.slide-indicator.active {
  background: var(--cerulean);
}

.featured-paper-meta,
.publication-venue,
.press-links-label,
.hero-contact-link .icon,
.contact-info .icon,
.press-link .icon,
.publication-links a .icon {
  color: var(--cerulean);
}

.site-footer {
  background: transparent;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  padding: 48px 28px;
}

.site-footer::before {
  content: '';
  display: block;
  width: 72px;
  height: 2px;
  margin: 0 auto 24px;
  background: var(--cerulean);
}

.site-footer p {
  color: var(--text-muted);
}

.site-footer a {
  color: var(--cerulean);
}

.site-footer a:hover {
  color: var(--twilight);
}

.site-footer .footer-credit {
  color: var(--text-faint);
}

/* Motion: light, deliberate */
@media (hover: hover) and (pointer: fine) {
  .nav-toggle:hover {
    color: var(--cerulean);
    border-color: var(--cerulean);
  }

  .book-card:hover,
  .course-card:hover,
  .research-area:hover,
  .card:hover {
    transform: translateY(-3px);
    border-color: var(--cerulean);
    box-shadow: var(--shadow-md);
  }

  .slide-nav:hover {
    background: var(--cerulean);
    color: var(--paper);
    border-color: var(--cerulean);
    transform: translateY(-50%) scale(1.05);
  }
}

.btn:focus-visible,
.btn-outline:focus-visible,
.nav-toggle:focus-visible,
.slide-nav:focus-visible,
.site-nav a:focus-visible {
  outline: 2px solid var(--twilight);
  outline-offset: 3px;
}

@media (max-width: 900px) {
  .hero-image-wrap::after {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-nav a::after {
    transition: none;
  }
}

body[data-page="personal"] main {
  overflow: visible;
}

/* Personal photos: 3×4 grid */
.photo-grid-section,
.photo-grid-section.reveal,
.photo-grid-section.reveal.is-visible {
  overflow: visible;
  margin: 8px 0 48px;
  opacity: 1;
  transform: none;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 72px 8px 96px;
  overflow: visible;
}

.photo-grid-cell {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  transition: transform 280ms var(--ease-out), box-shadow 280ms var(--ease-out);
}

.photo-grid-cell.is-empty {
  pointer-events: none;
}

.photo-grid-cell:nth-child(1) { transform-origin: left top; }
.photo-grid-cell:nth-child(2) { transform-origin: center top; }
.photo-grid-cell:nth-child(3) { transform-origin: right top; }
.photo-grid-cell:nth-child(4) { transform-origin: left center; }
.photo-grid-cell:nth-child(5) { transform-origin: center center; }
.photo-grid-cell:nth-child(6) { transform-origin: right center; }
.photo-grid-cell:nth-child(7) { transform-origin: left center; }
.photo-grid-cell:nth-child(8) { transform-origin: center center; }
.photo-grid-cell:nth-child(9) { transform-origin: right center; }
.photo-grid-cell:nth-child(10) { transform-origin: left bottom; }
.photo-grid-cell:nth-child(11) { transform-origin: center bottom; }
.photo-grid-cell:nth-child(12) { transform-origin: right bottom; }

.photo-grid-poster,
.photo-grid-cell video,
.photo-grid-cell iframe {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  display: block;
  border: 0;
}

.photo-grid-poster {
  transition: opacity 220ms var(--ease-out);
}

.photo-grid-poster-empty {
  background: var(--bg-subtle);
}

.photo-grid-video {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms var(--ease-out);
}

.photo-grid-cell.is-playing .photo-grid-poster {
  opacity: 0;
}

.photo-grid-cell.is-playing .photo-grid-video {
  opacity: 1;
}

.photo-grid-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 36px 14px 12px;
  color: var(--paper);
  font-family: var(--font-display);
  font-size: 0.92rem;
  line-height: 1.35;
  background: linear-gradient(transparent, rgb(10 1 79 / 0.78));
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .photo-grid-cell.is-filled:hover,
  .photo-grid-cell.is-filled:focus,
  .photo-grid-cell.is-filled:focus-visible {
    transform: scale(1.8);
    z-index: 8;
    box-shadow: var(--shadow-lg);
  }

  .photo-grid-cell.is-filled:hover .photo-grid-caption,
  .photo-grid-cell.is-filled:focus .photo-grid-caption,
  .photo-grid-cell.is-filled:focus-visible .photo-grid-caption,
  .photo-grid-cell.is-filled:focus-within .photo-grid-caption {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .photo-grid-cell,
  .photo-grid-poster,
  .photo-grid-video,
  .photo-grid-caption {
    transition-duration: 0.01ms;
  }

  .photo-grid-cell.is-filled:hover,
  .photo-grid-cell.is-filled:focus-visible {
    transform: none;
  }

  .photo-grid-cell.is-filled:focus-within .photo-grid-caption {
    opacity: 1;
  }
}

@media (max-width: 700px) {
  .photo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 28px 0 56px;
  }

  .photo-grid-cell {
    transform-origin: center center;
  }
}
