/* Keeps anchor targets clear of the fixed nav when arriving via /#section */
html {
    scroll-padding-top: 5rem;
}


/* Document body styles */
body.light-theme {
    background-color: #ffffff;
    color: #333333;
    transition: 0.5s;
}
body.dark-theme {
    background-color: #333333;
    color: #ffffff;
    transition: 0.5s;
}


/* Hyperlink, hightlight, and text styles */
a {
    color: #bd5d38;
    text-decoration: none;
    background-color: transparent;
}
a:hover {
    color: #824027;
    text-decoration: underline;
}
.blog-spotlight-link {
    border-radius: 8px;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.blog-spotlight-link:hover,
.blog-spotlight-link:focus-visible {
    box-shadow: 0 0 0 2px rgba(189, 93, 56, 0.35), 0 8px 20px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
    text-decoration: none;
}
.blog-spotlight-link:focus-visible {
    outline: none;
}
hightlight {
    color: #bd5d38;
    text-decoration: none;
    background-color: transparent;
}
.text-primary {
    color: #4c5157 !important;
    font-size: 29px;
}


/* Styles for user selection */
::selection {
    background-color: #ffb699;
    transition: 0.5s;
}

/* Light theme style for user selection */
.light-theme ::selection {
    background-color: #ffb699;
}

/* Dark theme style for user selection */
.dark-theme ::selection {
    background-color: #545454;
}


/* Styles for navigation bar */
.site-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 999;
    /* Pinned so the nav matches across pages: the blog pages set a serif body
       font, and the homepage inherits Bootstrap's system stack */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    background-color: rgba(245, 245, 245, 0.92);
}
.light-theme .site-nav {
    background-color: rgba(245, 245, 245, 0.92);
    color: #111111;
}
.dark-theme .site-nav {
    background-color: rgba(24, 24, 24, 0.92);
    color: #ffffff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 0.75rem 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}
.nav-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
    user-select: none;
}
.brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background-color: #bd5d38;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
}
.brand-text {
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-size: 14px;
}
.nav-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 0;
    padding: 0;
}
/* Anchor variants are used on the blog pages, buttons on the homepage */
.nav-link,
a.nav-link {
    display: inline-block;
    border: none;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: inherit;
    font-family: inherit;
    font-weight: 600;
    font-size: 14px;
    padding: 0.2rem 0;
    border-radius: 0;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
    outline: none;
    box-shadow: none;
}
a.nav-brand {
    text-decoration: none;
    color: inherit;
}
.nav-link:focus,
.nav-link:focus-visible {
    outline: none;
    box-shadow: none;
}
.nav-link:hover {
    color: #bd5d38;
    border-bottom-color: rgba(189, 93, 56, 0.4);
}
.nav-link.active {
    color: #bd5d38;
    border-bottom-color: #bd5d38;
}

body {
    padding-top: 84px;
}


/* Code-style text for research interest */
code {
    font-family: "Consolas";
    color: #333;
    background-color: #f1f1f1;
    padding: 2px 4px 2px 4px;
    font-size: 83%;
    border-radius: 5px;
    transition: 0.5s;
}
.light-theme code {
    color: #fff;
    background-color: #909090;
}
.dark-theme code {
    color: #333;
    background-color: #f1f1f1;
}


/* Border styles for profile picture */
.ring-container {
    display: flex;
    align-items: center;
    justify-content: center;
}
.ring {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    box-sizing: border-box;
    position: relative;
}
.ring::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    padding: 4px;
    box-sizing: border-box;
    background: linear-gradient(to right, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    mask-composite: exclude;
}
.hollow-ring {
    width: 152px;
    height: 152px;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #ffffff;
    z-index: 1;
    transition: 0.5s;
}
.light-theme .hollow-ring {
    background-color: #ffffff;
}
.dark-theme .hollow-ring {
    background-color: #333333;
}
.profile-image {
    width: 152px;
    height: 152px;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 5px solid #ffffff;
    z-index: 2;
    transition: 0.5s;
}
.light-theme .profile-image {
    border: 5px solid #ffffff
}
.dark-theme .profile-image {
    border: 5px solid #333333
}


