:root {
  --color-bg: #FAFAFA;
  --color-text: #1a1a1a;
  --color-muted: #555555;
  --color-accent: #4a6fa5;
  --color-border: #e0e0e0;

  --font-serif: 'Georgia', 'Times New Roman', serif;
  --font-sans: system-ui, -apple-system, 'Segoe UI', sans-serif;

  --measure: 680px;
  --space-section: 4rem;
}

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

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.7;
  margin: 0;
  padding: 0 1rem;
}

/* ── Header ── */

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

.header-bar {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.header-home {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: normal;
  color: var(--color-text);
  text-decoration: none;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.header-home:hover {
  color: var(--color-text);
}

.about-intro {
  display: flex;
  gap: 2.5rem;
  align-items: flex-start;
}

.about-photo-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.5rem;
  flex-shrink: 0;
}

.about-text {
  flex: 1;
}

.social-icons {
  display: flex;
  gap: 0.75rem;
}

.social-icons a {
  color: var(--color-muted);
  text-decoration: none;
  font-size: 1.6rem;
  line-height: 1;
}

.social-icons a:hover {
  color: var(--color-accent);
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0;
}

nav a {
  color: var(--color-text);
  text-decoration: none;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-right: 1.5rem;
}

nav a:hover,
nav a[aria-current="page"] {
  color: var(--color-accent);
}

/* ── Main content ── */

main {
  max-width: var(--measure);
  margin: 0 auto;
  padding-bottom: 4rem;
}

section {
  margin-top: var(--space-section);
}

section h2 {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: normal;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text);
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 0.4rem;
  margin-top: var(--space-section);
  margin-bottom: 1.5rem;
}

section h3 {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin: 1.75rem 0 1rem;
}

p {
  margin: 0 0 1rem;
}

.profile-photo {
  width: 200px;
  height: 200px;
  object-fit: cover;
  border-radius: 50%;
}

/* ── Links ── */

a {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

a:hover {
  text-decoration: none;
}

/* ── News slider ── */

.news-slider {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.news-slides {
  flex: 1;
  min-width: 0;
}

.news-slide {
  display: none;
}

.news-slide.active {
  display: block;
}

.news-month {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: 0.5rem;
}

.news-arrow {
  background: none;
  border: none;
  font-size: 1.2rem;
  color: var(--color-muted);
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  line-height: 1;
  flex-shrink: 0;
}

.news-arrow:hover {
  color: var(--color-accent);
}

/* ── Research topics ── */

.research-topic h3 {
  font-size: 1.0rem;
  margin-bottom: 0.75rem;
  margin-top: 2rem;
}

.research-topic-body {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.research-topic-body.reverse {
  flex-direction: row-reverse;
}

.research-topic-text {
  flex: 1;
  margin: 0;
}

.research-img {
  width: 260px;
  flex-shrink: 0;
  object-fit: contain;
}

.editors-suggestion {
  color: var(--color-accent);
  font-style: italic;
  font-size: 0.85em;
}

.research-pubs-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-muted);
  margin: 1.25rem 0 0.4rem;
}

.research-pubs {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
}

.research-topic {
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--color-border);
}

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

.research-pubs li {
  font-size: 0.88rem;
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

/* ── Publications ── */

.scholar-link {
  margin-bottom: 2rem;
  font-size: 0.85rem;
}

/* ── Publications & Talks ── */

ol, ul {
  padding-left: 1.25rem;
  margin: 0;
}

li {
  margin-bottom: 1.1rem;
  line-height: 1.6;
}

.pub-venue {
  display: block;
  color: var(--color-muted);
  font-size: 0.9rem;
}

.pub-links {
  font-size: 0.85rem;
}

.pub-links a {
  margin-right: 0.4rem;
}

/* ── CV table ── */

.cv-table {
  border-collapse: collapse;
  margin-bottom: 2rem;
  width: 100%;
}

.cv-table td {
  padding: 0.35rem 0;
  vertical-align: top;
  line-height: 1.5;
}

.cv-year {
  color: var(--color-muted);
  font-size: 0.9rem;
  width: 7rem;
  min-width: 7rem;
  padding-right: 1.5rem;
  white-space: nowrap;
}

/* ── CV download button ── */

.cv-download {
  display: inline-block;
  margin-top: 0.5rem;
  color: var(--color-accent);
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid var(--color-accent);
  padding: 0.45rem 1.1rem;
  text-decoration: none;
  border-radius: 2px;
  transition: background 0.15s, color 0.15s;
}

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

/* ── Miscellaneous slider ── */

.misc-photo {
  width: 100%;
  height: 420px;
  object-fit: cover;
  display: block;
  border-radius: 2px;
}

.misc-caption {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--color-muted);
}

#miscellaneous .news-slides {
  min-height: 350px;
}

/* ── Contact list ── */

.contact-list {
  list-style: none;
  padding: 0;
}

.contact-list li {
  margin-bottom: 0.4rem;
}

#contact a {
  color: var(--color-text);
  text-decoration: none;
}

#contact a:hover {
  color: var(--color-accent);
}

/* ── Footer ── */

footer {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 2rem 0 3rem;
  border-top: 1px solid var(--color-border);
  font-size: 0.85rem;
  color: var(--color-muted);
}

footer p {
  margin: 0;
}

/* ── Small screen adjustments ── */

@media (max-width: 600px) {
  header h1 {
    font-size: 1.4rem;
  }

  nav a {
    font-size: 0.75rem;
    margin-right: 1rem;
  }

  .header-left {
    flex-direction: column-reverse;
  }

  .about-intro {
    flex-direction: column;
    align-items: center;
  }

  .research-topic-body,
  .research-topic-body.reverse {
    flex-direction: column;
    align-items: center;
  }

  .research-img {
    width: 100% !important;
    max-width: 300px;
  }
}
