:root {
  --bg: #fcfcfb;
  --surface: #ffffff;
  --text: #222222;
  --muted: #666666;
  --line: #e6e6e6;
  --accent: #1a73b7;
  --accent-soft: #eef5fb;
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.06);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Source Sans 3", sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #ffffff 0%, #fafafa 100%);
}

a {
  color: var(--accent);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.site-title {
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.15rem;
}

.topnav {
  display: flex;
  gap: 20px;
  margin-left: auto;
}

.topnav a,
.nav-link {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
}

.topnav a:hover,
.nav-link:hover,
.profile-links a:hover,
.button:hover {
  text-decoration: underline;
}

.nav-link {
  padding: 10px 18px;
  border-radius: 14px;
  border: 2px solid transparent;
}

.nav-link.active {
  color: var(--text);
  border-color: #30c34d;
}

.language-toggle {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  padding: 8px 14px;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.layout {
  width: min(1120px, calc(100% - 32px));
  margin: 32px auto 56px;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 40px;
}

.sidebar {
  position: sticky;
  top: 96px;
  align-self: start;
}

.profile-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 24px;
  box-shadow: var(--shadow);
}

.avatar {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  display: block;
  object-fit: cover;
  border: 1px solid #d7e8f3;
  box-shadow: 0 8px 20px rgba(26, 115, 183, 0.16);
}

h1,
h2,
h3 {
  font-family: "Noto Serif SC", serif;
}

h1 {
  margin: 18px 0 10px;
  font-size: 2rem;
}

h2 {
  margin: 0 0 16px;
  font-size: 1.7rem;
}

h3 {
  margin: 0;
  font-size: 1.18rem;
}

.profile-role,
.entry-role {
  color: var(--muted);
  font-weight: 600;
}

.entry-location {
  margin: 6px 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.news-section {
  background: var(--accent-soft);
  border: 1px solid #d7e8f3;
  border-radius: 14px;
  padding: 20px 22px;
}

.news-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
}

.news-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  background: #e5484d;
  color: #ffffff;
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.news-list {
  list-style: none;
  margin: 0;
  padding: 0;
  line-height: 1.7;
}

.news-list li + li {
  margin-top: 8px;
}

.news-date {
  font-weight: 700;
  color: var(--accent);
  margin-right: 10px;
}

.profile-summary {
  margin: 14px 0 0;
  color: #3d3d3d;
  line-height: 1.75;
}

.profile-meta {
  margin: 18px 0 0;
  padding-left: 18px;
  color: var(--muted);
}

.profile-meta li + li,
.bullet-list li + li {
  margin-top: 8px;
}

.profile-links {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

.profile-links a {
  text-decoration: none;
  font-weight: 600;
}

.profile-note {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.contact-block {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.contact-title {
  margin: 0 0 10px;
  color: var(--text);
  font-weight: 700;
}

.contact-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.contact-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--muted);
  transition: transform 0.18s ease, color 0.18s ease,
    border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.contact-icon svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.contact-icon:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
  border-color: transparent;
  color: #ffffff;
}

.contact-icon[data-brand="email"]:hover {
  background: var(--accent);
}

.contact-icon[data-brand="github"]:hover {
  background: #24292f;
}

.contact-icon[data-brand="scholar"]:hover {
  background: #4285f4;
}

.contact-icon[data-brand="linkedin"]:hover {
  background: #0a66c2;
}

.profile-note-title {
  margin: 0 0 8px;
  color: var(--text);
  font-weight: 700;
}

.content {
  min-width: 0;
}

.publications-layout {
  width: min(1120px, calc(100% - 32px));
  margin: 32px auto 56px;
}

.publication-page {
  max-width: 860px;
  margin: 0 auto;
}

.publication-page-title {
  margin: 0;
  font-size: 2.2rem;
}

.publication-page-subtitle {
  margin: 10px 0 0;
  color: var(--muted);
}

.publication-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.publication-toolbar {
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.publication-toolbar-text {
  margin: 0;
  color: var(--muted);
}

.section + .section {
  margin-top: 32px;
}

.section p,
.bullet-list {
  line-height: 1.8;
  color: #333333;
}

.entry + .entry {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.subentry + .subentry {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px dashed var(--line);
}

.entry-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline;
}

.entry-head span {
  color: var(--muted);
  white-space: nowrap;
}

.subentry-title {
  margin: 16px 0 0;
  font-size: 1rem;
  color: var(--text);
  font-weight: 700;
}

.bullet-list {
  margin: 12px 0 0;
  padding-left: 20px;
}

.entry-summary {
  margin: 12px 0 0;
  color: #333333;
  line-height: 1.8;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.scholar-list {
  margin-top: 24px;
}

.scholar-item {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.scholar-title {
  margin: 0;
  font-size: 1.1rem;
  color: #1a0dab;
  font-family: "Source Sans 3", sans-serif;
  font-weight: 700;
}

.scholar-authors,
.scholar-venue {
  margin: 6px 0 0;
  color: #444444;
  line-height: 1.65;
}

.scholar-venue {
  color: #1b7f38;
}

.scholar-links {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.scholar-link {
  text-decoration: none;
  font-size: 0.96rem;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  text-decoration: none;
  color: var(--text);
  background: var(--surface);
  font-weight: 700;
}

.button.primary {
  color: #ffffff;
  background: var(--accent);
  border-color: var(--accent);
}

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

  .sidebar {
    position: static;
  }

  .topbar-inner {
    flex-wrap: wrap;
    padding: 10px 0;
  }

  .topnav {
    order: 3;
    width: 100%;
    overflow-x: auto;
    gap: 16px;
  }

  .publication-page-head {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .layout,
  .topbar-inner {
    width: min(100% - 20px, 1120px);
  }

  .entry-head {
    flex-direction: column;
    align-items: flex-start;
  }
}
