/* Publication styles */
.publication {
    margin-bottom: 1rem;  /* slightly reduced space between publications */
    padding: 1rem;
    border-radius: 8px;
    background: var(--brand-light);
    line-height: 1.4;  /* tighter overall line height */
    font-family: 'Univers', sans-serif;
}

.publication .title {
    font-size: 1.2rem;  /* slightly larger than default */
    font-weight: bold;
    margin-bottom: 0.3rem;  /* space after title */
    line-height: 1.3;  /* tighter line height for title */
}

.publication .authors {
    font-style: italic;
    margin-bottom: 0.25rem;  /* subtle space after authors */
    color: var(--text-muted);
}

.publication .venue {
    margin-bottom: 0.25rem;  /* subtle space after venue */
}

.pub-link {
    display: inline-block;
    margin-right: 1rem;
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    background: var(--accent-color);
    color: var(--bg-color);
    text-decoration: none;
    font-size: 0.9rem;
}

.pub-link:hover {
    background: var(--accent-color-hover);
}

.pub-year-group {
    margin-bottom: 3rem;
}


.pub-title-link {
    color: inherit; /* Keep title color */
    text-decoration: none;
}
.pub-title-link:hover {
    text-decoration: underline dotted;
    color: var(--brand-main); /* Use brand-main for hover highlight */
}

.hidden {
    display: none;
}

/* Common styles for expandable content containers (Abstract and BibTeX) */
.expandable-content {
    margin: 0;
    margin-top: 1rem;
    border-radius: 8px; /* Apply radius to both */
    border: 1px solid var(--brand-main); /* Apply consistent border */
    padding: 0.5em 1.2em; /* Apply compact padding to both */
    background: var(--quote-bg); /* Consistent background */
}

/* Style for the abstract content div specifically */
.expandable-content .abstract {
     /* Abstract specific styles */
    font-size: 0.9rem; /* Smaller font size */
    line-height: 1.4; /* Adjust line height for smaller font */
    color: var(--text-body);
}

.expandable-content .abstract strong { /* Style the "Abstract:" label */
    color: var(--text-dark); /* Make label slightly darker/bolder */
    display: block; /* Put label on its own line */
}

/* Ensure paragraphs inside abstract don't add extra margin */
.expandable-content .abstract p {
    margin: 0;
}

/* Specific overrides for BibTeX highlight block */
.highlight.bibtex-highlight {
    /* Inherits border, radius from .expandable-content now */
    /* Needs specific background if different from abstract */
    background: var(--code-bg); /* Use code background for BibTeX */

    /* --- Existing Overrides --- */
    overflow-x: hidden;
    white-space: pre-wrap;
    word-wrap: break-word;
    color: var(--text-body);
    font-family: 'Ubuntu Mono', monospace;
    font-size: 0.9rem; /* Ensure font size consistency */
    line-height: 1.4;

    /* Padding is inherited from .expandable-content */
    /* Margin is inherited from .expandable-content */
}

/* Reset default margins on the pre tag inside BibTeX block */
.highlight.bibtex-highlight pre {
    margin: 0;
    padding: 0;
}

/* Ensure code tag inside BibTeX block wraps */
.highlight.bibtex-highlight code {
    white-space: pre-wrap !important;
    word-wrap: break-word !important;
    display: block;
    padding: 0;
}

/* Ensure copy button (which uses position:absolute) works */
/* .highlight already has position:relative from style.css */

.pub-links {
    margin: 0.8rem 0;
}

.pub-link {
    display: inline-block;
    margin-right: 0.8rem;
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    background: var(--accent-color);
    color: var(--bg-color);
    text-decoration: none;
    font-size: 0.9rem;
}

.pub-link:hover {
    background: var(--accent-color-hover);
}

.expand-toggle {
    background: none;
    border: none;
    color: var(--accent-color);
    cursor: pointer;
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
    font-size: 0.9rem;
}

.expand-icon {
    display: inline-block;
    margin-right: 0.5rem;
    transition: transform 0.2s;
}

.expand-toggle[aria-expanded="true"] .expand-icon {
    transform: rotate(90deg);
}

.expandable {
    border-radius: 8px;
    background: var(--code-bg);
}

.me {
    font-weight: bold;
    text-decoration: underline dotted;
}

/* Base badge style */
.pub-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.3rem 0.5rem 0.1rem 0.5rem;
    border: 1px solid;
    border-radius: 4px;
    font-size: 0.9em;
    white-space: nowrap;
    line-height: 1.2;
    margin: 0 0.2rem;
    background: none;
    text-decoration: none;
    font-family: 'Berkeley Mono', monospace;
    font-weight: 700;
}

/* Interactive badges */
a.pub-badge, button.pub-badge {
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
}

/* Badge colors - using border and text color */
/* Unclickable venue badges - solid fill with light white text */
.acl-badge, .naacl-badge, .eacl-badge, .aacl-badge, .preprint-badge {
    background-color: var(--dark-red);
    color: var(--light-white);
    border-color: var(--light-white);
}

.iclr-badge, .cvf-badge {
    color: var(--light-white);
    background-color: var(--dark-cyan);
    border-color: var(--light-white);
}

