/* Look modeled on the Jekyll "grayscale" / "Personal" theme, in a light version:
   Montserrat headings, Lora body text. Fonts are served from assets/fonts. */

@font-face { font-family: "Lora"; src: url("../fonts/lora.woff2") format("woff2");
  font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Lora"; src: url("../fonts/lora-italic.woff2") format("woff2");
  font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("../fonts/montserrat.woff2") format("woff2");
  font-weight: 400 700; font-style: normal; font-display: swap; }

:root {
  --bg: #fff;
  --panel: #f3f4f7;
  --text: #111;
  --muted: #555;
  --accent: #1f3c88;   /* link colour (dark royal blue); change here to restyle the whole site */
  --accent-hover: #142863;
  --on-accent: #fff;          /* text on a button when hovered */
  --line: #ddd;
  --nav-bg: rgba(255, 255, 255, 0.92);
  --nav-line: rgba(0, 0, 0, 0.12);
  --intro-bg: #fff;
  --serif: "Lora", Georgia, "Times New Roman", serif;
  --sans: "Montserrat", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.6;
}
a { color: var(--accent); text-decoration: none; }
a:hover, a:focus { color: var(--accent-hover); }

/* ---------- Navigation bar ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 10;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 4px 24px;
  padding: 14px 24px;
  background: var(--nav-bg);
  border-bottom: 1px solid var(--nav-line);
  font-family: var(--sans); text-transform: uppercase; letter-spacing: 1px;
}
.nav a { color: var(--text); }
.nav a:hover, .nav a:focus { color: var(--accent); }
.nav-brand { font-weight: 700; font-size: 16px; }
.nav-links { display: flex; flex-wrap: wrap; gap: 4px 20px; font-size: 13px; }

/* ---------- Intro: big name and title, followed directly by About ---------- */
.intro {
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  padding: 120px 16px 10px;
  background: var(--intro-bg);
  color: var(--text);
}
.intro h1 {
  margin: 0 0 16px;
  font-family: var(--sans); font-weight: 700;
  text-transform: uppercase; letter-spacing: 3px;
  font-size: clamp(36px, 8vw, 88px); line-height: 1.1;
}
.intro-text { font-size: clamp(18px, 2.5vw, 24px); margin: 0; color: var(--muted); }

/* Sketch background behind the name (intro_bg in _config.yml). Positioned so
   the Pobednik column stays in view on narrow phone screens too. */
.intro-has-bg {
  background-repeat: no-repeat;
  background-size: cover;
  background-position: 30% bottom;
  padding-bottom: 60px;
}
.footer .credit { font-size: 12px; }

/* Photo beside the name (photo_position: name) */
.intro-photo-name .intro-body {
  display: flex; align-items: center; justify-content: center; gap: 44px;
  text-align: left;
}
.intro-photo-name h1 { font-size: clamp(36px, 6.5vw, 80px); }
/* Photo above the name (photo_position: above) */
.photo-at-above { margin: 0 auto 28px; width: 200px; }
.photo-at-above img, .photo-at-above .photo-placeholder { width: 200px; height: 200px; }
/* Photo below the titles (photo_position: below) */
.photo-at-below { margin: 36px auto 0; width: 200px; }
.photo-at-below img, .photo-at-below .photo-placeholder { width: 200px; height: 200px; }

/* ---------- About: photo beside the bio ---------- */
.section.about {
  display: flex; align-items: flex-start; gap: 40px;
  padding-top: 50px;
  scroll-margin-top: 80px;
}
.about-photo { flex: 0 0 220px; }
.about-photo img, .photo-placeholder {
  display: block; width: 220px; height: 220px;
  border-radius: 50%; object-fit: cover;
  border: 2px solid var(--line);
}
.photo-placeholder {
  display: flex; align-items: center; justify-content: center;
  background: var(--panel); color: var(--muted);
  font-family: var(--sans); font-weight: 700; font-size: 64px; letter-spacing: 4px;
}
.about-text p:first-child { margin-top: 0; }
.about-text p { text-align: justify; hyphens: auto; }

/* ---------- Content sections ---------- */
.section {
  max-width: 860px;
  margin: 0 auto;
  padding: 90px 16px 30px;
  scroll-margin-top: 30px;
}
h2, h3 { font-family: var(--sans); text-transform: uppercase; font-weight: 700; }
h2 { font-size: 34px; letter-spacing: 2px; text-align: center; margin: 0 0 32px; }
h3 { font-size: 18px; letter-spacing: 1px; margin: 40px 0 16px; color: var(--accent); }
ul.plain { list-style: none; padding: 0; }

/* ---------- Papers ---------- */
ul.papers { list-style: none; padding: 0; margin: 0; }
.paper { padding: 18px 0; border-bottom: 1px solid var(--line); }
.paper:last-child { border-bottom: 0; }
.paper-title { font-weight: 700; font-size: 19px; }
.paper-authors { color: var(--muted); }
.paper-journal { font-style: italic; }
.paper-note { color: var(--muted); font-style: italic; }
.paper-actions { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px; margin-top: 10px; }
.paper-actions details[open] { flex-basis: 100%; }
.btn, summary {
  display: inline-block;
  padding: 4px 12px;
  border: 1px solid var(--accent); border-radius: 3px;
  font-family: var(--sans); font-size: 12px; text-transform: uppercase; letter-spacing: 1px;
  color: var(--accent); background: transparent; cursor: pointer;
}
.btn:hover, summary:hover { background: var(--accent); color: var(--on-accent); }
summary { list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: " +"; }
details[open] summary::after { content: " \2212"; }
.abstract {
  margin: 10px 0 4px; padding: 14px 18px;
  background: var(--panel); border-left: 3px solid var(--accent);
  font-size: 16px; line-height: 1.55;
}

.footer {
  text-align: center; color: var(--muted);
  font-family: var(--sans); font-size: 13px;
  padding: 60px 16px 40px;
}

@media (max-width: 600px) {
  body { font-size: 17px; }
  .nav { padding: 10px 16px; }
  .nav-links { gap: 2px 14px; font-size: 12px; }
  h2 { font-size: 28px; }
  .section { padding-top: 110px; }
  .intro { padding-top: 130px; }
  .section.about { flex-direction: column; align-items: center; gap: 24px; padding-top: 36px; }
  .about-photo { flex-basis: auto; }
  .about-photo img, .photo-placeholder { width: 180px; height: 180px; }
  .intro-photo-name .intro-body { flex-direction: column; gap: 24px; text-align: center; }
  .photo-at-above { width: 160px; margin-bottom: 20px; }
  .photo-at-below { width: 160px; margin-top: 24px; }
  .photo-at-above img, .photo-at-above .photo-placeholder,
  .photo-at-below img, .photo-at-below .photo-placeholder { width: 160px; height: 160px; }
}
