:root {
  --bg: #f7f8fb;
  --panel: #ffffff;
  --sidebar: #1f2937;
  --sidebar-2: #111827;
  --sidebar-text: #f7fafc;
  --sidebar-muted: #b9c2d0;
  --text: #20242c;
  --muted: #64707d;
  --line: #e4e9f0;
  --link: #1f6fb2;
  --link-soft: #e8f2fb;
  --placeholder: #eef2f7;
  --shadow: 0 14px 36px rgba(20, 31, 47, 0.08);
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background: var(--bg);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  font-family:
    "Inter", "Aptos", "Segoe UI", "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  font-size: 16px;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a:hover {
  text-decoration: underline;
}

.site-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 288px;
  padding: 36px 26px 30px;
  background:
    radial-gradient(circle at 50% 0%, rgba(72, 111, 151, 0.34), transparent 34%),
    linear-gradient(180deg, var(--sidebar), var(--sidebar-2));
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  box-shadow: 8px 0 30px rgba(17, 24, 39, 0.14);
}

.profile {
  text-align: center;
}

.portrait {
  width: 148px;
  height: 148px;
  margin: 0 auto 20px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.22);
}

.placeholder {
  background:
    linear-gradient(135deg, transparent 49%, rgba(31, 41, 55, 0.1) 50%, transparent 51%),
    linear-gradient(45deg, transparent 49%, rgba(31, 41, 55, 0.1) 50%, transparent 51%),
    var(--placeholder);
}

.profile h1 {
  margin: 0 0 10px;
  font-size: 29px;
  line-height: 1.2;
  font-weight: 760;
  letter-spacing: 0;
}

.profile p {
  margin: 3px 0;
  color: var(--sidebar-muted);
  font-size: 14.5px;
}

.profile .role {
  color: var(--sidebar-text);
}

.site-nav {
  display: grid;
  gap: 4px;
  margin: 36px 0;
}

.site-nav a {
  padding: 9px 11px;
  border-radius: 7px;
  color: var(--sidebar-muted);
  font-size: 15px;
  font-weight: 560;
  transition:
    background 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.site-nav a:hover,
.site-nav a.active {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  transform: translateX(2px);
  text-decoration: none;
}

.social-links {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 9px 12px;
  justify-content: center;
}

.social-links a {
  color: var(--sidebar-muted);
  font-size: 13.5px;
  font-weight: 540;
}

.social-links a[href=""] {
  color: rgba(170, 180, 194, 0.58);
}

.content {
  max-width: 1020px;
  margin-left: 288px;
  padding: 54px 60px 78px;
}

.topline {
  margin-bottom: 30px;
  padding: 30px 34px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(31, 111, 178, 0.08), rgba(255, 255, 255, 0) 48%),
    var(--panel);
  box-shadow: var(--shadow);
}

.topline h2 {
  margin: 0 0 10px;
  font-size: 34px;
  line-height: 1.2;
  font-weight: 780;
  letter-spacing: 0;
}

.topline p {
  margin: 0;
  color: var(--muted);
  font-size: 16.5px;
}

.cv-section {
  margin-top: 22px;
  padding: 30px 34px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: 0 10px 28px rgba(20, 31, 47, 0.045);
}

.cv-section h2 {
  margin: 0 0 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  font-size: 25px;
  line-height: 1.25;
  font-weight: 760;
  letter-spacing: 0;
}

.cv-section h3 {
  margin: 26px 0 10px;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 720;
}

.cv-section p {
  margin: 0 0 12px;
}

.cv-section ul {
  margin: 0;
  padding-left: 20px;
}

.cv-section li {
  min-height: 1.65em;
  margin: 4px 0;
}

.news-list {
  list-style: none;
  padding-left: 0;
}

.news-list li {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 14px;
  padding: 6px 0;
}

.news-list span {
  color: var(--link);
  font-weight: 700;
}

.entry {
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

.compact-entry {
  margin: 10px 0;
}

.entry strong {
  font-weight: 700;
}

.entry p {
  margin: 2px 0 0;
  color: var(--muted);
}

.entry span {
  flex: 0 0 auto;
  color: var(--muted);
}

#research {
  display: block;
}

#research > h2 {
  margin-bottom: 8px;
}

.research-item {
  display: block;
  min-width: 0;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.research-item:first-of-type {
  padding-top: 4px;
}

.research-item > div:not(.thumb) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  column-gap: 26px;
  row-gap: 5px;
  align-items: start;
  min-width: 0;
}

.thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 8px 18px rgba(20, 31, 47, 0.06);
  overflow: hidden;
}

.thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.research-item h3 {
  grid-column: 1;
  margin: 0 0 6px;
  font-size: 18.5px;
  line-height: 1.34;
  font-weight: 750;
}

