:root {
  --bg: #ffffff;
  --ink: #313131;
  --muted: #6d6d6d;
  --line: #e3e6e8;
  --blue: #2f6fed;
  --blue-dark: #1f55bd;
  --header-height: 70px;
  --max-width: 1120px;
}

* {
  box-sizing: border-box;
  letter-spacing: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 28px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 18px;
  line-height: 1.65;
}

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

a:hover,
a:focus-visible {
  color: var(--blue-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.skip-link {
  position: absolute;
  top: -48px;
  left: 16px;
  z-index: 30;
  padding: 8px 12px;
  border-radius: 4px;
  background: var(--ink);
  color: #fff;
}

.skip-link:focus {
  top: 12px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 2px 8px rgba(30, 38, 45, 0.08);
}

.nav-shell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 36px;
  width: min(100% - 40px, var(--max-width));
  height: 100%;
  margin: 0 auto;
}

.brand {
  color: #222;
  font-size: 1.28rem;
  font-weight: 700;
  white-space: nowrap;
}

.brand:hover,
.brand:focus-visible {
  color: #222;
  text-decoration: none;
}

.site-menu {
  display: flex;
  align-items: center;
  gap: 27px;
}

.site-menu a {
  color: #353b40;
  font-size: 0.94rem;
  white-space: nowrap;
}

.site-menu a:hover,
.site-menu a:focus-visible {
  color: var(--blue);
  text-decoration: none;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  padding: 9px;
}

.nav-toggle-bar {
  display: block;
  width: 100%;
  height: 2px;
  margin: 5px 0;
  background: #333;
}

.profile-section,
.content-section,
.site-footer {
  width: min(100% - 40px, var(--max-width));
  margin: 0 auto;
}

.profile-section {
  padding: 80px 0 66px;
}

.profile-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 66px;
  align-items: start;
}

.profile-sidebar {
  text-align: center;
}

.avatar-frame {
  position: relative;
  display: grid;
  place-items: center;
  width: 200px;
  height: 200px;
  margin: 0 auto 24px;
  border-radius: 50%;
  overflow: hidden;
  background: #edf3f5;
  border: 1px solid #d7e0e3;
  color: #245968;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 3.15rem;
  font-weight: 700;
}

.avatar-frame img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 28%;
}

.profile-sidebar h1 {
  margin: 0;
  color: #181818;
  font-size: 2rem;
  font-weight: 400;
  line-height: 1.2;
}

.profile-role {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.profile-unit {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.4;
}

.profile-role + .profile-unit {
  margin-top: 8px;
}

.profile-affiliation {
  margin: 7px 0 0;
  color: var(--blue);
  font-size: 1.02rem;
  line-height: 1.45;
}

.profile-links {
  display: flex;
  justify-content: center;
  gap: 22px;
  margin-top: 25px;
  font-size: 1.08rem;
  font-weight: 600;
}

.profile-main > p {
  margin: 0 0 22px;
  text-align: justify;
  text-justify: inter-word;
}

.profile-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 48px;
  margin-top: 42px;
}

.profile-details h3,
.content-section h2 {
  margin: 0;
  color: #333;
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1.3;
}

.profile-details ul {
  margin: 14px 0 0;
  padding-left: 24px;
}

.profile-details li {
  margin: 5px 0;
}

.research-interests > h3 {
  font-size: 1.2rem;
}

.interest-groups {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 12px;
}

.interest-group h4 {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.3;
}

.interest-group ul {
  margin-top: 6px;
  padding-left: 21px;
}

.interest-group li {
  margin: 4px 0;
  font-size: 0.98rem;
  line-height: 1.5;
}

.education-item {
  position: relative;
  padding-left: 24px;
  margin-top: 14px;
}

.education-item::before {
  content: "";
  position: absolute;
  top: 9px;
  left: 2px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--blue);
}

.education-item strong,
.education-item span {
  display: block;
}

.education-item strong {
  font-size: 0.98rem;
}

.education-item span {
  color: var(--muted);
  font-size: 0.9rem;
}

.content-section {
  padding: 58px 0;
  border-top: 1px solid var(--line);
}

.content-section > h2 {
  margin-bottom: 25px;
  font-size: 2.1rem;
  font-weight: 400;
}

.paper-list {
  margin: 0;
  padding-left: 1.55rem;
}

.paper-entry {
  margin: 0;
  padding: 0 4px 18px;
}

.paper-entry + .paper-entry {
  padding-top: 18px;
  border-top: 1px solid #edf0f1;
}

.paper-entry:last-child {
  padding-bottom: 0;
}

.paper-entry::marker {
  color: #333;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.paper-entry p {
  margin: 0;
}

.paper-title {
  color: inherit;
  font-weight: 400;
}

.venue {
  color: inherit;
  font-style: italic;
}

.teaching-meta {
  color: var(--muted);
  font-size: 0.9rem;
}

.author-legend {
  margin: -15px 0 25px;
  color: var(--muted);
  font-size: 0.82rem;
}

.author-mark {
  margin-left: 1px;
  font-size: 0.7em;
  line-height: 0;
  vertical-align: super;
}

.teaching-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 30px 48px;
}

.teaching-list article {
  padding-top: 17px;
  border-top: 2px solid var(--blue);
}

.teaching-list h3,
.service-block h3 {
  margin: 0;
  color: #303030;
  font-size: 1.05rem;
}

.teaching-list p,
.service-block p {
  margin: 5px 0 0;
}

.service-block + .service-block {
  margin-top: 28px;
}

.contact-section p {
  margin: 4px 0;
}

.site-footer {
  padding: 25px 0 42px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.88rem;
}

.site-footer p {
  margin: 0;
}

@media (max-width: 900px) {
  .site-menu {
    position: absolute;
    top: var(--header-height);
    left: -20px;
    right: -20px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 20px 16px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 5px 12px rgba(30, 38, 45, 0.08);
  }

  .site-menu.is-open {
    display: flex;
  }

  .site-menu a {
    padding: 10px 0;
    border-top: 1px solid #edf0f1;
  }

  .nav-toggle {
    display: block;
  }

  .profile-layout {
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 42px;
  }

  .avatar-frame {
    width: 180px;
    height: 180px;
  }

  .profile-details {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

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

  .nav-shell,
  .profile-section,
  .content-section,
  .site-footer {
    width: min(100% - 28px, var(--max-width));
  }

  .profile-section {
    padding: 48px 0 42px;
  }

  .profile-layout {
    grid-template-columns: 1fr;
    gap: 44px;
  }

  .profile-sidebar {
    text-align: center;
  }

  .profile-details h3 {
    font-size: 1.35rem;
  }

  .content-section {
    padding: 44px 0;
  }

  .content-section > h2 {
    font-size: 1.8rem;
  }

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