/* MIST Publications - public pages, same look as the landing page */
:root {
  --navy: #1e3a5f;
  --navy-dark: #142c4f;
  --navy-2: #2d5a8c;
  --accent: #2563eb;
  --muted: #64748b;
  --ink: #1f2937;
  --border: #dfe4ec;
  --surface: #ffffff;
  --page: #f3f5f8;
}

body {
  background: var(--page);
  color: var(--ink);
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  margin: 0;
}

/* Header band */
.site-header {
  background: #1e3a5f;
  color: #fff;
  padding: 14px 24px;
}
.site-header .brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.15rem;
}
.site-header .brand img { height: 44px; width: auto; }
.site-header .top-links a {
  color: #cbd5e1;
  text-decoration: none;
  padding: 6px 10px;
  font-weight: 500;
}
.site-header .top-links a:hover { color: #fff; }
.site-header .btn-outline-light { border-radius: 8px; }
.site-header .dropdown-menu { border-radius: 10px; }
.site-header .search-form { min-width: 280px; }
.site-header .search-form .form-control { border: 0; border-radius: 10px 0 0 10px; }
.site-header .search-form .btn { border-radius: 0 10px 10px 0; padding-left: 18px; padding-right: 18px; }

/* Layout: content on the left, year list on the right */
.layout { display: flex; align-items: stretch; min-height: calc(100vh - 170px); }
.content { flex: 1 1 0; min-width: 0; padding: 24px; }
.side {
  flex: 0 0 200px;
  background: #fff;
  border-left: 1px solid var(--border);
  padding: 12px 0 24px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.side-title {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  padding: 6px 18px 10px;
}
.side-link {
  display: block;
  padding: 9px 18px;
  margin: 1px 8px;
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
  font-size: .95rem;
  font-weight: 500;
}
.side-link:hover { background: #eef4ff; color: var(--accent); }
.side-link.active { background: var(--accent); color: #fff; }
.side::-webkit-scrollbar { width: 6px; }
.side::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 6px; }

/* Page heading and cards */
.page-title { font-size: 1.4rem; font-weight: 700; color: var(--navy); margin: 0 0 4px; }
.page-meta { color: var(--muted); font-size: .9rem; margin-bottom: 16px; }
.card-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 20px;
}
.card-box .card-head {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  color: var(--navy);
}

/* Tables */
.pub-table { width: 100%; margin: 0; border-collapse: collapse; }
.pub-table thead th {
  background: #f8fafc;
  color: var(--muted);
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
.pub-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #eef2f7;
  vertical-align: top;
  overflow-wrap: anywhere;
}
.pub-table tbody tr:hover td { background: #f1f6fd; }
.pub-table a { color: var(--ink); text-decoration: none; }
.pub-table a:hover { color: var(--accent); }
.pub-table a.ext { color: var(--accent); font-weight: 500; }

.detail-table th {
  width: 180px;
  color: var(--muted);
  font-weight: 600;
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.detail-table td, .detail-table th { padding: 12px 18px; border-bottom: 1px solid #eef2f7; text-align: left; vertical-align: top; }
.detail-table a { color: var(--accent); }

/* Pagination pills */
.pager { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 16px 0 0; }
.pager a {
  display: inline-block;
  min-width: 36px;
  text-align: center;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  font-size: .9rem;
}
.pager a:hover { border-color: var(--accent); color: var(--accent); }
.pager a.current { background: var(--accent); border-color: var(--accent); color: #fff; }

.empty { color: var(--muted); padding: 24px 18px; }

/* Footer */
.site-footer {
  background: #fff;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: .85rem;
  padding: 14px 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

/* Narrow screens: year list goes below the content */
@media (max-width: 900px) {
  .layout { flex-direction: column; }
  .side {
    flex: none;
    width: 100%;
    height: auto;
    position: static;
    border-left: 0;
    border-top: 1px solid var(--border);
  }
  .site-header .search-form { min-width: 0; width: 100%; }
  .detail-table th { width: 120px; }
}

/* Keep short columns on one line */
.pub-table th:nth-child(3), .pub-table td:nth-child(3),
.pub-table th:last-child, .pub-table td:last-child {
  white-space: nowrap;
  width: 1%;
}

/* Publication rows */
.pub-table tbody tr:nth-child(even) td { background: #fbfcfe; }
.pub-table tbody tr:hover td { background: #eef5ff; }
.pub-table td { padding: 16px 16px; }
.pub-table .authors { font-size: .88rem; color: #475569; line-height: 1.45; display: block; }
.pub-table .pub-title {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.4;
  text-decoration: none;
}
.pub-table .pub-title:hover { color: var(--accent); text-decoration: underline; }
.pub-table .journal { font-size: .82rem; color: var(--muted); font-style: italic; margin-top: 4px; }
.type-pill {
  display: inline-block;
  font-size: .78rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: #e8f0fe;
  color: var(--accent);
  white-space: nowrap;
}
.scopus-btn {
  display: inline-block;
  font-size: .8rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--accent);
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
}
.scopus-btn:hover { background: var(--accent); color: #fff; }

/* ===== Premium polish ===== */
body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv11", "ss01";
}

/* Header: sticky, soft blur, gentle shadow */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(20, 44, 79, .94);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  box-shadow: 0 1px 0 rgba(255,255,255,.06), 0 8px 24px -12px rgba(15, 23, 42, .45);
  padding: 12px 24px;
}
.site-header .brand span { letter-spacing: -.01em; }
.site-header .top-links a { border-radius: 8px; transition: background .15s, color .15s; }
.site-header .top-links a:hover { background: rgba(255,255,255,.08); }
.site-header .btn-outline-light { border-color: rgba(255,255,255,.35); transition: all .15s; }
.site-header .btn-outline-light:hover { background: rgba(255,255,255,.12); border-color: #fff; }
.site-header .search-form .form-control {
  background: rgba(255,255,255,.96);
  box-shadow: inset 0 1px 2px rgba(15,23,42,.08);
  font-size: .92rem;
}
.site-header .search-form .form-control:focus { box-shadow: 0 0 0 3px rgba(96,165,250,.45); }
.site-header .search-form .btn {
  background: #2563eb;
  border: 0;
  font-weight: 600;
  box-shadow: 0 4px 12px -4px rgba(37, 99, 235, .6);
  transition: transform .15s, box-shadow .15s;
}
.site-header .search-form .btn:hover { transform: translateY(-1px); box-shadow: 0 8px 18px -6px rgba(37, 99, 235, .7); }

/* Side list: accent bar on the selected year */
.side { background: #1e3a5f; }
.side-title { color: #475569; letter-spacing: .1em; }
.side-link {
  position: relative;
  transition: background .15s, color .15s, padding-left .15s;
  font-variant-numeric: tabular-nums;
}
.side-link:hover { padding-left: 22px; }
.side-link.active { box-shadow: 0 6px 16px -8px rgba(37, 99, 235, .7); }
.side-link.active::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 3px;
  background: #1e3a8a;
}

/* Page heading with eyebrow */
.content { padding: 32px 36px; }
.eyebrow {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}
.page-title { font-size: 1.75rem; letter-spacing: -.02em; line-height: 1.2; }
.page-meta { font-size: .92rem; }
.count-pill {
  display: inline-block;
  margin-left: 10px;
  vertical-align: middle;
  font-size: .8rem;
  font-weight: 600;
  color: var(--navy);
  background: #e8efff;
  border-radius: 999px;
  padding: 4px 12px;
}

/* Cards: layered soft shadow */
.card-box {
  border: 1px solid rgba(15, 23, 42, .06);
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(15,23,42,.04), 0 12px 32px -18px rgba(15,23,42,.18);
}

/* Table */
.pub-table thead th {
  position: sticky;
  top: 0;
  background: #f7f9fc;
  backdrop-filter: blur(6px);
  z-index: 1;
  font-size: .72rem;
}
.pub-table td { transition: background .15s; }
.pub-table tbody tr:last-child td { border-bottom: 0; }
.pub-table .pub-title { font-size: 1.02rem; letter-spacing: -.005em; }
.pub-table .authors { font-size: .86rem; }
.type-pill {
  letter-spacing: .01em;
  box-shadow: inset 0 0 0 1px rgba(37,99,235,.12);
}
.scopus-btn { transition: all .15s; }
.scopus-btn:hover { box-shadow: 0 6px 14px -6px rgba(37,99,235,.6); transform: translateY(-1px); }

/* Pager */
.pager a { transition: all .15s; box-shadow: 0 1px 2px rgba(15,23,42,.04); }
.pager a.current { box-shadow: 0 6px 14px -6px rgba(37,99,235,.7); }

/* Detail table */
.detail-table tr:hover td { background: #f8fbff; }

/* Footer */
.site-footer { background: rgba(255,255,255,.7); backdrop-filter: blur(6px); }

/* Scrollbars */
.side::-webkit-scrollbar { width: 8px; }
.side::-webkit-scrollbar-thumb { background: #dbe2ec; border-radius: 8px; border: 2px solid transparent; background-clip: content-box; }

@media (max-width: 900px) {
  .content { padding: 22px 16px; }
  .site-header { position: relative; }
}

/* ===== Year list: every item the same size in every state ===== */
.side-link,
.side-link:hover,
.side-link.active {
  box-sizing: border-box;
  display: block;
  width: calc(100% - 16px);
  padding: 9px 18px;
  margin: 1px 8px;
  border: 0;
  border-radius: 8px;
  font-size: .95rem;
  font-weight: 500;
  line-height: 1.4;
  padding-left: 18px;
  box-shadow: none;
}
.side-link:hover { padding-left: 18px; }
.side-link.active {
  font-weight: 600;
  box-shadow: inset 3px 0 0 #1e3a8a;
}
.side-link.active::before { content: none; }

/* ===== Year list, final: hover changes colour only, nothing moves ===== */
.side .side-link {
  display: block;
  box-sizing: border-box;
  margin: 1px 8px;
  padding: 9px 18px;
  border-radius: 8px;
  color: var(--ink);
  background: transparent;
  font-size: .95rem;
  font-weight: 500;
  line-height: 1.4;
  box-shadow: none;
  transition: background .15s, color .15s;
}
.side .side-link::before { content: none; }
.side .side-link:hover {
  background: #eef4ff;
  color: var(--accent);
  padding-left: 18px;
  box-shadow: none;
}
.side .side-link.active,
.side .side-link.active:hover {
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  padding-left: 18px;
  box-shadow: none;
}

/* Selected year: same weight as the others, only the colour changes */
.side .side-link.active,
.side .side-link.active:hover {
  font-weight: 500;
}

/* Publication table: fixed column widths so every year lines up the same */
.pub-table { table-layout: fixed; }
.pub-table th:nth-child(1), .pub-table td:nth-child(1) { width: 30%; }
.pub-table th:nth-child(2), .pub-table td:nth-child(2) { width: auto; }
.pub-table th:nth-child(3), .pub-table td:nth-child(3) { width: 140px; white-space: normal; }
.pub-table th:nth-child(4), .pub-table td:nth-child(4) { width: 150px; white-space: nowrap; }
.pub-table th:last-child, .pub-table td:last-child { width: 150px; }

/* ===== Page transitions ===== */
/* Smooth cross-fade when moving between pages (Chrome and Edge) */
@view-transition { navigation: auto; }
::view-transition-old(root) {
  animation: pv-fade-out .28s cubic-bezier(.4, 0, .2, 1) both;
}
::view-transition-new(root) {
  animation: pv-fade-in .4s cubic-bezier(.2, .7, .2, 1) both;
}
@keyframes pv-fade-out { to { opacity: 0; transform: translateY(-6px); } }
@keyframes pv-fade-in { from { opacity: 0; transform: translateY(10px); } }

/* Content rises in softly on every page (all browsers) */
@keyframes pv-rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
.content > * { animation: pv-rise .5s cubic-bezier(.2, .7, .2, 1) both; }
.content > *:nth-child(2) { animation-delay: .05s; }
.content > *:nth-child(3) { animation-delay: .1s; }
.content > *:nth-child(4) { animation-delay: .15s; }
.side { animation: pv-fade-in .5s ease both; }

/* Respect users who ask for less motion */
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  .content > *, .side { animation: none !important; }
}

/* ===== Premium pass 2 ===== */
/* Soft background light across the page */
body {
  background: var(--page);
  min-height: 100vh;
}

/* Details page */
.pub-heading {
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.25;
  color: var(--navy);
  margin: 0 0 8px;
  max-width: 920px;
}
.pub-authors { color: #475569; font-size: .98rem; margin: 0 0 16px; max-width: 920px; line-height: 1.55; }
.meta-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 22px; }
.meta-chip {
  font-size: .8rem;
  font-weight: 600;
  color: #334155;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 12px;
  box-shadow: 0 1px 2px rgba(15,23,42,.04);
}
.journal-chip { font-style: italic; font-weight: 500; color: var(--muted); }
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0;
  margin: 0;
  padding: 0;
}
.info-grid > div {
  padding: 18px 22px;
  border-bottom: 1px solid #eef2f7;
  border-right: 1px solid #eef2f7;
}
.info-grid dt {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}
.info-grid dd { margin: 0; font-size: .98rem; color: var(--ink); word-break: break-word; }
.card-actions { padding: 18px 22px; background: #fbfcfe; border-top: 1px solid #eef2f7; }
.scopus-btn-lg { font-size: .92rem; padding: 10px 18px; }
.back-link {
  display: inline-block;
  margin-top: 22px;
  color: var(--navy);
  font-weight: 600;
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 10px;
  transition: background .15s;
}
.back-link:hover { background: #e8efff; color: var(--accent); }

.back-link { margin-left: -14px; }

/* Open access column */
.pub-table th:nth-child(4), .pub-table td:nth-child(4) { width: 170px; white-space: normal; }
.pub-table th:last-child, .pub-table td:last-child { width: 130px; }
.oa-pill {
  display: inline-block;
  font-size: .76rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: #ecfdf5;
  color: #047857;
  box-shadow: inset 0 0 0 1px rgba(4,120,87,.15);
}
.oa-pill.oa-gold { background: #fff8e1; color: #92400e; box-shadow: inset 0 0 0 1px rgba(146,64,14,.18); }
.oa-none { color: #cbd5e1; }

/* ===== Plain, institutional look (no decorative effects) ===== */
:root {
  --navy: #1f3a5f;
  --navy-dark: #1f3a5f;
  --navy-2: #1f3a5f;
  --accent: #1f4e79;
  --gold: #b8860b;
  --muted: #5f6b7a;
  --ink: #1d2733;
  --border: #d9dde3;
  --surface: #ffffff;
  --page: #f4f5f7;
}
.site-header {
  background: var(--navy);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
}
.site-header .search-form .btn,
.btn-primary {
  background: var(--accent);
  border: 1px solid var(--accent);
  box-shadow: none;
  transform: none !important;
}
.site-header .search-form .btn:hover { background: var(--navy); }
.card-box, .stat, .panel {
  border-radius: 6px;
  box-shadow: none;
}
.card-box { border-color: var(--border); }
.eyebrow { text-transform: none; letter-spacing: 0; font-size: .85rem; color: var(--gold); font-weight: 600; }
.type-pill, .oa-pill, .meta-chip { box-shadow: none; }
.type-pill { background: #eef1f5; color: var(--navy); }
.scopus-btn { box-shadow: none !important; transform: none !important; border-radius: 6px; }
.side-link { border-radius: 4px; }
.side-link.active { background: var(--navy); box-shadow: none; }
.side-link.active::before { background: var(--gold); }
.pager a { border-radius: 4px; box-shadow: none; }
.pager a.current { background: var(--navy); border-color: var(--navy); box-shadow: none; }
body { background: var(--page); }

/* Fixes: white year panel, no duplicate headings or stray controls on desktop */
.side { background: #ffffff !important; }
.side-link { color: var(--ink); }
.side-link:hover { background: #eef1f5; color: var(--navy); }
.side-link.active { color: #ffffff; }
.side-link.active .cnt { color: #ffffff; }
@media (min-width: 901px) {
  .side-close, .year-toggle, .side-backdrop { display: none !important; }
}
@media (max-width: 900px) {
  .side-title-desktop { display: none; }
}

/* Research cover background (navy with network, grid and the MIST watermark) */
.site-header {
  background-color: #1f3a5f;
  background-image: url("/static/publications/img/cover-bg.svg");
  background-size: cover;
  background-position: center;
}
