:root {
  --blue: #1d83ad;
  --blue-dark: #11627f;
  --text: #2f3740;
  --muted: #68717a;
  --soft: #f4f7f8;
  --soft-blue: #eef7fb;
  --border: #d8e0e4;
  --border-strong: #b7cbd4;
  --shadow: 0 1px 10px rgba(20, 40, 55, 0.08);
  --max-width: 1160px;
  --sidebar-width: 178px;
  --header-height: 96px;
  --mobile-header-height: 86px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

a:hover,
a:focus {
  color: var(--blue-dark);
  text-decoration: underline;
}

.site {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 34px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: var(--header-height);
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: var(--shadow);
  backdrop-filter: blur(5px);
}

.logo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  text-decoration: none;
}

.logo-link:hover,
.logo-link:focus {
  text-decoration: none;
}

.logo-link-dma {
  width: 150px;
}

.logo-dma {
  display: block;
  width: 150px;
  height: auto;
  max-height: 58px;
  object-fit: contain;
}

.site-title {
  flex: 1 1 auto;
  min-width: 220px;
}

.site-title h1 {
  margin: 0;
  color: var(--blue);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 34px;
  font-weight: normal;
  line-height: 1.05;
  letter-spacing: 0.01em;
}

.site-title p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.header-logos {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  flex: 0 0 auto;
}

.logo-ens {
  display: block;
  max-height: 54px;
  max-width: 155px;
  object-fit: contain;
}

.logo-cnrs {
  display: block;
  width: 54px;
  height: 54px;
  object-fit: contain;
}

.layout {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  gap: 30px;
  align-items: start;
  padding-top: 22px;
}

.sidebar {
  position: sticky;
  top: calc(var(--header-height) + 18px);
  width: var(--sidebar-width);
  max-height: calc(100vh - var(--header-height) - 30px);
  overflow-y: auto;
  padding-right: 2px;
  scrollbar-width: thin;
}

.sidebar a {
  display: block;
  margin: 0 0 8px;
  padding: 9px 12px;
  border-left: 4px solid var(--border-strong);
  background: var(--soft);
  color: #3e464d;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  line-height: 1.15;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.sidebar a:hover,
.sidebar a:focus {
  color: var(--blue-dark);
  border-left-color: var(--blue);
  background: var(--soft-blue);
  text-decoration: none;
}

.sidebar a.active {
  color: var(--blue-dark);
  border-left-color: var(--blue);
  background: var(--soft-blue);
  font-weight: 600;
}

.content {
  min-width: 0;
  max-width: 890px;
  padding-bottom: 34px;
}

.content h1 {
  margin: 0 0 10px;
  color: var(--blue);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: normal;
  font-size: 31px;
  line-height: 1.12;
}

.content h2 {
  margin: 22px 0 8px;
  color: var(--blue);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: normal;
  font-size: 22px;
  line-height: 1.22;
}

.content h3 {
  margin: 18px 0 6px;
  color: var(--blue);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: normal;
  font-size: 19px;
  line-height: 1.25;
}

.content p {
  margin: 0 0 11px;
}

.content ul,
.content ol {
  margin: 6px 0 15px 22px;
  padding: 0;
}

.content li {
  margin: 3px 0;
}

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

.meta {
  margin: 0 0 15px;
  padding: 10px 12px;
  border-left: 4px solid var(--blue);
  background: var(--soft);
}

.meta p {
  margin: 2px 0;
}

.publication {
  margin: 0 0 14px;
  padding-bottom: 9px;
  border-bottom: 1px solid #eef1f3;
}

.publication .title {
  font-weight: 700;
}

.publication .authors,
.publication .where {
  color: #444;
}

.publication .links {
  font-size: 14px;
  color: var(--muted);
}

.home-image {
  float: right;
  width: 245px;
  max-width: 38%;
  margin: 0 0 14px 24px;
  border: 1px solid var(--border);
  padding: 6px;
  background: #fff;
  box-shadow: 0 1px 6px rgba(20, 40, 55, 0.06);
}

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

.home-intro::after {
  content: "";
  display: block;
  clear: both;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 14px;
  margin-top: 8px;
}

.card {
  border-left: 4px solid var(--blue);
  background: var(--soft);
  padding: 13px 15px;
}

.card h3 {
  margin-top: 0;
}

.teaching-year {
  margin-top: 16px;
}

.teaching-list {
  list-style: none;
  margin-left: 0;
}

.teaching-list li {
  margin: 5px 0;
}

.course-box {
  margin: 12px 0 18px;
  padding: 12px 14px;
  border-left: 4px solid var(--blue);
  background: var(--soft);
}

.compact-list li {
  margin-bottom: 3px;
}

.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 12px;
  padding: 14px 0 24px;
  color: var(--muted);
  font-size: 14px;
}

