/* ============================================================
   Jan Kaiser — shared stylesheet
   ============================================================ */

:root {
  --primary:    #1a4a7a;
  --accent:     #2e7ec8;
  --accent-light: #e8f2fb;
  --text:       #1c1c1e;
  --muted:      #6b7280;
  --border:     #e5e7eb;
  --bg:         #ffffff;
  --bg-alt:     #f8f9fa;
  --radius:     8px;
}

/* --- Base --- */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--bg);
  margin: 0;
  line-height: 1.65;
}

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

/* --- Navbar --- */
.navbar {
  background: var(--bg) !important;
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 1rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--primary) !important;
  letter-spacing: -0.01em;
}

.nav-link {
  color: var(--muted) !important;
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.4rem 0.75rem !important;
  border-radius: var(--radius);
  transition: color 0.15s, background 0.15s;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary) !important;
  background: var(--accent-light);
}

.nav-link.lang-link {
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  color: var(--muted) !important;
}

/* --- Hero (homepage) --- */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, #2a5fa8 100%);
  color: #fff;
  padding: 3.5rem 0 3rem;
}

.hero h1 {
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.3rem;
}

.hero .tagline {
  font-size: 1.05rem;
  opacity: 0.85;
  margin-bottom: 1.25rem;
  font-weight: 400;
}

.hero-photo {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid rgba(255,255,255,0.35);
  box-shadow: 0 4px 24px rgba(0,0,0,0.25);
}

.hero .social-icons a {
  color: rgba(255,255,255,0.8);
  font-size: 1.6rem;
  margin: 0 0.3rem;
  transition: color 0.15s, transform 0.15s;
  display: inline-block;
}

.hero .social-icons a:hover {
  color: #fff;
  transform: translateY(-2px);
  text-decoration: none;
}

.hero .email-link {
  font-size: 0.9rem;
  opacity: 0.8;
  display: inline-block;
  margin-bottom: 1rem;
  color: rgba(255,255,255,0.9);
}

/* --- Page title (inner pages) --- */
.page-title {
  padding: 2.5rem 0 1.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2.5rem;
}

.page-title h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--primary);
  margin: 0;
}

/* --- Section headings --- */
.section-heading {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary);
  margin: 2rem 0 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--accent-light);
}

/* --- About / Bio --- */
.bio-text {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text);
}

/* --- Education table --- */
.edu-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.edu-table tr {
  border-bottom: 1px solid var(--border);
}

.edu-table tr:last-child { border-bottom: none; }

.edu-table td {
  padding: 0.6rem 0.5rem;
  vertical-align: top;
}

.edu-table td:first-child { white-space: nowrap; font-weight: 600; }
.edu-table .edu-year { color: var(--muted); font-size: 0.85rem; white-space: nowrap; }

/* --- Publication list --- */
.pub-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
}

.pub-list li {
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.93rem;
  line-height: 1.6;
}

.pub-list li:last-child { border-bottom: none; }

.pub-list li a {
  color: var(--text);
}

.pub-list li a:hover { color: var(--accent); }

.badge-editor {
  display: inline-block;
  background: var(--accent-light);
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

/* --- Research cards --- */
.research-item {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}

.research-item:last-child { border-bottom: none; }

.research-item img {
  width: 220px;
  height: auto;
  border-radius: var(--radius);
  flex-shrink: 0;
  border: 1px solid var(--border);
  align-self: flex-start;
}

.research-item h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
}

.research-item p { font-size: 0.92rem; color: #374151; margin: 0 0 0.5rem; }

@media (max-width: 640px) {
  .research-item { flex-direction: column; }
  .research-item img { width: 100%; height: auto; }
  
  .hero h1 { font-size: 1.75rem; }
  .hero .tagline { font-size: 0.95rem; }
  
  /* Education table mobile responsive */
  .edu-table td { padding: 0.8rem 0.3rem; }
  .edu-table td:first-child { white-space: normal; word-break: break-word; }
  .edu-table .edu-year { white-space: normal; }
}

/* --- Blog cards --- */
.blog-card {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
}

.blog-card:last-child { border-bottom: none; }

.blog-card h2 { font-size: 1.2rem; font-weight: 600; margin-bottom: 0.25rem; }

.blog-date {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 0.6rem;
}

.blog-card p { font-size: 0.92rem; color: #374151; margin-bottom: 0.75rem; }

.btn-read-more {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  padding: 0.3rem 0;
  border-bottom: 2px solid var(--accent);
  transition: color 0.15s, border-color 0.15s;
}

.btn-read-more:hover { color: var(--primary); border-color: var(--primary); text-decoration: none; }

/* --- Footer --- */
footer {
  margin-top: 4rem;
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.82rem;
  color: var(--muted);
}

/* --- Blog post article --- */
.blog-post-header {
  padding: 2.5rem 0 1.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}

.blog-post-header h1 {
  font-size: 1.9rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--primary);
  margin-bottom: 0.4rem;
  line-height: 1.25;
}

.blog-post-header .blog-date {
  font-size: 0.88rem;
  color: var(--muted);
  margin: 0;
}

.blog-article {
  font-size: 1.02rem;
  line-height: 1.8;
  color: #1c1c1e;
  max-width: 720px;
}

.blog-article p { margin-bottom: 1.2em; }

.blog-article h1 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary);
  margin: 2rem 0 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.blog-article h1:first-of-type { border-top: none; padding-top: 0; }

.blog-article h2 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--primary);
  margin: 1.5rem 0 0.6rem;
}

.blog-article figure {
  margin: 1.5rem auto;
  text-align: center;
}

.blog-article figure img {
  max-width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.blog-article figcaption {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.4rem;
}

.blog-article pre {
  background: #f6f8fa;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  overflow-x: auto;
  font-size: 0.85rem;
  line-height: 1.6;
  margin: 1.2rem 0;
}

.blog-article code {
  font-size: 0.88em;
  background: #f0f4f8;
  padding: 0.1em 0.35em;
  border-radius: 3px;
}

.blog-article pre code {
  background: transparent;
  padding: 0;
  font-size: inherit;
}

/* References */
.blog-article #refs {
  font-size: 0.88rem;
  color: #4b5563;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
  margin-top: 1rem;
}

.blog-article .csl-entry {
  margin-bottom: 0.75rem;
  padding-left: 1.5rem;
  text-indent: -1.5rem;
}

.blog-back-link {
  display: inline-block;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.blog-back-link:hover { color: var(--accent); text-decoration: none; }

/* --- Utilities --- */
.container { max-width: 900px; }
