/* Colors, fonts and the card look follow the html-template talk theme
   (conferences/html-template/css/style.css). */
@font-face { font-family: 'Fira Sans'; font-weight: 400; font-display: swap; src: url('../fonts/fira-sans-400.woff2') format('woff2'); }
@font-face { font-family: 'Fira Sans'; font-weight: 500; font-display: swap; src: url('../fonts/fira-sans-500.woff2') format('woff2'); }
@font-face { font-family: 'Fira Sans'; font-weight: 600; font-display: swap; src: url('../fonts/fira-sans-600.woff2') format('woff2'); }
@font-face { font-family: 'Fira Sans Condensed'; font-weight: 600; font-display: swap; src: url('../fonts/fira-sans-condensed-600.woff2') format('woff2'); }
@font-face { font-family: 'Fira Sans Condensed'; font-weight: 700; font-display: swap; src: url('../fonts/fira-sans-condensed-700.woff2') format('woff2'); }
@font-face { font-family: 'Fira Mono'; font-weight: 400; font-display: swap; src: url('../fonts/fira-mono-400.woff2') format('woff2'); }

:root {
  --color-bg: #ffffff;
  --color-text: #1c1f22;
  --color-text-soft: #5b6570;
  --color-dark: #3b515b;
  --color-panel: #17293c;
  --color-primary: #2f5d8a;
  --color-primary-light: #94b8da;
  --color-border: #e3e7ea;
  --color-bg-soft: #f4f6f7;

  --font-sans: 'Fira Sans', 'Helvetica Neue', Arial, sans-serif;
  --font-condensed: 'Fira Sans Condensed', 'Fira Sans', sans-serif;
  --font-mono: 'Fira Mono', 'SFMono-Regular', Consolas, monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.5;
}

a { color: var(--color-primary); }

.wrap {
  max-width: 64rem;
  margin: 0 auto;
  padding: 0 1rem;
}
main.wrap { padding-bottom: 4rem; }

/* header */
.site-header {
  background: var(--color-panel);
  color: #fff;
}
.site-header-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem 2rem;
  padding-top: 1.1rem;
  padding-bottom: 1.1rem;
}
.site-name {
  font-family: var(--font-condensed);
  font-weight: 700;
  font-size: 1.4rem;
  color: #fff;
  text-decoration: none;
}
.site-nav { display: flex; flex-wrap: wrap; gap: 0.3rem 1.5rem; }
.site-nav a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  padding-bottom: 0.15rem;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--color-primary-light); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--color-primary-light); }

/* headings */
.eyebrow {
  font-family: var(--font-condensed);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-primary);
  margin: 2.5rem 0 0.2rem;
}
.page-title {
  font-family: var(--font-condensed);
  font-weight: 700;
  font-size: 2.4rem;
  line-height: 1.2;
  color: var(--color-dark);
  margin: 0 0 1.5rem;
  padding-bottom: 0.4rem;
  border-bottom: 3px solid var(--color-primary);
}
.section-title {
  font-family: var(--font-condensed);
  font-weight: 700;
  font-size: 1.7rem;
  color: var(--color-dark);
  margin: 2.5rem 0 1rem;
}
.year-title {
  font-family: var(--font-condensed);
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--color-primary);
  margin: 2rem 0 0.8rem;
}

/* cards */
.paper-grid, .talk-grid {
  display: grid;
  gap: 1rem;
}
.paper-grid { grid-template-columns: 1fr; gap: 0.75rem; }
.talk-grid { grid-template-columns: 1fr; gap: 0.6rem; }