.footer-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
}

.footer-address {
  margin: 0;
}

.footer-links {
  white-space: nowrap;
}

@media (max-width: 900px) {
  .site {
    padding: 0 22px;
  }

  .site-header {
    gap: 14px;
  }

  .logo-link-dma {
    width: 132px;
  }

  .logo-dma {
    width: 132px;
    max-height: 52px;
  }

  .site-title h1 {
    font-size: 30px;
  }

  .site-title p {
    font-size: 14px;
  }

  .logo-ens {
    max-width: 124px;
    max-height: 46px;
  }

  .logo-cnrs {
    width: 46px;
    height: 46px;
  }

  .layout {
    grid-template-columns: 160px minmax(0, 1fr);
    gap: 24px;
  }

  .sidebar {
    width: 160px;
  }
}

@media (max-width: 700px) {
  :root {
    --mobile-header-height: 112px;
  }

  body {
    font-size: 15px;
  }

  .site {
    padding: 0 15px;
  }

  .site-header {
    min-height: var(--mobile-header-height);
    padding: 9px 0 8px;
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "brand logos"
      "title title";
    gap: 8px 12px;
    align-items: center;
  }

  .logo-link-dma {
    grid-area: brand;
    width: 128px;
    justify-content: flex-start;
  }

  .logo-dma {
    width: 128px;
    max-height: 48px;
  }

  .site-title {
    grid-area: title;
    min-width: 0;
  }

  .site-title h1 {
    font-size: 27px;
  }

  .site-title p {
    font-size: 13px;
    line-height: 1.3;
  }

  .header-logos {
    grid-area: logos;
    gap: 9px;
  }

  .logo-ens {
    max-width: 96px;
    max-height: 38px;
  }

  .logo-cnrs {
    width: 38px;
    height: 38px;
  }

  .layout {
    display: block;
    padding-top: 0;
  }

  .sidebar {
    position: sticky;
    top: var(--mobile-header-height);
    z-index: 90;
    width: calc(100% + 30px);
    max-height: none;
    margin: 0 -15px 18px;
    padding: 8px 15px;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    background: rgba(255, 255, 255, 0.97);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 7px rgba(20, 40, 55, 0.06);
  }

  .sidebar a {
    display: inline-block;
    margin: 0 6px 0 0;
    padding: 7px 10px;
    border-left: 0;
    border-bottom: 3px solid var(--border-strong);
    font-size: 16px;
    background: var(--soft);
  }

  .sidebar a.active,
  .sidebar a:hover,
  .sidebar a:focus {
    border-left: 0;
    border-bottom-color: var(--blue);
  }

  .content {
    max-width: none;
    padding-bottom: 28px;
  }

  .content h1 {
    font-size: 27px;
  }

  .content h2 {
    font-size: 21px;
  }

  .home-image {
    float: none;
    max-width: 260px;
    width: 100%;
    margin: 0 0 15px;
  }

  .cards {
    display: block;
  }

  .card {
    margin-bottom: 12px;
  }

  .footer-row {
    display: block;
  }

  .footer-links {
    margin-top: 6px;
  }
}

@media (max-width: 420px) {
  .site-title h1 {
    font-size: 25px;
  }

  .logo-link-dma,
  .logo-dma {
    width: 118px;
  }

  .logo-ens {
    max-width: 82px;
  }

  .logo-cnrs {
    width: 34px;
    height: 34px;
  }
}
