:root {
  --ink: #223746;
  --text: #2f3b45;
  --muted: #5f6f7c;
  --primary: #2f5876;
  --primary-dark: #24465e;
  --primary-soft: #eef4f7;
  --line: #d8e2e8;
  --line-soft: #e5edf2;
  --panel: #f8fbfc;
  --panel-2: #f4f8fa;
  --shadow: rgba(40, 60, 80, 0.08);
  --nav-offset: 92px;
}

html {
  overflow-y: scroll;
  scroll-padding-top: var(--nav-offset);
}

h1[id],
h2[id],
h3[id],
.anchor {
  scroll-margin-top: 12px;
}

@media (max-width: 750px) {
  :root {
    --nav-offset: 210px;
  }
}

@media (max-width: 520px) {
  :root {
    --nav-offset: 235px;
  }
}

body {
  margin: 0;
  counter-reset: pubnum 66;
  color: var(--text);
  line-height: 1.65;
  background: #fff;
}

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

img {
  max-width: 100%;
  height: auto;
}

#main {
  padding-top: 0;
}

#main .container,
#nav .container.nav-inner {
  max-width: 980px;
  margin-left: auto;
  margin-right: auto;
}

a {
  color: var(--primary);
}

a:hover,
a:focus {
  color: var(--primary-dark);
}

h2[id],
h3[id],
.anchor {
  scroll-margin-top: 16px;
}

/* ---------- text wrapping ---------- */

.nav-brand a,
.nav-links a,
.hero-subtitle,
.hero-copy p,
.contact-line,
.interest-card h3,
.interest-card p,
.label,
.publication,
.dropdown-content,
.dropdown-content a {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* ---------- badges for prizes / cover ---------- */

.badge-cover,
.badge-prize,
.badge-invited,
.badge-minicourse {
  display: inline-block;
  padding: 3px 9px;
  margin: 2px 5px 2px 0;
  border-radius: 4px;
  font-size: 9pt;
  font-weight: 700;
  line-height: 1.4;
  vertical-align: middle;
  border: 1px solid;
  text-decoration: none;
  box-sizing: border-box;
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}

.badge-cover {
  color: #5e1d6f;
  background-color: #f0def6;
  border-color: #b48cc5;
}

.badge-prize {
  color: #7a5700;
  background-color: #fff0c9;
  border-color: #d0b56a;
}

.badge-invited {
  color: #1f4e73;
  background-color: #e3edf6;
  border-color: #9bb8d3;
}

.badge-minicourse {
  color: #1f5f4c;
  background-color: #e5f3ef;
  border-color: #9dcabf;
}

.badge-cover:hover,
.badge-prize:hover,
.badge-invited:hover,
.badge-minicourse:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.12);
}

.badge-cover::before,
.badge-prize::before,
.badge-invited::before,
.badge-minicourse::before {
  content: "★";
  margin-right: 4px;
}

/* ---------- button / link badge styles ---------- */

.label {
  display: inline-block;
  padding: 3px 9px;
  margin-right: 5px;
  margin-bottom: 3px;
  border-radius: 999px;
  font-size: 9pt;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
  border: 1px solid;
  vertical-align: middle;
  transition:
    background-color 0.18s ease,
    color 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.label:hover,
.label:focus {
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.10);
  transform: translateY(-1px);
}

.label::before {
  margin-right: 5px;
  font-weight: normal;
  font-size: 95%;
}

.label + .label {
  margin-left: 2px;
}

.arXivbtn {
  color: #9e2f2f;
  background-color: #f6e3e3;
  border-color: #b97a7a;
}

.arXivbtn::before {
  content: "𝒶";
}

.arXivbtn:hover,
.arXivbtn:focus {
  color: #7f2222;
  background-color: #f1d7d7;
  border-color: #9e2f2f;
}

.journalbtn {
  color: #234c68;
  background-color: #dfeaf2;
  border-color: #7ea2bb;
  font-weight: 700;
}

.journalbtn::before {
  content: "↗";
}

.journalbtn:hover,
.journalbtn:focus {
  color: #1d3e54;
  background-color: #d4e3ee;
  border-color: #628ea9;
}

.preprintbtn {
  color: #2f5d3a;
  background-color: #e7f4ea;
  border-color: #9fc7a7;
}

.preprintbtn::before {
  content: "📄";
}

