:root {
  --ink: #17242b;
  --muted: #60717a;
  --soft: #f5f7f4;
  --paper: #ffffff;
  --line: #d8e0df;
  --navy: #102a36;
  --teal: #0b7285;
  --teal-soft: #e8f3f4;
  --red: #b6453d;
  --gold: #caa75a;
  --shadow: 0 18px 45px rgba(16, 42, 54, 0.09);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background: linear-gradient(180deg, #f9faf7 0%, var(--soft) 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", "Noto Sans SC", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
}

a { color: var(--teal); text-decoration: none; }
a:hover { color: var(--red); }

.skip-link {
  position: absolute;
  left: -999px;
  top: 12px;
}
.skip-link:focus {
  left: 12px;
  z-index: 10;
  background: var(--paper);
  padding: 8px 12px;
  border: 1px solid var(--line);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255,255,255,.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.topbar {
  width: min(1180px, calc(100% - 32px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  min-width: 245px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  flex: none;
  object-fit: contain;
}

.brand small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
}

.nav-menu a,
.lang-switch a,
.nav-toggle,
.button,
.pub-link {
  border-radius: 8px;
}

.nav-menu a {
  color: #33444c;
  padding: 8px 10px;
  font-size: 14px;
}

.nav-menu a.active,
.nav-menu a:hover {
  background: var(--teal-soft);
  color: var(--navy);
}

.lang-switch {
  display: flex;
  gap: 4px;
  padding-left: 10px;
  border-left: 1px solid var(--line);
}

.lang-switch a {
  color: var(--muted);
  padding: 5px 8px;
  font-size: 13px;
}

.lang-switch a.active {
  background: var(--navy);
  color: #fff;
}

.nav-toggle {
  display: none;
  margin-left: auto;
  background: var(--navy);
  color: #fff;
  border: 0;
  padding: 8px 12px;
}

.site-main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0 64px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 34px;
  align-items: stretch;
  padding: 44px 0 36px;
}

.hero-copy {
  padding: 42px 46px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero h1 {
  margin: 0 0 20px;
  max-width: 820px;
  font-family: Georgia, "Times New Roman", "Noto Serif SC", serif;
  font-size: clamp(36px, 5vw, 62px);
  line-height: 1.05;
  letter-spacing: 0;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--red);
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
}

.hero ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 22px 0 0;
  list-style: none;
}

.hero li {
  border: 1px solid var(--line);
  background: #fbfcfa;
  padding: 6px 10px;
  border-radius: 8px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.button {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  border: 1px solid var(--line);
  color: var(--navy);
  background: #fff;
  padding: 8px 14px;
  font-weight: 700;
}

.button.primary {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}

.profile-panel {
  background: var(--navy);
  color: #eef6f6;
  border-radius: 8px;
  padding: 22px;
  box-shadow: var(--shadow);
}

.portrait {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.18);
}

.profile-panel h2 {
  margin: 18px 0 6px;
  font-size: 24px;
}

.profile-panel p {
  color: #c6d7d8;
  margin: 0 0 12px;
}

.profile-panel a { color: #fff; }

.profile-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,.2);
}

.profile-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 50%;
  background: rgba(255,255,255,.06);
}

.profile-links a:hover {
  background: rgba(255,255,255,.18);
  border-color: rgba(255,255,255,.6);
}

.profile-links a:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.profile-links img {
  display: block;
  width: 24px;
  height: 24px;
}

.section-grid {
  display: grid;
  gap: 28px;
}

.two-col { grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr); }

.page-shell {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 34px;
  box-shadow: 0 12px 32px rgba(16, 42, 54, 0.06);
}

.section-heading {
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
}

.section-heading h1,
.section-heading h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", "Noto Serif SC", serif;
  line-height: 1.15;
}

.section-heading h1 { font-size: clamp(32px, 4vw, 48px); }
.section-heading h2 { font-size: 28px; }
.section-heading p:not(.eyebrow) { max-width: 760px; color: var(--muted); }

.prose {
  max-width: 880px;
}

.prose h2,
.prose h3,
.prose h4 {
  margin-top: 28px;
  line-height: 1.25;
}

.prose blockquote {
  margin: 22px 0;
  padding-left: 18px;
  border-left: 4px solid var(--teal);
  color: var(--muted);
}

