/* =====================================================
   SocVRLab Publications — Design Improvements
   Drop this <link> into your <head> after style.css:
   <link rel="stylesheet" href="publications-improvements.css">
   ===================================================== */

/* ── 1. TYPOGRAPHY & BASE ── */
@import url('https://fonts.googleapis.com/css2?family=Source+Serif+4:ital,wght@0,300;0,400;1,300&family=DM+Sans:wght@300;400;500&display=swap');

body {
  font-family: 'DM Sans', system-ui, sans-serif;
  color: #1a1a1a;
  background: #fafaf8;
}

/* ── 2. NAVBAR ── */
#nav-custom {
  border-bottom: 1px solid #e8e6e0;
  background: #fafaf8 !important;
  padding: 0.6rem 0;
}

#nav-custom .navbar-brand.logo {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: #1a1a1a !important;
  text-transform: uppercase;
}

#nav-custom .nav-link a {
  font-size: 0.82rem;
  color: #888 !important;
  text-decoration: none;
  font-weight: 400;
  letter-spacing: 0.02em;
  transition: color 0.15s;
}

#nav-custom .nav-link a:hover {
  color: #1a1a1a !important;
}

/* Highlight the current page link */
#publications_page .nav-link a {
  color: #1a1a1a !important;
  font-weight: 500;
  border-bottom: 1.5px solid #1a1a1a;
  padding-bottom: 2px;
}

/* ── 3. YEAR JUMP NAV ── */
.row.years {
  margin: 0;
  padding: 14px 24px;
  background: #f3f1ec;
  border-bottom: 1px solid #e8e6e0;
}

.publication-years {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

.publication-years::before {
  content: 'Jump to:';
  font-size: 0.72rem;
  color: #999;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-right: 8px;
  white-space: nowrap;
}

.publication-year-a {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 500;
  color: #555 !important;
  text-decoration: none;
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid #d8d6d0;
  transition: all 0.15s;
  background: #fafaf8;
}

.publication-year-a:hover {
  background: #1a1a1a;
  color: #fff !important;
  border-color: #1a1a1a;
  text-decoration: none;
}

/* ── 4. PUBLICATION SECTION ── */
.publication {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── 5. YEAR HEADERS ── */
.pub-year-header {
  margin-top: 40px !important;
  margin-bottom: 0 !important;
  display: flex;
  align-items: center;
  gap: 16px;
}

.pub-year-header hr {
  flex: 1;
  margin: 0;
  border: none;
  border-top: 1px solid #e0ddd6;
}

.pub-year-header .pub-year {
  font-family: 'Source Serif 4', serif;
  font-size: 1.1rem !important;
  font-weight: 300 !important;
  font-style: italic;
  color: #888;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

/* ── 6. PUBLICATION ROWS ── */

/* Remove the heavy <hr> between entries */
.pub-row-wrapper + hr,
.publication > hr {
  display: none;
}

.pub-row-wrapper {
  border-bottom: 1px solid #eeece6;
  padding: 20px 0;
  transition: background 0.12s;
}

.pub-row-wrapper:last-of-type {
  border-bottom: none;
}

/* Desktop layout: shrink the image column, give more room to text */
.pub-row.d-none.d-lg-flex {
  align-items: flex-start;
  gap: 0;
}

.pub-row .col-4.pub-media {
  flex: 0 0 160px;
  max-width: 160px;
  padding-right: 20px;
}

.pub-row .col-8.pub-text {
  flex: 1;
  max-width: calc(100% - 160px);
}

/* Image styling */
.pub-media img {
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  width: 100%;
  height: 110px;
  object-fit: cover;
  display: block;
}

/* Publication text */
.pub-text strong {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.94rem;
  font-weight: 500;
  line-height: 1.45;
  color: #1a1a1a;
  display: block;
  margin-bottom: 5px;
}

.pub-text .authors {
  font-size: 0.82rem;
  color: #666;
  display: block;
  margin-bottom: 4px;
  line-height: 1.5;
}

/* Venue / journal info */
.pub-text p {
  font-size: 0.8rem;
  color: #888;
  margin: 0 0 6px;
  font-style: italic;
  line-height: 1.5;
}

/* DOI links */
.pub-text a.doi,
.pub-text a.issue-item__doi {
  font-style: normal;
  font-size: 0.75rem;
  color: #888;
}

/* "Link to publication" button */
.pub-text > div > a[target="_blank"]:not(.doi):not(.issue-item__doi) {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 500;
  color: #1a1a1a;
  text-decoration: none;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 3px 10px;
  margin-top: 2px;
  transition: all 0.15s;
  letter-spacing: 0.01em;
}

.pub-text > div > a[target="_blank"]:not(.doi):not(.issue-item__doi):hover {
  background: #1a1a1a;
  color: #fff;
  border-color: #1a1a1a;
}

/* ── 7. FOOTER ── */
.footer {
  text-align: center;
  padding: 32px 0 16px;
}

.footer img {
  opacity: 0.5;
  transition: opacity 0.2s;
}
.footer img:hover {
  opacity: 0.8;
}

/* ── 8. MOBILE LAYOUT ── */
@media (max-width: 991px) {
  .publication {
    padding: 0 16px;
  }

  .pub-row-wrapper {
    padding: 16px 0;
  }

  /* Mobile image */
  .d-block.d-lg-none .pub-media img {
    height: 160px;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  }

  .row.years {
    padding: 12px 16px;
  }
}

/* ── 9. SMALL UTILITY: DOI font-size fix ── */
span[style*="font-size:12px"] {
  font-size: 0.75rem !important;
}
