html {
    scroll-padding-top: 70px;
}

body {
    padding-bottom: 30px;
    padding-top: 70px;
    font-size: 1.0rem;
    /* Base font size reduced */
    line-height: 1.5;
}

.center {
    text-align: center;
    align-items: center;
}


.main {
    /* padding-top: 2%; */
    min-height: 100%;
}

.center table {
    margin-left: auto;
    margin-right: auto;
    width: inherit;
    table-layout: fixed;
    /* border: 1px solid black; */
}

.right {
    text-align: right;
}

.left {
    text-align: left;
}

.icon {
    padding: 5px;
    font-size: larger;
    color: black;
}

.icon-link {
    padding: 5px;
    /* color: black; */
    font-weight: 500;

}

.intro {
    padding-top: 15px;
    /* Reduced for more consistent spacing */
}

.icon.icon-li {
    color: #2867b2;
}

.profile-container {
    border-radius: 15px;
    overflow: hidden;
    display: inline-block;
    width: 200px;
    margin-right: 50px;
    line-height: 0;
}

.profile {
    width: 100%;
    height: auto;
    display: block;
    margin: 0;
    padding: 0;
}

.profile-info {
    font-size: 0.9em;
}

.profile-name {
    font-size: 1.2em;
}

.navbar a {
    color: black;
    font-size: 1.2em;
}

.navbar a:hover {
    color: black;
}

#publications {
    padding-bottom: 10px;
}

/* Legacy pubdiv styles - kept for any remaining non-card publications */
.pubdiv {
    padding-bottom: 0.7rem;
    border-bottom: 1px solid #f3f4f6;
    margin-bottom: 0.7rem;
}

.pubdiv:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.publinks {
    font-size: 1em;
    /* Increased from 0.9em for better readability */
    padding-bottom: 5px;
    /* Reduced from 10px */
    margin-top: 3px;
}

.pubauths {
    font-size: 1em;
    /* Increased from 0.9em for better readability */
    margin-bottom: 2px;
    /* Add small margin */
}

.pubtitle {
    font-size: 1.2em;
    /* Increased for better readability */
    margin-bottom: 3px;
    /* Reduced from 5px */
    padding-top: 3px;
    /* Reduced from 5px */
}

.decls {
    font-size: small;
}

td {
    padding: 2px;
}

td.left {
    padding-left: 10px;
    border-left: 1px solid lightgray;
}

td.right {
    padding-right: 10px;
    border-right: 1px solid lightgray;
}

.icondiv {
    font-size: 0.85em;
    /* Reduced from 0.95em */
}

.navbar-brand {
    font-size: 1.5em !important;
    /* Restored to original size */
    color: black !important;
}

/* Typography improvements for cleaner look */
h1 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
}

h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
}

h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.2rem !important;
    margin-top: 0 !important;
}

/* Consistent spacing */
h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.6rem !important;
    margin-top: 0.3rem;
}

h5 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.1rem;
}

h6 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.1rem;
}

/* Publication category headings - make them stand out */
.pub-category {
    /* font-size: 1.25rem !important; */
    font-weight: 700 !important;
    font-style: italic;
    color: #1e40af;
    margin-top: 1.5rem !important;
    margin-bottom: 0.8rem !important;
    padding-left: 0.75rem;
    border-left: 6px solid #1e40af;
    padding-top: 0.4rem;
    padding-bottom: 0.4rem;
}

p {
    margin-bottom: 0.5rem !important;
    /* Consistent paragraph spacing */
    line-height: 1.5;
    margin-top: 0 !important;
    /* No top margin */
}

/* Clean list styling */
ul li {
    margin-bottom: 0.3rem;
    /* Consistent spacing for all lists */
}

/* Enhanced link styling for all content sections */
a {
    text-decoration: none;
    color: #2563eb;
    font-weight: 500;
    position: relative;
}

a:hover {
    color: #1d4ed8;
    text-decoration: none;
}

/* Clean link styling for About Me and News section links */
#about a,
#news a,
#research a,
.about-me-last a {
    color: #2563eb;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    display: inline-block;
}

/* Animated underline effect */
#about a::after,
#news a::after,
#research a::after,
.about-me-last a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 50%;
    background-color: #2563eb;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

