:root {
  --bg: #fbfcfe;
  --surface: #f1f5f9;
  --surface-strong: #e8eef5;
  --text: #15202b;
  --muted: #5d6976;
  --faint: #7d8995;
  --line: #dbe3eb;
  --accent: #2b70b7;
  --accent-strong: #14548f;
  --accent-soft: #e7f1fb;
  --figure-bg: #ffffff;
  --shadow: 0 20px 50px rgba(25, 46, 70, 0.1);
  --radius: 10px;
  --shell: 1080px;
  --reading: 760px;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --serif: Georgia, "Times New Roman", serif;
}

html[data-theme="dark"] {
  --bg: #0c1219;
  --surface: #131c26;
  --surface-strong: #1b2733;
  --text: #edf3f8;
  --muted: #a6b1bd;
  --faint: #83909d;
  --line: #283542;
  --accent: #74b7f4;
  --accent-strong: #9bcbf7;
  --accent-soft: #142b40;
  --figure-bg: #f8fafc;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.shell {
  width: min(calc(100% - 2.5rem), var(--shell));
  margin-inline: auto;
}

.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;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  left: 1rem;
  top: -5rem;
  padding: 0.65rem 0.9rem;
  border-radius: 6px;
  background: var(--text);
  color: var(--bg);
}

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

.site-header {
  position: sticky;
  z-index: 50;
  top: 0;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 88%, transparent);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(16px);
}

.header-inner {
  display: flex;
  min-height: 4.6rem;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.brand {
  color: var(--text);
  font-size: 1.16rem;
  font-weight: 350;
  letter-spacing: -0.025em;
  text-decoration: none;
  white-space: nowrap;
}

.brand strong {
  font-weight: 720;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.35rem;
}

.site-nav > a {
  position: relative;
  padding: 0.3rem 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 550;
  text-decoration: none;
}

.site-nav > a::after {
  position: absolute;
  right: 0;
  bottom: -0.15rem;
  left: 0;
  height: 2px;
  background: var(--accent);
  content: "";
  opacity: 0;
  transform: scaleX(0.4);
  transition: opacity 160ms ease, transform 160ms ease;
}

.site-nav > a:hover,
.site-nav > a[aria-current="page"] {
  color: var(--text);
}

.site-nav > a:hover::after,
.site-nav > a[aria-current="page"]::after {
  opacity: 1;
  transform: scaleX(1);
}

.theme-toggle,
.nav-toggle {
  display: inline-grid;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  place-items: center;
}

.theme-toggle {
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--line);
  border-radius: 50%;
}

.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.theme-icon {
  width: 1.05rem;
  height: 1.05rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.theme-icon--moon,
html[data-theme="dark"] .theme-icon--sun {
  display: none;
}

html[data-theme="dark"] .theme-icon--moon {
  display: block;
}

.nav-toggle {
  display: none;
  width: 2.5rem;
  gap: 5px;
}

.nav-toggle span:not(.sr-only) {
  display: block;
  width: 1.35rem;
  height: 2px;
  background: currentColor;
}

.home-shell {
  padding-block: 4.75rem 6rem;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 232px);
  align-items: start;
  gap: clamp(3rem, 8vw, 7rem);
}

.eyebrow,
.card-meta {
  margin: 0 0 0.85rem;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.13em;
  line-height: 1.35;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.1rem, 4.4vw, 3.05rem);
  font-weight: 760;
  letter-spacing: -0.04em;
  line-height: 1.02;
}

.hero-role {
  margin: 1.3rem 0 0;
  font-family: var(--serif);
  font-size: clamp(1.15rem, 2.3vw, 1.45rem);
  line-height: 1.3;
}

.hero-affiliation {
  margin: 0.65rem 0 1.8rem;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.hero-affiliation a {
  color: inherit;
}

.hero-body {
  max-width: 700px;
  font-size: 1.06rem;
}

.hero-body p:first-child {
  color: var(--text);
  font-family: var(--serif);
  font-size: clamp(1.06rem, 1.6vw, 1.18rem);
  line-height: 1.6;
}

.profile-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1.35rem;
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.profile-links a {
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 0.28em;
}

.profile-links a:hover {
  color: var(--accent-strong);
  text-decoration-color: var(--accent);
}

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

.button {
  display: inline-flex;
  min-height: 2.8rem;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.05rem;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--bg);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, transform 160ms ease;
}

.button:hover {
  border-color: var(--accent);
  color: var(--accent-strong);
  transform: translateY(-1px);
}

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

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

.profile-figure {
  margin: 0;
}

.profile-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.profile-frame::before {
  position: absolute;
  z-index: 2;
  top: 0;
  right: 0;
  width: 26%;
  height: 4px;
  background: var(--accent);
  content: "";
}

.profile-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 36%;
}

