/* latin-ext */
@font-face {
  font-family: 'Lato';
  font-style: italic;
  font-weight: 400;
  src: local('Lato Italic'), local('Lato-Italic'), url(https://fonts.gstatic.com/s/lato/v15/S6u8w4BMUTPHjxsAUi-qNiXg7eU0.woff2) format('woff2');
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Lato';
  font-style: italic;
  font-weight: 400;
  src: local('Lato Italic'), local('Lato-Italic'), url(https://fonts.gstatic.com/s/lato/v15/S6u8w4BMUTPHjxsAXC-qNiXg7Q.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Lato';
  font-style: italic;
  font-weight: 700;
  src: local('Lato Bold Italic'), local('Lato-BoldItalic'), url(https://fonts.gstatic.com/s/lato/v15/S6u_w4BMUTPHjxsI5wq_FQftx9897sxZ.woff2) format('woff2');
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Lato';
  font-style: italic;
  font-weight: 700;
  src: local('Lato Bold Italic'), local('Lato-BoldItalic'), url(https://fonts.gstatic.com/s/lato/v15/S6u_w4BMUTPHjxsI5wq_Gwftx9897g.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 400;
  src: local('Lato Regular'), local('Lato-Regular'), url(https://fonts.gstatic.com/s/lato/v15/S6uyw4BMUTPHjxAwXiWtFCfQ7A.woff2) format('woff2');
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 400;
  src: local('Lato Regular'), local('Lato-Regular'), url(https://fonts.gstatic.com/s/lato/v15/S6uyw4BMUTPHjx4wXiWtFCc.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 700;
  src: local('Lato Bold'), local('Lato-Bold'), url(https://fonts.gstatic.com/s/lato/v15/S6u9w4BMUTPHh6UVSwaPGQ3q5d0N7w.woff2) format('woff2');
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 700;
  src: local('Lato Bold'), local('Lato-Bold'), url(https://fonts.gstatic.com/s/lato/v15/S6u9w4BMUTPHh6UVSwiPGQ3q5d0.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Lato Black 900 — latin */
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 900;
  src: local('Lato Black'), local('Lato-Black'), url(https://fonts.gstatic.com/s/lato/v17/S6u9w4BMUTPHh50XSwaPGR_p.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

a {
  color: #1772d0;
  text-decoration: none;
}

a:focus,
a:hover {
  color: #f09228;
  text-decoration: none;
}

body,
td,
th,
tr,
p,
a {
  font-family: 'Lato', Verdana, Helvetica, sans-serif;
  font-size: 14px;
}

strong {
  font-family: 'Lato', Verdana, Helvetica, sans-serif;
  font-size: 14px;
}

h2 {
  margin: 0;
  font-weight: normal;
  font-family: 'Lato', Verdana, Helvetica, sans-serif;
  font-size: 22px;
}

.papertitle {
  font-family: 'Lato', Verdana, Helvetica, sans-serif;
  font-size: 14px;
  font-weight: 700;
}

.name {
  padding-top: 20px;
  margin: 0;
  font-family: 'Lato', Verdana, Helvetica, sans-serif;
  font-size: 32px;
}

.one {
  width: 160px;
  height: 160px;
  position: relative;
}

.two {
  width: 160px;
  height: 160px;
  position: absolute;
  transition: opacity .2s ease-in-out;
  -moz-transition: opacity .2s ease-in-out;
  -webkit-transition: opacity .2s ease-in-out;
}

.fade {
  transition: opacity .2s ease-in-out;
  -moz-transition: opacity .2s ease-in-out;
  -webkit-transition: opacity .2s ease-in-out;
}

span.highlight {
  background-color: #ffffd0;
}

.colored-box {
    color: black;
    padding: 20px;
    display: inline-block;
    border-radius: 10px;
}

.timeline {
  list-style: none;
  padding: 0 0 0 28px;
  margin: 12px 0 0 0;
  border-left: 2px solid #d0d7de;
  position: relative;
}

.timeline li {
  position: relative;
  padding: 0 0 20px 0;
}

.timeline li:last-child {
  padding-bottom: 0;
}

.timeline li::before {
  content: '';
  position: absolute;
  left: -34px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #58a6ff;
  background: #fff;
}

.timeline .date {
  font-weight: 700;
  font-size: 14px;
  color: #333;
  text-transform: lowercase;
}

.timeline .desc {
  font-size: 14px;
  color: #444;
  margin-top: 2px;
}

/* ── Publications section (ahalgh-style) ────────────────── */
.publications-section {
  width: 100%;
  max-width: 1000px;
  margin: 24px auto 32px;
  padding: 0 16px;
  box-sizing: border-box;
}

.section-divider {
  border: none;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  margin: 16px 0 24px;
}

.card-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* ── Paper tiles ──────────────────────────────────────────── */
.paper-tile {
  display: flex;
  gap: 24px;
  align-items: center;
  padding: 24px 28px;
  margin: 0 0 20px;
  background: #f6f7f9;
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.04);
  text-decoration: none;
  color: #333;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

a.paper-tile { cursor: pointer; }
a.paper-tile:hover { text-decoration: none; color: #333; }
.paper-tile:hover {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06), 0 8px 20px rgba(0, 0, 0, 0.06);
}

.paper-tile-image {
  flex-shrink: 0;
  width: 300px;
  height: 220px;
  padding: 10px 12px;
  box-sizing: border-box;
  overflow-x: auto;
  overflow-y: hidden;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.paper-tile-image::-webkit-scrollbar { display: none; }

.paper-tile-image img {
  height: 100%;
  width: auto;
  max-width: none;
  display: block;
}

.paper-tile-content {
  flex: 1;
  min-width: 0;
}

.paper-tile-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}

.paper-tile-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.02em;
  padding: 6px 11px;
  border: 1px solid rgba(0, 0, 0, 0.55);
  border-radius: 6px;
  color: rgba(0, 0, 0, 0.85);
  background: #ffffff;
  white-space: nowrap;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}

.paper-tile-highlight {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  padding: 6px 11px;
  border-radius: 6px;
  border: 1px solid #e0a800;
  background: #fff8e1;
  color: #8a6100;
  white-space: nowrap;
}

.paper-tile-highlight i {
  font-size: 12px;
  color: #8a6100;
}

.paper-tile-title {
  display: block;
  font-weight: 700;
  font-size: 20px;
  line-height: 1.3;
  margin-bottom: 10px;
  color: rgba(0, 0, 0, 0.88);
  text-decoration: none;
}

.paper-tile-title:hover,
.paper-tile:hover .paper-tile-title {
  color: #1772d0;
  text-decoration: none;
}

.paper-tile-summary {
  font-size: 14px;
  line-height: 1.55;
  color: #444;
  margin: 0;
}

.paper-tile-authors {
  font-size: 14px;
  line-height: 1.5;
  color: #444;
  margin: 8px 0 0;
}

@media screen and (max-width: 700px) {
  .paper-tile { flex-direction: column; gap: 12px; }
  .paper-tile-image { width: 100%; height: 180px; }
}

/* ── Shared tile actions ─────────────────────────────────── */
.tile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.tile-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: #ffffff;
  color: rgba(0, 0, 0, 0.78);
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.tile-action-btn:hover {
  border-color: rgba(0, 0, 0, 0.3);
  color: #1772d0;
  background: #ffffff;
  text-decoration: none;
}

.tile-action-btn i { font-size: 12px; }

.tile-bibtex-block {
  display: none;
  position: relative;
  margin-top: 10px;
  background: #f6f8fa;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
}

.tile-bibtex-block.is-open { display: block; }

.tile-bibtex-block pre {
  margin: 0;
  padding: 12px 14px;
  padding-right: 70px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.45;
  overflow-x: auto;
  white-space: pre;
  color: #333;
}

.tile-copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 11px;
  line-height: 1;
  padding: 4px 9px;
  border-radius: 4px;
  border: 1px solid #e0e0e0;
  background: #ffffff;
  color: #444;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.tile-copy-btn:hover {
  border-color: #1772d0;
  color: #1772d0;
}

/* ── Per-paper page ──────────────────────────────────────── */
.paper-page {
  padding: 28px 24px 64px;
  max-width: 800px;
  margin: 0 auto;
}

.paper-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #666;
  font-size: 14px;
  text-decoration: none;
  margin-bottom: 28px;
  transition: color 0.15s ease;
}

.paper-back-link:hover {
  color: #1772d0;
  text-decoration: none;
}

.paper-page-title {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.2;
  color: rgba(0, 0, 0, 0.9);
  letter-spacing: -0.015em;
  margin: 0 0 16px;
}

.paper-page-authors {
  font-size: 16px;
  line-height: 1.55;
  color: #333;
  margin: 0 0 6px;
}

.paper-tile-authors strong,
.paper-page-authors strong {
  font-weight: 900;
  color: #000;
}

.paper-page-venue {
  font-size: 15px;
  color: #666;
  margin: 0 0 20px;
}

.paper-page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.paper-page-image {
  margin: 28px 0 32px;
  padding: 20px 24px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: #ffffff;
}

.paper-page-image img {
  display: block;
  width: 100%;
  height: auto;
}

.paper-page-heading {
  font-size: 22px;
  font-weight: 700;
  color: rgba(0, 0, 0, 0.88);
  margin: 32px 0 14px;
  letter-spacing: -0.005em;
}

.paper-page-abstract {
  font-size: 16px;
  line-height: 1.65;
  color: #333;
  margin: 0;
}

.paper-page-bibtex {
  position: relative;
  background: #f6f8fa;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 8px;
}

.paper-page-bibtex pre {
  margin: 0;
  padding: 16px 18px;
  padding-right: 80px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.55;
  overflow-x: auto;
  white-space: pre;
  color: #333;
}

/* ── Scroll animations ──────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.animate-on-scroll { opacity: 0; }
.animate-on-scroll.is-visible { animation: fadeInUp 0.5s ease forwards; }
.animate-on-scroll.stagger-1.is-visible { animation-delay: 0.05s; }
.animate-on-scroll.stagger-2.is-visible { animation-delay: 0.10s; }
.animate-on-scroll.stagger-3.is-visible { animation-delay: 0.15s; }
.animate-on-scroll.stagger-4.is-visible { animation-delay: 0.20s; }

@media (prefers-reduced-motion: reduce) {
  .animate-on-scroll { opacity: 1; }
  .animate-on-scroll.is-visible { animation: none; }
}