:root {
  --bg: #ffffff;
  --ink: #222222;
  --muted: #555555;
  --line: #dddddd;
  --accent: #7a4a12;
  color-scheme: light;
  font-family:
    ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.65;
}

.page {
  width: min(760px, calc(100% - 32px));
  margin: 0 auto;
  padding: clamp(2.5rem, 7vw, 5rem) 0;
}

.profile {
  display: grid;
  grid-template-columns: 148px 1fr;
  gap: 1.5rem;
  align-items: center;
  padding-bottom: 2.25rem;
  border-bottom: 1px solid var(--line);
}

.portrait {
  width: 148px;
  height: 148px;
  border-radius: 50%;
  object-fit: cover;
}

h1,
h2,
p {
  margin-top: 0;
  overflow-wrap: anywhere;
}

h1 {
  margin-bottom: 0.55rem;
  font-size: clamp(2.15rem, 6vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0.75rem;
  color: var(--accent);
  font-size: 1.25rem;
  line-height: 1.25;
  letter-spacing: 0;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

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

section + section {
  padding-top: 2rem;
}

.lead,
p,
li {
  color: var(--muted);
}

.lead {
  margin-bottom: 0;
  font-size: 1rem;
}

.profile-meta {
  display: grid;
  grid-column: 1 / -1;
  gap: 0.8rem;
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.55;
}

.profile-meta div {
  display: grid;
  gap: 0.15rem;
}

.profile-meta dt {
  color: var(--ink);
  font-weight: 750;
}

.profile-meta dd {
  margin: 0;
}

ul {
  margin: 0.85rem 0 0;
  padding-left: 1.25rem;
}

li + li {
  margin-top: 0.35rem;
}

.publication-block {
  margin-top: 1.25rem;
}

.publications {
  display: grid;
  gap: 0.8rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.publication-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: start;
  margin: 0;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(122, 74, 18, 0.035), rgba(122, 74, 18, 0)),
    #ffffff;
  cursor: pointer;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.publication-card:hover,
.publication-card:focus-within {
  border-color: rgba(122, 74, 18, 0.38);
  box-shadow: 0 10px 28px rgba(34, 34, 34, 0.08);
  transform: translateY(-1px);
}

.publication-card:hover .paper-title,
.publication-card:focus-within .paper-title {
  color: var(--accent);
}

.paper-cover-link {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: 8px;
}

.paper-cover-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.publication-content {
  position: relative;
  z-index: 2;
  pointer-events: none;
}

.paper-venue {
  margin-bottom: 0.25rem;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 750;
  line-height: 1.2;
  text-transform: uppercase;
}

.paper-title {
  margin-bottom: 0.25rem;
  color: var(--ink);
  font-weight: 650;
  line-height: 1.45;
}

.paper-authors,
.code-button {
  margin-bottom: 0;
}

.paper-authors {
  font-size: 0.94rem;
  line-height: 1.55;
}

.paper-authors strong {
  color: var(--ink);
  font-weight: 750;
}

.code-button {
  position: relative;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0.25rem 0.7rem;
  border: 1px solid rgba(122, 74, 18, 0.25);
  border-radius: 999px;
  background: rgba(122, 74, 18, 0.08);
  color: var(--accent);
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.code-button:hover,
.code-button:focus-visible {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
}

section p:last-child {
  margin-bottom: 0;
}

@media (max-width: 620px) {
  body {
    font-size: 16px;
  }

  .profile {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

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

  .publication-card {
    grid-template-columns: 1fr;
  }

  .code-button {
    width: max-content;
  }
}
