/*
 * Custom CSS for Academic CV - Bright Light Theme with Skewed Profile Photo
 * Palette: FON Deep Blue (#002b51 / #004473), Teal (#25ad98), Emerald (#03bb7a)
 */

@font-face {
    font-family: 'Manument RNIDS';
    src: url('../fonts/ManumentRNIDS-Regular.woff2') format('woff2'),
        url('../fonts/ManumentRNIDS-Regular.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Manument RNIDS';
    src: url('../fonts/ManumentRNIDS-Bold.woff2') format('woff2'),
        url('../fonts/ManumentRNIDS-Bold.otf') format('opentype');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Manument RNIDS';
    src: url('../fonts/ManumentRNIDS-Italic.woff2') format('woff2'),
        url('../fonts/ManumentRNIDS-Italic.otf') format('opentype');
    font-weight: normal;
    font-style: italic;
    font-display: swap;
}


:root {
    --color-bg-light: #f0f4f8;
    --color-primary: #004473;
    /* FON Dark Blue for text */
    --color-accent-teal: #25ad98;
    /* Teal for links and markers */
    --color-accent-emerald: #03bb7a;
    /* Emerald green */
    --color-text-dark: #1b2e46;
    /* High contrast body text */
    --color-text-muted: #4a607a;
    /* Muted body text */
}

/* Overlay theme overrides (kept dark navy for both skewed and full-screen layouts to preserve background color consistency) */
.overlay {
    background: rgba(0, 26, 48, 0.85) !important;
    /* Teget / Tamnoplavi overlay */
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.overlay.skew-part {
    background: rgba(0, 26, 48, 0.85) !important;
    /* Teget / Tamnoplavi overlay */
    border-right: 2px solid rgba(37, 173, 152, 0.4) !important;
    box-shadow: 5px 0 25px rgba(0, 0, 0, 0.5);
    position: relative;
}

/* Particles container on the left */
#particles-js {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Global font override for Manument RNIDS and fallback */
body,
html,
h1,
h2,
h3,
h4,
h5,
h6,
p,
a,
li,
input,
select,
textarea,
button {
    font-family: 'Manument RNIDS', 'Open Sans Condensed', 'Open Sans', sans-serif !important;
}


/* Override body to support light content */
body {
    background: var(--color-bg-light) !important;
    color: var(--color-text-dark) !important;
}

/* Square Profile Photo container */
.left-profile-container {
    width: auto;
    height: 330px;
    margin: 25px auto 25px auto;
    border: 6px solid #e2e2e2;
    box-shadow: 0 5px 15px rgba(37, 173, 152, 0.3);
    border-radius: 8px;
    /* Kvadrat sa blago zaobljenim uglovima */
    overflow: hidden;
    display: inline-block;
    background: #002b51;
}

.left-profile-pic {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block;
    margin: 0 !important;
    transform: none !important;
}

/* Left side typography (High contrast white/light on dark navy background) */
.left-name {
    font-size: 32px !important;
    font-weight: 700 !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4) !important;
    color: #ffffff !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px !important;
}

.left-affiliation {
    font-size: 14px !important;
    color: rgba(255, 255, 255, 0.8) !important;
    line-height: 1.6 !important;
    margin-top: 15px !important;
    margin-bottom: 30px !important;
    font-weight: 400 !important;
    text-transform: none !important;
    letter-spacing: 0.5px !important;
}

.left-affiliation strong {
    color: #ffffff !important;
}

/* Social icons footer overrides for dark background */
.social-icons a {
    color: var(--color-text-muted) !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
    transition: all 0.3s ease;
}

.social-icons a:hover {
    color: #fff !important;
    background-color: var(--color-accent-teal) !important;
    border-color: var(--color-accent-teal) !important;
    box-shadow: 0 3px 10px rgba(37, 173, 152, 0.4);
}

/* Force icons to remain white on hover, preventing them from turning pink/red from parent styles */
.social-icons a:hover i,
.social-icons a:hover i.ai {
    color: #ffffff !important;
}

.social-icons a i.ai {
    font-size: 18px;
    line-height: 40px;
    /* Aligns vertically inside the circles */
}

/* Tippy.js Modern Custom Tooltip Theme */
.tippy-box[data-theme~='custom'] {
    background-color: #002b51 !important;
    /* Rich Navy Blue */
    color: #ffffff !important;
    font-family: inherit !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    border: 1.5px solid var(--color-accent-teal) !important;
    /* Teal border */
    box-shadow: 0 4px 15px rgba(0, 68, 115, 0.3) !important;
    border-radius: 6px !important;
}

.tippy-box[data-theme~='custom'] .tippy-content {
    padding: 7px 12px !important;
}

.tippy-box[data-theme~='custom'][data-placement^='top']>.tippy-arrow::before {
    border-top-color: var(--color-accent-teal) !important;
}

.tippy-box[data-theme~='custom'][data-placement^='bottom']>.tippy-arrow::before {
    border-bottom-color: var(--color-accent-teal) !important;
}

.tippy-box[data-theme~='custom'][data-placement^='left']>.tippy-arrow::before {
    border-left-color: var(--color-accent-teal) !important;
}

.tippy-box[data-theme~='custom'][data-placement^='right']>.tippy-arrow::before {
    border-right-color: var(--color-accent-teal) !important;
}

/* Button styling for dark background */
.light-btn {
    border: 2px solid #ffffff !important;
    color: #ffffff !important;
    background: transparent !important;
    font-weight: 700 !important;
    transition: all 0.3s ease;
}

.light-btn:hover {
    background: var(--color-accent-teal) !important;
    color: #fff !important;
    border-color: var(--color-accent-teal) !important;
    box-shadow: 0 4px 15px rgba(37, 173, 152, 0.4);
}

/* Right side content light glassmorphism style panels */
#right-side {
    background: rgba(240, 244, 248, 0.95) !important;
    /* Matches the last section (even) background to prevent bottom scroll gaps */
}

