:root {
  --font-scale: 1;
  --bg: #fdfdfd;
  --surface: #ffffff;
  --surface-muted: #f5f2f3;
  --surface-strong: #ece8ea;
  --text: #121212;
  --text-soft: #5d5d61;
  --heading: #557893;
  --blue: #7896ad;
  --blue-deep: #557893;
  --accent: #b65370;
  --border: #ded9dc;
  --shadow: 0 14px 40px rgba(73, 88, 102, 0.10);
  --topbar-height: 72px;
}

[data-theme="dark"] {
  --bg: #121316;
  --surface: #1c1e22;
  --surface-muted: #24262b;
  --surface-strong: #2c2f35;
  --text: #f1f1f1;
  --text-soft: #b9bcc2;
  --heading: #a8bfd0;
  --blue: #91abc0;
  --blue-deep: #a8bfd0;
  --accent: #ef9bb2;
  --border: #3a3d44;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.32);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--topbar-height) + 28px);
  font-size: calc(16px * var(--font-scale));
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 92% 8%, color-mix(in srgb, var(--blue) 10%, transparent), transparent 27rem),
    var(--bg);
  font-family: "Source Sans 3", "Source Sans Pro", Helvetica, Arial, sans-serif;
  font-weight: 400;
  line-height: 1.62;
  transition: color .2s ease, background-color .2s ease;
}

a { color: var(--accent); text-decoration-thickness: .08em; text-underline-offset: .18em; }
a:hover { color: var(--blue-deep); }
a:focus-visible, button:focus-visible, select:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: -8rem;
  z-index: 10000;
  padding: .7rem 1rem;
  color: #fff;
  background: var(--blue-deep);
  border-radius: .4rem;
}
.skip-link:focus { top: .75rem; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  min-height: var(--topbar-height);
  background: color-mix(in srgb, var(--surface) 93%, transparent);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 18px rgba(28, 38, 54, .08);
  backdrop-filter: blur(16px);
}

.topbar-inner {
  width: min(1540px, 100%);
  min-height: var(--topbar-height);
  margin: 0 auto;
  padding: .7rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1.15rem;
}

.brand {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  color: var(--heading);
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.section-nav {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: .15rem;
  overflow-x: auto;
  scrollbar-width: none;
}
.section-nav::-webkit-scrollbar { display: none; }
.section-nav a {
  flex: 0 0 auto;
  padding: .54rem .62rem;
  color: var(--text-soft);
  border-radius: .42rem;
  font-size: .89rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
}
.section-nav a:hover, .section-nav a.is-active {
  color: var(--heading);
  background: var(--surface-muted);
}

.controls { display: flex; align-items: center; gap: .42rem; margin-left: auto; }
.button-group { display: flex; gap: .22rem; }
.square-button {
  width: 2.55rem;
  height: 2.55rem;
  display: inline-grid;
  place-items: center;
  padding: 0;
  color: var(--heading);
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: .48rem;
  cursor: pointer;
}
.square-button:hover { color: var(--accent); background: var(--surface-strong); }
.text-button { font: 800 .82rem/1 "Source Sans 3", sans-serif; }
.text-button span { font-size: .75em; }
.theme-icon { width: 1.18rem; height: 1.18rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.moon-icon, [data-theme="dark"] .sun-icon { display: none; }
[data-theme="dark"] .moon-icon { display: block; }

.language-control {
  min-width: 8.8rem;
  height: 2.55rem;
  display: flex;
  align-items: center;
  gap: .35rem;
  padding-left: .65rem;
  color: var(--heading);
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: .48rem;
}
.globe { font-weight: 900; }
.language-control select {
  width: 100%;
  height: 100%;
  padding: 0 1.8rem 0 .15rem;
  color: var(--text);
  background: transparent;
  border: 0;
  font: 700 .84rem/1 "Source Sans 3", sans-serif;
  cursor: pointer;
}

main { width: min(1220px, calc(100% - 2.5rem)); margin: 0 auto; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 345px);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: end;
  padding: clamp(4.5rem, 9vw, 8rem) 0 clamp(3.5rem, 7vw, 6rem);
}

.eyebrow, .section-kicker, .contact-label {
  margin: 0 0 .65rem;
  color: var(--accent);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}

h1, h2, h3 { color: var(--heading); line-height: 1.12; }
h1 { margin: 0; font-size: clamp(3rem, 8vw, 6.6rem); font-weight: 900; letter-spacing: -.055em; }
h1 span { color: inherit; }
.specialties { margin: 1rem 0 .7rem; color: var(--blue-deep); font-size: clamp(1.05rem, 2vw, 1.38rem); font-weight: 700; }
.specialties i { margin: 0 .25em; color: var(--accent); font-style: normal; }
.hero-role { max-width: 52rem; margin: 0; color: var(--text-soft); font-size: 1.08rem; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.15rem; margin-top: 2rem; }

.primary-button {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .78rem 1.05rem;
  color: #fff;
  background: var(--blue-deep);
  border: 1px solid var(--blue-deep);
  border-radius: .5rem;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 8px 22px color-mix(in srgb, var(--blue-deep) 22%, transparent);
}
.primary-button:hover { color: #fff; background: var(--accent); border-color: var(--accent); }
.secondary-link { font-weight: 700; }

.contact-card {
  padding: 1.45rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 4px solid var(--accent);
  border-radius: .7rem;
  box-shadow: var(--shadow);
}
.contact-card address { display: grid; gap: .35rem; font-style: normal; }
.contact-card a { width: fit-content; }

.cv-shell { border-top: 1px solid var(--border); }
.cv-section {
  display: grid;
  grid-template-columns: minmax(210px, 28%) minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 5rem);
  padding: clamp(3.2rem, 7vw, 6rem) 0;
  border-bottom: 1px solid var(--border);
}
.section-heading { align-self: start; position: sticky; top: calc(var(--topbar-height) + 2rem); }
.section-heading h2 { margin: 0; font-size: clamp(1.65rem, 3vw, 2.35rem); letter-spacing: -.025em; }
.section-content { min-width: 0; }
.section-content > :first-child { margin-top: 0; }
.section-content > :last-child { margin-bottom: 0; }
.section-content p { margin: 0 0 1.1rem; }

.role, .subsection-title {
  margin: 2.45rem 0 .8rem;
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: -.01em;
}
.subsection-title {
  padding-bottom: .55rem;
  color: var(--blue-deep);
  border-bottom: 2px solid color-mix(in srgb, var(--blue) 35%, var(--border));
}

.cv-list { margin: 0 0 1.65rem; padding: 0; list-style: none; }
.cv-list li { position: relative; margin: 0 0 .72rem; padding-left: 1.25rem; }
.cv-list li::before { content: ""; position: absolute; left: 0; top: .68em; width: .42rem; height: .42rem; background: var(--accent); border-radius: 50%; }
.small-note { color: var(--text-soft); font-size: .92rem; font-style: italic; }

.citation {
  margin: 0 0 .82rem;
  padding: 1rem 1.1rem 1.05rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--blue);
  border-radius: .48rem;
}
.citation p { margin: 0; }
.publication-links { display: flex; flex-wrap: wrap; gap: .4rem .9rem; margin-top: .58rem; }
.publication-links a { font-size: .86rem; font-weight: 800; }
.original-language-note { display: block; margin-top: .55rem; color: var(--text-soft); font-size: .76rem; font-style: italic; }
.original-language-note[hidden] { display: none; }

