:root {
  --bg: #ffffff;
  --text: #23252a;
  --muted: #6b7280;
  --link: #2764a4;
  --border: #dde3ea;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.7;
}

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

a:hover {
  text-decoration: underline;
}

.container {
  width: min(1040px, 92vw);
  margin: 0 auto;
}

.topbar {
  border-bottom: 1px solid var(--border);
  background: #fff;
}

.topbar-content {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  color: var(--text);
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.93rem;
}

.nav-links a {
  color: #3f4a57;
}

.nav-current {
  color: var(--link);
  font-weight: 600;
}

.site-main {
  padding: 2rem 0 3.5rem;
}

.home-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2.4rem;
  align-items: start;
}

.sidebar {
  position: sticky;
  top: 1.2rem;
}

.profile-image-wrap {
  overflow: hidden;
  border: 1px solid var(--border);
}

.profile-image-wrap img {
  display: block;
  width: 100%;
  height: auto;
}

.name {
  margin: 1rem 0 0.35rem;
  font-size: 1.45rem;
  line-height: 1.2;
}

.role {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

.location {
  margin: 0.5rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.sidebar-links {
  margin-top: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.92rem;
}

.social-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: #3f4a57;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.social-icons a:hover {
  color: var(--link);
  border-color: var(--link);
  text-decoration: none;
}

.social-icons i {
  font-size: 1rem;
  line-height: 1;
}

.content-column {
  min-width: 0;
}

.content-section {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.content-section:last-child {
  margin-bottom: 0;
}

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

h1 {
  font-size: 1.9rem;
}

h2 {
  font-size: 1.3rem;
  margin-bottom: 0.8rem;
}

h3 {
  font-size: 1.02rem;
  font-weight: 600;
}

p {
  margin: 0 0 0.9rem;
}

.section-title-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.8rem;
}

.pub-list {
  margin: 0;
  padding-left: 1.25rem;
}

.pub-list li {
  margin-bottom: 1rem;
}

.pub-list li:last-child {
  margin-bottom: 0;
}

.pub-list p {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.96rem;
}

.pub-link-row a {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.84rem;
}

.muted {
  color: var(--muted);
}

.publications-page h1 {
  font-size: 1.8rem;
}

.year-group h2 {
  margin-bottom: 0.9rem;
}

.post-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1.4rem;
}

.post-title {
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
}

.blog-post pre {
  overflow-x: auto;
  padding: 0.9rem 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fafafa;
}

.heading-anchor {
  color: inherit;
}

.footer {
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.82rem;
}

.footer p {
  margin: 0;
  padding: 0.9rem 0;
}

@media (max-width: 900px) {
  .home-layout {
    grid-template-columns: 1fr;
    gap: 1.4rem;
  }

  .sidebar {
    position: static;
    max-width: 360px;
  }
}

@media (max-width: 640px) {
  .topbar-content {
    min-height: auto;
    padding: 0.75rem 0;
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-links {
    gap: 0.9rem;
  }

  .section-title-row {
    flex-direction: column;
    align-items: flex-start;
  }
}