/* Remove default padding from content wrappers to allow full-bleed sections */
#right-side .content {
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
}

#right-side .inner-content {
    padding: 0 !important;
}

/* Base CV Section */
.cv-section {
    padding: 70px 45px;
    margin-top: -47px;
    /* Overlap to hide background gaps between 45px slants + 2px subpixel buffer */
    position: relative;
    transition: background 0.3s ease;
}

/* Specific Section Polygons to create alternating zig-zag angles (45px Slants) */

/* Section 1 (Biography) - Flat top, slants up-right at bottom (/) */
.cv-section:nth-of-type(1) {
    margin-top: 0 !important;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 45px), 0 100%) !important;
    padding-top: 60px !important;
}

/* Section 2 (Academic Titles) - Slants up-right at top, slants down-right at bottom (\) */
.cv-section:nth-of-type(2) {
    clip-path: polygon(0 45px, 100% 0, 100% 100%, 0 calc(100% - 45px)) !important;
}

/* Section 3 (Education) - Slants down-right at top, slants up-right at bottom (/) */
.cv-section:nth-of-type(3) {
    clip-path: polygon(0 0, 100% 45px, 100% calc(100% - 45px), 0 100%) !important;
}

/* Section 4 (Research) - Slants up-right at top, slants down-right at bottom (\) */
.cv-section:nth-of-type(4) {
    clip-path: polygon(0 45px, 100% 0, 100% 100%, 0 calc(100% - 45px)) !important;
}

/* Section 5 (Publications) - Slants down-right at top, slants up-right at bottom (/) */
.cv-section:nth-of-type(5) {
    clip-path: polygon(0 0, 100% 45px, 100% calc(100% - 45px), 0 100%) !important;
}

/* Section 6 (Teaching) - Slants up-right at top, slants down-right at bottom (\) */
.cv-section:nth-of-type(6) {
    clip-path: polygon(0 45px, 100% 0, 100% 100%, 0 calc(100% - 45px)) !important;
}

/* Section 7 (Contact) - Slants up-right at top, flat bottom */
.cv-section:nth-of-type(7) {
    clip-path: polygon(0 45px, 100% 0, 100% 100%, 0 100%) !important;
    padding-bottom: 70px !important;
}

