:root {
  --sidebar-width: 150px;
  --page-bg: #f5f6f2;
  --content-bg: #ffffff;
  --text: #25292c;
  --muted: #626c70;
  --line: #e6e7e1;
  --nav-bg: #111111;
  --nav-text: #f4f4f1;
  --link: #286b77;
  --link-dark: #194f58;
  --gold: #b7791f;
  --shadow: 0 8px 24px rgba(20, 28, 32, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  max-width: 100vw;
  overflow-x: hidden;
  background: var(--page-bg);
  color: var(--text);
  font-family: "Montserrat", Arial, sans-serif;
  line-height: 1.62;
}

body.nav-open {
  overflow: hidden;
}

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

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

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

p,
li,
h1,
h2,
h3,
a {
  overflow-wrap: anywhere;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  width: var(--sidebar-width);
  background: var(--nav-bg);
  color: var(--nav-text);
  box-shadow: 8px 0 22px rgba(0, 0, 0, 0.14);
}

.brand {
  display: block;
  padding: 28px 18px 16px;
  color: var(--nav-text);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0;
}

.brand:hover {
  color: #ffffff;
}

.nav-links {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: 48px;
  font-family: "Roboto", Arial, sans-serif;
}

.nav-links a {
  color: #ddddda;
  font-size: 0.98rem;
  font-weight: 700;
  padding: 13px 18px;
}

.nav-links a:hover,
.nav-links a:focus-visible,
.nav-links a.is-active {
  background: rgba(255, 255, 255, 0.11);
  color: #ffffff;
}

.mobile-header {
  display: none;
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 15;
  background: rgba(0, 0, 0, 0.4);
}

.page {
  min-height: 100vh;
  margin-left: var(--sidebar-width);
}

.content {
  width: min(100%, 1040px);
  min-height: 100vh;
  margin: 0 auto;
  overflow-x: hidden;
  background: var(--content-bg);
}

.section {
  padding: 42px 46px;
  border-bottom: 1px solid var(--line);
}

.home-section {
  padding-top: 52px;
}

h1,
h2,
h3 {
  margin-top: 0;
  line-height: 1.22;
  letter-spacing: 0;
}

h1 {
  margin-bottom: 30px;
  text-align: center;
  font-size: clamp(2.1rem, 4vw, 3rem);
  font-weight: 700;
}

h2 {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  font-size: 1.72rem;
  font-weight: 700;
}

h2::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

h3 {
  margin-bottom: 8px;
  font-size: 1.12rem;
  font-weight: 700;
}

p {
  margin: 0 0 14px;
}

.intro-grid {
  display: grid;
  grid-template-columns: minmax(230px, 330px) minmax(0, 1fr);
  gap: 36px;
  align-items: center;
}

.portrait {
  margin: 0;
}

.portrait img {
  aspect-ratio: 1;
  width: 100%;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: var(--shadow);
}

.intro-copy {
  min-width: 0;
}

.tagline {
  color: var(--link-dark);
  font-weight: 700;
}

.quick-links,
.paper-links {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.quick-links {
  margin-top: 20px;
}

.quick-links a,
.paper-links a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border: 1px solid #d4ded5;
  border-radius: 8px;
  padding: 6px 12px;
  background: #f8faf6;
  color: var(--link-dark);
  font-size: 0.92rem;
}

.quick-links a:hover,
.paper-links a:hover {
  border-color: #bfcfc1;
  background: #eef5ec;
}

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

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

.news-list time {
  display: inline-block;
  min-width: 88px;
  color: var(--gold);
  font-family: "Roboto", Arial, sans-serif;
  font-weight: 700;
}

.pub-item {
  display: grid;
  grid-template-columns: 285px minmax(0, 1fr);
  gap: 24px;
  padding: 5px 0 28px;
  border-bottom: 1px solid var(--line);
}

.pub-media,
.project-media {
  margin: 0;
}

.pub-media img,
.project-media img {
  aspect-ratio: 16 / 9;
  width: 100%;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 6px 18px rgba(23, 34, 38, 0.1);
}

.project-media img.full-image {
  display: block;
  width: min(100%, 520px);
  margin: 0 auto;
  aspect-ratio: auto;
  height: auto;
  object-fit: contain;
}

.project-media img.scaled-image {
  display: block;
  width: min(100%, var(--image-width));
  margin: 0 auto;
  aspect-ratio: auto;
  height: auto;
  object-fit: contain;
}

.pub-copy {
  min-width: 0;
}

.pub-copy p {
  margin-bottom: 7px;
}

.paper-links {
  margin-top: 12px;
}

.subsection-title {
  margin-top: 28px;
}

.project-item {
  padding: 4px 0 30px;
  border-bottom: 1px solid var(--line);
}

.project-item:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

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

.project-heading span {
  flex: none;
  color: var(--muted);
  font-family: "Roboto", Arial, sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
}

.project-supervisor {
  margin-bottom: 6px;
}

.project-points {
  display: grid;
  gap: 4px;
  list-style-type: circle;
  margin: 0 0 14px 20px;
  padding: 0;
}

.project-points li::marker {
  color: #2f76bd;
}

.project-media {
  margin-top: 14px;
}

.timeline {
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 34px;
  bottom: 34px;
  left: 172px;
  width: 2px;
  background: #dfe3e6;
}

.timeline-item {
  display: grid;
  grid-template-columns: 112px 84px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  padding: 0 0 28px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-date {
  color: var(--muted);
  font-family: "Roboto", Arial, sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.35;
  padding-top: 22px;
  text-align: right;
}

.timeline-logo {
  z-index: 1;
  display: grid;
  place-items: center;
  width: 66px;
  height: 66px;
  margin: 0 auto;
  border: 1px solid #e5e9ec;
  border-radius: 50%;
  background: #ffffff;
  color: #286b77;
  box-shadow: 0 6px 18px rgba(23, 34, 38, 0.12);
}

.timeline-logo span {
  max-width: 52px;
  font-family: "Roboto", Arial, sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.1;
  text-align: center;
}

.timeline-logo img {
  width: 78%;
  height: 78%;
  object-fit: contain;
}

.timeline-logo-accent {
  color: #9d2f2f;
}

.timeline-logo-muted {
  color: #416a9c;
}

.timeline-body {
  min-width: 0;
  padding: 2px 0 25px;
  border-bottom: 1px solid var(--line);
}

.timeline-item:last-child .timeline-body {
  padding-bottom: 0;
  border-bottom: none;
}

.timeline-body h3 {
  margin: 0 0 3px;
  font-size: 1.05rem;
}

.timeline-body p {
  margin-bottom: 2px;
}

.timeline-place {
  color: var(--text);
  font-weight: 600;
}

.timeline-body p,
.contact-section p {
  color: var(--muted);
}

.timeline-body .timeline-place {
  color: var(--text);
}

.site-footer {
  padding: 24px 46px 36px;
  color: var(--muted);
  font-size: 0.92rem;
  text-align: center;
}

.site-footer p {
  margin: 0;
}

@media (max-width: 992px) {
  html,
  body {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
  }

  .sidebar {
    transform: translateX(-100%);
    transition: transform 220ms ease;
  }

  body.nav-open .sidebar {
    transform: translateX(0);
  }

  .mobile-header {
    position: sticky;
    top: 0;
    z-index: 14;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100vw;
    height: 68px;
    padding: 0 20px;
    background: var(--nav-bg);
  }

  .mobile-header a {
    color: var(--nav-text);
    font-weight: 700;
  }

  .menu-button {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 8px;
    background: transparent;
    color: var(--nav-text);
    cursor: pointer;
    font: inherit;
    font-size: 1.4rem;
    line-height: 1;
  }

  .page {
    width: 100vw;
    max-width: 100vw;
    margin-left: 0;
    overflow-x: hidden;
  }

  .content {
    width: 100%;
    max-width: 100vw;
  }
}

@media (max-width: 720px) {
  .section {
    padding: 30px 20px;
  }

  .home-section {
    padding-top: 34px;
  }

  h1 {
    margin-bottom: 24px;
    text-align: left;
  }

  h2 {
    gap: 12px;
  }

  .intro-grid,
  .pub-item {
    grid-template-columns: 1fr;
    gap: 18px;
  }

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

  .project-heading {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }

  .timeline::before {
    left: 27px;
  }

  .timeline-item {
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 14px;
  }

  .timeline-date {
    grid-column: 2;
    padding-top: 0;
    text-align: left;
  }

  .timeline-logo {
    grid-column: 1;
    grid-row: 1 / span 2;
    width: 54px;
    height: 54px;
    margin: 0;
  }

  .timeline-logo span {
    max-width: 42px;
    font-size: 0.64rem;
  }

  .timeline-body {
    grid-column: 2;
    padding-top: 0;
  }

  .site-footer {
    padding: 22px 20px 30px;
    text-align: left;
  }
}

@media (max-width: 430px) {
  .news-list time {
    display: block;
    min-width: 0;
  }

  .quick-links a,
  .paper-links a {
    min-height: 32px;
    padding: 5px 10px;
    font-size: 0.88rem;
  }
}