/* Styles for emoji indicator with emoji */
.emoji-indicator {
    font-size: medium;
    width: 43px;
    height: 43px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #efefef;
    /* position: absolute;
    bottom: 5px;
    right: 1px; */
    position: relative;
    top: 112px;
    left: 107px;
    /* border: 4px solid #ffffff; */
    z-index: 1000;
}
.light-theme .emoji-indicator {
    /* border: 4px solid #ffffff; */
    background-color: #efefef;
}
.dark-theme .emoji-indicator {
    /* border: 4px solid #333333; */
    background-color: #787878;
}
.emoji-indicator .hover-text {
    display: none;
    white-space: nowrap;
    margin-left: 2px;
    /* margin-right: 4px; */
}
.emoji-indicator:hover .hover-text {
    display: inline;
}
.emoji-indicator:hover {
    border-radius: 21.5px;
    width: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}


/* Handle for social icons */
/* The icon row must stay on one line inside a narrow column, so the glyph size
   scales with the available width: 6 icons of 1.26em have to fit in 100cqw.
   The wrapper is the query container because cqw resolves against an ancestor,
   never the element itself. The px value is the no-container-query fallback. */
.social-icons-wrap {
    container-type: inline-size;
}
.social-icons {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    gap: 0.06em;
    font-size: 16px;
    font-size: clamp(11px, 12.8cqw, 32px);
}
.social-icons .social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    height: 1.2em;
    width: 1.2em;
    color: #495057;
    border-radius: 100%;
    font-size: inherit;
    line-height: 1;
    transition: transform 0.3s;
}
.social-icons .social-icon:hover {
    transform: scale(1.25);
}
/* Sized in its own em so the box tracks the row while "CV" stays readable */
.cv-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.4em;
    height: 2.4em;
    border: 0.14em solid #bd5d38;
    border-radius: 0.4em;
    color: #bd5d38;
    font-size: 0.42em;
    font-weight: 700;
    font-family: 'Fira Code', monospace;
    line-height: 1;
}


/* Styles for image lightbox overlay */
.image-lightbox-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.82);
    z-index: 1100;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
    flex-direction: column;
    gap: 0.75rem;
}
.image-lightbox-image {
    width: auto;
    height: auto;
    max-width: min(92vw, 1400px);
    max-height: calc(100vh - 6rem);
    object-fit: contain;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
    background-color: rgba(255, 255, 255, 0.04);
}
.image-lightbox-caption {
    max-width: min(92vw, 1400px);
    color: #f2f2f2;
    font-size: 0.95rem;
    text-align: center;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}
.image-lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    border: none;
    border-radius: 999px;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}
.image-lightbox-close:hover,
.image-lightbox-close:focus-visible {
    background: rgba(255, 255, 255, 0.22);
    transform: scale(1.05);
    outline: none;
}


/* Styles for volume emoji */
#volumeEmoji {
    cursor: pointer;
    font-size: 21px;
    user-select: none;
}
#volumeEmoji:focus {
    outline: none;
}


/* Styles for project list */
#projects {
    margin: 0px;
}
.project {
    margin: 0px;
    width: 100%;
}

#projects .row {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
}

/* Publications can use a smaller centered media block */
#publications .col-sm-3 img,
#publications .col-sm-3 video {
    display: block;
    width: 100% !important;
    max-width: none;
    margin: 0 auto;
}

/* Project cards need a consistent media frame because source aspect ratios vary */
#research .col-sm-3 {
    display: flex;
    align-items: center;
    justify-content: center;
}

#research .col-sm-3 img,
#research .col-sm-3 video {
    display: block;
    width: 100% !important;
    max-width: none;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    margin: 0;
}

@media (max-width: 575.98px) {
    #publications .col-sm-3 img,
    #publications .col-sm-3 video,
    #research .col-sm-3 img,
    #research .col-sm-3 video {
        width: 100% !important;
        max-width: none;
    }
}