/* Alternating white/grey backgrounds */
.cv-section:nth-of-type(odd) {
    background: rgba(255, 255, 255, 0.95) !important;
    /* Soft white */
}

.cv-section:nth-of-type(even) {
    background: transparent !important;
    /* Inherits #right-side's background to prevent double-layering opacity mismatch */
}

/* Nested card adjustments for alternating backgrounds 
.cv-section:nth-of-type(even) .cv-card-item,
.cv-section:nth-of-type(even) .cv-contact-item {
    background: rgba(255, 255, 255, 0.85) !important;
    border-color: rgba(0, 68, 115, 0.05) !important;
}


*/

#right-side h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 22px;
    font-weight: 700;

    /* Reset since padding-top handles spacing */
    margin-bottom: 25px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    display: inline-block;

    clip-path: polygon(0% 0, 95% 0, 100% 100%, 0% 100%);
    background: var(--color-accent-teal);
    margin-left: -50px;
    padding: 10px;
    padding-top: 13px;
    padding-left: 20px;
    padding-right: 30px;
    color: #FFF !important;
}





#right-side p {
    font-size: 14.5px;
    line-height: 1.7;
    color: var(--color-text-dark) !important;
    margin-bottom: 15px;
    text-align: justify;
}

/* Scrollbar styling */
.mCSB_dragger_bar {
    background-color: var(--color-primary) !important;
}

.mCSB_dragger:hover .mCSB_dragger_bar {
    background-color: var(--color-accent-teal) !important;
}

.mCSB_draggerRail {
    background-color: rgba(0, 0, 0, 0.05) !important;
}

/* Right-side academic timelines (Dark theme colors changed to high-contrast light) */
.cv-timeline {
    position: relative;
    padding-left: 25px;
    margin: 25px 0;
}

.cv-timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 5px;
    bottom: 5px;
    width: 2px;
    background: rgba(0, 0, 0, 0.08);
}

.cv-timeline-item {
    position: relative;
    margin-bottom: 25px;
}

.cv-timeline-item:last-child {
    margin-bottom: 0;
}

.cv-timeline-marker {
    position: absolute;
    left: -25px;
    top: 5px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--color-accent-teal);
    border: 3px solid #ffffff;
    box-shadow: 0 0 0 2px rgba(3, 187, 122, 0.15);
    transition: all 0.3s ease;
}

.cv-timeline-item:hover .cv-timeline-marker {
    background: var(--color-accent-teal);
    box-shadow: 0 0 0 4px rgba(163, 163, 163, 0.3);
}

.cv-timeline-date {
    font-size: 12px;
    font-weight: 700;
    color: var(--color-accent-teal);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.cv-timeline-title {
    font-size: 15.5px;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 3px;
}

.cv-timeline-subtitle {
    font-size: 13px;
    color: var(--color-text-muted);
    font-style: italic;
    margin-bottom: 4px;
}

.cv-timeline-desc {
    font-size: 13px;
    color: var(--color-text-muted);
    line-height: 1.5;
}

/* Card components for publications and items */
.cv-card-item {
    border-left: 3px solid var(--color-accent-teal);
    padding: 10px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    transition: all 0.3s ease;
}

.cv-card-item:hover {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(37, 173, 152, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 68, 115, 0.08);
    cursor: default;
}

.cv-card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 4px;
}

.cv-card-desc {
    font-size: 13px;
    color: var(--color-text-muted);
    line-height: 1.5;
}

/* Contact information items layout */
.cv-contact-row {
    margin-top: 25px;
    margin-bottom: 25px;
}

.cv-contact-item {
    text-align: center;
    background: rgba(255, 255, 255, 0.5);

    padding: 20px;
    margin-bottom: 15px;

    transition: all 0.3s ease;
}

.cv-contact-item:hover {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(37, 173, 152, 0.2);
}

.cv-contact-item i {
    font-size: 46px;
    color: var(--color-primary);

    margin-bottom: 10px;
}

.cv-contact-item h5 {
    font-size: 13px;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 5px;
    text-transform: uppercase;
}

