:root {
  --background: #f3f2ee;
  --text: #22231f;
  --muted: #676962;
  --line: #d9d8d1;
  --link: #345f8a;
  --card: #fbfaf7;
  --badge: #e7edf2;
  --width: 820px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
}

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

a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-header,
main,
footer {
  width: min(calc(100% - 40px), var(--width));
  margin-inline: auto;
}

.site-header {
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.site-header .name {
  color: var(--text);
  font-weight: 650;
  letter-spacing: -0.01em;
}

nav {
  display: flex;
  gap: 24px;
  font-size: 14px;
}

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

nav a[aria-current="page"] {
  color: var(--text);
  font-weight: 650;
}

main {
  padding-bottom: 32px;
}

section {
  padding: 48px 0;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 24px;
}

.intro {
  padding-top: 72px;
}

.profile-photo {
  float: right;
  width: 190px;
  aspect-ratio: 1;
  margin: 7px 0 22px 46px;
  overflow: hidden;
  border-radius: 10px;
  background: var(--line);
}

.profile-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.3);
}

.kicker {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 14px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 24px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(42px, 8vw, 60px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.intro h1 {
  font-size: clamp(32px, 5vw, 44px);
}

h2 {
  margin-bottom: 28px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 27px;
  font-weight: 500;
}

h3 {
  margin-bottom: 2px;
  font-size: 16px;
  font-weight: 650;
}

.summary {
  max-width: 740px;
  margin-bottom: 16px;
  font-size: 17px;
}

.links {
  display: flex;
  gap: 22px;
  margin-top: 28px;
  font-size: 15px;
}

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

.publication-list li {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 18px;
  margin-bottom: 14px;
  padding: 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 9px;
}

.publication-list li:last-child {
  margin-bottom: 0;
}

.publication-list p {
  margin-bottom: 3px;
}

.venue-badge {
  align-self: start;
  padding: 4px 7px;
  background: var(--badge);
  border-radius: 4px;
  color: var(--link);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
}

.paper-content > p:not(.paper-title) {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.paper-content strong {
  color: var(--text);
}

.paper-links {
  display: flex;
  gap: 15px;
  margin-top: 9px;
  font-size: 13px;
}

.paper-links a::after {
  content: " ↗";
  font-size: 11px;
}

.paper-title {
  font-weight: 650;
  line-height: 1.45;
}

.note,
.detail,
time {
  color: var(--muted);
  font-size: 14px;
}

.note {
  margin: 24px 0 0;
}

.entry {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  margin-bottom: 26px;
}

.entry:last-child {
  margin-bottom: 0;
}

.entry p {
  margin-bottom: 2px;
}

time {
  white-space: nowrap;
}

.news-section {
  padding-top: 38px;
  padding-bottom: 38px;
}

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

.news-list li {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 18px;
  margin-bottom: 10px;
}

.news-list li:last-child {
  margin-bottom: 0;
}

.earlier-news {
  margin-top: 16px;
}

.earlier-news summary {
  width: max-content;
  color: var(--link);
  cursor: pointer;
  font-size: 14px;
}

.earlier-news .news-list {
  margin-top: 14px;
}

.blog-intro {
  padding-top: 72px;
  padding-bottom: 52px;
}

.blog-intro h1 {
  margin-bottom: 20px;
}

.blog-description {
  max-width: 620px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 18px;
}

.blog-posts {
  min-height: 320px;
}

.blog-empty {
  padding: 30px 32px;
  border: 1px dashed var(--line);
  border-radius: 9px;
  background: color-mix(in srgb, var(--card) 65%, transparent);
}

.blog-empty p {
  margin-bottom: 2px;
}

.blog-empty > p:first-child {
  font-weight: 650;
}

.post-entry {
  display: grid;
  padding: 26px 0;
  border-top: 1px solid var(--line);
  grid-template-columns: 130px 1fr;
  gap: 24px;
}

.post-entry:last-child {
  border-bottom: 1px solid var(--line);
}

.post-entry h3 {
  margin-bottom: 6px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 21px;
  font-weight: 500;
}

.post-summary {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 15px;
}

.post-tags {
  display: flex;
  margin: 0;
  padding: 0;
  gap: 8px;
  list-style: none;
}

.post-tags li {
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--badge);
  color: var(--link);
  font-size: 11px;
  font-weight: 700;
}

.publication-list li[id] {
  scroll-margin-top: 24px;
}

footer {
  padding: 28px 0 48px;
  color: var(--muted);
  font-size: 14px;
}

footer p {
  margin: 0;
}

@media (max-width: 600px) {
  .site-header {
    height: auto;
    padding: 20px 0;
    align-items: flex-start;
    gap: 16px;
  }

  nav {
    gap: 14px;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .intro {
    padding-top: 50px;
  }

  .profile-photo {
    float: none;
    width: 150px;
    margin: 0 0 25px;
  }

  section {
    padding: 38px 0;
  }

  .entry {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .blog-intro {
    padding-top: 50px;
  }

  .post-entry {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #181a1b;
    --text: #e7e5e1;
    --muted: #a5a5a2;
    --line: #383a3b;
    --link: #87afd5;
    --card: #202324;
    --badge: #283746;
  }
}
