
.publications-header {
    padding: 0rem 0 0rem 0;
    text-align: center;
    color: #120450;
}

.publications-header h1 {
    color: #120450;
    font-size: 3.625rem;
    font-weight: 500;
    line-height: 1.3;
    letter-spacing: 0.03em;
    margin: 0;
}

/* Publications Grid */
.publications-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-template-rows: auto 1fr;
    gap: 0rem;
    margin-left: 0;
    margin-right: 0;
    margin-top: 0.5rem;
    width: 100rem;
    box-sizing: border-box;
    margin-left: auto;
    margin-right: auto;
    background: #fffdfd;
    position: relative; /* keep for potential future decorations */
}

.title-left {
    grid-column: 1;
    grid-row: 1;
}

.title-right {
    grid-column: 2;
    grid-row: 1;
}

/* Slightly tighten spacing between the column title and its list and add a short decorative bar */
.title-text {
    font-size: 1.75rem;
    font-weight: 600;
    color: #120450;
    margin-bottom: 0.5rem; /* smaller gap */
    border-bottom: none;
    padding-bottom: 0.5rem;
    padding-left: 0.9rem;     /* keep left padding as-is */
    padding-right: 0;         /* REMOVE right padding so background reaches edge */
    position: sticky;         /* confined to nearest ancestor with overflow (the column) */
    top: 0;                   /* stick to top of the column's scroll container */
    background: rgba(255,255,255,0.96);
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
    box-shadow: 0 0.5rem 1rem -0.25rem rgba(0,0,0,0.06);
    z-index: 20;
    box-sizing: border-box;   /* ensure padding is included in width calculations */
    width: calc(100%); /* extend to cover the column's right padding */
    margin-right: 0rem;      /* pull the title to the right so background covers full column */
    display: block;
    margin-bottom: 0.6rem;
    text-align: center;
}

/* Make each column a scroll container. Sticky titles will be confined to their column.
   If content is short (no overflow), the title will scroll away with the page. */
.column-left,
.column-right {
    padding-top: 0rem;
    margin-right: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: calc(100vh - 7.5rem); /* adjust offset to clear navbar/header */
    overflow-y: auto; /* enables internal scrolling when content overflows */
    scroll-behavior: smooth;
    padding-right: 1.25rem; /* space for scrollbar and title width calculations */
    padding-left: 1.25rem;
}

/* keep a subtle divider between columns */
.column-right {
    border-left: 0.0625rem solid rgba(0,0,0,0.1);
}


/* Ensure lists sit a bit closer to the title */
.pub-list,
.chapter-list {
    font-size: 1.125rem;
    list-style: none;
    counter-reset: item;
    margin-top: 0.75rem; /* smaller separation from title */
    padding-top: 0.25rem; /* ensure spacing under sticky title */
}
.pub-list li,
.chapter-list li {
    position: relative;
    counter-increment: item;
    padding-left: 2rem;
    padding-right: 2rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
}

.pub-list li::after,
.chapter-list li::after {
  content: "";
  position: absolute;
  left: 2rem;
  right: 2rem;
  bottom: 0;
  height: 1px;
  background-color: rgba(0,0,0,0.1);
}

/* Inline numbering */
.pub-list li::before,
.chapter-list li::before {
    content: counter(item) ". ";
    font-size: 1.25rem;
    font-weight: 600;
    color: #120450;
    display: inline;
    margin-right: 0.5rem;
}

/* Entry Text */
.pub-entry .meta,
.chapter-entry .meta {
    display: inline;
    font-size: 1.25rem;
    color: #120450;
    opacity: 0.7;
    line-height: 1.4;
}
.pub-entry .meta span.year,
.chapter-entry .meta span.year {
    font-size: 1.25rem;
    font-weight: 500;
    margin-left: 0.25rem;
}

/* Title */
.pub-entry .title,
.chapter-entry .title {
    display: block;
    margin: 0.5rem 0;
    font-size: 1.25rem;
    font-weight: 500;
    color: #120450;
    text-decoration: none;
    transition: color 0.2s;
}
.pub-entry .title:hover,
.chapter-entry .title:hover {
    color: #9E0E25;
}

/* Journal Name & Details */
.pub-entry .journal,
.chapter-entry .journal {
  color: #120450;
  font-size: 1.25rem;
  font-weight: 600;
  font-style: italic;
  margin-right: 0.25rem;
}

.pub-entry .details,
.chapter-entry .details {
  color: #120450;
  opacity: 0.7;
  font-size: 1.25rem;
  font-weight: 400;
  margin-right: 0.25rem;
}

/* Images */
.pub-entry img,
.chapter-entry img {
    display: block;
    max-width: 100%;
    margin-top: 1rem;
    margin-left: 0;
    padding-left: 0;
}

/* light scrollbar styling: hidden by default, shown on hover */
.column-left,
.column-right {
    scrollbar-width: none; /* Firefox: hide by default */
    scrollbar-color: #9E0E25 rgba(255,255,255,0.0);
}
.column-left::-webkit-scrollbar,
.column-right::-webkit-scrollbar {
    width: 0; /* hide for WebKit by default */
}
.column-left::-webkit-scrollbar-thumb,
.column-right::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0); /* invisible */
    border-radius: 0.4rem;
    transition: background-color 180ms ease;
}

/* show scrollbar when user hovers the column */
.column-left:hover,
.column-right:hover {
    scrollbar-width: auto; /* Firefox: show thin scrollbar on hover */
}
.column-left:hover::-webkit-scrollbar,
.column-right:hover::-webkit-scrollbar {
    width: 0.6rem; /* WebKit: reveal scrollbar on hover */
}
.column-left:hover::-webkit-scrollbar-thumb,
.column-right:hover::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.08); /* visible thumb */
    border-radius: 0.4rem;
}

/* Responsive */
@media (max-width: 48rem) {
    .hero-inner {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hero-photo {
        max-width: 18.75rem;
        margin: 0 auto;
    }
    .hero-description {
        font-size: 1.125rem;
    }
    .buttons-row {
        flex-direction: column;
    }
    .btn {
        width: 100%;
        font-size: 1rem;
    }
    .content-card {
        max-width: 100%;
        padding: 1rem;
    }
    .content-card h3 {
        font-size: 1.5rem;
        text-align: center;
    }
    .content-card p {
        font-size: 1.125rem;
        text-align: center;
    }
    .card-inner {
        flex-direction: column;
        gap: 1rem;
    }
    .card-image {
        height: 12.5rem;
    }
    .publications-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

}