.home-about {
  max-width: 760px;
  margin-top: clamp(2.75rem, 5vw, 4rem);
  padding-top: clamp(2.25rem, 4vw, 3rem);
  border-top: 1px solid var(--line);
}

.prose.home-about h2 {
  margin: 2.85rem 0 0.9rem;
  font-family: var(--serif);
  font-size: 1.32rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.prose.home-about > h2:first-child {
  margin-top: 0;
}

.prose.home-about p,
.prose.home-about li {
  font-size: 1.02rem;
  line-height: 1.72;
}

.home-about ul {
  padding-left: 1.15rem;
}

.home-about li {
  margin-bottom: 0.6rem;
}

.profile-figure figcaption,
.research-figure figcaption {
  margin-top: 0.75rem;
  color: var(--faint);
  font-size: 0.78rem;
  line-height: 1.5;
}

.focus-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 4.5rem;
  border-block: 1px solid var(--line);
}

.focus-strip > div {
  display: flex;
  min-height: 7.25rem;
  flex-direction: column;
  justify-content: center;
  padding: 1.25rem 1.5rem;
  border-right: 1px solid var(--line);
}

.focus-strip > div:first-child {
  padding-left: 0;
}

.focus-strip > div:last-child {
  border-right: 0;
}

.focus-value {
  color: var(--text);
  font-family: var(--serif);
  font-size: 1.75rem;
  line-height: 1;
}

.focus-label {
  margin-top: 0.45rem;
  color: var(--muted);
  font-size: 0.86rem;
}

.home-section {
  padding-top: 6rem;
}

.home-section--compact {
  max-width: 880px;
  padding-top: 5rem;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2rem;
}

.section-heading--stacked {
  display: block;
}

.section-heading h2 {
  max-width: 720px;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.16;
}

.section-heading .eyebrow {
  margin-bottom: 0.7rem;
}

.text-link {
  flex: 0 0 auto;
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
}

