:root {
  --bg: #ffffff;
  --surface: #f8fafc;
  --surface-2: #eef2ff;
  --text: #172033;
  --muted: #667085;
  --border: #e5e7eb;
  --link: #2557a7;
  --link-hover: #133f7a;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
  --radius: 20px;
  --max-width: 1040px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f172a;
    --surface: #111827;
    --surface-2: #1e293b;
    --text: #e5e7eb;
    --muted: #aab3c2;
    --border: #263244;
    --link: #93c5fd;
    --link-hover: #bfdbfe;
    --shadow: 0 18px 50px rgba(0, 0, 0, 0.25);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.7;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.10), transparent 28rem),
    var(--bg);
  color: var(--text);
}

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

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

.skip-link {
  position: absolute;
  left: -999px;
  top: 12px;
  padding: 8px 12px;
  background: var(--text);
  color: var(--bg);
  border-radius: 8px;
  z-index: 99;
}

.skip-link:focus {
  left: 12px;
}

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

@media (prefers-color-scheme: dark) {
  .site-header {
    background: rgba(15, 23, 42, 0.84);
  }
}

.nav {
  width: min(var(--max-width), calc(100% - 32px));
  margin: 0 auto;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}

.nav-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 14px;
  font-size: 0.95rem;
}

.nav-links a {
  color: var(--muted);
}

.nav-links a:hover {
  color: var(--link-hover);
}

.container {
  width: min(var(--max-width), calc(100% - 32px));
  margin: 0 auto;
}

.section {
  padding: 56px 0;
}

.hero {
  display: block;
  /*grid-template-columns: 240px minmax(0, 1fr);
  gap: 44px;
  align-items: center;
  min-height: calc(100vh - 150px);*/
}

.portrait-wrap {
  justify-self: center;
}

.portrait {
  width: 220px;
  height: 220px;
  display: block;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  background: var(--surface);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--link);
  font-weight: 700;
  letter-spacing: 0.02em;
}

h1,
h2,
h3,
p {
  overflow-wrap: break-word;
}

h1 {
  margin: 0;
  font-size: clamp(2.4rem, 5vw, 4.4rem);
  line-height: 1.05;
  letter-spacing: -0.055em;
}

h2 {
  margin: 0 0 20px;
  font-size: clamp(1.55rem, 2vw, 2rem);
  letter-spacing: -0.035em;
}

h3 {
  margin: 0 0 8px;
  font-size: 1.15rem;
}

.lead {
  margin-top: 20px;
  font-size: 1.16rem;
  color: var(--text);
}

.intro p:not(.eyebrow) {
  max-width: 760px;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-weight: 650;
  font-size: 0.94rem;
}

.button:hover {
  text-decoration: none;
  border-color: var(--link);
}

.button.primary {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.8fr);
  gap: 28px;
  align-items: start;
}

.card {
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface), rgba(255, 255, 255, 0));
  box-shadow: var(--shadow);
}

.clean-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.clean-list li + li {
  margin-top: 14px;
}

time,
.timeline-date,
.venue,
.authors {
  color: var(--muted);
}

time,
.timeline-date {
  font-weight: 700;
}

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

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 0;
}

.tags span {
  display: inline-flex;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  border: 1px solid var(--border);
  font-size: 0.82rem;
  font-weight: 650;
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}

.publication {
  padding: 22px 0;
  border-bottom: 1px solid var(--border);
}

.publication:first-of-type {
  border-top: 1px solid var(--border);
}

.publication h3 {
  margin-bottom: 5px;
}

.publication p {
  margin: 4px 0;
}

.paper-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px !important;
  font-weight: 650;
}

details {
  margin-top: 10px;
}

summary {
  cursor: pointer;
  color: var(--link);
  font-weight: 650;
}

pre {
  overflow-x: auto;
  padding: 14px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.9rem;
}

.timeline {
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline li {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.contact-card {
  margin-bottom: 56px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.footer {
  border-top: 1px solid var(--border);
  padding: 28px 16px;
  color: var(--muted);
  text-align: center;
}

.footer p {
  margin: 0;
}

@media (max-width: 820px) {
  .site-header {
    position: static;
  }

  .nav {
    align-items: flex-start;
    flex-direction: column;
    padding: 16px 0;
  }

  .nav-links {
    justify-content: flex-start;
  }

  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 24px;
    padding-top: 40px;
  }

  .portrait-wrap {
    justify-self: start;
  }

  .portrait {
    width: 160px;
    height: 160px;
  }

  .two-column,
  .cards {
    grid-template-columns: 1fr;
  }

  .section-heading {
    display: block;
  }

  .timeline li {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}
