@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&display=swap');

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 15.5px;
  line-height: 1.55;
  color: #1a1a1a;
  background: #fff;
  -webkit-font-smoothing: antialiased;
}

a {
  color: #C41230;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ── HEADER / NAV ── */
header {
  border-bottom: 1px solid #e8e8e8;
  padding: 1.1rem 0;
}

header .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  font-weight: 600;
  font-size: 1rem;
  color: #1a1a1a;
  letter-spacing: -0.01em;
}

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

nav a {
  font-size: 0.88rem;
  color: #555;
  margin-left: 2rem;
}

nav a:hover { color: #C41230; text-decoration: none; }
nav a.active { color: #C41230; font-weight: 500; }

/* ── MAIN ── */
main {
  padding: 2rem 0 3.5rem;
}

/* ── PROFILE (index) ── */
.profile {
  display: flex;
  gap: 2.5rem;
  align-items: stretch;
  margin-bottom: 2rem;
}

.profile-photo-wrap {
  flex-shrink: 0;
}

.profile-photo {
  width: 220px;
  height: 440px;
  display: block;
  border-radius: 6px;
  object-fit: cover;
  object-position: top;
  border: 1px solid #e8e8e8;
}

.profile-info h1 {
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.2rem;
}

.profile-info .position {
  font-size: 0.9rem;
  color: #444;
  margin-bottom: 0.05rem;
}

.profile-info .position-sub {
  font-size: 0.87rem;
  color: #888;
  margin-bottom: 1.1rem;
}

.profile-info p {
  font-size: 0.91rem;
  color: #333;
  margin-bottom: 0.85rem;
}

.bio-topics {
  list-style: none;
  margin: 0.3rem 0 0.85rem 0;
  padding: 0;
}

.bio-topics li {
  font-size: 0.88rem;
  color: #444;
  padding: 0.1rem 0 0.1rem 0.9rem;
  position: relative;
}

.bio-topics li::before {
  content: '·';
  position: absolute;
  left: 0;
  color: #C41230;
  font-weight: 700;
}

.bio-subtopics {
  list-style: none;
  margin: 0.1rem 0 0.2rem 0;
  padding: 0;
}

.bio-subtopics li {
  font-size: 0.78rem;
  color: #888;
  padding: 0 0 0 0.9rem;
  position: relative;
}

.bio-subtopics li::before {
  content: '–';
  position: absolute;
  left: 0;
  color: #ccc;
}

.bio-methods {
  font-size: 0.84rem;
  color: #666;
  margin-bottom: 0.85rem;
}

.bio-methods span {
  font-weight: 600;
  color: #444;
}


.profile-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1.1rem;
}

.profile-links a {
  font-size: 0.78rem;
  padding: 0.22rem 0.7rem;
  border: 1px solid #C41230;
  border-radius: 3px;
  color: #C41230;
  transition: background 0.15s, color 0.15s;
}

.profile-links a:hover {
  background: #C41230;
  color: #fff;
  text-decoration: none;
}

/* ── SECTIONS ── */
.section {
  margin-bottom: 2rem;
}

.section-title {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #C41230;
  margin-bottom: 1.2rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid #e8e8e8;
}

/* Research view toggle */
.research-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem 1.1rem; }

.view-toggle { display: inline-flex; flex-wrap: wrap; gap: 0.3rem; }
.view-toggle[hidden] { display: none; }

.view-toggle button {
  font: inherit;
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #999;
  background: none;
  border: 1px solid #e4e4e4;
  border-radius: 999px;
  padding: 0.12rem 0.6rem;
  cursor: pointer;
  transition: color 0.12s, border-color 0.12s;
}

