/* ============================================================
   style.css — the look of the site. You normally don't need
   to touch this file. If you want to tweak colors, the accent
   color used for links is defined once, just below.
   ============================================================ */

:root {
  --text:       #1a1a1a;
  --muted:      #6b6b6b;
  --faint:      #9a9a9a;
  --accent:     #14509e;   /* link color */
  --rule:       #e6e6e6;   /* thin divider lines */
  --chip-bg:    #f4f4f2;
  --chip-hover: #e9e9e6;
  --bg:         #ffffff;
  color-scheme: light;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; font-size: 15px; }

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

.wrap {
  max-width: 56rem;   /* page width on computers; phones use the full screen */
  margin: 0 auto;
  padding: 2.2rem 1.4rem 3rem;
}

/* ---------- header / nav ---------- */

header.site {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 2.2rem;
}

.site-name {
  font-size: 1.15rem;
  font-weight: 650;
  letter-spacing: 0.01em;
}
.site-name a { color: var(--text); text-decoration: none; }

nav.site a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 1.1rem;
  font-size: 0.95rem;
}
nav.site a:first-child { margin-left: 0; }
nav.site a:hover,
nav.site a.active { color: var(--accent); }

/* ---------- general ---------- */

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

h1 {
  font-size: 1.65rem;
  line-height: 1.25;
  margin: 0 0 0.3rem;
  font-weight: 700;
}

h2 {
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 650;
  margin: 2.6rem 0 1rem;
}

.subtitle { color: var(--muted); margin: 0 0 1.6rem; }

/* ---------- homepage intro ---------- */

.intro { display: flex; gap: 2rem; align-items: flex-start; }
.intro-text { flex: 1; min-width: 0; }
.intro-text p { margin: 0 0 1em; }

.portrait {
  width: 158px;
  height: 158px;
  object-fit: cover;
  border-radius: 50%;
  flex-shrink: 0;
}

@media (max-width: 560px) {
  .intro { flex-direction: column-reverse; }
  .portrait { width: 128px; height: 128px; }
}

.quicklinks { margin: 0.4rem 0 0; font-size: 0.95rem; color: var(--faint); }
.quicklinks a { margin-right: 0.35rem; }
.quicklinks .sep { margin-right: 0.35rem; color: var(--rule); }

.interests { color: var(--muted); font-size: 0.97rem; }

/* ---------- news ---------- */

ul.news { list-style: none; padding: 0; margin: 0; }
ul.news li {
  display: flex;
  gap: 1rem;
  margin-bottom: 0.55rem;
}
ul.news .date {
  color: var(--faint);
  white-space: nowrap;
  min-width: 3.4rem;
  font-size: 0.93rem;
  padding-top: 0.08rem;
}

/* ---------- papers ---------- */

.paper { margin-bottom: 1.9rem; }
.paper .p-title {
  color: var(--text);
  font-weight: 650;
  font-size: 1.02rem;
  line-height: 1.4;
}

.paper .p-title-link { color: var(--text); }
.paper .p-title-link:hover { color: var(--accent); text-decoration: underline; }

.p-icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.3rem;
  height: 1.3rem;
  margin-left: 0.3rem;
  vertical-align: -0.25em;
  color: var(--faint);
  border-radius: 5px;
}
.p-icon-link svg { width: 13px; height: 13px; }
.p-icon-link:hover { color: var(--accent); background: var(--chip-bg); }

.paper .p-authors { color: var(--text); font-size: 0.97rem; margin-top: 0.1rem; }
.paper .p-venue { color: var(--muted); font-style: italic; font-size: 0.78rem; line-height: 1.3; margin-top: 0.2rem; }

.p-extra { margin-top: 0.35rem; font-size: 0.87rem; color: var(--faint); }
.p-extra a { color: var(--muted); }
.p-extra a:hover { color: var(--accent); }

.p-links { margin-top: 0.45rem; }
.p-links a.chip {
  display: inline-block;
  font-size: 0.83rem;
  padding: 0.13rem 0.6rem;
  margin: 0 0.4rem 0.3rem 0;
  background: var(--chip-bg);
  border-radius: 999px;
  color: var(--accent);
}
.p-links a.chip:hover { background: var(--chip-hover); text-decoration: none; }

details.abstract { margin-top: 0.35rem; font-size: 0.95rem; }
details.abstract summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 0.87rem;
  user-select: none;
}
details.abstract p { margin: 0.5rem 0 0; color: var(--muted); }

ul.codelist { padding-left: 1.2rem; margin: 0; }
ul.codelist li { margin-bottom: 0.45rem; }

/* clickable title that opens the abstract */
.paper .p-title-toggle { cursor: pointer; }
.paper .p-title-toggle:hover { color: var(--accent); }
.paper .p-title-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }

/* small "PDF" button after the title */
.paper a.p-pdf {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0 0.42rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  line-height: 1.55;
  vertical-align: 0.12em;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 4px;
  white-space: nowrap;
}
.paper a.p-pdf:hover { background: var(--accent); color: #fff; text-decoration: none; }

/* abstract revealed under the paper */
.paper .p-abstract {
  margin: 0.5rem 0 0.5rem;
  padding-left: 0.85rem;
  border-left: 2px solid var(--rule);
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

/* ---------- disclaimer ---------- */

.disclaimer {
  margin: 3.5rem 0 0;
  padding-top: 1.1rem;
  border-top: 1px solid var(--rule);
  color: var(--faint);
  font-size: 0.85rem;
  line-height: 1.5;
}

/* ---------- footer ---------- */

footer.site {
  margin-top: 3.5rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--rule);
  color: var(--faint);
  font-size: 0.9rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}
footer.site a { color: var(--muted); }

/* ---------- justified text (Blocksatz) ----------
   Running text is justified; hyphenation keeps word spacing even.
   Headings, paper titles and the menu stay left-aligned. */
.intro-text p,
.interests,
ul.news .text,
.paper .p-authors,
.paper .p-abstract,
.paper .p-venue,
.disclaimer {
  text-align: justify;
  -webkit-hyphens: auto;
  hyphens: auto;
}
.intro-text p.subtitle { text-align: left; }

/* on phones, short lines (news, interests) look gappy when justified */
@media (max-width: 560px) {
  ul.news .text,
  .interests { text-align: left; }
}

.news-intro { color: var(--muted); font-size: 0.95rem; margin: -0.4rem 0 0.9rem; }