.download-panel {
  margin: clamp(3.5rem, 8vw, 7rem) 0;
  padding: clamp(1.4rem, 4vw, 2.4rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: .8rem;
}
.download-panel h2 { margin: 0; font-size: clamp(1.5rem, 3vw, 2.2rem); }

footer {
  width: min(1220px, calc(100% - 2.5rem));
  margin: 0 auto;
  padding: 2rem 0 3rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--text-soft);
  border-top: 1px solid var(--border);
  font-size: .9rem;
}
footer p { margin: 0; }

#google_translate_element,
.goog-te-banner-frame,
.skiptranslate iframe,
body > .skiptranslate { display: none !important; }
body { top: 0 !important; }

@media (max-width: 1120px) {
  .section-nav a { font-size: .82rem; padding-inline: .5rem; }
}

@media (max-width: 860px) {
  :root { --topbar-height: 116px; }
  .topbar-inner { flex-wrap: wrap; gap: .45rem .8rem; }
  .controls { order: 2; }
  .section-nav { order: 3; flex-basis: 100%; }
  .hero { grid-template-columns: 1fr; align-items: start; }
  .contact-card { max-width: 30rem; }
  .cv-section { grid-template-columns: 1fr; gap: 1.5rem; }
  .section-heading { position: static; }
}

@media (max-width: 560px) {
  :root { --topbar-height: 112px; }
  main, footer { width: min(100% - 1.5rem, 1220px); }
  .topbar-inner { padding-inline: .75rem; gap: .35rem .5rem; }
  .brand { font-size: .78rem; }
  .controls { margin-left: 0; flex: 1; justify-content: flex-end; gap: .25rem; }
  .square-button { width: 2.25rem; height: 2.25rem; }
  .language-control { width: 7.2rem; min-width: 0; height: 2.25rem; overflow: hidden; }
  .language-control select { padding-right: 1.25rem; font-size: .76rem; }
  .hero { padding-top: 3.4rem; }
  h1 { font-size: clamp(2.8rem, 15vw, 4.3rem); }
  .download-panel, footer { align-items: flex-start; flex-direction: column; }
  .citation { padding: .9rem; }
}

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

@media print {
  :root { --bg: #fff; --surface: #fff; --surface-muted: #fff; --text: #121212; --text-soft: #444; --heading: #557893; --border: #bbb; }
  body { background: #fff; font-size: 10.5pt; }
  [data-no-print], .download-panel, footer { display: none !important; }
  main { width: 100%; }
  .hero { padding: 0 0 1.2rem; grid-template-columns: 1fr 220px; gap: 2rem; }
  h1 { font-size: 32pt; }
  .hero-actions { display: none; }
  .contact-card { box-shadow: none; }
  .cv-section { grid-template-columns: 165px 1fr; gap: 1.5rem; padding: 1.4rem 0; break-inside: auto; }
  .section-heading { position: static; }
  .citation { break-inside: avoid; }
  a { color: inherit; text-decoration: none; }
  .publication-links { display: none; }
}