.colm-badge {
    color: var(--light-white);
    background-color: var(--light-black);
    border-color: var(--light-white);
}

.neurips-badge {
    color: var(--light-white);
    background-color: var(--dark-magenta);
    border-color: var(--light-white);
}

.emnlp-badge {
    color: var(--light-white);
    background-color: var(--dark-green);
    border-color: var(--light-white);
}

/* Clickable link badges - transparent fill with colored text */
.acl-anthology-badge, .arxiv-badge {
    color: var(--dark-red);
    border-color: var(--dark-red);
}

.oral-badge {
    color: var(--dark-yellow);
    border-color: var(--dark-yellow);
    position: relative;
    padding-left: 2rem; /* Increased padding for larger icon */
}

.video-badge {
    color: var(--dark-red);
    border-color: var(--dark-red);
    position: relative;
    padding-left: 2rem; /* Increased padding for larger icon */
}

.video-badge::before {
    content: '';
    position: absolute;
    left: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1rem;
    height: 1rem;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" fill="%238f6c3f" viewBox="0 0 256 256"><path d="M234.49,111.07,90.41,22.94A20,20,0,0,0,60,39.87V216.13a20,20,0,0,0,30.41,16.93l144.08-88.13a19.82,19.82,0,0,0,0-33.86ZM84,208.85V47.15L216.16,128Z"></path></svg>');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}


.press-badge {
    color: var(--dark-yellow);
    border-color: var(--dark-yellow);
    position: relative;
    padding-left: 2rem; /* Increased padding for larger icon */
}

.press-badge::before {
    content: '';
    position: absolute;
    left: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1rem;
    height: 1rem;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" fill="%238f6c3f" viewBox="0 0 256 256"><path d="M216,36H40A20,20,0,0,0,20,56V216a12,12,0,0,0,17.37,10.73L64,213.42l26.63,13.31a12,12,0,0,0,10.74,0L128,213.42l26.63,13.31a12,12,0,0,0,10.74,0L192,213.42l26.63,13.31A12,12,0,0,0,236,216V56A20,20,0,0,0,216,36Zm-4,160.58-14.63-7.31a12,12,0,0,0-10.74,0L160,202.58l-26.63-13.31a12,12,0,0,0-10.74,0L96,202.58,69.37,189.27a12,12,0,0,0-10.74,0L44,196.58V60H212ZM136,108a12,12,0,0,1,12-12h36a12,12,0,0,1,0,24H148A12,12,0,0,1,136,108Zm0,40a12,12,0,0,1,12-12h36a12,12,0,0,1,0,24H148A12,12,0,0,1,136,148ZM72,172h40a12,12,0,0,0,12-12V96a12,12,0,0,0-12-12H72A12,12,0,0,0,60,96v64A12,12,0,0,0,72,172Zm12-64h16v40H84Z"/></svg>');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}



.oral-badge::before {
    content: '';
    position: absolute;
    left: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1rem; /* Increased size */
    height: 1rem; /* Increased size */
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" fill="%238f6c3f" viewBox="0 0 256 256"><path d="M168,12A75.9,75.9,0,0,0,92.49,96.33L23.91,189.85a19.89,19.89,0,0,0,2,26l14.29,14.29a19.89,19.89,0,0,0,26,2l93.52-68.58A76,76,0,1,0,168,12Zm52,76a51.66,51.66,0,0,1-7.75,27.27L140.74,43.75A52,52,0,0,1,220,88ZM54.72,210.71l-9.43-9.43,56.19-76.63a76.46,76.46,0,0,0,29.87,29.87ZM116,88a51.63,51.63,0,0,1,7.75-27.27l71.51,71.51A52,52,0,0,1,116,88Z"></path></svg>');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.spotlight-badge {
    color: var(--dark-yellow);
    border-color: var(--dark-yellow);
    position: relative;
    padding-left: 2rem; /* Increased padding for larger icon */
}

.spotlight-badge::before {
    content: '';
    position: absolute;
    left: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1.2rem; /* Increased size */
    height: 1.2rem; /* Increased size */
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256"><path fill="%238f6c3f" stroke="%238f6c3f" stroke-width="2" d="M180,232a12,12,0,0,1-12,12H88a12,12,0,0,1,0-24h80A12,12,0,0,1,180,232Zm40-128a91.51,91.51,0,0,1-35.17,72.35A12.26,12.26,0,0,0,180,186v2a20,20,0,0,1-20,20H96a20,20,0,0,1-20-20v-2a12,12,0,0,0-4.7-9.51A91.57,91.57,0,0,1,36,104.52C35.73,54.69,76,13.2,125.79,12A92,92,0,0,1,220,104Zm-24,0a68,68,0,0,0-69.65-68C89.56,36.88,59.8,67.55,60,104.38a67.71,67.71,0,0,0,26.1,53.19A35.87,35.87,0,0,1,100,184h56.1A36.13,36.13,0,0,1,170,157.49,67.68,67.68,0,0,0,196,104Zm-20.07-5.32a48.5,48.5,0,0,0-31.91-40,12,12,0,0,0-8,22.62,24.31,24.31,0,0,1,16.09,20,12,12,0,0,0,23.86-2.64Z"/></svg>');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}


.award-badge {
    color: var(--dark-yellow);
    border-color: var(--dark-yellow);
    position: relative;
    padding-left: 2rem; /* Increased padding for larger icon */
}

.award-badge::before {
    content: '';
    position: absolute;
    left: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1.2rem; /* Increased size */
    height: 1.2rem; /* Increased size */
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256"><path fill="%238f6c3f" stroke="%238f6c3f" stroke-width="2" d="M220,96A92,92,0,1,0,68,165.69V240a12,12,0,0,0,17.37,10.73L128,229.42l42.64,21.31A12,12,0,0,0,188,240V165.69A91.86,91.86,0,0,0,220,96ZM60,96a68,68,0,1,1,68,68A68.07,68.07,0,0,1,60,96ZM164,220.59l-30.64-15.32a12,12,0,0,0-10.74,0L92,220.58V180.66a92,92,0,0,0,72,0ZM128,148A52,52,0,1,0,76,96,52.06,52.06,0,0,0,128,148Zm0-80a28,28,0,1,1-28,28A28,28,0,0,1,128,68Z"/></svg>');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}


.link-badge, .toggle-badge[aria-expanded="true"] {
    color: var(--brand-main);
    border-color: var(--brand-main);
}

.toggle-badge {
    color: var(--text-muted);
    border-color: var(--text-muted);
}

/* Hover states for interactive elements */
a.acl-anthology-badge:hover, button.acl-anthology-badge:hover,
a.arxiv-badge:hover, button.arxiv-badge:hover {
    color: var(--medium-red);
    border-color: var(--medium-red);
}

a.oral-badge:hover, button.oral-badge:hover {
    color: var(--medium-yellow);
    border-color: var(--medium-yellow);
}

a.video-badge:hover, button.video-badge:hover {
    color: var(--medium-red);
    border-color: var(--medium-red);
}

a.press-badge:hover, button.press-badge:hover {
    color: var(--medium-yellow);
    border-color: var(--medium-yellow);
}

a.spotlight-badge:hover, button.spotlight-badge:hover {
    color: var(--light-blue);
    border-color: var(--light-blue);
}

a.link-badge:hover, button.link-badge:hover,
button.toggle-badge:hover, span.toggle-badge:hover {
    color: var(--brand-dark);
    border-color: var(--brand-dark);
}

/* Make toggle-badge spans look and behave like buttons */
span.toggle-badge {
    cursor: pointer;
    user-select: none;
}

span.toggle-badge:focus {
    outline: 2px solid var(--brand-main);
    outline-offset: 2px;
}

.pub-filters {
    display: flex;
    gap: 2.5rem;
    margin-bottom: 2rem;
    margin-top: -0.5rem;
    flex-wrap: wrap;
    font-family: 'Berkeley Mono', monospace;
    font-stretch: condensed;
    font-weight: 350;
}

.filter-column {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 180px;
}

.venue-grid {
    display: grid;
    grid-template-columns: repeat(3, auto);
    grid-template-rows: repeat(2, auto);
    gap: 0.5rem 1.2rem;
    min-width: 320px;
}

.venue-grid .filter-label {
    grid-column: 1 / -1;
    margin-bottom: 0.3em;
}

.filter-label {
    font-size: 0.95em;
    font-weight: bold;
    color: var(--text-dark);
    margin-bottom: 0.3em;
    letter-spacing: 0.02em;
}

.custom-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.92em;
    user-select: none;
    margin-bottom: 0.1em;
}

.custom-checkbox input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 1.1em;
    height: 1.1em;
    border: 1.5px solid var(--brand-main);
    border-radius: 3px;
    background: transparent;
    margin-right: 0.6em;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s;
    position: relative;
}

.custom-checkbox input[type="checkbox"]:checked + .checkmark::after {
    content: '';
    position: absolute;
    left: 0.28em;
    top: 0.12em;
    width: 0.6em;   /* Longer right arm */
    height: 0.32em; /* Shorter left arm */
    border-left: 2px solid var(--brand-main);
    border-bottom: 2px solid var(--brand-main);
    border-top: none;
    border-right: none;
    transform: rotate(-45deg);
    border-radius: 1px;
}

.filter-text {
    font-size: 0.93em;
    color: var(--text-body);
    /* transition: color 0.2s, text-decoration 0.2s; */
}

.filter-text:hover {
    color: var(--brand-main);
    text-decoration: underline dotted;
}

.custom-checkbox input[type="checkbox"]:not(:checked) ~ .filter-text {
    text-decoration: line-through;
    color: var(--text-muted);
    opacity: 0.7;
}

.custom-checkbox input[type="checkbox"]:focus + .checkmark {
    outline: 2px solid var(--brand-main);
    outline-offset: 2px;
}

@media (max-width: 700px) {
    .pub-filters {
        flex-direction: column;
        gap: 1.2rem;
    }
    .venue-grid {
        display: flex;
        flex-direction: column;
        min-width: unset;
    }
}