.research-item > div:not(.thumb) > p {
  grid-column: 1;
  margin: 0;
}

.research-item > div:not(.thumb) > p:nth-of-type(2) {
  grid-column: 2;
  grid-row: 1 / span 2;
  justify-self: end;
  margin-top: 2px;
  padding: 2px 10px;
  border-radius: 999px;
  background: #f4f7fb;
  color: #3f4b5a;
  font-size: 13.5px;
  line-height: 1.7;
  white-space: nowrap;
}

.research-item > div:not(.thumb) > p:nth-of-type(3) {
  margin-top: 4px;
}

.authors,
.links {
  color: var(--muted);
}

.research-item em {
  color: #3f4b5a;
  font-style: italic;
  font-weight: 560;
}

.links {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}

.links a {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--link-soft);
  color: var(--link);
  font-size: 13.5px;
  font-weight: 650;
}

.links a:hover {
  background: #d9ebfb;
  text-decoration: none;
}

.links a[href=""] {
  background: #f0f2f5;
  color: rgba(100, 112, 125, 0.68);
}

.home-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-top: 22px;
  padding: 10px 4px 0;
  color: var(--muted);
  font-size: 14px;
}

.home-stats strong {
  color: var(--text);
  font-size: 16px;
  font-weight: 760;
}

.home-stats span:last-child {
  color: #7b8794;
  font-size: 13px;
}

.stats-page {
  background: var(--bg);
}

.stats-page .content {
  max-width: 1080px;
  margin: 0 auto;
}

.stats-header h1 {
  margin: 0 0 10px;
  font-size: 34px;
  line-height: 1.2;
  font-weight: 780;
  letter-spacing: 0;
}

.stats-kicker {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 650;
}

.stats-section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 18px;
}

.stats-section-heading h2 {
  margin-bottom: 6px;
}

.status-line {
  margin: 0;
  color: var(--muted);
  font-size: 14.5px;
}

.stats-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.button {
  min-height: 36px;
  padding: 7px 13px;
  border: 1px solid #1f6fb2;
  border-radius: 7px;
  background: var(--link);
  color: #ffffff;
  font: inherit;
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
}

.button:hover {
  background: #185c96;
}

.button-secondary {
  border-color: var(--line);
  background: #ffffff;
  color: var(--text);
}

.button-secondary:hover {
  background: #f4f7fb;
}

.stats-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 18px;
}

.stats-strip > div {
  min-height: 84px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbfe;
}

.stats-strip span {
  display: block;
  font-size: 28px;
  line-height: 1.1;
  font-weight: 780;
  color: var(--text);
}

.stats-strip small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.stats-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.stats-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: 14.5px;
}

.stats-table th,
.stats-table td {
  padding: 11px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.stats-table th {
  color: #3f4b5a;
  font-size: 13px;
  font-weight: 760;
  text-transform: uppercase;
}

.stats-table td:nth-child(3),
.stats-table th:nth-child(3) {
  text-align: right;
}

.stats-number {
  font-weight: 760;
}

.stats-url {
  display: block;
  max-width: 560px;
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stats-empty {
  color: var(--muted);
  text-align: center;
}

@media (max-width: 860px) {
  .site-sidebar {
    position: static;
    width: 100%;
    padding: 22px 18px;
  }

  .portrait {
    width: 112px;
    height: 112px;
  }

  .site-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin: 22px 0 14px;
  }

  .site-nav a:hover,
  .site-nav a.active {
    transform: none;
  }

  .content {
    margin-left: 0;
    padding: 26px 20px 56px;
  }

  .thumb {
    width: 100%;
  }

  .stats-section-heading {
    display: block;
  }

  .stats-toolbar {
    justify-content: flex-start;
    margin-top: 12px;
  }
}

@media (max-width: 520px) {
  body {
    font-size: 15.5px;
  }

  .content {
    padding-inline: 16px;
  }

  .topline,
  .cv-section {
    padding: 24px 20px;
    border-radius: 12px;
  }

  .topline h2 {
    font-size: 30px;
  }

  .entry {
    display: block;
  }

  .entry span {
    display: block;
    margin-top: 3px;
  }

  .news-list li {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .research-item > div:not(.thumb) {
    grid-template-columns: 1fr;
  }

  .research-item > div:not(.thumb) > p:nth-of-type(2) {
    grid-column: 1;
    grid-row: auto;
    justify-self: start;
    margin: 0 0 2px;
  }

  .stats-strip {
    grid-template-columns: 1fr;
  }

  .stats-header h1 {
    font-size: 30px;
  }

  .home-stats {
    flex-wrap: wrap;
  }
}