.box {
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-primary);
  background: var(--color-bg-soft);
  padding: 0.6rem 0.7rem;
  border-radius: 4px;
}
.paper-card {
  display: grid;
  grid-template-columns: 11rem minmax(0, 1fr);
  grid-template-rows: auto auto 1fr;
  column-gap: 1.1rem;
  min-width: 0;
  scroll-margin-top: 1rem;
}
.paper-figure {
  display: block;
  grid-row: 1 / span 3;
  height: 6.5rem;
  background: #fff;
  border-radius: 4px;
  overflow: hidden;
}
.paper-figure img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.paper-mesh {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--color-panel);
  fill: var(--color-primary-light);
  stroke: var(--color-primary-light);
  stroke-opacity: 0.28;
  stroke-width: 0.6;
}
.card-title {
  font-family: var(--font-condensed);
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.25;
  color: var(--color-dark);
  margin: 0 0 0.35rem;
}
.card-meta {
  font-size: 0.85rem;
  line-height: 1.4;
  color: var(--color-text-soft);
  margin: 0;
}
.card-meta .me { font-weight: 500; color: var(--color-text); }
.card-venue { font-style: italic; }
.badge {
  display: inline-block;
  font-family: var(--font-condensed);
  font-weight: 600;
  font-size: 0.75rem;
  color: #fff;
  background: var(--color-primary);
  border-radius: 3px;
  padding: 0 0.4em;
}
.card-links {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.4rem;
  margin-top: auto;
  padding-top: 0.5rem;
}
.tag-link {
  display: inline-block;
  font-family: var(--font-condensed);
  font-weight: 600;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--color-primary);
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 3px;
  padding: 0.05rem 0.55rem;
  text-decoration: none;
  cursor: pointer;
}
.tag-link:hover { border-color: var(--color-primary); }
.bibtex summary { list-style: none; vertical-align: top; }
.bibtex summary::-webkit-details-marker { display: none; }
.bibtex[open] { flex-basis: 100%; min-width: 0; }
.bibtex pre {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.4;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 3px;
  padding: 0.6rem;
  margin: 0.5rem 0 0;
  overflow-x: auto;
}

@media (max-width: 34rem) {
  .paper-card { grid-template-columns: 6.5rem minmax(0, 1fr); column-gap: 0.75rem; }
  .paper-figure { height: 5rem; }
}

