/* General */

#cv-download .spinner {
    display: none;
    width: 14px;
    height: 14px;
    margin-right: 8px;
    border: 2px solid #fff6;
    border-top-color: var(--white);
    border-radius: 50%;
    vertical-align: middle;
    animation: spinner-rotate 0.6s linear infinite;
}

#cv-download.loading .spinner {
    display: inline-block;
}

#cv-download .btn-label {
    color: inherit;
}

html.dark-mode .ftco-navbar-light:not(.awake,.scrolled) .navbar-nav > .nav-item > .nav-link span,
html.dark-mode .resume-wrap .position,
html.dark-mode .ftco-about ul.about-info li span:first-child,
html.dark-mode .ftco-about .counter-wrap .text p span,
html.dark-mode #navi li a:not(.current) {
    color: var(--text-color) !important;
}

html.dark-mode .ftco-navbar-light:not(.awake,.scrolled) .navbar-nav > .nav-item > .nav-link.active span {
    color: var(--link) !important;
}

html.dark-mode .heading-section h2,
html.dark-mode h2.heading {
    color: var(--link) !important;
}

html.dark-mode #about-section .heading-section h2 {
    color: var(--text-color) !important;
}

html.dark-mode .counter-wrap .text .number.xp {
    color: var(--link) !important;
}

html.dark-mode #last-update-date {
    color: var(--gray) !important;
}

html.dark-mode .hero-wrap .overlay {
    background: var(--white) !important;
}

html.dark-mode #article-shape {
    color: var(--text-color);
}

html.dark-mode .ftco-partner .partner img {
    background-color: var(--white);
    padding: 4px;
    border-radius: 4px;
}

#navi li a.current {
	color: var(--link) !important;
}

.open-mfp:hover,
.btn.btn-primary:hover {
    color: var(--white) !important;
    opacity: 0.7;
}

mark.highlight {
    background-color: var(--lavender);
    border: 1px solid var(--main);
}

mark.highlight.current-match {
    border: 1px solid var(--red);
}

input[name="search-input"].highlight-flash {
    box-shadow: 0 0 3px 3px var(--gray) !important;
    transition: box-shadow 0.3s ease;
}

@keyframes pulse-blue {
    0%,
    100% {
        filter: drop-shadow(0 0 5px var(--main));
    }
}

.icon-search.search-help {
    animation: pulse-blue 2s ease-in-out;
    cursor: pointer;
    color: var(--link);
}

#search-info {
    color: var(--positive);
    font-style: italic;
}

#search-info:not(:empty)::before {
    content: "\2713\00a0";
}

#search-info.no-result {
    color: var(--negative) !important;
    font-style: italic;
}

#search-info.no-result:not(:empty)::before {
    content: "\26a0\00a0";
}

.search-form .icon-search,
.search-form .icon-times {
    cursor: pointer;
}

/* Home Section */

.txt-rotate>.wrap {
    border-right: 0.08em solid var(--dark);
}

.slider-text .hero-tagline {
    font-size: 16px;
    font-weight: 400;
    max-width: 34rem;
    margin-inline: auto;
    margin-bottom: 0;
    color: var(--gray);
}

/* .hero-wrap is set to the exact window height in JS (fullHeight() in
   main.js), and .mouse sits at a fixed 120px from its bottom - on a short
   (but still >= 992px wide, so .mouse isn't already hidden) browser window,
   that leaves too little room above it and the scroll-down cue overlaps the
   vertically-centered hero text. Pull it closer to the true bottom edge to
   free up that space. */
@media (max-height: 700px) {
    .mouse {
        bottom: 40px;
    }
}

/* About Section */

.ftco-about ul.about-info li span:first-child {
    margin-right: 0.5rem;
}

.profile-photo {
    background-image: url("/images/profile.webp");
}

.profile-photo:hover {
    opacity: 0.9;
}

/* Hire Me */

.ftco-hireme {
    background-image: url("/images/background.webp");
}

.ftco-hireme .overlay {
    opacity: 0.5 !important;
}

/* Resume Section */

.logo-school {
    background-size: cover !important;
}

#last-update-date {
    font-size: 1rem;
    color: var(--gray);
}

#navi li a {
    padding: 0;
}