code {
  background: var(--teal-soft);
  color: var(--navy);
  padding: 2px 5px;
  border-radius: 5px;
}

pre {
  overflow-x: auto;
  background: #0e1f28;
  color: #edf6f7;
  padding: 14px;
  border-radius: 8px;
}

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

.research-thesis {
  margin: 0 0 22px;
  padding: 22px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--red);
  border-radius: 8px;
  background: linear-gradient(90deg, #fff8f6 0, #fff 42%);
}

.research-thesis h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.research-thesis p {
  margin: 0;
  color: var(--muted);
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.tag-cloud span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--navy);
  font-size: 13px;
  font-weight: 700;
}

.research-card,
.project-item,
.publication-item,
.news-item,
.student-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.research-card {
  padding: 22px;
}

.research-card h2,
.project-item h2,
.publication-item h3,
.news-item h3 {
  margin-top: 0;
  line-height: 1.25;
}

.tagline,
.muted,
.venue,
.project-meta,
.authors,
.news-item time,
.student-card span {
  color: var(--muted);
}

.publication-list,
.project-list,
.news-list,
.student-groups {
  display: grid;
  gap: 14px;
}

.publication-item {
  border-left: 4px solid var(--line);
  padding: 18px 20px;
}

.publication-item h3,
.publication-item h4 {
  font-size: 19px;
  margin-bottom: 7px;
}

.publication-item h4 {
  margin-top: 0;
}

.publication-category {
  margin-top: 18px;
}

.publication-category h3 {
  margin: 0 0 12px;
  color: var(--navy);
  font-size: 20px;
}

.publication-item.with-thumb {
  display: grid;
  grid-template-columns: 108px 1fr;
  gap: 16px;
}

.publication-thumb {
  display: grid;
  place-items: center;
  align-self: start;
  min-height: 86px;
  background: var(--teal-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
}

.publication-thumb img {
  width: 100%;
  max-height: 86px;
  object-fit: contain;
}

.authors,
.venue {
  margin: 4px 0;
}

.contribution {
  margin: 10px 0 0;
  padding: 10px 12px;
  background: var(--teal-soft);
  border-left: 3px solid var(--teal);
}

.tldr {
  margin: 10px 0 0;
  color: var(--ink);
}

.badge {
  display: inline-flex;
  vertical-align: middle;
  margin-left: 8px;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 11px;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
}

.publication-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  align-items: center;
}

.pub-link,
.bibtex summary {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid var(--line);
  padding: 4px 9px;
  color: var(--navy);
  background: #fbfcfa;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.bibtex {
  display: inline-block;
}

.bibtex pre {
  width: min(760px, calc(100vw - 64px));
  white-space: pre-wrap;
}

.year-heading {
  margin: 28px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  color: var(--navy);
}

.project-item {
  padding: 22px;
}

.project-item ul {
  margin-bottom: 0;
}

.news-item {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 18px;
  padding: 18px;
}

.news-item h3 {
  font-size: 17px;
  margin-bottom: 4px;
}

.news-item p {
  margin: 0;
}

.student-group {
  margin-top: 20px;
}

.student-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.student-card {
  padding: 14px;
}

.student-card strong,
.student-card span {
  display: block;
}

.student-card p {
  margin: 8px 0 0;
}

.site-footer {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 36px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.site-footer span {
  margin-left: 12px;
}

@media (max-width: 980px) {
  .topbar {
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 0;
  }
  .nav-toggle { display: inline-flex; }
  .nav-menu {
    display: none;
    width: 100%;
    order: 3;
    flex-wrap: wrap;
    margin-left: 0;
  }
  .nav-menu.is-open { display: flex; }
  .lang-switch { margin-left: auto; }
  .hero,
  .two-col {
    grid-template-columns: 1fr;
  }
  .profile-panel {
    max-width: 420px;
  }
  .research-grid,
  .student-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .site-main { width: min(100% - 22px, 1180px); padding-top: 20px; }
  .brand { min-width: 0; }
  .brand small { display: none; }
  .hero { padding-top: 18px; }
  .hero-copy,
  .page-shell {
    padding: 22px;
  }
  .news-item {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .publication-item.with-thumb {
    grid-template-columns: 1fr;
  }
  .publication-thumb {
    max-width: 160px;
  }
  .site-footer span {
    display: block;
    margin: 4px 0 0;
  }
}
