:root {
  --ink: #17221d;
  --muted: #5d6860;
  --paper: #fbfaf6;
  --panel: #ffffff;
  --line: #d9d4c7;
  --accent: #2f6f63;
  --accent-dark: #1f4e49;
  --gold: #9c7a2f;
  --soft-green: #e8f0eb;
  --soft-gold: #f2ead8;
  --shadow: 0 18px 45px rgba(28, 37, 31, 0.1);
  --page-width: calc(100vw - 48px);
  --page-gutter: 24px;
  --sidebar-width: 310px;
  --column-gap: 2.5rem;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding-top: 3.15rem;
  background:
    linear-gradient(90deg, rgba(23, 34, 29, 0.045) 1px, transparent 1px),
    linear-gradient(0deg, rgba(23, 34, 29, 0.035) 1px, transparent 1px),
    var(--paper);
  background-size: 42px 42px;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", "Noto Serif SC", Songti SC, serif;
  font-size: 17px;
  line-height: 1.68;
}

a {
  color: var(--accent-dark);
  text-decoration-color: rgba(47, 111, 99, 0.35);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--gold);
  text-decoration-color: currentColor;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 20;
  padding: 0.65rem 0.9rem;
  background: var(--ink);
  color: #fff;
}

.skip-link:focus {
  top: 1rem;
}

.site-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 30;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(232, 240, 235, 0.84));
  backdrop-filter: blur(14px);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: var(--page-width);
  margin: 0 auto;
  padding: 0.45rem 1.5rem;
  border-bottom: 1px solid rgba(217, 212, 199, 0.75);
  backdrop-filter: blur(14px);
}

.brand {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0;
  text-decoration: none;
}

.nav-cluster {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.2rem 0.78rem;
  font-size: 0.82rem;
}

.language-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.18rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
}

.language-switch a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 999px;
  font-size: 1rem;
  line-height: 1;
  text-decoration: none;
}

.language-switch a.active,
.language-switch a:hover {
  background: var(--soft-gold);
}

.nav-links a,
.toc a {
  color: var(--muted);
  text-decoration: none;
}

.nav-links a:hover,
.toc a:hover {
  color: var(--accent-dark);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 2.25rem;
  align-items: center;
  max-width: var(--page-width);
  min-height: auto;
  margin: 0 auto;
  padding: 2.75rem 1.5rem 2.5rem;
}

.hero-copy {
  position: relative;
  max-width: 820px;
}

.hero-copy::before {
  content: "∂ₜ u + ∇·F(u) = 0";
  position: absolute;
  top: -1.35rem;
  left: 0;
  color: rgba(156, 122, 47, 0.16);
  font-size: clamp(1.7rem, 4.8vw, 3.4rem);
  line-height: 1;
  white-space: nowrap;
  pointer-events: none;
}

.eyebrow,
.section-number {
  margin: 0;
  color: var(--gold);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  line-height: 1.12;
}

h1 {
  margin: 0.45rem 0 0.8rem;
  font-size: clamp(2.6rem, 6vw, 5.1rem);
  letter-spacing: 0;
}

h1 span {
  display: inline-block;
  margin-left: 0.3em;
  color: var(--accent-dark);
  font-size: 0.46em;
  font-weight: 500;
}