/* Growing blue underline on hover, mirroring the top navbar's
   .nav-link span::before (scoped to .ftco-navbar-light, so it never
   reaches the resume sub-nav). The current item keeps its own ::after dash. */
#navi li a span {
    position: relative;
    display: inline-block;
    padding-bottom: 2px;
}

#navi li a span::before {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 2px;
    background: var(--main);
    transform: scaleX(0);
    transition: transform 0.3s ease-in-out;
}

#navi li a:not(.current):hover span::before {
    transform: scaleX(1);
}

#js {
    background-position: center;
    border: 1px solid var(--cyan);
}

#fft {
    background-size: 30px;
    background-color: var(--yellow);
    background-repeat: no-repeat;
    background-position: center;
}

/* Progress Bars */

progress {
    appearance: none;
    width: 100%;
    height: 0.5rem;
    border: none;
    border-radius: 0.5rem;
    overflow: hidden;
}

progress::-webkit-progress-bar {
    background-color: var(--lavender);
    border-radius: 0.5rem;
}

progress::-moz-progress-bar {
    border-radius: 0.5rem;
    background-color: var(--main);
}

progress::-webkit-progress-value {
    background-color: var(--main);
}

/* Navbar */

.navbar-nav > .nav-item .nav-link.active span {
    color: #385ae6;
}

/* Navbar brand */

html.dark-mode .ftco-navbar-light:not(.awake) .navbar-brand,
.ftco-navbar-light:not(.awake) .navbar-brand:hover {
    color: var(--text-color) !important;
}

@media(max-width: 991.98px) {
    .ftco-navbar-light .navbar-brand,
    .ftco-navbar-light:not(.awake) .navbar-brand:hover {
        color: var(--white) !important;
    }

    .ftco-navbar-light.scrolled .navbar-brand {
        color: var(--dark) !important;
    }

    .mouse,
    #navi {
        display: none;
    }
}

.about-author {
    margin-top: 20px;
}

/* Blog Section */

.blog-entry .article-image:hover {
    opacity: 0.7 !important;
}

/* Contact Popup */

#contact-icon {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    background-color: var(--main);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 6px var(--shadow-lg);
    z-index: 1000;
}

#contact-icon .icon-user {
    padding: 15px;
    font-size: 25px;
}

#contact-window {
    position: fixed;
    bottom: 85px;
    right: 20px;
    width: 300px;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 6px var(--shadow-lg);
    overflow: hidden;
    z-index: 1000;
}

#contact-header {
    background-color: var(--main);
    padding: 8px;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

#contact-header h6 {
    font-weight: bold;
    margin-top: 8px;
}

#contact-link {
    font-size: 14px;
}

#contact-link p {
    gap: 10px;
    margin: 10px;
    width: 100%;
}

#contact-link i {
    font-size: 15px;
    height: 15px;
    width: 15px;
    background-size: contain;
    background-repeat: no-repeat;
}

/* stays --main, not --link: #contact-window is bg-white in both themes */
#contact-link a {
    color: var(--main);
    text-decoration: none;
    transition: color 0.3s;
}

#contact-link a:hover {
    font-weight: bold;
    text-decoration: underline;
}

@media(max-width:910px) {
    #contact-window {
        bottom: 90px;
        right: 20px;
        width: 230px;
        border-radius: 25px;
    }

    #contact-header {
        padding: 4px 8px;
        border-top-right-radius: 25px;
        border-top-left-radius: 25px;
    }

    #contact-link {
        font-size: 12px;
        color: var(--dark);
    }

    #contact-link p {
        gap: 8px;
        width: 90%;
    }

    #contact-link i {
        font-size: 13px;
    }
}

#callback-form {
    margin-top: 0.5rem;
    margin-bottom: 1rem;
}

.mfp-close {
    cursor: pointer;
}

/* Projects Section */

#projects-section {
    opacity: 0.8;
}

.project p {
    font-size: 13px !important;
}

.project .text span {
    text-transform: inherit !important;
    letter-spacing: inherit !important;
}

@media (max-width: 767.98px) {
    .project .text {
        opacity: 0;
    }
}

.project-title {
    bottom: 0;
    width: 100%;
    position: absolute;
    background: var(--white);
    box-shadow: 0 4px 10px var(--dark);
}