.highlight-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.highlight-card {
  display: flex;
  min-height: 19rem;
  flex-direction: column;
  padding: 1.6rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.highlight-card h3 {
  margin: 0;
  font-size: 1.18rem;
  line-height: 1.35;
}

.highlight-card > p:not(.card-meta) {
  margin: 1rem 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.highlight-card > a {
  margin-top: auto;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}

.question-list {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: question;
}

.question-list li {
  display: grid;
  grid-template-columns: 3.5rem 1fr;
  padding: 1.35rem 0;
  border-top: 1px solid var(--line);
  font-family: var(--serif);
  font-size: clamp(1.1rem, 2.3vw, 1.35rem);
  line-height: 1.45;
  counter-increment: question;
}

.question-list li::before {
  color: var(--accent);
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  content: "0" counter(question);
}

.page {
  padding-block: 4.5rem 7rem;
}

.page-header {
  max-width: 820px;
  margin-bottom: 4rem;
}

.page-header h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1.02;
}

.page-lede {
  max-width: 720px;
  margin: 1.25rem 0 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.page-content {
  max-width: var(--reading);
}

.research-page .page-content {
  max-width: none;
}

.prose > :first-child {
  margin-top: 0;
}

.prose > :last-child {
  margin-bottom: 0;
}

.prose p {
  margin: 0 0 1.25rem;
}

.prose h2 {
  margin: 3.5rem 0 1rem;
  font-family: var(--serif);
  font-size: clamp(1.65rem, 3vw, 2.2rem);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.prose h3 {
  margin: 2.25rem 0 0.75rem;
  font-size: 1.14rem;
  line-height: 1.35;
}

.prose ul,
.prose ol {
  margin: 1rem 0 1.5rem;
  padding-left: 1.35rem;
}

.prose li {
  margin: 0.45rem 0;
}

.prose hr {
  margin: 3.5rem 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.research-intro {
  max-width: 780px;
  margin: -1.5rem 0 5rem;
  color: var(--muted);
  font-size: 1.08rem;
}

.publication-star {
  margin-right: 0.4rem;
  color: var(--accent-strong);
  font-size: 0.85em;
  vertical-align: 0.12em;
}

.group-note .publication-star {
  margin-right: 0.25rem;
}

.group-note {
  margin: -0.35rem 0 1.5rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.lecture-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 2.25rem;
}

.section-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.2rem;
  margin: 0 0 3rem;
  padding: 0.9rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-jump a {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.section-jump a:hover {
  color: var(--accent-strong);
}

.research-prose {
  max-width: 760px;
  margin-bottom: clamp(3rem, 6vw, 4.5rem);
}

.research-prose h2 {
  margin: 0 0 1.1rem;
}

.research-entry {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(2.5rem, 6vw, 5.5rem);
  padding: 4.5rem 0;
  border-top: 1px solid var(--line);
}

.research-entry--reverse .research-figure {
  order: 2;
}

.research-entry--reverse .research-copy {
  order: 1;
}

.research-figure {
  margin: 0;
}

.research-figure img {
  width: 100%;
  max-height: 430px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--figure-bg);
  object-fit: contain;
  box-shadow: var(--shadow);
}

.research-copy h2 {
  margin: 0 0 1.1rem;
  font-family: var(--serif);
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.research-copy p {
  margin: 0 0 1rem;
}

.research-copy a {
  font-weight: 650;
}

.publication-group + .publication-group {
  margin-top: 4.5rem;
}

.publication-group h2 {
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--line);
}

.publication-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.publication-list li {
  display: grid;
  grid-template-columns: 4rem 1fr;
  gap: 1.25rem;
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--line);
}

.publication-year {
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 750;
}

.publication-title {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--text);
  font-weight: 680;
  line-height: 1.45;
}

.publication-authors,
.publication-venue {
  display: block;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.publication-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 0.55rem;
  font-size: 0.84rem;
  font-weight: 700;
}

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

.info-card,
.resource-card {
  padding: 1.6rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.info-card h2,
.info-card h3,
.resource-card h2,
.resource-card h3 {
  margin-top: 0;
  font-family: var(--sans);
  font-size: 1.12rem;
  font-weight: 720;
}

.info-card p,
.resource-card p {
  color: var(--muted);
  font-size: 0.94rem;
}

.resource-card .resource-status {
  margin: 1.25rem 0 0;
  color: var(--faint);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.timeline {
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}

.timeline li {
  display: grid;
  grid-template-columns: minmax(7rem, 0.28fr) 1fr;
  gap: 1.5rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--line);
}

.timeline time {
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 750;
}

.timeline strong {
  display: block;
  line-height: 1.4;
}

.timeline span {
  display: block;
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.cv-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.75rem 0 3rem;
}

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

.split-list h2 {
  margin-top: 0;
}

.not-found {
  min-height: 65vh;
  padding-block: 8rem;
}

.not-found h1 {
  margin: 0 0 1rem;
  font-family: var(--serif);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 500;
}

.not-found .button {
  margin-top: 1rem;
}

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.footer-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding-block: 2.25rem;
  font-size: 0.82rem;
}

.footer-grid p {
  margin: 0.15rem 0;
}

.footer-name {
  color: var(--text);
  font-weight: 720;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 1rem;
}

.footer-links a {
  color: var(--muted);
  font-weight: 650;
  text-decoration: none;
}

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

@media (max-width: 900px) {
  .header-inner {
    min-height: 4.2rem;
  }

  .nav-toggle {
    display: inline-grid;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    display: none;
    padding: 1rem 1.25rem 1.25rem;
    border-bottom: 1px solid var(--line);
    background: var(--bg);
    box-shadow: 0 14px 24px rgba(0, 0, 0, 0.08);
  }

  .site-nav.is-open {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

  .site-nav > a {
    padding: 0.55rem 0;
  }

  .site-nav > a::after {
    display: none;
  }

  .theme-toggle {
    justify-self: end;
  }

  .hero {
    gap: 3rem;
  }

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

  .highlight-card {
    min-height: 0;
  }

  .highlight-card > a {
    margin-top: 1rem;
  }

  .research-entry,
  .research-entry--reverse {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .research-entry--reverse .research-figure,
  .research-entry--reverse .research-copy {
    order: initial;
  }
}

@media (max-width: 680px) {
  .shell {
    width: min(calc(100% - 1.5rem), var(--shell));
  }

  .home-shell {
    padding-block: 3rem 4.5rem;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 2.75rem;
  }

  .hero h1 {
    font-size: clamp(1.95rem, 8.5vw, 2.6rem);
  }

  .profile-figure {
    max-width: 220px;
  }

  .focus-strip {
    grid-template-columns: 1fr;
    margin-top: 3.5rem;
  }

  .focus-strip > div,
  .focus-strip > div:first-child {
    min-height: 5.5rem;
    padding: 1rem 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .focus-strip > div:last-child {
    border-bottom: 0;
  }

  .home-section {
    padding-top: 4.5rem;
  }

  .section-heading {
    display: block;
  }

  .section-heading .text-link {
    display: inline-block;
    margin-top: 1rem;
  }

  .question-list li {
    grid-template-columns: 2.4rem 1fr;
  }

  .page {
    padding-block: 3.25rem 5rem;
  }

  .page-header {
    margin-bottom: 3rem;
  }

  .research-intro {
    margin-bottom: 2rem;
  }

  .research-entry {
    padding: 3rem 0;
  }

  .publication-list li,
  .timeline li {
    grid-template-columns: 1fr;
    gap: 0.45rem;
  }

  .card-grid,
  .resource-grid,
  .split-list {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    display: block;
  }

  .footer-links {
    justify-content: flex-start;
    margin-top: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  .site-header,
  .site-footer,
  .hero-actions,
  .theme-toggle {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }

  .page,
  .home-shell {
    padding-block: 1rem;
  }
}
