@font-face {
  font-family: "Raleway";
  src: url("fonts/raleway-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #2c2c2c;
  --muted: #606060;
  --link: #1767cf;
  --line: #e8e8e8;
  --sans: "Raleway", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body { margin: 0; background: #fff; color: var(--ink); font: 16px/1.65 var(--sans); -webkit-font-smoothing: antialiased; }
::selection { background: #e5eefb; }
h1, h2, h3, p, figure { margin: 0; }
a { color: var(--link); text-decoration: none; text-underline-offset: 3px; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; }
button, summary { cursor: pointer; }
a, button, summary { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 4px; border-radius: 2px; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
.container { width: min(100% - 48px, 832px); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: -100px; left: 20px; z-index: 20; padding: 8px 16px; background: var(--ink); color: #fff; }
.skip-link:focus { top: 12px; }

.about { padding-top: 80px; }
h1 { font-size: 26px; font-weight: 600; line-height: 1.3; text-align: left; margin-bottom: 12px; }
.profile-body { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 40px; align-items: start; }
.portrait-frame { position: relative; overflow: hidden; }
.portrait-frame img { width: 100%; height: auto; }
.portrait-label { position: absolute; bottom: 19px; left: 0; right: 0; text-align: center; color: var(--muted); font-size: 11px; }
.about-content p + p { margin-top: 10px; }
.intro a, .advisor a { text-decoration: underline; text-decoration-thickness: 1px; }
.social-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin-top: 16px; }
.social-link, .social-placeholder { display: inline-flex; align-items: center; gap: 5px; position: relative; color: #444; font-size: 14px; padding-block: 3px; }
.social-link:hover { color: var(--link); }
.social-placeholder { cursor: default; }
.social-links svg { width: 15px; height: 15px; }
.email-link { max-width: 100%; }
.email-link svg { flex-shrink: 0; }
.email-link span { min-width: 0; overflow-wrap: anywhere; }
.social-tooltip { pointer-events: none; opacity: 0; position: absolute; top: calc(100% + 6px); left: 50%; transform: translateX(-50%); background: #333; color: #fff; padding: 4px 8px; border-radius: 3px; white-space: nowrap; font-size: 11px; z-index: 2; }
.social-placeholder:hover .social-tooltip, .social-placeholder:focus .social-tooltip { opacity: 1; }

.section { margin-top: 36px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 6px; border-bottom: 2px solid var(--line); margin-bottom: 17px; }
h2 { font-size: 20px; font-weight: 600; line-height: 1.4; }
.news-list { list-style: none; margin: 0; padding: 0; }
.news-list li { display: grid; grid-template-columns: 82px minmax(0, 1fr); gap: 16px; padding-block: 4px; font-size: 14px; }
.news-list time { color: var(--muted); font-size: 13px; font-variant-numeric: lining-nums tabular-nums; }
.news-list a { color: var(--ink); }
.news-list a:hover { color: var(--link); }
.news-list strong { font-weight: 600; }
.earlier-news summary { list-style: none; display: flex; align-items: center; gap: 8px; width: fit-content; margin: 9px 0 0 98px; color: var(--muted); font-size: 12px; }
.earlier-news summary::-webkit-details-marker { display: none; }
.earlier-news summary:hover { color: var(--link); }
.earlier-news summary span { font-size: 16px; line-height: 1; }
.earlier-news[open] summary span { transform: rotate(45deg); }
.earlier-news[open] .news-list { margin-top: 9px; }

.publication-filters { display: flex; gap: 5px; flex-wrap: wrap; }
.publication-filters button { border: 0; padding: 4px 9px; min-height: 30px; background: transparent; color: var(--muted); font-size: 12px; }
.publication-filters button:hover { color: var(--link); }
.publication-filters button[aria-pressed="true"] { color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }
.publication { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 20px; align-items: start; margin-bottom: 28px; scroll-margin-top: 24px; }
.publication:last-child { margin-bottom: 0; }
.publication-visual { position: relative; display: grid; place-items: center; min-width: 0; aspect-ratio: 22/13; overflow: hidden; background: #f3f3f3; }
.publication-visual > img { width: 100%; height: 100%; object-fit: contain; }
.publication-visual.has-media { aspect-ratio: auto; background: #fff; }
.publication-visual.has-media > img, .publication-visual > video { display: block; width: 100%; height: auto; }
#tetris3d .publication-visual { aspect-ratio: 1.85; }
#tetris3d .publication-visual > img { height: 100%; object-fit: cover; object-position: center top; }
.figure-name { position: absolute; left: 12px; right: 12px; top: 50%; transform: translateY(-50%); text-align: center; font-size: 15px; font-weight: 500; color: #606060; }
.figure-placeholder { position: absolute; bottom: 16px; font-size: 10px; color: #707070; }
.publication h3 { font-size: 16px; line-height: 1.4; font-weight: 600; margin-bottom: 5px; }
.publication h3 a { color: var(--ink); }
.publication h3 a:hover { color: var(--link); }
.authors { color: #444; font-size: 14px; line-height: 1.65; }
.authors strong { font-weight: 600; }
.venue { font-size: 14px; color: var(--muted); font-style: italic; margin-top: 4px; }
.paper-links { display: flex; flex-wrap: wrap; justify-content: flex-start; align-items: center; gap: 4px 14px; margin-top: 7px; }
.paper-links a, .paper-links button { color: var(--link); font-size: 12px; line-height: 1.5; min-height: 26px; display: inline-flex; align-items: center; padding: 2px 0; }
.paper-links button { border: 0; background: transparent; }
.paper-links button:hover { text-decoration: underline; text-underline-offset: 3px; }
.publication:target { animation: paper-highlight 1.8s ease-out; }
@keyframes paper-highlight { from { background: #edf3fc; } to { background: transparent; } }

.education-list { list-style: none; padding: 0; margin: 0; }
.education-item { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 14px; align-items: center; margin-bottom: 16px; }
.education-item:last-child { margin-bottom: 0; }
.education-item h3 { font-size: 16px; font-weight: 500; line-height: 1.55; }
.education-item p { color: #555; font-size: 14px; margin-top: 3px; }
.entry-logo { width: 44px; height: 44px; object-fit: contain; }
.entry-details { min-width: 0; }
.site-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 20px; border-top: 1px solid var(--line); margin-top: 40px; padding: 18px 0 40px; font-size: 11px; color: var(--muted); }

dialog { width: min(620px, calc(100% - 32px)); max-height: calc(100dvh - 48px); padding: 26px; border: 1px solid #ddd; border-radius: 5px; background: #fff; color: var(--ink); }
dialog::backdrop { background: rgb(0 0 0 / 35%); }
body:has(dialog[open]) { overflow: hidden; }
.dialog-header { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.icon-button { display: grid; place-items: center; width: 36px; height: 36px; border: 0; background: transparent; font-size: 26px; }
.icon-button:hover { background: #f3f3f3; }
#citation-paper-title { font-size: 14px; margin-top: 16px; }
dialog pre { background: #f5f5f5; padding: 16px; overflow: auto; max-height: 40dvh; font-size: 12px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.dialog-footer { display: flex; justify-content: space-between; align-items: center; gap: 15px; }
#copy-status { color: var(--muted); font-size: 12px; }
.copy-button { flex-shrink: 0; padding: 7px 12px; background: #fff; border: 1px solid #ccc; border-radius: 3px; font-size: 12px; }
.copy-button:hover { border-color: var(--link); color: var(--link); }

@media (max-width: 720px) {
  .profile-body { grid-template-columns: 170px minmax(0, 1fr); gap: 26px; }
  .publication { grid-template-columns: 180px minmax(0, 1fr); gap: 20px; }
  .paper-links { gap: 4px 10px; }
}
@media (max-width: 600px) {
  .container { width: calc(100% - 40px); }
  .about { padding-top: 48px; }
  h1 { font-size: 24px; }
  .profile-body { grid-template-columns: 1fr; gap: 22px; }
  .portrait { width: 165px; justify-self: center; }
  .portrait-label { font-size: 10px; bottom: 15px; }
  .about-content { font-size: 15px; }
  .social-links { gap: 8px 18px; }
  .section { margin-top: 30px; }
  .news-list li { grid-template-columns: 66px minmax(0, 1fr); gap: 12px; font-size: 13px; padding-block: 6px; }
  .news-list time { font-size: 12px; }
  .earlier-news summary { margin-left: 78px; }
  .publication-heading { flex-wrap: wrap; gap: 8px; }
  .publication { grid-template-columns: 1fr; gap: 13px; margin-bottom: 30px; }
  .publication-visual { aspect-ratio: 2.4; }
  .paper-links { gap: 4px 20px; }
  .paper-links a, .paper-links button { min-height: 32px; font-size: 13px; }
  .publication h3 { font-size: 16px; }
  .authors, .venue { font-size: 14px; }
  .education-item h3 { font-size: 15px; }
  .education-item p { font-size: 13px; }
  dialog { padding: 20px; }
  .dialog-footer { align-items: flex-end; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media print {
  .container { width: 100%; }
  .about { padding-top: 0; }
  .social-links, .publication-filters, .paper-links button, dialog { display: none !important; }
  .publication { break-inside: avoid; }
  .publication[hidden] { display: grid !important; }
  .education-item { break-inside: avoid; }
  a { color: inherit; }
}