/* start page and projects */
.intro { margin-top: 2.5rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.intro p, .section-text { margin: 0 0 0.8rem; }
.intro .card-links { margin-top: 0; padding-top: 0.2rem; }
.card-meta a { color: var(--color-primary); }
.project-footer { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1.5rem; margin-top: 1.5rem; }
.project-logo { display: block; width: 15rem; max-width: 100%; height: auto; margin-left: auto; }
.acknowledgement { margin: 0; color: var(--color-text-soft); font-size: 0.9rem; }
.project { scroll-margin-top: 1rem; }
.project .section-title { margin-top: 0; }
.facts {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 0.15rem 1rem;
  margin: 0 0 1rem;
  font-size: 0.9rem;
}
.facts dt { font-weight: 500; color: var(--color-dark); }
.facts dd { margin: 0; }
.goals { margin: 0 0 0.8rem; padding-left: 1.2rem; }
.video { margin: 0 0 1.25rem; }
.video-frame { position: relative; }
.embed-overlay[hidden] { display: none; }
.video-fullscreen { margin-top: 0.4rem; }
.video video { cursor: pointer; }
.video-frame .embed-overlay:hover, .video-frame .embed-overlay:focus-visible { background: transparent; }
.video video { display: block; width: 100%; height: auto; background: #fff; border: 1px solid var(--color-border); border-radius: 4px; }
.media-caption { margin-top: 0.35rem; font-size: 0.85rem; color: var(--color-text-soft); }
.embed-group, .embed-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
  gap: 1rem;
}
.embed-row { grid-template-columns: 1fr; gap: 1.5rem; }
.embed-row > .embed-group { grid-template-columns: 1fr; }
.embed-row .embed-frame { aspect-ratio: 16 / 9; }
.embed { margin: 0; min-width: 0; }
.embed-frame { background: #fff; border: 1px solid var(--color-border); border-radius: 4px; aspect-ratio: 16 / 10; overflow: hidden; position: relative; }
.embed-frame img { display: block; width: 100%; height: 100%; object-fit: contain; }
.embed-frame iframe { display: block; width: 100%; height: 100%; border: 0; }

.topic {
  display: flow-root;
  padding: 1.5rem 0;
  border-top: 1px solid var(--color-border);
}
.topic .card-title { font-size: 1.35rem; margin-bottom: 0.7rem; }
.topic-media { float: right; width: 27rem; max-width: 50%; margin: 0.2rem 0 1rem 1.75rem; }
.topic-images { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 0.75rem; align-items: center; }
.topic-images img { display: block; width: 100%; height: auto; max-height: 17rem; object-fit: contain; }
.topic-media .embed-group { grid-template-columns: 1fr; }
.topic:nth-of-type(even) .topic-media { float: left; margin: 0.2rem 1.75rem 1rem 0; }
.topic-inset { float: right; clear: right; width: 10rem; max-width: 40%; height: auto; margin: 0.2rem 0 0.75rem 1.5rem; }
.equation { display: block; width: 44rem; max-width: 100%; height: auto; margin: 0.5rem auto 1.25rem; }
.topic-closing { clear: both; display: flex; align-items: center; gap: 1.5rem; padding-top: 0.5rem; }
.topic-closing img { flex: 0 0 13rem; width: 13rem; max-width: 40%; height: auto; }
.topic-closing .section-text { margin: 0; }
.topic-papers { clear: both; }
@media (max-width: 44rem) {
  .topic-media, .topic:nth-of-type(even) .topic-media { float: none; width: 100%; max-width: 100%; margin: 0 0 1rem; }
}
.topic-papers { margin: 0.8rem 0 0; font-size: 0.9rem; color: var(--color-text-soft); }
.compare-controls { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.6rem 1.2rem; margin-bottom: 0.8rem; font-size: 0.85rem; color: var(--color-dark); }
.compare-controls label { display: flex; align-items: center; gap: 0.4rem; font-weight: 500; }
.compare-controls select { font: inherit; font-weight: 400; padding: 0.15rem 0.3rem; }

.embed-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  transition: background 0.15s;
}
.embed-overlay span {
  font-family: var(--font-condensed);
  font-weight: 600;
  font-size: 0.95rem;
  color: #fff;
  background: var(--color-panel);
  border-radius: 3px;
  padding: 0.3rem 0.7rem;
  opacity: 0;
  transition: opacity 0.15s;
}
.embed-overlay:hover, .embed-overlay:focus-visible { background: rgba(23, 41, 60, 0.12); }
.embed-overlay:hover span, .embed-overlay:focus-visible span { opacity: 1; }
/* touch screens have no hover, so the label is always visible */
@media (hover: none) {
  .embed-overlay span { opacity: 1; }
}

.home { max-width: 40rem; margin: 3rem auto 2rem; text-align: center; }
.home-portrait { display: block; width: 18rem; max-width: 100%; aspect-ratio: 1; margin: 0 auto 1.5rem; border-radius: 50%; object-fit: cover; }
.home-name { margin: 0; color: var(--color-primary); font-size: 2.2rem; line-height: 1.2; }
.home-role { margin: 0.3rem 0 1.8rem; color: var(--color-text-soft); }
.home .card-links { justify-content: center; margin-top: 1.2rem; padding-top: 0; }
.home-contact { margin: 1.2rem 0 0; }
.home-contact a { color: var(--color-primary); }
.cv { display: grid; grid-template-columns: 6.5rem 1fr; gap: 0.8rem 1rem; margin: 0; }
.cv dt { color: var(--color-text-soft); font-weight: 500; }
.cv dd { margin: 0; }

.site-footer { margin-top: 3rem; padding: 1.2rem 0; border-top: 1px solid #d9dee3; font-size: 0.9rem; }
.site-footer a { color: var(--color-text-soft); }
.legal { max-width: 46rem; }
.legal p { margin: 0 0 0.8rem; }
.legal a { color: var(--color-primary); }
.email-image { height: 1em; vertical-align: -0.1em; }