.project-title h5 {
    font-weight: 600;
    color: var(--main);
}

.project:hover .project-title {
    display: none;
}

.project:hover .badge {
    background-color: var(--dark);
    transition: background-color 0.3s ease;
}

.ftco-counter .block-18 {
	background-color: var(--white);
}

/* Carousel Section */

.owl-menus {
    flex-wrap: wrap;
    gap: clamp(16px, 6vw, 60px);
}

.owl-menu {
    cursor: pointer;
    padding-bottom: 4px;
    border-bottom: 2px solid transparent;
}

/* Lightened blue: the carousel sits on a fixed #191919 panel in both
   themes, where --main (#3e64ff) only reaches 3.7:1. */
.owl-menu.active {
    color: #6e8bff;
    border-bottom-color: #6e8bff;
}

.owl-carousel {
    max-width: 80%;
    margin: auto;
}

.owl-item {
    border-radius: 15px;
    padding: 30px;
    box-sizing: border-box;
}

.owl-item img {
    width: 50% !important;
    height: 50%;
    aspect-ratio: 1 / 1;
    object-fit: contain;
}

.owl-prev,
.owl-next {
    top: 50%;
    width: 28px;
    height: 28px;
}

.owl-prev {
    left: -28px;
}

.owl-next {
    right: -28px;
}

.owl-theme .owl-nav [class*="owl-"]:hover {
    background: inherit;
    opacity: 0.7;
}

.owl-prev:focus,
.owl-next:focus,
.owl-dot:focus {
    background: transparent;
    outline: none;
}

.owl-dot.active span {
    background: var(--main) !important;
}

/* Services Section */

.services-1:hover {
    opacity: 0.8;
}

.services-1:hover h3 {
    color: var(--white) !important;
}

/* Blog */

#iframe-article {
    visibility: hidden;
    height: 0;
    width: 0;
}

/* Footer */

.ftco-footer-links li a {
    background: var(--main);
}

.ftco-footer-links li a span {
    color: var(--white) !important;
}

#bingo-timer {
    font-size: 40px;
    font-weight: bold;
}

#bingo-btn {
    padding: 10px 30px;
    background-color: var(--main);
    cursor: pointer;
    font-weight: bold;
    font-size: 30px;
    border-radius: 5px;
    margin: 20px;
}

#bingo-btn:hover {
    opacity: 0.8;
}

/* --green / --red, not --positive / --negative: #bingo-timer sits on the
   always-black footer, where the light-theme (darkened) variants fail. */
.victory {
    color: var(--green);
    border-radius: 10px;
    animation: blink 0.5s alternate 5;
}

.defeat {
    color: var(--red);
    border-radius: 10px;
    animation: shake 0.5s;
}

@keyframes blink {
    from {
        opacity: 1;
    }

    to {
        opacity: 0.3;
    }
}

@keyframes shake {
    0% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    50% {
        transform: translateX(5px);
    }

    75% {
        transform: translateX(-5px);
    }

    100% {
        transform: translateX(0);
    }
}

.icon-heart,
.icon-shield {
    color: var(--red);
}

.bulle-bd {
    display: none;
    position: absolute;
    top: 20px;
    right: 20px;
    border: 2px solid var(--main);
    border-radius: 10px;
    padding: 10px;
    max-width: 200px;
    box-shadow: 2px 2px 5px var(--shadow-lg);
}

.bulle-bd::after {
    content: "";
    position: absolute;
    bottom: -18px;
    left: 20px;
    border-width: 8px;
    border-style: solid;
    border-color: var(--main) transparent transparent transparent;
}

.profile-photo:hover .bulle-bd {
    display: block;
}

/* Chart */

.chart-container {
    min-height: 250px;
    max-height: 500px;
}

#search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border: 1px solid var(--main);
    border-top: none;
    max-height: 150px;
    overflow-y: auto;
    list-style: none;
    margin: 0;
    padding: 0;
    z-index: 1000;
    font-size: 0.9em;
}

#search-suggestions li {
    padding: 8px 12px;
    cursor: pointer;
}

#search-suggestions li:hover {
    background-color: var(--light);
}

input[name="search-input"] {
    border-color: var(--main) !important;
}