.cv-contact-item p {
    font-size: 12.5px !important;
    color: var(--color-text-muted) !important;
    text-align: center !important;
    line-height: 1.4 !important;
    margin: 0 !important;
}

.cv-contact-item p a {
    color: var(--color-accent-teal);
    font-weight: 600;
}

.cv-contact-item p a:hover {
    color: var(--color-accent-emerald);
}

/* Form Styles overrides for light mode */
.form-control {
    background: rgba(255, 255, 255, 0.7) !important;
    border: 1px solid rgba(0, 68, 115, 0.15) !important;
    color: var(--color-text-dark) !important;
    border-radius: 6px !important;
    padding: 12px !important;
}

.form-control:focus {
    border-color: var(--color-accent-teal) !important;
    box-shadow: 0 0 8px rgba(37, 173, 152, 0.15) !important;
    background: #ffffff !important;
}

.btn-color {
    background: var(--color-primary) !important;
    border-color: var(--color-primary) !important;
    color: #fff !important;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
    padding: 12px 30px !important;
    transition: all 0.3s ease;
}

.btn-color:hover {
    background: var(--color-accent-teal) !important;
    border-color: var(--color-accent-teal) !important;
    box-shadow: 0 4px 12px rgba(37, 173, 152, 0.3);
}

/* Close button style for sliding panel */
#close-more-info {
    color: var(--color-primary) !important;
}

#close-more-info:hover {
    color: var(--color-accent-teal) !important;
}

footer {
    margin-top: 40px;
    padding-top: 25px;
    background: transparent !important;
    /* Transparent background to blend in */
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    /* Soft dark line divider */
    text-align: center;
    position: relative;
    z-index: 10;
}

footer p {

    color: var(--color-text-muted) !important;
    /* Muted text color for light mode */
    margin: 0;
    text-align: right !important;
    font-size: 10px !important;
}

/* Preloader Customization (White background, navy blue spinner and text) */
#loading {
    background: #ffffff !important;
}

#preloader::after {
    content: "" !important;
    color: #002b51 !important;
    /* Navy blue loading text on white background */
    font-family: inherit !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    letter-spacing: 1.5px !important;
    text-transform: uppercase !important;
}

#preloader span {
    background-color: transparent !important;
    background: transparent !important;
    border-color: #002b51 !important;
}

/* Mobile responsive styles - Center social icons horizontally */
@media only screen and (max-width: 1024px) {
    .social-icons {
        position: absolute !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 30px !important;
        text-align: center !important;
        width: 100% !important;
        margin: 0 auto !important;
    }

    .social-icons a {
        float: none !important;
        display: inline-block !important;
        margin: 0 8px !important;
    }
}

/* Watermark math graph in the top right corner of the sliding panel */
.right-corner-bg {
    position: fixed !important;
    /* Fixed viewport positioning keeps it static during scroll */
    top: 0;
    right: 0;
    width: 400px;
    /* Increased size for visual impact */
    height: 400px;
    background-image: url('https://math.fon.bg.ac.rs/view/img/bg1.png') !important;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: top right;
    z-index: 15;
    /* Sits on top of the section background but under text readability flow, clicks fall through */
    pointer-events: none;
    opacity: 0;
    /* Hidden by default */
    transform: translateX(100%);
    /* Pushed off-screen to the right */
    transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.7, 0, 0.3, 1);
}

/* Slide in and fade in when right-side panel is open */
#right-side:not(.hide-right)~.right-corner-bg {
    opacity: 0.3;
    transform: translateX(0);
}

/* Adjust size on mobile screens to maintain screen proportions */
@media only screen and (max-width: 480px) {
    .right-corner-bg {
        width: 250px !important;
        height: 250px !important;
    }

    #right-side:not(.hide-right)~.right-corner-bg {
        opacity: 0.18;
    }
}

/* Brand Logo size override */
.brand-logo {
    width: 100% !important;
    max-width: 370px !important;
    height: auto !important;
    margin: 0 !important;
    display: block !important;
}

/* Publication Filter & Sort styles */
.pub-controls {
    margin-bottom: 25px !important;
    background: rgba(255, 255, 255, 0.5) !important;
    padding: 15px !important;

}

