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

:root {
  --accent: #1a6b9a;
  --accent-light: #e8f3fa;
  --text: #1c1c1c;
  --text-muted: #555;
  --border: #e2e2e2;
  --bg: #fff;
  --sidebar-w: 220px;
  --max-w: 1200px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  color: var(--text);
  background: var(--bg);
  font-size: 15.5px;
  line-height: 1.75;
}

/* ── Top nav ── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 1rem;
  height: 52px;
  gap: 0.75rem;
  justify-content: center;
}

nav .brand {
  font-family: 'Lora', serif;
  font-weight: 500;
  font-size: 1rem;
  color: var(--text);
  text-decoration: none;
  position: absolute;
  left: max(3rem, calc((100% - 1200px) / 2 + 3rem));

}

nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.15s;
}

nav a:hover, nav a.active { color: var(--accent); }

nav .hamburger {
  display: none;
}

nav .links {
  display: flex;
  gap: 2rem;
}

/* ── Page layout ── */
.page {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 3rem 3rem 6rem;
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  gap: 4rem;
  align-items: start;
}

/* ── Sidebar ── */
.sidebar {
  position: sticky;
  top: 72px;
}

.avatar {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  margin-bottom: 1rem;
}

.avatar-placeholder {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: linear-gradient(135deg, #c8dde8, #a0bfcf);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Lora', serif;
  font-size: 2rem;
  color: #1a6b9a;
  margin-bottom: 1rem;
}

.sidebar h2 {
  font-family: 'Lora', serif;
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 0.2rem;
}

.sidebar .role {
  font-size: 0.83rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 1.2rem;
}

.sidebar .role a {
  color: var(--accent);
  text-decoration: none;
}

.sidebar .role a:hover { text-decoration: underline; }

.sidebar-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.sidebar-links li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.sidebar-links li a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
}

.sidebar-links li a:hover { color: var(--accent); }

.sidebar-links .icon {
  width: 16px;
  text-align: center;
  flex-shrink: 0;
}

/* ── Main content shared ── */
.main h1 {
  font-family: 'Lora', serif;
  font-size: 2rem;
  font-weight: 400;
  margin-bottom: 1.2rem;
  letter-spacing: -0.01em;
}

.section-title {
  font-family: 'Lora', serif;
  font-size: 1.25rem;
  font-weight: 500;
  margin-bottom: 1.2rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.main p {
  color: #2c2c2c;
  margin-bottom: 0.9rem;
}

.main p:last-child { margin-bottom: 0; }

a.text-link {
  color: var(--accent);
  text-decoration: none;
}

a.text-link:hover { text-decoration: underline; }

.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.2rem;
}

