/* ---------- Base ---------- */
:root {
  color-scheme: light;
  --accent: #1565c0;
  --text: #222;
  --muted: #666;
  --border: #e3e6ea;
  --bg: #ffffff;
  --bg-alt: #f7f9fb;
  --max-width: 860px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

a { color: var(--accent); text-decoration: none; }
a:visited { color: var(--accent); }
a:hover { text-decoration: underline; }
a.muted-link, a.muted-link:visited { color: var(--muted); }

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.wrap { overflow-wrap: anywhere; }
.site-nav .wrap { overflow-wrap: normal; }

@media (max-width: 480px) {
  .wrap { padding-left: 1.25rem; padding-right: 1.25rem; }
}

/* ---------- Nav ---------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
}

.site-nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 3.5rem;
  max-width: 960px;
}

.site-nav .brand {
  font-weight: 600;
  color: var(--text);
}

.site-nav .brand:hover { text-decoration: none; }

.site-nav ul {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  color: var(--text);
  font-size: 0.95rem;
}

.site-nav a:hover { color: var(--accent); text-decoration: none; }

/* ---------- Hero / About ---------- */
.hero {
  padding-top: 3.5rem;
  padding-bottom: 2.5rem;
  text-align: center;
}

.hero img.avatar {
  width: 148px;
  height: 148px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--border);
  margin-bottom: 1.25rem;
}

.hero h1 {
  margin: 0 0 0.25rem;
  font-size: 1.9rem;
}

.hero .role {
  color: var(--muted);
  margin: 0 0 1.5rem;
  font-size: 1.05rem;
}

.hero .bio {
  text-align: left;
  max-width: 640px;
  margin: 0 auto;
  color: #333;
}

/* ---------- Sections ---------- */
section.block {
  padding-top: 2.5rem;
  padding-bottom: 2.5rem;
  border-top: 1px solid var(--border);
  scroll-margin-top: 3.5rem;
}

section.block h2 {
  font-size: 1.4rem;
  margin: 0 0 1.5rem;
  display: inline-block;
  padding-bottom: 0.4rem;
  border-bottom: 3px solid var(--accent);
}

/* ---------- Collapsible sections (Reports) ---------- */
details.collapsible summary {
  cursor: pointer;
  list-style: none;
}

details.collapsible summary::-webkit-details-marker {
  display: none;
}

details.collapsible summary h2 {
  position: relative;
  padding-right: 1.4rem;
}

details.collapsible summary h2::after {
  content: "\25B8";
  position: absolute;
  right: 0;
  top: 0.1rem;
  font-size: 1rem;
  color: var(--accent);
  transition: transform 0.15s ease;
}

details.collapsible[open] summary h2::after {
  transform: rotate(90deg);
}

details.collapsible summary:hover h2 {
  opacity: 0.75;
}

/* ---------- List items (talks / publications) ---------- */
.item-list { display: flex; flex-direction: column; gap: 1.1rem; }

.item {
  padding-left: 1rem;
  border-left: 3px solid var(--border);
}

.item .item-date,
.item .item-type {
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.item .item-title {
  margin: 0.15rem 0 0.15rem;
  font-weight: 600;
  font-size: 1.02rem;
}

.item .item-meta {
  color: var(--muted);
  font-size: 0.92rem;
}

.item .item-links a {
  font-size: 0.88rem;
  margin-right: 0.75rem;
}

/* ---------- Publication link badges ---------- */
.item-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.35rem;
}

.item .item-links a.badge {
  display: inline-block;
  padding: 0.28rem 0.7rem;
  margin: 0;
  border-radius: 4px;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #fff !important;
  text-decoration: none;
  line-height: 1.2;
  transition: opacity 0.15s ease;
  forced-color-adjust: none;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.item .item-links a.badge:hover {
  opacity: 0.8;
  text-decoration: none;
}

.badge-preprint { background-color: #4a8fe0 !important; }
.badge-article  { background-color: #1b3b6f !important; }
.badge-pdf      { background-color: #34495e !important; }
.badge-bibtex   { background-color: #6c757d !important; }
.badge-misc     { background-color: #6c757d !important; }
.badge-code     { background-color: #2e7d32 !important; }
.badge-poster   { background-color: #8b2635 !important; }
.badge-slides   { background-color: #d17a22 !important; }
.badge-video    { background-color: #a8890a !important; }
.badge-discussion { background-color: #b0b3b8 !important; }
.badge-rejoinder  { background-color: #90caf9 !important; }

/* ---------- Simple bullet list (Associate Editor) ---------- */
.plain-list {
  margin: 0;
  padding-left: 1.2rem;
  list-style: disc;
}

.plain-list li {
  margin-bottom: 0.55rem;
  line-height: 1.5;
  color: var(--text);
}

.plain-list li::marker {
  color: var(--accent);
}

.plain-list li:last-child {
  margin-bottom: 0;
}

/* ---------- CV / timeline ---------- */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 2px solid var(--border);
}

.timeline li {
  position: relative;
  padding: 0 0 1.1rem 1.25rem;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 0.35rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
}

.timeline .period {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
}

.cv-download {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--accent);
  border-radius: 4px;
  color: var(--accent);
  font-size: 0.9rem;
}

.cv-download:hover { background: var(--accent); color: #fff; text-decoration: none; }

/* ---------- Contact ---------- */
.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
}

/* ---------- Footer ---------- */
footer {
  text-align: center;
  padding: 2rem 0 3rem;
  color: var(--muted);
  font-size: 0.85rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .site-nav { position: static; }
  .site-nav .wrap {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: auto;
    padding-top: 0.7rem;
    padding-bottom: 0.7rem;
    gap: 0.35rem;
  }
  .site-nav ul {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.3rem 1rem;
  }
  .site-nav a { font-size: 0.85rem; white-space: nowrap; }
  section.block { scroll-margin-top: 0.5rem; }
  .hero h1 { font-size: 1.5rem; }
}

.scholar-link {
  margin: 0 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}

.scholar-link a {
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  text-decoration: none;
}

.scholar-link a .ai {
  font-size: 1.3rem;
}

.scholar-link a:hover {
  color: #444;
}

/* ---------- Contact addresses & maps ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 1.5rem;
}

.contact-address p {
  margin: 0 0 0.6rem;
}

.osm-map {
  width: 100%;
  height: 220px;
  border: 1px solid var(--border);
  border-radius: 4px;
}

.map-link {
  margin: 0.4rem 0 0 !important;
  font-size: 0.85rem;
}


/* Secretary contact links: gray instead of accent blue */
.bio a[href="mailto:christine.schneider@wias-berlin.de"],
.bio a[href="tel:+493020372574"],
.bio a[href="https://www.mathematik.hu-berlin.de/de/forschung/forschungsgebiete/stochastik/stoch-employees/marina-filatova"] {
  color: var(--muted);
}

.bio a[href="mailto:christine.schneider@wias-berlin.de"]:hover,
.bio a[href="tel:+493020372574"]:hover,
.bio a[href="https://www.mathematik.hu-berlin.de/de/forschung/forschungsgebiete/stochastik/stoch-employees/marina-filatova"]:hover {
  color: #444;
}
