/* David Wiedemann — academic website */

:root {
  --background: #ffffff;
  --background-alt: #f6f7f9;
  --text: #101820;
  --muted: #26313d;
  --accent: #173f6b;
  --accent-dark: #0e2e50;
  --border: #dfe4ea;
  --max-width: 1120px;
  --radius: 16px;
  --shadow: 0 14px 40px rgba(23, 32, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--background);
  line-height: 1.65;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(223, 228, 234, 0.8);
}

.nav-wrap {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.brand {
  color: var(--text);
  font-weight: 750;
  letter-spacing: -0.02em;
  font-size: 1.1rem;
}

.brand:hover {
  text-decoration: none;
}

.nav {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 0.94rem;
}

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

.nav a:hover {
  color: var(--text);
  text-decoration: none;
}

.nav .nav-cv {
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
}

.hero {
  padding: 100px 0 86px;
  border-bottom: 1px solid var(--border);
  background-image:
    linear-gradient(rgba(255,255,255,0.58), rgba(255,255,255,0.68)),
    url("assets/images/background.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.75fr);
  gap: 72px;
  align-items: center;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  line-height: 1.2;
  letter-spacing: -0.025em;
}

h1 {
  margin: 0;
  font-size: clamp(3rem, 7vw, 5.7rem);
  font-weight: 780;
  letter-spacing: -0.055em;
}

h2 {
  margin: 0 0 18px;
  font-size: clamp(2rem, 4vw, 3rem);
}

h3 {
  margin: 0 0 10px;
  font-size: 1.15rem;
}

.lead {
  max-width: 760px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: clamp(1.12rem, 2vw, 1.3rem);
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 10px;
  font-weight: 700;
}

.button:hover {
  text-decoration: none;
}

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

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

.button.secondary {
  color: var(--text);
  border: 1px solid var(--border);
  background: #ffffff;
}

.profile-card {
  padding: 30px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.initials {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  margin-bottom: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: #ffffff;
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.profile-label {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.83rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.profile-value {
  margin: 0;
  font-weight: 700;
}

.profile-links {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.section {
  padding: 88px 0;
}

.section-alt {
  background: var(--background-alt);
}

.section-heading {
  max-width: 740px;
  margin-bottom: 42px;
}

.section-heading > p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.06rem;
}

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

.card {
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #ffffff;
}

.card p {
  margin-bottom: 0;
  color: var(--muted);
}

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

.publication {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 26px;
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
}

.pub-year {
  color: var(--muted);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.publication h3 {
  max-width: 850px;
  margin-bottom: 8px;
}

.publication p {
  margin: 3px 0;
}

.publication .journal {
  color: var(--muted);
}

.publication a {
  display: inline-block;
  margin-top: 7px;
  font-weight: 700;
  font-size: 0.93rem;
}

.more-link {
  margin: 28px 0 0;
  font-weight: 700;
}

.teaching-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 48px;
}

.teaching-grid ul {
  margin: 0;
  padding-left: 20px;
}

.teaching-grid p {
  margin-top: 0;
  color: var(--muted);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 60px;
  align-items: start;
}

.contact-grid p {
  color: var(--muted);
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 12px;
  font-weight: 700;
}

.footer {
  border-top: 1px solid var(--border);
}

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

@media (max-width: 820px) {
  .nav {
    display: none;
  }

  .hero {
    padding: 72px 0 64px;
  }

  .hero-grid,
  .cards,
  .teaching-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .hero-grid {
    gap: 42px;
  }

  .cards {
    gap: 14px;
  }

  .section {
    padding: 68px 0;
  }
}

@media (max-width: 560px) {
  .container {
    width: min(calc(100% - 28px), var(--max-width));
  }

  .publication {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .profile-card,
  .card {
    padding: 22px;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
  }
}


/* Clickable research cards */
.card-link {
  display: flex;
  min-height: 230px;
  flex-direction: column;
  justify-content: space-between;
  color: var(--text);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.card-link:hover {
  transform: translateY(-4px);
  border-color: #c5ced8;
  box-shadow: var(--shadow);
  text-decoration: none;
}

.card-link:focus-visible {
  outline: 3px solid rgba(23, 63, 107, 0.24);
  outline-offset: 3px;
}

.card-link p {
  color: var(--muted);
}

.card-arrow {
  display: inline-block;
  margin-top: 28px;
  color: var(--accent);
  font-size: 1.45rem;
  font-weight: 700;
  transition: transform 160ms ease;
}

.card-link:hover .card-arrow {
  transform: translateX(5px);
}

/* Research detail pages */
.subpage-hero {
  padding: 82px 0 68px;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(circle at 84% 22%, rgba(23, 63, 107, 0.09), transparent 28%),
    linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 0.92rem;
}

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

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

.subpage-title {
  max-width: 900px;
  margin: 0;
  font-size: clamp(2.8rem, 6vw, 5rem);
  letter-spacing: -0.05em;
}

.subpage-lead {
  max-width: 790px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: clamp(1.1rem, 2vw, 1.28rem);
}

.research-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 72px;
  align-items: start;
}

.research-main h2 {
  margin-top: 0;
}

.research-main h2:not(:first-child) {
  margin-top: 54px;
}

.research-main p {
  color: var(--muted);
  font-size: 1.03rem;
}

.topic-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.topic-list li {
  padding: 17px 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
  font-weight: 650;
}

.research-sidebar {
  position: sticky;
  top: 104px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--background-alt);
}

.research-sidebar h3 {
  margin-bottom: 14px;
}

.research-sidebar ul {
  margin: 0;
  padding-left: 19px;
}

.research-sidebar li + li {
  margin-top: 8px;
}

.paper-list {
  margin-top: 24px;
  border-top: 1px solid var(--border);
}

.paper-item {
  padding: 22px 0;
  border-bottom: 1px solid var(--border);
}

.paper-item h3 {
  margin-bottom: 7px;
  font-size: 1.08rem;
}

.paper-item p {
  margin: 3px 0;
  font-size: 0.98rem;
}

.paper-item a {
  display: inline-block;
  margin-top: 6px;
  font-weight: 700;
  font-size: 0.93rem;
}

.next-research {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 56px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

.next-research a {
  font-weight: 700;
}

@media (max-width: 820px) {
  .research-layout {
    grid-template-columns: 1fr;
    gap: 42px;
  }

  .research-sidebar {
    position: static;
  }

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

  .subpage-hero {
    padding: 64px 0 54px;
  }
}


/* Publication page and BibTeX controls */
.publication-heading-row {
  max-width: none;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
}

.publication-full {
  align-items: start;
}

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

.pub-meta-top {
  margin-bottom: 7px;
}

.pub-kind {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  background: #fff;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pub-actions {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 12px;
}

.pub-action,
.bibtex-details > summary {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 11px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  color: var(--accent);
  font-size: 0.88rem;
  font-weight: 750;
  line-height: 1;
  cursor: pointer;
  user-select: none;
}

.pub-action:hover,
.bibtex-details > summary:hover {
  border-color: #bfc9d4;
  background: #f8fafc;
  text-decoration: none;
}

.bibtex-details {
  display: inline-block;
}

.bibtex-details[open] {
  display: block;
  width: 100%;
}

.bibtex-details > summary {
  list-style: none;
}

.bibtex-details > summary::-webkit-details-marker {
  display: none;
}

.bibtex-details > summary::after {
  content: " +";
  margin-left: 5px;
}

.bibtex-details[open] > summary::after {
  content: " −";
}

.bibtex-panel {
  width: 100%;
  margin-top: 10px;
}

.bibtex-box {
  display: block;
  width: 100%;
  min-height: 190px;
  resize: vertical;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  outline: none;
  background: #111820;
  color: #f4f6f8;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.82rem;
  line-height: 1.55;
  white-space: pre;
  tab-size: 2;
}

.bibtex-box:focus {
  border-color: #8da7c1;
  box-shadow: 0 0 0 3px rgba(23, 63, 107, 0.10);
}

.publications-page {
  max-width: 980px;
}

.publication-year-block + .publication-year-block {
  margin-top: 62px;
}

.publication-year-heading {
  margin-bottom: 14px;
  font-size: 1.55rem;
}

.research-publications .publication {
  grid-template-columns: 70px 1fr;
}

.research-publications .pub-year {
  font-size: 0.9rem;
}

@media (max-width: 820px) {
  .publication-heading-row {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .pub-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .pub-action,
  .bibtex-details,
  .bibtex-details > summary {
    width: 100%;
  }

  .pub-action,
  .bibtex-details > summary {
    justify-content: center;
  }
}


/* Homepage images */
.profile-card-photo {
  background: rgba(255,255,255,0.90);
  backdrop-filter: blur(4px);
}

.profile-photo {
  display: block;
  width: 100%;
  max-width: 260px;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  margin: 0 auto 26px;
  border-radius: 18px;
  box-shadow: 0 18px 36px rgba(23, 32, 42, 0.16);
  border: 1px solid rgba(255,255,255,0.8);
}


/* Fix publication action alignment:
   DOI and BibTeX stay on the same baseline; opening BibTeX only expands the panel below. */
.pub-actions {
  display: grid;
  grid-template-columns: max-content max-content minmax(0, 1fr);
  align-items: start;
  column-gap: 9px;
  row-gap: 10px;
}

.pub-action {
  grid-column: 1;
  grid-row: 1;
  margin: 0;
}

.bibtex-details,
.bibtex-details[open] {
  display: contents;
}

.bibtex-details > summary {
  grid-column: 2;
  grid-row: 1;
  align-self: start;
  margin: 0;
}

.bibtex-panel {
  grid-column: 1 / -1;
  grid-row: 2;
  width: 100%;
  margin-top: 0;
}

@media (max-width: 560px) {
  .pub-actions {
    grid-template-columns: 1fr 1fr;
  }

  .pub-action,
  .bibtex-details > summary {
    width: auto;
    justify-content: center;
  }

  .bibtex-panel {
    grid-column: 1 / -1;
  }
}


/* Pixel-perfect alignment for DOI/arXiv and BibTeX controls */
.pub-action,
.bibtex-details > summary {
  box-sizing: border-box;
  height: 34px;
  min-height: 34px;
  padding: 0 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  margin: 0;
  vertical-align: top;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 750;
}

.bibtex-details > summary {
  appearance: none;
  -webkit-appearance: none;
}


/* Force BibTeX panel to open below the action buttons */
.pub-actions {
  display: grid;
  grid-template-columns: max-content max-content;
  grid-template-areas:
    "link bib"
    "panel panel";
  align-items: start;
  justify-content: start;
  column-gap: 9px;
  row-gap: 10px;
}

.pub-action {
  grid-area: link;
}

.bibtex-details,
.bibtex-details[open] {
  display: contents;
}

.bibtex-details > summary {
  grid-area: bib;
}

.bibtex-panel {
  grid-area: panel;
  width: 100%;
  min-width: 0;
  margin: 0;
}

.bibtex-box {
  width: 100%;
  max-width: 100%;
}

@media (max-width: 560px) {
  .pub-actions {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "link bib"
      "panel panel";
    width: 100%;
  }
}


/* Optical alignment correction for the BibTeX summary control */
.bibtex-details > summary {
  position: relative;
  top: 1px;
}


/* Final publication controls alignment and BibTeX width */
.bibtex-details > summary {
  position: relative;
  top: 6px;
}

.pub-actions {
  width: 100%;
}

.bibtex-panel {
  width: 100%;
  max-width: none;
}

.bibtex-box {
  display: block;
  width: 100%;
  max-width: none;
  min-width: 100%;
  box-sizing: border-box;
}


/* Final fix: make the BibTeX panel span the full publication content width */
.pub-actions {
  display: grid;
  width: 100%;
  grid-template-columns: max-content max-content minmax(0, 1fr);
  grid-template-areas:
    "link bib ."
    "panel panel panel";
  align-items: start;
  justify-content: stretch;
  column-gap: 9px;
  row-gap: 10px;
}

.pub-action {
  grid-area: link;
}

.bibtex-details,
.bibtex-details[open] {
  display: contents;
}

.bibtex-details > summary {
  grid-area: bib;
  position: relative;
  top: 6px;
}

.bibtex-panel {
  grid-area: panel;
  width: 100%;
  min-width: 0;
  max-width: none;
  margin: 0;
}

.bibtex-box {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: none;
  box-sizing: border-box;
}

@media (max-width: 560px) {
  .pub-actions {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "link bib"
      "panel panel";
  }
}


/* v11: robust publication action layout — no <details>/<summary> grid tricks */
.pub-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  width: 100%;
}

.pub-action,
.bibtex-toggle {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  min-height: 34px;
  margin: 0;
  padding: 0 11px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  color: var(--accent);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 750;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
}

.pub-action:hover,
.bibtex-toggle:hover {
  border-color: #bfc9d4;
  background: #f8fafc;
  text-decoration: none;
}

.bibtex-toggle[aria-expanded="true"] {
  background: #f8fafc;
}

.bibtex-panel {
  flex: 0 0 100%;
  width: 100%;
  min-width: 0;
  max-width: none;
  margin: 1px 0 0;
}

.bibtex-panel[hidden] {
  display: none !important;
}

.bibtex-box {
  display: block;
  width: 100%;
  max-width: none;
  min-width: 0;
  box-sizing: border-box;
}

@media (max-width: 560px) {
  .pub-action,
  .bibtex-toggle {
    flex: 1 1 auto;
  }

  .bibtex-panel {
    flex-basis: 100%;
  }
}


/* v12 definitive BibTeX layout:
   buttons have their own row; the panel is a separate full-width block below */
.pub-actions {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
}

.pub-buttons {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  width: 100%;
  min-height: 40px;
}

.pub-buttons .pub-action,
.pub-buttons .bibtex-toggle {
  flex: 0 0 auto;
  box-sizing: border-box;
  height: 34px;
  min-height: 34px;
  margin: 0;
  padding: 0 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  color: var(--accent);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 750;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
}

.pub-buttons .bibtex-toggle {
  position: relative;
  top: 0px;
}

.pub-buttons .pub-action:hover,
.pub-buttons .bibtex-toggle:hover {
  border-color: #bfc9d4;
  background: #f8fafc;
  text-decoration: none;
}

.pub-actions > .bibtex-panel {
  display: block;
  position: static;
  clear: both;
  width: 100% !important;
  min-width: 100% !important;
  max-width: none !important;
  margin: 10px 0 0 !important;
  padding: 0;
}

.pub-actions > .bibtex-panel[hidden] {
  display: none !important;
}

.pub-actions > .bibtex-panel .bibtex-box {
  display: block;
  width: 100% !important;
  min-width: 100% !important;
  max-width: none !important;
  box-sizing: border-box;
}

@media (max-width: 560px) {
  .pub-buttons {
    width: 100%;
  }

  .pub-buttons .pub-action,
  .pub-buttons .bibtex-toggle {
    flex: 1 1 0;
  }
}



/* v17: Copy BibTeX button */
.pub-buttons .copy-bibtex {
  flex: 0 0 auto;
  box-sizing: border-box;
  height: 34px;
  min-height: 34px;
  margin: 0;
  padding: 0 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  color: var(--accent);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 750;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
}

.pub-buttons .copy-bibtex:hover {
  border-color: #bfc9d4;
  background: #f8fafc;
}

.pub-buttons .copy-bibtex[hidden] {
  display: none !important;
}

@media (max-width: 560px) {
  .pub-buttons .copy-bibtex {
    flex: 1 1 auto;
  }
}


/* v19 academic profile identifiers */
.academic-profile-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
}

.academic-profile-link:hover {
  text-decoration: none;
}

.academic-profile-link:hover span {
  text-decoration: underline;
}

.academic-profile-icon {
  display: block;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  object-fit: contain;
}

.profile-links .academic-profile-link {
  font-weight: 650;
}

.contact-links .academic-profile-link {
  font-weight: 700;
}


/* v20 email profile row */
.email-icon {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  color: var(--accent);
  font-size: 1rem;
  line-height: 1;
}


/* v25: preserve the exact pre-removal year-column layout while hiding the year text */
.pub-year {
  visibility: hidden;
}


/* v26: remove the empty year column but preserve the page/container margins */
.pub-year {
  display: none !important;
}

.publication {
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 0 !important;
}

.publication .pub-content {
  grid-column: 1 !important;
  width: 100%;
}

.research-publications .publication {
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 0 !important;
}

.research-publications .publication .pub-content {
  grid-column: 1 !important;
}


/* v27: publication text and controls span exactly the separator-line width */
.publication-list,
.publication,
.publication .pub-content,
.publication .pub-content h3,
.publication .pub-content p,
.publication .pub-actions,
.publication .pub-buttons,
.publication .bibtex-panel,
.publication .bibtex-box {
  width: 100% !important;
  max-width: none !important;
  min-width: 0;
  box-sizing: border-box;
}

.publication .pub-content h3 {
  max-width: none !important;
}


/* v28: publication topic filters */
.publication-filter-wrap {
  margin: 0 0 48px;
  padding: 0 0 30px;
  border-bottom: 1px solid var(--border);
}

.publication-filter-label {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 750;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.publication-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.publication-filter {
  appearance: none;
  -webkit-appearance: none;
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #ffffff;
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease, color 150ms ease;
}

.publication-filter:hover {
  border-color: #bfc9d4;
  background: #f8fafc;
}

.publication-filter.is-active {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
}

.publication[hidden],
.publication-year-block[hidden] {
  display: none !important;
}

@media (max-width: 560px) {
  .publication-filter-wrap {
    margin-bottom: 38px;
  }

  .publication-filters {
    gap: 8px;
  }

  .publication-filter {
    width: 100%;
    border-radius: 10px;
    text-align: left;
  }
}


/* v32 CV icon */
.cv-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #9fd3f3;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}


/* v33 TU Dortmund and arXiv profile icons */
.tud-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #639A00;
  color: #ffffff;
  font-size: 0.67rem;
  font-weight: 850;
  letter-spacing: -0.03em;
}

.arxiv-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #b31b1b;
  color: #ffffff;
  font-size: 0.62rem;
  font-weight: 850;
  letter-spacing: -0.04em;
}


/* v34: fixed homepage background while content scrolls */
.hero {
  background-attachment: fixed;
  background-position: center center;
  background-size: cover;
}

/* Mobile browsers often ignore fixed background attachment;
   use normal scrolling there for reliable rendering. */
@media (max-width: 820px) {
  .hero {
    background-attachment: scroll;
  }
}


/* v35: fixed background image across the whole homepage */
body {
  background-image:
    linear-gradient(rgba(255,255,255,0.30), rgba(255,255,255,0.30)),
    url("assets/images/background.jpg");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

/* Let the fixed page background remain visible behind all main sections */
.hero {
  background-image: none !important;
  background-color: rgba(255,255,255,0.58);
  background-attachment: scroll;
}

.section {
  background-color: rgba(255,255,255,0.80);
}

.section-alt {
  background-color: rgba(246,247,249,0.82);
}

/* Keep text-heavy cards readable while still showing the background around them */
.card,
.profile-card,
.research-sidebar {
  background-color: rgba(255,255,255,0.92);
}

.site-header {
  background: rgba(255,255,255,0.90);
}

.footer {
  background: rgba(255,255,255,0.82);
}

/* Mobile browsers handle fixed backgrounds inconsistently */
@media (max-width: 820px) {
  body {
    background-attachment: scroll;
  }
}


/* v36: show stored square logo files as centered circular icons */
.academic-profile-icon-image {
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid rgba(0,0,0,0.06);
}

/* old synthetic badges no longer needed for TU/arXiv once image files are provided */
.tud-icon,
.arxiv-icon {
  display: none;
}


/* v37: give TU Dortmund and arXiv logos more breathing room inside the white circle */
.academic-profile-icon-image {
  object-fit: contain;
  padding: 3px;
  background: #ffffff;
}


/* v38: stronger full-page background visibility */
body {
  background-image:
    linear-gradient(rgba(255,255,255,0.10), rgba(255,255,255,0.10)),
    url("assets/images/background.jpg");
}

.hero {
  background-color: rgba(255,255,255,0.30);
}

.section {
  background-color: rgba(255,255,255,0.48);
}

.section-alt {
  background-color: rgba(246,247,249,0.52);
}

.card,
.profile-card,
.research-sidebar {
  background-color: rgba(255,255,255,0.78);
}

.site-header {
  background: rgba(255,255,255,0.76);
}

.footer {
  background: rgba(255,255,255,0.58);
}

/* Research/publication subpage hero areas should also reveal the background */
.subpage-hero {
  background:
    linear-gradient(rgba(255,255,255,0.34), rgba(255,255,255,0.40));
}


/* v39: slightly stronger white overlays for better readability */
body {
  background-image:
    linear-gradient(rgba(255,255,255,0.16), rgba(255,255,255,0.16)),
    url("assets/images/background.jpg");
}

.hero {
  background-color: rgba(255,255,255,0.38);
}

.section {
  background-color: rgba(255,255,255,0.58);
}

.section-alt {
  background-color: rgba(246,247,249,0.62);
}

.card,
.profile-card,
.research-sidebar {
  background-color: rgba(255,255,255,0.84);
}

.site-header {
  background: rgba(255,255,255,0.82);
}

.footer {
  background: rgba(255,255,255,0.66);
}

.subpage-hero {
  background:
    linear-gradient(rgba(255,255,255,0.44), rgba(255,255,255,0.50));
}

/* Move the homepage hero text slightly upward */
.hero-grid > div:first-child {
  transform: translateY(-24px);
}

@media (max-width: 820px) {
  .hero-grid > div:first-child {
    transform: translateY(-12px);
  }
}


/* v40: darker secondary text and clearer publication cards */

/* General muted/secondary prose */
.lead,
.hero p,
.profile-value,
.section p,
.card p,
.research-card p,
.contact-copy,
.publication p {
  color: #1f2933;
}

/* Publication metadata / journal and venue names */
.pub-meta,
.publication-meta,
.pub-venue,
.publication-venue,
.journal,
.venue {
  color: #202a35 !important;
}

/* Make individual publication/article backgrounds whiter */
.publication {
  background: rgba(255,255,255,0.92);
}

/* Keep publication text readable on the stronger white card */
.publication,
.publication p,
.publication .pub-meta,
.publication .publication-meta {
  color: #202a35;
}


/* v41: move the complete homepage hero content further upward */
.hero-grid {
  transform: translateY(-36px);
}

/* Reset the earlier left-column-only shift so both columns move together */
.hero-grid > div:first-child {
  transform: none;
}

@media (max-width: 820px) {
  .hero-grid {
    transform: translateY(-16px);
  }

  .hero-grid > div:first-child {
    transform: none;
  }
}


/* v42: move homepage hero slightly higher, with stronger lift on the left text block */
.hero-grid {
  transform: translateY(-44px);
}

.hero-grid > div:first-child {
  transform: translateY(-18px);
}

@media (max-width: 820px) {
  .hero-grid {
    transform: translateY(-20px);
  }

  .hero-grid > div:first-child {
    transform: translateY(-8px);
  }
}


/* v43: publications use a whiter full-width section, not white article cards */
.publication {
  background: transparent !important;
}

/* Homepage publications section */
#publications.section,
.publications-section {
  background-color: rgba(255,255,255,0.72) !important;
}

/* Dedicated publications page: whiten the full content section edge-to-edge */
.publications-page .section,
body.publications-page .section {
  background-color: rgba(255,255,255,0.72) !important;
}


/* v43 refinement: full-width publications area on the dedicated page */
.publications-section-full {
  background-color: rgba(255,255,255,0.72) !important;
}


/* v44 teaching page */
.teaching-page-section {
  background-color: rgba(255,255,255,0.68);
}

.teaching-card {
  margin-bottom: 1rem;
  background: rgba(255,255,255,0.84);
}

.section-link-row {
  margin-top: 1.4rem;
}


/* v45: slightly whiter full-width publications areas */
#publications.section,
.publications-section,
.publications-section-full {
  background-color: rgba(255,255,255,0.82) !important;
}


/* v46: topic-dependent backgrounds on Publications page */
.publications-background-page {
  transition: background-image 0.35s ease;
}

/* default / All publications */
.publications-background-page[data-publication-theme="all"] {
  background-image:
    linear-gradient(rgba(255,255,255,0.16), rgba(255,255,255,0.16)),
    url("assets/images/background-publications.jpg"),
    url("assets/images/background.jpg");
}

/* Maxwell & wave propagation */
.publications-background-page[data-publication-theme="maxwell"] {
  background-image:
    linear-gradient(rgba(255,255,255,0.16), rgba(255,255,255,0.16)),
    url("assets/images/background-maxwell.jpg"),
    url("assets/images/background.jpg");
}

/* Homogenization & multiscale media */
.publications-background-page[data-publication-theme="homogenization"] {
  background-image:
    linear-gradient(rgba(255,255,255,0.16), rgba(255,255,255,0.16)),
    url("assets/images/background-homogenization.jpg"),
    url("assets/images/background.jpg");
}

/* Evolving microstructure */
.publications-background-page[data-publication-theme="evolving"] {
  background-image:
    linear-gradient(rgba(255,255,255,0.16), rgba(255,255,255,0.16)),
    url("assets/images/background-evolving.jpg"),
    url("assets/images/background.jpg");
}

/* Calculus of variations */
.publications-background-page[data-publication-theme="variations"] {
  background-image:
    linear-gradient(rgba(255,255,255,0.16), rgba(255,255,255,0.16)),
    url("assets/images/background-variations.jpg"),
    url("assets/images/background.jpg");
}

/* Neural networks */
.publications-background-page[data-publication-theme="neural"] {
  background-image:
    linear-gradient(rgba(255,255,255,0.16), rgba(255,255,255,0.16)),
    url("assets/images/background-neural.jpg"),
    url("assets/images/background.jpg");
}

.publications-background-page {
  background-size: cover, cover, cover;
  background-position: center center, center center, center center;
  background-repeat: no-repeat, no-repeat, no-repeat;
  background-attachment: fixed, fixed, fixed;
}

@media (max-width: 820px) {
  .publications-background-page {
    background-attachment: scroll, scroll, scroll;
  }
}


/* v50: reduce vertical spacing between individual publications */
.publication {
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
  margin-bottom: 0.15rem;
}

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

.publication-year-block {
  margin-bottom: 1.7rem;
}


/* v51: Research dropdown */
.nav-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.nav-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
}

.nav-chevron {
  font-size: 0.72em;
  transition: transform 160ms ease;
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  z-index: 1000;
  min-width: 270px;
  padding: 8px;
  border: 1px solid rgba(15, 23, 42, 0.10);
  border-radius: 12px;
  background: rgba(255,255,255,0.97);
  box-shadow: 0 14px 34px rgba(15,23,42,0.14);
  transform: translate(-50%, -5px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 150ms ease, transform 150ms ease, visibility 150ms ease;
}

.nav-dropdown-menu::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -12px;
  height: 12px;
}

.nav-dropdown-menu a {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  white-space: nowrap;
  color: var(--text);
  font-size: 0.91rem;
  font-weight: 650;
}

.nav-dropdown-menu a:hover,
.nav-dropdown-menu a:focus-visible {
  background: rgba(31, 78, 121, 0.08);
  color: var(--accent);
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.nav-dropdown:hover .nav-chevron,
.nav-dropdown:focus-within .nav-chevron {
  transform: rotate(180deg);
}

/* Legal pages */
.footer-legal {
  display: inline-flex;
  gap: 1rem;
  align-items: center;
}

.legal-page {
  max-width: 860px;
}

.legal-page h2 {
  margin-top: 2rem;
}

.legal-page p {
  color: #202a35;
}

.legal-placeholder {
  color: #a33a2b;
}

.legal-note {
  margin-top: 2.2rem;
  padding: 1rem 1.1rem;
  border-left: 3px solid var(--accent);
  background: rgba(255,255,255,0.72);
}

@media (max-width: 820px) {
  .nav-dropdown-menu {
    left: 0;
    min-width: min(270px, 80vw);
    transform: translate(0, -5px);
  }

  .nav-dropdown:hover .nav-dropdown-menu,
  .nav-dropdown:focus-within .nav-dropdown-menu {
    transform: translate(0, 0);
  }

  .footer-legal {
    gap: 0.75rem;
  }
}


/* v52: English / German language switch */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-left: 0.35rem;
  padding: 2px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 999px;
  background: rgba(255,255,255,0.74);
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1;
}

.lang-switch a,
.lang-switch span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  min-height: 27px;
  padding: 0 7px;
  border-radius: 999px;
}

.lang-switch a {
  color: var(--muted);
}

.lang-switch a:hover,
.lang-switch a:focus-visible {
  color: var(--accent);
  background: rgba(31,78,121,0.07);
}

.lang-switch .lang-active {
  background: var(--accent);
  color: #ffffff;
}

@media (max-width: 820px) {
  .lang-switch {
    margin-left: 0;
  }
}


/* v53: web CV page */
.cv-page-section {
  background-color: rgba(255,255,255,0.72);
}

.cv-page {
  max-width: 980px;
}

.cv-actions {
  margin-top: 1.4rem;
}

.cv-section {
  padding: 1.4rem 0 2rem;
  border-bottom: 1px solid rgba(15,23,42,0.10);
}

.cv-section:last-child {
  border-bottom: 0;
}

.cv-section > h2 {
  margin-bottom: 1.1rem;
}

.cv-timeline {
  display: grid;
  gap: 0;
}

.cv-item {
  display: grid;
  grid-template-columns: 125px minmax(0,1fr);
  gap: 1.4rem;
  padding: 1.05rem 0;
  border-bottom: 1px solid rgba(15,23,42,0.08);
}

.cv-item:last-child {
  border-bottom: 0;
}

.cv-date {
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.cv-item h3,
.cv-card h3 {
  margin: 0 0 0.25rem;
}

.cv-place {
  margin: 0 0 0.35rem !important;
  color: #303946 !important;
  font-weight: 700;
}

.cv-item p {
  margin: 0.25rem 0;
}

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

.cv-card {
  padding: 1.1rem 1.2rem;
  border: 1px solid rgba(15,23,42,0.10);
  border-radius: 14px;
  background: rgba(255,255,255,0.80);
}

.cv-card p {
  margin-bottom: 0;
}

.cv-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.cv-tags a,
.cv-tags span {
  display: inline-flex;
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.82);
  border: 1px solid rgba(15,23,42,0.10);
  color: #202a35;
  font-size: 0.9rem;
  font-weight: 650;
}

.cv-tags a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.cv-language-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 0.85rem;
}

.cv-language-grid > div {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  background: rgba(255,255,255,0.80);
  border: 1px solid rgba(15,23,42,0.10);
}

.cv-language-grid span {
  color: #27323e;
}

.cv-more {
  margin-top: 1rem;
  font-weight: 700;
}

.cv-final-links {
  padding-bottom: 0.5rem;
}

@media (max-width: 700px) {
  .cv-item {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

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


/* v54: fuller web CV based on uploaded PDF */
.cv-bullets {
  margin: 0.45rem 0 0;
  padding-left: 1.2rem;
}

.cv-bullets li {
  margin: 0.25rem 0;
}

.cv-subheading {
  margin-top: 1.6rem;
  margin-bottom: 0.75rem;
}

.cv-list {
  display: grid;
  gap: 0;
}

.cv-list > div {
  display: grid;
  grid-template-columns: 125px minmax(0,1fr);
  gap: 1.4rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(15,23,42,0.07);
}

.cv-list > div:last-child {
  border-bottom: 0;
}

.cv-list > div > strong {
  color: var(--accent);
  font-size: 0.9rem;
}

.cv-list-compact > div {
  padding: 0.45rem 0;
}

@media (max-width: 700px) {
  .cv-list > div {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }
}


/* v55: institution logos beside years on the web CV */
.cv-date-with-logos {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.45rem;
}

.cv-year {
  display: block;
}

.cv-year-logos {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.28rem;
  width: 100%;
}

.cv-year-logo {
  display: block;
  width: auto;
  height: auto;
  max-width: 108px;
  max-height: 36px;
  object-fit: contain;
  object-position: left center;
}

.cv-inline-logo {
  display: inline-block;
  width: auto;
  max-width: 105px;
  max-height: 28px;
  object-fit: contain;
  vertical-align: middle;
  margin-right: 0.75rem;
}

.cv-list > div > strong {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
}

.cv-award-logo {
  display: block;
  width: auto;
  height: auto;
  max-width: 100px;
  max-height: 30px;
  object-fit: contain;
  object-position: left center;
}

@media (max-width: 700px) {
  .cv-date-with-logos {
    flex-direction: row;
    align-items: center;
    gap: 0.8rem;
  }

  .cv-year-logos {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }

  .cv-year-logo {
    max-width: 92px;
    max-height: 30px;
  }
}


/* v58: make TopMath logos slightly larger */
.cv-year-logo.topmath-logo {
  max-width: 150px;
  max-height: 50px;
}

.cv-award-logo.topmath-logo {
  max-width: 140px;
  max-height: 42px;
}

@media (max-width: 700px) {
  .cv-year-logo.topmath-logo {
    max-width: 120px;
    max-height: 40px;
  }

  .cv-award-logo.topmath-logo {
    max-width: 115px;
    max-height: 36px;
  }
}


/* v59: larger TopMath and Cambridge logos */
.cv-year-logo.topmath-logo {
  max-width: 300px;
  max-height: 100px;
}

.cv-award-logo.topmath-logo {
  max-width: 300px;
  max-height: 100px;
}

.cv-year-logo.cambridge-logo {
  max-width: 300px;
  max-height: 100px;
}


/* v60: Awards — logo on the left, year inside the text */
.cv-list > div > strong.cv-award-logo-cell {
  min-height: 30px;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
}

.cv-award-year {
  color: var(--accent);
  font-weight: 800;
  white-space: nowrap;
}


/* v61: preserve manual Cambridge logo sizing */
.cv-year-logo.cambridge-logo {
  max-width: 100px;
  max-height: 40px;
}

@media (max-width: 700px) {
  .cv-year-logo.cambridge-logo {
    max-width: 100px;
    max-height: 40px;
  }
}


/* v62: clickable CV logos and linked supervisors */
.cv-logo-link {
  display: inline-flex;
  align-items: flex-start;
  width: fit-content;
  max-width: 100%;
  text-decoration: none;
  border-radius: 4px;
}

.cv-logo-link:hover img {
  opacity: 0.82;
}

.cv-logo-link:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

.cv-person-link {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

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


/* v63: stable page scale between internal pages */
html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scrollbar-gutter: stable;
}

/* Fallback for browsers without scrollbar-gutter support:
   keep the vertical scrollbar space present on desktop so page width does not jump. */
@media (min-width: 821px) {
  html {
    overflow-y: scroll;
  }
}

/* CV contextual links keep the surrounding typography instead of looking like buttons. */
.cv-context-link {
  color: inherit;
  text-decoration: none;
}

.cv-context-link:hover,
.cv-context-link:focus-visible {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.16em;
}


/* v64: dedicated research overview */
.research-page-intro {
  max-width: 800px;
}

.research-overview-cards {
  margin-top: 1.4rem;
}

.research-overview-card {
  min-height: 220px;
}

.research-overview-card .eyebrow {
  margin-bottom: 0.45rem;
}


/* v66: keep the email address on one line in the homepage profile card */
.profile-card .academic-profile-link[href^="mailto:"] span:last-child {
  white-space: nowrap;
  font-size: 0.92rem;
  letter-spacing: -0.01em;
}

@media (max-width: 700px) {
  .profile-card .academic-profile-link[href^="mailto:"] span:last-child {
    font-size: 0.86rem;
  }
}


/* v67: Teaching as an academic teaching overview */
.teaching-overview-page {
  max-width: 980px;
}

.teaching-institution {
  padding: 0 0 2.4rem;
  margin-bottom: 2.4rem;
  border-bottom: 1px solid rgba(15,23,42,0.10);
}

.teaching-institution:last-of-type {
  margin-bottom: 2rem;
}

.teaching-institution-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 1rem;
}

.teaching-institution-head h2 {
  margin-bottom: 0.15rem;
}

.teaching-period {
  margin: 0;
  color: var(--accent);
  font-weight: 800;
}

.teaching-course-list {
  display: grid;
  gap: 0;
}

.teaching-course {
  display: grid;
  grid-template-columns: minmax(0,1fr) 150px;
  gap: 1.5rem;
  align-items: start;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(15,23,42,0.07);
}

.teaching-course:last-child {
  border-bottom: 0;
}

.teaching-course h3 {
  margin: 0 0 0.3rem;
}

.teaching-course p {
  margin: 0;
}

.teaching-role {
  color: #27323e;
  font-size: 0.9rem;
  font-weight: 700;
  text-align: right;
}

.teaching-summary {
  padding-top: 0.5rem;
}

.teaching-activity-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 1.25rem;
}

.teaching-activity-grid > div {
  padding: 1.1rem 1.2rem;
  border-radius: 14px;
  background: rgba(255,255,255,0.78);
  border: 1px solid rgba(15,23,42,0.10);
}

.teaching-activity-grid h3 {
  margin-top: 0;
}

@media (max-width: 700px) {
  .teaching-course {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .teaching-role {
    text-align: left;
  }

  .teaching-activity-grid {
    grid-template-columns: 1fr;
  }
}


/* v68: detailed chronological teaching record */
.teaching-record-page {
  max-width: 1120px;
}

.teaching-record-block {
  margin-bottom: 3rem;
}

.teaching-record-heading {
  margin-bottom: 1rem;
}

.teaching-record-heading h2 {
  margin-bottom: 0.25rem;
}

.teaching-record-heading p {
  margin: 0;
  color: #27323e;
  font-weight: 700;
}

.teaching-table {
  border-top: 1px solid rgba(15,23,42,0.14);
}

.teaching-row {
  display: grid;
  grid-template-columns: 135px minmax(220px,1.35fr) minmax(150px,.85fr) minmax(240px,1.35fr);
  gap: 1rem;
  align-items: start;
  padding: 0.82rem 0;
  border-bottom: 1px solid rgba(15,23,42,0.09);
}

.teaching-row-head {
  padding-top: 0.65rem;
  padding-bottom: 0.65rem;
  color: #202a35;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.teaching-semester {
  color: var(--accent);
  font-weight: 800;
}

.teaching-course-title {
  font-weight: 750;
  color: #101820;
}

@media (max-width: 900px) {
  .teaching-row {
    grid-template-columns: 125px minmax(0,1fr);
    gap: 0.35rem 1rem;
  }

  .teaching-row > div:nth-child(3),
  .teaching-row > div:nth-child(4) {
    grid-column: 2;
  }

  .teaching-row-head {
    display: none;
  }

  .teaching-row > div:nth-child(3)::before {
    content: "Level: ";
    font-weight: 700;
    color: #27323e;
  }

  .teaching-row > div:nth-child(4)::before {
    content: "Contribution: ";
    font-weight: 700;
    color: #27323e;
  }
}

@media (max-width: 600px) {
  .teaching-row {
    grid-template-columns: 1fr;
    gap: 0.22rem;
  }

  .teaching-row > div:nth-child(3),
  .teaching-row > div:nth-child(4) {
    grid-column: 1;
  }
}


/* v70: compact privacy page */
.privacy-compact {
  max-width: 900px;
}

.privacy-compact p {
  margin: 0 0 1.15rem;
  line-height: 1.7;
}

.privacy-label {
  color: #18222d;
  font-weight: 800;
}

.privacy-small {
  margin-top: 1.7rem !important;
  color: #303a46;
  font-size: 0.9rem;
}


/* v74: darker text across the complete website */
:root {
  --text: #101820;
  --muted: #26313d;
}

.lead,
.hero p,
.profile-value,
.section p,
.card p,
.research-card p,
.contact-copy,
.publication p {
  color: #1f2933;
}

.pub-meta,
.publication-meta,
.pub-venue,
.publication-venue,
.journal,
.venue {
  color: #202a35 !important;
}

.teaching-role,
.teaching-record-heading p,
.privacy-small {
  color: var(--muted);
}


/* v77: compact publication entries, with journal, DOI/arXiv and BibTeX in one row. */
.publication {
  padding-top: 0.52rem;
  padding-bottom: 0.52rem;
  margin-bottom: 0;
}

.publication .pub-content h3 {
  margin-bottom: 0.15rem;
  line-height: 1.32;
}

.publication .pub-content > p {
  margin: 0.1rem 0;
  line-height: 1.4;
}

.publication .pub-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem 0.75rem;
  margin-top: 0.15rem;
}

.publication .pub-meta-row .journal {
  flex: 0 1 auto;
  width: auto !important;
  min-width: 0;
  margin: 0;
  line-height: 1.4;
}

.publication .pub-meta-row .pub-actions {
  display: block !important;
  flex: 0 0 auto;
  width: auto !important;
  max-width: 100% !important;
  margin: 0 !important;
}

.publication .pub-meta-row .pub-buttons {
  display: flex;
  width: auto !important;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  min-height: 0;
}

.publication .pub-meta-row .pub-buttons .pub-action,
.publication .pub-meta-row .pub-buttons .bibtex-toggle,
.publication .pub-meta-row .pub-buttons .copy-bibtex {
  flex: 0 0 auto;
  height: 27px;
  min-height: 27px;
  margin: 0;
  padding: 0 0.55rem;
  font-size: 0.81rem;
}

/* BibTeX expands after all three text lines, over the full available width. */
.publication .pub-content > .bibtex-panel {
  display: block;
  width: 100% !important;
  max-width: none !important;
  min-width: 0;
  margin: 0.5rem 0 0 !important;
}

.publication .pub-content > .bibtex-panel[hidden] {
  display: none !important;
}

.publication-year-block + .publication-year-block {
  margin-top: 2rem;
}

@media (max-width: 560px) {
  .publication .pub-meta-row .pub-buttons .pub-action,
  .publication .pub-meta-row .pub-buttons .bibtex-toggle,
  .publication .pub-meta-row .pub-buttons .copy-bibtex {
    flex: 0 0 auto;
    width: auto;
  }
}


/* v79: hierarchical research topic navigation and subpages */
.research-layout:has(.research-topic-sidebar) {
  grid-template-columns: minmax(0, 1fr) 325px;
  gap: clamp(24px, 3.3vw, 52px);
}
.research-topic-sidebar {
  position: sticky;
  top: 90px;
  max-height: calc(100vh - 112px);
  overflow-y: auto;
  padding: 20px 19px;
  scrollbar-width: thin;
}
.research-topic-sidebar h3 { margin: 0 0 18px; font-size: 1.05rem; }
.research-topic-group + .research-topic-group {
  border-top: 1px solid rgba(23,32,42,0.15);
  margin-top: 16px;
  padding-top: 16px;
}
.research-topic-group-title {
  display: block;
  font-size: .93rem;
  line-height: 1.35;
  font-weight: 800;
  color: var(--accent-dark);
  text-decoration: none;
}
.research-topic-group-title:hover { text-decoration: underline; }
.research-topic-sidebar .research-topic-links {
  list-style: none;
  margin: 9px 0 0;
  padding: 0 0 0 10px;
  border-left: 2px solid rgba(23,63,107,.15);
}
.research-topic-sidebar .research-topic-links li { margin: 0; padding: 0; }
.research-topic-sidebar .research-topic-links li + li { margin-top: 3px; }
.research-topic-sidebar .research-topic-links a {
  display: block;
  text-decoration: none;
  font-size: .87rem;
  font-weight: 600;
  line-height: 1.36;
  padding: 6px 7px;
  border-radius: 6px;
  color: #1f2933;
}
.research-topic-sidebar .research-topic-links a:hover,
.research-topic-sidebar .research-topic-links a:focus-visible {
  color: var(--accent-dark);
  background: rgba(23,63,107,.08);
}
.research-topic-sidebar .research-topic-links a.active {
  color: var(--accent-dark);
  background: rgba(23,63,107,.12);
  font-weight: 800;
}
.topic-back-link { margin-top: 2.5rem !important; }
.topic-back-link a { font-weight: 700; }
.topic-empty-publications { font-style: italic; }
@media (max-width: 900px) {
  .research-layout:has(.research-topic-sidebar) { grid-template-columns: minmax(0,1fr); gap: 28px; }
  .research-topic-sidebar { position: static; max-height: none; overflow: visible; }
}


/* v80: only the active research area displays its subtopics. */
.research-topic-group.is-current-group > .research-topic-group-title::after {
  content: " ▾";
  font-size: .85em;
  color: var(--accent);
}


/* v81: The research sidebar lists only subtopics of the current area. */
.research-topic-sidebar .research-topic-nav > .research-topic-links {
  margin: 0;
  padding-left: 0;
  border-left: none;
}


/* v82: back-to-parent navigation inside research topic sidebars */
.research-topic-sidebar .research-sidebar-back {
  display: block;
  width: 100%;
  margin: 0 0 14px;
  padding: 9px 11px;
  border: 1px solid rgba(23,63,107,0.23);
  border-radius: 7px;
  background: rgba(255,255,255,0.58);
  color: var(--accent-dark);
  font-size: .9rem;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none;
}
.research-topic-sidebar .research-sidebar-back:hover,
.research-topic-sidebar .research-sidebar-back:focus-visible {
  background: rgba(23,63,107,0.11);
  border-color: rgba(23,63,107,0.5);
  text-decoration: underline;
}


/* v83: show the main topic above a clearly labeled list of subtopics. */
.research-topic-sidebar .research-current-topic {
  display: block;
  color: var(--accent-dark);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.4;
  text-decoration: none;
  margin: 16px 0 5px;
}
.research-topic-sidebar a.research-current-topic:hover,
.research-topic-sidebar a.research-current-topic:focus-visible {
  text-decoration: underline;
}
.research-topic-sidebar .research-subtopic-label {
  display: block;
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.45;
  font-weight: 750;
  letter-spacing: .045em;
  text-transform: uppercase;
  margin: 12px 0 7px;
}
.research-topic-sidebar .research-topic-nav > .research-topic-links {
  list-style: none;
  margin: 0 0 0 2px;
  padding-left: 12px;
  border-left: 2px solid rgba(23,63,107,.26);
}


/* v84: reusable equation and figure styling for all research topics/subtopics */
.research-main .research-subheading {
  font-size: clamp(1.2rem, 2.4vw, 1.48rem);
  margin: 2.1rem 0 .9rem;
  color: var(--text);
}
.research-main .research-equation {
  background: rgba(255,255,255,.74);
  border: 1px solid rgba(23,63,107,.16);
  border-radius: 12px;
  padding: 1.1rem 1.2rem;
  margin: 1.15rem 0 1.4rem;
  overflow-x: auto;
  max-width: 100%;
}
.research-main .research-equation mjx-container[display="true"] {
  margin: .2rem 0;
}
.research-main .research-figure {
  max-width: 100%;
  margin: 1.6rem 0 2rem;
}
.research-main .research-figure img {
  display: block;
  max-width: 100%;
  width: 100%;
  height: auto;
  max-height: 430px;
  object-fit: contain;
  border-radius: 10px;
}
.research-main .research-figure figcaption {
  margin-top: .55rem;
  text-align: center;
  font-size: .9rem;
  line-height: 1.5;
  color: var(--muted);
}
@media (max-width: 600px) {
  .research-main .research-equation { padding: .8rem .55rem; }
}

/* v85: periodic homogenization example */
.homogenization-example { margin: 1.2rem 0 2.2rem; }
.research-main .homogenization-figure { margin: 1.3rem 0 1.9rem; }
.research-main .homogenization-figure img { max-height: none; border-radius: 0; }
.homogenization-equations { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 1.25rem; margin: 1rem 0 1.4rem; }
.homogenization-formula-panel { min-width: 0; }
.homogenization-formula-panel h3 { font-size: 1.05rem; margin: .55rem 0; }
.homogenization-formula-panel p { font-size: .94rem; margin: .45rem 0 .9rem; }
.homogenization-formula-panel .research-equation { padding: .6rem .35rem; overflow-x: auto; }
@media (max-width: 1000px) { .homogenization-equations { grid-template-columns: 1fr; } }


/* v86: match each homogenization diagram directly with its mathematical model. */
.homogenization-comparison {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: clamp(.7rem, 2vw, 1.4rem);
  align-items: start;
  margin: 1.25rem 0 1.5rem;
}
.homogenization-column { min-width: 0; }
.research-main .homogenization-part-figure {
  margin: 0 0 1rem;
}
.research-main .homogenization-part-figure img {
  width: 100%;
  height: 225px;
  max-height: 225px;
  object-fit: contain;
  object-position: center bottom;
}
.research-main .homogenization-part-figure figcaption {
  font-size: .82rem;
  line-height: 1.45;
  min-height: 3.2em;
  margin-top: .45rem;
}
.homogenization-column .homogenization-formula-panel h3 {
  margin: .85rem 0 .4rem;
}
.homogenization-column .homogenization-formula-panel .research-equation {
  font-size: .90rem;
  padding: .65rem .4rem;
  margin: .6rem 0 .8rem;
  overflow-x: auto;
}
.homogenization-column .homogenization-formula-panel p {
  font-size: .9rem;
  margin: .5rem 0 .9rem;
}
@media (max-width: 740px) {
  .homogenization-comparison {
    grid-template-columns: minmax(0,1fr);
    row-gap: 1.8rem;
  }
  .research-main .homogenization-part-figure img {
    height: auto;
    max-height: 270px;
  }
  .research-main .homogenization-part-figure figcaption {
    min-height: 0;
  }
}


/* v87: notes inside equation boxes for homogenization example */
.research-main .research-equation .equation-note {
  margin-top: .65rem;
  padding-top: .6rem;
  border-top: 1px solid rgba(23,63,107,.14);
  font-size: .92rem;
  line-height: 1.5;
  color: var(--text);
}
.research-main .research-equation .equation-note mjx-container {
  display: inline-block;
  margin: 0 .08rem;
}


/* v90 – Interactive locally evolving microstructure (EN/DE research pages). */
.evolving-page-overview { max-width: 870px; margin-bottom: 1.4rem; }
.evolving-page-overview h2 { margin-top: 0; }
.evolving-page-overview p { color: var(--text); max-width: 850px; }
.evolving-demo {
  --ev-ink: #203e55;
  --ev-muted: #344f63;
  --ev-line: #c7d6e0;
  margin: 1.5rem 0 2.8rem;
  padding: clamp(16px,2.3vw,25px);
  border: 1px solid rgba(41,76,102,.21);
  border-radius: 14px;
  background: rgba(255,255,255,.90);
  box-shadow: 0 8px 28px rgba(25,50,75,.035);
  color: var(--ev-ink);
}
.evolving-demo-heading h3 { font-size: 1.16rem; margin: 0 0 .4rem; color: var(--ev-ink); }
.evolving-demo-heading p { max-width: 920px; margin: 0; font-size: .92rem; line-height: 1.54; color: var(--text); }
.evolving-controls {
  display: flex; gap: 12px; flex-wrap: wrap; align-items: center;
  background: rgba(239,244,247,.75); border: 1px solid rgba(58,94,116,.15);
  border-radius: 10px; margin: 1.1rem 0 1.3rem; padding: .8rem .95rem;
}
.evolving-demo button,.evolving-demo select { font: inherit; }
.evolving-demo button {
  border: 1px solid #244763; border-radius: 7px; padding: .48rem .95rem;
  background: #214866; color: #fff; cursor: pointer;
  font-size: .91rem; font-weight: 700;
}
.evolving-demo button.evolving-reset { background: #fff; color: #244763; border-color: #b2c5d3; }
.evolving-demo button:hover { filter: brightness(.93); }
.evolving-demo button:focus-visible,.evolving-demo input:focus-visible,.evolving-demo select:focus-visible,.evolving-demo canvas:focus-visible { outline: 3px solid #d19a54; outline-offset: 3px; }
.evolving-timeline-label { display: flex; gap: .7rem; align-items: center; font-size: .88rem; font-weight: 700; white-space: nowrap; margin-left: .4rem; }
.evolving-clock { font-variant-numeric: tabular-nums; font-weight: 600; }
.evolving-timeline { flex: 1 1 180px; min-width: 125px; accent-color: #285e84; cursor: pointer; }
.evolving-speed-label { font-size: .85rem; font-weight: 700; }
.evolving-demo select { padding: .43rem .36rem; border-radius: 6px; background: #fff; border: 1px solid var(--ev-line); color: var(--ev-ink); }
.evolving-visual-layout { display: grid; grid-template-columns: minmax(0,2.4fr) 36px minmax(0,1.45fr); gap: 10px; align-items: center; }
.evolving-micro-grid,.evolving-macro-section { display: grid; gap: 9px; align-items: start; }
.evolving-macro-section { position: relative; }
.evolving-micro-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
.evolving-macro-section { grid-template-columns: minmax(0,1.18fr) minmax(0,.82fr); }
.evolving-demo h4 { font-size: .88rem; line-height: 1.3; color: var(--ev-ink); margin: 0 0 .6rem; font-weight: 750; text-align: center; }
.evolving-panel { min-width: 0; text-align: center; }
.evolving-panel canvas { width: 100%; height: auto; display: block; aspect-ratio: 360/256; background: transparent; cursor: crosshair; border: 0; }
.evolving-panel canvas.evolving-cell { cursor: default; aspect-ratio: 240/256; }
.evolving-scale { color: var(--ev-ink); font: italic 1.04rem Georgia,"Times New Roman",serif; margin-top: -2px; }
.evolving-limit-arrow { text-align: center; color: #2e5876; font: italic 1rem Georgia,serif; line-height: 1.35; white-space: nowrap; }
.evolving-limit-arrow span { display: block; }
.evolving-limit-arrow span:last-child { font-size: 1.8rem; font-style: normal; }
.evolving-demo .evolving-caption { font-size: .83rem; line-height: 1.5; margin: .9rem 0 0; color: var(--text); }
.evolving-zoom-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
  z-index: 4;
}
.evolving-zoom-lines .zoom-line {
  stroke: var(--ev-line);
  stroke-width: 1.5;
  stroke-dasharray: 5 5;
  vector-effect: non-scaling-stroke;
  stroke-linecap: round;
}

@media (max-width: 980px) {
  .evolving-visual-layout { grid-template-columns: minmax(0,1fr); gap: 12px; }
  .evolving-limit-arrow { display: flex; gap: 8px; justify-content: center; align-items: center; }
  .evolving-limit-arrow span:last-child { transform: rotate(90deg); }
  .evolving-macro-section { width: min(100%,500px); margin: auto; }
  .evolving-micro-grid { max-width: 760px; margin: auto; }
}
@media (max-width: 500px) {
  .evolving-controls { gap: 9px; }
  .evolving-timeline-label { margin-left: 0; width: 100%; }
  .evolving-timeline { flex-basis: 100%; }
  .evolving-micro-grid { gap: 3px; }
  .evolving-scale { font-size: .84rem; }
  .evolving-demo { padding: 12px 9px; }
}


/* v92: Main research-page navigation belongs beside the page introduction.
   Overview, equations/figures, and publications below span the full width. */
.research-main-topic-hero {
  padding: 48px 0 42px;
}
.research-main-topic-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(250px, 310px);
  column-gap: clamp(24px, 4vw, 54px);
  row-gap: 0;
  align-items: start;
}
.research-main-topic-header > .breadcrumb {
  grid-column: 1 / -1;
  margin-bottom: 24px;
}
.research-main-topic-intro {
  min-width: 0;
  padding-top: 4px;
}
.research-main-topic-intro .subpage-title {
  max-width: none;
  font-size: clamp(2.15rem, 4vw, 3.7rem);
  line-height: 1.13;
  letter-spacing: -0.045em;
}
.research-main-topic-intro .subpage-lead {
  max-width: 740px;
  margin-top: 20px;
}
.research-main-topic-header > .research-topic-sidebar {
  position: static;
  top: auto;
  width: 100%;
  max-height: none;
  overflow: visible;
  min-width: 0;
  padding: 18px 20px;
}
.research-main-topic-body {
  display: block;
}
.research-main-topic-body > .research-main {
  width: 100%;
  max-width: none;
  min-width: 0;
}
@media (max-width: 860px) {
  .research-main-topic-header {
    grid-template-columns: minmax(0,1fr);
    row-gap: 22px;
  }
  .research-main-topic-header > .breadcrumb {
    grid-column: 1;
    margin-bottom: 0;
  }
  .research-main-topic-header > .research-topic-sidebar {
    max-width: 100%;
  }
  .research-main-topic-hero {
    padding-top: 42px;
    padding-bottom: 38px;
  }
}


/* v93: Topic navigation alongside the hero, including all research subtopics.
   Start navigation at the top of the hero, adjacent to the breadcrumb. */
.research-main-topic-header,
.research-subtopic-header {
  grid-template-rows: auto minmax(0, 1fr);
  row-gap: 18px;
}
.research-main-topic-header > .breadcrumb,
.research-subtopic-header > .breadcrumb {
  grid-column: 1;
  grid-row: 1;
  align-self: start;
  margin-bottom: 0;
}
.research-main-topic-header > .research-main-topic-intro,
.research-subtopic-header > .research-main-topic-intro {
  grid-column: 1;
  grid-row: 2;
  align-self: start;
}
.research-main-topic-header > .research-topic-sidebar,
.research-subtopic-header > .research-topic-sidebar {
  grid-column: 2;
  grid-row: 1 / 3;
  align-self: start;
  margin-top: 0;
}
.research-subtopic-hero {
  padding-top: 42px;
  padding-bottom: 40px;
}
.research-subtopic-header .subpage-title {
  font-size: clamp(2.3rem, 4.3vw, 4.35rem);
}
.research-subtopic-header .subpage-lead {
  margin-top: 15px;
}
/* Leave width to .container for standard subtopic pages (and to the
   surrounding .container for Evolving Microstructure). Setting width:100%
   here would cancel .container's responsive horizontal gutters. */
.research-subtopic-body {
  display: block;
  min-width: 0;
}
.research-subtopic-body > .research-main {
  width: 100%;
  max-width: none;
  min-width: 0;
}
.research-topic-page .evolving-page-overview,
.research-topic-page .evolving-page-overview p {
  max-width: none;
}
@media (max-width: 860px) {
  .research-main-topic-header,
  .research-subtopic-header {
    grid-template-rows: auto auto auto;
    row-gap: 19px;
  }
  .research-main-topic-header > .breadcrumb,
  .research-subtopic-header > .breadcrumb {
    grid-column: 1;
    grid-row: 1;
  }
  .research-main-topic-header > .research-main-topic-intro,
  .research-subtopic-header > .research-main-topic-intro {
    grid-column: 1;
    grid-row: 2;
  }
  .research-main-topic-header > .research-topic-sidebar,
  .research-subtopic-header > .research-topic-sidebar {
    grid-column: 1;
    grid-row: 3;
    max-width: none;
  }
}


/* v95: Standard subtopics share the same outer content width and
   responsive side margins as Evolving Microstructure. The site's
   .container establishes the common alignment; do not center a
   narrower .research-main within it. */


/* v97 — travelling-bend pulsating microstructure, matches evolving demo. */
.pulsating-demo .pulsating-options {
  display: flex; flex-wrap: wrap; gap: .45rem 1rem; align-items: center;
  flex: 1 0 100%; border-top: 1px solid rgba(58,94,116,.13);
  padding-top: .75rem;
}
.pulsating-demo .pulsating-check {
  display: inline-flex; gap: .48rem; align-items: center;
  color: var(--ev-ink); font-weight: 600; font-size: .88rem;
  cursor: pointer; user-select: none;
}
.pulsating-demo .pulsating-check input {
  width: 17px; height: 17px; accent-color: #285e84;
  margin: 0; cursor: pointer; flex: 0 0 auto;
}
.pulsating-demo .pulsating-phase {
  font-size: .72rem; line-height: 1.2; color: var(--ev-muted);
  margin-top: 3px; font-variant-numeric: tabular-nums;
}
.pulsating-demo .pulsating-selection-note {
  margin: .65rem 0 0; font-size: .77rem; color: var(--ev-muted);
  line-height: 1.45;
}
.pulsating-demo .pulsating-micro { touch-action: manipulation; }
.pulsating-demo .pulsating-cell { cursor: default; }
@media (max-width: 600px) {
  .pulsating-demo .pulsating-options { align-items: flex-start; flex-direction: column; }
}


/* v98: Three synchronized magnified cells, one below each epsilon-domain. */
.pulsating-demo .pulsating-micro-panel {
  position: relative;
  min-width: 0;
  isolation: isolate;
}
.pulsating-demo .pulsating-micro-panel > canvas,
.pulsating-demo .pulsating-micro-panel > .evolving-scale,
.pulsating-demo .pulsating-micro-panel > .pulsating-phase {
  position: relative;
  z-index: 2;
}
.pulsating-demo .pulsating-mini-zoom {
  position: relative;
  z-index: 2;
  margin-top: 14px;
  padding-top: 5px;
}
.pulsating-demo .pulsating-mini-label {
  margin: 0 0 5px;
  font-size: .73rem;
  line-height: 1.24;
  font-weight: 650;
  color: var(--ev-ink);
}
.pulsating-demo .pulsating-mini-zoom canvas.pulsating-micro-cell {
  display: block;
  margin: 0 auto;
  width: min(82%, 142px);
  height: auto;
  aspect-ratio: 1 / 1;
  cursor: default;
}
.pulsating-demo .pulsating-mini-phase {
  margin-top: 3px;
  color: var(--ev-muted);
  font-size: .71rem;
  line-height: 1.28;
  font-variant-numeric: tabular-nums;
}
.pulsating-demo .pulsating-mini-zoom-lines {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
}
.pulsating-demo .pulsating-mini-zoom-lines .zoom-line {
  fill: none;
  stroke: #98adbf;
  stroke-width: 1.05;
  stroke-dasharray: 3 4;
  vector-effect: non-scaling-stroke;
}
@media (max-width: 500px) {
  .pulsating-demo .pulsating-mini-label { font-size: .64rem; }
  .pulsating-demo .pulsating-mini-phase { font-size: .65rem; }
  .pulsating-demo .pulsating-mini-zoom { margin-top: 10px; }
}


/* v99 — limit diagram uses the same vertical macro/zoom composition as
   each epsilon microscope, with a clearly separate micro-time play mode. */
.pulsating-demo .evolving-visual-layout {
  grid-template-columns: minmax(0,3fr) 36px minmax(0,1fr);
  align-items: start;
}
.pulsating-demo .pulsating-limit-stack {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0,1fr);
  grid-template-rows: auto auto;
  gap: 0;
  align-items: start;
  width: 100%;
  min-width: 0;
}
.pulsating-demo .pulsating-limit-macro,
.pulsating-demo .pulsating-limit-cell {
  position: relative;
  min-width: 0;
  z-index: 2;
}
.pulsating-demo .pulsating-limit-macro > canvas {
  aspect-ratio: 360/256;
}
.pulsating-demo .pulsating-limit-period {
  min-height: 15px;
  margin-top: 3px;
}
.pulsating-demo .pulsating-limit-cell {
  margin-top: 14px;
  padding-top: 5px;
}
.pulsating-demo .pulsating-limit-cell h4 {
  font-size: .73rem;
  margin: 0 0 5px;
  line-height: 1.25;
}
.pulsating-demo .pulsating-limit-cell canvas.pulsating-cell {
  display: block;
  width: min(82%, 142px);
  height: auto;
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  cursor: default;
}
.pulsating-demo .pulsating-limit-mode {
  color: var(--ev-ink);
  font-size: .73rem;
  font-weight: 650;
  margin-top: 5px;
  min-height: 20px;
  line-height: 1.35;
}
.pulsating-demo button.pulsating-freeze {
  display: block;
  width: min(100%, 240px);
  margin: 9px auto 4px;
  padding: 8px 10px;
  border-radius: 7px;
  white-space: normal;
  font-size: .77rem;
  font-weight: 650;
  line-height: 1.4;
}
.pulsating-demo button.pulsating-freeze[aria-pressed="true"] {
  background: #e8f2f8;
  color: #214f70;
  border-color: #729bb7;
}
.pulsating-demo .pulsating-limit-time {
  font-size: .69rem;
  min-height: 20px;
  line-height: 1.35;
  color: var(--ev-muted);
  margin: 2px auto 0;
}
.pulsating-demo .pulsating-limit-cell .pulsating-selection-note {
  margin-top: 5px;
}
.pulsating-demo .pulsating-zoom-lines {
  z-index: 1;
}
.pulsating-demo .pulsating-play:disabled,
.pulsating-demo .pulsating-time:disabled {
  opacity: .5;
  cursor: not-allowed;
}
@media (max-width: 980px) {
  .pulsating-demo .evolving-visual-layout { grid-template-columns: minmax(0,1fr); }
  .pulsating-demo .pulsating-limit-stack { width: min(100%,280px); margin: 0 auto; }
}
@media (max-width: 500px) {
  .pulsating-demo .pulsating-limit-cell h4,
  .pulsating-demo .pulsating-limit-mode { font-size: .71rem; }
}


/* v102: Two-column microscopic/homogenized model on Evolving Microstructure.
   The primary demo above keeps its responsive and interactive layout. */
.evolving-model-comparison { margin-top: 1.3rem; margin-bottom: 1.35rem; }
.evolving-model-comparison .homogenization-formula-panel > h3 {
  color: #203e55; font-size: 1.12rem; line-height: 1.35;
  min-height: 2.7em; margin: 0 0 .65rem;
}
.evolving-model-comparison .homogenization-formula-panel .research-equation {
  padding: .85rem .8rem; margin: 0 0 .88rem;
  font-size: .92rem; line-height: 1.5;
}
.evolving-model-comparison .evolving-equation-label {
  font-size: .84rem; font-weight: 700; letter-spacing: .01em;
  color: #294960; margin-bottom: .65rem;
}
.evolving-model-comparison .research-equation .equation-note {
  font-size: .83rem; line-height: 1.55;
}
.evolving-model-comparison + p { max-width: 980px; }
@media (max-width: 740px) {
  .evolving-model-comparison .homogenization-formula-panel > h3 { min-height: 0; }
}

/* Keep the additional moving-boundary notation and kinetic law horizontally
   scrollable inside their own equation panels on very narrow screens. */
.research-main .evolving-boundary-notation,
.research-main .evolving-kinetic-law {
  max-width: 100%; overflow-x: auto; padding: .85rem .75rem;
}
.research-main .evolving-boundary-notation { margin: .5rem 0 1.4rem; }
.research-main .evolving-kinetic-law { margin: .8rem 0 1.1rem; }


/* v103: An effective concentration equation on one mathematical line.
   Allow scrolling within the formula on small viewports instead of
   forcing the entire research page to overflow horizontally. */
.evolving-model-comparison .evolving-effective-concentration {
  overflow-x: auto;
  scrollbar-width: thin;
}
.evolving-model-comparison .evolving-effective-concentration mjx-container[display="true"] {
  font-size: .88em !important;
}


/* v63: transparent logos — TopMath file is now cropped, keep previous visual size */
.cv-year-logo.topmath-logo,
.cv-award-logo.topmath-logo {
  max-width: 180px;
  max-height: 60px;
}


/* v104: friendlier contact section with prominent email */
.contact-intro {
  font-size: 1.08rem;
  line-height: 1.65;
}
.contact-email-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 20px;
  margin-top: 26px;
}
.contact-email-button {
  gap: 10px;
  font-size: 1.02rem;
  min-height: 50px;
  padding: 0 24px;
}
.contact-email-address {
  font-weight: 700;
  word-break: break-all;
}
.contact-online {
  padding: 26px 28px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255,255,255,0.85);
}
.contact-online-title {
  margin: 0 0 6px;
  font-size: .85rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent) !important;
}