#about a:hover,
#news a:hover,
#research a:hover,
.about-me-last a:hover {
    color: #1d4ed8;
    transform: scale(1.02);
    /* More subtle scale effect */
    text-decoration: none;
}

/* Animated underline on hover */
#about a:hover::after,
#news a:hover::after,
#research a:hover::after,
.about-me-last a:hover::after {
    width: 100%;
    background-color: #1d4ed8;
}

/* Button-style links for research section */
/* #research a {
    display: inline-block;
    padding: 1px 4px;
    margin: 0 1px;
    background-color: #ffffff;
    border: 1px solid #bfdbfe;
    border-radius: 3px;
    color: #1e40af;
    text-decoration: none;
    font-size: 0.85em;
    font-weight: 500;
    transition: all 0.2s ease;
}

#research a:hover {
    background-color: #1e40af;
    border-color: #112e6c;
    color: #ffffff;
    text-decoration: none;
} */

/* Navbar and icon links - consistent animated link styling */
.navbar {
    padding-top: 4px !important;
    /* tighter navbar spacing */
    padding-bottom: 4px !important;
}

.navbar .navbar-brand {
    margin-right: 8px !important;
    /* reduce gap before links */
}

.navbar .navbar-nav {
    gap: 2px;
}

.navbar-nav .nav-link {
    font-size: 1.1em !important;
}

.navbar a,
.icon-link {
    background: none !important;
    border: none !important;
    padding: 0.2rem 0.3rem !important;
    box-shadow: none !important;
    color: inherit;
    text-decoration: none;
    position: relative;
    transition: color 0.2s ease, transform 0.2s ease;
    font-size: 1.5em !important;
    vertical-align: middle;
}

/* animated underline */
.navbar a::after,
.icon-link::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -2px;
    width: 0;
    height: 2px;
    background-color: currentColor;
    transform: translateX(-50%);
    transition: width 0.2s ease;
}

.navbar a:hover,
.icon-link:hover {
    transform: scale(1.02);
}

.navbar a:hover::after,
.icon-link:hover::after {
    width: 100%;
}

/* Card styling for research interests - cleaner and smaller fonts */
.card {
    transition: all 0.3s ease !important;
    border-radius: 12px !important;
    /* Slightly reduced from 16px */
    border-top: 0.5px solid #f3f4f6 !important;
    border-left: 0.5px solid #f3f4f6 !important;
    border-right: 0.5px solid #f3f4f6 !important;
    border-bottom: none !important;
    background: #ffffff !important;
    box-shadow:
        0 -3px 6px -2px rgba(0, 0, 0, 0.08),
        0 -1px 3px -1px rgba(0, 0, 0, 0.06),
        0 -1px 2px 0px rgba(0, 0, 0, 0.04) !important;
}

.card:hover {
    transform: translateY(-3px) scale(1.01) !important;
    /* Reduced scale */
    box-shadow:
        0 -4px 8px -2px rgba(0, 0, 0, 0.12),
        0 -2px 4px -1px rgba(0, 0, 0, 0.08),
        0 -1px 3px 0px rgba(0, 0, 0, 0.06) !important;
}

.card-title {
    font-weight: 600;
    /* Reduced from 700 */
    margin-bottom: 0.5rem;
    /* Further reduced spacing */
    font-size: 0.95rem;
    /* Reduced from 1.1rem */
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    /* Reduced from 0.5rem */
    text-align: center;
}

.card-text {
    line-height: 1.6;
    /* Reduced from 1.7 */
    color: #374151;
    font-size: 0.85rem;
    /* Reduced from 0.95rem */
    margin-bottom: 0;
}

.card-body {
    padding: 1.2rem !important;
    /* Reduced from default */
}

/* Additional spacing and clean layout improvements */
.research-section {
    margin-top: 1rem;
    /* Reduced from 1.5rem */
    margin-bottom: 1.5rem;
    /* Reduced from 2rem */
}

hr {
    border: none !important;
    height: 1px !important;
    background-color: #d1d5db !important;
    /* Solid, visible divider line */
    color: transparent !important;
    /* Override inline styles */
    margin: 0.8rem 0 !important;
    /* Consistent spacing with !important to override inline */
}