.role {
  max-width: 700px;
  margin: 0;
  color: #334039;
  font-size: clamp(1rem, 1.6vw, 1.16rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.45rem;
}

.button {
  display: inline-flex;
  align-items: center;
  min-height: 2.7rem;
  padding: 0.55rem 1rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.92rem;
  font-weight: 650;
  text-decoration: none;
}

.button.primary {
  border-color: var(--accent-dark);
  background: var(--accent-dark);
  color: #fff;
}

.portrait-card {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.portrait-card img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 252 / 320;
  object-fit: cover;
}

.portrait-card figcaption {
  padding: 1rem;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.portrait-card strong {
  display: block;
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.78rem;
  text-transform: uppercase;
}

.page-shell {
  display: block;
  max-width: var(--page-width);
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}

.sidebar {
  position: fixed;
  top: 4.55rem;
  left: var(--page-gutter);
  width: var(--sidebar-width);
  max-height: calc(100vh - 5.55rem);
  overflow: auto;
  padding-right: 0.15rem;
}

.content {
  margin-left: calc(var(--sidebar-width) + var(--column-gap));
}

.side-profile {
  margin-bottom: 1.2rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 28px rgba(28, 37, 31, 0.06);
  padding-top: 1rem;
  overflow: hidden;
}

.side-profile img {
  display: block;
  width: min(48%, 142px);
  height: auto;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  aspect-ratio: 252 / 320;
  object-fit: cover;
}

.side-profile-body {
  position: relative;
  padding: 0.9rem 1rem 1rem;
  overflow: hidden;
}

.side-profile-body::before {
  content: "∂ₜ u + ∇·F(u) = 0";
  position: absolute;
  top: 0.35rem;
  left: 0.65rem;
  z-index: 0;
  color: rgba(156, 122, 47, 0.1);
  font-size: clamp(1.45rem, 2.2vw, 2rem);
  line-height: 0.9;
  white-space: nowrap;
  pointer-events: none;
}

.side-profile .eyebrow {
  position: relative;
  z-index: 1;
  margin-top: 0.55rem;
  font-size: 0.67rem;
  line-height: 1.45;
}

.side-profile h1 {
  position: relative;
  z-index: 1;
  margin: 0.45rem 0 0.55rem;
  font-size: clamp(1.7rem, 2.1vw, 2.35rem);
}

.side-profile h1 span {
  display: block;
  margin-left: 0;
  margin-top: 0.15rem;
  font-size: 0.7em;
}

.side-profile .role {
  position: relative;
  z-index: 1;
  max-width: none;
  font-size: 0.95rem;
  line-height: 1.45;
}

.side-profile .office {
  position: relative;
  z-index: 1;
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.side-profile .office strong {
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.76rem;
  text-transform: uppercase;
}

.side-profile .hero-actions {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0.55rem;
  margin-top: 1rem;
}

.side-profile .button {
  justify-content: center;
  width: 100%;
  min-height: 2.35rem;
  padding: 0.45rem 0.65rem;
  font-size: 0.86rem;
  overflow-wrap: anywhere;
}

.tool-panel {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
}

.tool-panel label {
  display: block;
  margin-bottom: 0.5rem;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.8rem;
  font-weight: 750;
  text-transform: uppercase;
}

.tool-panel input {
  width: 100%;
  min-height: 2.4rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.tool-panel p {
  min-height: 1.45rem;
  margin: 0.65rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.toc {
  display: grid;
  gap: 0.45rem;
  margin-top: 1.2rem;
  padding-left: 1rem;
  border-left: 2px solid var(--line);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.92rem;
}

.content {
  display: grid;
  gap: 1.5rem;
}

.section {
  scroll-margin-top: 4.5rem;
  padding: 2rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
}

.section-heading {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr);
  gap: 1rem;
  align-items: baseline;
  margin-bottom: 1.25rem;
}

.section h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.45rem);
}

.subheading {
  margin: 2rem 0 0.8rem;
  color: var(--accent-dark);
  font-size: 1.25rem;
}

.timeline {
  display: grid;
  gap: 0.85rem;
}

.timeline-item {
  display: grid;
  grid-template-columns: 155px minmax(0, 1fr);
  gap: 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(217, 212, 199, 0.75);
}

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

.timeline-item span {
  color: var(--gold);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.84rem;
  font-weight: 750;
}

.timeline-item p,
.section > p,
.info-block p,
.callout p {
  margin: 0;
}

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

.research-card,
.info-block,
.callout {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #fff, rgba(242, 234, 216, 0.34));
}

.research-card,
.info-block {
  padding: 1.1rem;
}

.research-card h3,
.info-block h3,
.callout h3 {
  margin: 0 0 0.55rem;
  color: var(--accent-dark);
  font-size: 1.12rem;
}

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

.formula {
  display: block;
  min-height: 2.1rem;
  margin-bottom: 0.75rem;
  color: var(--gold);
  font-size: 1.2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.paper-list,
.compact-list,
.talk-list,
.plain-list {
  margin: 0;
  padding-left: 1.35rem;
}

.paper-list li,
.compact-list li,
.talk-list li {
  margin: 0.7rem 0;
  padding-left: 0.25rem;
}

.paper-list li::marker,
.compact-list li::marker,
.talk-list li::marker {
  color: var(--gold);
  font-weight: 700;
}

.paper-list strong {
  color: var(--accent-dark);
}

.plain-list li {
  margin: 0.55rem 0;
}

.callout {
  margin-top: 1rem;
  padding: 1.15rem;
  background: var(--soft-green);
}

.link-grid a {
  display: flex;
  align-items: center;
  min-height: 3.2rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 650;
  text-decoration: none;
}

.link-grid a:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
}

.footer {
  padding: 1rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  text-align: right;
}

.is-hidden {
  display: none !important;
}

@media (max-width: 920px) {
  body {
    padding-top: 0;
  }

  .site-header {
    position: static;
  }

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

  .nav-links {
    justify-content: flex-start;
  }

  .nav-cluster {
    align-items: flex-start;
    flex-direction: column-reverse;
    justify-content: flex-start;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 2.25rem;
  }

  .portrait-card {
    max-width: 260px;
  }

  .page-shell {
    display: block;
  }

  .sidebar {
    position: static;
    width: auto;
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }

  .content {
    margin-left: 0;
  }

  .toc {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-left: 0;
    border-left: 0;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 16px;
  }

  .topbar,
  .page-shell {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .hero-copy::before {
    top: -2.1rem;
    font-size: 2.2rem;
  }

  .hero-actions,
  .nav-links {
    width: 100%;
  }

  .nav-cluster {
    width: 100%;
  }

  .button {
    justify-content: center;
    width: 100%;
  }

  .side-profile {
    display: block;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
  }

  .section {
    padding: 1.25rem;
  }

  .section-heading,
  .timeline-item,
  .research-grid,
  .two-column,
  .link-grid,
  .toc {
    grid-template-columns: 1fr;
  }

  .section-number {
    display: none;
  }
}
