:root {
  --bg: #ffffff;
  --text: #111111;
  --muted: #5e5e5e;
  --line: #d7d7d7;
  --link: #315ea8;
  --sidebar-width: 260px;
  --photo-width: 150px;
  --content-width: 760px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Georgia, "Times New Roman", Times, serif;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
}

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

/* Global links */
a,
a:visited {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 2px;
}

a:hover,
a:focus {
  color: var(--link);
}

/* Layout */
.page-shell {
  width: min(1120px, calc(100% - 64px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  gap: 64px;
  padding: 40px 0 64px;
}

.sidebar {
  position: relative;
}

.sidebar-inner {
  position: sticky;
  top: 36px;
}

.site-name {
  margin: 0 0 22px;
  font-size: 1.08rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text);
}

.profile-photo {
  width: var(--photo-width);
  margin-bottom: 24px;
  border: 1px solid var(--line);
}

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

/* Sidebar navigation */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 26px;
}

.sidebar-nav a,
.sidebar-nav a:visited {
  color: var(--link);
  text-decoration: none;
  font-size: 0.98rem;
  line-height: 1.5;
}

.sidebar-nav a:hover,
.sidebar-nav a:focus {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.sidebar-contact p {
  margin: 0 0 8px;
  font-size: 0.94rem;
  line-height: 1.5;
}

/* Sections */
.content-section {
  padding-top: 8px;
  scroll-margin-top: 24px;
}

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

h1,
h2 {
  margin: 0 0 18px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text);
}

h1 {
  font-size: 1.32rem;
}

h2 {
  font-size: 1.08rem;
}

p {
  margin: 0 0 16px;
  font-size: 1rem;
}

/* Research entries */
.research-entry {
  margin: 0 0 24px;
}

.research-title {
  margin: 0 0 4px;
  font-size: 1rem;
  line-height: 1.55;
}

.research-title a,
.research-title a:visited {
  color: var(--link);
  text-decoration: none;
}

.research-title a:hover,
.research-title a:focus {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.research-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.6;
}

/* Abstract toggle */
.research-abstract {
  margin-top: 6px;
}

.research-abstract summary {
  cursor: pointer;
  list-style: none;
  color: var(--muted);
  font-size: 0.94rem;
}

.research-abstract summary::-webkit-details-marker {
  display: none;
}

.research-abstract summary::before {
  content: "+ ";
}

.research-abstract[open] summary::before {
  content: "− ";
}

.research-abstract p {
  margin: 8px 0 0;
  max-width: 680px;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.65;
}

/* Responsive */
@media (max-width: 900px) {
  :root {
    --photo-width: 135px;
  }

  .page-shell {
    width: min(1120px, calc(100% - 40px));
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 40px;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(1120px, calc(100% - 28px));
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 28px 0 44px;
  }

  .sidebar-inner {
    position: static;
  }

  .profile-photo {
    margin-bottom: 18px;
  }

  .sidebar-nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 18px;
  }

  .content-section + .content-section {
    margin-top: 34px;
  }
}