/* Reset and create consistent section spacing */
#about,
#news,
#research-interests,
#publications {
    margin-top: 0 !important;
    /* Let HR handle spacing */
    margin-bottom: 0.8rem !important;
}

/* First section doesn't have HR above it */
#about {
    margin-top: 0.8rem !important;
}

/* Add extra whitespace after About Me section text */
.about-me-last {
    margin-bottom: 1.2rem !important;
    /* Extra space after the last About Me paragraph */
}

/* Consistent news list */
#news ul {
    padding-left: 1.2rem;
    margin-top: 0.3rem !important;
    /* Small gap after News heading */
    margin-bottom: 0.5rem !important;
}

#news li {
    margin-bottom: 0.3rem !important;
    /* Match general ul li spacing */
    line-height: 1.5;
}

/* Publication button styling */
.pub-btn {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    margin: 0.1rem 0.2rem;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    color: #495057;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.pub-btn:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
    color: #212529;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.pub-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Different button types */
.pub-btn.paper-btn {
    background-color: #e3f2fd;
    border-color: #90caf9;
    color: #1565c0;
}

.pub-btn.paper-btn:hover {
    background-color: #bbdefb;
    border-color: #64b5f6;
    color: #0d47a1;
}

.pub-btn.code-btn {
    background-color: #e8f5e8;
    border-color: #a5d6a7;
    color: #2e7d32;
}

.pub-btn.code-btn:hover {
    background-color: #c8e6c9;
    border-color: #81c784;
    color: #1b5e20;
}

.pub-btn.demo-btn {
    background-color: #fff3e0;
    border-color: #ffcc02;
    color: #ef6c00;
}

.pub-btn.demo-btn:hover {
    background-color: #ffe0b2;
    border-color: #ffb74d;
    color: #e65100;
}

.pub-btn.website-btn {
    background-color: #f3e5f5;
    border-color: #ce93d8;
    color: #7b1fa2;
}

.pub-btn.website-btn:hover {
    background-color: #e1bee7;
    border-color: #ba68c8;
    color: #4a148c;
}

.pub-btn.poster-btn {
    background-color: #fce4ec;
    border-color: #f8bbd9;
    color: #c2185b;
}

.pub-btn.poster-btn:hover {
    background-color: #f8bbd9;
    border-color: #f48fb1;
    color: #880e4f;
}

.pub-btn.slides-btn {
    background-color: #fff8e1;
    border-color: #ffcc02;
    color: #f57f17;
}

.pub-btn.slides-btn:hover {
    background-color: #ffecb3;
    border-color: #ffc107;
    color: #ff8f00;
}


/* Override Bootstrap row margins for consistent section spacing */
.row {
    margin-bottom: 0 !important;
}

/* Ensure consistent spacing for all section headings */
#about h3,
#news h3,
#publications h3 {
    margin-bottom: 0.2rem !important;
    margin-top: 0 !important;
}

/* Publication section styling with hover effects */
.pub-section {
    transition: all 0.3s ease !important;
    padding: 0.4rem 0.6rem !important;
    /* Reduced top/bottom, keep left/right */
    margin-bottom: 0.2rem !important;
    /* Minimal margin */
    border-left: 3px solid transparent !important;
    border-radius: 8px !important;
    background: rgba(249, 250, 251, 0.3) !important;
}

.pub-section:hover {
    background: rgba(239, 246, 255, 0.6) !important;
    border-left-color: #3b82f6 !important;
    transform: translateX(8px) !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15) !important;
}

.pub-section .pubtitle {
    font-size: 1.05rem !important;
    /* Reduced from 1.2rem to be smaller than h4 */
    font-weight: 600 !important;
    margin-bottom: 0.2rem !important;
    /* Further reduced */
    color: #1f2937 !important;
    line-height: 1.3;
    transition: color 0.3s ease !important;
}

.pub-section:hover .pubtitle {
    color: #1e40af !important;
}

.pub-section .pubauths {
    font-size: 1em !important;
    margin-bottom: 0.2rem !important;
    /* Further reduced */
    color: #4b5563 !important;
}

.pub-section .publinks {
    font-size: 1em !important;
    margin-bottom: 0 !important;
    padding-top: 0.1rem !important;
    /* Minimal padding */
}