/* ── Reset & base ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --accent:  #F07E26;
  --dark:    #38425A;
  --text:    #2c2c2c;
  --muted:   #666;
  --border:  #ddd;
  --bg:      #fff;
  --max:     960px;
}

html { font-size: 16px; }

body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

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

/* ── Top navigation ─────────────────────────────────────────────────── */
nav {
  background: var(--dark);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.2rem;
  flex-wrap: wrap;
}

nav .site-name {
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 0.75rem 0;
  margin-right: 1.2rem;
  white-space: nowrap;
  text-decoration: none;
}
nav .site-name:hover { text-decoration: none; color: #fff; }

nav a.nav-link {
  color: #c8cdd8;
  font-size: 0.85rem;
  padding: 0.75rem 0.65rem;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
}
nav a.nav-link:hover,
nav a.nav-link.active {
  color: #fff;
  border-bottom-color: var(--accent);
  text-decoration: none;
}

/* ── Page wrapper ────────────────────────────────────────────────────── */
.wrapper {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 5rem;
}

/* ── Page header ────────────────────────────────────────────────────── */
.page-header {
  border-bottom: 2px solid var(--accent);
  padding-bottom: 0.5rem;
  margin-bottom: 2rem;
}
.page-header h1 {
  font-size: 1.5rem;
  color: var(--dark);
  font-weight: 700;
}

/* ── Profile block (index) ──────────────────────────────────────────── */
.profile {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  margin-bottom: 2.5rem;
}
.profile img {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 3px solid var(--accent);
}
.profile-info h1 {
  font-size: 1.5rem;
  color: var(--dark);
  font-weight: 700;
  line-height: 1.2;
}
.profile-info .title {
  color: var(--accent);
  font-size: 0.95rem;
  margin: 0.35rem 0 0.2rem;
}
.profile-info .affil {
  color: var(--muted);
  font-size: 0.87rem;
}
.icon-links {
  margin-top: 0.8rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}
.icon-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--accent);
  border-radius: 4px;
  color: var(--accent);
  transition: background 0.15s, color 0.15s;
}
.icon-links a:not(.btn-link) {
  width: 2rem;
  height: 2rem;
}
.icon-links a:hover { background: var(--accent); color: #fff; text-decoration: none; }
.icon-links a svg { width: 1.1rem; height: 1.1rem; fill: currentColor; }
.btn-link {
  display: inline-block;
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 0.18rem 0.65rem;
  border-radius: 3px;
  font-size: 0.8rem;
  font-weight: 600;
}
.btn-link:hover { background: var(--accent); color: #fff; text-decoration: none; }

/* ── Section headings ───────────────────────────────────────────────── */
h2.section {
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--dark);
  border-left: 3px solid var(--accent);
  padding-left: 0.6rem;
  margin: 2rem 0 0.9rem;
}

h3.bio-sub,
.bio-content h4 {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--dark);
  border-left: 3px solid var(--accent);
  padding-left: 0.6rem;
  margin: 1.4rem 0 0.4rem;
}
.bio-content p {
  font-size: 0.9rem;
  text-align: justify;
  margin-bottom: 0.6rem;
}

/* ── Generic entry list ─────────────────────────────────────────────── */
.entry-list { list-style: none; }
.entry-list li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}
.entry-list li:last-child { border-bottom: none; }
.entry-meta {
  color: var(--muted);
  font-size: 0.82rem;
  margin-top: 0.1rem;
}

.badge {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 0.7rem;
  padding: 0.08rem 0.4rem;
  border-radius: 3px;
  margin-left: 0.4rem;
  vertical-align: middle;
}
.badge.ongoing { background: #2a9d8f; }

/* ── Publications ───────────────────────────────────────────────────── */
.pub-year-header {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--dark);
  margin: 2.2rem 0 0.8rem;
  padding-bottom: 0.3rem;
  border-bottom: 2px solid var(--accent);
}

.pub-type-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  margin: 1.2rem 0 0.4rem;
}

.pub-entry {
  display: flex;
  gap: 1rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}
.pub-entry:last-child { border-bottom: none; }

.pub-content { flex: 1; min-width: 0; }
.pub-title { font-weight: 600; color: var(--dark); font-size: 0.9rem; line-height: 1.4; }
.pub-authors { color: var(--muted); font-size: 0.82rem; margin-top: 0.1rem; }
.pub-venue { font-style: italic; font-size: 0.82rem; color: var(--muted); }
.pub-links { margin-top: 0.25rem; font-size: 0.78rem; }
.pub-links a { margin-right: 0.6rem; }
.pub-me { font-weight: 700; color: var(--dark); }

/* Full/short switching — desktop shows full, mobile shows short */
.authors-short { display: none; }
.venue-short   { display: none; }


/* ── Talks ──────────────────────────────────────────────────────────── */
.talk-type-header {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 1.5rem 0 0.4rem;
}
.talk-entry {
  display: grid;
  grid-template-columns: 5rem 1fr;
  gap: 0 0.8rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
}
.talk-date { color: var(--muted); font-size: 0.8rem; padding-top: 0.12rem; }
.talk-title { font-weight: 600; color: var(--dark); }
.talk-venue { color: var(--muted); font-size: 0.82rem; }
.talk-links { font-size: 0.78rem; margin-top: 0.15rem; }
.talk-links a { margin-right: 0.6rem; }

/* ── Projects ───────────────────────────────────────────────────────── */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
  margin-top: 0.5rem;
}
.project-card {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1rem;
}
.project-card h3 { font-size: 0.92rem; color: var(--dark); margin-bottom: 0.25rem; }
.project-card .proj-meta { font-size: 0.78rem; color: var(--muted); }
.project-card p { font-size: 0.84rem; margin-top: 0.35rem; }

/* ── Students ───────────────────────────────────────────────────────── */
.student-list { list-style: none; }
.student-item {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}
.student-item:last-child { border-bottom: none; }
.student-photo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--border);
}
.student-photo--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--border);
  color: var(--muted);
  font-size: 1.1rem;
  font-weight: 700;
}
.student-info { flex: 1; min-width: 0; padding-top: 0.1rem; }

/* ── Inline list (area chairs, workshops, etc.) ─────────────────────── */
p.inline-list {
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.7;
}

/* ── Footer ─────────────────────────────────────────────────────────── */
.page-footer {
  margin-top: 3rem;
  font-size: 0.76rem;
  color: #aaa;
}

/* ── Responsive ─────────────────────────────────────────────────────── */
@media (max-width: 650px) {
  .nav-inner { gap: 0; padding: 0 0.8rem; }
  nav a.nav-link { padding: 0.65rem 0.4rem; font-size: 0.8rem; }
  .wrapper { padding: 1.5rem 1rem 3rem; }
  .profile { flex-direction: column; align-items: center; text-align: center; }
  .profile-info .contact { justify-content: center; }
  .talk-entry { grid-template-columns: 1fr; }
  .talk-date { display: inline; margin-right: 0.5rem; }
  /* Mobile publications: switch to short names/venues and inline layout */
  .authors-full { display: none; }
  .authors-short { display: inline; }
  .venue-full   { display: none; }
  .venue-short  { display: inline; }

  .pub-content { font-size: 0.82rem; }
  .pub-title   { display: inline; font-weight: 600; }
  .pub-title::after { content: " · "; color: var(--muted); font-weight: 400; }
  .pub-authors { display: inline; }
  .pub-authors::after { content: " · "; color: var(--muted); }
  .pub-venue   { display: inline; font-style: italic; }
  .pub-links   { display: block; margin-top: 0.3rem; }
}
