:root {
  --page-bg: #f5f6f8;
  --surface: #ffffff;
  --surface-alt: #eef0f3;
  --text: #23272d;
  --muted: #68707c;
  --line: #dde1e7;
  --accent: #4f5f73;
  --accent-soft: #e8ecf1;
  --shadow: 0 14px 32px rgba(31, 40, 52, 0.08);
  --radius: 18px;
}

html {
  scroll-behavior: smooth;
}

body {
  background: linear-gradient(180deg, #fbfcfd 0%, var(--page-bg) 100%);
  color: var(--text);
  font-family: "Avenir Next", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  line-height: 1.65;
}

a,
a:visited {
  color: var(--accent);
  text-decoration: none;
}

a:hover,
a:focus {
  color: #364454;
}

.site-shell {
  display: flex;
  gap: 28px;
  width: min(1220px, calc(100vw - 48px));
  margin: 28px auto 40px;
}

.site-sidebar {
  float: none;
  width: 310px;
  margin: 0;
}

.sidebar-inner {
  position: sticky;
  top: 24px;
  max-height: calc(100vh - 48px);
  overflow: auto;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(221, 225, 231, 0.92);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 28px 24px;
}

.site-main {
  float: none;
  width: calc(100% - 338px);
  margin: 0;
}

.me {
  width: 132px;
  height: 132px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 18px;
  border: 4px solid #fff;
  box-shadow: 0 8px 24px rgba(79, 95, 115, 0.16);
}

.identity-block h1,
header > h1 {
  font-family: "Georgia", "Times New Roman", serif;
  font-size: 2.4rem;
  line-height: 1.05;
  margin-bottom: 10px;
}

.identity-block .role {
  margin-bottom: 6px;
  color: var(--accent);
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.identity-block h2,
header > h2 {
  margin: 0 0 20px;
  font-size: 1.05rem;
  color: var(--muted);
}

.navigation {
  margin: 18px 0 22px;
  border: 0;
  background: var(--surface-alt);
  border-radius: 16px;
  padding: 14px 16px;
}

.navigation .navigation-list {
  margin: 0;
}

.navigation .navigation-item {
  display: block;
  padding: 0;
  margin: 0 0 10px;
}

.navigation .navigation-item:last-child {
  margin-bottom: 0;
}

.navigation > ul > li > a {
  display: block;
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text);
  padding: 8px 10px;
  border-radius: 10px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.navigation > ul > li > a:hover,
.navigation > ul > li > a:focus {
  background: #e8ecf1;
  color: var(--accent);
}

.contact-card,
.address-card {
  background: var(--surface-alt);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 16px;
}

.contact-card p,
.address-card {
  margin: 0 0 12px;
}

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

.contact-card span {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.profile-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.address-card strong {
  display: block;
  margin-bottom: 8px;
  color: var(--text);
}

.site-main > section {
  width: auto;
  float: none;
  margin: 0 0 20px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(221, 225, 231, 0.92);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px 28px;
}

section > h1 {
  margin: 0 0 18px;
  text-decoration: none;
  font-size: 1.1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

article {
  margin-bottom: 0;
}

p, address {
  margin-bottom: 0;
}

ul {
  list-style: none;
  margin: 0;
}

li {
  margin-bottom: 14px;
  line-height: 1.6;
}

li:last-child {
  margin-bottom: 0;
}

article > ul > li {
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(221, 225, 231, 0.75);
}

article > ul > li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

em {
  font-style: normal;
  font-weight: 700;
  color: var(--text);
}

.section-summary {
  margin-bottom: 14px;
  color: var(--muted);
}

.foldable {
  background: #fbfcfd;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}

.foldable + .foldable {
  margin-top: 14px;
}

.foldable-summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 16px;
  font-weight: 700;
  color: var(--text);
  background: linear-gradient(180deg, #fcfcfd 0%, #eef1f4 100%);
  position: relative;
}

#software article h1,
#course article h1 {
  font-size: 1.18rem;
  line-height: 1.3;
  margin-bottom: 6px;
}

#course article h1 {
  font-family: "Avenir Next", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-weight: 700;
}

#course .teaching-note {
  color: var(--muted);
  margin-bottom: 14px;
}

#course .course-meta,
#people .people-meta {
  color: var(--muted);
  margin-top: 4px;
}

#people .people-intro {
  color: var(--muted);
  margin-bottom: 14px;
}

#people article h1 {
  font-size: 1.18rem;
  line-height: 1.3;
  margin-bottom: 10px;
}

#people ul.student-list {
  list-style: none;
  margin: 0;
}

#people ul.student-list > li {
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(221, 225, 231, 0.72);
}

#people ul.student-list > li:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

.foldable-summary::-webkit-details-marker {
  display: none;
}

.foldable-summary::after {
  content: "+";
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--accent);
  font-size: 1.2rem;
  font-weight: 600;
}

.foldable[open] .foldable-summary::after {
  content: "−";
}

.foldable-body {
  padding: 16px;
}

.foldable[open] .foldable-summary {
  border-bottom: 1px solid var(--line);
}

.site-footer {
  width: auto;
  float: none;
  margin: 8px 0 0;
  padding: 0 6px 10px;
}

.site-footer p {
  color: var(--muted);
  font-size: 0.85rem;
}

@media only screen and (max-width: 1024px) {
  .site-shell {
    width: min(100vw - 28px, 920px);
    gap: 18px;
  }

  .site-sidebar {
    width: 280px;
  }

  .site-main {
    width: calc(100% - 298px);
  }
}

@media only screen and (max-width: 767px) {
  .site-shell {
    display: block;
    width: min(100vw - 20px, 640px);
    margin: 16px auto 28px;
  }

  .site-sidebar,
  .site-main {
    width: auto;
  }

  .sidebar-inner {
    position: static;
    max-height: none;
    margin-bottom: 18px;
  }

  .site-main > section {
    padding: 20px 18px;
  }
}