.quick-links a {
  display: inline-block;
  padding: 0.3rem 0.85rem;
  border: 1px solid var(--accent);
  border-radius: 4px;
  font-size: 0.85rem;
  color: var(--accent);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.quick-links a:hover {
  background: var(--accent);
  color: #fff;
}

/* ── Publications ── */
.pub-year-group { margin-bottom: 2.5rem; }

.pub-year {
  font-size: 0.78rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.pub-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.pub-item {
  padding-left: 1.1rem;
  border-left: 2px solid var(--border);
  transition: border-color 0.2s;
}

.pub-item:hover { border-color: var(--accent); }

.pub-title {
  font-weight: 500;
  font-size: 0.97rem;
  color: var(--text);
  margin-bottom: 0.2rem;
  line-height: 1.5;
}

.pub-authors {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.15rem;
}

.pub-venue {
  font-size: 0.83rem;
  color: var(--text-muted);
  font-style: italic;
}

.pub-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.pub-links a {
  font-size: 0.8rem;
  color: var(--accent);
  text-decoration: none;
  background: var(--accent-light);
  padding: 0.15rem 0.6rem;
  border-radius: 3px;
  transition: background 0.15s;
}

.pub-links a:hover { background: #cce4f4; }

/* ── Talks ── */
.talk-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.talk-item {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 0 1.2rem;
  align-items: start;
}

.talk-date {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  padding-top: 3px;
}

.talk-title {
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 0.15rem;
  line-height: 1.5;
}

.talk-venue {
  font-size: 0.84rem;
  color: var(--text-muted);
}

.talk-links {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.4rem;
}

.talk-links a {
  font-size: 0.8rem;
  color: var(--accent);
  text-decoration: none;
  background: var(--accent-light);
  padding: 0.1rem 0.5rem;
  border-radius: 3px;
}

.talk-links a:hover { background: #cce4f4; }

.coming-soon {
  position: relative;
  font-size: 0.8rem;
  color: #aaa;
  background: #f0f0f0;
  padding: 0.15rem 0.6rem;
  border-radius: 3px;
  cursor: default;
}

.coming-soon::after {
  content: "Coming soon";
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: #333;
  color: #fff;
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
}

.coming-soon:hover::after {
  opacity: 1;
}

/* ── News ── */
.news-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.news-item {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 0 1.2rem;
  font-size: 0.92rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.news-item:last-child { border-bottom: none; padding-bottom: 0; }

.news-date {
  color: var(--text-muted);
  font-size: 0.8rem;
  padding-top: 3px;
  font-variant-numeric: tabular-nums;
}

.news-text { color: #2c2c2c; }

/* ── About page news preview ── */
.news-preview { margin-top: 0; }

.see-all {
  display: inline-block;
  margin-top: 1.2rem;
  font-size: 0.85rem;
  color: var(--accent);
  text-decoration: none;
}

.see-all:hover { text-decoration: underline; }

.poster-list {
      list-style: none;
      display: flex;
      flex-direction: column;
      gap: 1.8rem;
    }

    .poster-item {
      display: grid;
      grid-template-columns: 110px 1fr;
      gap: 0 1.4rem;
      align-items: start;
    }

    .poster-thumb {
      width: 110px;
      height: 155px;
      object-fit: cover;
      object-position: top;
      border: 1px solid var(--border);
      border-radius: 4px;
      display: block;
      background: #f0f4f7;
    }

    /* Placeholder if no image yet */
    .poster-thumb-placeholder {
      width: 110px;
      height: 155px;
      border: 1px solid var(--border);
      border-radius: 4px;
      background: linear-gradient(160deg, #e8f3fa, #d0e6f2);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 2rem;
      flex-shrink: 0;
    }

    .poster-meta { padding-top: 2px; }

    .poster-title {
      font-size: 0.95rem;
      font-weight: 500;
      margin-bottom: 0.2rem;
      line-height: 1.5;
    }

    .poster-authors {
      font-size: 0.85rem;
      color: var(--text-muted);
      margin-bottom: 0.15rem;
    }

    .poster-venue {
      font-size: 0.83rem;
      color: var(--text-muted);
      font-style: italic;
      margin-bottom: 0.5rem;
    }

    .poster-links {
      display: flex;
      flex-wrap: wrap;
      gap: 0.5rem;
    }

    .poster-links a {
      font-size: 0.8rem;
      color: var(--accent);
      text-decoration: none;
      background: var(--accent-light);
      padding: 0.15rem 0.6rem;
      border-radius: 3px;
      transition: background 0.15s;
    }

    .poster-links a:hover { background: #cce4f4; }


/* ── Footer ── */
footer {
  text-align: center;
  font-size: 0.78rem;
  color: #aaa;
  padding: 2rem 3rem;
  border-top: 1px solid var(--border);
}

@media (max-width: 760px) {
  .page {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 2rem 1.5rem 4rem;
  }

  .sidebar {
    position: static;
    display: grid;
    grid-template-columns: 140px 1fr;
    grid-template-rows: auto auto auto auto;
    column-gap: 1.2rem;
    align-items: start;
  }

  .avatar, .avatar-placeholder {
    grid-column: 1;
    grid-row: 1;
  }

  .sidebar h2 {
    grid-column: 1;
    grid-row: 2;
    margin-top: 0.6rem;
  }

  .sidebar .role {
    grid-column: 1;
    grid-row: 3;
    margin-bottom: 0;
  }

  .sidebar-links {
      grid-column: 2;
      grid-row: 1 / 4;
    }
    nav {
      padding: 0 1.5rem;
      height: 52px;
      justify-content: space-between;
    }

    nav .brand {
      position: static;
    }

    nav .hamburger {
      display: flex;
      flex-direction: column;
      gap: 5px;
      cursor: pointer;
      padding: 4px;
      background: none;
      border: none;
    }

    nav .hamburger span {
      display: block;
      width: 22px;
      height: 2px;
      background: var(--text);
      border-radius: 2px;
    }

    nav .links {
      display: none;
      flex-direction: column;
      position: absolute;
      top: 52px;
      left: 0;
      right: 0;
      background: white;
      border-bottom: 1px solid var(--border);
      padding: 0.75rem 1.5rem 1rem;
      gap: 0.75rem;
      z-index: 99;
    }

    nav .links.open {
      display: flex;
    }
  footer { padding: 2rem 1.5rem; }
}
