@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Newsreader:ital,wght@1,500;1,700&family=Space+Grotesk:wght@500;600;700&display=swap");

/* Quiet editorial theme: intentionally flat, spacious, and content-first. */
:root {
  --bg: #f4f4ef;
  --bg-elevated: #ffffff;
  --ink: #161816;
  --muted: #626862;
  --line: #cfd3cc;
  --brand: #175c48;
  --brand-strong: #0f4939;
  --accent: #9b4a35;
  --amber: #b48532;
  --radius: 2px;
  --shadow-soft: none;
  --shadow-strong: none;
  --section: clamp(4.5rem, 9vw, 8rem);
}

html[data-theme="dark"] {
  --bg: #161816;
  --bg-elevated: #1e211e;
  --ink: #f2f2ec;
  --muted: #afb5ad;
  --line: #3b403a;
  --brand: #77b8a2;
  --brand-strong: #9bcdbb;
  --accent: #d58670;
  --amber: #d1ae66;
}

html {
  scroll-behavior: smooth;
}

body {
  color: var(--ink);
  background: var(--bg);
  font-family: Inter, "Helvetica Neue", Arial, sans-serif;
  letter-spacing: 0;
}

body::before,
body::after,
.hero::before,
.hero::after,
.section::before,
.section::after,
.hero-scroll-cue,
.scroll-progress,
.toolkit-orbit,
.visual-grid-overlay,
.card-grid-lines {
  display: none !important;
}

h1,
h2,
h3,
h4,
p {
  letter-spacing: 0;
}

h1,
h2,
h3,
h4 {
  color: var(--ink);
  font-family: Inter, "Helvetica Neue", Arial, sans-serif;
  font-weight: 600;
}

p,
li,
dd {
  line-height: 1.65;
}

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

.shell {
  width: min(1180px, calc(100% - 3rem));
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  box-shadow: none;
  backdrop-filter: blur(14px);
}

.site-header.scrolled {
  box-shadow: none;
}

.nav {
  min-height: 72px;
}

.brand {
  gap: 0.65rem;
}

.brand-avatar {
  width: 38px;
  height: 38px;
  flex-basis: 38px;
  border: 1px solid var(--line);
  box-shadow: none;
}

.brand-copy strong {
  font-size: 0.92rem;
  font-weight: 650;
}

.brand-copy small {
  font-size: 0.7rem;
  font-weight: 500;
}

.nav-links {
  gap: 0.15rem;
}

.nav-links a,
.nav-more summary {
  padding: 0.5rem 0.6rem;
  color: var(--muted);
  border-radius: 0;
  background: transparent !important;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: none;
}

.nav-links a::after {
  display: none;
}

.nav-links a:hover,
.nav-links a:focus-visible,
.nav-links a.active,
.nav-more summary:hover {
  color: var(--ink);
  transform: none;
}

.nav-more-menu {
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--bg-elevated);
  box-shadow: none;
}

.theme-toggle,
.nav-toggle {
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
}

.quote-strip {
  border-bottom: 1px solid var(--line);
  background: transparent;
}

.quote-card {
  min-height: 54px;
  padding-block: 0.75rem;
}

.quote-card p {
  color: var(--muted);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.95rem;
  font-style: italic;
  font-weight: 400;
}

.quote-card p::before {
  color: var(--brand);
  font-family: Inter, sans-serif;
  font-size: 0.65rem;
  font-style: normal;
  font-weight: 700;
}

.quote-button {
  padding: 0;
  color: var(--ink);
  border: 0;
  border-bottom: 1px solid currentColor;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font-size: 0.75rem;
}

.hero {
  min-height: auto;
  padding: clamp(4.5rem, 9vw, 8.5rem) 0 clamp(4rem, 8vw, 7rem);
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  background: transparent !important;
}

.hero-grid,
.hero-layout {
  min-height: auto;
  align-items: end;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: clamp(2rem, 6vw, 6rem);
  padding-block: 0;
}

.hero-bg {
  display: none !important;
}

