:root {
  --bg: #fdfaf4;
  --bg-alt: #ffffff;
  --ink: #333333;
  --ink-muted: #444444;
  --accent: #333333;
  --accent-dark: #000000;
  --accent-blue: #2196f3;
  --card: #ffffff;
  --border: #dddddd;
  --shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
  --radius: 14px;
  --max-width: 1000px;
  --section-padding: 2px;
  --card-padding: 4px;
  --content-heading-size: clamp(1.1rem, 1.6vw, 1.5rem);
  --content-heading-gap: 6px;
  --content-section-padding-top: 15px;
  --content-section-padding-bottom: 6px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Work Sans", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
}

.page-background {
  position: fixed;
  inset: 0;
  z-index: -2;
  background: var(--bg);
}

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

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(100% - 48px, var(--max-width));
  margin: 0 auto;
}

.section {
  padding: var(--section-padding) 0;
  scroll-margin-top: 100px;
}

/* Publications and Projects share the same section layout via .content-section */
.content-section {
  padding-top: var(--content-section-padding-top);
  padding-bottom: var(--content-section-padding-bottom);
}

.narrow {
  width: min(100% - 48px, 820px);
}

.hero {
  padding-top: 20px;
  padding-bottom: 0px;
  background: var(--bg);
  color: var(--ink);
  border-bottom: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(170px, 200px) minmax(0, 1fr);
  gap: 12px;
  align-items: flex-start;
}

.hero-media {
  max-width: 190px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  background: #fff;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(14px);
  transform: scale(1.03);
  opacity: 0.94;
  transition: filter 0.5s ease, transform 0.5s ease, opacity 0.5s ease;
}

.hero-media img.is-loaded {
  filter: blur(0);
  transform: scale(1);
  opacity: 1;
}

.hero-content h1 {
  font-family: "Varela Round", sans-serif;
  font-size: clamp(1.65rem, 2.0vw, 2.0rem);
  margin: 0;
  line-height: 1.05;
}

.hero-kicker {
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.75rem;
  color: #777777;
  margin: 2px 0;
}

.hero-subtitle,
.hero-role {
  margin: 0 0 4px;
  color: var(--ink-muted);
  font-weight: 400;
}

.hero-summary {
  margin: 6px 0 0;
  color: var(--ink-muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.hero-summary-paragraph {
  display: block;
  margin-top: 0.25rem;
}

.hero-summary a {
  color: var(--accent-blue);
  text-decoration: none;
}

.hero-summary a:hover {
  text-decoration: underline;
}

a[href] {
  color: var(--accent-blue);
}

a[href]:hover {
  text-decoration: underline;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.hero-links {
  display: flex;
  gap: 12px;
}

.hero-links a {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  overflow: hidden;
  transition: transform 0.2s ease, background 0.2s ease;
}

.hero-links a:hover {
  background: #f0e8e7;
  transform: translateY(-2px);
}

.hero-links svg {
  width: 26px;
  height: 26px;
  fill: currentColor;
}

.hero-links img {
  width: 26px;
  height: 26px;
  display: block;
  border-radius: 50%;
  object-fit: cover;
}

.lab-badge {
  margin-top: 24px;
  display: inline-flex;
  align-items: center;
  padding: 8px 18px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid var(--border);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.about {
  padding-top: 60px;
  padding-bottom: 60px;
}

.about p {
  font-size: 1.05rem;
  color: var(--ink-muted);
  margin: 0;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--content-heading-gap);
  flex-wrap: wrap;
  gap: 16px;
}

.section-heading h2 {
  font-family: "Varela Round", sans-serif;
  font-size: var(--content-heading-size);
  margin: 0;
  color: #222222;
}

.updates-list {
  margin: 0;
  padding-left: 18px;
  color: var(--ink);
  line-height: 1.35;
  font-size: 0.88rem;
}

.updates-list li {
  margin-bottom: 2px;
}

.updates-list li:last-child {
  margin-bottom: 0;
}

.updates-date {
  font-weight: 600;
}

#updates a,
#updates a:visited,
#updates a:hover,
#updates a:active {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}

#updates a.updates-date-link,
#updates a.updates-date-link:visited,
#updates a.updates-date-link:hover,
#updates a.updates-date-link:active {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}

#updates a.updates-blue-link,
#updates a.updates-blue-link:visited,
#updates a.updates-blue-link:hover,
#updates a.updates-blue-link:active {
  color: var(--accent-blue);
  text-decoration: none;
}

.updates-sublist {
  margin: 4px 0 0 0;
  padding-left: 18px;
}

.updates-sublist li {
  margin-bottom: 3px;
}

.updates-sublist li:last-child {
  margin-bottom: 0;
}

.updates-dropdown-item {
  list-style: none;
}

.updates-dropdown {
  margin-top: 2px;
}

.updates-dropdown > summary {
  cursor: pointer;
  color: var(--ink-muted);
  font-weight: 500;
}

.updates-dropdown[open] > summary {
  margin-bottom: 4px;
}

.card {
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
  gap: 18px;
  padding: var(--card-padding);
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 10px;
  border: 1px solid var(--border);
}

.card-media {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--border);
}

.card-media video,
.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-media a {
  display: block;
  height: 100%;
  width: 100%;
}

.tag {
  position: absolute;
  left: 4px;
  bottom: 4px;
  background: rgba(51, 51, 51, 0.8);
  color: #ffffff;
  font-size: 1.0rem;
  padding: 5px 12px;
  border-radius: 999px;
  letter-spacing: 0.05em;
}

.card-content h3 {
  margin: 0 0 12px;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--ink);
}