/* Styles for filter buttons */
#filters-project .filter-button {
    padding: 4px 7px;
    border: 1px solid #333333;
    border-radius: 10px;
    background-color: transparent;
    color: #333333;
    cursor: pointer;
    transition: background-color 0.5s, box-shadow 0.5s;
}
#filters-project .filter-button:hover {
    background-color: rgba(194, 194, 194, 0.45);
}
#filters-project .filter-button.active {
    background-color: rgba(194, 194, 194, 0.45);
}


/* Light theme styles for filter button */
.light-theme #filters-project .filter-button {
    border: 1px solid #333333;
    color: #333333;
}


/* Dark theme styles for filter button */
.dark-theme #filters-project .filter-button {
    border: 1px solid #ffffff;
    color: #ffffff;
}


/* Styles for pager buttons */
.isotope-pager-project {
    display: flex;
    list-style-type: none;
    align-items: center;
    justify-content: center;
}
.isotope-pager-project .pager {
    display: block;
    padding: 4px 7px;
    background-color: transparent;
    border: 1px solid #333333;
    margin: 0 5px;
    border-radius: 7px;
    transition: 0.5s;
}
.isotope-pager-project .pager:hover {
    background-color: rgba(194, 194, 194, 0.45);
    cursor: pointer;
}
.isotope-pager-project .pager.active {
    background-color: rgba(194, 194, 194, 0.45);
}


/* Light theme styles for pager button */
.light-theme .isotope-pager-project .pager {
    border: 1px solid #333333;
    color: #333333;
}


/* Dark theme styles for pager button */
.dark-theme .isotope-pager-project .pager {
    border: 1px solid #ffffff;
    color: #ffffff;
}


/* Disabled stye for pager buttons */
.isotope-pager-project .pager:disabled {
    background-color: #cccccc;
    color: #666666;
    cursor: default;
    opacity: 0.5;
    border: 1px solid #aaaaaa;
}


/* Styles for pager buttons */
.isotope-pager-github {
    display: flex;
    list-style-type: none;
    align-items: center;
    justify-content: center;
}
.isotope-pager-github .pager {
    display: block;
    padding: 4px 7px;
    background-color: transparent;
    border: 1px solid #333333;
    margin: 0 5px;
    border-radius: 7px;
    transition: 0.5s;
}
.isotope-pager-github .pager:hover {
    background-color: rgba(194, 194, 194, 0.45);
    cursor: pointer;
}
.isotope-pager-github .pager.active {
    background-color: rgba(194, 194, 194, 0.45);
}


/* Light theme styles for pager button */
.light-theme .isotope-pager-github .pager {
    border: 1px solid #333333;
    color: #333333;
}


/* Dark theme styles for pager button */
.dark-theme .isotope-pager-github .pager {
    border: 1px solid #ffffff;
    color: #ffffff;
}


/* Disabled stye for pager buttons */
.isotope-pager-github .pager:disabled {
    background-color: #cccccc;
    color: #666666;
    cursor: default;
    opacity: 0.5;
    border: 1px solid #aaaaaa;
}


/* More/Less button for widgets */
.collapse.in { 
    display: inline !important; 
}


/* Styles for filter buttons */
#filters-resources .filter-button {
    padding: 4px 7px;
    border: 1px solid #333333;
    border-radius: 10px;
    background-color: transparent;
    color: #333333;
    cursor: pointer;
    transition: background-color 0.5s, box-shadow 0.5s;
}
#filters-resources .filter-button:hover {
    background-color: rgba(194, 194, 194, 0.45);
}
#filters-resources .filter-button.active {
    background-color: rgba(194, 194, 194, 0.45);
}


/* Light theme styles for filter button */
.light-theme #filters-resources .filter-button {
    border: 1px solid #333333;
    color: #333333;
}


/* Dark theme styles for filter button */
.dark-theme #filters-resources .filter-button {
    border: 1px solid #ffffff;
    color: #ffffff;
}


