/* ------------------------------------------------------------------
   Personal academic site, light theme, in the spirit of al-folio.
   Edit the variables below to tune colours, width and type.
   ------------------------------------------------------------------ */

/* Roboto, self-hosted. Google serves one variable-weight file per subset;
   latin-ext carries the Czech and other accented characters. */
@font-face {
  font-family: "Roboto";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(assets/fonts/roboto-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Roboto";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(assets/fonts/roboto-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg:      #ffffff;
  --text:    #212529;
  --muted:   #6c757d;
  --link:    #0076df;
  --accent:  #2a7f8f;   /* news badges and publication buttons */
  --year:    #d3d7db;
  --rule:    #e9ecef;
  --code-bg: #f6f8fa;
  --foot-bg: #f8f9fa;

  --max-width: 800px;
  --gutter:    1rem;
  --font: Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html { color-scheme: light; scroll-padding-top: 4rem; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2 {
  font-weight: 300;
  line-height: 1.2;
  letter-spacing: 0;
}
h1 { font-size: 2.25rem; margin: 2rem 0 1.25rem; }
h2 { font-size: 1.75rem; margin: 0 0 1rem; }

p { margin: 0 0 1rem; }

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* Header ----------------------------------------------------------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--rule);
  background: var(--bg);
}
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}
.site-name {
  color: var(--text);
  font-size: 1.2rem;
  font-weight: 500;
}
.site-name:hover { text-decoration: none; }
.site-nav { display: flex; flex-wrap: wrap; gap: 0.9rem; }
.site-nav a { color: var(--muted); }
.site-nav a:hover { color: var(--text); text-decoration: none; }

main { padding-bottom: 1rem; }
section { margin-bottom: 3rem; }

/* About ------------------------------------------------------------ */

.intro {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}
.intro-text { flex: 1; min-width: 0; }
.role { color: var(--muted); }
.service { color: var(--muted); font-size: 0.92rem; }
.callout {
  margin: 1rem 0;
  padding: 0.6rem 0.9rem;
  border-left: 3px solid var(--accent);
  border-radius: 0 4px 4px 0;
  background: #eef6f7;
  font-size: 0.95rem;
}

.profile {
  flex: 0 0 160px;
  text-align: center;
  padding-top: 0.25rem;
}
.portrait {
  display: block;
  width: 160px;
  height: 160px;
  object-fit: cover;
  border-radius: 6px;
}
.links {
  list-style: none;
  margin: 0.75rem 0 0.25rem;
  padding: 0;
  display: flex;
  justify-content: center;
  gap: 0.8rem;
}
.links a { display: inline-flex; color: var(--text); }
.links a:hover { color: var(--link); }
.links .icon { width: 1.3rem; height: 1.3rem; }
.links span {           /* label kept for screen readers only */
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* News ------------------------------------------------------------- */

.news p { margin: 0 0 0.6rem; }
.badge {
  display: inline-block;
  min-width: 4.5rem;
  margin-right: 0.35rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
  vertical-align: 0.1em;
  white-space: nowrap;
}

/* Publications ----------------------------------------------------- */

.pub-year + .pub-year { margin-top: 2rem; }
.year {
  margin: 0 0 1rem;
  text-align: right;
  font-size: 2.25rem;
  font-weight: 300;
  line-height: 1;
  color: var(--year);
}
.pub {
  display: flex;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}
.pub-thumb { flex: 0 0 130px; }
.pub-thumb img {
  display: block;
  width: 130px;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.22);
}
.pub-body { flex: 1; min-width: 0; }

.pub-body > span { display: block; }
.pub-title { font-weight: 500; }
.pub-authors em {
  font-style: normal;
  border-bottom: 1px solid currentColor;
}
.pub-venue { font-style: italic; }
.pub-venue .yr { font-style: normal; }

/* Link buttons (PDF, arXiv, code, ...) */
.btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.45rem;
}
.btn {
  display: inline-block;
  padding: 0 0.4rem;
  border: 2px solid var(--accent);
  border-radius: 5px;
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.6;
  text-transform: uppercase;
  cursor: pointer;
}
.btn:hover {
  background: var(--accent);
  color: #fff;
  text-decoration: none;
}

/* BibTeX disclosure: the summary is a button, the <pre> drops below */
.bib { display: contents; }
.bib summary { list-style: none; }
.bib summary::-webkit-details-marker { display: none; }
.bib[open] summary { background: var(--accent); color: #fff; }
.bib::details-content { flex-basis: 100%; min-width: 0; }  /* Chrome wraps the content in this box */
.bib pre {
  flex-basis: 100%;
  min-width: 0;
  margin: 0.35rem 0 0;
  padding: 0.75rem 1rem;
  background: var(--code-bg);
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.45;
  overflow-x: auto;
}

/* Footer ----------------------------------------------------------- */

.site-footer {
  margin-top: 2rem;
  padding: 1rem var(--gutter);
  background: var(--foot-bg);
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.8rem;
  text-align: center;
}

/* Small screens ---------------------------------------------------- */

@media (max-width: 640px) {
  h1 { font-size: 1.85rem; margin-top: 1.5rem; }
  .intro { flex-direction: column; align-items: center; gap: 1.25rem; }
  .intro-text { width: 100%; }
  .profile { flex-basis: auto; }
  .year { text-align: left; }
  .pub { flex-direction: column; gap: 0.75rem; }
  .pub-thumb img { width: 100%; max-width: 260px; }
}
