:root {
  --ink: #151922;
  --muted: #5e6877;
  --line: #d9dee7;
  --paper: #fbfbfa;
  --soft: #f3f7fb;
  --blue: #175fa3;
  --blue-dark: #193a5a;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
}

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

a:hover,
a:focus-visible {
  text-decoration: underline;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(251, 251, 250, 0.97);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.top-nav {
  width: min(1120px, calc(100vw - 40px));
  min-height: 58px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
}

.top-nav::-webkit-scrollbar {
  display: none;
}

.top-nav a {
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 700;
}

.home-link {
  color: var(--blue-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.02rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
}

main {
  width: min(1120px, calc(100vw - 40px));
  margin: 0 auto;
  padding: 52px 0 64px;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 64px;
}

.section-anchor,
body {
  scroll-margin-top: 78px;
}

.profile {
  position: sticky;
  top: 90px;
  align-self: start;
}

.portrait {
  width: 210px;
  height: 280px;
  display: block;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
}

h1 {
  margin: 22px 0 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.65rem;
  font-weight: 800;
  line-height: 1.1;
  white-space: nowrap;
}

h2,
h3 {
  margin: 0;
  line-height: 1.22;
}

.content > section > h2,
.section-heading-row {
  margin: 0 0 18px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.content > section > h2,
.section-heading-row h2 {
  color: var(--blue-dark);
  font-size: 1.12rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.section-heading-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
}

.section-heading-row a {
  flex: none;
  font-size: 0.9rem;
  font-weight: 700;
}

.title {
  color: var(--blue-dark);
  font-weight: 700;
}

.academic-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 18px;
}

.academic-links a {
  font-weight: 700;
}

section + section {
  margin-top: 44px;
}

.content p,
.content ul,
.content ol {
  margin-top: 0;
}

.content > section:first-child p {
  max-width: 760px;
  font-size: 1.03rem;
}

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

.publication-item + .publication-item {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.publication-title {
  margin: 0 0 7px;
  color: var(--ink);
  font-size: 1.08rem;
  font-weight: 650;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.publication-item .publication-authors {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.6;
}

.publication-authors strong {
  color: var(--ink);
  font-weight: 600;
}

.publication-item .publication-venue {
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.5;
}

.publication-venue a {
  font-weight: 500;
}

.publications + .note {
  margin-top: 18px;
}

.note {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.timeline p {
  margin: 0;
}

.timeline p + p {
  margin-top: 8px;
}

.timeline span {
  display: inline-block;
  min-width: 118px;
  color: var(--blue-dark);
  font-weight: 800;
}

.hobbies {
  display: inline-block;
  margin-bottom: 0;
  padding: 10px 14px;
  color: var(--blue-dark);
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 700;
}

footer {
  width: min(1120px, calc(100vw - 40px));
  margin: 0 auto;
  padding: 22px 0 34px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 0.86rem;
}

footer p {
  margin: 0;
}

main.publications-page {
  display: block;
  width: min(980px, calc(100vw - 40px));
}

.publications-page > section > h1 {
  margin: 0 0 10px;
  font-size: clamp(2.35rem, 5vw, 3.25rem);
}

.page-intro {
  margin: 0 0 38px;
  color: var(--muted);
}

.publication-categories {
  margin: -18px 0 28px;
}

.publications-page section > h2 {
  margin-bottom: 18px;
  color: var(--blue-dark);
  font-size: 1.35rem;
}

.year-group {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 28px;
  padding: 26px 0;
  border-top: 1px solid var(--line);
}

.year-group > h3 {
  color: var(--blue-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.25rem;
}

@media (max-width: 920px) {
  .top-nav {
    width: min(100vw - 28px, 760px);
    gap: 22px;
  }

  .nav-links {
    gap: 22px;
  }

  main {
    width: min(100vw - 32px, 760px);
    grid-template-columns: 1fr;
    gap: 38px;
    padding: 36px 0 48px;
  }

  .profile {
    position: static;
  }

  .portrait {
    width: 190px;
    height: 252px;
  }
}

@media (max-width: 620px) {
  body {
    font-size: 15px;
  }

  .top-nav a {
    font-size: 0.88rem;
  }

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

  .section-heading-row h2 {
    margin-bottom: 6px;
  }

  .timeline span {
    display: block;
    min-width: 0;
  }

  .year-group {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}
