:root {
  --text: #222;
  --muted: #666;
  --line: #ddd;
  --soft-line: #eee;
  --link: #0645ad;
  --placeholder: #f5f5f5;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #fff;
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 17px;
  line-height: 1.55;
}

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

a:hover,
a:focus {
  text-decoration: underline;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--line);
}

.nav {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  padding: 10px 0;
  font-size: 16px;
}

.container {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.section {
  padding: 22px 0;
  border-bottom: 1px solid var(--soft-line);
  scroll-margin-top: 56px;
}

.section:last-child {
  border-bottom: 0;
}

.profile {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 28px;
  align-items: center;
  padding-top: 12px;
}

.portrait,
.thumb,
.project-media {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--placeholder);
  border: 1px solid var(--line);
  color: #777;
  font-size: 14px;
}

.portrait {
  width: 240px;
  aspect-ratio: 5 / 4;
  overflow: hidden;
}

.portrait img,
.thumb img,
.project-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.portrait img {
  object-fit: contain;
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 4px;
  font-size: 31px;
  line-height: 1.15;
  font-weight: 600;
}

h2 {
  margin-bottom: 14px;
  font-size: 22px;
  line-height: 1.25;
  font-weight: 600;
}

h3 {
  margin-bottom: 4px;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 600;
}

h4 {
  margin-bottom: 4px;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 600;
}

p {
  margin-bottom: 10px;
}

.subtitle {
  color: var(--muted);
  margin-bottom: 16px;
}

.links {
  margin-bottom: 0;
}

.news-list,
.compact-list {
  margin: 0;
  padding-left: 20px;
}

.news-list li,
.compact-list li {
  margin-bottom: 7px;
}

.date {
  display: inline-block;
  min-width: 42px;
  color: var(--muted);
}

.section-subtitle {
  margin: 18px 0 6px;
  font-size: 19px;
}

.section-subtitle:first-of-type {
  margin-top: 0;
}

.publication {
  padding: 18px 0;
  border-top: 1px solid var(--soft-line);
}

.publication:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.publication-media {
  --demo-height: 150px;
  width: min(80%, 760px);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-start;
  margin-top: 12px;
}

.thumb {
  width: auto;
  height: var(--render-height, var(--demo-height));
  overflow: visible;
  flex: 0 0 auto;
}

.demo-render img {
  width: auto;
  height: 100%;
  max-width: var(--render-max-width, none);
  object-fit: contain;
}

.authors {
  color: var(--muted);
  margin-bottom: 4px;
}

.project {
  min-width: 0;
  padding: 18px 0;
  border-top: 1px solid var(--soft-line);
}

.project:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.project-feature {
  display: block;
}

.project-demo-grid {
  --demo-height: 140px;
  width: min(80%, 760px);
  margin-top: 12px;
}

.demo-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-start;
}

.project-media {
  width: 100%;
  aspect-ratio: 16 / 9;
}

.project p {
  margin-bottom: 10px;
}

.project p:last-child {
  margin-bottom: 0;
}

.placeholder {
  background:
    linear-gradient(135deg, transparent 0, transparent 48%, #e6e6e6 49%, #e6e6e6 51%, transparent 52%, transparent 100%),
    linear-gradient(45deg, transparent 0, transparent 48%, #e6e6e6 49%, #e6e6e6 51%, transparent 52%, transparent 100%),
    var(--placeholder);
}

@media (max-width: 760px) {
  body {
    font-size: 15px;
  }

  .nav {
    gap: 10px 12px;
  }

  .profile {
    grid-template-columns: 1fr;
  }

  .portrait {
    width: min(100%, 300px);
  }

  .publication-media {
    --demo-height: 130px;
    width: 100%;
  }

  .project-demo-grid {
    --demo-height: 120px;
    width: 100%;
  }
}