/* Awards and gallery cards.
   These used to be floated at a fixed 212px, which left a lone card orphaned
   on its own row and gave every card a different height. A grid keeps the rows
   even and the cards uniform at any width. */
.card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}
.card-grid .gallery {
    float: none;
    width: auto;
    margin: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card-grid .gallery:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.13);
}
/* One aspect ratio for every card, whatever the source photo */
.card-grid .gallery img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
    border-radius: 7px 7px 0 0;
}
/* flex-grow keeps captions of different lengths from staggering the rows */
.card-grid .desc {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 0.75rem;
    font-size: 14px;
    line-height: 1.45;
}

@media (max-width: 991.98px) {
    .card-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 575.98px) {
    .card-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
}


/* Handle for gallery and pictures in gallery */
div.gallery {
    margin: 3px;
    border: 1px solid #ccc;
    border-radius: 8px;
    float: left;
    width: 212px;
}
div.gallery:nth-child(8n+1) {
    clear: both;
}
div.gallery img {
    width: 100%;
    height: auto;
    border-radius: 7px;
}
div.desc {
    padding: 8px;
    text-align: center;
}


/* Styles for update cards */
.news-card {
    background-color: none;
    width: 100%;
    /* Tall enough for the busiest card (multi-outlet links + photo credit) */
    height: 325px;
    /* height: 365px; */
    border-radius: 7px;
    margin: 3px;
    border: 1px solid #ccc;
    float: left;
    width: 180px;
    /* width: 211px; */
    display: flex;
    flex-direction: column;
}
.news-card img {
    cursor: zoom-in;
}
.gallery img {
    cursor: zoom-in;
}
.news-desc {
    flex-grow: 1;
    padding: 0.4rem 1rem 0rem 1rem;
    font-size: 13px;
}
.news-time {
    color: grey;
    padding: 0rem 1rem 0.6rem 1rem;
    font-size: 12px;
}
/* Photo credit for third-party images used in update cards */
.news-credit {
    color: grey;
    padding: 0.3rem 1rem 0rem 1rem;
    font-size: 10px;
    line-height: 1.3;
}
.owl-carousel .owl-nav .owl-prev, .owl-carousel .owl-nav .owl-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border-radius: 50%;
    font-size: 60px;
    padding: 20px;
    width: 40px;
    height: 40px; 
    align-items: center;
    justify-content: center;
    opacity: 0.5; 
}
.owl-carousel .owl-nav .owl-prev {
    left: -30px;
}
.owl-carousel .owl-nav .owl-next {
    right: -33px;
}
.owl-carousel .owl-dots {
    display: none;
}
.owl-carousel {
    margin: 0;
    position: relative;
}


/* Styles for Github cards container */
#github-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    max-width: 1600px;
    margin: 15px;
}


/* Styles for GitHub cards */
.github-card {
    flex: 0 1 calc(50% - 20px);
    margin: 0px 15px 10px 0px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    width: 500px;
    padding: 16px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    transition: 0.5s;
}
.dark-theme .github-card {
    background-color: #292929;
    color: #ffffff;
    border-color: #343434;
}
@media (max-width: 768px) {
    .github-card {
        flex: 0 1 100%;
        width: auto;
    }
}


/* Styles for repository information */
.repo-header {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    transition: 0.5s;
}
.repo-header .bookmark-icon {
    margin-right: 8px;
    color: #586069;
    transition: 0.5s;
}
.repo-name {
    font-weight: 500;
    color: #0366d6;
    font-size: 16px;
    text-decoration: none;
    transition: 0.5s;
}
.repo-name:hover {
    text-decoration: underline;
    color: #0366d6;
}
.dark-theme .repo-name:hover {
    text-decoration: underline;
    color: #0366d6;
}
.repo-description {
    font-size: 13px;
    color: #586069;
    margin-bottom: 16px;
    line-height: 1.4;
    transition: 0.5s;
}
.stats-number {
    margin-left: 4px;
    transition: 0.5s;
    transition: 0.5s;
}
.repo-stats {
    display: flex;
    align-items: center;
    font-size: 14px;
    transition: 0.5s;
}
.repo-stats > * {
    display: flex;
    align-items: center;
    margin-right: 16px;
}
.repo-stats i {
    margin-right: 8px;
}
.language-icon {
    color: #007bff;
    margin-right: 8px;
    transition: 0.5s;
}
.dark-theme .repo-description,
.dark-theme .stats-number,
.dark-theme .language {
    color: #ffffff;
}
.star-icon {
    color: #ffc107;
    transition: 0.5s;
}
.fork-icon {
    color: #333;
    transition: 0.5s;
}
.dark-theme .bookmark-icon,
.dark-theme .fork-icon {
    color: #bbbbbb;
}


