:root {
  --blue: #486f9e;
  --blue-dark: #173f70;
  --link: #255d99;
  --ink: #202428;
  --muted: #5e6670;
  --line: #a8adb3;
  --sidebar: #f5f6f7;
  --accent: #b52222;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: #fff;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
  line-height: 1.42;
  margin: 0;
}

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

.site-layout {
  display: grid;
  grid-template-columns: 178px minmax(0, 900px);
  min-height: 100vh;
  width: min(1120px, 100%);
}

.sidebar {
  background: var(--sidebar);
  border-right: 1px solid #d5d8db;
  min-height: 100vh;
}

.sidebar-inner {
  position: sticky;
  top: 0;
  padding: 18px 12px 28px;
}

.site-name {
  border-bottom: 1px solid #7e8790;
  color: var(--ink);
  display: block;
  font-weight: 700;
  margin-bottom: 8px;
  padding: 5px 4px 7px;
}

.site-name:hover { text-decoration: none; }
.sidebar nav { display: grid; }
.sidebar nav a {
  color: #557aa7;
  line-height: 1.65;
  padding: 1px 4px 1px 20px;
}
.sidebar nav a.active { color: var(--blue-dark); text-decoration: underline; text-underline-offset: 4px; }

.content { padding: 0 28px 54px; }
.page-title {
  border-bottom: 3px double #83898f;
  margin: 0 0 24px;
  padding: 20px 0 8px;
}

h1, h2, h3 { color: var(--blue); font-weight: 700; }
h1 { font-size: 30px; line-height: 1.1; margin: 0; }
h1 span { font-weight: 500; }
h2 {
  border-bottom: 1px solid var(--line);
  font-size: 21px;
  line-height: 1.2;
  margin: 31px 0 13px;
  padding: 0 0 5px;
  scroll-margin-top: 18px;
}
h3 {
  border: 0;
  font-size: 17px;
  margin: 21px 0 7px;
  padding: 0;
}
p { margin: 0 0 12px; }

.profile {
  align-items: start;
  display: grid;
  gap: 28px;
  grid-template-columns: 200px 1fr;
  margin-bottom: 23px;
}
.profile img {
  border: 1px solid #d4d6d8;
  height: 254px;
  object-fit: cover;
  object-position: center top;
  width: 200px;
}
.profile-details { padding-top: 8px; }
.profile-links { align-items: center; display: flex; flex-wrap: wrap; gap: 8px; }
.compact-list, .entry-list, .publication-list { margin: 5px 0 13px; padding-left: 25px; }
.compact-list, .entry-list, .publication-list { list-style-type: square; }
.entry-list li, .publication-list li { padding-left: 2px; }
.entry-list li p { margin-bottom: 7px; }
.date { color: var(--muted); float: right; font-size: 14px; }

.publication-list li { margin-bottom: 10px; }
.publication-list li p { margin-bottom: 0; }
.paper-title { font-weight: 700; }
.venue { color: #343b42; }
.highlight { color: var(--accent); font-style: normal; font-weight: 700; }
.equal-note { color: var(--muted); font-size: 13px; }

footer {
  border-top: 1px solid #c9cccf;
  color: #9a9fa5;
  font-size: 12px;
  margin-top: 50px;
  padding-top: 8px;
}

@media (max-width: 760px) {
  .site-layout { display: block; }
  .sidebar { border-bottom: 1px solid #d5d8db; border-right: 0; min-height: 0; }
  .sidebar-inner { padding: 10px 18px; position: static; }
  .site-name { margin: 0 0 7px; padding-left: 0; }
  .sidebar nav { display: flex; flex-wrap: wrap; gap: 4px 17px; }
  .sidebar nav a { line-height: 1.4; padding: 0; }
  .content { padding: 0 20px 40px; }
  .page-title { padding-top: 19px; }
  .profile { gap: 20px; grid-template-columns: 150px 1fr; }
  .profile img { height: 191px; width: 150px; }
}

@media (max-width: 520px) {
  body { font-size: 15px; }
  .profile { grid-template-columns: 1fr; }
  .profile img { height: 229px; width: 180px; }
  .profile-details { padding-top: 0; }
  h1 { font-size: 27px; }
  h2 { font-size: 20px; }
  .date { display: block; float: none; margin-top: 2px; }
}

@media print {
  .sidebar { display: none; }
  .site-layout { display: block; width: 100%; }
  .content { padding: 0; }
}

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