.card-content p {
  margin: 0 0 10px;
  color: var(--ink-muted);
}

#projects .card-content p {
  font-size: 0.9rem;
}

.meta {
  font-weight: 600;
  font-size: 0.95rem;
}

.venue {
  font-style: italic;
  font-size: 0.95rem;
}

.card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border 0.2s ease;
}

.btn.primary {
  background: #333333;
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
}

.btn.primary:hover {
  transform: translateY(-2px);
  background: #000000;
}

.btn.ghost {
  border-color: var(--border);
  border-width: 2px;
  color: var(--ink-muted);
}

.btn.ghost:hover {
  border-color: #333333;
  color: #333333;
}

.btn.small {
  padding: 6px 14px;
  font-size: 0.8rem;
  border-color: #333333;
  color: #ffffff;
  background: #333333;
}

.btn.small:hover {
  background: #000000;
  border-color: #000000;
}

.site-footer {
  padding: 40px 0 60px;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  color: var(--ink-muted);
  flex-wrap: wrap;
  gap: 12px;
}

.footer-links a {
  color: var(--accent-blue);
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.pub-page {
  padding: 32px 0 80px;
}

.pub-note {
  text-align: center;
  color: var(--ink-muted);
  margin-bottom: 16px;
  font-size: 0.95rem;
}

.pub-note .pub-equal {
  margin-left: 4px;
}

.pub-layout {
  display: grid;
  grid-template-columns: minmax(200px, 260px) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.pub-side h1 {
  margin: 0 0 16px 0;
  font-size: clamp(1.4rem, 2vw, 1.8rem);
  color: #5a3d2c;
  letter-spacing: 0.02em;
}

.pub-content {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.pub-year h3 {
  margin: 0 0 12px 0;
  font-size: 1.05rem;
  color: var(--ink);
}

.pub-list {
  margin: 0;
  padding-left: 22px;
  display: grid;
  gap: 12px;
  color: var(--ink-muted);
  line-height: 1.45;
}

.pub-list a {
  text-decoration: underline;
  text-underline-offset: 2px;
  color: inherit;
}

.pub-list strong {
  color: var(--ink);
}

.projects-page {
  padding: 32px 0 80px;
}

.projects-title {
  margin: 0 0 20px;
  text-align: center;
  font-size: clamp(1.6rem, 2.6vw, 2.2rem);
  color: #5a3d2c;
  letter-spacing: 0.02em;
}

.projects-layout {
  display: block;
}

.projects-content {
  display: grid;
  gap: 18px;
}

.project-card {
  padding: 18px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  display: grid;
  gap: 12px;
}

.project-label {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-muted);
  font-weight: 600;
}

.project-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 520px);
  gap: 18px;
  align-items: start;
}

.project-title {
  margin: 0 0 6px;
  font-size: 1.1rem;
  color: var(--ink);
}

.project-org {
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--ink);
}

.project-copy {
  margin: 0 0 12px;
  color: var(--ink-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.project-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.project-media {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #000000;
  aspect-ratio: 16 / 9;
}

.project-media-stack {
  display: grid;
  gap: 8px;
}

.project-media-stack .project-media {
  aspect-ratio: 16 / 7;
}

.project-media-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.project-media-grid .project-media {
  aspect-ratio: 16 / 9;
}

.project-media-grid-splitter .project-media:last-child {
  grid-column: 1 / -1;
  aspect-ratio: 16 / 7;
}

.project-media-grid-splitter .project-media:last-child img {
  object-fit: cover;
  object-position: center 12%;
}

.project-media-grid-splitter .project-media:nth-child(-n + 2) {
  aspect-ratio: 4 / 3;
}

.project-media-grid-splitter .project-media:nth-child(-n + 2) video {
  object-fit: cover;
}

.project-media-labeled {
  position: relative;
  margin: 0;
}

.project-media-label {
  position: absolute;
  left: 8px;
  bottom: 8px;
  z-index: 1;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.75);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.project-media img,
.project-media video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000000;
}

.project-media a {
  display: block;
  width: 100%;
  height: 100%;
}

@media (max-width: 960px) {
  .hero-grid {
    grid-template-columns: minmax(140px, 180px) minmax(0, 1fr);
    gap: 20px;
  }

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

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

  .projects-layout {
    display: block;
  }

  .project-body {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .hero-grid {
    grid-template-columns: minmax(90px, 120px) minmax(0, 1fr);
    gap: 12px;
  }

  .hero-media {
    max-width: 120px;
  }
}

@media (max-width: 600px) {
  .container {
    width: min(100% - 32px, var(--max-width));
  }

  .hero {
    padding-top: 28px;
  }

  .section {
    padding: 24px 0;
  }

  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .section-heading {
    align-items: flex-start;
  }
}