.eyebrow,
.section-kicker,
.profile-label {
  color: var(--brand-strong);
  font-size: 0.69rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.hero .eyebrow,
.profile-card .profile-label {
  color: var(--brand-strong);
}

.hero h1 {
  max-width: 760px;
  margin: 0.8rem 0 1.25rem;
  color: var(--ink);
  font-size: clamp(4.5rem, 10vw, 8.5rem);
  font-weight: 500;
  line-height: 0.88;
}

.role-line,
.hero-role,
.typing-line,
.hero-summary {
  max-width: 700px;
  color: var(--muted);
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  font-weight: 400;
}

.role-line span,
.hero-role strong,
.typing-line strong,
.typing-line span {
  color: var(--ink);
}

.keyword-row,
.research-tags {
  gap: 0.5rem 1.2rem;
  margin-top: 1.8rem;
}

.keyword-row span,
.research-tags span {
  padding: 0;
  color: var(--muted);
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 0.78rem;
  font-weight: 500;
}

.hero .keyword-row span {
  color: var(--muted);
  border: 0;
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;
}

.keyword-row span::before,
.research-tags span::before {
  content: "\2022";
  margin-right: 0.45rem;
  color: var(--brand);
}

.hero-actions {
  gap: 0.7rem;
  margin-top: 2rem;
}

.button,
.filter-button,
.quote-button {
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease;
}

.button {
  min-height: 44px;
  padding: 0.75rem 1.1rem;
  border-radius: 0;
  box-shadow: none;
  font-size: 0.8rem;
  font-weight: 600;
}

.button.primary {
  color: var(--bg-elevated);
  border-color: var(--ink);
  background: var(--ink);
}

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

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

.button:hover,
.button:focus-visible {
  transform: none;
  box-shadow: none;
}

.hero-social,
.hero-links {
  gap: 1.2rem;
  margin-top: 1.2rem;
}

.hero-social a,
.hero-links a {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 500;
}

.hero .hero-social a {
  color: var(--muted);
}

.profile-card,
.hero-profile {
  max-width: 380px;
  justify-self: end;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.hero-photo-frame,
.theme-photo-frame {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.hero-photo-frame img,
.about-media img {
  filter: saturate(0.72) contrast(0.96);
}

.profile-card-body,
.profile-panel {
  position: static;
  margin: 1.2rem 0 0;
  padding: 1.2rem 0 0;
  color: var(--ink);
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.profile-card h2,
.profile-panel h2 {
  color: var(--ink);
  font-size: 1.35rem;
  line-height: 1.15;
}

.profile-card .profile-facts,
.profile-facts {
  border-color: var(--line);
}

.profile-card .profile-facts div,
.profile-facts div {
  border-color: var(--line);
}

.profile-card .profile-facts dt,
.profile-card .profile-facts dd,
.profile-facts dt,
.profile-facts dd {
  color: var(--muted);
}

.section {
  padding-block: var(--section);
  border-bottom: 1px solid var(--line);
  background: transparent !important;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(120px, 0.22fr) minmax(0, 0.78fr);
  align-items: start;
  gap: 2rem;
  margin-bottom: clamp(2.5rem, 5vw, 4.5rem);
}

.section-heading .section-kicker {
  grid-row: 1 / span 2;
}

.section-heading h2 {
  max-width: 980px;
  margin: 0;
  font-size: clamp(2.5rem, 5.5vw, 5.25rem);
  font-weight: 500;
  line-height: 0.98;
  overflow-wrap: normal;
  word-break: normal;
}

.section-heading > p:not(.section-kicker) {
  max-width: 680px;
  margin-top: 1rem;
  color: var(--muted);
}

.about-layout {
  gap: clamp(2rem, 6vw, 6rem);
}

.about-media {
  max-width: 430px;
}

.about-copy p {
  color: var(--muted);
  font-size: 1.02rem;
}

blockquote {
  padding: 1.5rem 0;
  color: var(--ink);
  border: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
  font-weight: 400;
}

.interest-layout,
.visual-card-grid,
.course-grid,
.collaborator-grid,
.group-grid,
.contact-card-grid,
.gallery-grid {
  gap: 0;
}

.interest-card,
.visual-card,
.course-column,
.publication,
.collaborator-card,
.group-card,
.contact-card,
.research-detail-card,
.early-work-card,
.archive-item,
.toolkit-module {
  color: var(--ink);
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent !important;
  box-shadow: none !important;
}

.interest-card:hover,
.visual-card:hover,
.publication:hover,
.collaborator-card:hover,
.group-card:hover,
.contact-card:hover,
.gallery-item:hover,
.toolkit-module:hover {
  border-color: var(--ink);
  transform: none;
  box-shadow: none;
}

.interest-card::before,
.visual-card::before,
.publication::before,
.collaborator-card::before,
.group-card::before,
.contact-card::before {
  display: none;
}

.interest-card,
.visual-card,
.course-column,
.group-card,
.contact-card,
.toolkit-module {
  padding: 1.5rem 0;
}

.interest-card h3,
.visual-card h3,
.course-column h3,
.group-card h4,
.contact-card h3,
.toolkit-module h3 {
  font-size: 1.15rem;
}

.interest-card p,
.visual-card p,
.group-card p,
.contact-card p {
  color: var(--muted);
}

.interest-visual-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.visual-card svg {
  max-height: 190px;
  color: var(--brand);
  opacity: 0.68;
}

.filter-bar {
  gap: 1rem;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.filter-button {
  padding: 0.45rem 0;
  color: var(--muted);
  border: 0;
  border-bottom: 1px solid transparent;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font-size: 0.76rem;
  font-weight: 600;
}

.filter-button:hover,
.filter-button:focus-visible,
.filter-button.active {
  color: var(--ink);
  border-color: var(--ink);
  background: transparent;
  transform: none;
}

.publication-list {
  gap: 0;
}

.publication {
  grid-template-columns: 88px minmax(0, 1fr);
  padding: 1.7rem 0;
}

.pub-index {
  color: var(--muted);
  font-size: 0.75rem;
}

.status-pill {
  padding: 0;
  color: var(--brand-strong);
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 0.7rem;
  font-weight: 700;
}

.pub-body h3 {
  margin-top: 0.45rem;
  font-size: clamp(1.2rem, 2vw, 1.6rem);
}

.course-grid {
  border-bottom: 1px solid var(--line);
}

.course-column {
  padding-right: 2rem;
}

.course-column + .course-column {
  padding-left: 2rem;
  border-left: 1px solid var(--line);
}

.course-list li {
  border-color: var(--line);
}

.toolkit-console {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.toolkit-status {
  padding: 0 0 1.2rem;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  background: transparent;
}

.skills-grid {
  gap: 0;
}

.toolkit-module + .toolkit-module {
  padding-left: 2rem;
  border-left: 1px solid var(--line);
}

.skill-meter {
  height: 2px;
  background: var(--line);
}

.skill-meter span {
  background: var(--brand);
}

.skill-badge {
  padding: 0;
  color: var(--muted);
  border: 0;
  border-radius: 0;
  background: transparent;
}

.toolkit-footer {
  border-color: var(--line);
}

.journey-timeline {
  max-width: none;
}

.journey-timeline::before {
  left: 7px;
  background: var(--line);
}

.timeline-item {
  margin-left: 2.5rem;
  padding: 0 0 2.5rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.timeline-item::before {
  left: -2.5rem;
  width: 15px;
  height: 15px;
  border: 3px solid var(--bg);
  background: var(--brand);
  box-shadow: 0 0 0 1px var(--line);
}

.timeline-item time {
  color: var(--brand-strong);
  font-size: 0.72rem;
}

.collaborator-category + .collaborator-category {
  margin-top: 4rem;
}

.collaborator-card {
  grid-template-columns: 70px minmax(0, 1fr);
  padding: 1.5rem 0;
}

.collaborator-card img {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  filter: saturate(0.55);
}

.collaborator-links a {
  color: var(--ink);
}

.gallery-preview-card {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.gallery-preview-stack {
  border-radius: 0;
}

.gallery-preview-stack span {
  border-radius: 0;
}

.contact-layout {
  align-items: start;
}

.contact-card-grid {
  border-bottom: 1px solid var(--line);
}

.contact-card {
  min-height: 160px;
  padding-right: 1.5rem;
}

.site-footer {
  color: var(--muted);
  border-top: 0;
  background: var(--bg);
}

.footer-layout {
  min-height: 110px;
}

.reveal,
.reveal.is-visible {
  opacity: 1;
  filter: none;
  transform: none;
  transition: none;
}

/* Gallery */
.gallery-page .site-header {
  color: var(--ink);
  background: color-mix(in srgb, var(--bg) 94%, transparent);
}

.gallery-hero {
  min-height: 68vh;
  color: #fff;
}

.gallery-hero-bg {
  background:
    linear-gradient(90deg, rgba(16, 20, 17, 0.76), rgba(16, 20, 17, 0.18)),
    url("assets/research/research-workspace.png") center / cover;
  filter: saturate(0.65);
}

.gallery-hero h1 {
  max-width: 900px;
  font-size: clamp(3.5rem, 8vw, 7rem);
  font-weight: 500;
  line-height: 0.92;
}

.gallery-page-grid {
  gap: 1px;
  background: var(--line);
}

.gallery-item {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.gallery-item figcaption {
  left: 0;
  right: auto;
  bottom: 0;
  padding: 0.65rem 0.8rem;
  border-radius: 0;
  background: rgba(15, 18, 16, 0.82);
  font-size: 0.76rem;
  font-weight: 500;
}

.gallery-lightbox {
  border-radius: 0;
}

/* Research detail */
.research-detail-hero {
  min-height: auto;
  padding-block: clamp(5rem, 10vw, 9rem);
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  background: transparent !important;
}

.research-detail-hero h1 {
  max-width: 1000px;
  color: var(--ink);
  font-size: clamp(3.5rem, 6.6vw, 6.5rem);
  font-weight: 500;
  line-height: 0.92;
  overflow-wrap: normal;
}

.research-detail-hero p {
  color: var(--muted) !important;
}

.research-detail-grid,
.concept-grid,
.active-direction-grid {
  gap: 0;
}

.research-detail-card,
.early-work-card,
.archive-item {
  padding: 1.5rem 0;
}

.research-compass {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.research-compass line,
.research-compass .compass-ring {
  stroke: var(--line);
}

.research-compass .compass-node circle {
  fill: var(--bg-elevated);
  stroke: var(--brand);
}

.research-compass .compass-node text {
  fill: var(--ink);
  font-weight: 600;
}

.research-compass .compass-node.center circle {
  fill: var(--brand-strong);
}

.research-compass .compass-node.center text {
  fill: var(--bg-elevated);
}

/* CV */
.cv-main {
  padding-block: clamp(3rem, 7vw, 6rem);
}

.cv-hero {
  padding-bottom: 3rem;
  border-bottom: 2px solid var(--ink);
}

.cv-hero h1 {
  font-size: clamp(3.5rem, 9vw, 7rem);
  font-weight: 500;
}

.cv-section {
  display: grid;
  grid-template-columns: minmax(130px, 0.25fr) minmax(0, 0.75fr);
  gap: 2rem;
  padding-block: 2.5rem;
  border-bottom: 1px solid var(--line);
}

.cv-section h2 {
  margin: 0;
  font-size: 0.75rem;
  text-transform: uppercase;
}

.cv-entry {
  padding: 0 0 1.5rem;
  border: 0;
}

/* MAB game */
.mab-game-page {
  background: var(--bg);
}

.game-shell,
.game-panel,
.game-card,
.mab-game,
.mab-game-board,
.mab-reveal {
  border-radius: 0 !important;
  background: var(--bg-elevated) !important;
  box-shadow: none !important;
}

.arm-button,
.game-control {
  border-radius: 0 !important;
  box-shadow: none !important;
}

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

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

  .profile-card,
  .hero-profile {
    width: min(100%, 420px);
    max-width: none;
    justify-self: start;
  }

  .hero h1 {
    font-size: clamp(4rem, 18vw, 7rem);
  }

  .section-heading {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }

  .section-heading .section-kicker {
    grid-row: auto;
  }

  .section-heading h2 {
    font-size: clamp(2.5rem, 10vw, 4rem);
  }

  .course-grid,
  .skills-grid,
  .collaborator-grid,
  .group-grid,
  .contact-card-grid {
    grid-template-columns: 1fr;
  }

  .course-column + .course-column,
  .toolkit-module + .toolkit-module {
    padding-left: 0;
    border-left: 0;
  }

  .cv-section {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

@media (max-width: 720px) {
  .site-header {
    backdrop-filter: blur(18px);
  }

  .nav-links {
    border-top: 1px solid var(--line);
    background: var(--bg);
  }

  .nav-links a,
  .nav-more summary {
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--line);
  }

  .quote-card {
    align-items: start;
  }

  .hero {
    padding-top: 3.5rem;
  }

  .hero h1 {
    font-size: clamp(3.7rem, 20vw, 5.4rem);
  }

  .hero-actions {
    align-items: stretch;
  }

  .hero-actions .button {
    justify-content: center;
  }

  .interest-visual-grid {
    grid-template-columns: 1fr;
  }

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

  .filter-bar {
    align-items: flex-start;
  }

  .filter-group {
    justify-content: flex-start;
  }

  .collaborator-card {
    grid-template-columns: 54px minmax(0, 1fr);
  }

  .collaborator-card img {
    width: 48px;
    height: 48px;
  }

  .gallery-hero h1,
  .research-detail-hero h1 {
    font-size: clamp(3rem, 14vw, 5rem);
  }
}

@media (max-width: 480px) {
  .gallery-page-grid {
    column-count: 1;
  }
}

/* Palette experiment disabled.
html[data-theme="light"] {
  --bg: #c5b3a1;
  --bg-elevated: #fff8ee;
  --ink: #0b0b0b;
  --muted: #554b43;
  --line: #8f7d6d;
  --brand: #d91582;
  --brand-strong: #9e0f60;
  --accent: #ef2dab;
  --amber: #a6ce00;
  --spice-citron: #d4ff3f;
  --spice-coral: #ef2dab;
  --spice-blue: #c9b7a5;
  --spice-cream: #fff4e7;
  --spice-yellow: #d4ff3f;
  --spice-mint: #e5f5a8;
  --spice-teal: #272323;
  --spice-ink: #0b0b0b;
}

html[data-theme="light"] body,
html[data-theme="light"] .site-footer {
  background: #c5b3a1;
}

html[data-theme="light"] .site-header,
html[data-theme="light"] .nav-links,
html[data-theme="light"] .nav-more-menu {
  color: #0b0b0b;
  background: #fff8ee;
}

html[data-theme="light"] .quote-strip {
  color: #f8f3ea;
  border-color: #0b0b0b;
  background: #0b0b0b;
}

html[data-theme="light"] .quote-card p,
html[data-theme="light"] .quote-card p::before,
html[data-theme="light"] .quote-button {
  color: #ef2dab;
}

html[data-theme="light"] .quote-button {
  border-color: #ef2dab;
}

html[data-theme="light"] .hero {
  background: #c5b3a1 !important;
}

html[data-theme="light"] .hero h1 {
  color: #0b0b0b;
}

html[data-theme="light"] .profile-card {
  border-color: #0b0b0b;
  background: #fff8ee;
  box-shadow: 18px 18px 0 #ef2dab;
}

html[data-theme="light"] .about-section,
html[data-theme="light"] .coursework-section,
html[data-theme="light"] .gallery-preview-section,
html[data-theme="light"] .current-work-section {
  background: #fff8ee !important;
}

html[data-theme="light"] .interests-section,
html[data-theme="light"] .research-detail-hero,
html[data-theme="light"] .teaching-section,
html[data-theme="light"] .concepts-section {
  color: #0b0b0b;
  background: #d4ff3f !important;
}

html[data-theme="light"] .publications-section,
html[data-theme="light"] .collaborators-section {
  color: #0b0b0b;
  background: #ef2dab !important;
}

html[data-theme="light"] .publications-section .publication,
html[data-theme="light"] .collaborator-card,
html[data-theme="light"] .group-card {
  border-color: rgba(11, 11, 11, 0.35);
  background: #fff5f9 !important;
}

html[data-theme="light"] .publications-section .publication:hover,
html[data-theme="light"] .collaborator-card:hover,
html[data-theme="light"] .group-card:hover {
  background: #ffffff !important;
}

html[data-theme="light"] .skills-section,
html[data-theme="light"] .contact-section {
  color: #f8f3ea;
  background: #0b0b0b !important;
}

html[data-theme="light"] .skills-section .section-heading h2 {
  color: #ef2dab;
}

html[data-theme="light"] .skills-section .section-heading .section-kicker,
html[data-theme="light"] .contact-section .button.secondary {
  color: #0b0b0b;
  background: #d4ff3f;
  border-color: #d4ff3f;
}

html[data-theme="light"] .timeline-item {
  border-color: #0b0b0b;
  border-left-color: #ef2dab;
  background: #fff8ee;
}

html[data-theme="light"] .gallery-section {
  background: #c5b3a1 !important;
}

html[data-theme="light"] .shared-papers-dialog {
  color: #0b0b0b;
  border-color: #0b0b0b;
  background: #d4ff3f;
  box-shadow: 18px 18px 0 #ef2dab;
}

html[data-theme="light"] .shared-papers-dialog h2,
html[data-theme="light"] .shared-papers-dialog h3,
html[data-theme="light"] .shared-papers-dialog a,
html[data-theme="light"] .shared-papers-dialog .dialog-close {
  color: #0b0b0b;
}

html[data-theme="light"] .shared-papers-dialog article p {
  color: #39430f;
}

html[data-theme="dark"] {
  --bg: #0b0b0b;
  --bg-elevated: #151315;
  --ink: #f7f2e9;
  --muted: #bbb3ab;
  --line: #494349;
  --brand: #ef2dab;
  --brand-strong: #ff75c6;
  --accent: #d4ff3f;
  --amber: #d4ff3f;
  --spice-citron: #d4ff3f;
  --spice-coral: #ef2dab;
  --spice-blue: #171417;
  --spice-cream: #171417;
  --spice-yellow: #d4ff3f;
  --spice-mint: #171417;
  --spice-teal: #ef2dab;
  --spice-ink: #0b0b0b;
}

html[data-theme="dark"] body,
html[data-theme="dark"] .site-footer,
html[data-theme="dark"] .site-header,
html[data-theme="dark"] .nav-links,
html[data-theme="dark"] .nav-more-menu {
  background: #0b0b0b;
}

html[data-theme="dark"] .quote-strip {
  color: #0b0b0b;
  border-color: #d4ff3f;
  background: #d4ff3f;
}

html[data-theme="dark"] .quote-card p,
html[data-theme="dark"] .quote-card p::before,
html[data-theme="dark"] .quote-button {
  color: #0b0b0b;
}

html[data-theme="dark"] .quote-button {
  border-color: #0b0b0b;
}

html[data-theme="dark"] .hero {
  background: #0b0b0b !important;
}

html[data-theme="dark"] .hero h1 {
  color: #ef2dab;
}

html[data-theme="dark"] .hero .eyebrow,
html[data-theme="dark"] .hero .keyword-row span::before {
  color: #d4ff3f;
}

html[data-theme="dark"] .hero .button.primary {
  color: #0b0b0b;
  border-color: #d4ff3f;
  background: #d4ff3f;
}

html[data-theme="dark"] .hero .button.secondary {
  color: #f7f2e9;
  border-color: #ef2dab;
  background: transparent;
}

html[data-theme="dark"] .profile-card {
  border-color: #ef2dab;
  background: #151315;
  box-shadow: 18px 18px 0 #d4ff3f;
}

html[data-theme="dark"] .about-section,
html[data-theme="dark"] .coursework-section,
html[data-theme="dark"] .gallery-preview-section,
html[data-theme="dark"] .gallery-section,
html[data-theme="dark"] .current-work-section,
html[data-theme="dark"] .decision-section {
  background: #111011 !important;
}

html[data-theme="dark"] .interests-section,
html[data-theme="dark"] .research-detail-hero,
html[data-theme="dark"] .teaching-section,
html[data-theme="dark"] .concepts-section {
  color: #0b0b0b;
  background: #d4ff3f !important;
}

html[data-theme="dark"] .interests-section h2,
html[data-theme="dark"] .interests-section h3,
html[data-theme="dark"] .interests-section p,
html[data-theme="dark"] .research-detail-hero h1,
html[data-theme="dark"] .research-detail-hero p,
html[data-theme="dark"] .teaching-section h2,
html[data-theme="dark"] .teaching-section h3,
html[data-theme="dark"] .concepts-section h2,
html[data-theme="dark"] .concepts-section h3 {
  color: #0b0b0b;
}

html[data-theme="dark"] .interests-section .interest-card,
html[data-theme="dark"] .interests-section .visual-card,
html[data-theme="dark"] .research-detail-card,
html[data-theme="dark"] .early-work-card,
html[data-theme="dark"] .timeline-item {
  color: #0b0b0b;
  border-color: rgba(11, 11, 11, 0.45);
  background: #efffba !important;
}

html[data-theme="dark"] .interests-section .interest-card:hover,
html[data-theme="dark"] .interests-section .visual-card:hover,
html[data-theme="dark"] .research-detail-card:hover,
html[data-theme="dark"] .early-work-card:hover {
  color: #0b0b0b;
  border-color: #0b0b0b;
  background: #ffffff !important;
}

html[data-theme="dark"] .interests-section .visual-card svg,
html[data-theme="dark"] .research-compass {
  color: #0b0b0b;
}

html[data-theme="dark"] .publications-section,
html[data-theme="dark"] .collaborators-section {
  background: #ef2dab !important;
}

html[data-theme="dark"] .publications-section h2,
html[data-theme="dark"] .collaborators-section h2,
html[data-theme="dark"] .collaborators-section h3 {
  color: #0b0b0b;
}

html[data-theme="dark"] .publications-section .publication,
html[data-theme="dark"] .collaborator-card,
html[data-theme="dark"] .group-card {
  color: #f7f2e9;
  border-color: #ef2dab;
  background: #0b0b0b !important;
}

html[data-theme="dark"] .publications-section .publication:hover,
html[data-theme="dark"] .collaborator-card:hover,
html[data-theme="dark"] .group-card:hover {
  color: #f7f2e9;
  border-color: #d4ff3f;
  background: #201a20 !important;
}

html[data-theme="dark"] .publications-section .publication h3,
html[data-theme="dark"] .publications-section .publication p,
html[data-theme="dark"] .collaborator-card h4,
html[data-theme="dark"] .collaborator-card p,
html[data-theme="dark"] .collaborator-card span,
html[data-theme="dark"] .collaborator-links a,
html[data-theme="dark"] .collaborator-links button,
html[data-theme="dark"] .group-card h4,
html[data-theme="dark"] .group-card p,
html[data-theme="dark"] .group-card span {
  color: inherit;
}

html[data-theme="dark"] .skills-section,
html[data-theme="dark"] .contact-section {
  background: #0b0b0b !important;
}

html[data-theme="dark"] .skills-section .section-heading h2,
html[data-theme="dark"] .contact-section .section-kicker {
  color: #ef2dab;
}

html[data-theme="dark"] .skills-section .section-heading .section-kicker,
html[data-theme="dark"] .contact-section .button.secondary {
  color: #0b0b0b;
  border-color: #d4ff3f;
  background: #d4ff3f;
}

html[data-theme="dark"] .shared-papers-dialog {
  color: #f7f2e9;
  border-color: #ef2dab;
  background: #0b0b0b;
  box-shadow: 18px 18px 0 #d4ff3f;
}

html[data-theme="dark"] .shared-papers-dialog .section-kicker {
  color: #0b0b0b;
  background: #ef2dab;
}

*/

/* Keep the rotating quote prominent and visually centered. */
.quote-card {
  position: relative;
  justify-content: center;
  min-height: 68px;
  padding-inline: 7rem;
  text-align: center;
}

.quote-card p {
  max-width: 900px;
  font-weight: 700;
}

.quote-card .quote-button {
  position: absolute;
  right: 0;
}

@media (max-width: 720px) {
  .quote-card {
    align-items: center;
    flex-direction: column;
    padding-inline: 0;
    text-align: center;
  }

  .quote-card .quote-button {
    position: static;
  }
}

/* Unified typography system. */
html {
  font-size: 17px;
}

body,
button,
input,
select,
textarea {
  font-family: "DM Sans", "Segoe UI", Arial, sans-serif;
  font-size: 1rem;
  font-weight: 400;
}

body,
p,
li,
dd,
.hero-summary,
.role-line,
.typing-line {
  line-height: 1.62;
}

h1,
h2,
h3,
h4,
.brand-copy strong,
.button,
.filter-button,
.status-pill,
.nav-links a,
.nav-more summary {
  font-family: "Space Grotesk", "Segoe UI", Arial, sans-serif;
}

h1,
h2,
h3,
h4,
p,
span,
a,
button,
small,
dt,
dd,
li {
  letter-spacing: 0;
}

.brand-copy strong {
  font-size: 1rem;
  font-weight: 700;
}

.brand-copy small {
  font-size: 0.82rem;
  font-weight: 500;
}

.nav-links a,
.nav-more summary {
  font-size: 0.86rem;
  font-weight: 600;
}

.quote-card p {
  font-family: "Newsreader", Georgia, serif;
  font-size: 1.08rem;
  font-weight: 500;
  line-height: 1.35;
}

.quote-card p::before,
.quote-button {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
}

.eyebrow,
.section-kicker,
.profile-label {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0;
}

.hero h1 {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(4.5rem, 9.2vw, 8rem);
  font-weight: 600;
  line-height: 0.9;
}

.role-line,
.typing-line,
.hero-summary {
  font-size: clamp(1.08rem, 1.45vw, 1.25rem);
}

.keyword-row span,
.research-tags span,
.hero-social a,
.hero-links a {
  font-size: 0.88rem;
  font-weight: 500;
}

.button {
  font-size: 0.88rem;
  font-weight: 700;
}

.profile-card h2,
.profile-panel h2 {
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
  font-weight: 600;
  line-height: 1.12;
}

.profile-facts dt {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
}

.profile-facts dd {
  font-size: 1rem;
  font-weight: 600;
}

.section-heading h2 {
  font-size: clamp(2.55rem, 4vw, 3.9rem);
  font-weight: 600;
  line-height: 0.98;
}

.section-heading > p:not(.section-kicker) {
  font-size: 1.05rem;
}

.about-copy p,
.interest-card p,
.visual-card p,
.group-card p,
.contact-card p,
.timeline-item p,
.pub-body p,
.accepted-paper-details p {
  font-size: 1rem;
}

blockquote {
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  line-height: 1.3;
}

.interest-card h3,
.visual-card h3,
.course-column h3,
.group-card h4,
.contact-card h3,
.toolkit-module h3,
.timeline-item h3,
.collaborator-card h4 {
  font-size: 1.2rem;
  font-weight: 650;
  line-height: 1.2;
}

.filter-button {
  font-size: 0.88rem;
  font-weight: 650;
}

.pub-index,
.status-pill,
.timeline-item time,
.contact-card > span,
.module-head > span {
  font-size: 0.82rem;
  font-weight: 700;
}

.pub-body h3 {
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
  font-weight: 650;
}

.course-list li,
.course-list span,
.skill-badge,
.toolkit-footer,
.collaborator-card p,
.collaborator-card span,
.collaborator-links a {
  font-size: 0.92rem;
}

.skills-section .section-heading h2 {
  max-width: 980px;
  font-size: clamp(2.55rem, 4vw, 3.9rem);
  font-weight: 600;
}

.toolkit-status {
  font-size: 0.95rem;
}

.gallery-item figcaption {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
}

.research-detail-hero h1 {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(3.5rem, 6.2vw, 6.25rem);
  font-weight: 600;
}

.research-detail-card h3,
.early-work-card h3,
.archive-item h3 {
  font-size: 1.25rem;
  line-height: 1.2;
}

.cv-hero h1 {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(3.8rem, 8vw, 6.5rem);
  font-weight: 600;
}

.cv-section h2 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
}

.cv-entry strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.08rem;
  font-weight: 650;
}

.cv-entry span,
.cv-entry p,
.cv-section > p {
  font-size: 0.98rem;
}

@media (max-width: 720px) {
  html {
    font-size: 16px;
  }

  .hero h1 {
    font-size: clamp(3.7rem, 18vw, 5.25rem);
  }

  .section-heading h2 {
    font-size: clamp(2.15rem, 9vw, 3rem);
  }

  .nav-links a,
  .nav-more summary {
    font-size: 0.95rem;
  }

  .filter-button,
  .keyword-row span,
  .research-tags span,
  .hero-social a,
  .hero-links a,
  .pub-index,
  .status-pill,
  .timeline-item time,
  .contact-card > span {
    font-size: 0.88rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* Editorial color pass: lively without becoming noisy. */
:root {
  --spice-citron: #dfe9a8;
  --spice-coral: #ef765f;
  --spice-blue: #c9dff0;
  --spice-cream: #f6e8d1;
  --spice-yellow: #edc85f;
  --spice-mint: #c7e2d4;
  --spice-teal: #397f78;
  --spice-ink: #12211c;
}

.quote-strip {
  color: #241b18;
  border-color: #d75f4b;
  background: var(--spice-coral);
}

.quote-card p,
.quote-card p::before,
.quote-button {
  color: #241b18;
}

.quote-button {
  border-color: #241b18;
}

.hero {
  background: var(--spice-citron) !important;
}

.hero .eyebrow {
  color: #225b49;
}

.hero h1 {
  color: #14201a;
}

.hero .role-line,
.hero .typing-line,
.hero .hero-summary,
.hero .hero-social a,
.hero .keyword-row span {
  color: #536157;
}

.hero .role-line span,
.hero .typing-line span {
  color: #14201a;
}

.hero .button.primary {
  color: #fff;
  border-color: #173f35;
  background: #173f35;
}

.hero .button.secondary {
  color: #14201a;
  border-color: rgba(20, 32, 26, 0.35);
  background: rgba(255, 255, 255, 0.28);
}

.profile-card {
  padding: 0.75rem;
  border: 1px solid rgba(20, 32, 26, 0.28);
  background: #f8f5e9;
  box-shadow: 18px 18px 0 #173f35;
}

.profile-card-body {
  padding-inline: 0.25rem;
}

.profile-card .profile-label {
  color: #b74936;
}

.profile-card .profile-facts div {
  border-color: #d4d4c8;
}

.section-heading .section-kicker {
  width: fit-content;
  padding: 0.42rem 0.58rem;
  color: #fff;
  border-radius: 2px;
  background: var(--spice-ink);
}

.about-section {
  background: #fffaf0 !important;
}

.about-media {
  padding: 0.7rem;
  border: 1px solid #262c28;
  background: var(--spice-coral);
  box-shadow: 14px 14px 0 var(--spice-yellow);
}

.about-media img {
  filter: saturate(0.9) contrast(0.98);
}

.interests-section {
  background: var(--spice-blue) !important;
}

.interests-section .interest-card,
.interests-section .visual-card {
  padding: 1.35rem;
  border: 1px solid rgba(18, 33, 28, 0.2);
  background: rgba(255, 255, 255, 0.5) !important;
}

.interests-section .interest-card:hover,
.interests-section .visual-card:hover {
  background: #fff !important;
}

.interests-section .visual-card:nth-child(1) {
  border-top: 7px solid var(--spice-coral);
}

.interests-section .visual-card:nth-child(2) {
  border-top: 7px solid var(--spice-yellow);
}

.interests-section .visual-card:nth-child(3) {
  border-top: 7px solid var(--spice-teal);
}

.interests-section .visual-card:nth-child(4) {
  border-top: 7px solid #3c82a4;
}

.interests-section .visual-card:nth-child(5) {
  border-top: 7px solid #173f35;
}

.interests-section .network-visual {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(240px, 0.36fr) minmax(0, 0.64fr);
  align-items: center;
  gap: clamp(1.5rem, 4vw, 4rem);
  min-height: 480px;
}

.interests-section .network-visual .network-svg {
  width: 100%;
  max-height: none;
  min-height: 390px;
}

.publications-section {
  background: var(--spice-cream) !important;
}

.publications-section .filter-bar {
  border-color: rgba(18, 33, 28, 0.25);
}

.publications-section .publication {
  padding: 1.6rem;
  border: 1px solid rgba(18, 33, 28, 0.18);
  border-bottom: 0;
  background: rgba(255, 255, 255, 0.62) !important;
}

.publications-section .publication:last-child {
  border-bottom: 1px solid rgba(18, 33, 28, 0.18);
}

.publications-section .publication:hover {
  background: #fff !important;
}

.publications-section .status-pill {
  display: inline-block;
  padding: 0.28rem 0.48rem;
  color: #fff;
  background: #28715c;
}

.publications-section .publication[data-status="review"] .status-pill {
  color: #281915;
  background: var(--spice-coral);
}

.publications-section .publication[data-status="working"] .status-pill {
  color: #fff;
  background: #3c6579;
}

.paper-title-link {
  color: inherit;
  text-decoration-color: var(--spice-coral);
  text-decoration-line: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.18em;
}

.paper-title-link:hover,
.paper-title-link:focus-visible {
  color: #9d3e2f;
  text-decoration-thickness: 4px;
}

.coursework-section {
  background: #fffdf8 !important;
}

.course-grid {
  border: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.course-column {
  padding: 1.75rem;
}

.course-column:nth-child(1) {
  border-top: 7px solid var(--spice-coral);
}

.course-column:nth-child(2) {
  border-top: 7px solid #3c82a4;
}

.course-column:nth-child(3) {
  border-top: 7px solid var(--spice-yellow);
}

.skills-section {
  color: #f4f0e6;
  background: #173f35 !important;
}

.skills-section .section-heading h2,
.skills-section .section-heading > p:not(.section-kicker),
.skills-section .toolkit-status,
.skills-section .toolkit-module h3,
.skills-section .module-head span,
.skills-section .skill-badge,
.skills-section .toolkit-footer {
  color: #f4f0e6;
}

.skills-section .section-heading h2 {
  max-width: 760px;
  font-size: clamp(2.8rem, 4.5vw, 4.2rem);
}

.skills-section .section-heading .section-kicker {
  color: #173f35;
  background: var(--spice-yellow);
}

.skills-section .toolkit-status,
.skills-section .toolkit-module,
.skills-section .toolkit-footer,
.skills-section .toolkit-module + .toolkit-module {
  border-color: rgba(255, 255, 255, 0.2);
}

.skills-section .skill-meter {
  background: rgba(255, 255, 255, 0.2);
}

.skills-section .skill-meter span {
  background: var(--spice-yellow);
}

.skills-section .signal-dot {
  background: var(--spice-coral);
}

.skills-section .toolkit-module:hover,
.skills-section .toolkit-module:focus-within {
  color: #f4f0e6;
  border-color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.06) !important;
}

.skills-section .skill-badge:hover,
.skills-section .skill-badge:focus-visible,
.skills-section .skill-badge.is-active {
  color: #173f35 !important;
  border-color: var(--spice-yellow) !important;
  background: var(--spice-yellow) !important;
  box-shadow: none;
  transform: none;
}

.skills-section .skill-badge:hover::before,
.skills-section .skill-badge:focus-visible::before,
.skills-section .skill-badge.is-active::before {
  display: none;
}

.teaching-section {
  background: #fff8eb !important;
}

.timeline-item {
  padding: 1.35rem 1.5rem 1.5rem;
  border: 1px solid #ddd3c4;
  border-left: 5px solid var(--spice-coral);
  background: #fff;
}

.timeline-item + .timeline-item {
  margin-top: 0.75rem;
}

.timeline-item::before {
  left: -2.9rem;
  background: var(--spice-coral);
}

.collaborators-section {
  background: var(--spice-mint) !important;
}

.collaborator-card,
.group-card {
  padding: 1.25rem;
  border: 1px solid rgba(18, 33, 28, 0.2);
  background: rgba(255, 255, 255, 0.62) !important;
}

.collaborator-card:hover,
.group-card:hover {
  background: #fff !important;
}

.collaborator-card img {
  border: 3px solid #fff;
  box-shadow: 0 0 0 1px rgba(18, 33, 28, 0.18);
}

.gallery-preview-section {
  background: #fffaf0 !important;
}

.gallery-preview-card {
  padding: clamp(1.5rem, 4vw, 3rem);
  border: 1px solid var(--line);
  background: #fff !important;
}

.gallery-preview-stack {
  border: 8px solid var(--spice-teal);
}

.contact-section {
  color: #f7f1e8;
  background: #19201c !important;
}

.contact-section .section-kicker {
  color: #19201c;
  background: var(--spice-coral);
}

.contact-section h2,
.contact-section h3,
.contact-section p,
.contact-section .contact-card span,
.contact-section .contact-card a {
  color: #f7f1e8;
}

.contact-section .contact-card {
  padding: 1.4rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.04) !important;
}

.contact-section .contact-card:hover {
  border-color: var(--spice-coral);
  background: rgba(255, 255, 255, 0.08) !important;
}

.contact-section .button.secondary {
  color: #19201c;
  border-color: var(--spice-yellow);
  background: var(--spice-yellow);
}

.gallery-section {
  background: #e5f0ed !important;
}

.gallery-page-grid {
  display: block;
  padding: 0;
  column-count: 3;
  column-gap: 10px;
  background: transparent;
}

.gallery-page-grid .gallery-item {
  display: inline-block;
  width: 100%;
  margin: 0 0 10px;
  break-inside: avoid;
  border: 0;
  background: transparent;
}

.gallery-page-grid .gallery-item img {
  display: block;
  width: 100%;
  height: auto;
  min-height: 0;
  aspect-ratio: auto;
  border-radius: 2px;
}

.gallery-page-grid .gallery-item:first-child {
  grid-row: auto;
}

.gallery-lightbox figure {
  grid-template-rows: minmax(0, 1fr);
}

.collaborator-links button {
  padding: 0;
  color: var(--ink);
  border: 0;
  border-bottom: 1px solid currentColor;
  border-radius: 0;
  background: transparent;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.shared-papers-dialog {
  width: min(680px, calc(100vw - 2rem));
  padding: clamp(1.25rem, 4vw, 2.25rem);
  color: #173f35;
  border: 1px solid #c86552;
  border-radius: 2px;
  background: #f3d5c9;
  box-shadow: 18px 18px 0 var(--spice-teal);
}

.shared-papers-dialog::backdrop {
  background: rgba(10, 17, 14, 0.76);
  backdrop-filter: blur(5px);
}

.shared-papers-dialog .dialog-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.shared-papers-dialog h2 {
  margin: 0.5rem 0 0;
  font-size: clamp(2rem, 6vw, 3.25rem);
}

.shared-papers-dialog article {
  padding: 1.25rem 0;
  border-top: 1px solid rgba(23, 63, 53, 0.25);
}

.shared-papers-dialog article h3 {
  margin: 0.65rem 0 0.35rem;
  font-size: 1.15rem;
}

.shared-papers-dialog article p {
  margin: 0;
  color: #4e625b;
}

.shared-papers-dialog h2,
.shared-papers-dialog h3,
.shared-papers-dialog a {
  color: #173f35;
}

.shared-papers-dialog .section-kicker {
  color: #173f35;
  background: var(--spice-yellow);
}

.shared-papers-dialog .status-pill {
  display: inline-block;
  padding: 0.25rem 0.45rem;
  color: #173f35;
  background: var(--spice-mint);
}

.shared-papers-dialog .status-pill.review {
  color: #281915;
  background: var(--spice-coral);
}

.dialog-close {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  padding: 0;
  color: #173f35;
  border: 1px solid rgba(23, 63, 53, 0.4);
  border-radius: 50%;
  background: transparent;
  font-size: 1.5rem;
  cursor: pointer;
}

html[data-theme="dark"] .shared-papers-dialog {
  color: #fff8e9;
  border-color: #72aaa1;
  background: #174f4a;
  box-shadow: 18px 18px 0 var(--spice-yellow);
}

html[data-theme="dark"] .shared-papers-dialog article {
  border-top-color: rgba(255, 248, 233, 0.28);
}

html[data-theme="dark"] .shared-papers-dialog article p {
  color: #cce0d9;
}

html[data-theme="dark"] .shared-papers-dialog h2,
html[data-theme="dark"] .shared-papers-dialog h3,
html[data-theme="dark"] .shared-papers-dialog a,
html[data-theme="dark"] .shared-papers-dialog .dialog-close {
  color: #fff8e9;
}

html[data-theme="dark"] .shared-papers-dialog .dialog-close {
  border-color: rgba(255, 248, 233, 0.45);
}

.research-detail-hero {
  background: var(--spice-blue) !important;
}

.research-compass {
  background: rgba(255, 255, 255, 0.48);
}

.current-work-section {
  background: #fffaf0 !important;
}

.concepts-section {
  background: var(--spice-mint) !important;
}

.decision-section {
  background: var(--spice-cream) !important;
}

.research-detail-card,
.early-work-card,
.archive-item {
  padding: 1.25rem;
  border: 1px solid rgba(18, 33, 28, 0.18);
  background: rgba(255, 255, 255, 0.62) !important;
}

html[data-theme="dark"] .quote-strip {
  background: #b95643;
}

html[data-theme="dark"] .hero {
  background: #27392d !important;
}

html[data-theme="dark"] .hero h1,
html[data-theme="dark"] .hero .role-line span,
html[data-theme="dark"] .hero .typing-line span {
  color: #f4f0e6;
}

html[data-theme="dark"] .hero .role-line,
html[data-theme="dark"] .hero .typing-line,
html[data-theme="dark"] .hero .hero-summary,
html[data-theme="dark"] .hero .hero-social a,
html[data-theme="dark"] .hero .keyword-row span {
  color: #bdc8bf;
}

html[data-theme="dark"] .profile-card {
  border-color: #789083;
  background: #1e2923;
  box-shadow: 18px 18px 0 #bd6c50;
}

html[data-theme="dark"] .about-section,
html[data-theme="dark"] .coursework-section,
html[data-theme="dark"] .teaching-section,
html[data-theme="dark"] .gallery-preview-section,
html[data-theme="dark"] .current-work-section {
  background: #191d1a !important;
}

html[data-theme="dark"] .gallery-section {
  background: #152522 !important;
}

html[data-theme="dark"] .paper-title-link:hover,
html[data-theme="dark"] .paper-title-link:focus-visible {
  color: #f1a18e;
}

html[data-theme="dark"] .interests-section,
html[data-theme="dark"] .research-detail-hero {
  background: #1c3440 !important;
}

html[data-theme="dark"] .publications-section,
html[data-theme="dark"] .decision-section {
  background: #332b22 !important;
}

html[data-theme="dark"] .collaborators-section,
html[data-theme="dark"] .concepts-section {
  background: #1d332b !important;
}

html[data-theme="dark"] .course-grid,
html[data-theme="dark"] .timeline-item,
html[data-theme="dark"] .gallery-preview-card {
  background: #222722 !important;
}

html[data-theme="dark"] .interests-section .interest-card,
html[data-theme="dark"] .interests-section .visual-card,
html[data-theme="dark"] .publications-section .publication,
html[data-theme="dark"] .research-detail-card,
html[data-theme="dark"] .early-work-card,
html[data-theme="dark"] .archive-item,
html[data-theme="dark"] .collaborator-card,
html[data-theme="dark"] .group-card {
  color: var(--ink);
  border-color: #536158;
  background: rgba(20, 27, 23, 0.72) !important;
}

html[data-theme="dark"] .interests-section .interest-card:hover,
html[data-theme="dark"] .interests-section .visual-card:hover,
html[data-theme="dark"] .publications-section .publication:hover,
html[data-theme="dark"] .research-detail-card:hover,
html[data-theme="dark"] .early-work-card:hover,
html[data-theme="dark"] .collaborator-card:hover,
html[data-theme="dark"] .group-card:hover {
  color: #f2f2ec;
  border-color: #8da598;
  background: #29322d !important;
}

html[data-theme="dark"] .interests-section .visual-card:hover h3,
html[data-theme="dark"] .interests-section .visual-card:hover p,
html[data-theme="dark"] .publications-section .publication:hover h3,
html[data-theme="dark"] .publications-section .publication:hover p {
  color: inherit;
}

@media (max-width: 900px) {
  .profile-card {
    margin-bottom: 1rem;
    box-shadow: 10px 10px 0 #173f35;
  }

  html[data-theme="dark"] .profile-card {
    box-shadow: 10px 10px 0 #bd6c50;
  }
}

@media (max-width: 720px) {
  .gallery-page-grid {
    column-count: 2;
  }

  .interests-section .network-visual {
    display: block;
    min-height: 0;
  }

  .interests-section .network-visual .network-svg {
    min-height: 300px;
  }

  .interests-section .interest-card,
  .interests-section .visual-card,
  .publications-section .publication,
  .collaborator-card,
  .group-card,
  .contact-section .contact-card {
    padding: 1rem;
  }

  .course-column {
    padding: 1.35rem;
  }

  .timeline-item {
    margin-left: 1.5rem;
  }
}

@media (max-width: 480px) {
  .gallery-page-grid {
    column-count: 1;
  }
}