.btn-filter,
.btn-course-filter {
    background: transparent !important;
    border: 1.5px solid var(--color-accent-teal) !important;
    color: var(--color-accent-teal) !important;
    font-weight: 700 !important;
    font-size: 13px !important;
    text-transform: uppercase !important;
    transition: all 0.25s ease !important;
    border-radius: 5px !important;
    padding: 6px 16px !important;
    letter-spacing: 0.5px !important;
    margin-bottom: 5px !important;
}

.btn-filter:hover,
.btn-filter.active,
.btn-course-filter:hover,
.btn-course-filter.active {
    background: var(--color-accent-teal) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 10px rgba(0, 68, 115, 0.25) !important;
    border-color: var(--color-accent-teal) !important;
}

.btn-sort {
    background: transparent !important;
    border: 1.5px solid var(--color-primary) !important;
    color: var(--color-primary) !important;
    font-size: 11px !important;
    width: 28px !important;
    height: 28px !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.25s ease !important;
    cursor: pointer !important;
    margin-left: 4px !important;
    padding: 0 !important;
    outline: none !important;
    vertical-align: middle !important;
}

.btn-sort:hover,
.btn-sort.active {
    background: var(--color-primary) !important;
    color: #ffffff !important;
    box-shadow: 0 3px 8px rgba(0, 68, 115, 0.2) !important;
    border-color: var(--color-primary) !important;
}

/* Adjust layout on mobile devices */
@media only screen and (max-width: 767px) {
    .pub-sort {
        float: none !important;
        display: block !important;
        margin-top: 15px !important;
    }
}

/* Publication list row styles */
.cv-pub-row {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 10px 0 !important;
    border-bottom: 1px solid rgba(0, 68, 115, 0.15) !important;
    background: transparent !important;
    box-shadow: none !important;
    margin-bottom: 0 !important;
    border-radius: 0 !important;
}

.cv-pub-row:last-child {
    border-bottom: none !important;
}

.cv-pub-content {
    flex: 1 !important;
    padding-right: 20px !important;
}

.cv-pub-actions {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    flex-shrink: 0 !important;
    gap: 8px !important;
}

.pub-title {
    font-weight: 700 !important;
    font-size: 15.5px !important;
    color: var(--color-primary) !important;
    line-height: 1.4 !important;
    margin-bottom: 6px !important;
}

.pub-category-badge {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    background: rgba(37, 173, 152, 0.08) !important;
    color: var(--color-accent-teal) !important;
    border: 1.5px solid var(--color-accent-teal) !important;
    font-weight: 700 !important;
    font-size: 9px !important;
    flex-shrink: 0 !important;
    padding: 0 !important;
    text-transform: uppercase !important;
    line-height: 1 !important;
    text-align: center !important;
    transition: all 0.2s ease !important;
}

.pub-category-badge[data-toggle="tooltip"] {
    cursor: pointer !important;
}

.pub-category-badge[data-toggle="tooltip"]:hover {
    background: var(--color-accent-teal) !important;
    color: #ffffff !important;
}

.pub-authors {
    font-style: italic !important;
    font-size: 13.5px !important;
    color: var(--color-text-dark) !important;
    margin-bottom: 4px !important;
}

.pub-details {
    font-size: 13px !important;
    color: #555555 !important;
    margin-bottom: 5px !important;
}

.pub-meta {
    font-size: 12px !important;
    font-weight: 600 !important;
    color: var(--color-accent-teal) !important;
}

.pub-action-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 38px !important;
    height: 38px !important;
    border-radius: 50% !important;
    background: rgba(0, 68, 115, 0.06) !important;
    color: var(--color-primary) !important;
    border: 1.5px solid transparent !important;
    transition: all 0.2s ease !important;
    cursor: pointer !important;
    outline: none !important;
    padding: 0 !important;
}

.pub-action-btn:hover {
    background: var(--color-primary) !important;
    color: #ffffff !important;
    border-color: var(--color-primary) !important;
    box-shadow: 0 3px 8px rgba(0, 68, 115, 0.2) !important;
}