/* Back-to-top button styles */
#back-to-top-button {
    display: inline-block;
    background-color: #9faba6;
    width: 55px;
    height: 55px;
    text-align: center;
    border-radius: 7px;
    position: fixed;
    bottom: 30px;
    right: 30px;
    transition: background-color .3s, opacity .5s, visibility .5s;
    opacity: 0;
    visibility: hidden;
    z-index: 1000;
}
#back-to-top-button::after {
    content: "\f077";
    font-family: FontAwesome;
    font-weight: normal;
    font-style: normal;
    font-size: 2em;
    line-height: 50px;
    color: #fff;
}
#back-to-top-button:hover {
    cursor: pointer;
    background-color: #767f7b;
}
#back-to-top-button:active {
    background-color: #9faba6;
}
#back-to-top-button.show {
    opacity: 0.70;
    visibility: visible;
}


/* Toggle theme button styles */
.toggle-theme-button {
    width: 55px;
    height: 55px;
    border-radius: 7px;
    cursor: pointer;
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000; 
    transition: background-color 0.5s ease, color 0.5s ease;
}


/* Light theme styles for toggle theme button */
.light-theme .toggle-theme-button {
    background-color: #919191;
    color: #ffffff;
}


/* Dark theme styles for toggle theme button */
.dark-theme .toggle-theme-button {
    background-color: #ccc;
    color: #333333;
}


/* Container for the assistant icon */
.popup-icon-container {
    position: fixed;
    left: 10px;
    bottom: 20px;
    display: flex;
    align-items: center;
    cursor: pointer;
    z-index: 1000;
}


/* Assitant icon styles */
.icon {
    font-size: 30px;
    color: white;
    padding: 5px;
    border-radius: 50%;
}


/* Sppech balloon styles */
.speech-balloon {
    padding: 10px;
    border-radius: 10px;
    background-color: #f5f5f5;
    border: 2px solid #ddd;
    max-width: 200px;
    margin-left: 0px;
    font-size: 14px;
    transition: 0.5s;
}


/* Light theme for speech balloon */
.light-theme .speech-balloon {
    background-color: #f5f5f5;
    color: black;
    border: 2px solid #ddd;
}


/* Dark theme for speech balloon */
.dark-theme .speech-balloon {
    background-color: #495057;
    color: white;
    border: 2px solid #555;
}


/* Dismissal area styles for the assistant icon */
.dismissal-area {
    position: fixed;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 60px;
    background-color: rgba(176, 176, 176, 0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    color: white;
    z-index: 500; /* 500 := below the icon but above other content */
    display: none;
}

.hidden {
    display: none;
}


/* Styles for progress bar */
.progress-bar-container {
    width: 100%;
    height: 1px;
    background: #f1f1f1;
    position: fixed;
    top: 0;
    z-index: 1;
    transition: 0.5s;
}
.progress-bar {
    height: 1px;
    background: #bd5d38;
    width: 0%;
}
.light-theme .progress-bar-container {
    background: #f1f1f1;
}
.dark-theme .progress-bar-container {
    background: #888;
}


/* New style for webpage scrollbar */
::-webkit-scrollbar-track {
    background-color: #f1f1f1;
}
::-webkit-scrollbar-thumb {
    background-color: #888;
}
::-webkit-scrollbar-thumb:hover {
    background-color: #555;
}
::-webkit-scrollbar {
    width: 10px;
}