.preprintbtn:hover,
.preprintbtn:focus {
  color: #244a2e;
  background-color: #dff0e3;
  border-color: #7fb58d;
}

/* ---------- navbar ---------- */



#nav.navbar {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid #d9e3ea;
  box-shadow: 0 2px 10px var(--shadow);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  width: 100%;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
}

.nav-brand a {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 14pt;
  font-weight: 500;
  color: var(--primary);
  text-decoration: none;
}

.nav-brand a:hover,
.nav-brand a:focus {
  color: var(--primary-dark);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
  flex-wrap: wrap;
}

.nav-links a {
  display: block;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 10pt;
  font-weight: 500;
  color: #35566f;
  text-decoration: none;
  transition: background 0.18s ease, color 0.18s ease;
}

.nav-links a:hover,
.nav-links a:focus {
  background: var(--primary-soft);
  color: #1f4158;
  text-decoration: none;
}

.nav-links li.active a {
  background: var(--primary);
  color: #fff;
  font-weight: 500;
}

.nav-links li.active a:hover,
.nav-links li.active a:focus {
  background: var(--primary);
  color: #fff;
  text-decoration: none;
}

.nav-icons {
  display: flex;
  gap: 12px;
}

.nav-icons a {
  font-size: 15px;
  color: #4f5f6d;
  text-decoration: none;
  padding: 6px;
  border-radius: 5px;
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-icons a:hover,
.nav-icons a:focus {
  background: var(--primary-soft);
  color: var(--primary);
  text-decoration: none;
}

/* ---------- home page ---------- */

.home-hero {
  margin-top: 0;
  margin-bottom: 42px;
  padding: 28px 24px 24px 24px;
  background: linear-gradient(to bottom, #f8fbfc 0%, #eef4f7 100%);
  border: 1px solid #d6e1e8;
  border-radius: 10px;
}

.home-hero::after {
  content: "";
  display: block;
  clear: both;
}

.hero-photo {
  float: left;
  margin: 4px 20px 12px 0;
}

.hero-photo img {
  display: block;
  width: 110px;
  max-width: 110px;
  border-radius: 8px;
  border: 1px solid #d7e1e8;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.hero-copy {
  min-height: 120px;
  padding-top: 4px;
}

.hero-header {
  margin: 0 0 10px 0;
}

.hero-header h1 {
  margin: 0 0 6px 0;
  font-size: 24pt;
  font-weight: 600;
  line-height: 1.15;
  color: var(--primary);
}

.hero-subtitle {
  margin: 0 0 14px 0;
  color: var(--muted);
  font-size: 11pt;
  line-height: 1.5;
}

.hero-copy p {
  margin: 0 0 14px 0;
}

.contact-line {
  margin-top: 8px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.hero-actions .label {
  margin-right: 0;
  margin-bottom: 0;
}

.home-section {
  clear: both;
  margin-bottom: 34px;
}

.home-section-header {
  margin-bottom: 18px;
  padding-left: 12px;
  border-left: 4px solid #b9c9d8;
}

.home-section-header h2 {
  margin: 0;
  font-size: 18pt;
  font-weight: 600;
  color: var(--primary);
}

.interest-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.interest-card {
  padding: 16px 18px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fbfcfd;
  transition: background-color 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.interest-card:hover {
  background-color: #f8fbfd;
  border-color: #dbe6ed;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.interest-card h3 {
  margin: 0 0 8px 0;
  font-size: 12pt;
  color: var(--ink);
}

.interest-card p {
  margin: 0;
  color: #4f5f6d;
}

.bio-panel {
  padding: 18px 20px;
  border: 1px solid #dde7ee;
  border-radius: 8px;
  background: #fbfcfd;
}

.bio-panel p {
  margin: 0 0 14px 0;
}

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

.footer-space {
  height: 40px;
}

/* ---------- publications page ---------- */

.page-intro {
  margin-top: 0;
  margin-bottom: 24px;
  padding: 18px 22px 15px 22px;
  background: linear-gradient(to bottom, #f7fafc 0%, #eef4f7 100%);
  border: 1px solid #d6e1e8;
  border-radius: 8px;
}

.page-intro h1 {
  margin: 0 0 6px 0;
  font-size: 22pt;
  font-weight: 500;
  letter-spacing: 0.2px;
  color: var(--primary);
}

.page-intro p {
  margin: 0;
  color: #4f5f6d;
  font-size: 10.5pt;
  line-height: 1.65;
}

.quick-links {
  margin-top: 14px;
}

.section-nav {
  margin-bottom: 28px;
  padding: 14px 18px 12px 18px;
  background: linear-gradient(to bottom, #fafcfd 0%, #f4f8fa 100%);
  border: 1px solid #dbe5eb;
  border-left: 4px solid #9fb8c9;
  border-radius: 8px;
}

.section-nav h3 {
  margin: 0 0 10px 0;
  font-size: 12pt;
  font-weight: 600;
  color: #3b5f7a;
}

.section-nav ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
  column-gap: 28px;
}

.section-nav li {
  margin: 0 0 6px 0;
}

.section-nav a {
  color: var(--primary);
  text-decoration: none;
}

.section-nav a:hover,
.section-nav a:focus {
  text-decoration: underline;
}

.section-heading {
  margin-top: 30px;
  margin-bottom: 14px;
  padding-left: 12px;
  border-left: 4px solid #b9c9d8;
}

.section-heading h2 {
  margin: 0 0 4px 0;
  font-size: 20pt;
  font-weight: 500;
  letter-spacing: 0.1px;
  color: var(--primary);
}

.section-subnote {
  margin-top: 0;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 10pt;
  line-height: 1.55;
}

.pub-list {
  list-style: none;
  padding-left: 0;
  margin-left: 0;
}

.publication {
  counter-increment: pubnum -1;
  position: relative;
  margin-bottom: 12px;
  padding: 10px 12px 10px 2.5em;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fbfcfd;
  line-height: 1.58;
  transition: background-color 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.publication:hover {
  background-color: #f8fbfd;
  border-color: #dbe6ed;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.publication::before {
  content: counter(pubnum) ".";
  position: absolute;
  left: 0;
  top: 10px;
  width: 2em;
  text-align: right;
  font-weight: 600;
  color: #556572;
}

.pub-list li:nth-child(odd) {
  background-color: rgba(59, 95, 122, 0.02);
}

.pub-list li:nth-child(even) {
  background-color: rgba(59, 95, 122, 0.045);
}

.publication em {
  color: #445764;
}

.paper-title {
  color: var(--ink);
  font-weight: 600;
}

#oart-section .publication {
  counter-increment: none;
}

#oart-section .publication::before {
  content: none;
}

.dropbtn {
  font-size: 10pt;
  font-weight: 500;
  cursor: pointer;
  border: none;
  background-color: transparent;
  color: #3b5f7a;
  padding: 2px 4px;
  border-radius: 4px;
  line-height: 1.4;
}

.dropbtn:hover,
.dropbtn:focus {
  background-color: var(--primary-soft);
  color: var(--primary-dark);
  outline: none;
}

details.abstract {
  display: inline-block;
  margin-left: 6px;
  vertical-align: middle;
}

details.abstract summary {
  display: inline-block;
  cursor: pointer;
  list-style: none;
  color: #3b5f7a;
  font-weight: 500;
}

details.abstract summary:hover,
details.abstract summary:focus {
  color: var(--primary-dark);
}

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

details.abstract summary::before {
  content: "▸";
  display: inline-block;
  margin-right: 4px;
  transition: transform 0.2s ease;
}

details.abstract[open] summary::before {
  transform: rotate(90deg);
}

details.abstract .dropdown-content {
  display: block;
  background-color: #f7fafc;
  border: 1px solid #dde7ee;
  border-left: 4px solid #b9c9d8;
  padding: 12px 15px;
  margin-top: 8px;
  margin-bottom: 6px;
  border-radius: 6px;
  line-height: 1.55;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.dropdown-content a {
  display: block;
  padding-top: 5pt;
  text-decoration: none;
  background-color: transparent;
}

.dropdown-content a:hover,
.dropdown-content a:focus {
  text-decoration: underline;
}

.show {
  display: block;
}



/* ---------- responsive ---------- */

@media (min-width: 768px) {
  .section-nav ul {
    columns: 2;
  }
}

@media (max-width: 800px) {
  .hero-photo {
    float: none;
    margin: 0 0 14px 0;
  }

  .hero-photo img {
    width: 96px;
    max-width: 96px;
  }

  .interest-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 750px) {
  :root {
    
  }

  #main .container,
  #nav .container.nav-inner {
    padding-left: 14px;
    padding-right: 14px;
  }

  .nav-inner {
    flex-direction: column;
    height: auto;
    padding: 8px 0;
  }

  .nav-links {
    margin-top: 6px;
    justify-content: center;
    gap: 10px;
  }

  .nav-icons {
    margin-top: 6px;
  }
}

@media (max-width: 520px) {
  :root {
    
  }

  #main .container,
  #nav .container.nav-inner {
    padding-left: 12px;
    padding-right: 12px;
  }

  .home-hero {
    padding: 24px 14px 20px 14px;
  }

  .interest-card,
  .bio-panel {
    padding-left: 14px;
    padding-right: 14px;
  }

  .hero-header h1 {
    font-size: 21pt;
  }

  .hero-photo {
    margin-right: 0;
  }

  .hero-photo img {
    width: 96px;
    max-width: 100%;
  }

  .nav-links {
    gap: 8px;
  }

  .nav-links a,
  .nav-brand a {
    padding: 7px 9px;
  }

  .publication {
    padding: 10px 10px 10px 2.15em;
  }

  .publication::before {
    width: 1.7em;
  }
}


#oart-section h3 {
  margin: 22px 0 8px 0;
  font-size: 13.5pt;
  font-weight: 600;
  color: #2f5876 !important;
}


/* ---------- talks page ---------- */

.talk-list,
.course-list,
.video-list {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.talk-list > li,
.course-list > li,
.video-list > li {
  list-style: none;
  margin-left: 0;
}

/* talks reusing publication cards */
.talk-list .publication {
  counter-increment: none;
  padding: 10px 12px;
}

.talk-list .publication::before {
  content: none;
  display: none;
}

/* shared card styling */
.talk,
.course,
.video-card,
.talk-list .publication {
  position: relative;
  margin-bottom: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fbfcfd;
  line-height: 1.58;
  transition: background-color 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.talk:hover,
.course:hover,
.video-card:hover,
.talk-list .publication:hover {
  background-color: #f8fbfd;
  border-color: #dbe6ed;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

/* alternating backgrounds for list cards */
.talk-list > li:nth-child(odd),
.course-list > li:nth-child(odd),
.video-list > li:nth-child(odd) {
  background-color: rgba(59, 95, 122, 0.02);
}

.talk-list > li:nth-child(even),
.course-list > li:nth-child(even),
.video-list > li:nth-child(even) {
  background-color: rgba(59, 95, 122, 0.045);
}

.talk-date,
.course-date {
  display: inline-block;
  margin: 0 0 4px 0;
  color: var(--muted);
  font-size: 10pt;
  font-weight: 600;
}

.talk-title,
.course-title {
  color: var(--ink);
  font-weight: 600;
  font-style: italic;
}

.talk-meta,
.course-meta {
  color: #4f5f6d;
}

.talk-links,
.course-links {
  margin-top: 6px;
}

/* videos */
.video-card {
  padding: 12px;
}

.video-card iframe {
  display: block;
  width: 100%;
  height: 315px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.video-caption {
  margin-top: 10px;
  color: #4f5f6d;
}

/* ---------- collapsible year groups ---------- */

.year-groups {
  margin-top: 6px;
}

.talk-year {
  margin-bottom: 14px;
  border: 1px solid #dbe5eb;
  border-radius: 8px;
  background: linear-gradient(to bottom, #fafcfd 0%, #f4f8fa 100%);
  overflow: hidden;
}

.talk-year summary {
  display: block;
  position: relative;
  padding: 12px 16px 12px 40px;
  cursor: pointer;
  font-size: 13pt;
  font-weight: 600;
  color: var(--primary);
  list-style: none;
  user-select: none;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.talk-year summary:hover,
.talk-year summary:focus {
  background: #eef4f7;
  color: var(--primary-dark);
  outline: none;
}

.talk-year summary::-webkit-details-marker {
  display: none;
}

.talk-year summary::before {
  content: "▸";
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  transition: transform 0.18s ease;
  color: #3b5f7a;
}

.talk-year[open] summary::before {
  transform: translateY(-50%) rotate(90deg);
}

/* spacing inside each year block */
.talk-year .talk-list {
  padding: 10px 12px 12px 12px;
  margin: 0;
}

.talk-year .talk-list > li:last-child {
  margin-bottom: 0;
}

/* optional count beside year title */
.year-count {
  color: var(--muted);
  font-weight: 500;
  font-size: 10pt;
  margin-left: 6px;
}