/* Responsiveness for mobile screens */
@media only screen and (max-width: 767px) {
    .cv-pub-row {
        flex-direction: column !important;
        align-items: flex-start !important;
    }

    .cv-pub-content {
        padding-right: 0 !important;
        margin-bottom: 12px !important;
    }

    .cv-pub-actions {
        width: 100% !important;
        justify-content: flex-start !important;
        gap: 12px !important;
    }

    .pub-action-btn {
        margin-left: 0 !important;
    }
}

/* Helper class to force hide publication rows (resolves conflict with display:flex !important) */
.cv-pub-row.hide-pub {
    display: none !important;
}

/* Custom activity item layouts and period boxes */
.cv-card-item {
    display: flex !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
    gap: 20px !important;
}

.cv-card-content {
    flex: 1 !important;
}

.cv-card-period-box {
    display: flex !important;
    flex-direction: column !important;
    width: 60px !important;
    height: 60px !important;
    border-radius: 4px !important;
    overflow: hidden !important;
    font-family: 'Open Sans Condensed', sans-serif !important;
    font-weight: 700 !important;
    font-size: 13.5px !important;
    text-align: center !important;
    box-shadow: 0 4px 10px rgba(0, 68, 115, 0.15) !important;
    flex-shrink: 0 !important;
}

.cv-card-period-box .period-end {
    background: var(--color-primary) !important;
    /* Dark blue background */
    color: #ffffff !important;
    height: 30px !important;
    line-height: 30px !important;
    padding: 0 3px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

.cv-card-period-box .period-start {
    background: var(--color-accent-teal) !important;
    /* Light green background */
    color: #ffffff !important;
    height: 30px !important;
    line-height: 30px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.15) !important;
    padding: 0 3px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

.cv-card-period-box.single-year {
    background: var(--color-primary) !important;
    justify-content: center !important;
    align-items: center !important;
}

.cv-card-period-box .period-single {
    color: #ffffff !important;
    height: 60px !important;
    line-height: 60px !important;
    font-size: 14.5px !important;
    font-weight: 700 !important;
    padding: 0 3px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

/* Make period boxes responsive on small mobile layouts */
@media only screen and (max-width: 480px) {
    .cv-card-item {
        flex-direction: column-reverse !important;
        align-items: flex-start !important;
        gap: 12px !important;
    }

    .cv-card-period-box {
        align-self: flex-start !important;
    }
}

/* Course item layouts */
.cv-course-item {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    border-left: 3px solid var(--color-primary);
    padding: 6px 10px 4px 10px !important;
    /* Top: 6px, Right: 10px, Bottom: 4px, Left: 10px for vertical centering */
    margin-bottom: 12px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.95);
    gap: 15px !important;
}

.cv-course-item .cv-card-title {
    margin-bottom: 0 !important;
    flex-shrink: 0 !important;
    font-weight: 500 !important;
}

.cv-course-item .cv-course-desc {
    font-size: 13.5px !important;
    color: #666666 !important;
    font-weight: 500 !important;
    text-align: right !important;
}

.cv-course-item:hover {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(37, 173, 152, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 68, 115, 0.08);
    cursor: default;
}

/* Inactive course styling overrides */
.cv-course-item.inactive-course {
    border-left-color: #cccccc !important;
    background: rgba(240, 240, 240, 0.5) !important;
}

.cv-course-item.inactive-course .cv-card-title {
    color: #888888 !important;
    font-weight: 500 !important;
}

.cv-course-item.inactive-course .cv-course-desc {
    color: #aaaaaa !important;
}

/* Responsive wrap for courses inline layout */
@media only screen and (max-width: 580px) {
    .cv-course-item {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 4px !important;
    }

    .cv-course-item .cv-course-desc {
        text-align: left !important;
    }
}

/* Specificity override to hide courses dynamically */
.cv-course-item.hide-pub {
    display: none !important;
}

/* Language selector styles */
.lang-selector a {
    text-decoration: none !important;
}

.lang-selector a:hover {
    color: var(--color-accent-teal) !important;
}