.view-toggle button:hover { color: #C41230; border-color: #e8b8c0; }
.view-toggle button.active { color: #C41230; border-color: #C41230; }

/* By Topic / By Methodology: every row styled like a full paper line */
.alt-group + .alt-group { margin-top: 1.4rem; }
.alt-group:nth-child(odd) {
  background: #fbf7f5;
  border-radius: 4px;
  padding: 0.6rem 0.9rem 0.4rem;
  margin-left: -0.9rem;
  margin-right: -0.9rem;
}
.alt-group:nth-child(odd) .paper,
.alt-group:nth-child(odd) .paper-compact { border-bottom-color: #efe6e1; }
.alt-group .paper-compact {
  padding: 0.45rem 0;
  line-height: 1.55;
  border-bottom-color: #f2f2f2;
}
.alt-group .paper-compact .title { font-size: 0.9rem; }
.alt-tag { margin-left: 0.5rem; }

/* ── TIMELINE (profile) ── */
.timeline-list {
  list-style: none;
}

.timeline-list li {
  display: flex;
  gap: 1rem;
  font-size: 0.89rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid #f3f3f3;
}

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

.timeline-year {
  color: #bbb;
  font-size: 0.82rem;
  width: 54px;
  flex-shrink: 0;
  padding-top: 0.05rem;
}

/* ── NEWS ── */
.news-list {
  list-style: none;
}

.news-list li {
  display: flex;
  gap: 1.5rem;
  font-size: 0.89rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid #f3f3f3;
}

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

.news-year {
  color: #bbb;
  font-size: 0.82rem;
  min-width: 80px;
  padding-top: 0.08rem;
  flex-shrink: 0;
}

/* ── PAPERS ── */
.paper-group-label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #999;
  margin-bottom: 0.8rem;
  margin-top: 1.4rem;
}

.paper-group-label:first-child { margin-top: 0; }

.paper {
  font-size: 0.84rem;
  color: #666;
  line-height: 1.55;
  padding: 0.45rem 0;
  border-bottom: 1px solid #f2f2f2;
}

.paper:last-child,
.paper:has(+ .dropdown-sublabel) { border-bottom: none; }

.paper .title {
  display: inline;
  font-weight: 300;
  font-size: 0.9rem;
  color: #1a1a1a;
}

.paper .title::after {
  content: ' · ';
  color: #ccc;
}

.paper .authors {
  display: inline;
  font-size: 0.84rem;
  color: #666;
}

.paper .authors::after {
  content: ' · ';
  color: #ccc;
}

.paper .venue {
  display: inline;
  font-size: 0.84rem;
  color: #444;
}

.paper .venue em {
  font-weight: 600;
  font-style: italic;
}

.paper-links {
  display: inline;
  margin-left: 0.35rem;
}

.badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.1rem 0.45rem;
  border-radius: 2px;
  margin-right: 0.35rem;
  vertical-align: middle;
}

.badge-published   { background: #e8f5e9; color: #2e7d32; }
.badge-forthcoming { background: #fff3e0; color: #c45000; }
.badge-rr          { background: #fff3e0; color: #c45000; }
.badge-wip         { background: #f4f4f4; color: #777; font-weight: 400; }

.paper-links a {
  font-size: 0.79rem;
  color: #C41230;
  margin-right: 0.85rem;
}

/* ── PAPER EXPANDER ── */
.paper-expand {
  margin-top: 0.4rem;
}

.paper-expand > summary {
  font-size: 0.75rem;
  color: #aaa;
  cursor: pointer;
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.paper-expand > summary::-webkit-details-marker { display: none; }

.paper-expand > summary::before {
  content: '▸';
  font-size: 0.6rem;
  display: inline-block;
  transition: transform 0.15s;
}

.paper-expand[open] > summary::before { transform: rotate(90deg); }

.paper-expand > summary:hover { color: #C41230; }

.paper-expand-body {
  margin-top: 0.5rem;
  font-size: 0.82rem;
  color: #555;
  line-height: 1.6;
}

.paper-figure img {
  max-width: 100%;
  border: 1px solid #e8e8e8;
  border-radius: 4px;
  display: block;
}

.paper-figure figcaption {
  font-size: 0.76rem;
  color: #888;
  margin-top: 0.4rem;
  line-height: 1.5;
}

/* ── TEACHING ── */
.course {
  margin-bottom: 1.3rem;
  padding-bottom: 1.3rem;
  border-bottom: 1px solid #f3f3f3;
}

.course:last-child { border-bottom: none; }

.course-name {
  font-weight: 500;
  font-size: 0.92rem;
}

.course-meta {
  font-size: 0.85rem;
  color: #666;
}

.course-semesters {
  font-size: 0.82rem;
  color: #aaa;
}

/* ── STUDENTS ── */
.student {
  font-size: 0.9rem;
  padding: 0.42rem 0;
  border-bottom: 1px solid #f3f3f3;
  display: flex;
  gap: 0.5rem;
  align-items: baseline;
  flex-wrap: wrap;
}

.student:last-child { border-bottom: none; }

.student-name { font-weight: 500; }

.student-placement {
  color: #777;
  font-size: 0.84rem;
}

/* Dissertation committee — compact, less prominent */
.student-compact {
  font-size: 0.82rem;
  color: #999;
  line-height: 1.5;
  padding: 0.18rem 0;
  border-bottom: 1px solid #f5f5f5;
}

.student-compact:last-child { border-bottom: none; }

/* Work in progress — one line per paper */
.paper-compact {
  font-size: 0.84rem;
  color: #666;
  line-height: 1.5;
  padding: 0.3rem 0;
  border-bottom: 1px solid #f5f5f5;
}

.paper-compact:last-child { border-bottom: none; }
.paper-compact .title { color: #1a1a1a; font-weight: 300; }
.paper-compact a { color: #C41230; font-size: 0.79rem; }

/* ── AWARDS ── */
.award {
  font-size: 0.9rem;
  padding: 0.38rem 0;
  display: flex;
  gap: 1.5rem;
  border-bottom: 1px solid #f3f3f3;
  align-items: baseline;
}

.award:last-child { border-bottom: none; }
.award-year { color: #bbb; min-width: 36px; font-size: 0.82rem; flex-shrink: 0; }

/* ── SERVICE ── */
.service-list {
  list-style: none;
}

.service-list li {
  font-size: 0.9rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid #f3f3f3;
}

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

/* ── DROPDOWNS ── */
.dropdown-section {
  margin-top: 0;
}

.dropdown-section + .dropdown-section { margin-top: 1.4rem; }

/* Published — lightly tinted block */
.dropdown-tinted {
  background: #fbf7f5;
  border-radius: 4px;
  padding: 0.6rem 0.9rem 0.4rem;
  margin-left: -0.9rem;
  margin-right: -0.9rem;
}

.dropdown-tinted > summary:hover { background: #f3ece8; }
.dropdown-tinted .paper { border-bottom-color: #efe6e1; }

.dropdown-section > summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.5rem;
  margin-left: -0.5rem;
  border-radius: 3px;
  transition: background 0.12s;
}

.dropdown-section > summary:hover {
  background: #f5f5f5;
}

.dropdown-section > summary::-webkit-details-marker { display: none; }

.dropdown-section > summary::before {
  content: '▸';
  font-size: 0.7rem;
  color: #999;
  transition: transform 0.15s;
  display: inline-block;
}

.dropdown-section[open] > summary::before {
  transform: rotate(90deg);
  color: #C41230;
}

.dropdown-section > summary:hover::before {
  color: #C41230;
}

.dropdown-section > summary::after {
  content: none;
}

.dropdown-sublabel {
  margin-top: 0.9rem !important;
  margin-bottom: 0.4rem !important;
}

/* ── GRADUATE COURSE PAGE ── */
.teaching-course {
  margin-bottom: 0.7rem;
  padding: 0.65rem 0.85rem;
  background: #fafafa;
  border: 1px solid #efefef;
  border-left: 2px solid #e0e0e0;
  border-radius: 4px;
  transition: border-color 0.15s, background 0.15s;
}

.teaching-course:hover {
  border-left-color: #C41230;
  background: #fff8f8;
}

.teaching-course-title {
  font-size: 1rem;
  font-weight: 500;
  color: #1a1a1a;
}

.teaching-course-title a {
  color: #1a1a1a;
}

.teaching-course-title a:hover {
  color: #C41230;
  text-decoration: none;
}

.guest-lecture-list {
  list-style: none;
}

.guest-lecture-list li {
  display: flex;
  gap: 1.5rem;
  font-size: 0.85rem;
  color: #444;
  padding: 0.35rem 0;
  border-bottom: 1px solid #f3f3f3;
}

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

.teaching-variant {
  font-size: 0.78rem;
  color: #999;
  line-height: 1.7;
}

.course-variants {
  margin-bottom: 1.4rem;
  border-left: 2px solid #ececec;
  padding-left: 0.85rem;
}

.course-variant-item {
  margin-bottom: 0.5rem;
}

.course-variant-name {
  font-size: 0.9rem;
  font-weight: 500;
  color: #1a1a1a;
  display: block;
}

.course-variant-meta {
  font-size: 0.78rem;
  color: #888;
  display: block;
}

.course-desc {
  font-size: 0.9rem;
  color: #333;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.case-study {
  font-size: 0.82rem;
  color: #666;
  padding: 0.2rem 0;
  border-bottom: 1px solid #f3f3f3;
}

.case-study:last-of-type { border-bottom: none; }

.case-study a {
  color: #555;
  font-weight: 500;
}

.case-study a:hover {
  color: #C41230;
  text-decoration: none;
}

.case-study span {
  color: #999;
  font-size: 0.78rem;
  margin-left: 0.4rem;
}

.topic-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.35rem 2rem;
  margin-bottom: 0.5rem;
  font-size: 0.88rem;
  color: #444;
}

/* ── AI COURSE PAGE ── */
.ai-part-label {
  font-size: 1.15rem;
  font-weight: 600;
  color: #1a1a1a;
  margin-top: 2rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e8e8e8;
  letter-spacing: -0.01em;
}

.ai-topic {
  margin-bottom: 1.3rem;
}

.ai-topic-name {
  font-size: 1.0rem;
  font-weight: 500;
  color: #333;
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: wrap;
  line-height: 1.4;
}

.ai-readings {
  font-size: 0.76rem;
  color: #888;
  line-height: 1.6;
  margin-top: 0.1rem;
}

.ai-readings a {
  color: #666;
}

.ai-readings a:hover {
  color: #C41230;
  text-decoration: none;
}

.ai-readings em {
  font-style: italic;
}

.exercise-badge {
  font-size: 0.7rem;
  font-weight: 600;
  color: #C41230 !important;
  border: 1px solid #C41230;
  border-radius: 3px;
  padding: 0.12rem 0.55rem;
  white-space: nowrap;
  text-decoration: none !important;
  transition: background 0.15s, color 0.15s;
  line-height: 1;
}

.exercise-badge:hover {
  background: #C41230;
  color: #fff !important;
}

.ai-ack-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem 2rem;
  margin-top: 0.5rem;
}

.ai-ack-item {
  font-size: 0.84rem;
}

.ai-ack-item a {
  font-weight: 500;
  color: #1a1a1a;
}

.ai-ack-item span {
  display: block;
  font-size: 0.76rem;
  color: #888;
}

/* ── FOOTER ── */
footer {
  border-top: 1px solid #e8e8e8;
  padding: 1.5rem 0;
  text-align: center;
  font-size: 0.78rem;
  color: #ccc;
}

/* ── RESPONSIVE ── */
@media (max-width: 580px) {
  .profile { flex-direction: column; }
  .profile-photo { width: 115px; height: 115px; }
  nav a { margin-left: 1.1rem; }
}

/* AI and Business featured panel (teaching.html) */
.ai-panel {
  margin-bottom: 1.2rem;
  padding: 0.9rem 1.1rem 0.4rem;
  background: #fbf7f5;
  border: 1px solid #f1e6e2;
  border-left: 3px solid #C41230;
  border-radius: 4px;
}

.ai-panel-label {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #C41230;
  margin-bottom: 0.4rem;
}

.ai-course {
  padding: 0.7rem 0 0.8rem;
  border-top: 1px solid #efe3df;
}

.ai-panel-label + .ai-course { border-top: none; }

.ai-course summary {
  list-style: none;
  cursor: pointer;
}

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

.ai-course summary:hover .teaching-course-title { color: #C41230; }

.ai-course-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}

.ai-course-num {
  font-size: 0.82rem;
  font-weight: 400;
  color: #999;
}

.ai-more {
  flex-shrink: 0;
  font-size: 0.7rem;
  font-weight: 500;
  color: #C41230;
  background: #fff;
  border: 1px solid #e8b8c0;
  border-radius: 3px;
  padding: 0.1rem 0.55rem;
  transition: background 0.15s, color 0.15s;
}

.ai-more::after { content: " \25B8"; }

.ai-course[open] .ai-more::after { content: " \25BE"; }

.ai-course summary:hover .ai-more {
  background: #C41230;
  color: #fff;
}

.ai-course-pitch,
.ai-modules li {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ai-course-pitch {
  font-size: 0.84rem;
  color: #555;
  line-height: 1.55;
  margin-top: 0.2rem;
}

.ai-modules {
  margin: 0.45rem 0 0 1.2rem;
  font-size: 0.8rem;
  line-height: 1.7;
  color: #999;
}

.ai-module-name {
  color: #333;
  font-weight: 500;
}

.ai-module-name::after { content: " \2014"; color: #bbb; font-weight: 400; }
