@charset "utf-8";

/* ===== Base & Typography ===== */
body {
    font-family: "Lato", sans-serif;
    font-weight: 400;
    padding-top: 5.0rem;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    font-weight: 700;
}

/* Font weight utilities (missing from Bootstrap 4) */
.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }

/* Word break utility */
.word-break {
    word-break: break-word;
    overflow-wrap: break-word;
}

/* ===== Cards ===== */
.card {
    border-radius: 0.8rem !important;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.card-animate:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12) !important;
    transform: translateY(-1px);
}

.card-img-overlay {
    border-radius: 0.8rem !important;
}

.rounded-xl {
    border-radius: 0.8rem !important;
}

.rounded-xl-bottom {
    border-bottom-right-radius: 0.8rem !important;
    border-bottom-left-radius: 0.8rem !important;
}

.rounded-xl-top {
    border-top-left-radius: 0.8rem !important;
    border-top-right-radius: 0.8rem !important;
}

/* ===== Profile ===== */
.text-profile-position {
    font-weight: 400;
}

.text-profile-bio {
    font-weight: 400;
    line-height: 1.7;
}

/* ===== Navbar ===== */
.navbar {
    opacity: 0.95;
    background: linear-gradient(to right, #f8f9fa 0%, #ffffff 50%, #f8f9fa 100%) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.navbar-brand {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2c3e50 !important;
    letter-spacing: 0.5px;
}

.navbar-nav .nav-link {
    color: #555 !important;
    font-weight: 500;
    font-size: 0.95rem;
    margin-left: 0.5rem;
    margin-right: 0.5rem;
    transition: color 0.2s ease;
    position: relative;
}

.navbar-nav .nav-link:hover {
    color: #2c3e50 !important;
}

.navbar-nav .nav-link.active {
    color: #2c3e50 !important;
    border-bottom: 2px solid #2c3e50;
}

.navbar-toggler {
    color: #555 !important;
}

/* ===== Utilities ===== */
.inline-badge {
    height: 16px;
    vertical-align: -10%;
    margin-right: 2px;
    line-break: unset;
}

.no-break {
    white-space: nowrap;
}

.cover-image {
    width: 180px;
    max-height: 120px;
}

.abstract-body {
    min-height: 100px;
}

/* ===== Lazy Loading ===== */
img.lazy {
    background-image: url('images/loading.gif');
    background-repeat: no-repeat;
    background-position: 50% 50%;
    background-size: 50px 50px;
    min-height: 80px;
}

div.lazy {
    background-image: url('images/loading.gif');
    background-repeat: no-repeat;
    background-position: 50% 50%;
    background-size: 50px 50px;
    min-height: 80px;
}

/* ===== Publications ===== */
.badge-publication {
    font-size: 100%;
}

.email-text {
    font-family: Source Code Pro, monospace;
}

.publication-cover-container {
    transition: all 0.3s ease;
}

.publication-cover-container.hide-covers {
    display: none !important;
}

.publication-cover {
    display: block;
}

.publication-content {
    padding-left: 2rem !important;
}

.publication-content.col-md-12 {
    max-width: 90%;
    padding-left: 1rem !important;
}

.publication-cover-container.hide-covers ~ .publication-content {
    flex: 0 0 100% !important;
    max-width: 100% !important;
}

/* ===== Experience & Education Cards ===== */
.card h6 {
    font-size: 0.95rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.exp-logo {
    width: 16px;
    flex-shrink: 0;
}

.exp-body {
    min-width: 0;
}

/* ===== Sidebar Layout ===== */
.sidebar-col {
    display: flex;
    flex-direction: column;
    padding-top: 0;
}

/* ===== Profile Card ===== */
.profile-card-fixed {
    position: static;
    z-index: 99;
    width: 100%;
    margin-bottom: 0.8rem;
}

.profile-card-container {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
    border-radius: 1rem !important;
}

.profile-portrait-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
    max-width: 200px;
    margin: 0 auto;
    padding: 8px;
    background: linear-gradient(135deg, #f5f5f5 0%, #ffffff 100%);
    border-radius: 1rem;
    box-shadow: 
        inset 0 2px 4px rgba(255, 255, 255, 0.8),
        inset 0 -2px 4px rgba(0, 0, 0, 0.1),
        0 4px 12px rgba(0, 0, 0, 0.15);
}

.profile-portrait {
    width: 100%;
    height: auto;
    max-height: 300px;
    border-radius: 0.8rem;
    display: block;
}

/* ===== Social Icons ===== */
.social-icon {
    transition: color 0.2s ease, transform 0.2s ease;
    display: inline-block;
}

.social-icon:hover {
    transform: translateY(-2px);
    color: #2c3e50 !important;
}

/* ===== Section Labels (Profile Card) ===== */
.section-label {
    font-weight: 600;
    color: #495057;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
}

.interest-tags {
    font-size: 0.9rem;
}

/* ===== Experience Cards ===== */
.experience-cards-fixed {
    position: static;
}

@media (max-width: 992px) {
    .profile-card-fixed,
    .experience-cards-fixed {
        position: static !important;
        width: 100% !important;
        top: auto !important;
        left: auto !important;
        max-height: none !important;
        overflow-y: visible !important;
        margin-bottom: 2rem;
    }
}

@media (max-width: 768px) {
    .col-lg-4 .card {
        word-break: break-word;
        overflow-wrap: break-word;
    }
}

/* ===== Stats Card ===== */
.stats-card {
    background-color: #fafafa !important;
    opacity: 0.95;
}

.stats-title {
    font-weight: 600;
    color: #666;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem 0.4rem;
}

.stats-mini-item {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.4rem 0;
    font-size: 0.75rem;
}

.stats-mini-label {
    font-weight: 500;
    color: #777;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stats-mini-value {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.stats-mini-value .badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.4rem !important;
    font-weight: 600;
    white-space: nowrap;
}

/* Stats badge color variants */
.stats-badge {
    font-size: 0.8rem;
    padding: 0.25rem 0.4rem;
    font-weight: 600;
}

.stats-badge-blue { background-color: #e3f2fd; color: #1976d2; }
.stats-badge-purple { background-color: #f3e5f5; color: #7b1fa2; }
.stats-badge-orange { background-color: #fff3e0; color: #f57c00; }
.stats-badge-green { background-color: #f1f8e9; color: #558b2f; }
.stats-badge-deeporange { background-color: #ffe0b2; color: #e65100; }

.visitor-badge {
    max-height: 20px;
    display: inline-block;
}

/* ===== Links & Hover Effects ===== */
a {
    transition: color 0.15s ease;
}

.abstract-links a {
    transition: color 0.15s ease, background-color 0.15s ease;
    padding: 0 2px;
    border-radius: 2px;
}

.abstract-links a:hover {
    background-color: rgba(0, 123, 255, 0.08);
}

/* ===== Smooth fade-in for page content ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.container-lg > .row {
    animation: fadeInUp 0.4s ease-out;
}